xref: /openbmc/linux/drivers/net/wireless/ath/wil6210/wmi.h (revision 42fe1e519e9f1c6f554c0183f8c9cdd92036cbbf)
12be7d22fSVladimir Kondratiev /*
273a7d1e3SAlexei Avshalom Lazar  * Copyright (c) 2018-2019, 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)
389b586118STzahi Sabo #define WMI_INVALID_TEMPERATURE		(0xFFFFFFFF)
39761f8e4dSLazar Alexei #define WMI_SCHED_MAX_ALLOCS_PER_CMD	(4)
40761f8e4dSLazar Alexei #define WMI_RF_DTYPE_LENGTH		(3)
41761f8e4dSLazar Alexei #define WMI_RF_ETYPE_LENGTH		(3)
42761f8e4dSLazar Alexei #define WMI_RF_RX2TX_LENGTH		(3)
43761f8e4dSLazar Alexei #define WMI_RF_ETYPE_VAL_PER_RANGE	(5)
448a4fa214SAhmad Masri /* DTYPE configuration array size
458a4fa214SAhmad Masri  * must always be kept equal to (WMI_RF_DTYPE_LENGTH+1)
468a4fa214SAhmad Masri  */
478a4fa214SAhmad Masri #define WMI_RF_DTYPE_CONF_LENGTH	(4)
488a4fa214SAhmad Masri /* ETYPE configuration array size
498a4fa214SAhmad Masri  * must always be kept equal to
508a4fa214SAhmad Masri  * (WMI_RF_ETYPE_LENGTH+WMI_RF_ETYPE_VAL_PER_RANGE)
518a4fa214SAhmad Masri  */
528a4fa214SAhmad Masri #define WMI_RF_ETYPE_CONF_LENGTH	(8)
538a4fa214SAhmad Masri /* RX2TX configuration array size
548a4fa214SAhmad Masri  * must always be kept equal to (WMI_RF_RX2TX_LENGTH+1)
558a4fa214SAhmad Masri  */
568a4fa214SAhmad Masri #define WMI_RF_RX2TX_CONF_LENGTH	(4)
57b5aeff16SDedy Lansky /* Qos configuration */
58b5aeff16SDedy Lansky #define WMI_QOS_NUM_OF_PRIORITY		(4)
59b5aeff16SDedy Lansky #define WMI_QOS_MIN_DEFAULT_WEIGHT	(10)
60b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MIN_MS	(2)
61b5aeff16SDedy Lansky #define WMI_QOS_VRING_SLOT_MAX_MS	(10)
62b5aeff16SDedy Lansky /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS /
63b5aeff16SDedy Lansky  * WMI_QOS_VRING_SLOT_MIN_MS)
64b5aeff16SDedy Lansky  */
65b5aeff16SDedy Lansky #define WMI_QOS_MAX_WEIGHT		50
66b5aeff16SDedy Lansky #define WMI_QOS_SET_VIF_PRIORITY	(0xFF)
67b5aeff16SDedy Lansky #define WMI_QOS_DEFAULT_PRIORITY	(WMI_QOS_NUM_OF_PRIORITY)
689b586118STzahi Sabo #define WMI_MAX_XIF_PORTS_NUM		(8)
69b874ddecSLior David 
70b874ddecSLior David /* Mailbox interface
71b874ddecSLior David  * used for commands and events
72b874ddecSLior David  */
73b874ddecSLior David enum wmi_mid {
74b874ddecSLior David 	MID_DEFAULT		= 0x00,
75b874ddecSLior David 	FIRST_DBG_MID_ID	= 0x10,
76b874ddecSLior David 	LAST_DBG_MID_ID		= 0xFE,
77b874ddecSLior David 	MID_BROADCAST		= 0xFF,
78b874ddecSLior David };
79b874ddecSLior David 
8008989f96SLior David /* FW capability IDs
8108989f96SLior David  * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
8208989f96SLior David  * the host
8308989f96SLior David  */
8408989f96SLior David enum wmi_fw_capability {
8508989f96SLior David 	WMI_FW_CAPABILITY_FTM				= 0,
8608989f96SLior David 	WMI_FW_CAPABILITY_PS_CONFIG			= 1,
87cbf795c1SLior David 	WMI_FW_CAPABILITY_RF_SECTORS			= 2,
88cbf795c1SLior David 	WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT		= 3,
898a4fa214SAhmad Masri 	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL	= 4,
900d2370e9SDedy Lansky 	WMI_FW_CAPABILITY_WMI_ONLY			= 5,
9190ffabb0SDedy Lansky 	WMI_FW_CAPABILITY_THERMAL_THROTTLING		= 7,
92fe9ee51eSMaya Erez 	WMI_FW_CAPABILITY_D3_SUSPEND			= 8,
93761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LONG_RANGE			= 9,
94761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_FIXED_SCHEDULING		= 10,
95761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS		= 11,
9630868f5dSDedy Lansky 	WMI_FW_CAPABILITY_RSSI_REPORTING		= 12,
97761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE		= 13,
98761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP	= 14,
99a5dc6883SDedy Lansky 	WMI_FW_CAPABILITY_PNO				= 15,
1009abe3e30SAlexei Avshalom Lazar 	WMI_FW_CAPABILITY_CHANNEL_BONDING		= 17,
101594b59ecSMaya Erez 	WMI_FW_CAPABILITY_REF_CLOCK_CONTROL		= 18,
1028a4fa214SAhmad Masri 	WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE		= 19,
103b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_MULTI_VIFS			= 20,
104b5aeff16SDedy Lansky 	WMI_FW_CAPABILITY_FT_ROAMING			= 21,
1051b99197dSMaya Erez 	WMI_FW_CAPABILITY_BACK_WIN_SIZE_64		= 22,
1067be13fc3SGidon Studinski 	WMI_FW_CAPABILITY_AMSDU				= 23,
1076a363e8aSAhmad Masri 	WMI_FW_CAPABILITY_RAW_MODE			= 24,
1086a363e8aSAhmad Masri 	WMI_FW_CAPABILITY_TX_REQ_EXT			= 25,
10922b9610eSAlexei Avshalom Lazar 	WMI_FW_CAPABILITY_CHANNEL_4			= 26,
11073a7d1e3SAlexei Avshalom Lazar 	WMI_FW_CAPABILITY_IPA				= 27,
1119b586118STzahi Sabo 	WMI_FW_CAPABILITY_TEMPERATURE_ALL_RF		= 30,
112*42fe1e51SAhmad Masri 	WMI_FW_CAPABILITY_SPLIT_REKEY			= 31,
11308989f96SLior David 	WMI_FW_CAPABILITY_MAX,
11408989f96SLior David };
11508989f96SLior David 
116b874ddecSLior David /* WMI_CMD_HDR */
117b874ddecSLior David struct wmi_cmd_hdr {
118b874ddecSLior David 	u8 mid;
119b874ddecSLior David 	u8 reserved;
120b874ddecSLior David 	__le16 command_id;
121b874ddecSLior David 	__le32 fw_timestamp;
122b874ddecSLior David } __packed;
1232be7d22fSVladimir Kondratiev 
1242be7d22fSVladimir Kondratiev /* List of Commands */
1252be7d22fSVladimir Kondratiev enum wmi_command_id {
126b874ddecSLior David 	WMI_CONNECT_CMDID				= 0x01,
127b874ddecSLior David 	WMI_DISCONNECT_CMDID				= 0x03,
128b874ddecSLior David 	WMI_DISCONNECT_STA_CMDID			= 0x04,
129a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_CMDID			= 0x05,
130a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_CMDID			= 0x06,
131b874ddecSLior David 	WMI_START_SCAN_CMDID				= 0x07,
132b874ddecSLior David 	WMI_SET_BSS_FILTER_CMDID			= 0x09,
133b874ddecSLior David 	WMI_SET_PROBED_SSID_CMDID			= 0x0A,
134761f8e4dSLazar Alexei 	/* deprecated */
135b874ddecSLior David 	WMI_SET_LISTEN_INT_CMDID			= 0x0B,
136b5aeff16SDedy Lansky 	WMI_FT_AUTH_CMDID				= 0x0C,
137b5aeff16SDedy Lansky 	WMI_FT_REASSOC_CMDID				= 0x0D,
138b5aeff16SDedy Lansky 	WMI_UPDATE_FT_IES_CMDID				= 0x0E,
139b874ddecSLior David 	WMI_BCON_CTRL_CMDID				= 0x0F,
140b874ddecSLior David 	WMI_ADD_CIPHER_KEY_CMDID			= 0x16,
141b874ddecSLior David 	WMI_DELETE_CIPHER_KEY_CMDID			= 0x17,
142b874ddecSLior David 	WMI_PCP_CONF_CMDID				= 0x18,
143b874ddecSLior David 	WMI_SET_APPIE_CMDID				= 0x3F,
144b874ddecSLior David 	WMI_SET_WSC_STATUS_CMDID			= 0x41,
145b874ddecSLior David 	WMI_PXMT_RANGE_CFG_CMDID			= 0x42,
146b874ddecSLior David 	WMI_PXMT_SNR2_RANGE_CFG_CMDID			= 0x43,
1476a363e8aSAhmad Masri 	WMI_RADAR_GENERAL_CONFIG_CMDID			= 0x100,
1486a363e8aSAhmad Masri 	WMI_RADAR_CONFIG_SELECT_CMDID			= 0x101,
1496a363e8aSAhmad Masri 	WMI_RADAR_PARAMS_CONFIG_CMDID			= 0x102,
1506a363e8aSAhmad Masri 	WMI_RADAR_SET_MODE_CMDID			= 0x103,
1516a363e8aSAhmad Masri 	WMI_RADAR_CONTROL_CMDID				= 0x104,
1526a363e8aSAhmad Masri 	WMI_RADAR_PCI_CONTROL_CMDID			= 0x105,
153b874ddecSLior David 	WMI_MEM_READ_CMDID				= 0x800,
154b874ddecSLior David 	WMI_MEM_WR_CMDID				= 0x801,
155b874ddecSLior David 	WMI_ECHO_CMDID					= 0x803,
156b874ddecSLior David 	WMI_DEEP_ECHO_CMDID				= 0x804,
157b874ddecSLior David 	WMI_CONFIG_MAC_CMDID				= 0x805,
158761f8e4dSLazar Alexei 	/* deprecated */
159b874ddecSLior David 	WMI_CONFIG_PHY_DEBUG_CMDID			= 0x806,
160b874ddecSLior David 	WMI_ADD_DEBUG_TX_PCKT_CMDID			= 0x808,
161b874ddecSLior David 	WMI_PHY_GET_STATISTICS_CMDID			= 0x809,
162761f8e4dSLazar Alexei 	/* deprecated */
163b874ddecSLior David 	WMI_FS_TUNE_CMDID				= 0x80A,
164761f8e4dSLazar Alexei 	/* deprecated */
165b874ddecSLior David 	WMI_CORR_MEASURE_CMDID				= 0x80B,
166b874ddecSLior David 	WMI_READ_RSSI_CMDID				= 0x80C,
167b874ddecSLior David 	WMI_TEMP_SENSE_CMDID				= 0x80E,
168b874ddecSLior David 	WMI_DC_CALIB_CMDID				= 0x80F,
169761f8e4dSLazar Alexei 	/* deprecated */
170b874ddecSLior David 	WMI_SEND_TONE_CMDID				= 0x810,
171761f8e4dSLazar Alexei 	/* deprecated */
172b874ddecSLior David 	WMI_IQ_TX_CALIB_CMDID				= 0x811,
173761f8e4dSLazar Alexei 	/* deprecated */
174b874ddecSLior David 	WMI_IQ_RX_CALIB_CMDID				= 0x812,
175b874ddecSLior David 	WMI_SET_WORK_MODE_CMDID				= 0x815,
176b874ddecSLior David 	WMI_LO_LEAKAGE_CALIB_CMDID			= 0x816,
177761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_CMDID		= 0x817,
178b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_CMDID			= 0x81D,
179761f8e4dSLazar Alexei 	/* deprecated */
180b874ddecSLior David 	WMI_RF_RX_TEST_CMDID				= 0x81E,
181b874ddecSLior David 	WMI_CFG_RX_CHAIN_CMDID				= 0x820,
182b874ddecSLior David 	WMI_VRING_CFG_CMDID				= 0x821,
183b874ddecSLior David 	WMI_BCAST_VRING_CFG_CMDID			= 0x822,
18496c93589SGidon Studinski 	WMI_RING_BA_EN_CMDID				= 0x823,
18596c93589SGidon Studinski 	WMI_RING_BA_DIS_CMDID				= 0x824,
186b874ddecSLior David 	WMI_RCP_ADDBA_RESP_CMDID			= 0x825,
187b874ddecSLior David 	WMI_RCP_DELBA_CMDID				= 0x826,
188b874ddecSLior David 	WMI_SET_SSID_CMDID				= 0x827,
189b874ddecSLior David 	WMI_GET_SSID_CMDID				= 0x828,
190b874ddecSLior David 	WMI_SET_PCP_CHANNEL_CMDID			= 0x829,
191b874ddecSLior David 	WMI_GET_PCP_CHANNEL_CMDID			= 0x82A,
192b874ddecSLior David 	WMI_SW_TX_REQ_CMDID				= 0x82B,
1936a363e8aSAhmad Masri 	/* Event is shared between WMI_SW_TX_REQ_CMDID and
1946a363e8aSAhmad Masri 	 * WMI_SW_TX_REQ_EXT_CMDID
1956a363e8aSAhmad Masri 	 */
1966a363e8aSAhmad Masri 	WMI_SW_TX_REQ_EXT_CMDID				= 0x82C,
197b874ddecSLior David 	WMI_MLME_PUSH_CMDID				= 0x835,
198b874ddecSLior David 	WMI_BEAMFORMING_MGMT_CMDID			= 0x836,
199b874ddecSLior David 	WMI_BF_TXSS_MGMT_CMDID				= 0x837,
200b874ddecSLior David 	WMI_BF_SM_MGMT_CMDID				= 0x838,
201b874ddecSLior David 	WMI_BF_RXSS_MGMT_CMDID				= 0x839,
202b874ddecSLior David 	WMI_BF_TRIG_CMDID				= 0x83A,
20396c93589SGidon Studinski 	WMI_RCP_ADDBA_RESP_EDMA_CMDID			= 0x83B,
2040163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_CMDID		= 0x842,
2050163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_CMDID		= 0x843,
206b874ddecSLior David 	WMI_SET_SECTORS_CMDID				= 0x849,
207b874ddecSLior David 	WMI_MAINTAIN_PAUSE_CMDID			= 0x850,
208b874ddecSLior David 	WMI_MAINTAIN_RESUME_CMDID			= 0x851,
209b874ddecSLior David 	WMI_RS_MGMT_CMDID				= 0x852,
210b874ddecSLior David 	WMI_RF_MGMT_CMDID				= 0x853,
211761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_CMDID				= 0x856,
212761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_CMDID				= 0x857,
21310d599adSMaya Erez 	WMI_LED_CFG_CMDID				= 0x858,
214761f8e4dSLazar Alexei 	WMI_SET_CONNECT_SNR_THR_CMDID			= 0x85B,
215761f8e4dSLazar Alexei 	WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID		= 0x85C,
216761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_CMDID			= 0x85D,
217761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID		= 0x85E,
2188a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID		= 0x85F,
2192be7d22fSVladimir Kondratiev 	/* Performance monitoring commands */
220b874ddecSLior David 	WMI_BF_CTRL_CMDID				= 0x862,
221b874ddecSLior David 	WMI_NOTIFY_REQ_CMDID				= 0x863,
222b874ddecSLior David 	WMI_GET_STATUS_CMDID				= 0x864,
2230163b031SMaya Erez 	WMI_GET_RF_STATUS_CMDID				= 0x866,
2240163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_CMDID			= 0x867,
2258a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_CMDID		= 0x868,
226b874ddecSLior David 	WMI_UNIT_TEST_CMDID				= 0x900,
227b874ddecSLior David 	WMI_FLASH_READ_CMDID				= 0x902,
228b874ddecSLior David 	WMI_FLASH_WRITE_CMDID				= 0x903,
2290163b031SMaya Erez 	/* Power management */
230fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_CMDID			= 0x904,
2310163b031SMaya Erez 	WMI_TRAFFIC_RESUME_CMDID			= 0x905,
232b8023177SVladimir Kondratiev 	/* P2P */
233b874ddecSLior David 	WMI_P2P_CFG_CMDID				= 0x910,
234b874ddecSLior David 	WMI_PORT_ALLOCATE_CMDID				= 0x911,
235b874ddecSLior David 	WMI_PORT_DELETE_CMDID				= 0x912,
236b874ddecSLior David 	WMI_POWER_MGMT_CFG_CMDID			= 0x913,
237b874ddecSLior David 	WMI_START_LISTEN_CMDID				= 0x914,
238b874ddecSLior David 	WMI_START_SEARCH_CMDID				= 0x915,
239b874ddecSLior David 	WMI_DISCOVERY_START_CMDID			= 0x916,
240b874ddecSLior David 	WMI_DISCOVERY_STOP_CMDID			= 0x917,
241b874ddecSLior David 	WMI_PCP_START_CMDID				= 0x918,
242b874ddecSLior David 	WMI_PCP_STOP_CMDID				= 0x919,
243b874ddecSLior David 	WMI_GET_PCP_FACTOR_CMDID			= 0x91B,
2440163b031SMaya Erez 	/* Power Save Configuration Commands */
2450163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_CMDID			= 0x91C,
246b5aeff16SDedy Lansky 	WMI_RS_ENABLE_CMDID				= 0x91E,
247b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_CMDID				= 0x91F,
248b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_CMDID		= 0x920,
249b5aeff16SDedy Lansky 	/* deprecated */
2500163b031SMaya Erez 	WMI_RS_CFG_CMDID				= 0x921,
251b5aeff16SDedy Lansky 	/* deprecated */
25208989f96SLior David 	WMI_GET_DETAILED_RS_RES_CMDID			= 0x922,
25308989f96SLior David 	WMI_AOA_MEAS_CMDID				= 0x923,
254a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_CMDID			= 0x924,
255cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_CMDID			= 0x930,
256cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_CMDID			= 0x931,
257849a564bSDedy Lansky 	WMI_NEW_STA_CMDID				= 0x935,
258849a564bSDedy Lansky 	WMI_DEL_STA_CMDID				= 0x936,
25990ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_CMDID		= 0x940,
26090ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_CMDID		= 0x941,
261761f8e4dSLazar Alexei 	/* Read Power Save profile type */
262761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_CMDID		= 0x942,
2638a4fa214SAhmad Masri 	WMI_TSF_SYNC_CMDID				= 0x973,
26408989f96SLior David 	WMI_TOF_SESSION_START_CMDID			= 0x991,
26508989f96SLior David 	WMI_TOF_GET_CAPABILITIES_CMDID			= 0x992,
26608989f96SLior David 	WMI_TOF_SET_LCR_CMDID				= 0x993,
26708989f96SLior David 	WMI_TOF_SET_LCI_CMDID				= 0x994,
268761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_CMDID			= 0x996,
2698ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_CMDID			= 0x997,
2708ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_CMDID			= 0x998,
271761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_CMDID			= 0x999,
272cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_CMDID			= 0x9A0,
273cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_CMDID			= 0x9A1,
274cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A2,
275cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A3,
276cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_CMDID			= 0x9A4,
2778ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_CMDID			= 0x9A5,
2788ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_CMDID		= 0x9A6,
2798ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID	= 0x9A7,
280b5aeff16SDedy Lansky 	/* deprecated */
2818a4fa214SAhmad Masri 	WMI_BF_CONTROL_CMDID				= 0x9AA,
282b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_CMDID				= 0x9AB,
28396c93589SGidon Studinski 	WMI_TX_STATUS_RING_ADD_CMDID			= 0x9C0,
28496c93589SGidon Studinski 	WMI_RX_STATUS_RING_ADD_CMDID			= 0x9C1,
28596c93589SGidon Studinski 	WMI_TX_DESC_RING_ADD_CMDID			= 0x9C2,
28696c93589SGidon Studinski 	WMI_RX_DESC_RING_ADD_CMDID			= 0x9C3,
28796c93589SGidon Studinski 	WMI_BCAST_DESC_RING_ADD_CMDID			= 0x9C4,
28896c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_CMDID			= 0x9C5,
289761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_CMDID			= 0xA01,
290761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_CMDID		= 0xA02,
291761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_CMDID		= 0xA03,
292761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID	= 0xA04,
293761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_CMDID			= 0xA05,
2948a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_CMDID			= 0xA06,
2958a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_CMDID			= 0xA07,
2968a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID	= 0xA08,
2978a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_CMDID			= 0xA0B,
298b5aeff16SDedy Lansky 	WMI_LINK_STATS_CMDID				= 0xA0C,
299b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_CMDID				= 0xA0E,
300b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_CMDID			= 0xA0F,
301b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_CMDID		= 0xA10,
302b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_CMDID			= 0xA11,
30373a7d1e3SAlexei Avshalom Lazar 	WMI_RBUFCAP_CFG_CMDID				= 0xA12,
3049b586118STzahi Sabo 	WMI_TEMP_SENSE_ALL_CMDID			= 0xA13,
305b874ddecSLior David 	WMI_SET_MAC_ADDRESS_CMDID			= 0xF003,
306b874ddecSLior David 	WMI_ABORT_SCAN_CMDID				= 0xF007,
307b874ddecSLior David 	WMI_SET_PROMISCUOUS_MODE_CMDID			= 0xF041,
308761f8e4dSLazar Alexei 	/* deprecated */
309b874ddecSLior David 	WMI_GET_PMK_CMDID				= 0xF048,
310b874ddecSLior David 	WMI_SET_PASSPHRASE_CMDID			= 0xF049,
311761f8e4dSLazar Alexei 	/* deprecated */
312b874ddecSLior David 	WMI_SEND_ASSOC_RES_CMDID			= 0xF04A,
313761f8e4dSLazar Alexei 	/* deprecated */
314b874ddecSLior David 	WMI_SET_ASSOC_REQ_RELAY_CMDID			= 0xF04B,
315b874ddecSLior David 	WMI_MAC_ADDR_REQ_CMDID				= 0xF04D,
316b874ddecSLior David 	WMI_FW_VER_CMDID				= 0xF04E,
317b874ddecSLior David 	WMI_PMC_CMDID					= 0xF04F,
3182be7d22fSVladimir Kondratiev };
3192be7d22fSVladimir Kondratiev 
320b874ddecSLior David /* WMI_CONNECT_CMDID */
3212be7d22fSVladimir Kondratiev enum wmi_network_type {
3222be7d22fSVladimir Kondratiev 	WMI_NETTYPE_INFRA		= 0x01,
3232be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC		= 0x02,
3242be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC_CREATOR	= 0x04,
3252be7d22fSVladimir Kondratiev 	WMI_NETTYPE_AP			= 0x10,
3262be7d22fSVladimir Kondratiev 	WMI_NETTYPE_P2P			= 0x20,
327b874ddecSLior David 	/* PCIE over 60g */
328b874ddecSLior David 	WMI_NETTYPE_WBE			= 0x40,
3292be7d22fSVladimir Kondratiev };
3302be7d22fSVladimir Kondratiev 
3312be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode {
3322be7d22fSVladimir Kondratiev 	WMI_AUTH11_OPEN		= 0x01,
3332be7d22fSVladimir Kondratiev 	WMI_AUTH11_SHARED	= 0x02,
3342be7d22fSVladimir Kondratiev 	WMI_AUTH11_LEAP		= 0x04,
3352be7d22fSVladimir Kondratiev 	WMI_AUTH11_WSC		= 0x08,
3362be7d22fSVladimir Kondratiev };
3372be7d22fSVladimir Kondratiev 
3382be7d22fSVladimir Kondratiev enum wmi_auth_mode {
3392be7d22fSVladimir Kondratiev 	WMI_AUTH_NONE		= 0x01,
3402be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA		= 0x02,
3412be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2		= 0x04,
3422be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_PSK	= 0x08,
3432be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_PSK	= 0x10,
3442be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_CCKM	= 0x20,
3452be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_CCKM	= 0x40,
3462be7d22fSVladimir Kondratiev };
3472be7d22fSVladimir Kondratiev 
3482be7d22fSVladimir Kondratiev enum wmi_crypto_type {
3492be7d22fSVladimir Kondratiev 	WMI_CRYPT_NONE		= 0x01,
3502be7d22fSVladimir Kondratiev 	WMI_CRYPT_AES_GCMP	= 0x20,
3512be7d22fSVladimir Kondratiev };
3522be7d22fSVladimir Kondratiev 
3532be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits {
354b874ddecSLior David 	WMI_CONNECT_ASSOC_POLICY_USER		= 0x01,
355b874ddecSLior David 	WMI_CONNECT_SEND_REASSOC		= 0x02,
356b874ddecSLior David 	WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER	= 0x04,
357b874ddecSLior David 	WMI_CONNECT_PROFILE_MATCH_DONE		= 0x08,
358b874ddecSLior David 	WMI_CONNECT_IGNORE_AAC_BEACON		= 0x10,
359b874ddecSLior David 	WMI_CONNECT_CSA_FOLLOW_BSS		= 0x20,
360b874ddecSLior David 	WMI_CONNECT_DO_WPA_OFFLOAD		= 0x40,
361b874ddecSLior David 	WMI_CONNECT_DO_NOT_DEAUTH		= 0x80,
3622be7d22fSVladimir Kondratiev };
3632be7d22fSVladimir Kondratiev 
3642be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN	(32)
3652be7d22fSVladimir Kondratiev 
3669abe3e30SAlexei Avshalom Lazar enum wmi_channel {
3679abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_1	= 0x00,
3689abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_2	= 0x01,
3699abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_3	= 0x02,
3709abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_4	= 0x03,
3719abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_5	= 0x04,
3729abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_6	= 0x05,
3739abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_9	= 0x06,
3749abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_10	= 0x07,
3759abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_11	= 0x08,
3769abe3e30SAlexei Avshalom Lazar 	WMI_CHANNEL_12	= 0x09,
3779abe3e30SAlexei Avshalom Lazar };
3789abe3e30SAlexei Avshalom Lazar 
379b874ddecSLior David /* WMI_CONNECT_CMDID */
3802be7d22fSVladimir Kondratiev struct wmi_connect_cmd {
3812be7d22fSVladimir Kondratiev 	u8 network_type;
3822be7d22fSVladimir Kondratiev 	u8 dot11_auth_mode;
3832be7d22fSVladimir Kondratiev 	u8 auth_mode;
3842be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_type;
3852be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_len;
3862be7d22fSVladimir Kondratiev 	u8 group_crypto_type;
3872be7d22fSVladimir Kondratiev 	u8 group_crypto_len;
3882be7d22fSVladimir Kondratiev 	u8 ssid_len;
3892be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3909abe3e30SAlexei Avshalom Lazar 	/* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
3919abe3e30SAlexei Avshalom Lazar 	 * the primary channel number
3929abe3e30SAlexei Avshalom Lazar 	 */
3932be7d22fSVladimir Kondratiev 	u8 channel;
3949abe3e30SAlexei Avshalom Lazar 	/* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
3959abe3e30SAlexei Avshalom Lazar 	u8 edmg_channel;
3962be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
3972be7d22fSVladimir Kondratiev 	__le32 ctrl_flags;
3982be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
3992be7d22fSVladimir Kondratiev 	u8 reserved1[2];
4002be7d22fSVladimir Kondratiev } __packed;
4012be7d22fSVladimir Kondratiev 
402b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */
403b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd {
404b8023177SVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
405b8023177SVladimir Kondratiev 	__le16 disconnect_reason;
406b8023177SVladimir Kondratiev } __packed;
4072be7d22fSVladimir Kondratiev 
4082be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX	(3)
4092be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN		(32)
4102be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN	(64)
4112be7d22fSVladimir Kondratiev 
412b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */
4132be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd {
4142be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
4152be7d22fSVladimir Kondratiev 	u8 passphrase[WMI_PASSPHRASE_LEN];
4162be7d22fSVladimir Kondratiev 	u8 ssid_len;
4172be7d22fSVladimir Kondratiev 	u8 passphrase_len;
4182be7d22fSVladimir Kondratiev } __packed;
4192be7d22fSVladimir Kondratiev 
420b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */
4212be7d22fSVladimir Kondratiev enum wmi_key_usage {
422b874ddecSLior David 	WMI_KEY_USE_PAIRWISE	= 0x00,
423b874ddecSLior David 	WMI_KEY_USE_RX_GROUP	= 0x01,
424b874ddecSLior David 	WMI_KEY_USE_TX_GROUP	= 0x02,
425*42fe1e51SAhmad Masri 	WMI_KEY_USE_STORE_PTK	= 0x03,
426*42fe1e51SAhmad Masri 	WMI_KEY_USE_APPLY_PTK	= 0x04,
4272be7d22fSVladimir Kondratiev };
4282be7d22fSVladimir Kondratiev 
4292be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd {
4302be7d22fSVladimir Kondratiev 	u8 key_index;
4312be7d22fSVladimir Kondratiev 	u8 key_type;
432b874ddecSLior David 	/* enum wmi_key_usage */
433b874ddecSLior David 	u8 key_usage;
4342be7d22fSVladimir Kondratiev 	u8 key_len;
435b874ddecSLior David 	/* key replay sequence counter */
436b874ddecSLior David 	u8 key_rsc[8];
4372be7d22fSVladimir Kondratiev 	u8 key[WMI_MAX_KEY_LEN];
438b874ddecSLior David 	/* Additional Key Control information */
439b874ddecSLior David 	u8 key_op_ctrl;
4402be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4412be7d22fSVladimir Kondratiev } __packed;
4422be7d22fSVladimir Kondratiev 
443b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */
4442be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd {
4452be7d22fSVladimir Kondratiev 	u8 key_index;
4462be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
4472be7d22fSVladimir Kondratiev } __packed;
4482be7d22fSVladimir Kondratiev 
449b874ddecSLior David /* WMI_START_SCAN_CMDID
4502be7d22fSVladimir Kondratiev  *
4512be7d22fSVladimir Kondratiev  * Start L1 scan operation
4522be7d22fSVladimir Kondratiev  *
4532be7d22fSVladimir Kondratiev  * Returned events:
4542be7d22fSVladimir Kondratiev  * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
4552be7d22fSVladimir Kondratiev  * - WMI_SCAN_COMPLETE_EVENTID
4562be7d22fSVladimir Kondratiev  */
4572be7d22fSVladimir Kondratiev enum wmi_scan_type {
458b874ddecSLior David 	WMI_ACTIVE_SCAN		= 0x00,
459b874ddecSLior David 	WMI_SHORT_SCAN		= 0x01,
460b874ddecSLior David 	WMI_PASSIVE_SCAN	= 0x02,
461b874ddecSLior David 	WMI_DIRECT_SCAN		= 0x03,
462b874ddecSLior David 	WMI_LONG_SCAN		= 0x04,
4632be7d22fSVladimir Kondratiev };
4642be7d22fSVladimir Kondratiev 
465b874ddecSLior David /* WMI_START_SCAN_CMDID */
4662be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd {
467b874ddecSLior David 	u8 direct_scan_mac_addr[WMI_MAC_LEN];
4680163b031SMaya Erez 	/* run scan with discovery beacon. Relevant for ACTIVE scan only. */
46974997a53SLior David 	u8 discovery_mode;
47074997a53SLior David 	u8 reserved;
471b874ddecSLior David 	/* Max duration in the home channel(ms) */
472b874ddecSLior David 	__le32 dwell_time;
473b874ddecSLior David 	/* Time interval between scans (ms) */
474b874ddecSLior David 	__le32 force_scan_interval;
475b874ddecSLior David 	/* enum wmi_scan_type */
476b874ddecSLior David 	u8 scan_type;
477b874ddecSLior David 	/* how many channels follow */
478b874ddecSLior David 	u8 num_channels;
479b874ddecSLior David 	/* channels ID's:
480b874ddecSLior David 	 * 0 - 58320 MHz
481b874ddecSLior David 	 * 1 - 60480 MHz
482b874ddecSLior David 	 * 2 - 62640 MHz
483b874ddecSLior David 	 */
4842be7d22fSVladimir Kondratiev 	struct {
4852be7d22fSVladimir Kondratiev 		u8 channel;
4862be7d22fSVladimir Kondratiev 		u8 reserved;
487b874ddecSLior David 	} channel_list[0];
4882be7d22fSVladimir Kondratiev } __packed;
4892be7d22fSVladimir Kondratiev 
490a5dc6883SDedy Lansky #define WMI_MAX_PNO_SSID_NUM	(16)
491a5dc6883SDedy Lansky #define WMI_MAX_CHANNEL_NUM	(6)
492a5dc6883SDedy Lansky #define WMI_MAX_PLANS_NUM	(2)
493a5dc6883SDedy Lansky 
494a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
495a5dc6883SDedy Lansky struct wmi_sched_scan_ssid_match {
496a5dc6883SDedy Lansky 	u8 ssid_len;
497a5dc6883SDedy Lansky 	u8 ssid[WMI_MAX_SSID_LEN];
498a5dc6883SDedy Lansky 	s8 rssi_threshold;
499a5dc6883SDedy Lansky 	/* boolean */
500a5dc6883SDedy Lansky 	u8 add_ssid_to_probe;
501a5dc6883SDedy Lansky 	u8 reserved;
502a5dc6883SDedy Lansky } __packed;
503a5dc6883SDedy Lansky 
504a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
505a5dc6883SDedy Lansky struct wmi_sched_scan_plan {
506a5dc6883SDedy Lansky 	__le16 interval_sec;
507a5dc6883SDedy Lansky 	__le16 num_of_iterations;
508a5dc6883SDedy Lansky } __packed;
509a5dc6883SDedy Lansky 
510a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_CMDID */
511a5dc6883SDedy Lansky struct wmi_start_sched_scan_cmd {
512a5dc6883SDedy Lansky 	struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
513a5dc6883SDedy Lansky 	u8 num_of_ssids;
514a5dc6883SDedy Lansky 	s8 min_rssi_threshold;
515a5dc6883SDedy Lansky 	u8 channel_list[WMI_MAX_CHANNEL_NUM];
516a5dc6883SDedy Lansky 	u8 num_of_channels;
517a5dc6883SDedy Lansky 	u8 reserved;
518a5dc6883SDedy Lansky 	__le16 initial_delay_sec;
519a5dc6883SDedy Lansky 	struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
520a5dc6883SDedy Lansky } __packed;
521a5dc6883SDedy Lansky 
522b5aeff16SDedy Lansky /* WMI_FT_AUTH_CMDID */
523b5aeff16SDedy Lansky struct wmi_ft_auth_cmd {
524b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
525b5aeff16SDedy Lansky 	/* enum wmi_channel */
526b5aeff16SDedy Lansky 	u8 channel;
527b5aeff16SDedy Lansky 	/* enum wmi_channel */
528b5aeff16SDedy Lansky 	u8 edmg_channel;
529b5aeff16SDedy Lansky 	u8 reserved[4];
530b5aeff16SDedy Lansky } __packed;
531b5aeff16SDedy Lansky 
532b5aeff16SDedy Lansky /* WMI_FT_REASSOC_CMDID */
533b5aeff16SDedy Lansky struct wmi_ft_reassoc_cmd {
534b5aeff16SDedy Lansky 	u8 bssid[WMI_MAC_LEN];
535b5aeff16SDedy Lansky 	u8 reserved[2];
536b5aeff16SDedy Lansky } __packed;
537b5aeff16SDedy Lansky 
538b5aeff16SDedy Lansky /* WMI_UPDATE_FT_IES_CMDID */
539b5aeff16SDedy Lansky struct wmi_update_ft_ies_cmd {
540b5aeff16SDedy Lansky 	/* Length of the FT IEs */
541b5aeff16SDedy Lansky 	__le16 ie_len;
542b5aeff16SDedy Lansky 	u8 reserved[2];
543b5aeff16SDedy Lansky 	u8 ie_info[0];
544b5aeff16SDedy Lansky } __packed;
545b5aeff16SDedy Lansky 
546b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */
547b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX	(3)
5482be7d22fSVladimir Kondratiev 
5492be7d22fSVladimir Kondratiev enum wmi_ssid_flag {
550b874ddecSLior David 	/* disables entry */
551b874ddecSLior David 	WMI_SSID_FLAG_DISABLE	= 0x00,
552b874ddecSLior David 	/* probes specified ssid */
553b874ddecSLior David 	WMI_SSID_FLAG_SPECIFIC	= 0x01,
554b874ddecSLior David 	/* probes for any ssid */
555b874ddecSLior David 	WMI_SSID_FLAG_ANY	= 0x02,
5562be7d22fSVladimir Kondratiev };
5572be7d22fSVladimir Kondratiev 
5582be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd {
559b874ddecSLior David 	/* 0 to MAX_PROBED_SSID_INDEX */
560b874ddecSLior David 	u8 entry_index;
561b874ddecSLior David 	/* enum wmi_ssid_flag */
562b874ddecSLior David 	u8 flag;
5632be7d22fSVladimir Kondratiev 	u8 ssid_len;
5642be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
5652be7d22fSVladimir Kondratiev } __packed;
5662be7d22fSVladimir Kondratiev 
567b874ddecSLior David /* WMI_SET_APPIE_CMDID
5682be7d22fSVladimir Kondratiev  * Add Application specified IE to a management frame
5692be7d22fSVladimir Kondratiev  */
570b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN	(1024)
571b8023177SVladimir Kondratiev 
572b874ddecSLior David /* Frame Types */
573b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type {
574b874ddecSLior David 	WMI_FRAME_BEACON	= 0x00,
575b874ddecSLior David 	WMI_FRAME_PROBE_REQ	= 0x01,
576b874ddecSLior David 	WMI_FRAME_PROBE_RESP	= 0x02,
577b874ddecSLior David 	WMI_FRAME_ASSOC_REQ	= 0x03,
578b874ddecSLior David 	WMI_FRAME_ASSOC_RESP	= 0x04,
579b874ddecSLior David 	WMI_NUM_MGMT_FRAME	= 0x05,
580b8023177SVladimir Kondratiev };
581b8023177SVladimir Kondratiev 
5822be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd {
583b874ddecSLior David 	/* enum wmi_mgmt_frame_type */
584b874ddecSLior David 	u8 mgmt_frm_type;
5852be7d22fSVladimir Kondratiev 	u8 reserved;
586b874ddecSLior David 	/* Length of the IE to be added to MGMT frame */
587b874ddecSLior David 	__le16 ie_len;
5882be7d22fSVladimir Kondratiev 	u8 ie_info[0];
5892be7d22fSVladimir Kondratiev } __packed;
5902be7d22fSVladimir Kondratiev 
591b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */
5922be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd {
5932be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
5942be7d22fSVladimir Kondratiev 	__le16 range;
5952be7d22fSVladimir Kondratiev } __packed;
5962be7d22fSVladimir Kondratiev 
597b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
5982be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd {
599b874ddecSLior David 	s8 snr2range_arr[2];
6002be7d22fSVladimir Kondratiev } __packed;
6012be7d22fSVladimir Kondratiev 
6026a363e8aSAhmad Masri /* WMI_RADAR_GENERAL_CONFIG_CMDID */
6036a363e8aSAhmad Masri struct wmi_radar_general_config_cmd {
6046a363e8aSAhmad Masri 	/* Number of pulses (CIRs) in FW FIFO to initiate pulses transfer
6056a363e8aSAhmad Masri 	 * from FW to Host
6066a363e8aSAhmad Masri 	 */
6076a363e8aSAhmad Masri 	__le32 fifo_watermark;
6086a363e8aSAhmad Masri 	/* In unit of us, in the range [100, 1000000] */
6096a363e8aSAhmad Masri 	__le32 t_burst;
6106a363e8aSAhmad Masri 	/* Valid in the range [1, 32768], 0xFFFF means infinite */
6116a363e8aSAhmad Masri 	__le32 n_bursts;
6126a363e8aSAhmad Masri 	/* In unit of 330Mhz clk, in the range [4, 2000]*330 */
6136a363e8aSAhmad Masri 	__le32 t_pulse;
6146a363e8aSAhmad Masri 	/* In the range of [1,4096] */
6156a363e8aSAhmad Masri 	__le16 n_pulses;
6166a363e8aSAhmad Masri 	/* Number of taps after cTap per CIR */
6176a363e8aSAhmad Masri 	__le16 n_samples;
6186a363e8aSAhmad Masri 	/* Offset from the main tap (0 = zero-distance). In the range of [0,
6196a363e8aSAhmad Masri 	 * 255]
6206a363e8aSAhmad Masri 	 */
6216a363e8aSAhmad Masri 	u8 first_sample_offset;
6226a363e8aSAhmad Masri 	/* Number of Pulses to average, 1, 2, 4, 8 */
6236a363e8aSAhmad Masri 	u8 pulses_to_avg;
6246a363e8aSAhmad Masri 	/* Number of adjacent taps to average, 1, 2, 4, 8 */
6256a363e8aSAhmad Masri 	u8 samples_to_avg;
6266a363e8aSAhmad Masri 	/* The index to config general params */
6276a363e8aSAhmad Masri 	u8 general_index;
6286a363e8aSAhmad Masri 	u8 reserved[4];
6296a363e8aSAhmad Masri } __packed;
6306a363e8aSAhmad Masri 
6316a363e8aSAhmad Masri /* WMI_RADAR_CONFIG_SELECT_CMDID */
6326a363e8aSAhmad Masri struct wmi_radar_config_select_cmd {
6336a363e8aSAhmad Masri 	/* Select the general params index to use */
6346a363e8aSAhmad Masri 	u8 general_index;
6356a363e8aSAhmad Masri 	u8 reserved[3];
6366a363e8aSAhmad Masri 	/* 0 means don't update burst_active_vector */
6376a363e8aSAhmad Masri 	__le32 burst_active_vector;
6386a363e8aSAhmad Masri 	/* 0 means don't update pulse_active_vector */
6396a363e8aSAhmad Masri 	__le32 pulse_active_vector;
6406a363e8aSAhmad Masri } __packed;
6416a363e8aSAhmad Masri 
6426a363e8aSAhmad Masri /* WMI_RADAR_PARAMS_CONFIG_CMDID */
6436a363e8aSAhmad Masri struct wmi_radar_params_config_cmd {
6446a363e8aSAhmad Masri 	/* The burst index selected to config */
6456a363e8aSAhmad Masri 	u8 burst_index;
6466a363e8aSAhmad Masri 	/* 0-not active, 1-active */
6476a363e8aSAhmad Masri 	u8 burst_en;
6486a363e8aSAhmad Masri 	/* The pulse index selected to config */
6496a363e8aSAhmad Masri 	u8 pulse_index;
6506a363e8aSAhmad Masri 	/* 0-not active, 1-active */
6516a363e8aSAhmad Masri 	u8 pulse_en;
6526a363e8aSAhmad Masri 	/* TX RF to use on current pulse */
6536a363e8aSAhmad Masri 	u8 tx_rfc_idx;
6546a363e8aSAhmad Masri 	u8 tx_sector;
6556a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0)(value is row in
6566a363e8aSAhmad Masri 	 * Gain-LUT, not dB)
6576a363e8aSAhmad Masri 	 */
6586a363e8aSAhmad Masri 	s8 tx_rf_gain_comp;
6596a363e8aSAhmad Masri 	/* expected to be 0 */
6606a363e8aSAhmad Masri 	s8 tx_bb_gain_comp;
6616a363e8aSAhmad Masri 	/* RX RF to use on current pulse */
6626a363e8aSAhmad Masri 	u8 rx_rfc_idx;
6636a363e8aSAhmad Masri 	u8 rx_sector;
6646a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0)(value is row in
6656a363e8aSAhmad Masri 	 * Gain-LUT, not dB)
6666a363e8aSAhmad Masri 	 */
6676a363e8aSAhmad Masri 	s8 rx_rf_gain_comp;
6686a363e8aSAhmad Masri 	/* Value in dB.(expected to be 0) */
6696a363e8aSAhmad Masri 	s8 rx_bb_gain_comp;
6706a363e8aSAhmad Masri 	/* Offset from calibrated value.(expected to be 0) */
6716a363e8aSAhmad Masri 	s8 rx_timing_offset;
6726a363e8aSAhmad Masri 	u8 reserved[3];
6736a363e8aSAhmad Masri } __packed;
6746a363e8aSAhmad Masri 
6756a363e8aSAhmad Masri /* WMI_RADAR_SET_MODE_CMDID */
6766a363e8aSAhmad Masri struct wmi_radar_set_mode_cmd {
6776a363e8aSAhmad Masri 	/* 0-disable/1-enable */
6786a363e8aSAhmad Masri 	u8 enable;
6796a363e8aSAhmad Masri 	/* enum wmi_channel */
6806a363e8aSAhmad Masri 	u8 channel;
6816a363e8aSAhmad Masri 	/* In the range of [0,7], 0xff means use default */
6826a363e8aSAhmad Masri 	u8 tx_rfc_idx;
6836a363e8aSAhmad Masri 	/* In the range of [0,7], 0xff means use default */
6846a363e8aSAhmad Masri 	u8 rx_rfc_idx;
6856a363e8aSAhmad Masri } __packed;
6866a363e8aSAhmad Masri 
6876a363e8aSAhmad Masri /* WMI_RADAR_CONTROL_CMDID */
6886a363e8aSAhmad Masri struct wmi_radar_control_cmd {
6896a363e8aSAhmad Masri 	/* 0-stop/1-start */
6906a363e8aSAhmad Masri 	u8 start;
6916a363e8aSAhmad Masri 	u8 reserved[3];
6926a363e8aSAhmad Masri } __packed;
6936a363e8aSAhmad Masri 
6946a363e8aSAhmad Masri /* WMI_RADAR_PCI_CONTROL_CMDID */
6956a363e8aSAhmad Masri struct wmi_radar_pci_control_cmd {
6966a363e8aSAhmad Masri 	/* pcie host buffer start address */
6976a363e8aSAhmad Masri 	__le64 base_addr;
6986a363e8aSAhmad Masri 	/* pcie host control block address */
6996a363e8aSAhmad Masri 	__le64 control_block_addr;
7006a363e8aSAhmad Masri 	/* pcie host buffer size */
7016a363e8aSAhmad Masri 	__le32 buffer_size;
7026a363e8aSAhmad Masri 	__le32 reserved;
7036a363e8aSAhmad Masri } __packed;
7046a363e8aSAhmad Masri 
705b874ddecSLior David /* WMI_RF_MGMT_CMDID */
7062be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type {
707b874ddecSLior David 	WMI_RF_MGMT_W_DISABLE	= 0x00,
708b874ddecSLior David 	WMI_RF_MGMT_W_ENABLE	= 0x01,
709b874ddecSLior David 	WMI_RF_MGMT_GET_STATUS	= 0x02,
7102be7d22fSVladimir Kondratiev };
7112be7d22fSVladimir Kondratiev 
7128a4fa214SAhmad Masri /* WMI_BF_CONTROL_CMDID */
7138a4fa214SAhmad Masri enum wmi_bf_triggers {
7148a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE		= 0x01,
7158a4fa214SAhmad Masri 	WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE		= 0x02,
7168a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP		= 0x04,
7178a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_BACK_FAILURE			= 0x08,
7188a4fa214SAhmad Masri 	WMI_BF_TRIGGER_FW				= 0x10,
7198a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE	= 0x20,
7208a4fa214SAhmad Masri 	WMI_BF_TRIGGER_AOA				= 0x40,
7218a4fa214SAhmad Masri 	WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM		= 0x80,
7228a4fa214SAhmad Masri };
7238a4fa214SAhmad Masri 
724b874ddecSLior David /* WMI_RF_MGMT_CMDID */
7252be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd {
7262be7d22fSVladimir Kondratiev 	__le32 rf_mgmt_type;
7272be7d22fSVladimir Kondratiev } __packed;
7282be7d22fSVladimir Kondratiev 
729b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */
730b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd {
731b874ddecSLior David 	__le32 freq_mhz;
732b8023177SVladimir Kondratiev 	__le32 length_samples;
733b8023177SVladimir Kondratiev 	__le32 iterations;
734b8023177SVladimir Kondratiev } __packed;
735b8023177SVladimir Kondratiev 
736b874ddecSLior David /* WMI_SET_SSID_CMDID */
7372be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd {
7382be7d22fSVladimir Kondratiev 	__le32 ssid_len;
7392be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
7402be7d22fSVladimir Kondratiev } __packed;
7412be7d22fSVladimir Kondratiev 
742b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */
7432be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd {
7442be7d22fSVladimir Kondratiev 	u8 channel;
7452be7d22fSVladimir Kondratiev 	u8 reserved[3];
7462be7d22fSVladimir Kondratiev } __packed;
7472be7d22fSVladimir Kondratiev 
748b874ddecSLior David /* WMI_BCON_CTRL_CMDID */
7492be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd {
7502be7d22fSVladimir Kondratiev 	__le16 bcon_interval;
7512be7d22fSVladimir Kondratiev 	__le16 frag_num;
7522be7d22fSVladimir Kondratiev 	__le64 ss_mask;
7532be7d22fSVladimir Kondratiev 	u8 network_type;
7546c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
7552be7d22fSVladimir Kondratiev 	u8 disable_sec_offload;
7562be7d22fSVladimir Kondratiev 	u8 disable_sec;
757b874ddecSLior David 	u8 hidden_ssid;
758b874ddecSLior David 	u8 is_go;
7598a4fa214SAhmad Masri 	/* A-BFT length override if non-0 */
7608a4fa214SAhmad Masri 	u8 abft_len;
7618a4fa214SAhmad Masri 	u8 reserved;
7622be7d22fSVladimir Kondratiev } __packed;
7632be7d22fSVladimir Kondratiev 
764b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
765b8023177SVladimir Kondratiev enum wmi_port_role {
766b874ddecSLior David 	WMI_PORT_STA		= 0x00,
767b874ddecSLior David 	WMI_PORT_PCP		= 0x01,
768b874ddecSLior David 	WMI_PORT_AP		= 0x02,
769b874ddecSLior David 	WMI_PORT_P2P_DEV	= 0x03,
770b874ddecSLior David 	WMI_PORT_P2P_CLIENT	= 0x04,
771b874ddecSLior David 	WMI_PORT_P2P_GO		= 0x05,
772b8023177SVladimir Kondratiev };
773b8023177SVladimir Kondratiev 
774b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
775b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd {
776b8023177SVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
777b8023177SVladimir Kondratiev 	u8 port_role;
7786c2faf09SVladimir Kondratiev 	u8 mid;
779b8023177SVladimir Kondratiev } __packed;
780b8023177SVladimir Kondratiev 
781b874ddecSLior David /* WMI_PORT_DELETE_CMDID */
782b874ddecSLior David struct wmi_port_delete_cmd {
783b8023177SVladimir Kondratiev 	u8 mid;
784b8023177SVladimir Kondratiev 	u8 reserved[3];
785b8023177SVladimir Kondratiev } __packed;
786b8023177SVladimir Kondratiev 
787fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
788fe9ee51eSMaya Erez enum wmi_wakeup_trigger {
789fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_UCAST	= 0x01,
790fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_BCAST	= 0x02,
791fe9ee51eSMaya Erez };
792fe9ee51eSMaya Erez 
793fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */
794fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd {
7950163b031SMaya Erez 	/* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
7960163b031SMaya Erez 	u8 wakeup_trigger;
7970163b031SMaya Erez } __packed;
7980163b031SMaya Erez 
799b874ddecSLior David /* WMI_P2P_CFG_CMDID */
800b8023177SVladimir Kondratiev enum wmi_discovery_mode {
801b874ddecSLior David 	WMI_DISCOVERY_MODE_NON_OFFLOAD	= 0x00,
802b874ddecSLior David 	WMI_DISCOVERY_MODE_OFFLOAD	= 0x01,
803b874ddecSLior David 	WMI_DISCOVERY_MODE_PEER2PEER	= 0x02,
804b8023177SVladimir Kondratiev };
805b8023177SVladimir Kondratiev 
806b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd {
807b874ddecSLior David 	/* enum wmi_discovery_mode */
808b874ddecSLior David 	u8 discovery_mode;
809b8023177SVladimir Kondratiev 	u8 channel;
810b874ddecSLior David 	/* base to listen/search duration calculation */
811b874ddecSLior David 	__le16 bcon_interval;
812b8023177SVladimir Kondratiev } __packed;
813b8023177SVladimir Kondratiev 
814b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */
815b8023177SVladimir Kondratiev enum wmi_power_source_type {
816b874ddecSLior David 	WMI_POWER_SOURCE_BATTERY	= 0x00,
817b874ddecSLior David 	WMI_POWER_SOURCE_OTHER		= 0x01,
818b8023177SVladimir Kondratiev };
819b8023177SVladimir Kondratiev 
820b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd {
821b874ddecSLior David 	/* enum wmi_power_source_type */
822b874ddecSLior David 	u8 power_source;
823b8023177SVladimir Kondratiev 	u8 reserved[3];
824b8023177SVladimir Kondratiev } __packed;
825b8023177SVladimir Kondratiev 
826b874ddecSLior David /* WMI_PCP_START_CMDID */
8278a4fa214SAhmad Masri enum wmi_ap_sme_offload_mode {
8288a4fa214SAhmad Masri 	/* Full AP SME in FW */
8298a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_FULL		= 0x00,
8308a4fa214SAhmad Masri 	/* Probe AP SME in FW */
8318a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_PARTIAL	= 0x01,
8328a4fa214SAhmad Masri 	/* AP SME in host */
8338a4fa214SAhmad Masri 	WMI_AP_SME_OFFLOAD_NONE		= 0x02,
8348a4fa214SAhmad Masri };
8358a4fa214SAhmad Masri 
8368a4fa214SAhmad Masri /* WMI_PCP_START_CMDID */
837b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd {
838b8023177SVladimir Kondratiev 	__le16 bcon_interval;
8396c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
8408e52fe30SHamad Kadmany 	u8 hidden_ssid;
841b874ddecSLior David 	u8 is_go;
8426a363e8aSAhmad Masri 	/* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
8436a363e8aSAhmad Masri 	u8 edmg_channel;
8446a363e8aSAhmad Masri 	u8 raw_mode;
8456a363e8aSAhmad Masri 	u8 reserved[3];
84690ffabb0SDedy Lansky 	/* A-BFT length override if non-0 */
847a52fb913SLior David 	u8 abft_len;
8488a4fa214SAhmad Masri 	/* enum wmi_ap_sme_offload_mode_e */
8498a4fa214SAhmad Masri 	u8 ap_sme_offload_mode;
850b8023177SVladimir Kondratiev 	u8 network_type;
8516a363e8aSAhmad Masri 	/* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
8526a363e8aSAhmad Masri 	 * the primary channel number
8536a363e8aSAhmad Masri 	 */
854b8023177SVladimir Kondratiev 	u8 channel;
855b8023177SVladimir Kondratiev 	u8 disable_sec_offload;
856b8023177SVladimir Kondratiev 	u8 disable_sec;
857b8023177SVladimir Kondratiev } __packed;
858b8023177SVladimir Kondratiev 
859b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */
8602be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd {
8612be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
8622be7d22fSVladimir Kondratiev 	__le16 len;
8632be7d22fSVladimir Kondratiev 	u8 payload[0];
8642be7d22fSVladimir Kondratiev } __packed;
8652be7d22fSVladimir Kondratiev 
8666a363e8aSAhmad Masri /* WMI_SW_TX_REQ_EXT_CMDID */
8676a363e8aSAhmad Masri struct wmi_sw_tx_req_ext_cmd {
8686a363e8aSAhmad Masri 	u8 dst_mac[WMI_MAC_LEN];
8696a363e8aSAhmad Masri 	__le16 len;
8706a363e8aSAhmad Masri 	__le16 duration_ms;
8716a363e8aSAhmad Masri 	/* Channel to use, 0xFF for currently active channel */
8726a363e8aSAhmad Masri 	u8 channel;
8736a363e8aSAhmad Masri 	u8 reserved[5];
8746a363e8aSAhmad Masri 	u8 payload[0];
8756a363e8aSAhmad Masri } __packed;
8766a363e8aSAhmad Masri 
8778a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
8788a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_cmd {
8798a4fa214SAhmad Masri 	/* Set vring timing configuration:
8808a4fa214SAhmad Masri 	 *
8818a4fa214SAhmad Masri 	 * defined interval for vring switch
8828a4fa214SAhmad Masri 	 */
8838a4fa214SAhmad Masri 	__le32 interval_usec;
8848a4fa214SAhmad Masri 	/* vring inactivity threshold */
8858a4fa214SAhmad Masri 	__le32 idle_th_usec;
8868a4fa214SAhmad Masri } __packed;
8878a4fa214SAhmad Masri 
8882be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg {
8892be7d22fSVladimir Kondratiev 	__le64 ring_mem_base;
8902be7d22fSVladimir Kondratiev 	__le16 ring_size;
8912be7d22fSVladimir Kondratiev 	__le16 max_mpdu_size;
8922be7d22fSVladimir Kondratiev } __packed;
8932be7d22fSVladimir Kondratiev 
894b874ddecSLior David /* wmi_vring_cfg_schd */
8952be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd {
8962be7d22fSVladimir Kondratiev 	__le16 priority;
8972be7d22fSVladimir Kondratiev 	__le16 timeslot_us;
8982be7d22fSVladimir Kondratiev } __packed;
8992be7d22fSVladimir Kondratiev 
9002be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type {
901b874ddecSLior David 	WMI_VRING_ENC_TYPE_802_3	= 0x00,
902b874ddecSLior David 	WMI_VRING_ENC_TYPE_NATIVE_WIFI	= 0x01,
9036a363e8aSAhmad Masri 	WMI_VRING_ENC_TYPE_NONE		= 0x02,
9042be7d22fSVladimir Kondratiev };
9052be7d22fSVladimir Kondratiev 
9062be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg {
907b874ddecSLior David 	WMI_VRING_DS_PBSS	= 0x00,
908b874ddecSLior David 	WMI_VRING_DS_STATION	= 0x01,
909b874ddecSLior David 	WMI_VRING_DS_AP		= 0x02,
910b874ddecSLior David 	WMI_VRING_DS_ADDR4	= 0x03,
9112be7d22fSVladimir Kondratiev };
9122be7d22fSVladimir Kondratiev 
9132be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type {
914b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_NO		= 0x00,
915b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_AP2PBSS		= 0x01,
916b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_STA2PBSS	= 0x02,
9172be7d22fSVladimir Kondratiev };
9182be7d22fSVladimir Kondratiev 
9192be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority {
920b874ddecSLior David 	WMI_SCH_PRIO_REGULAR	= 0x00,
921b874ddecSLior David 	WMI_SCH_PRIO_HIGH	= 0x01,
9222be7d22fSVladimir Kondratiev };
9232be7d22fSVladimir Kondratiev 
9248a4fa214SAhmad Masri #define CIDXTID_EXTENDED_CID_TID		(0xFF)
9252be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS				(0)
9262be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN				(4)
9272be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK				(0xF)
9282be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS				(4)
9292be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN				(4)
9302be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK				(0xF0)
9312be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS	(0)
9322be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN	(1)
9332be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK	(0x1)
9342be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS		(1)
9352be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN		(1)
9362be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK		(0x2)
9372be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS	(0)
9382be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN	(6)
9392be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK	(0x3F)
940b874ddecSLior David 
941b874ddecSLior David struct wmi_vring_cfg {
942b874ddecSLior David 	struct wmi_sw_ring_cfg tx_sw_ring;
943b874ddecSLior David 	/* 0-23 vrings */
944b874ddecSLior David 	u8 ringid;
9458a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
9468a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
9478a4fa214SAhmad Masri 	 */
948b874ddecSLior David 	u8 cidxtid;
949b874ddecSLior David 	u8 encap_trans_type;
950b874ddecSLior David 	/* 802.3 DS cfg */
951b874ddecSLior David 	u8 ds_cfg;
952b874ddecSLior David 	u8 nwifi_ds_trans_type;
953b874ddecSLior David 	u8 mac_ctrl;
9542be7d22fSVladimir Kondratiev 	u8 to_resolution;
9552be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
9562be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg_schd schd_params;
9578a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
9588a4fa214SAhmad Masri 	u8 cid;
9598a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
9608a4fa214SAhmad Masri 	u8 tid;
961b5aeff16SDedy Lansky 	/* Update the vring's priority for Qos purpose. Set to
962b5aeff16SDedy Lansky 	 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority
963b5aeff16SDedy Lansky 	 */
964b5aeff16SDedy Lansky 	u8 qos_priority;
965b5aeff16SDedy Lansky 	u8 reserved;
9662be7d22fSVladimir Kondratiev } __packed;
9672be7d22fSVladimir Kondratiev 
9682be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action {
969b874ddecSLior David 	WMI_VRING_CMD_ADD	= 0x00,
970b874ddecSLior David 	WMI_VRING_CMD_MODIFY	= 0x01,
971b874ddecSLior David 	WMI_VRING_CMD_DELETE	= 0x02,
9722be7d22fSVladimir Kondratiev };
9732be7d22fSVladimir Kondratiev 
974b874ddecSLior David /* WMI_VRING_CFG_CMDID */
9752be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd {
9762be7d22fSVladimir Kondratiev 	__le32 action;
9772be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg vring_cfg;
9782be7d22fSVladimir Kondratiev } __packed;
9792be7d22fSVladimir Kondratiev 
98062bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg {
98162bfd300SVladimir Kondratiev 	struct wmi_sw_ring_cfg tx_sw_ring;
982b874ddecSLior David 	/* 0-23 vrings */
983b874ddecSLior David 	u8 ringid;
98462bfd300SVladimir Kondratiev 	u8 encap_trans_type;
985b874ddecSLior David 	/* 802.3 DS cfg */
986b874ddecSLior David 	u8 ds_cfg;
98762bfd300SVladimir Kondratiev 	u8 nwifi_ds_trans_type;
98862bfd300SVladimir Kondratiev } __packed;
98962bfd300SVladimir Kondratiev 
990b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */
99162bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd {
99262bfd300SVladimir Kondratiev 	__le32 action;
99362bfd300SVladimir Kondratiev 	struct wmi_bcast_vring_cfg vring_cfg;
99462bfd300SVladimir Kondratiev } __packed;
99562bfd300SVladimir Kondratiev 
99696c93589SGidon Studinski struct wmi_edma_ring_cfg {
99796c93589SGidon Studinski 	__le64 ring_mem_base;
99896c93589SGidon Studinski 	/* size in number of items */
99996c93589SGidon Studinski 	__le16 ring_size;
100096c93589SGidon Studinski 	u8 ring_id;
100196c93589SGidon Studinski 	u8 reserved;
100296c93589SGidon Studinski } __packed;
100396c93589SGidon Studinski 
100496c93589SGidon Studinski enum wmi_rx_msg_type {
100596c93589SGidon Studinski 	WMI_RX_MSG_TYPE_COMPRESSED	= 0x00,
100696c93589SGidon Studinski 	WMI_RX_MSG_TYPE_EXTENDED	= 0x01,
100796c93589SGidon Studinski };
100896c93589SGidon Studinski 
100973a7d1e3SAlexei Avshalom Lazar enum wmi_ring_add_irq_mode {
101073a7d1e3SAlexei Avshalom Lazar 	/* Backwards compatibility
101173a7d1e3SAlexei Avshalom Lazar 	 *  for DESC ring - interrupt disabled
101273a7d1e3SAlexei Avshalom Lazar 	 *  for STATUS ring - interrupt enabled
101373a7d1e3SAlexei Avshalom Lazar 	 */
101473a7d1e3SAlexei Avshalom Lazar 	WMI_RING_ADD_IRQ_MODE_BWC	= 0x00,
101573a7d1e3SAlexei Avshalom Lazar 	WMI_RING_ADD_IRQ_MODE_DISABLE	= 0x01,
101673a7d1e3SAlexei Avshalom Lazar 	WMI_RING_ADD_IRQ_MODE_ENABLE	= 0x02,
101773a7d1e3SAlexei Avshalom Lazar };
101873a7d1e3SAlexei Avshalom Lazar 
101996c93589SGidon Studinski struct wmi_tx_status_ring_add_cmd {
102096c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
102196c93589SGidon Studinski 	u8 irq_index;
102273a7d1e3SAlexei Avshalom Lazar 	/* wmi_ring_add_irq_mode */
102373a7d1e3SAlexei Avshalom Lazar 	u8 irq_mode;
102473a7d1e3SAlexei Avshalom Lazar 	u8 reserved[2];
102596c93589SGidon Studinski } __packed;
102696c93589SGidon Studinski 
102796c93589SGidon Studinski struct wmi_rx_status_ring_add_cmd {
102896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
102996c93589SGidon Studinski 	u8 irq_index;
103096c93589SGidon Studinski 	/* wmi_rx_msg_type */
103196c93589SGidon Studinski 	u8 rx_msg_type;
103296c93589SGidon Studinski 	u8 reserved[2];
103396c93589SGidon Studinski } __packed;
103496c93589SGidon Studinski 
103596c93589SGidon Studinski struct wmi_cfg_def_rx_offload_cmd {
103696c93589SGidon Studinski 	__le16 max_msdu_size;
103796c93589SGidon Studinski 	__le16 max_rx_pl_per_desc;
103896c93589SGidon Studinski 	u8 decap_trans_type;
103996c93589SGidon Studinski 	u8 l2_802_3_offload_ctrl;
104096c93589SGidon Studinski 	u8 l2_nwifi_offload_ctrl;
104196c93589SGidon Studinski 	u8 vlan_id;
104296c93589SGidon Studinski 	u8 nwifi_ds_trans_type;
104396c93589SGidon Studinski 	u8 l3_l4_ctrl;
104496c93589SGidon Studinski 	u8 reserved[6];
104596c93589SGidon Studinski } __packed;
104696c93589SGidon Studinski 
104796c93589SGidon Studinski struct wmi_tx_desc_ring_add_cmd {
104896c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
104996c93589SGidon Studinski 	__le16 max_msdu_size;
105096c93589SGidon Studinski 	/* Correlated status ring (0-63) */
105196c93589SGidon Studinski 	u8 status_ring_id;
105296c93589SGidon Studinski 	u8 cid;
105396c93589SGidon Studinski 	u8 tid;
105496c93589SGidon Studinski 	u8 encap_trans_type;
105596c93589SGidon Studinski 	u8 mac_ctrl;
105696c93589SGidon Studinski 	u8 to_resolution;
105796c93589SGidon Studinski 	u8 agg_max_wsize;
105873a7d1e3SAlexei Avshalom Lazar 	u8 irq_index;
105973a7d1e3SAlexei Avshalom Lazar 	/* wmi_ring_add_irq_mode */
106073a7d1e3SAlexei Avshalom Lazar 	u8 irq_mode;
106173a7d1e3SAlexei Avshalom Lazar 	u8 reserved;
106296c93589SGidon Studinski 	struct wmi_vring_cfg_schd schd_params;
106396c93589SGidon Studinski } __packed;
106496c93589SGidon Studinski 
106596c93589SGidon Studinski struct wmi_rx_desc_ring_add_cmd {
106696c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
106796c93589SGidon Studinski 	u8 irq_index;
106896c93589SGidon Studinski 	/* 0-63 status rings */
106996c93589SGidon Studinski 	u8 status_ring_id;
107096c93589SGidon Studinski 	u8 reserved[2];
107196c93589SGidon Studinski 	__le64 sw_tail_host_addr;
107296c93589SGidon Studinski } __packed;
107396c93589SGidon Studinski 
107496c93589SGidon Studinski struct wmi_bcast_desc_ring_add_cmd {
107596c93589SGidon Studinski 	struct wmi_edma_ring_cfg ring_cfg;
107696c93589SGidon Studinski 	__le16 max_msdu_size;
107796c93589SGidon Studinski 	/* Correlated status ring (0-63) */
107896c93589SGidon Studinski 	u8 status_ring_id;
107996c93589SGidon Studinski 	u8 encap_trans_type;
108096c93589SGidon Studinski 	u8 reserved[4];
108196c93589SGidon Studinski } __packed;
108296c93589SGidon Studinski 
1083b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
1084b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_cmd {
1085b5aeff16SDedy Lansky 	/* index to read from OTP. zero based */
1086b5aeff16SDedy Lansky 	u8 index;
1087b5aeff16SDedy Lansky 	u8 reserved[3];
1088b5aeff16SDedy Lansky } __packed;
1089b5aeff16SDedy Lansky 
1090b5aeff16SDedy Lansky /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
1091b5aeff16SDedy Lansky struct wmi_lo_power_calib_from_otp_event {
1092b5aeff16SDedy Lansky 	/* wmi_fw_status */
1093b5aeff16SDedy Lansky 	u8 status;
1094b5aeff16SDedy Lansky 	u8 reserved[3];
1095b5aeff16SDedy Lansky } __packed;
1096b5aeff16SDedy Lansky 
109796c93589SGidon Studinski /* WMI_RING_BA_EN_CMDID */
109896c93589SGidon Studinski struct wmi_ring_ba_en_cmd {
109996c93589SGidon Studinski 	u8 ring_id;
11002be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
11012be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
1102cbcf5866SVladimir Kondratiev 	u8 amsdu;
1103b874ddecSLior David 	u8 reserved[3];
11042be7d22fSVladimir Kondratiev } __packed;
11052be7d22fSVladimir Kondratiev 
110696c93589SGidon Studinski /* WMI_RING_BA_DIS_CMDID */
110796c93589SGidon Studinski struct wmi_ring_ba_dis_cmd {
110896c93589SGidon Studinski 	u8 ring_id;
11092be7d22fSVladimir Kondratiev 	u8 reserved;
11102be7d22fSVladimir Kondratiev 	__le16 reason;
11112be7d22fSVladimir Kondratiev } __packed;
11122be7d22fSVladimir Kondratiev 
1113b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */
11142be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd {
11152be7d22fSVladimir Kondratiev 	u8 cid;
1116b8023177SVladimir Kondratiev 	u8 year;
1117b8023177SVladimir Kondratiev 	u8 month;
1118b8023177SVladimir Kondratiev 	u8 day;
11192be7d22fSVladimir Kondratiev 	__le32 interval_usec;
1120b8023177SVladimir Kondratiev 	u8 hour;
1121b8023177SVladimir Kondratiev 	u8 minute;
1122b8023177SVladimir Kondratiev 	u8 second;
1123b8023177SVladimir Kondratiev 	u8 miliseconds;
11242be7d22fSVladimir Kondratiev } __packed;
11252be7d22fSVladimir Kondratiev 
1126b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
11272be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode {
1128b874ddecSLior David 	WMI_SNIFFER_OFF	= 0x00,
1129b874ddecSLior David 	WMI_SNIFFER_ON	= 0x01,
11302be7d22fSVladimir Kondratiev };
11312be7d22fSVladimir Kondratiev 
1132761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_TABLE */
1133761f8e4dSLazar Alexei enum wmi_silent_rssi_table {
1134761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_DEFAULT_DB		= 0x00,
1135761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_HIGH_POWER_DB	= 0x01,
1136761f8e4dSLazar Alexei };
1137761f8e4dSLazar Alexei 
1138761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_STATUS */
1139761f8e4dSLazar Alexei enum wmi_silent_rssi_status {
1140761f8e4dSLazar Alexei 	SILENT_RSSI_SUCCESS	= 0x00,
1141761f8e4dSLazar Alexei 	SILENT_RSSI_FAILURE	= 0x01,
1142761f8e4dSLazar Alexei };
1143761f8e4dSLazar Alexei 
1144761f8e4dSLazar Alexei /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
1145761f8e4dSLazar Alexei struct wmi_set_active_silent_rssi_table_cmd {
1146761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
1147761f8e4dSLazar Alexei 	__le32 table;
1148761f8e4dSLazar Alexei } __packed;
1149761f8e4dSLazar Alexei 
11502be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode {
1151b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_DISABLED	= 0x00,
1152b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_ENABLED	= 0x01,
11532be7d22fSVladimir Kondratiev };
11542be7d22fSVladimir Kondratiev 
11552be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support {
1156b874ddecSLior David 	WMI_SNIFFER_CP		= 0x00,
1157b874ddecSLior David 	WMI_SNIFFER_DP		= 0x01,
1158b874ddecSLior David 	WMI_SNIFFER_BOTH_PHYS	= 0x02,
11592be7d22fSVladimir Kondratiev };
11602be7d22fSVladimir Kondratiev 
1161b874ddecSLior David /* wmi_sniffer_cfg */
11622be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg {
1163b874ddecSLior David 	/* enum wmi_sniffer_cfg_mode */
1164b874ddecSLior David 	__le32 mode;
1165b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_info_mode */
1166b874ddecSLior David 	__le32 phy_info_mode;
1167b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_support */
1168b874ddecSLior David 	__le32 phy_support;
11692be7d22fSVladimir Kondratiev 	u8 channel;
11702be7d22fSVladimir Kondratiev 	u8 reserved[3];
11712be7d22fSVladimir Kondratiev } __packed;
11722be7d22fSVladimir Kondratiev 
11732be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action {
1174b874ddecSLior David 	WMI_RX_CHAIN_ADD	= 0x00,
1175b874ddecSLior David 	WMI_RX_CHAIN_DEL	= 0x01,
11762be7d22fSVladimir Kondratiev };
11772be7d22fSVladimir Kondratiev 
11782be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type {
1179b874ddecSLior David 	WMI_DECAP_TYPE_802_3		= 0x00,
1180b874ddecSLior David 	WMI_DECAP_TYPE_NATIVE_WIFI	= 0x01,
1181b874ddecSLior David 	WMI_DECAP_TYPE_NONE		= 0x02,
11822be7d22fSVladimir Kondratiev };
11832be7d22fSVladimir Kondratiev 
11842be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
1185b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_NO		= 0x00,
1186b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2AP		= 0x01,
1187b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2STA	= 0x02,
11882be7d22fSVladimir Kondratiev };
11892be7d22fSVladimir Kondratiev 
1190b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type {
1191b874ddecSLior David 	WMI_RX_HW_REORDER	= 0x00,
1192b874ddecSLior David 	WMI_RX_SW_REORDER	= 0x01,
1193b8023177SVladimir Kondratiev };
1194b8023177SVladimir Kondratiev 
11952be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS	(0)
11962be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN	(1)
11972be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK	(0x1)
1198c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS		(1)
1199c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN		(1)
1200c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK		(0x2)
12012be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS		(0)
12022be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN		(1)
12032be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK		(0x1)
12042be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS		(1)
12052be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN		(1)
12062be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK		(0x2)
12072be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS			(0)
12082be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN			(1)
12092be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK			(0x1)
12102be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS		(1)
12112be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN		(1)
12122be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK		(0x2)
12132be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS		(0)
12142be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN		(1)
12152be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK		(0x1)
12162be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS			(1)
12172be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN			(1)
12182be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK			(0x2)
12192be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS		(2)
12202be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN		(1)
12212be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK		(0x4)
12222be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS		(3)
12232be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN		(1)
12242be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK		(0x8)
12252be7d22fSVladimir Kondratiev 
1226b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
1227b874ddecSLior David struct wmi_cfg_rx_chain_cmd {
1228b874ddecSLior David 	__le32 action;
1229b874ddecSLior David 	struct wmi_sw_ring_cfg rx_sw_ring;
1230b874ddecSLior David 	u8 mid;
1231b874ddecSLior David 	u8 decap_trans_type;
1232b874ddecSLior David 	u8 l2_802_3_offload_ctrl;
1233b874ddecSLior David 	u8 l2_nwifi_offload_ctrl;
1234b874ddecSLior David 	u8 vlan_id;
1235b874ddecSLior David 	u8 nwifi_ds_trans_type;
1236b874ddecSLior David 	u8 l3_l4_ctrl;
1237b874ddecSLior David 	u8 ring_ctrl;
12382be7d22fSVladimir Kondratiev 	__le16 prefetch_thrsh;
12392be7d22fSVladimir Kondratiev 	__le16 wb_thrsh;
12402be7d22fSVladimir Kondratiev 	__le32 itr_value;
12412be7d22fSVladimir Kondratiev 	__le16 host_thrsh;
1242b8023177SVladimir Kondratiev 	u8 reorder_type;
1243b8023177SVladimir Kondratiev 	u8 reserved;
12442be7d22fSVladimir Kondratiev 	struct wmi_sniffer_cfg sniffer_cfg;
1245b874ddecSLior David 	__le16 max_rx_pl_per_desc;
12462be7d22fSVladimir Kondratiev } __packed;
12472be7d22fSVladimir Kondratiev 
1248b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */
12492be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd {
12508a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12518a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
12528a4fa214SAhmad Masri 	 */
12532be7d22fSVladimir Kondratiev 	u8 cidxtid;
12542be7d22fSVladimir Kondratiev 	u8 dialog_token;
12552be7d22fSVladimir Kondratiev 	__le16 status_code;
1256b874ddecSLior David 	/* ieee80211_ba_parameterset field to send */
1257b874ddecSLior David 	__le16 ba_param_set;
12582be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
12598a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12608a4fa214SAhmad Masri 	u8 cid;
12618a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12628a4fa214SAhmad Masri 	u8 tid;
12638a4fa214SAhmad Masri 	u8 reserved[2];
12642be7d22fSVladimir Kondratiev } __packed;
12652be7d22fSVladimir Kondratiev 
126696c93589SGidon Studinski /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */
126796c93589SGidon Studinski struct wmi_rcp_addba_resp_edma_cmd {
126896c93589SGidon Studinski 	u8 cid;
126996c93589SGidon Studinski 	u8 tid;
127096c93589SGidon Studinski 	u8 dialog_token;
127196c93589SGidon Studinski 	u8 reserved;
127296c93589SGidon Studinski 	__le16 status_code;
127396c93589SGidon Studinski 	/* ieee80211_ba_parameterset field to send */
127496c93589SGidon Studinski 	__le16 ba_param_set;
127596c93589SGidon Studinski 	__le16 ba_timeout;
127696c93589SGidon Studinski 	u8 status_ring_id;
127796c93589SGidon Studinski 	/* wmi_cfg_rx_chain_cmd_reorder_type */
127896c93589SGidon Studinski 	u8 reorder_type;
127996c93589SGidon Studinski } __packed;
128096c93589SGidon Studinski 
1281b874ddecSLior David /* WMI_RCP_DELBA_CMDID */
12822be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd {
12838a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12848a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
12858a4fa214SAhmad Masri 	 */
12862be7d22fSVladimir Kondratiev 	u8 cidxtid;
12872be7d22fSVladimir Kondratiev 	u8 reserved;
12882be7d22fSVladimir Kondratiev 	__le16 reason;
12898a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12908a4fa214SAhmad Masri 	u8 cid;
12918a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
12928a4fa214SAhmad Masri 	u8 tid;
12938a4fa214SAhmad Masri 	u8 reserved2[2];
12942be7d22fSVladimir Kondratiev } __packed;
12952be7d22fSVladimir Kondratiev 
1296b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */
12972be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd {
12988a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
12998a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
13008a4fa214SAhmad Masri 	 */
13012be7d22fSVladimir Kondratiev 	u8 cidxtid;
13022be7d22fSVladimir Kondratiev 	u8 dialog_token;
13032be7d22fSVladimir Kondratiev 	/* ieee80211_ba_parameterset field as it received */
13042be7d22fSVladimir Kondratiev 	__le16 ba_param_set;
13052be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
13062be7d22fSVladimir Kondratiev 	/* ieee80211_ba_seqstrl field as it received */
13072be7d22fSVladimir Kondratiev 	__le16 ba_seq_ctrl;
13088a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
13098a4fa214SAhmad Masri 	u8 cid;
13108a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
13118a4fa214SAhmad Masri 	u8 tid;
13128a4fa214SAhmad Masri 	u8 reserved[2];
13132be7d22fSVladimir Kondratiev } __packed;
13142be7d22fSVladimir Kondratiev 
1315b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */
13162be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd {
13172be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
13182be7d22fSVladimir Kondratiev 	u8 reserved[2];
13192be7d22fSVladimir Kondratiev } __packed;
13202be7d22fSVladimir Kondratiev 
1321b874ddecSLior David /* WMI_ECHO_CMDID
13222be7d22fSVladimir Kondratiev  * Check FW is alive
13232be7d22fSVladimir Kondratiev  * Returned event: WMI_ECHO_RSP_EVENTID
13242be7d22fSVladimir Kondratiev  */
13252be7d22fSVladimir Kondratiev struct wmi_echo_cmd {
13262be7d22fSVladimir Kondratiev 	__le32 value;
13272be7d22fSVladimir Kondratiev } __packed;
13282be7d22fSVladimir Kondratiev 
13298a4fa214SAhmad Masri /* WMI_DEEP_ECHO_CMDID
13306a363e8aSAhmad Masri  * Check FW and uCode is alive
13316a363e8aSAhmad Masri  * Returned event: WMI_DEEP_ECHO_RSP_EVENTID
13328a4fa214SAhmad Masri  */
13338a4fa214SAhmad Masri struct wmi_deep_echo_cmd {
13348a4fa214SAhmad Masri 	__le32 value;
13358a4fa214SAhmad Masri } __packed;
13368a4fa214SAhmad Masri 
1337761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_CMDID
1338761f8e4dSLazar Alexei  * set FW time parameters used through RF resetting
1339761f8e4dSLazar Alexei  *  RF reset consists of bringing its power down for a period of time, then
1340761f8e4dSLazar Alexei  * bringing the power up
1341761f8e4dSLazar Alexei  * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
1342761f8e4dSLazar Alexei  */
1343761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_cmd {
1344761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR down,
1345761f8e4dSLazar Alexei 	 * set 0 for default
1346761f8e4dSLazar Alexei 	 */
1347761f8e4dSLazar Alexei 	__le16 down_delay_usec;
1348761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR up,
1349761f8e4dSLazar Alexei 	 * set 0 for default
1350761f8e4dSLazar Alexei 	 */
1351761f8e4dSLazar Alexei 	__le16 up_delay_usec;
1352b874ddecSLior David } __packed;
1353b874ddecSLior David 
13548a4fa214SAhmad Masri /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
1355761f8e4dSLazar Alexei  * This API controls the Tx and Rx gain over temperature.
1356761f8e4dSLazar Alexei  * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
1357761f8e4dSLazar Alexei  * It also controls the Tx gain index, by controlling the Rx to Tx gain index
1358761f8e4dSLazar Alexei  * offset.
1359761f8e4dSLazar Alexei  * The control is divided by 3 temperature values to 4 temperature ranges.
1360761f8e4dSLazar Alexei  * Each parameter uses its own temperature values.
1361761f8e4dSLazar Alexei  * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
1362761f8e4dSLazar Alexei  */
1363761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_cmd {
1364761f8e4dSLazar Alexei 	/* Temperature range for Tx D-type parameters */
1365761f8e4dSLazar Alexei 	u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1366761f8e4dSLazar Alexei 	u8 reserved0;
1367761f8e4dSLazar Alexei 	/* Tx D-type values to be used for each temperature range */
13688a4fa214SAhmad Masri 	__le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
13698a4fa214SAhmad Masri 	/* Temperature range for Tx E-type parameters */
13708a4fa214SAhmad Masri 	u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
13718a4fa214SAhmad Masri 	u8 reserved1;
13728a4fa214SAhmad Masri 	/* Tx E-type values to be used for each temperature range.
13738a4fa214SAhmad Masri 	 * The last 4 values of any range are the first 4 values of the next
13748a4fa214SAhmad Masri 	 * range and so on
13758a4fa214SAhmad Masri 	 */
13768a4fa214SAhmad Masri 	__le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1377761f8e4dSLazar Alexei 	/* Temperature range for Rx D-type parameters */
1378761f8e4dSLazar Alexei 	u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
13798a4fa214SAhmad Masri 	u8 reserved2;
1380761f8e4dSLazar Alexei 	/* Rx D-type values to be used for each temperature range */
13818a4fa214SAhmad Masri 	__le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1382761f8e4dSLazar Alexei 	/* Temperature range for Rx E-type parameters */
1383761f8e4dSLazar Alexei 	u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
13848a4fa214SAhmad Masri 	u8 reserved3;
1385761f8e4dSLazar Alexei 	/* Rx E-type values to be used for each temperature range.
1386761f8e4dSLazar Alexei 	 * The last 4 values of any range are the first 4 values of the next
1387761f8e4dSLazar Alexei 	 * range and so on
1388761f8e4dSLazar Alexei 	 */
13898a4fa214SAhmad Masri 	__le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1390761f8e4dSLazar Alexei 	/* Temperature range for rx_2_tx_offs parameters */
1391761f8e4dSLazar Alexei 	u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
13928a4fa214SAhmad Masri 	u8 reserved4;
1393761f8e4dSLazar Alexei 	/* Rx to Tx gain index offset */
13948a4fa214SAhmad Masri 	s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
13958a4fa214SAhmad Masri } __packed;
13968a4fa214SAhmad Masri 
13978a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID
13988a4fa214SAhmad Masri  * This API sets rd parameter per mcs.
13998a4fa214SAhmad Masri  * Relevant only in Fixed Scheduling mode.
14008a4fa214SAhmad Masri  * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID
14018a4fa214SAhmad Masri  */
14028a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_cmd {
14038a4fa214SAhmad Masri 	/* Use mcs -1 to set for every mcs */
14048a4fa214SAhmad Masri 	s8 mcs;
14058a4fa214SAhmad Masri 	/* Number of frames with rd bit set in a single virtual slot */
14068a4fa214SAhmad Masri 	u8 rd_count_per_slot;
14078a4fa214SAhmad Masri 	u8 reserved[2];
1408761f8e4dSLazar Alexei } __packed;
1409761f8e4dSLazar Alexei 
1410761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_READ_CMDID */
1411761f8e4dSLazar Alexei struct wmi_rf_xpm_read_cmd {
1412761f8e4dSLazar Alexei 	u8 rf_id;
1413761f8e4dSLazar Alexei 	u8 reserved[3];
1414761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1415761f8e4dSLazar Alexei 	 * multiple of 8bits
1416761f8e4dSLazar Alexei 	 */
1417761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1418761f8e4dSLazar Alexei 	__le32 num_bytes;
1419761f8e4dSLazar Alexei } __packed;
1420761f8e4dSLazar Alexei 
1421761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_WRITE_CMDID */
1422761f8e4dSLazar Alexei struct wmi_rf_xpm_write_cmd {
1423761f8e4dSLazar Alexei 	u8 rf_id;
1424761f8e4dSLazar Alexei 	u8 reserved0[3];
1425761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
1426761f8e4dSLazar Alexei 	 * multiple of 8bits
1427761f8e4dSLazar Alexei 	 */
1428761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
1429761f8e4dSLazar Alexei 	__le32 num_bytes;
1430761f8e4dSLazar Alexei 	/* boolean flag indicating whether FW should verify the write
1431761f8e4dSLazar Alexei 	 * operation
1432761f8e4dSLazar Alexei 	 */
1433761f8e4dSLazar Alexei 	u8 verify;
1434761f8e4dSLazar Alexei 	u8 reserved1[3];
1435761f8e4dSLazar Alexei 	/* actual size=num_bytes */
1436761f8e4dSLazar Alexei 	u8 data_bytes[0];
1437b874ddecSLior David } __packed;
1438b874ddecSLior David 
14399b586118STzahi Sabo /* Possible modes for temperature measurement */
14408c679675SVladimir Kondratiev enum wmi_temperature_measure_mode {
1441b874ddecSLior David 	TEMPERATURE_USE_OLD_VALUE	= 0x01,
1442b874ddecSLior David 	TEMPERATURE_MEASURE_NOW		= 0x02,
14438c679675SVladimir Kondratiev };
14448c679675SVladimir Kondratiev 
1445b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */
1446b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd {
14478c679675SVladimir Kondratiev 	__le32 measure_baseband_en;
14488c679675SVladimir Kondratiev 	__le32 measure_rf_en;
14498c679675SVladimir Kondratiev 	__le32 measure_mode;
1450b8023177SVladimir Kondratiev } __packed;
1451b8023177SVladimir Kondratiev 
1452b874ddecSLior David enum wmi_pmc_op {
1453b874ddecSLior David 	WMI_PMC_ALLOCATE	= 0x00,
1454b874ddecSLior David 	WMI_PMC_RELEASE		= 0x01,
1455dc16427bSVladimir Kondratiev };
1456dc16427bSVladimir Kondratiev 
1457b874ddecSLior David /* WMI_PMC_CMDID */
1458dc16427bSVladimir Kondratiev struct wmi_pmc_cmd {
1459b874ddecSLior David 	/* enum wmi_pmc_cmd_op_type */
1460b874ddecSLior David 	u8 op;
1461dc16427bSVladimir Kondratiev 	u8 reserved;
1462dc16427bSVladimir Kondratiev 	__le16 ring_size;
1463dc16427bSVladimir Kondratiev 	__le64 mem_base;
1464dc16427bSVladimir Kondratiev } __packed;
1465dc16427bSVladimir Kondratiev 
146608989f96SLior David enum wmi_aoa_meas_type {
146708989f96SLior David 	WMI_AOA_PHASE_MEAS	= 0x00,
146808989f96SLior David 	WMI_AOA_PHASE_AMP_MEAS	= 0x01,
146908989f96SLior David };
147008989f96SLior David 
147108989f96SLior David /* WMI_AOA_MEAS_CMDID */
147208989f96SLior David struct wmi_aoa_meas_cmd {
147308989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
147408989f96SLior David 	/* channels IDs:
147508989f96SLior David 	 * 0 - 58320 MHz
147608989f96SLior David 	 * 1 - 60480 MHz
147708989f96SLior David 	 * 2 - 62640 MHz
147808989f96SLior David 	 */
147908989f96SLior David 	u8 channel;
148008989f96SLior David 	/* enum wmi_aoa_meas_type */
148108989f96SLior David 	u8 aoa_meas_type;
148208989f96SLior David 	__le32 meas_rf_mask;
148308989f96SLior David } __packed;
148408989f96SLior David 
1485cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1486cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd {
1487cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
1488cbf795c1SLior David 	u8 mgmt_retry_limit;
1489cbf795c1SLior David 	/* alignment to 32b */
1490cbf795c1SLior David 	u8 reserved[3];
1491cbf795c1SLior David } __packed;
1492cbf795c1SLior David 
149390ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */
149490ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES	(3)
149590ffabb0SDedy Lansky 
149690ffabb0SDedy Lansky struct wmi_tt_zone_limits {
149790ffabb0SDedy Lansky 	/* Above this temperature this zone is active */
149890ffabb0SDedy Lansky 	u8 temperature_high;
149990ffabb0SDedy Lansky 	/* Below this temperature the adjacent lower zone is active */
150090ffabb0SDedy Lansky 	u8 temperature_low;
150190ffabb0SDedy Lansky 	u8 reserved[2];
150290ffabb0SDedy Lansky } __packed;
150390ffabb0SDedy Lansky 
150490ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal
150590ffabb0SDedy Lansky  * throttling
150690ffabb0SDedy Lansky  */
150790ffabb0SDedy Lansky struct wmi_tt_data {
150890ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for baseband */
150990ffabb0SDedy Lansky 	u8 bb_enabled;
151090ffabb0SDedy Lansky 	u8 reserved0[3];
151190ffabb0SDedy Lansky 	/* Define zones for baseband */
151290ffabb0SDedy Lansky 	struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
151390ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for radio */
151490ffabb0SDedy Lansky 	u8 rf_enabled;
151590ffabb0SDedy Lansky 	u8 reserved1[3];
151690ffabb0SDedy Lansky 	/* Define zones for all radio chips */
151790ffabb0SDedy Lansky 	struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
151890ffabb0SDedy Lansky } __packed;
151990ffabb0SDedy Lansky 
152090ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
152190ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd {
152290ffabb0SDedy Lansky 	/* Command data */
152390ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
152490ffabb0SDedy Lansky } __packed;
152590ffabb0SDedy Lansky 
1526849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */
1527849a564bSDedy Lansky struct wmi_new_sta_cmd {
1528849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1529849a564bSDedy Lansky 	u8 aid;
1530849a564bSDedy Lansky } __packed;
1531849a564bSDedy Lansky 
1532849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */
1533849a564bSDedy Lansky struct wmi_del_sta_cmd {
1534849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1535849a564bSDedy Lansky 	__le16 disconnect_reason;
1536849a564bSDedy Lansky } __packed;
1537849a564bSDedy Lansky 
153808989f96SLior David enum wmi_tof_burst_duration {
153908989f96SLior David 	WMI_TOF_BURST_DURATION_250_USEC		= 2,
154008989f96SLior David 	WMI_TOF_BURST_DURATION_500_USEC		= 3,
154108989f96SLior David 	WMI_TOF_BURST_DURATION_1_MSEC		= 4,
154208989f96SLior David 	WMI_TOF_BURST_DURATION_2_MSEC		= 5,
154308989f96SLior David 	WMI_TOF_BURST_DURATION_4_MSEC		= 6,
154408989f96SLior David 	WMI_TOF_BURST_DURATION_8_MSEC		= 7,
154508989f96SLior David 	WMI_TOF_BURST_DURATION_16_MSEC		= 8,
154608989f96SLior David 	WMI_TOF_BURST_DURATION_32_MSEC		= 9,
154708989f96SLior David 	WMI_TOF_BURST_DURATION_64_MSEC		= 10,
154808989f96SLior David 	WMI_TOF_BURST_DURATION_128_MSEC		= 11,
154908989f96SLior David 	WMI_TOF_BURST_DURATION_NO_PREFERENCES	= 15,
155008989f96SLior David };
155108989f96SLior David 
155208989f96SLior David enum wmi_tof_session_start_flags {
155308989f96SLior David 	WMI_TOF_SESSION_START_FLAG_SECURED	= 0x1,
155408989f96SLior David 	WMI_TOF_SESSION_START_FLAG_ASAP		= 0x2,
155508989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCI_REQ	= 0x4,
155608989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCR_REQ	= 0x8,
155708989f96SLior David };
155808989f96SLior David 
155908989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
156008989f96SLior David struct wmi_ftm_dest_info {
156108989f96SLior David 	u8 channel;
156208989f96SLior David 	/* wmi_tof_session_start_flags_e */
156308989f96SLior David 	u8 flags;
156408989f96SLior David 	u8 initial_token;
156508989f96SLior David 	u8 num_of_ftm_per_burst;
156608989f96SLior David 	u8 num_of_bursts_exp;
156708989f96SLior David 	/* wmi_tof_burst_duration_e */
156808989f96SLior David 	u8 burst_duration;
156908989f96SLior David 	/* Burst Period indicate interval between two consecutive burst
157008989f96SLior David 	 * instances, in units of 100 ms
157108989f96SLior David 	 */
157208989f96SLior David 	__le16 burst_period;
157308989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
1574761f8e4dSLazar Alexei 	u8 reserved;
1575761f8e4dSLazar Alexei 	u8 num_burst_per_aoa_meas;
157608989f96SLior David } __packed;
157708989f96SLior David 
157808989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
157908989f96SLior David struct wmi_tof_session_start_cmd {
158008989f96SLior David 	__le32 session_id;
1581761f8e4dSLazar Alexei 	u8 reserved1;
158208989f96SLior David 	u8 aoa_type;
158308989f96SLior David 	__le16 num_of_dest;
158408989f96SLior David 	u8 reserved[4];
158508989f96SLior David 	struct wmi_ftm_dest_info ftm_dest_info[0];
158608989f96SLior David } __packed;
158708989f96SLior David 
1588761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_CMDID */
1589761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_cmd {
1590761f8e4dSLazar Alexei 	u8 enable;
1591761f8e4dSLazar Alexei 	u8 reserved[3];
1592761f8e4dSLazar Alexei } __packed;
1593761f8e4dSLazar Alexei 
159408989f96SLior David enum wmi_tof_channel_info_report_type {
159508989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_CIR			= 0x1,
159608989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_RSSI			= 0x2,
159708989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_SNR			= 0x4,
159808989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA		= 0x8,
159908989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC	= 0x10,
160008989f96SLior David };
160108989f96SLior David 
160208989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */
160308989f96SLior David struct wmi_tof_channel_info_cmd {
160408989f96SLior David 	/* wmi_tof_channel_info_report_type_e */
160508989f96SLior David 	__le32 channel_info_report_request;
160608989f96SLior David } __packed;
160708989f96SLior David 
16088ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
16098ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd {
16108ae5d62cSLior David 	/* TX delay offset */
16118ae5d62cSLior David 	__le32 tx_offset;
16128ae5d62cSLior David 	/* RX delay offset */
16138ae5d62cSLior David 	__le32 rx_offset;
1614761f8e4dSLazar Alexei 	/* Mask to define which RFs to configure. 0 means all RFs */
1615761f8e4dSLazar Alexei 	__le32 rf_mask;
1616761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
1617761f8e4dSLazar Alexei 	__le32 precursor;
1618761f8e4dSLazar Alexei } __packed;
1619761f8e4dSLazar Alexei 
1620761f8e4dSLazar Alexei /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1621761f8e4dSLazar Alexei struct wmi_tof_get_tx_rx_offset_cmd {
1622761f8e4dSLazar Alexei 	/* rf index to read offsets from */
1623761f8e4dSLazar Alexei 	u8 rf_index;
1624761f8e4dSLazar Alexei 	u8 reserved[3];
1625761f8e4dSLazar Alexei } __packed;
1626761f8e4dSLazar Alexei 
1627761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1628761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params {
1629761f8e4dSLazar Alexei 	u8 mcs;
1630761f8e4dSLazar Alexei 	/* time in usec from start slot to start tx flow - default 15 */
1631761f8e4dSLazar Alexei 	u8 time_in_usec_before_initiate_tx;
1632761f8e4dSLazar Alexei 	/* RD enable - if yes consider RD according to STA mcs */
1633761f8e4dSLazar Alexei 	u8 rd_enabled;
1634761f8e4dSLazar Alexei 	u8 reserved;
1635761f8e4dSLazar Alexei 	/* time in usec from start slot to stop vring */
1636761f8e4dSLazar Alexei 	__le16 time_in_usec_to_stop_vring;
1637761f8e4dSLazar Alexei 	/* timeout to force flush from start of slot */
1638761f8e4dSLazar Alexei 	__le16 flush_to_in_usec;
1639761f8e4dSLazar Alexei 	/* per mcs the mac buffer limit size in bytes */
1640761f8e4dSLazar Alexei 	__le32 mac_buff_size_in_bytes;
1641761f8e4dSLazar Alexei } __packed;
1642761f8e4dSLazar Alexei 
1643761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1644761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_complete_event {
1645761f8e4dSLazar Alexei 	/* wmi_fw_status */
1646761f8e4dSLazar Alexei 	u8 status;
1647761f8e4dSLazar Alexei 	u8 reserved[3];
1648761f8e4dSLazar Alexei } __packed;
1649761f8e4dSLazar Alexei 
1650b5aeff16SDedy Lansky /* This value exists for backwards compatibility only.
1651b5aeff16SDedy Lansky  * Do not use it in new commands.
1652b5aeff16SDedy Lansky  * Use dynamic arrays where possible.
1653b5aeff16SDedy Lansky  */
1654761f8e4dSLazar Alexei #define WMI_NUM_MCS	(13)
1655761f8e4dSLazar Alexei 
1656761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1657761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_cmd {
1658761f8e4dSLazar Alexei 	/* defaults in the SAS table */
1659761f8e4dSLazar Alexei 	struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1660761f8e4dSLazar Alexei 	/* default 150 uSec */
1661761f8e4dSLazar Alexei 	__le16 max_sta_rd_ppdu_duration_in_usec;
1662761f8e4dSLazar Alexei 	/* default 300 uSec */
1663761f8e4dSLazar Alexei 	__le16 max_sta_grant_ppdu_duration_in_usec;
1664761f8e4dSLazar Alexei 	/* default 1000 uSec */
1665761f8e4dSLazar Alexei 	__le16 assoc_slot_duration_in_usec;
1666761f8e4dSLazar Alexei 	/* default 360 uSec */
1667761f8e4dSLazar Alexei 	__le16 virtual_slot_duration_in_usec;
1668761f8e4dSLazar Alexei 	/* each this field value slots start with grant frame to the station
1669761f8e4dSLazar Alexei 	 * - default 2
1670761f8e4dSLazar Alexei 	 */
1671761f8e4dSLazar Alexei 	u8 number_of_ap_slots_for_initiate_grant;
1672761f8e4dSLazar Alexei 	u8 reserved[3];
1673761f8e4dSLazar Alexei } __packed;
1674761f8e4dSLazar Alexei 
1675761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1676761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_cmd {
1677761f8e4dSLazar Alexei 	__le32 reserved;
1678761f8e4dSLazar Alexei } __packed;
1679761f8e4dSLazar Alexei 
1680761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1681761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_complete_event {
1682761f8e4dSLazar Alexei 	/* wmi_fw_status */
1683761f8e4dSLazar Alexei 	u8 status;
1684761f8e4dSLazar Alexei 	u8 reserved[3];
1685761f8e4dSLazar Alexei } __packed;
1686761f8e4dSLazar Alexei 
1687761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1688761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_cmd {
1689761f8e4dSLazar Alexei 	/* number of directed omnis at destination AP */
1690761f8e4dSLazar Alexei 	u8 dest_ap_num_directed_omnis;
1691761f8e4dSLazar Alexei 	u8 reserved[3];
1692761f8e4dSLazar Alexei } __packed;
1693761f8e4dSLazar Alexei 
1694761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1695761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_event {
1696761f8e4dSLazar Alexei 	/* wmi_fw_status */
1697761f8e4dSLazar Alexei 	u8 status;
1698761f8e4dSLazar Alexei 	u8 reserved[3];
1699761f8e4dSLazar Alexei } __packed;
1700761f8e4dSLazar Alexei 
17016a363e8aSAhmad Masri /* WMI_RADAR_GENERAL_CONFIG_EVENTID */
17026a363e8aSAhmad Masri struct wmi_radar_general_config_event {
17036a363e8aSAhmad Masri 	/* wmi_fw_status */
17046a363e8aSAhmad Masri 	u8 status;
17056a363e8aSAhmad Masri 	u8 reserved[3];
17066a363e8aSAhmad Masri } __packed;
17076a363e8aSAhmad Masri 
17086a363e8aSAhmad Masri /* WMI_RADAR_CONFIG_SELECT_EVENTID */
17096a363e8aSAhmad Masri struct wmi_radar_config_select_event {
17106a363e8aSAhmad Masri 	/* wmi_fw_status */
17116a363e8aSAhmad Masri 	u8 status;
17126a363e8aSAhmad Masri 	u8 reserved[3];
17136a363e8aSAhmad Masri 	/* In unit of bytes */
17146a363e8aSAhmad Masri 	__le32 fifo_size;
17156a363e8aSAhmad Masri 	/* In unit of bytes */
17166a363e8aSAhmad Masri 	__le32 pulse_size;
17176a363e8aSAhmad Masri } __packed;
17186a363e8aSAhmad Masri 
17196a363e8aSAhmad Masri /* WMI_RADAR_PARAMS_CONFIG_EVENTID */
17206a363e8aSAhmad Masri struct wmi_radar_params_config_event {
17216a363e8aSAhmad Masri 	/* wmi_fw_status */
17226a363e8aSAhmad Masri 	u8 status;
17236a363e8aSAhmad Masri 	u8 reserved[3];
17246a363e8aSAhmad Masri } __packed;
17256a363e8aSAhmad Masri 
17266a363e8aSAhmad Masri /* WMI_RADAR_SET_MODE_EVENTID */
17276a363e8aSAhmad Masri struct wmi_radar_set_mode_event {
17286a363e8aSAhmad Masri 	/* wmi_fw_status */
17296a363e8aSAhmad Masri 	u8 status;
17306a363e8aSAhmad Masri 	u8 reserved[3];
17316a363e8aSAhmad Masri } __packed;
17326a363e8aSAhmad Masri 
17336a363e8aSAhmad Masri /* WMI_RADAR_CONTROL_EVENTID */
17346a363e8aSAhmad Masri struct wmi_radar_control_event {
17356a363e8aSAhmad Masri 	/* wmi_fw_status */
17366a363e8aSAhmad Masri 	u8 status;
17376a363e8aSAhmad Masri 	u8 reserved[3];
17386a363e8aSAhmad Masri } __packed;
17396a363e8aSAhmad Masri 
17406a363e8aSAhmad Masri /* WMI_RADAR_PCI_CONTROL_EVENTID */
17416a363e8aSAhmad Masri struct wmi_radar_pci_control_event {
17426a363e8aSAhmad Masri 	/* wmi_fw_status */
17436a363e8aSAhmad Masri 	u8 status;
17446a363e8aSAhmad Masri 	u8 reserved[3];
17456a363e8aSAhmad Masri } __packed;
17466a363e8aSAhmad Masri 
1747761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1748761f8e4dSLazar Alexei struct wmi_set_long_range_config_cmd {
1749761f8e4dSLazar Alexei 	__le32 reserved;
1750761f8e4dSLazar Alexei } __packed;
1751761f8e4dSLazar Alexei 
1752761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1753761f8e4dSLazar Alexei struct wmi_set_long_range_config_complete_event {
1754761f8e4dSLazar Alexei 	/* wmi_fw_status */
1755761f8e4dSLazar Alexei 	u8 status;
1756761f8e4dSLazar Alexei 	u8 reserved[3];
17578ae5d62cSLior David } __packed;
17588ae5d62cSLior David 
1759b5aeff16SDedy Lansky /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers
17608a4fa214SAhmad Masri  * (16) - prev struct field size (4)
17618a4fa214SAhmad Masri  */
1762b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_PAYLOAD_SIZE		(1024)
1763b5aeff16SDedy Lansky #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE	(1024)
1764b5aeff16SDedy Lansky #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE	(1024)
17658a4fa214SAhmad Masri 
17668a4fa214SAhmad Masri enum wmi_internal_fw_ioctl_code {
17678a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_NONE	= 0x0,
17688a4fa214SAhmad Masri 	WMI_INTERNAL_FW_CODE_QCOM	= 0x1,
17698a4fa214SAhmad Masri };
17708a4fa214SAhmad Masri 
17718a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_CMDID */
17728a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_cmd {
17738a4fa214SAhmad Masri 	/* enum wmi_internal_fw_ioctl_code */
17748a4fa214SAhmad Masri 	__le16 code;
17758a4fa214SAhmad Masri 	__le16 length;
17768a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
17778a4fa214SAhmad Masri 	 * Must be the last member of the struct
17788a4fa214SAhmad Masri 	 */
17798a4fa214SAhmad Masri 	__le32 payload[0];
17808a4fa214SAhmad Masri } __packed;
17818a4fa214SAhmad Masri 
17828a4fa214SAhmad Masri /* WMI_INTERNAL_FW_IOCTL_EVENTID */
17838a4fa214SAhmad Masri struct wmi_internal_fw_ioctl_event {
17848a4fa214SAhmad Masri 	/* wmi_fw_status */
17858a4fa214SAhmad Masri 	u8 status;
17868a4fa214SAhmad Masri 	u8 reserved;
17878a4fa214SAhmad Masri 	__le16 length;
17888a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
17898a4fa214SAhmad Masri 	 * Must be the last member of the struct
17908a4fa214SAhmad Masri 	 */
17918a4fa214SAhmad Masri 	__le32 payload[0];
17928a4fa214SAhmad Masri } __packed;
17938a4fa214SAhmad Masri 
17948a4fa214SAhmad Masri /* WMI_INTERNAL_FW_EVENT_EVENTID */
17958a4fa214SAhmad Masri struct wmi_internal_fw_event_event {
17968a4fa214SAhmad Masri 	__le16 id;
17978a4fa214SAhmad Masri 	__le16 length;
17988a4fa214SAhmad Masri 	/* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
17998a4fa214SAhmad Masri 	 * Must be the last member of the struct
18008a4fa214SAhmad Masri 	 */
18018a4fa214SAhmad Masri 	__le32 payload[0];
18028a4fa214SAhmad Masri } __packed;
18038a4fa214SAhmad Masri 
1804b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */
1805b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_cmd {
1806b5aeff16SDedy Lansky 	/* Array of weights. Valid values are
1807b5aeff16SDedy Lansky 	 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is
1808b5aeff16SDedy Lansky 	 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights
1809b5aeff16SDedy Lansky 	 * #1..#3
1810b5aeff16SDedy Lansky 	 */
1811b5aeff16SDedy Lansky 	u8 weight[3];
1812b5aeff16SDedy Lansky 	u8 reserved;
1813b5aeff16SDedy Lansky } __packed;
1814b5aeff16SDedy Lansky 
1815b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1816b5aeff16SDedy Lansky struct wmi_vring_priority {
1817b5aeff16SDedy Lansky 	u8 vring_idx;
1818b5aeff16SDedy Lansky 	/* Weight index. Valid value is 0-3 */
1819b5aeff16SDedy Lansky 	u8 priority;
1820b5aeff16SDedy Lansky 	u8 reserved[2];
1821b5aeff16SDedy Lansky } __packed;
1822b5aeff16SDedy Lansky 
1823b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_CMDID */
1824b5aeff16SDedy Lansky struct wmi_set_vring_priority_cmd {
1825b5aeff16SDedy Lansky 	/* number of entries in vring_priority. Set to
1826b5aeff16SDedy Lansky 	 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there
1827b5aeff16SDedy Lansky 	 * will be only one entry in vring_priority
1828b5aeff16SDedy Lansky 	 */
1829b5aeff16SDedy Lansky 	u8 num_of_vrings;
1830b5aeff16SDedy Lansky 	u8 reserved[3];
1831b5aeff16SDedy Lansky 	struct wmi_vring_priority vring_priority[0];
1832b5aeff16SDedy Lansky } __packed;
1833b5aeff16SDedy Lansky 
1834b5aeff16SDedy Lansky /* WMI_BF_CONTROL_CMDID - deprecated */
18358a4fa214SAhmad Masri struct wmi_bf_control_cmd {
18368a4fa214SAhmad Masri 	/* wmi_bf_triggers */
18378a4fa214SAhmad Masri 	__le32 triggers;
18388a4fa214SAhmad Masri 	u8 cid;
18398a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
18408a4fa214SAhmad Masri 	u8 txss_mode;
18418a4fa214SAhmad Masri 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
18428a4fa214SAhmad Masri 	u8 brp_mode;
18438a4fa214SAhmad Masri 	/* Max cts threshold (correspond to
18448a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
18458a4fa214SAhmad Masri 	 */
18468a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_thr;
18478a4fa214SAhmad Masri 	/* Max cts threshold in dense (correspond to
18488a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
18498a4fa214SAhmad Masri 	 */
18508a4fa214SAhmad Masri 	u8 bf_trigger_max_cts_failure_dense_thr;
18518a4fa214SAhmad Masri 	/* Max b-ack threshold (correspond to
18528a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
18538a4fa214SAhmad Masri 	 */
18548a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_thr;
18558a4fa214SAhmad Masri 	/* Max b-ack threshold in dense (correspond to
18568a4fa214SAhmad Masri 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
18578a4fa214SAhmad Masri 	 */
18588a4fa214SAhmad Masri 	u8 bf_trigger_max_back_failure_dense_thr;
18598a4fa214SAhmad Masri 	u8 reserved0;
18608a4fa214SAhmad Masri 	/* Wrong sectors threshold */
18618a4fa214SAhmad Masri 	__le32 wrong_sector_bis_thr;
18628a4fa214SAhmad Masri 	/* BOOL to enable/disable long term trigger */
18638a4fa214SAhmad Masri 	u8 long_term_enable;
18648a4fa214SAhmad Masri 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
18658a4fa214SAhmad Masri 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
18668a4fa214SAhmad Masri 	 */
18678a4fa214SAhmad Masri 	u8 long_term_update_thr;
18688a4fa214SAhmad Masri 	/* Long term throughput threshold [Mbps] */
18698a4fa214SAhmad Masri 	u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
18708a4fa214SAhmad Masri 	u8 reserved1;
18718a4fa214SAhmad Masri 	/* Long term timeout threshold table [msec] */
18728a4fa214SAhmad Masri 	__le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
18738a4fa214SAhmad Masri 	u8 reserved2[2];
18748a4fa214SAhmad Masri } __packed;
18758a4fa214SAhmad Masri 
1876b5aeff16SDedy Lansky /* BF configuration for each MCS */
1877b5aeff16SDedy Lansky struct wmi_bf_control_ex_mcs {
1878b5aeff16SDedy Lansky 	/* Long term throughput threshold [Mbps] */
1879b5aeff16SDedy Lansky 	u8 long_term_mbps_th_tbl;
1880b5aeff16SDedy Lansky 	u8 reserved;
1881b5aeff16SDedy Lansky 	/* Long term timeout threshold table [msec] */
1882b5aeff16SDedy Lansky 	__le16 long_term_trig_timeout_per_mcs;
1883b5aeff16SDedy Lansky } __packed;
1884b5aeff16SDedy Lansky 
1885b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_CMDID */
1886b5aeff16SDedy Lansky struct wmi_bf_control_ex_cmd {
1887b5aeff16SDedy Lansky 	/* wmi_bf_triggers */
1888b5aeff16SDedy Lansky 	__le32 triggers;
1889b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
1890b5aeff16SDedy Lansky 	u8 tx_mode;
1891b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1892b5aeff16SDedy Lansky 	u8 txss_mode;
1893b5aeff16SDedy Lansky 	/* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1894b5aeff16SDedy Lansky 	u8 brp_mode;
1895b5aeff16SDedy Lansky 	/* Max cts threshold (correspond to
1896b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1897b5aeff16SDedy Lansky 	 */
1898b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_thr;
1899b5aeff16SDedy Lansky 	/* Max cts threshold in dense (correspond to
1900b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1901b5aeff16SDedy Lansky 	 */
1902b5aeff16SDedy Lansky 	u8 bf_trigger_max_cts_failure_dense_thr;
1903b5aeff16SDedy Lansky 	/* Max b-ack threshold (correspond to
1904b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1905b5aeff16SDedy Lansky 	 */
1906b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_thr;
1907b5aeff16SDedy Lansky 	/* Max b-ack threshold in dense (correspond to
1908b5aeff16SDedy Lansky 	 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1909b5aeff16SDedy Lansky 	 */
1910b5aeff16SDedy Lansky 	u8 bf_trigger_max_back_failure_dense_thr;
1911b5aeff16SDedy Lansky 	u8 reserved0;
1912b5aeff16SDedy Lansky 	/* Wrong sectors threshold */
1913b5aeff16SDedy Lansky 	__le32 wrong_sector_bis_thr;
1914b5aeff16SDedy Lansky 	/* BOOL to enable/disable long term trigger */
1915b5aeff16SDedy Lansky 	u8 long_term_enable;
1916b5aeff16SDedy Lansky 	/* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1917b5aeff16SDedy Lansky 	 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1918b5aeff16SDedy Lansky 	 */
1919b5aeff16SDedy Lansky 	u8 long_term_update_thr;
1920b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
1921b5aeff16SDedy Lansky 	u8 reserved1;
1922b5aeff16SDedy Lansky 	/* Configuration for each MCS */
1923b5aeff16SDedy Lansky 	struct wmi_bf_control_ex_mcs each_mcs_cfg[0];
1924b5aeff16SDedy Lansky } __packed;
1925b5aeff16SDedy Lansky 
1926b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMD */
1927b5aeff16SDedy Lansky enum wmi_link_stats_action {
1928b5aeff16SDedy Lansky 	WMI_LINK_STATS_SNAPSHOT		= 0x00,
1929b5aeff16SDedy Lansky 	WMI_LINK_STATS_PERIODIC		= 0x01,
1930b5aeff16SDedy Lansky 	WMI_LINK_STATS_STOP_PERIODIC	= 0x02,
1931b5aeff16SDedy Lansky };
1932b5aeff16SDedy Lansky 
1933b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENT record identifiers */
1934b5aeff16SDedy Lansky enum wmi_link_stats_record_type {
1935b5aeff16SDedy Lansky 	WMI_LINK_STATS_TYPE_BASIC	= 0x01,
19360c936b3cSDedy Lansky 	WMI_LINK_STATS_TYPE_GLOBAL	= 0x02,
1937b5aeff16SDedy Lansky };
1938b5aeff16SDedy Lansky 
1939b5aeff16SDedy Lansky /* WMI_LINK_STATS_CMDID */
1940b5aeff16SDedy Lansky struct wmi_link_stats_cmd {
1941b5aeff16SDedy Lansky 	/* bitmask of required record types
1942b5aeff16SDedy Lansky 	 * (wmi_link_stats_record_type_e)
1943b5aeff16SDedy Lansky 	 */
1944b5aeff16SDedy Lansky 	__le32 record_type_mask;
1945b5aeff16SDedy Lansky 	/* 0xff for all cids */
1946b5aeff16SDedy Lansky 	u8 cid;
1947b5aeff16SDedy Lansky 	/* wmi_link_stats_action_e */
1948b5aeff16SDedy Lansky 	u8 action;
1949b5aeff16SDedy Lansky 	u8 reserved[6];
19500c936b3cSDedy Lansky 	/* range = 100 - 10000 */
1951b5aeff16SDedy Lansky 	__le32 interval_msec;
1952b5aeff16SDedy Lansky } __packed;
1953b5aeff16SDedy Lansky 
1954b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_CMDID */
1955b5aeff16SDedy Lansky struct wmi_set_grant_mcs_cmd {
1956b5aeff16SDedy Lansky 	u8 mcs;
1957b5aeff16SDedy Lansky 	u8 reserved[3];
1958b5aeff16SDedy Lansky } __packed;
1959b5aeff16SDedy Lansky 
1960b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_CMDID */
1961b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_cmd {
1962b5aeff16SDedy Lansky 	__le32 slot_size;
1963b5aeff16SDedy Lansky } __packed;
1964b5aeff16SDedy Lansky 
19659b586118STzahi Sabo /* WMI_TEMP_SENSE_ALL_CMDID */
19669b586118STzahi Sabo struct wmi_temp_sense_all_cmd {
19679b586118STzahi Sabo 	u8 measure_baseband_en;
19689b586118STzahi Sabo 	u8 measure_rf_en;
19699b586118STzahi Sabo 	u8 measure_mode;
19709b586118STzahi Sabo 	u8 reserved;
19719b586118STzahi Sabo } __packed;
19729b586118STzahi Sabo 
1973b874ddecSLior David /* WMI Events
19742be7d22fSVladimir Kondratiev  * List of Events (target to host)
19752be7d22fSVladimir Kondratiev  */
19762be7d22fSVladimir Kondratiev enum wmi_event_id {
19772be7d22fSVladimir Kondratiev 	WMI_READY_EVENTID				= 0x1001,
19782be7d22fSVladimir Kondratiev 	WMI_CONNECT_EVENTID				= 0x1002,
19792be7d22fSVladimir Kondratiev 	WMI_DISCONNECT_EVENTID				= 0x1003,
1980a5dc6883SDedy Lansky 	WMI_START_SCHED_SCAN_EVENTID			= 0x1005,
1981a5dc6883SDedy Lansky 	WMI_STOP_SCHED_SCAN_EVENTID			= 0x1006,
1982a5dc6883SDedy Lansky 	WMI_SCHED_SCAN_RESULT_EVENTID			= 0x1007,
1983b874ddecSLior David 	WMI_SCAN_COMPLETE_EVENTID			= 0x100A,
1984b874ddecSLior David 	WMI_REPORT_STATISTICS_EVENTID			= 0x100B,
1985b5aeff16SDedy Lansky 	WMI_FT_AUTH_STATUS_EVENTID			= 0x100C,
1986b5aeff16SDedy Lansky 	WMI_FT_REASSOC_STATUS_EVENTID			= 0x100D,
19876a363e8aSAhmad Masri 	WMI_RADAR_GENERAL_CONFIG_EVENTID		= 0x1100,
19886a363e8aSAhmad Masri 	WMI_RADAR_CONFIG_SELECT_EVENTID			= 0x1101,
19896a363e8aSAhmad Masri 	WMI_RADAR_PARAMS_CONFIG_EVENTID			= 0x1102,
19906a363e8aSAhmad Masri 	WMI_RADAR_SET_MODE_EVENTID			= 0x1103,
19916a363e8aSAhmad Masri 	WMI_RADAR_CONTROL_EVENTID			= 0x1104,
19926a363e8aSAhmad Masri 	WMI_RADAR_PCI_CONTROL_EVENTID			= 0x1105,
19932be7d22fSVladimir Kondratiev 	WMI_RD_MEM_RSP_EVENTID				= 0x1800,
19942be7d22fSVladimir Kondratiev 	WMI_FW_READY_EVENTID				= 0x1801,
1995b874ddecSLior David 	WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID		= 0x200,
19962be7d22fSVladimir Kondratiev 	WMI_ECHO_RSP_EVENTID				= 0x1803,
19976a363e8aSAhmad Masri 	WMI_DEEP_ECHO_RSP_EVENTID			= 0x1804,
1998761f8e4dSLazar Alexei 	/* deprecated */
1999b874ddecSLior David 	WMI_FS_TUNE_DONE_EVENTID			= 0x180A,
2000761f8e4dSLazar Alexei 	/* deprecated */
2001b874ddecSLior David 	WMI_CORR_MEASURE_EVENTID			= 0x180B,
2002b874ddecSLior David 	WMI_READ_RSSI_EVENTID				= 0x180C,
2003b874ddecSLior David 	WMI_TEMP_SENSE_DONE_EVENTID			= 0x180E,
2004b874ddecSLior David 	WMI_DC_CALIB_DONE_EVENTID			= 0x180F,
2005761f8e4dSLazar Alexei 	/* deprecated */
20062be7d22fSVladimir Kondratiev 	WMI_IQ_TX_CALIB_DONE_EVENTID			= 0x1811,
2007761f8e4dSLazar Alexei 	/* deprecated */
20082be7d22fSVladimir Kondratiev 	WMI_IQ_RX_CALIB_DONE_EVENTID			= 0x1812,
20092be7d22fSVladimir Kondratiev 	WMI_SET_WORK_MODE_DONE_EVENTID			= 0x1815,
20102be7d22fSVladimir Kondratiev 	WMI_LO_LEAKAGE_CALIB_DONE_EVENTID		= 0x1816,
2011761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_EVENTID		= 0x1817,
2012b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_DONE_EVENTID		= 0x181D,
2013761f8e4dSLazar Alexei 	/* deprecated */
2014b874ddecSLior David 	WMI_RF_RX_TEST_DONE_EVENTID			= 0x181E,
20152be7d22fSVladimir Kondratiev 	WMI_CFG_RX_CHAIN_DONE_EVENTID			= 0x1820,
20162be7d22fSVladimir Kondratiev 	WMI_VRING_CFG_DONE_EVENTID			= 0x1821,
20172be7d22fSVladimir Kondratiev 	WMI_BA_STATUS_EVENTID				= 0x1823,
20182be7d22fSVladimir Kondratiev 	WMI_RCP_ADDBA_REQ_EVENTID			= 0x1824,
2019230d8442SVladimir Kondratiev 	WMI_RCP_ADDBA_RESP_SENT_EVENTID			= 0x1825,
20202be7d22fSVladimir Kondratiev 	WMI_DELBA_EVENTID				= 0x1826,
20212be7d22fSVladimir Kondratiev 	WMI_GET_SSID_EVENTID				= 0x1828,
2022b874ddecSLior David 	WMI_GET_PCP_CHANNEL_EVENTID			= 0x182A,
20236a363e8aSAhmad Masri 	/* Event is shared between WMI_SW_TX_REQ_CMDID and
20246a363e8aSAhmad Masri 	 * WMI_SW_TX_REQ_EXT_CMDID
20256a363e8aSAhmad Masri 	 */
2026b874ddecSLior David 	WMI_SW_TX_COMPLETE_EVENTID			= 0x182B,
2027230d8442SVladimir Kondratiev 	WMI_BEAMFORMING_MGMT_DONE_EVENTID		= 0x1836,
20282be7d22fSVladimir Kondratiev 	WMI_BF_TXSS_MGMT_DONE_EVENTID			= 0x1837,
20292be7d22fSVladimir Kondratiev 	WMI_BF_RXSS_MGMT_DONE_EVENTID			= 0x1839,
203073a7d1e3SAlexei Avshalom Lazar 	WMI_BF_TRIG_EVENTID				= 0x183A,
20312be7d22fSVladimir Kondratiev 	WMI_RS_MGMT_DONE_EVENTID			= 0x1852,
20322be7d22fSVladimir Kondratiev 	WMI_RF_MGMT_STATUS_EVENTID			= 0x1853,
20332be7d22fSVladimir Kondratiev 	WMI_BF_SM_MGMT_DONE_EVENTID			= 0x1838,
20342be7d22fSVladimir Kondratiev 	WMI_RX_MGMT_PACKET_EVENTID			= 0x1840,
20356c2faf09SVladimir Kondratiev 	WMI_TX_MGMT_PACKET_EVENTID			= 0x1841,
20360163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID	= 0x1842,
20370163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID		= 0x1843,
2038761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_RESULT_EVENTID			= 0x1856,
2039761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_RESULT_EVENTID			= 0x1857,
204010d599adSMaya Erez 	WMI_LED_CFG_DONE_EVENTID			= 0x1858,
2041761f8e4dSLazar Alexei 	WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID		= 0x185C,
2042761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_RSP_EVENTID			= 0x185D,
2043761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID		= 0x185E,
20448a4fa214SAhmad Masri 	WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID		= 0x185F,
20452be7d22fSVladimir Kondratiev 	/* Performance monitoring events */
20462be7d22fSVladimir Kondratiev 	WMI_DATA_PORT_OPEN_EVENTID			= 0x1860,
2047230d8442SVladimir Kondratiev 	WMI_WBE_LINK_DOWN_EVENTID			= 0x1861,
20482be7d22fSVladimir Kondratiev 	WMI_BF_CTRL_DONE_EVENTID			= 0x1862,
20492be7d22fSVladimir Kondratiev 	WMI_NOTIFY_REQ_DONE_EVENTID			= 0x1863,
20502be7d22fSVladimir Kondratiev 	WMI_GET_STATUS_DONE_EVENTID			= 0x1864,
205196c93589SGidon Studinski 	WMI_RING_EN_EVENTID				= 0x1865,
20520163b031SMaya Erez 	WMI_GET_RF_STATUS_EVENTID			= 0x1866,
20530163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_EVENTID			= 0x1867,
20548a4fa214SAhmad Masri 	WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID		= 0x1868,
20552be7d22fSVladimir Kondratiev 	WMI_UNIT_TEST_EVENTID				= 0x1900,
20562be7d22fSVladimir Kondratiev 	WMI_FLASH_READ_DONE_EVENTID			= 0x1902,
20572be7d22fSVladimir Kondratiev 	WMI_FLASH_WRITE_DONE_EVENTID			= 0x1903,
20580163b031SMaya Erez 	/* Power management */
2059fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_EVENTID			= 0x1904,
20600163b031SMaya Erez 	WMI_TRAFFIC_RESUME_EVENTID			= 0x1905,
2061b8023177SVladimir Kondratiev 	/* P2P */
20628c679675SVladimir Kondratiev 	WMI_P2P_CFG_DONE_EVENTID			= 0x1910,
2063b8023177SVladimir Kondratiev 	WMI_PORT_ALLOCATED_EVENTID			= 0x1911,
2064b8023177SVladimir Kondratiev 	WMI_PORT_DELETED_EVENTID			= 0x1912,
2065b8023177SVladimir Kondratiev 	WMI_LISTEN_STARTED_EVENTID			= 0x1914,
2066b8023177SVladimir Kondratiev 	WMI_SEARCH_STARTED_EVENTID			= 0x1915,
2067b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STARTED_EVENTID			= 0x1916,
2068b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STOPPED_EVENTID			= 0x1917,
2069b8023177SVladimir Kondratiev 	WMI_PCP_STARTED_EVENTID				= 0x1918,
2070b8023177SVladimir Kondratiev 	WMI_PCP_STOPPED_EVENTID				= 0x1919,
2071b874ddecSLior David 	WMI_PCP_FACTOR_EVENTID				= 0x191A,
20720163b031SMaya Erez 	/* Power Save Configuration Events */
20730163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_EVENTID			= 0x191C,
2074b5aeff16SDedy Lansky 	WMI_RS_ENABLE_EVENTID				= 0x191E,
2075b5aeff16SDedy Lansky 	WMI_RS_CFG_EX_EVENTID				= 0x191F,
2076b5aeff16SDedy Lansky 	WMI_GET_DETAILED_RS_RES_EX_EVENTID		= 0x1920,
2077b5aeff16SDedy Lansky 	/* deprecated */
20780163b031SMaya Erez 	WMI_RS_CFG_DONE_EVENTID				= 0x1921,
2079b5aeff16SDedy Lansky 	/* deprecated */
208008989f96SLior David 	WMI_GET_DETAILED_RS_RES_EVENTID			= 0x1922,
208108989f96SLior David 	WMI_AOA_MEAS_EVENTID				= 0x1923,
2082a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_EVENTID			= 0x1924,
2083cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_EVENTID		= 0x1930,
2084cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_EVENTID		= 0x1931,
208590ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1940,
208690ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1941,
2087761f8e4dSLazar Alexei 	/* return the Power Save profile */
2088761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_EVENTID		= 0x1942,
20898a4fa214SAhmad Masri 	WMI_TSF_SYNC_STATUS_EVENTID			= 0x1973,
209008989f96SLior David 	WMI_TOF_SESSION_END_EVENTID			= 0x1991,
209108989f96SLior David 	WMI_TOF_GET_CAPABILITIES_EVENTID		= 0x1992,
209208989f96SLior David 	WMI_TOF_SET_LCR_EVENTID				= 0x1993,
209308989f96SLior David 	WMI_TOF_SET_LCI_EVENTID				= 0x1994,
209408989f96SLior David 	WMI_TOF_FTM_PER_DEST_RES_EVENTID		= 0x1995,
2095761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_EVENTID			= 0x1996,
20968ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_EVENTID		= 0x1997,
20978ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_EVENTID		= 0x1998,
2098761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_EVENTID			= 0x1999,
2099cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A0,
2100cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A1,
2101cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A2,
2102cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A3,
2103cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_DONE_EVENTID		= 0x19A4,
21048ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_EVENTID		= 0x19A5,
21058ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_EVENTID		= 0x19A6,
21068ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID	= 0x19A7,
2107b5aeff16SDedy Lansky 	/* deprecated */
21088a4fa214SAhmad Masri 	WMI_BF_CONTROL_EVENTID				= 0x19AA,
2109b5aeff16SDedy Lansky 	WMI_BF_CONTROL_EX_EVENTID			= 0x19AB,
211096c93589SGidon Studinski 	WMI_TX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C0,
211196c93589SGidon Studinski 	WMI_RX_STATUS_RING_CFG_DONE_EVENTID		= 0x19C1,
211296c93589SGidon Studinski 	WMI_TX_DESC_RING_CFG_DONE_EVENTID		= 0x19C2,
211396c93589SGidon Studinski 	WMI_RX_DESC_RING_CFG_DONE_EVENTID		= 0x19C3,
211496c93589SGidon Studinski 	WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID		= 0x19C5,
2115761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_EVENTID			= 0x1A01,
2116761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID	= 0x1A02,
2117761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID	= 0x1A03,
2118761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID	= 0x1A04,
2119761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID	= 0x1A05,
21208a4fa214SAhmad Masri 	WMI_GET_ASSOC_LIST_RES_EVENTID			= 0x1A06,
21218a4fa214SAhmad Masri 	WMI_GET_CCA_INDICATIONS_EVENTID			= 0x1A07,
21228a4fa214SAhmad Masri 	WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID	= 0x1A08,
21238a4fa214SAhmad Masri 	WMI_INTERNAL_FW_EVENT_EVENTID			= 0x1A0A,
21248a4fa214SAhmad Masri 	WMI_INTERNAL_FW_IOCTL_EVENTID			= 0x1A0B,
2125b5aeff16SDedy Lansky 	WMI_LINK_STATS_CONFIG_DONE_EVENTID		= 0x1A0C,
2126b5aeff16SDedy Lansky 	WMI_LINK_STATS_EVENTID				= 0x1A0D,
2127b5aeff16SDedy Lansky 	WMI_SET_GRANT_MCS_EVENTID			= 0x1A0E,
2128b5aeff16SDedy Lansky 	WMI_SET_AP_SLOT_SIZE_EVENTID			= 0x1A0F,
2129b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID		= 0x1A10,
2130b5aeff16SDedy Lansky 	WMI_SET_VRING_PRIORITY_EVENTID			= 0x1A11,
213173a7d1e3SAlexei Avshalom Lazar 	WMI_RBUFCAP_CFG_EVENTID				= 0x1A12,
21329b586118STzahi Sabo 	WMI_TEMP_SENSE_ALL_DONE_EVENTID			= 0x1A13,
21332be7d22fSVladimir Kondratiev 	WMI_SET_CHANNEL_EVENTID				= 0x9000,
21342be7d22fSVladimir Kondratiev 	WMI_ASSOC_REQ_EVENTID				= 0x9001,
21352be7d22fSVladimir Kondratiev 	WMI_EAPOL_RX_EVENTID				= 0x9002,
21362be7d22fSVladimir Kondratiev 	WMI_MAC_ADDR_RESP_EVENTID			= 0x9003,
21372be7d22fSVladimir Kondratiev 	WMI_FW_VER_EVENTID				= 0x9004,
2138b874ddecSLior David 	WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID		= 0x9005,
21398a4fa214SAhmad Masri 	WMI_INTERNAL_FW_SET_CHANNEL			= 0x9006,
2140761f8e4dSLazar Alexei 	WMI_COMMAND_NOT_SUPPORTED_EVENTID		= 0xFFFF,
21412be7d22fSVladimir Kondratiev };
21422be7d22fSVladimir Kondratiev 
2143b874ddecSLior David /* Events data structures */
2144b8023177SVladimir Kondratiev enum wmi_fw_status {
2145b874ddecSLior David 	WMI_FW_STATUS_SUCCESS	= 0x00,
2146b874ddecSLior David 	WMI_FW_STATUS_FAILURE	= 0x01,
2147b8023177SVladimir Kondratiev };
2148b8023177SVladimir Kondratiev 
2149b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
21502be7d22fSVladimir Kondratiev enum wmi_rf_status {
2151b874ddecSLior David 	WMI_RF_ENABLED		= 0x00,
2152b874ddecSLior David 	WMI_RF_DISABLED_HW	= 0x01,
2153b874ddecSLior David 	WMI_RF_DISABLED_SW	= 0x02,
2154b874ddecSLior David 	WMI_RF_DISABLED_HW_SW	= 0x03,
21552be7d22fSVladimir Kondratiev };
21562be7d22fSVladimir Kondratiev 
2157b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
21582be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event {
21592be7d22fSVladimir Kondratiev 	__le32 rf_status;
21602be7d22fSVladimir Kondratiev } __packed;
21612be7d22fSVladimir Kondratiev 
2162b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */
21632be7d22fSVladimir Kondratiev struct wmi_get_status_done_event {
21642be7d22fSVladimir Kondratiev 	__le32 is_associated;
21652be7d22fSVladimir Kondratiev 	u8 cid;
21662be7d22fSVladimir Kondratiev 	u8 reserved0[3];
21672be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
21682be7d22fSVladimir Kondratiev 	u8 channel;
21692be7d22fSVladimir Kondratiev 	u8 reserved1;
21702be7d22fSVladimir Kondratiev 	u8 network_type;
21712be7d22fSVladimir Kondratiev 	u8 reserved2[3];
21722be7d22fSVladimir Kondratiev 	__le32 ssid_len;
21732be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
21742be7d22fSVladimir Kondratiev 	__le32 rf_status;
21752be7d22fSVladimir Kondratiev 	__le32 is_secured;
21762be7d22fSVladimir Kondratiev } __packed;
21772be7d22fSVladimir Kondratiev 
2178b874ddecSLior David /* WMI_FW_VER_EVENTID */
21792be7d22fSVladimir Kondratiev struct wmi_fw_ver_event {
21800163b031SMaya Erez 	/* FW image version */
21810163b031SMaya Erez 	__le32 fw_major;
21820163b031SMaya Erez 	__le32 fw_minor;
21830163b031SMaya Erez 	__le32 fw_subminor;
21840163b031SMaya Erez 	__le32 fw_build;
21850163b031SMaya Erez 	/* FW image build time stamp */
21860163b031SMaya Erez 	__le32 hour;
21870163b031SMaya Erez 	__le32 minute;
21880163b031SMaya Erez 	__le32 second;
21890163b031SMaya Erez 	__le32 day;
21900163b031SMaya Erez 	__le32 month;
21910163b031SMaya Erez 	__le32 year;
21920163b031SMaya Erez 	/* Boot Loader image version */
21930163b031SMaya Erez 	__le32 bl_major;
21940163b031SMaya Erez 	__le32 bl_minor;
21950163b031SMaya Erez 	__le32 bl_subminor;
21960163b031SMaya Erez 	__le32 bl_build;
2197761f8e4dSLazar Alexei 	/* The number of entries in the FW capabilities array */
219808989f96SLior David 	u8 fw_capabilities_len;
219908989f96SLior David 	u8 reserved[3];
220008989f96SLior David 	/* FW capabilities info
220108989f96SLior David 	 * Must be the last member of the struct
220208989f96SLior David 	 */
220308989f96SLior David 	__le32 fw_capabilities[0];
22040163b031SMaya Erez } __packed;
22050163b031SMaya Erez 
22060163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
22070163b031SMaya Erez enum rf_type {
22080163b031SMaya Erez 	RF_UNKNOWN	= 0x00,
22090163b031SMaya Erez 	RF_MARLON	= 0x01,
22100163b031SMaya Erez 	RF_SPARROW	= 0x02,
22118a4fa214SAhmad Masri 	RF_TALYNA1	= 0x03,
22128a4fa214SAhmad Masri 	RF_TALYNA2	= 0x04,
22130163b031SMaya Erez };
22140163b031SMaya Erez 
22150163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
22160163b031SMaya Erez enum board_file_rf_type {
22170163b031SMaya Erez 	BF_RF_MARLON	= 0x00,
22180163b031SMaya Erez 	BF_RF_SPARROW	= 0x01,
22198a4fa214SAhmad Masri 	BF_RF_TALYNA1	= 0x02,
22208a4fa214SAhmad Masri 	BF_RF_TALYNA2	= 0x03,
22210163b031SMaya Erez };
22220163b031SMaya Erez 
22230163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
22240163b031SMaya Erez enum rf_status {
22250163b031SMaya Erez 	RF_OK			= 0x00,
22260163b031SMaya Erez 	RF_NO_COMM		= 0x01,
22270163b031SMaya Erez 	RF_WRONG_BOARD_FILE	= 0x02,
22280163b031SMaya Erez };
22290163b031SMaya Erez 
22300163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
22310163b031SMaya Erez struct wmi_get_rf_status_event {
22320163b031SMaya Erez 	/* enum rf_type */
22330163b031SMaya Erez 	__le32 rf_type;
22340163b031SMaya Erez 	/* attached RFs bit vector */
22350163b031SMaya Erez 	__le32 attached_rf_vector;
22360163b031SMaya Erez 	/* enabled RFs bit vector */
22370163b031SMaya Erez 	__le32 enabled_rf_vector;
22380163b031SMaya Erez 	/* enum rf_status, refers to enabled RFs */
22390163b031SMaya Erez 	u8 rf_status[32];
22400163b031SMaya Erez 	/* enum board file RF type */
22410163b031SMaya Erez 	__le32 board_file_rf_type;
22420163b031SMaya Erez 	/* board file platform type */
22430163b031SMaya Erez 	__le32 board_file_platform_type;
22440163b031SMaya Erez 	/* board file version */
22450163b031SMaya Erez 	__le32 board_file_version;
2246761f8e4dSLazar Alexei 	/* enabled XIFs bit vector */
2247761f8e4dSLazar Alexei 	__le32 enabled_xif_vector;
2248761f8e4dSLazar Alexei 	__le32 reserved;
22490163b031SMaya Erez } __packed;
22500163b031SMaya Erez 
22510163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
22520163b031SMaya Erez enum baseband_type {
22530163b031SMaya Erez 	BASEBAND_UNKNOWN	= 0x00,
22540163b031SMaya Erez 	BASEBAND_SPARROW_M_A0	= 0x03,
22550163b031SMaya Erez 	BASEBAND_SPARROW_M_A1	= 0x04,
22560163b031SMaya Erez 	BASEBAND_SPARROW_M_B0	= 0x05,
22570163b031SMaya Erez 	BASEBAND_SPARROW_M_C0	= 0x06,
22580163b031SMaya Erez 	BASEBAND_SPARROW_M_D0	= 0x07,
22598ae5d62cSLior David 	BASEBAND_TALYN_M_A0	= 0x08,
22608a4fa214SAhmad Masri 	BASEBAND_TALYN_M_B0	= 0x09,
22610163b031SMaya Erez };
22620163b031SMaya Erez 
22630163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
22640163b031SMaya Erez struct wmi_get_baseband_type_event {
22650163b031SMaya Erez 	/* enum baseband_type */
22660163b031SMaya Erez 	__le32 baseband_type;
22672be7d22fSVladimir Kondratiev } __packed;
22682be7d22fSVladimir Kondratiev 
2269b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */
22702be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event {
22712be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
22722be7d22fSVladimir Kondratiev 	u8 auth_mode;
22732be7d22fSVladimir Kondratiev 	u8 crypt_mode;
22742be7d22fSVladimir Kondratiev 	__le32 offload_mode;
22752be7d22fSVladimir Kondratiev } __packed;
22762be7d22fSVladimir Kondratiev 
2277b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */
22782be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event {
22792be7d22fSVladimir Kondratiev 	u8 src_mac[WMI_MAC_LEN];
22802be7d22fSVladimir Kondratiev 	__le16 eapol_len;
22812be7d22fSVladimir Kondratiev 	u8 eapol[0];
22822be7d22fSVladimir Kondratiev } __packed;
22832be7d22fSVladimir Kondratiev 
2284b874ddecSLior David /* WMI_READY_EVENTID */
22852be7d22fSVladimir Kondratiev enum wmi_phy_capability {
2286b874ddecSLior David 	WMI_11A_CAPABILITY		= 0x01,
2287b874ddecSLior David 	WMI_11G_CAPABILITY		= 0x02,
2288b874ddecSLior David 	WMI_11AG_CAPABILITY		= 0x03,
2289b874ddecSLior David 	WMI_11NA_CAPABILITY		= 0x04,
2290b874ddecSLior David 	WMI_11NG_CAPABILITY		= 0x05,
2291b874ddecSLior David 	WMI_11NAG_CAPABILITY		= 0x06,
2292b874ddecSLior David 	WMI_11AD_CAPABILITY		= 0x07,
2293b874ddecSLior David 	WMI_11N_CAPABILITY_OFFSET	= 0x03,
22942be7d22fSVladimir Kondratiev };
22952be7d22fSVladimir Kondratiev 
22962be7d22fSVladimir Kondratiev struct wmi_ready_event {
22972be7d22fSVladimir Kondratiev 	__le32 sw_version;
22982be7d22fSVladimir Kondratiev 	__le32 abi_version;
22992be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
2300b874ddecSLior David 	/* enum wmi_phy_capability */
2301b874ddecSLior David 	u8 phy_capability;
2302b8023177SVladimir Kondratiev 	u8 numof_additional_mids;
2303761f8e4dSLazar Alexei 	/* rfc read calibration result. 5..15 */
2304eb4c0215SDedy Lansky 	u8 rfc_read_calib_result;
23058a4fa214SAhmad Masri 	/* Max associated STAs supported by FW in AP mode (default 0 means 8
23068a4fa214SAhmad Masri 	 * STA)
23078a4fa214SAhmad Masri 	 */
23088a4fa214SAhmad Masri 	u8 max_assoc_sta;
23098a4fa214SAhmad Masri 	u8 reserved[2];
23102be7d22fSVladimir Kondratiev } __packed;
23112be7d22fSVladimir Kondratiev 
2312b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */
23132be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event {
2314b874ddecSLior David 	/* beamforming status, 0: fail; 1: OK; 2: retrying */
2315b874ddecSLior David 	__le32 status;
23162be7d22fSVladimir Kondratiev 	__le64 tsf;
231730868f5dSDedy Lansky 	s8 rssi;
231873a7d1e3SAlexei Avshalom Lazar 	/* enum wmi_edmg_tx_mode */
231973a7d1e3SAlexei Avshalom Lazar 	u8 tx_mode;
232073a7d1e3SAlexei Avshalom Lazar 	u8 reserved0[2];
23212be7d22fSVladimir Kondratiev 	__le32 tx_tpt;
23222be7d22fSVladimir Kondratiev 	__le32 tx_goodput;
23232be7d22fSVladimir Kondratiev 	__le32 rx_goodput;
23242be7d22fSVladimir Kondratiev 	__le16 bf_mcs;
23252be7d22fSVladimir Kondratiev 	__le16 my_rx_sector;
23262be7d22fSVladimir Kondratiev 	__le16 my_tx_sector;
23272be7d22fSVladimir Kondratiev 	__le16 other_rx_sector;
23282be7d22fSVladimir Kondratiev 	__le16 other_tx_sector;
23292be7d22fSVladimir Kondratiev 	__le16 range;
2330b8023177SVladimir Kondratiev 	u8 sqi;
2331b8023177SVladimir Kondratiev 	u8 reserved[3];
23322be7d22fSVladimir Kondratiev } __packed;
23332be7d22fSVladimir Kondratiev 
2334b874ddecSLior David /* WMI_CONNECT_EVENTID */
23352be7d22fSVladimir Kondratiev struct wmi_connect_event {
23369abe3e30SAlexei Avshalom Lazar 	/* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
23379abe3e30SAlexei Avshalom Lazar 	 * the primary channel number
23389abe3e30SAlexei Avshalom Lazar 	 */
23392be7d22fSVladimir Kondratiev 	u8 channel;
23409abe3e30SAlexei Avshalom Lazar 	/* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
23419abe3e30SAlexei Avshalom Lazar 	u8 edmg_channel;
23422be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
23432be7d22fSVladimir Kondratiev 	__le16 listen_interval;
23442be7d22fSVladimir Kondratiev 	__le16 beacon_interval;
23452be7d22fSVladimir Kondratiev 	u8 network_type;
23462be7d22fSVladimir Kondratiev 	u8 reserved1[3];
23472be7d22fSVladimir Kondratiev 	u8 beacon_ie_len;
23482be7d22fSVladimir Kondratiev 	u8 assoc_req_len;
23492be7d22fSVladimir Kondratiev 	u8 assoc_resp_len;
23502be7d22fSVladimir Kondratiev 	u8 cid;
2351a52fb913SLior David 	u8 aid;
2352a52fb913SLior David 	u8 reserved2[2];
2353b874ddecSLior David 	/* not in use */
23542be7d22fSVladimir Kondratiev 	u8 assoc_info[0];
23552be7d22fSVladimir Kondratiev } __packed;
23562be7d22fSVladimir Kondratiev 
2357849a564bSDedy Lansky /* disconnect_reason */
23582be7d22fSVladimir Kondratiev enum wmi_disconnect_reason {
2359b874ddecSLior David 	WMI_DIS_REASON_NO_NETWORK_AVAIL		= 0x01,
2360b874ddecSLior David 	/* bmiss */
2361b874ddecSLior David 	WMI_DIS_REASON_LOST_LINK		= 0x02,
2362b874ddecSLior David 	WMI_DIS_REASON_DISCONNECT_CMD		= 0x03,
2363b874ddecSLior David 	WMI_DIS_REASON_BSS_DISCONNECTED		= 0x04,
2364b874ddecSLior David 	WMI_DIS_REASON_AUTH_FAILED		= 0x05,
2365b874ddecSLior David 	WMI_DIS_REASON_ASSOC_FAILED		= 0x06,
2366b874ddecSLior David 	WMI_DIS_REASON_NO_RESOURCES_AVAIL	= 0x07,
2367b874ddecSLior David 	WMI_DIS_REASON_CSERV_DISCONNECT		= 0x08,
2368b874ddecSLior David 	WMI_DIS_REASON_INVALID_PROFILE		= 0x0A,
2369b874ddecSLior David 	WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH	= 0x0B,
2370b874ddecSLior David 	WMI_DIS_REASON_PROFILE_MISMATCH		= 0x0C,
2371b874ddecSLior David 	WMI_DIS_REASON_CONNECTION_EVICTED	= 0x0D,
2372b874ddecSLior David 	WMI_DIS_REASON_IBSS_MERGE		= 0x0E,
237373a7d1e3SAlexei Avshalom Lazar 	WMI_DIS_REASON_HIGH_TEMPERATURE		= 0x0F,
23742be7d22fSVladimir Kondratiev };
23752be7d22fSVladimir Kondratiev 
2376849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */
23772be7d22fSVladimir Kondratiev struct wmi_disconnect_event {
2378b874ddecSLior David 	/* reason code, see 802.11 spec. */
2379b874ddecSLior David 	__le16 protocol_reason_status;
2380b874ddecSLior David 	/* set if known */
2381b874ddecSLior David 	u8 bssid[WMI_MAC_LEN];
2382b874ddecSLior David 	/* see enum wmi_disconnect_reason */
2383b874ddecSLior David 	u8 disconnect_reason;
2384b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2385b874ddecSLior David 	u8 assoc_resp_len;
2386b874ddecSLior David 	/* last assoc req may passed to host - not in used */
2387b874ddecSLior David 	u8 assoc_info[0];
23882be7d22fSVladimir Kondratiev } __packed;
23892be7d22fSVladimir Kondratiev 
2390b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */
23916c2faf09SVladimir Kondratiev enum scan_status {
2392b874ddecSLior David 	WMI_SCAN_SUCCESS	= 0x00,
2393b874ddecSLior David 	WMI_SCAN_FAILED		= 0x01,
2394b874ddecSLior David 	WMI_SCAN_ABORTED	= 0x02,
2395b874ddecSLior David 	WMI_SCAN_REJECTED	= 0x03,
2396b874ddecSLior David 	WMI_SCAN_ABORT_REJECTED	= 0x04,
23976c2faf09SVladimir Kondratiev };
23986c2faf09SVladimir Kondratiev 
23992be7d22fSVladimir Kondratiev struct wmi_scan_complete_event {
2400b874ddecSLior David 	/* enum scan_status */
2401b874ddecSLior David 	__le32 status;
24022be7d22fSVladimir Kondratiev } __packed;
24032be7d22fSVladimir Kondratiev 
2404b5aeff16SDedy Lansky /* WMI_FT_AUTH_STATUS_EVENTID */
2405b5aeff16SDedy Lansky struct wmi_ft_auth_status_event {
2406b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2407b5aeff16SDedy Lansky 	u8 status;
2408b5aeff16SDedy Lansky 	u8 reserved[3];
2409b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2410b5aeff16SDedy Lansky 	__le16 ie_len;
2411b5aeff16SDedy Lansky 	u8 ie_info[0];
2412b5aeff16SDedy Lansky } __packed;
2413b5aeff16SDedy Lansky 
2414b5aeff16SDedy Lansky /* WMI_FT_REASSOC_STATUS_EVENTID */
2415b5aeff16SDedy Lansky struct wmi_ft_reassoc_status_event {
2416b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2417b5aeff16SDedy Lansky 	u8 status;
2418b5aeff16SDedy Lansky 	/* association id received from new AP */
2419b5aeff16SDedy Lansky 	u8 aid;
2420b5aeff16SDedy Lansky 	/* enum wmi_channel */
2421b5aeff16SDedy Lansky 	u8 channel;
2422b5aeff16SDedy Lansky 	/* enum wmi_channel */
2423b5aeff16SDedy Lansky 	u8 edmg_channel;
2424b5aeff16SDedy Lansky 	u8 mac_addr[WMI_MAC_LEN];
2425b5aeff16SDedy Lansky 	__le16 beacon_ie_len;
2426b5aeff16SDedy Lansky 	__le16 reassoc_req_ie_len;
2427b5aeff16SDedy Lansky 	__le16 reassoc_resp_ie_len;
2428b9010f10SAhmad Masri 	u8 reserved[4];
2429b5aeff16SDedy Lansky 	u8 ie_info[0];
2430b5aeff16SDedy Lansky } __packed;
2431b5aeff16SDedy Lansky 
2432a5dc6883SDedy Lansky /* wmi_rx_mgmt_info */
2433a5dc6883SDedy Lansky struct wmi_rx_mgmt_info {
2434a5dc6883SDedy Lansky 	u8 mcs;
2435a5dc6883SDedy Lansky 	s8 rssi;
2436a5dc6883SDedy Lansky 	u8 range;
2437a5dc6883SDedy Lansky 	u8 sqi;
2438a5dc6883SDedy Lansky 	__le16 stype;
2439a5dc6883SDedy Lansky 	__le16 status;
2440a5dc6883SDedy Lansky 	__le32 len;
2441a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2442a5dc6883SDedy Lansky 	u8 qid;
2443a5dc6883SDedy Lansky 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2444a5dc6883SDedy Lansky 	u8 mid;
2445a5dc6883SDedy Lansky 	u8 cid;
2446a5dc6883SDedy Lansky 	/* From Radio MNGR */
2447a5dc6883SDedy Lansky 	u8 channel;
2448a5dc6883SDedy Lansky } __packed;
2449a5dc6883SDedy Lansky 
2450a5dc6883SDedy Lansky /* WMI_START_SCHED_SCAN_EVENTID */
2451a5dc6883SDedy Lansky enum wmi_pno_result {
2452a5dc6883SDedy Lansky 	WMI_PNO_SUCCESS			= 0x00,
2453a5dc6883SDedy Lansky 	WMI_PNO_REJECT			= 0x01,
2454a5dc6883SDedy Lansky 	WMI_PNO_INVALID_PARAMETERS	= 0x02,
2455a5dc6883SDedy Lansky 	WMI_PNO_NOT_ENABLED		= 0x03,
2456a5dc6883SDedy Lansky };
2457a5dc6883SDedy Lansky 
2458a5dc6883SDedy Lansky struct wmi_start_sched_scan_event {
24598a4fa214SAhmad Masri 	/* wmi_pno_result */
2460a5dc6883SDedy Lansky 	u8 result;
2461a5dc6883SDedy Lansky 	u8 reserved[3];
2462a5dc6883SDedy Lansky } __packed;
2463a5dc6883SDedy Lansky 
2464a5dc6883SDedy Lansky struct wmi_stop_sched_scan_event {
24658a4fa214SAhmad Masri 	/* wmi_pno_result */
2466a5dc6883SDedy Lansky 	u8 result;
2467a5dc6883SDedy Lansky 	u8 reserved[3];
2468a5dc6883SDedy Lansky } __packed;
2469a5dc6883SDedy Lansky 
2470a5dc6883SDedy Lansky struct wmi_sched_scan_result_event {
2471a5dc6883SDedy Lansky 	struct wmi_rx_mgmt_info info;
2472a5dc6883SDedy Lansky 	u8 payload[0];
2473a5dc6883SDedy Lansky } __packed;
2474a5dc6883SDedy Lansky 
2475b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
2476b874ddecSLior David enum wmi_acs_info_bitmask {
2477b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BEACON_FOUND	= 0x01,
2478b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BUSY_TIME		= 0x02,
2479b874ddecSLior David 	WMI_ACS_INFO_BITMASK_TX_TIME		= 0x04,
2480b874ddecSLior David 	WMI_ACS_INFO_BITMASK_RX_TIME		= 0x08,
2481b874ddecSLior David 	WMI_ACS_INFO_BITMASK_NOISE		= 0x10,
24822be7d22fSVladimir Kondratiev };
24832be7d22fSVladimir Kondratiev 
2484b874ddecSLior David struct scan_acs_info {
2485b874ddecSLior David 	u8 channel;
2486b874ddecSLior David 	u8 beacon_found;
2487b874ddecSLior David 	/* msec */
2488b874ddecSLior David 	__le16 busy_time;
2489b874ddecSLior David 	__le16 tx_time;
2490b874ddecSLior David 	__le16 rx_time;
2491b874ddecSLior David 	u8 noise;
2492b874ddecSLior David 	u8 reserved[3];
2493b874ddecSLior David } __packed;
2494b874ddecSLior David 
2495b874ddecSLior David struct wmi_acs_passive_scan_complete_event {
2496b874ddecSLior David 	__le32 dwell_time;
2497b874ddecSLior David 	/* valid fields within channel info according to
2498b874ddecSLior David 	 * their appearance in struct order
2499b874ddecSLior David 	 */
2500b874ddecSLior David 	__le16 filled;
2501b874ddecSLior David 	u8 num_scanned_channels;
2502b874ddecSLior David 	u8 reserved;
2503b874ddecSLior David 	struct scan_acs_info scan_info_list[0];
2504b874ddecSLior David } __packed;
2505b874ddecSLior David 
2506b874ddecSLior David /* WMI_BA_STATUS_EVENTID */
2507b874ddecSLior David enum wmi_vring_ba_status {
2508b874ddecSLior David 	WMI_BA_AGREED			= 0x00,
2509b874ddecSLior David 	WMI_BA_NON_AGREED		= 0x01,
2510b874ddecSLior David 	/* BA_EN in middle of teardown flow */
2511b874ddecSLior David 	WMI_BA_TD_WIP			= 0x02,
2512b874ddecSLior David 	/* BA_DIS or BA_EN in middle of BA SETUP flow */
2513b874ddecSLior David 	WMI_BA_SETUP_WIP		= 0x03,
2514b874ddecSLior David 	/* BA_EN when the BA session is already active */
2515b874ddecSLior David 	WMI_BA_SESSION_ACTIVE		= 0x04,
2516b874ddecSLior David 	/* BA_DIS when the BA session is not active */
2517b874ddecSLior David 	WMI_BA_SESSION_NOT_ACTIVE	= 0x05,
2518b874ddecSLior David };
2519b874ddecSLior David 
2520b874ddecSLior David struct wmi_ba_status_event {
2521b874ddecSLior David 	/* enum wmi_vring_ba_status */
2522b874ddecSLior David 	__le16 status;
25232be7d22fSVladimir Kondratiev 	u8 reserved[2];
25242be7d22fSVladimir Kondratiev 	u8 ringid;
25252be7d22fSVladimir Kondratiev 	u8 agg_wsize;
25262be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2527cbcf5866SVladimir Kondratiev 	u8 amsdu;
25282be7d22fSVladimir Kondratiev } __packed;
25292be7d22fSVladimir Kondratiev 
2530b874ddecSLior David /* WMI_DELBA_EVENTID */
25312be7d22fSVladimir Kondratiev struct wmi_delba_event {
25328a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
25338a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
25348a4fa214SAhmad Masri 	 */
25352be7d22fSVladimir Kondratiev 	u8 cidxtid;
25362be7d22fSVladimir Kondratiev 	u8 from_initiator;
25372be7d22fSVladimir Kondratiev 	__le16 reason;
25388a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25398a4fa214SAhmad Masri 	u8 cid;
25408a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25418a4fa214SAhmad Masri 	u8 tid;
25428a4fa214SAhmad Masri 	u8 reserved[2];
25432be7d22fSVladimir Kondratiev } __packed;
25442be7d22fSVladimir Kondratiev 
2545b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */
25462be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event {
25472be7d22fSVladimir Kondratiev 	u8 ringid;
25482be7d22fSVladimir Kondratiev 	u8 status;
25492be7d22fSVladimir Kondratiev 	u8 reserved[2];
25502be7d22fSVladimir Kondratiev 	__le32 tx_vring_tail_ptr;
25512be7d22fSVladimir Kondratiev } __packed;
25522be7d22fSVladimir Kondratiev 
2553b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
25542be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event {
25558a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
25568a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
25578a4fa214SAhmad Masri 	 */
25582be7d22fSVladimir Kondratiev 	u8 cidxtid;
25592be7d22fSVladimir Kondratiev 	u8 reserved;
25602be7d22fSVladimir Kondratiev 	__le16 status;
25618a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25628a4fa214SAhmad Masri 	u8 cid;
25638a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
25648a4fa214SAhmad Masri 	u8 tid;
25658a4fa214SAhmad Masri 	u8 reserved2[2];
25662be7d22fSVladimir Kondratiev } __packed;
25672be7d22fSVladimir Kondratiev 
256896c93589SGidon Studinski /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */
256996c93589SGidon Studinski struct wmi_tx_status_ring_cfg_done_event {
257096c93589SGidon Studinski 	u8 ring_id;
257196c93589SGidon Studinski 	/* wmi_fw_status */
257296c93589SGidon Studinski 	u8 status;
257396c93589SGidon Studinski 	u8 reserved[2];
257496c93589SGidon Studinski 	__le32 ring_tail_ptr;
257596c93589SGidon Studinski } __packed;
257696c93589SGidon Studinski 
257796c93589SGidon Studinski /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */
257896c93589SGidon Studinski struct wmi_rx_status_ring_cfg_done_event {
257996c93589SGidon Studinski 	u8 ring_id;
258096c93589SGidon Studinski 	/* wmi_fw_status */
258196c93589SGidon Studinski 	u8 status;
258296c93589SGidon Studinski 	u8 reserved[2];
258396c93589SGidon Studinski 	__le32 ring_tail_ptr;
258496c93589SGidon Studinski } __packed;
258596c93589SGidon Studinski 
258696c93589SGidon Studinski /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */
258796c93589SGidon Studinski struct wmi_cfg_def_rx_offload_done_event {
258896c93589SGidon Studinski 	/* wmi_fw_status */
258996c93589SGidon Studinski 	u8 status;
259096c93589SGidon Studinski 	u8 reserved[3];
259196c93589SGidon Studinski } __packed;
259296c93589SGidon Studinski 
259396c93589SGidon Studinski /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */
259496c93589SGidon Studinski struct wmi_tx_desc_ring_cfg_done_event {
259596c93589SGidon Studinski 	u8 ring_id;
259696c93589SGidon Studinski 	/* wmi_fw_status */
259796c93589SGidon Studinski 	u8 status;
259896c93589SGidon Studinski 	u8 reserved[2];
259996c93589SGidon Studinski 	__le32 ring_tail_ptr;
260096c93589SGidon Studinski } __packed;
260196c93589SGidon Studinski 
260296c93589SGidon Studinski /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */
260396c93589SGidon Studinski struct wmi_rx_desc_ring_cfg_done_event {
260496c93589SGidon Studinski 	u8 ring_id;
260596c93589SGidon Studinski 	/* wmi_fw_status */
260696c93589SGidon Studinski 	u8 status;
260796c93589SGidon Studinski 	u8 reserved[2];
260896c93589SGidon Studinski 	__le32 ring_tail_ptr;
260996c93589SGidon Studinski } __packed;
261096c93589SGidon Studinski 
2611b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */
26122be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event {
26138a4fa214SAhmad Masri 	/* Used for cid less than 8. For higher cid set
26148a4fa214SAhmad Masri 	 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
26158a4fa214SAhmad Masri 	 */
26162be7d22fSVladimir Kondratiev 	u8 cidxtid;
26172be7d22fSVladimir Kondratiev 	u8 dialog_token;
2618b874ddecSLior David 	/* ieee80211_ba_parameterset as it received */
2619b874ddecSLior David 	__le16 ba_param_set;
26202be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
2621b874ddecSLior David 	/* ieee80211_ba_seqstrl field as it received */
2622b874ddecSLior David 	__le16 ba_seq_ctrl;
26238a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
26248a4fa214SAhmad Masri 	u8 cid;
26258a4fa214SAhmad Masri 	/* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
26268a4fa214SAhmad Masri 	u8 tid;
26278a4fa214SAhmad Masri 	u8 reserved[2];
26282be7d22fSVladimir Kondratiev } __packed;
26292be7d22fSVladimir Kondratiev 
2630b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
26312be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status {
2632b874ddecSLior David 	WMI_CFG_RX_CHAIN_SUCCESS	= 0x01,
26332be7d22fSVladimir Kondratiev };
26342be7d22fSVladimir Kondratiev 
26352be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event {
2636b874ddecSLior David 	/* V-Ring Tail pointer */
2637b874ddecSLior David 	__le32 rx_ring_tail_ptr;
26382be7d22fSVladimir Kondratiev 	__le32 status;
26392be7d22fSVladimir Kondratiev } __packed;
26402be7d22fSVladimir Kondratiev 
2641b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
26422be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason {
2643b874ddecSLior David 	WMI_WBE_REASON_USER_REQUEST	= 0x00,
2644b874ddecSLior David 	WMI_WBE_REASON_RX_DISASSOC	= 0x01,
2645b874ddecSLior David 	WMI_WBE_REASON_BAD_PHY_LINK	= 0x02,
26462be7d22fSVladimir Kondratiev };
26472be7d22fSVladimir Kondratiev 
2648b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
26492be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event {
26502be7d22fSVladimir Kondratiev 	u8 cid;
26512be7d22fSVladimir Kondratiev 	u8 reserved[3];
26522be7d22fSVladimir Kondratiev 	__le32 reason;
26532be7d22fSVladimir Kondratiev } __packed;
26542be7d22fSVladimir Kondratiev 
2655b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */
26562be7d22fSVladimir Kondratiev struct wmi_data_port_open_event {
26572be7d22fSVladimir Kondratiev 	u8 cid;
26582be7d22fSVladimir Kondratiev 	u8 reserved[3];
26592be7d22fSVladimir Kondratiev } __packed;
26602be7d22fSVladimir Kondratiev 
266196c93589SGidon Studinski /* WMI_RING_EN_EVENTID */
266296c93589SGidon Studinski struct wmi_ring_en_event {
266396c93589SGidon Studinski 	u8 ring_index;
2664230d8442SVladimir Kondratiev 	u8 reserved[3];
2665230d8442SVladimir Kondratiev } __packed;
2666230d8442SVladimir Kondratiev 
2667b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */
26682be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event {
26692be7d22fSVladimir Kondratiev 	u8 channel;
26702be7d22fSVladimir Kondratiev 	u8 reserved[3];
26712be7d22fSVladimir Kondratiev } __packed;
26722be7d22fSVladimir Kondratiev 
2673b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */
26748c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event {
2675b874ddecSLior David 	/* wmi_fw_status */
2676b874ddecSLior David 	u8 status;
26778c679675SVladimir Kondratiev 	u8 reserved[3];
26788c679675SVladimir Kondratiev } __packed;
26798c679675SVladimir Kondratiev 
2680b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */
2681b8023177SVladimir Kondratiev struct wmi_port_allocated_event {
2682b874ddecSLior David 	/* wmi_fw_status */
2683b874ddecSLior David 	u8 status;
2684b8023177SVladimir Kondratiev 	u8 reserved[3];
2685b8023177SVladimir Kondratiev } __packed;
2686b8023177SVladimir Kondratiev 
2687b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */
2688b8023177SVladimir Kondratiev struct wmi_port_deleted_event {
2689b874ddecSLior David 	/* wmi_fw_status */
2690b874ddecSLior David 	u8 status;
2691b8023177SVladimir Kondratiev 	u8 reserved[3];
2692b8023177SVladimir Kondratiev } __packed;
2693b8023177SVladimir Kondratiev 
2694b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */
2695b8023177SVladimir Kondratiev struct wmi_listen_started_event {
2696b874ddecSLior David 	/* wmi_fw_status */
2697b874ddecSLior David 	u8 status;
2698b8023177SVladimir Kondratiev 	u8 reserved[3];
2699b8023177SVladimir Kondratiev } __packed;
2700b8023177SVladimir Kondratiev 
2701b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */
2702b8023177SVladimir Kondratiev struct wmi_search_started_event {
2703b874ddecSLior David 	/* wmi_fw_status */
2704b874ddecSLior David 	u8 status;
2705b8023177SVladimir Kondratiev 	u8 reserved[3];
2706b8023177SVladimir Kondratiev } __packed;
2707b8023177SVladimir Kondratiev 
2708b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */
2709b8023177SVladimir Kondratiev struct wmi_pcp_started_event {
2710b874ddecSLior David 	/* wmi_fw_status */
2711b874ddecSLior David 	u8 status;
2712b8023177SVladimir Kondratiev 	u8 reserved[3];
2713b8023177SVladimir Kondratiev } __packed;
2714b8023177SVladimir Kondratiev 
2715b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */
2716b8023177SVladimir Kondratiev struct wmi_pcp_factor_event {
2717b8023177SVladimir Kondratiev 	__le32 pcp_factor;
2718b8023177SVladimir Kondratiev } __packed;
2719b8023177SVladimir Kondratiev 
27202be7d22fSVladimir Kondratiev enum wmi_sw_tx_status {
2721b874ddecSLior David 	WMI_TX_SW_STATUS_SUCCESS		= 0x00,
2722b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_NO_RESOURCES	= 0x01,
2723b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_TX		= 0x02,
27242be7d22fSVladimir Kondratiev };
27252be7d22fSVladimir Kondratiev 
2726b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */
27272be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event {
2728b874ddecSLior David 	/* enum wmi_sw_tx_status */
2729b874ddecSLior David 	u8 status;
27302be7d22fSVladimir Kondratiev 	u8 reserved[3];
27312be7d22fSVladimir Kondratiev } __packed;
27322be7d22fSVladimir Kondratiev 
2733761f8e4dSLazar Alexei /* WMI_CORR_MEASURE_EVENTID - deprecated */
2734b8023177SVladimir Kondratiev struct wmi_corr_measure_event {
2735b874ddecSLior David 	/* signed */
2736b874ddecSLior David 	__le32 i;
2737b874ddecSLior David 	/* signed */
2738b874ddecSLior David 	__le32 q;
2739b874ddecSLior David 	/* signed */
2740b874ddecSLior David 	__le32 image_i;
2741b874ddecSLior David 	/* signed */
2742b874ddecSLior David 	__le32 image_q;
2743b8023177SVladimir Kondratiev } __packed;
2744b8023177SVladimir Kondratiev 
2745b874ddecSLior David /* WMI_READ_RSSI_EVENTID */
2746b8023177SVladimir Kondratiev struct wmi_read_rssi_event {
2747b8023177SVladimir Kondratiev 	__le32 ina_rssi_adc_dbm;
2748b8023177SVladimir Kondratiev } __packed;
2749b8023177SVladimir Kondratiev 
2750b874ddecSLior David /* WMI_GET_SSID_EVENTID */
27512be7d22fSVladimir Kondratiev struct wmi_get_ssid_event {
27522be7d22fSVladimir Kondratiev 	__le32 ssid_len;
27532be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
27542be7d22fSVladimir Kondratiev } __packed;
27552be7d22fSVladimir Kondratiev 
2756761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
2757761f8e4dSLazar Alexei struct wmi_rf_xpm_read_result_event {
2758761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2759761f8e4dSLazar Alexei 	u8 status;
2760761f8e4dSLazar Alexei 	u8 reserved[3];
2761761f8e4dSLazar Alexei 	/* requested num_bytes of data */
2762761f8e4dSLazar Alexei 	u8 data_bytes[0];
2763b874ddecSLior David } __packed;
2764b874ddecSLior David 
2765761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
2766761f8e4dSLazar Alexei struct wmi_rf_xpm_write_result_event {
2767761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
2768761f8e4dSLazar Alexei 	u8 status;
2769761f8e4dSLazar Alexei 	u8 reserved[3];
2770b874ddecSLior David } __packed;
2771b874ddecSLior David 
2772b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */
27736c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event {
27746c2faf09SVladimir Kondratiev 	u8 payload[0];
27756c2faf09SVladimir Kondratiev } __packed;
27766c2faf09SVladimir Kondratiev 
2777b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */
27782be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event {
27792be7d22fSVladimir Kondratiev 	struct wmi_rx_mgmt_info info;
27802be7d22fSVladimir Kondratiev 	u8 payload[0];
27812be7d22fSVladimir Kondratiev } __packed;
27822be7d22fSVladimir Kondratiev 
2783b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */
2784b874ddecSLior David struct wmi_echo_rsp_event {
27852be7d22fSVladimir Kondratiev 	__le32 echoed_value;
27862be7d22fSVladimir Kondratiev } __packed;
27872be7d22fSVladimir Kondratiev 
27886a363e8aSAhmad Masri /* WMI_DEEP_ECHO_RSP_EVENTID */
27896a363e8aSAhmad Masri struct wmi_deep_echo_rsp_event {
27906a363e8aSAhmad Masri 	__le32 echoed_value;
27916a363e8aSAhmad Masri } __packed;
27926a363e8aSAhmad Masri 
2793761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
2794761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_rsp_event {
2795761f8e4dSLazar Alexei 	/* wmi_fw_status */
2796761f8e4dSLazar Alexei 	u8 status;
2797761f8e4dSLazar Alexei 	u8 reserved[3];
2798761f8e4dSLazar Alexei } __packed;
2799761f8e4dSLazar Alexei 
2800761f8e4dSLazar Alexei /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
2801761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_event {
2802761f8e4dSLazar Alexei 	/* wmi_fw_status */
2803761f8e4dSLazar Alexei 	u8 status;
2804761f8e4dSLazar Alexei 	u8 reserved[3];
2805761f8e4dSLazar Alexei } __packed;
2806761f8e4dSLazar Alexei 
28078a4fa214SAhmad Masri /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */
28088a4fa214SAhmad Masri struct wmi_fixed_scheduling_ul_config_event {
28098a4fa214SAhmad Masri 	/* wmi_fw_status */
28108a4fa214SAhmad Masri 	u8 status;
28118a4fa214SAhmad Masri 	u8 reserved[3];
28128a4fa214SAhmad Masri } __packed;
28138a4fa214SAhmad Masri 
2814b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID
2815b8023177SVladimir Kondratiev  *
2816b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
2817b8023177SVladimir Kondratiev  */
2818b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event {
2819b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
28209b586118STzahi Sabo 	 * dividing the value by 1000). When temperature cannot be read from
28219b586118STzahi Sabo 	 * device return WMI_INVALID_TEMPERATURE
2822b874ddecSLior David 	 */
28238c679675SVladimir Kondratiev 	__le32 baseband_t1000;
2824b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
28259b586118STzahi Sabo 	 * dividing the value by 1000). When temperature cannot be read from
28269b586118STzahi Sabo 	 * device return WMI_INVALID_TEMPERATURE
2827b874ddecSLior David 	 */
28288c679675SVladimir Kondratiev 	__le32 rf_t1000;
2829b8023177SVladimir Kondratiev } __packed;
2830b8023177SVladimir Kondratiev 
2831b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS	(100)
2832b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS	(10000)
2833b874ddecSLior David 
2834b874ddecSLior David enum wmi_hidden_ssid {
2835b874ddecSLior David 	WMI_HIDDEN_SSID_DISABLED	= 0x00,
2836b874ddecSLior David 	WMI_HIDDEN_SSID_SEND_EMPTY	= 0x10,
2837b874ddecSLior David 	WMI_HIDDEN_SSID_CLEAR		= 0xFE,
2838b874ddecSLior David };
2839b874ddecSLior David 
284010d599adSMaya Erez /* WMI_LED_CFG_CMDID
284110d599adSMaya Erez  *
284210d599adSMaya Erez  * Configure LED On\Off\Blinking operation
284310d599adSMaya Erez  *
284410d599adSMaya Erez  * Returned events:
284510d599adSMaya Erez  * - WMI_LED_CFG_DONE_EVENTID
284610d599adSMaya Erez  */
284710d599adSMaya Erez enum led_mode {
284810d599adSMaya Erez 	LED_DISABLE	= 0x00,
284910d599adSMaya Erez 	LED_ENABLE	= 0x01,
285010d599adSMaya Erez };
285110d599adSMaya Erez 
285210d599adSMaya Erez /* The names of the led as
285310d599adSMaya Erez  * described on HW schemes.
285410d599adSMaya Erez  */
285510d599adSMaya Erez enum wmi_led_id {
285610d599adSMaya Erez 	WMI_LED_WLAN	= 0x00,
285710d599adSMaya Erez 	WMI_LED_WPAN	= 0x01,
285810d599adSMaya Erez 	WMI_LED_WWAN	= 0x02,
285910d599adSMaya Erez };
286010d599adSMaya Erez 
286110d599adSMaya Erez /* Led polarity mode. */
286210d599adSMaya Erez enum wmi_led_polarity {
286310d599adSMaya Erez 	LED_POLARITY_HIGH_ACTIVE	= 0x00,
286410d599adSMaya Erez 	LED_POLARITY_LOW_ACTIVE		= 0x01,
286510d599adSMaya Erez };
286610d599adSMaya Erez 
286710d599adSMaya Erez /* Combination of on and off
286810d599adSMaya Erez  * creates the blinking period
286910d599adSMaya Erez  */
287010d599adSMaya Erez struct wmi_led_blink_mode {
287110d599adSMaya Erez 	__le32 blink_on;
287210d599adSMaya Erez 	__le32 blink_off;
287310d599adSMaya Erez } __packed;
287410d599adSMaya Erez 
287510d599adSMaya Erez /* WMI_LED_CFG_CMDID */
287610d599adSMaya Erez struct wmi_led_cfg_cmd {
287710d599adSMaya Erez 	/* enum led_mode_e */
287810d599adSMaya Erez 	u8 led_mode;
287910d599adSMaya Erez 	/* enum wmi_led_id_e */
288010d599adSMaya Erez 	u8 id;
288110d599adSMaya Erez 	/* slow speed blinking combination */
288210d599adSMaya Erez 	struct wmi_led_blink_mode slow_blink_cfg;
288310d599adSMaya Erez 	/* medium speed blinking combination */
288410d599adSMaya Erez 	struct wmi_led_blink_mode medium_blink_cfg;
288510d599adSMaya Erez 	/* high speed blinking combination */
288610d599adSMaya Erez 	struct wmi_led_blink_mode fast_blink_cfg;
288710d599adSMaya Erez 	/* polarity of the led */
288810d599adSMaya Erez 	u8 led_polarity;
288910d599adSMaya Erez 	/* reserved */
289010d599adSMaya Erez 	u8 reserved;
289110d599adSMaya Erez } __packed;
289210d599adSMaya Erez 
2893761f8e4dSLazar Alexei /* \WMI_SET_CONNECT_SNR_THR_CMDID */
2894761f8e4dSLazar Alexei struct wmi_set_connect_snr_thr_cmd {
2895761f8e4dSLazar Alexei 	u8 enable;
2896761f8e4dSLazar Alexei 	u8 reserved;
2897761f8e4dSLazar Alexei 	/* 1/4 Db units */
2898761f8e4dSLazar Alexei 	__le16 omni_snr_thr;
2899761f8e4dSLazar Alexei 	/* 1/4 Db units */
2900761f8e4dSLazar Alexei 	__le16 direct_snr_thr;
2901761f8e4dSLazar Alexei } __packed;
2902761f8e4dSLazar Alexei 
290310d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */
290410d599adSMaya Erez struct wmi_led_cfg_done_event {
290510d599adSMaya Erez 	/* led config status */
290610d599adSMaya Erez 	__le32 status;
290710d599adSMaya Erez } __packed;
290810d599adSMaya Erez 
29090163b031SMaya Erez /* Rate search parameters configuration per connection */
29100163b031SMaya Erez struct wmi_rs_cfg {
29110163b031SMaya Erez 	/* The maximal allowed PER for each MCS
29120163b031SMaya Erez 	 * MCS will be considered as failed if PER during RS is higher
29130163b031SMaya Erez 	 */
29140163b031SMaya Erez 	u8 per_threshold[WMI_NUM_MCS];
29150163b031SMaya Erez 	/* Number of MPDUs for each MCS
29160163b031SMaya Erez 	 * this is the minimal statistic required to make an educated
29170163b031SMaya Erez 	 * decision
29180163b031SMaya Erez 	 */
29190163b031SMaya Erez 	u8 min_frame_cnt[WMI_NUM_MCS];
29200163b031SMaya Erez 	/* stop threshold [0-100] */
29210163b031SMaya Erez 	u8 stop_th;
29220163b031SMaya Erez 	/* MCS1 stop threshold [0-100] */
29230163b031SMaya Erez 	u8 mcs1_fail_th;
29240163b031SMaya Erez 	u8 max_back_failure_th;
29250163b031SMaya Erez 	/* Debug feature for disabling internal RS trigger (which is
29260163b031SMaya Erez 	 * currently triggered by BF Done)
29270163b031SMaya Erez 	 */
29280163b031SMaya Erez 	u8 dbg_disable_internal_trigger;
29290163b031SMaya Erez 	__le32 back_failure_mask;
29300163b031SMaya Erez 	__le32 mcs_en_vec;
29310163b031SMaya Erez } __packed;
29320163b031SMaya Erez 
2933b5aeff16SDedy Lansky enum wmi_edmg_tx_mode {
2934b5aeff16SDedy Lansky 	WMI_TX_MODE_DMG			= 0x0,
2935b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1		= 0x1,
2936b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2		= 0x2,
2937b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB1_LONG_LDPC	= 0x3,
2938b5aeff16SDedy Lansky 	WMI_TX_MODE_EDMG_CB2_LONG_LDPC	= 0x4,
2939b5aeff16SDedy Lansky 	WMI_TX_MODE_MAX,
2940b5aeff16SDedy Lansky };
2941b5aeff16SDedy Lansky 
2942b5aeff16SDedy Lansky /* Rate search parameters common configuration */
2943b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_common {
2944b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2945b5aeff16SDedy Lansky 	u8 mode;
2946b5aeff16SDedy Lansky 	/* stop threshold [0-100] */
2947b5aeff16SDedy Lansky 	u8 stop_th;
2948b5aeff16SDedy Lansky 	/* MCS1 stop threshold [0-100] */
2949b5aeff16SDedy Lansky 	u8 mcs1_fail_th;
2950b5aeff16SDedy Lansky 	u8 max_back_failure_th;
2951b5aeff16SDedy Lansky 	/* Debug feature for disabling internal RS trigger (which is
2952b5aeff16SDedy Lansky 	 * currently triggered by BF Done)
2953b5aeff16SDedy Lansky 	 */
2954b5aeff16SDedy Lansky 	u8 dbg_disable_internal_trigger;
2955b5aeff16SDedy Lansky 	u8 reserved[3];
2956b5aeff16SDedy Lansky 	__le32 back_failure_mask;
2957b5aeff16SDedy Lansky } __packed;
2958b5aeff16SDedy Lansky 
2959b5aeff16SDedy Lansky /* Rate search parameters configuration per MCS */
2960b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_mcs {
2961b5aeff16SDedy Lansky 	/* The maximal allowed PER for each MCS
2962b5aeff16SDedy Lansky 	 * MCS will be considered as failed if PER during RS is higher
2963b5aeff16SDedy Lansky 	 */
2964b5aeff16SDedy Lansky 	u8 per_threshold;
2965b5aeff16SDedy Lansky 	/* Number of MPDUs for each MCS
2966b5aeff16SDedy Lansky 	 * this is the minimal statistic required to make an educated
2967b5aeff16SDedy Lansky 	 * decision
2968b5aeff16SDedy Lansky 	 */
2969b5aeff16SDedy Lansky 	u8 min_frame_cnt;
2970b5aeff16SDedy Lansky 	u8 reserved[2];
2971b5aeff16SDedy Lansky } __packed;
2972b5aeff16SDedy Lansky 
2973b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_CMDID */
2974b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_cmd {
2975b5aeff16SDedy Lansky 	/* Configuration for all MCSs */
2976b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_common common_cfg;
2977b5aeff16SDedy Lansky 	u8 each_mcs_cfg_size;
2978b5aeff16SDedy Lansky 	u8 reserved[3];
2979b5aeff16SDedy Lansky 	/* Configuration for each MCS */
2980b5aeff16SDedy Lansky 	struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0];
2981b5aeff16SDedy Lansky } __packed;
2982b5aeff16SDedy Lansky 
2983b5aeff16SDedy Lansky /* WMI_RS_CFG_EX_EVENTID */
2984b5aeff16SDedy Lansky struct wmi_rs_cfg_ex_event {
2985b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
2986b5aeff16SDedy Lansky 	u8 mode;
2987b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
2988b5aeff16SDedy Lansky 	u8 status;
2989b5aeff16SDedy Lansky 	u8 reserved[2];
2990b5aeff16SDedy Lansky } __packed;
2991b5aeff16SDedy Lansky 
2992b5aeff16SDedy Lansky /* WMI_RS_ENABLE_CMDID */
2993b5aeff16SDedy Lansky struct wmi_rs_enable_cmd {
2994b5aeff16SDedy Lansky 	u8 cid;
2995b5aeff16SDedy Lansky 	/* enable or disable rate search */
2996b5aeff16SDedy Lansky 	u8 rs_enable;
2997b5aeff16SDedy Lansky 	u8 reserved[2];
2998b5aeff16SDedy Lansky 	__le32 mcs_en_vec;
2999b5aeff16SDedy Lansky } __packed;
3000b5aeff16SDedy Lansky 
3001b5aeff16SDedy Lansky /* WMI_RS_ENABLE_EVENTID */
3002b5aeff16SDedy Lansky struct wmi_rs_enable_event {
3003b5aeff16SDedy Lansky 	/* enum wmi_fw_status */
3004b5aeff16SDedy Lansky 	u8 status;
3005b5aeff16SDedy Lansky 	u8 reserved[3];
3006b5aeff16SDedy Lansky } __packed;
3007b5aeff16SDedy Lansky 
3008761f8e4dSLazar Alexei /* Slot types */
3009761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_type {
3010761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_SP		= 0x0,
3011761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_CBAP		= 0x1,
3012761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_IDLE		= 0x2,
3013761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_ANNOUNCE_NO_ACK	= 0x3,
3014761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_DISCOVERY	= 0x4,
3015761f8e4dSLazar Alexei };
3016761f8e4dSLazar Alexei 
3017761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_flags {
3018761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_SLOT_PERIODIC	= 0x1,
3019761f8e4dSLazar Alexei };
3020761f8e4dSLazar Alexei 
3021761f8e4dSLazar Alexei struct wmi_sched_scheme_slot {
3022761f8e4dSLazar Alexei 	/* in microsecond */
3023761f8e4dSLazar Alexei 	__le32 tbtt_offset;
3024761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_flags */
3025761f8e4dSLazar Alexei 	u8 flags;
3026761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_type */
3027761f8e4dSLazar Alexei 	u8 type;
3028761f8e4dSLazar Alexei 	/* in microsecond */
3029761f8e4dSLazar Alexei 	__le16 duration;
3030761f8e4dSLazar Alexei 	/* frame_exchange_sequence_duration */
3031761f8e4dSLazar Alexei 	__le16 tx_op;
3032761f8e4dSLazar Alexei 	/* time in microseconds between two consecutive slots
3033761f8e4dSLazar Alexei 	 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3034761f8e4dSLazar Alexei 	 */
3035761f8e4dSLazar Alexei 	__le16 period;
3036761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3037761f8e4dSLazar Alexei 	 * number of times to repeat allocation
3038761f8e4dSLazar Alexei 	 */
3039761f8e4dSLazar Alexei 	u8 num_of_blocks;
3040761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3041761f8e4dSLazar Alexei 	 * every idle_period allocation will be idle
3042761f8e4dSLazar Alexei 	 */
3043761f8e4dSLazar Alexei 	u8 idle_period;
3044761f8e4dSLazar Alexei 	u8 src_aid;
3045761f8e4dSLazar Alexei 	u8 dest_aid;
3046761f8e4dSLazar Alexei 	__le32 reserved;
3047761f8e4dSLazar Alexei } __packed;
3048761f8e4dSLazar Alexei 
3049761f8e4dSLazar Alexei enum wmi_sched_scheme_flags {
3050761f8e4dSLazar Alexei 	/* should not be set when clearing scheduling scheme */
3051761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_ENABLE		= 0x01,
3052761f8e4dSLazar Alexei 	WMI_SCHED_PROTECTED_SP		= 0x02,
3053761f8e4dSLazar Alexei 	/* should be set only on first WMI fragment of scheme */
3054761f8e4dSLazar Alexei 	WMI_SCHED_FIRST			= 0x04,
3055761f8e4dSLazar Alexei 	/* should be set only on last WMI fragment of scheme */
3056761f8e4dSLazar Alexei 	WMI_SCHED_LAST			= 0x08,
3057761f8e4dSLazar Alexei 	WMI_SCHED_IMMEDIATE_START	= 0x10,
3058761f8e4dSLazar Alexei };
3059761f8e4dSLazar Alexei 
3060761f8e4dSLazar Alexei enum wmi_sched_scheme_advertisment {
3061761f8e4dSLazar Alexei 	/* ESE is not advertised at all, STA has to be configured with WMI
3062761f8e4dSLazar Alexei 	 * also
3063761f8e4dSLazar Alexei 	 */
3064761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_DISABLED		= 0x0,
3065761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_BEACON		= 0x1,
3066761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME	= 0x2,
3067761f8e4dSLazar Alexei };
3068761f8e4dSLazar Alexei 
3069761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_CMD */
3070761f8e4dSLazar Alexei struct wmi_scheduling_scheme_cmd {
3071761f8e4dSLazar Alexei 	u8 serial_num;
3072761f8e4dSLazar Alexei 	/* wmi_sched_scheme_advertisment */
3073761f8e4dSLazar Alexei 	u8 ese_advertisment;
3074761f8e4dSLazar Alexei 	/* wmi_sched_scheme_flags */
3075761f8e4dSLazar Alexei 	__le16 flags;
3076761f8e4dSLazar Alexei 	u8 num_allocs;
3077761f8e4dSLazar Alexei 	u8 reserved[3];
3078761f8e4dSLazar Alexei 	__le64 start_tbtt;
3079761f8e4dSLazar Alexei 	/* allocations list */
3080761f8e4dSLazar Alexei 	struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
3081761f8e4dSLazar Alexei } __packed;
3082761f8e4dSLazar Alexei 
3083761f8e4dSLazar Alexei enum wmi_sched_scheme_failure_type {
3084761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_NO_ERROR		= 0x00,
3085761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR	= 0x01,
3086761f8e4dSLazar Alexei };
3087761f8e4dSLazar Alexei 
3088761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_EVENTID */
3089761f8e4dSLazar Alexei struct wmi_scheduling_scheme_event {
3090761f8e4dSLazar Alexei 	/* wmi_fw_status_e */
3091761f8e4dSLazar Alexei 	u8 status;
3092761f8e4dSLazar Alexei 	/* serial number given in command */
3093761f8e4dSLazar Alexei 	u8 serial_num;
3094761f8e4dSLazar Alexei 	/* wmi_sched_scheme_failure_type */
3095761f8e4dSLazar Alexei 	u8 failure_type;
3096761f8e4dSLazar Alexei 	/* alignment to 32b */
3097761f8e4dSLazar Alexei 	u8 reserved[1];
3098761f8e4dSLazar Alexei } __packed;
3099761f8e4dSLazar Alexei 
3100b5aeff16SDedy Lansky /* WMI_RS_CFG_CMDID - deprecated */
31010163b031SMaya Erez struct wmi_rs_cfg_cmd {
31020163b031SMaya Erez 	/* connection id */
31030163b031SMaya Erez 	u8 cid;
31040163b031SMaya Erez 	/* enable or disable rate search */
31050163b031SMaya Erez 	u8 rs_enable;
31060163b031SMaya Erez 	/* rate search configuration */
31070163b031SMaya Erez 	struct wmi_rs_cfg rs_cfg;
31080163b031SMaya Erez } __packed;
31090163b031SMaya Erez 
3110b5aeff16SDedy Lansky /* WMI_RS_CFG_DONE_EVENTID - deprecated */
31110163b031SMaya Erez struct wmi_rs_cfg_done_event {
31120163b031SMaya Erez 	u8 cid;
31130163b031SMaya Erez 	/* enum wmi_fw_status */
31140163b031SMaya Erez 	u8 status;
31150163b031SMaya Erez 	u8 reserved[2];
31160163b031SMaya Erez } __packed;
31170163b031SMaya Erez 
3118b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */
311908989f96SLior David struct wmi_get_detailed_rs_res_cmd {
312008989f96SLior David 	/* connection id */
312108989f96SLior David 	u8 cid;
312208989f96SLior David 	u8 reserved[3];
312308989f96SLior David } __packed;
312408989f96SLior David 
312508989f96SLior David /* RS results status */
312608989f96SLior David enum wmi_rs_results_status {
312708989f96SLior David 	WMI_RS_RES_VALID	= 0x00,
312808989f96SLior David 	WMI_RS_RES_INVALID	= 0x01,
312908989f96SLior David };
313008989f96SLior David 
313108989f96SLior David /* Rate search results */
313208989f96SLior David struct wmi_rs_results {
313308989f96SLior David 	/* number of sent MPDUs */
313408989f96SLior David 	u8 num_of_tx_pkt[WMI_NUM_MCS];
313508989f96SLior David 	/* number of non-acked MPDUs */
313608989f96SLior David 	u8 num_of_non_acked_pkt[WMI_NUM_MCS];
313708989f96SLior David 	/* RS timestamp */
313808989f96SLior David 	__le32 tsf;
313908989f96SLior David 	/* RS selected MCS */
314008989f96SLior David 	u8 mcs;
314108989f96SLior David } __packed;
314208989f96SLior David 
3143b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */
314408989f96SLior David struct wmi_get_detailed_rs_res_event {
314508989f96SLior David 	u8 cid;
314608989f96SLior David 	/* enum wmi_rs_results_status */
314708989f96SLior David 	u8 status;
314808989f96SLior David 	/* detailed rs results */
314908989f96SLior David 	struct wmi_rs_results rs_results;
315008989f96SLior David 	u8 reserved[3];
315108989f96SLior David } __packed;
315208989f96SLior David 
3153b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_CMDID */
3154b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_cmd {
3155b5aeff16SDedy Lansky 	u8 cid;
3156b5aeff16SDedy Lansky 	u8 reserved[3];
3157b5aeff16SDedy Lansky } __packed;
3158b5aeff16SDedy Lansky 
3159b5aeff16SDedy Lansky /* Rate search results */
3160b5aeff16SDedy Lansky struct wmi_rs_results_ex_common {
3161b5aeff16SDedy Lansky 	/* RS timestamp */
3162b5aeff16SDedy Lansky 	__le32 tsf;
3163b5aeff16SDedy Lansky 	/* RS selected MCS */
3164b5aeff16SDedy Lansky 	u8 mcs;
3165b5aeff16SDedy Lansky 	/* enum wmi_edmg_tx_mode */
3166b5aeff16SDedy Lansky 	u8 mode;
3167b5aeff16SDedy Lansky 	u8 reserved[2];
3168b5aeff16SDedy Lansky } __packed;
3169b5aeff16SDedy Lansky 
3170b5aeff16SDedy Lansky /* Rate search results */
3171b5aeff16SDedy Lansky struct wmi_rs_results_ex_mcs {
3172b5aeff16SDedy Lansky 	/* number of sent MPDUs */
3173b5aeff16SDedy Lansky 	u8 num_of_tx_pkt;
3174b5aeff16SDedy Lansky 	/* number of non-acked MPDUs */
3175b5aeff16SDedy Lansky 	u8 num_of_non_acked_pkt;
3176b5aeff16SDedy Lansky 	u8 reserved[2];
3177b5aeff16SDedy Lansky } __packed;
3178b5aeff16SDedy Lansky 
3179b5aeff16SDedy Lansky /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */
3180b5aeff16SDedy Lansky struct wmi_get_detailed_rs_res_ex_event {
3181b5aeff16SDedy Lansky 	u8 cid;
3182b5aeff16SDedy Lansky 	/* enum wmi_rs_results_status */
3183b5aeff16SDedy Lansky 	u8 status;
3184b5aeff16SDedy Lansky 	u8 reserved0[2];
3185b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_common common_rs_results;
3186b5aeff16SDedy Lansky 	u8 each_mcs_results_size;
3187b5aeff16SDedy Lansky 	u8 reserved1[3];
3188b5aeff16SDedy Lansky 	/* Results for each MCS */
3189b5aeff16SDedy Lansky 	struct wmi_rs_results_ex_mcs each_mcs_results[0];
3190b5aeff16SDedy Lansky } __packed;
3191b5aeff16SDedy Lansky 
3192a52fb913SLior David /* BRP antenna limit mode */
3193a52fb913SLior David enum wmi_brp_ant_limit_mode {
3194a52fb913SLior David 	/* Disable BRP force antenna limit */
3195a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_DISABLE		= 0x00,
3196a52fb913SLior David 	/* Define maximal antennas limit. Only effective antennas will be
3197a52fb913SLior David 	 * actually used
3198a52fb913SLior David 	 */
3199a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE	= 0x01,
3200a52fb913SLior David 	/* Force a specific number of antennas */
3201a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_FORCE		= 0x02,
3202a52fb913SLior David 	/* number of BRP antenna limit modes */
3203a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODES_NUM		= 0x03,
3204a52fb913SLior David };
3205a52fb913SLior David 
3206a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */
3207a52fb913SLior David struct wmi_brp_set_ant_limit_cmd {
3208a52fb913SLior David 	/* connection id */
3209a52fb913SLior David 	u8 cid;
3210a52fb913SLior David 	/* enum wmi_brp_ant_limit_mode */
3211a52fb913SLior David 	u8 limit_mode;
3212a52fb913SLior David 	/* antenna limit count, 1-27
3213a52fb913SLior David 	 * disable_mode - ignored
3214a52fb913SLior David 	 * effective_mode - upper limit to number of antennas to be used
3215a52fb913SLior David 	 * force_mode - exact number of antennas to be used
3216a52fb913SLior David 	 */
3217a52fb913SLior David 	u8 ant_limit;
3218a52fb913SLior David 	u8 reserved;
3219a52fb913SLior David } __packed;
3220a52fb913SLior David 
3221a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
3222a52fb913SLior David struct wmi_brp_set_ant_limit_event {
3223a52fb913SLior David 	/* wmi_fw_status */
3224a52fb913SLior David 	u8 status;
3225a52fb913SLior David 	u8 reserved[3];
3226a52fb913SLior David } __packed;
3227a52fb913SLior David 
322873a7d1e3SAlexei Avshalom Lazar enum wmi_bf_type {
322973a7d1e3SAlexei Avshalom Lazar 	WMI_BF_TYPE_SLS		= 0x00,
323073a7d1e3SAlexei Avshalom Lazar 	WMI_BF_TYPE_BRP_RX	= 0x01,
323173a7d1e3SAlexei Avshalom Lazar };
323273a7d1e3SAlexei Avshalom Lazar 
323373a7d1e3SAlexei Avshalom Lazar /* WMI_BF_TRIG_CMDID */
323473a7d1e3SAlexei Avshalom Lazar struct wmi_bf_trig_cmd {
323573a7d1e3SAlexei Avshalom Lazar 	/* enum wmi_bf_type - type of requested beamforming */
323673a7d1e3SAlexei Avshalom Lazar 	u8 bf_type;
323773a7d1e3SAlexei Avshalom Lazar 	/* used only for WMI_BF_TYPE_BRP_RX */
323873a7d1e3SAlexei Avshalom Lazar 	u8 cid;
323973a7d1e3SAlexei Avshalom Lazar 	/* used only for WMI_BF_TYPE_SLS */
324073a7d1e3SAlexei Avshalom Lazar 	u8 dst_mac[WMI_MAC_LEN];
324173a7d1e3SAlexei Avshalom Lazar 	u8 reserved[4];
324273a7d1e3SAlexei Avshalom Lazar } __packed;
324373a7d1e3SAlexei Avshalom Lazar 
324473a7d1e3SAlexei Avshalom Lazar /* WMI_BF_TRIG_EVENTID */
324573a7d1e3SAlexei Avshalom Lazar struct wmi_bf_trig_event {
324673a7d1e3SAlexei Avshalom Lazar 	/* enum wmi_fw_status */
324773a7d1e3SAlexei Avshalom Lazar 	u8 status;
324873a7d1e3SAlexei Avshalom Lazar 	u8 cid;
324973a7d1e3SAlexei Avshalom Lazar 	u8 reserved[2];
325073a7d1e3SAlexei Avshalom Lazar } __packed;
325173a7d1e3SAlexei Avshalom Lazar 
32520163b031SMaya Erez /* broadcast connection ID */
32530163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST	(0xFFFFFFFF)
32540163b031SMaya Erez 
32550163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
32560163b031SMaya Erez enum wmi_link_maintain_cfg_type {
32570163b031SMaya Erez 	/* AP/PCP default normal (non-FST) configuration settings */
32580163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP	= 0x00,
32590163b031SMaya Erez 	/* AP/PCP  default FST configuration settings */
32600163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP	= 0x01,
32610163b031SMaya Erez 	/* STA default normal (non-FST) configuration settings */
32620163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA	= 0x02,
32630163b031SMaya Erez 	/* STA default FST configuration settings */
32640163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA	= 0x03,
32650163b031SMaya Erez 	/* custom configuration settings */
32660163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM		= 0x04,
32670163b031SMaya Erez 	/* number of defined configuration types */
32680163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPES_NUM			= 0x05,
32690163b031SMaya Erez };
32700163b031SMaya Erez 
32710163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
32720163b031SMaya Erez enum wmi_link_maintain_cfg_response_status {
32730163b031SMaya Erez 	/* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
32740163b031SMaya Erez 	 */
32750163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK		= 0x00,
32760163b031SMaya Erez 	/* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
32770163b031SMaya Erez 	 * command request
32780163b031SMaya Erez 	 */
32790163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT	= 0x01,
32800163b031SMaya Erez };
32810163b031SMaya Erez 
32820163b031SMaya Erez /* Link Loss and Keep Alive configuration */
32830163b031SMaya Erez struct wmi_link_maintain_cfg {
32840163b031SMaya Erez 	/* link_loss_enable_detectors_vec */
32850163b031SMaya Erez 	__le32 link_loss_enable_detectors_vec;
32860163b031SMaya Erez 	/* detectors check period usec */
32870163b031SMaya Erez 	__le32 check_link_loss_period_usec;
32880163b031SMaya Erez 	/* max allowed tx ageing */
32890163b031SMaya Erez 	__le32 tx_ageing_threshold_usec;
32900163b031SMaya Erez 	/* keep alive period for high SNR */
32910163b031SMaya Erez 	__le32 keep_alive_period_usec_high_snr;
32920163b031SMaya Erez 	/* keep alive period for low SNR */
32930163b031SMaya Erez 	__le32 keep_alive_period_usec_low_snr;
32940163b031SMaya Erez 	/* lower snr limit for keep alive period update */
32950163b031SMaya Erez 	__le32 keep_alive_snr_threshold_low_db;
32960163b031SMaya Erez 	/* upper snr limit for keep alive period update */
32970163b031SMaya Erez 	__le32 keep_alive_snr_threshold_high_db;
32980163b031SMaya Erez 	/* num of successive bad bcons causing link-loss */
32990163b031SMaya Erez 	__le32 bad_beacons_num_threshold;
33000163b031SMaya Erez 	/* SNR limit for bad_beacons_detector */
33010163b031SMaya Erez 	__le32 bad_beacons_snr_threshold_db;
33028a4fa214SAhmad Masri 	/* timeout for disassoc response frame in uSec */
33038a4fa214SAhmad Masri 	__le32 disconnect_timeout;
33040163b031SMaya Erez } __packed;
33050163b031SMaya Erez 
33060163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
33070163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd {
33080163b031SMaya Erez 	/* enum wmi_link_maintain_cfg_type_e - type of requested default
33090163b031SMaya Erez 	 * configuration to be applied
33100163b031SMaya Erez 	 */
33110163b031SMaya Erez 	__le32 cfg_type;
33120163b031SMaya Erez 	/* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
33130163b031SMaya Erez 	__le32 cid;
33140163b031SMaya Erez 	/* custom configuration settings to be applied (relevant only if
33150163b031SMaya Erez 	 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
33160163b031SMaya Erez 	 */
33170163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
33180163b031SMaya Erez } __packed;
33190163b031SMaya Erez 
33200163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
33210163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd {
33220163b031SMaya Erez 	/* connection ID which configuration settings are requested */
33230163b031SMaya Erez 	__le32 cid;
33240163b031SMaya Erez } __packed;
33250163b031SMaya Erez 
33260163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
33270163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event {
33280163b031SMaya Erez 	/* requested connection ID */
33290163b031SMaya Erez 	__le32 cid;
33300163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - write status */
33310163b031SMaya Erez 	__le32 status;
33320163b031SMaya Erez } __packed;
33330163b031SMaya Erez 
33340163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
33350163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event {
33360163b031SMaya Erez 	/* requested connection ID */
33370163b031SMaya Erez 	__le32 cid;
33380163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - read status */
33390163b031SMaya Erez 	__le32 status;
33400163b031SMaya Erez 	/* Retrieved configuration settings */
33410163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
33420163b031SMaya Erez } __packed;
33430163b031SMaya Erez 
3344fe9ee51eSMaya Erez enum wmi_traffic_suspend_status {
3345fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_APPROVED			= 0x0,
33466804cd10SLazar Alexei 	WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE	= 0x1,
334773a7d1e3SAlexei Avshalom Lazar 	WMI_TRAFFIC_SUSPEND_REJECTED_DISCONNECT		= 0x2,
334873a7d1e3SAlexei Avshalom Lazar 	WMI_TRAFFIC_SUSPEND_REJECTED_OTHER		= 0x3,
33490163b031SMaya Erez };
33500163b031SMaya Erez 
3351fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */
3352fe9ee51eSMaya Erez struct wmi_traffic_suspend_event {
3353fe9ee51eSMaya Erez 	/* enum wmi_traffic_suspend_status_e */
33540163b031SMaya Erez 	u8 status;
33550163b031SMaya Erez } __packed;
33560163b031SMaya Erez 
33570163b031SMaya Erez enum wmi_traffic_resume_status {
33580163b031SMaya Erez 	WMI_TRAFFIC_RESUME_SUCCESS	= 0x0,
33590163b031SMaya Erez 	WMI_TRAFFIC_RESUME_FAILED	= 0x1,
33600163b031SMaya Erez };
33610163b031SMaya Erez 
33626804cd10SLazar Alexei enum wmi_resume_trigger {
33636804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UNKNOWN	= 0x0,
33646804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_HOST		= 0x1,
33656804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_UCAST_RX	= 0x2,
33666804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_BCAST_RX	= 0x4,
33676804cd10SLazar Alexei 	WMI_RESUME_TRIGGER_WMI_EVT	= 0x8,
336873a7d1e3SAlexei Avshalom Lazar 	WMI_RESUME_TRIGGER_DISCONNECT	= 0x10,
33696804cd10SLazar Alexei };
33706804cd10SLazar Alexei 
33710163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */
33720163b031SMaya Erez struct wmi_traffic_resume_event {
33736804cd10SLazar Alexei 	/* enum wmi_traffic_resume_status */
33740163b031SMaya Erez 	u8 status;
33756804cd10SLazar Alexei 	u8 reserved[3];
33766804cd10SLazar Alexei 	/* enum wmi_resume_trigger bitmap */
33776804cd10SLazar Alexei 	__le32 resume_triggers;
33780163b031SMaya Erez } __packed;
33790163b031SMaya Erez 
33800163b031SMaya Erez /* Power Save command completion status codes */
33810163b031SMaya Erez enum wmi_ps_cfg_cmd_status {
33820163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_SUCCESS	= 0x00,
33830163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_BAD_PARAM	= 0x01,
33840163b031SMaya Erez 	/* other error */
33850163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_ERROR	= 0x02,
33860163b031SMaya Erez };
33870163b031SMaya Erez 
33880163b031SMaya Erez /* Device Power Save Profiles */
33890163b031SMaya Erez enum wmi_ps_profile_type {
33900163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_DEFAULT		= 0x00,
33910163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_PS_DISABLED		= 0x01,
33920163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_MAX_PS		= 0x02,
33930163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS	= 0x03,
33940163b031SMaya Erez };
33950163b031SMaya Erez 
3396761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
3397761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_cmd {
3398761f8e4dSLazar Alexei 	/* reserved */
3399761f8e4dSLazar Alexei 	__le32 reserved;
3400761f8e4dSLazar Alexei } __packed;
3401761f8e4dSLazar Alexei 
3402761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
3403761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_event {
3404761f8e4dSLazar Alexei 	/* wmi_ps_profile_type_e */
3405761f8e4dSLazar Alexei 	u8 ps_profile;
3406761f8e4dSLazar Alexei 	u8 reserved[3];
3407761f8e4dSLazar Alexei } __packed;
3408761f8e4dSLazar Alexei 
34090163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID
34100163b031SMaya Erez  *
34110163b031SMaya Erez  * Power save profile to be used by the device
34120163b031SMaya Erez  *
34130163b031SMaya Erez  * Returned event:
34140163b031SMaya Erez  * - WMI_PS_DEV_PROFILE_CFG_EVENTID
34150163b031SMaya Erez  */
34160163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd {
34170163b031SMaya Erez 	/* wmi_ps_profile_type_e */
34180163b031SMaya Erez 	u8 ps_profile;
34190163b031SMaya Erez 	u8 reserved[3];
34200163b031SMaya Erez } __packed;
34210163b031SMaya Erez 
34220163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
34230163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event {
34240163b031SMaya Erez 	/* wmi_ps_cfg_cmd_status_e */
34250163b031SMaya Erez 	__le32 status;
34260163b031SMaya Erez } __packed;
34270163b031SMaya Erez 
34280163b031SMaya Erez enum wmi_ps_level {
34290163b031SMaya Erez 	WMI_PS_LEVEL_DEEP_SLEEP		= 0x00,
34300163b031SMaya Erez 	WMI_PS_LEVEL_SHALLOW_SLEEP	= 0x01,
34310163b031SMaya Erez 	/* awake = all PS mechanisms are disabled */
34320163b031SMaya Erez 	WMI_PS_LEVEL_AWAKE		= 0x02,
34330163b031SMaya Erez };
34340163b031SMaya Erez 
34350163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level {
34360163b031SMaya Erez 	/* 33k */
34370163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC		= 0x00,
34380163b031SMaya Erez 	/* 10k */
34390163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC		= 0x01,
34400163b031SMaya Erez 	/* @RTC Low latency */
34410163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT	= 0x02,
34420163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL	= 0x03,
34430163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK	= 0x04,
34440163b031SMaya Erez 	/* Not Applicable */
34450163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A		= 0xFF,
34460163b031SMaya Erez };
34470163b031SMaya Erez 
34480163b031SMaya Erez /* Response by the FW to a D3 entry request */
34490163b031SMaya Erez enum wmi_ps_d3_resp_policy {
34500163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DEFAULT	= 0x00,
34510163b031SMaya Erez 	/* debug -D3 req is always denied */
34520163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DENIED	= 0x01,
34530163b031SMaya Erez 	/* debug -D3 req is always approved */
34540163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_APPROVED	= 0x02,
34550163b031SMaya Erez };
34560163b031SMaya Erez 
345708989f96SLior David #define WMI_AOA_MAX_DATA_SIZE	(128)
345808989f96SLior David 
345908989f96SLior David enum wmi_aoa_meas_status {
346008989f96SLior David 	WMI_AOA_MEAS_SUCCESS		= 0x00,
346108989f96SLior David 	WMI_AOA_MEAS_PEER_INCAPABLE	= 0x01,
346208989f96SLior David 	WMI_AOA_MEAS_FAILURE		= 0x02,
346308989f96SLior David };
346408989f96SLior David 
346508989f96SLior David /* WMI_AOA_MEAS_EVENTID */
346608989f96SLior David struct wmi_aoa_meas_event {
346708989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
346808989f96SLior David 	/* channels IDs:
346908989f96SLior David 	 * 0 - 58320 MHz
347008989f96SLior David 	 * 1 - 60480 MHz
347108989f96SLior David 	 * 2 - 62640 MHz
347208989f96SLior David 	 */
347308989f96SLior David 	u8 channel;
347408989f96SLior David 	/* enum wmi_aoa_meas_type */
347508989f96SLior David 	u8 aoa_meas_type;
347608989f96SLior David 	/* Measurments are from RFs, defined by the mask */
347708989f96SLior David 	__le32 meas_rf_mask;
347808989f96SLior David 	/* enum wmi_aoa_meas_status */
347908989f96SLior David 	u8 meas_status;
348008989f96SLior David 	u8 reserved;
348108989f96SLior David 	/* Length of meas_data in bytes */
348208989f96SLior David 	__le16 length;
348308989f96SLior David 	u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
348408989f96SLior David } __packed;
348508989f96SLior David 
3486cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
3487cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event {
3488cbf795c1SLior David 	/* enum wmi_fw_status */
3489cbf795c1SLior David 	u8 status;
3490cbf795c1SLior David 	/* alignment to 32b */
3491cbf795c1SLior David 	u8 reserved[3];
3492cbf795c1SLior David } __packed;
3493cbf795c1SLior David 
3494cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
3495cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event {
3496cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
3497cbf795c1SLior David 	u8 mgmt_retry_limit;
3498cbf795c1SLior David 	/* alignment to 32b */
3499cbf795c1SLior David 	u8 reserved[3];
3500cbf795c1SLior David } __packed;
3501cbf795c1SLior David 
350208989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */
350308989f96SLior David struct wmi_tof_get_capabilities_event {
350408989f96SLior David 	u8 ftm_capability;
350508989f96SLior David 	/* maximum supported number of destination to start TOF */
350608989f96SLior David 	u8 max_num_of_dest;
350708989f96SLior David 	/* maximum supported number of measurements per burst */
350808989f96SLior David 	u8 max_num_of_meas_per_burst;
350908989f96SLior David 	u8 reserved;
351008989f96SLior David 	/* maximum supported multi bursts */
351108989f96SLior David 	__le16 max_multi_bursts_sessions;
351208989f96SLior David 	/* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
351308989f96SLior David 	__le16 max_ftm_burst_duration;
351408989f96SLior David 	/* AOA supported types */
351508989f96SLior David 	__le32 aoa_supported_types;
351608989f96SLior David } __packed;
351708989f96SLior David 
351890ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
351990ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event {
352090ffabb0SDedy Lansky 	/* wmi_fw_status */
352190ffabb0SDedy Lansky 	u8 status;
352290ffabb0SDedy Lansky 	u8 reserved[3];
352390ffabb0SDedy Lansky } __packed;
352490ffabb0SDedy Lansky 
352590ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
352690ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event {
352790ffabb0SDedy Lansky 	/* Status data */
352890ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
352990ffabb0SDedy Lansky } __packed;
353090ffabb0SDedy Lansky 
353108989f96SLior David enum wmi_tof_session_end_status {
353208989f96SLior David 	WMI_TOF_SESSION_END_NO_ERROR		= 0x00,
353308989f96SLior David 	WMI_TOF_SESSION_END_FAIL		= 0x01,
353408989f96SLior David 	WMI_TOF_SESSION_END_PARAMS_ERROR	= 0x02,
353508989f96SLior David 	WMI_TOF_SESSION_END_ABORTED		= 0x03,
35368a4fa214SAhmad Masri 	WMI_TOF_SESSION_END_BUSY		= 0x04,
353708989f96SLior David };
353808989f96SLior David 
353908989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */
354008989f96SLior David struct wmi_tof_session_end_event {
354108989f96SLior David 	/* FTM session ID */
354208989f96SLior David 	__le32 session_id;
354308989f96SLior David 	/* wmi_tof_session_end_status_e */
354408989f96SLior David 	u8 status;
354508989f96SLior David 	u8 reserved[3];
354608989f96SLior David } __packed;
354708989f96SLior David 
3548761f8e4dSLazar Alexei /* WMI_TOF_SET_LCI_EVENTID */
3549761f8e4dSLazar Alexei struct wmi_tof_set_lci_event {
3550761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3551761f8e4dSLazar Alexei 	u8 status;
3552761f8e4dSLazar Alexei 	u8 reserved[3];
3553761f8e4dSLazar Alexei } __packed;
3554761f8e4dSLazar Alexei 
3555761f8e4dSLazar Alexei /* WMI_TOF_SET_LCR_EVENTID */
3556761f8e4dSLazar Alexei struct wmi_tof_set_lcr_event {
3557761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3558761f8e4dSLazar Alexei 	u8 status;
3559761f8e4dSLazar Alexei 	u8 reserved[3];
3560761f8e4dSLazar Alexei } __packed;
3561761f8e4dSLazar Alexei 
356208989f96SLior David /* Responder FTM Results */
356308989f96SLior David struct wmi_responder_ftm_res {
356408989f96SLior David 	u8 t1[6];
356508989f96SLior David 	u8 t2[6];
356608989f96SLior David 	u8 t3[6];
356708989f96SLior David 	u8 t4[6];
356808989f96SLior David 	__le16 tod_err;
356908989f96SLior David 	__le16 toa_err;
357008989f96SLior David 	__le16 tod_err_initiator;
357108989f96SLior David 	__le16 toa_err_initiator;
357208989f96SLior David } __packed;
357308989f96SLior David 
357408989f96SLior David enum wmi_tof_ftm_per_dest_res_status {
357508989f96SLior David 	WMI_PER_DEST_RES_NO_ERROR		= 0x00,
357608989f96SLior David 	WMI_PER_DEST_RES_TX_RX_FAIL		= 0x01,
357708989f96SLior David 	WMI_PER_DEST_RES_PARAM_DONT_MATCH	= 0x02,
357808989f96SLior David };
357908989f96SLior David 
358008989f96SLior David enum wmi_tof_ftm_per_dest_res_flags {
358108989f96SLior David 	WMI_PER_DEST_RES_REQ_START		= 0x01,
358208989f96SLior David 	WMI_PER_DEST_RES_BURST_REPORT_END	= 0x02,
358308989f96SLior David 	WMI_PER_DEST_RES_REQ_END		= 0x04,
358408989f96SLior David 	WMI_PER_DEST_RES_PARAM_UPDATE		= 0x08,
358508989f96SLior David };
358608989f96SLior David 
358708989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
358808989f96SLior David struct wmi_tof_ftm_per_dest_res_event {
358908989f96SLior David 	/* FTM session ID */
359008989f96SLior David 	__le32 session_id;
359108989f96SLior David 	/* destination MAC address */
359208989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
359308989f96SLior David 	/* wmi_tof_ftm_per_dest_res_flags_e */
359408989f96SLior David 	u8 flags;
359508989f96SLior David 	/* wmi_tof_ftm_per_dest_res_status_e */
359608989f96SLior David 	u8 status;
359708989f96SLior David 	/* responder ASAP */
359808989f96SLior David 	u8 responder_asap;
359908989f96SLior David 	/* responder number of FTM per burst */
360008989f96SLior David 	u8 responder_num_ftm_per_burst;
360108989f96SLior David 	/* responder number of FTM burst exponent */
360208989f96SLior David 	u8 responder_num_ftm_bursts_exp;
360308989f96SLior David 	/* responder burst duration ,wmi_tof_burst_duration_e */
360408989f96SLior David 	u8 responder_burst_duration;
360508989f96SLior David 	/* responder burst period, indicate interval between two consecutive
360608989f96SLior David 	 * burst instances, in units of 100 ms
360708989f96SLior David 	 */
360808989f96SLior David 	__le16 responder_burst_period;
360908989f96SLior David 	/* receive burst counter */
361008989f96SLior David 	__le16 bursts_cnt;
361108989f96SLior David 	/* tsf of responder start burst */
361208989f96SLior David 	__le32 tsf_sync;
361308989f96SLior David 	/* actual received ftm per burst */
361408989f96SLior David 	u8 actual_ftm_per_burst;
3615761f8e4dSLazar Alexei 	/* Measurments are from RFs, defined by the mask */
3616761f8e4dSLazar Alexei 	__le32 meas_rf_mask;
3617761f8e4dSLazar Alexei 	u8 reserved0[3];
361808989f96SLior David 	struct wmi_responder_ftm_res responder_ftm_res[0];
361908989f96SLior David } __packed;
362008989f96SLior David 
3621761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_EVENTID */
3622761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_event {
3623761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
3624761f8e4dSLazar Alexei 	u8 status;
3625761f8e4dSLazar Alexei 	u8 reserved[3];
3626761f8e4dSLazar Alexei } __packed;
3627761f8e4dSLazar Alexei 
362808989f96SLior David enum wmi_tof_channel_info_type {
362908989f96SLior David 	WMI_TOF_CHANNEL_INFO_AOA		= 0x00,
363008989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCI		= 0x01,
363108989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCR		= 0x02,
363208989f96SLior David 	WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC	= 0x03,
363308989f96SLior David 	WMI_TOF_CHANNEL_INFO_CIR		= 0x04,
363408989f96SLior David 	WMI_TOF_CHANNEL_INFO_RSSI		= 0x05,
363508989f96SLior David 	WMI_TOF_CHANNEL_INFO_SNR		= 0x06,
363608989f96SLior David 	WMI_TOF_CHANNEL_INFO_DEBUG		= 0x07,
363708989f96SLior David };
363808989f96SLior David 
363908989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */
364008989f96SLior David struct wmi_tof_channel_info_event {
364108989f96SLior David 	/* FTM session ID */
364208989f96SLior David 	__le32 session_id;
364308989f96SLior David 	/* destination MAC address */
364408989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
364508989f96SLior David 	/* wmi_tof_channel_info_type_e */
364608989f96SLior David 	u8 type;
364708989f96SLior David 	/* data report length */
364808989f96SLior David 	u8 len;
364908989f96SLior David 	/* data report payload */
365008989f96SLior David 	u8 report[0];
365108989f96SLior David } __packed;
365208989f96SLior David 
36538ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
36548ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event {
36558ae5d62cSLior David 	/* enum wmi_fw_status */
36568ae5d62cSLior David 	u8 status;
36578ae5d62cSLior David 	u8 reserved[3];
36588ae5d62cSLior David } __packed;
36598ae5d62cSLior David 
36608ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
36618ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event {
36628ae5d62cSLior David 	/* enum wmi_fw_status */
36638ae5d62cSLior David 	u8 status;
3664761f8e4dSLazar Alexei 	/* RF index used to read the offsets */
3665761f8e4dSLazar Alexei 	u8 rf_index;
3666761f8e4dSLazar Alexei 	u8 reserved1[2];
36678ae5d62cSLior David 	/* TX delay offset */
36688ae5d62cSLior David 	__le32 tx_offset;
36698ae5d62cSLior David 	/* RX delay offset */
36708ae5d62cSLior David 	__le32 rx_offset;
3671761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
3672761f8e4dSLazar Alexei 	__le32 precursor;
36738ae5d62cSLior David } __packed;
36748ae5d62cSLior David 
3675cbf795c1SLior David /* Result status codes for WMI commands */
3676cbf795c1SLior David enum wmi_rf_sector_status {
3677cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_SUCCESS			= 0x00,
3678cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR	= 0x01,
3679cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BUSY_ERROR			= 0x02,
3680cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR	= 0x03,
3681cbf795c1SLior David };
3682cbf795c1SLior David 
3683cbf795c1SLior David /* Types of the RF sector (TX,RX) */
3684cbf795c1SLior David enum wmi_rf_sector_type {
3685cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_RX	= 0x00,
3686cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_TX	= 0x01,
3687cbf795c1SLior David };
3688cbf795c1SLior David 
3689cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */
3690cbf795c1SLior David struct wmi_rf_sector_info {
3691cbf795c1SLior David 	/* Phase values for RF Chains[15-0] (2bits per RF chain) */
3692cbf795c1SLior David 	__le32 psh_hi;
3693cbf795c1SLior David 	/* Phase values for RF Chains[31-16] (2bits per RF chain) */
3694cbf795c1SLior David 	__le32 psh_lo;
3695cbf795c1SLior David 	/* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
3696cbf795c1SLior David 	 * index
3697cbf795c1SLior David 	 */
3698cbf795c1SLior David 	__le32 etype0;
3699cbf795c1SLior David 	/* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
3700cbf795c1SLior David 	 * index
3701cbf795c1SLior David 	 */
3702cbf795c1SLior David 	__le32 etype1;
3703cbf795c1SLior David 	/* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
3704cbf795c1SLior David 	 * index
3705cbf795c1SLior David 	 */
3706cbf795c1SLior David 	__le32 etype2;
3707cbf795c1SLior David 	/* D-Type values (3bits each) for 8 Distribution amplifiers + X16
3708cbf795c1SLior David 	 * switch bits
3709cbf795c1SLior David 	 */
3710cbf795c1SLior David 	__le32 dtype_swch_off;
3711cbf795c1SLior David } __packed;
3712cbf795c1SLior David 
3713cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX	(0xFFFF)
3714cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM		(8)
3715cbf795c1SLior David 
3716cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */
3717cbf795c1SLior David struct wmi_get_rf_sector_params_cmd {
3718cbf795c1SLior David 	/* Sector number to be retrieved */
3719cbf795c1SLior David 	__le16 sector_idx;
3720cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3721cbf795c1SLior David 	u8 sector_type;
3722cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3723cbf795c1SLior David 	u8 rf_modules_vec;
3724cbf795c1SLior David } __packed;
3725cbf795c1SLior David 
3726cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
3727cbf795c1SLior David struct wmi_get_rf_sector_params_done_event {
3728cbf795c1SLior David 	/* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
3729cbf795c1SLior David 	 * wmi_rf_sector_status)
3730cbf795c1SLior David 	 */
3731cbf795c1SLior David 	u8 status;
3732cbf795c1SLior David 	/* align next field to U64 boundary */
3733cbf795c1SLior David 	u8 reserved[7];
3734cbf795c1SLior David 	/* TSF timestamp when RF sectors where retrieved */
3735cbf795c1SLior David 	__le64 tsf;
3736cbf795c1SLior David 	/* Content of RF sector retrieved from each RF module */
3737cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3738cbf795c1SLior David } __packed;
3739cbf795c1SLior David 
3740cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */
3741cbf795c1SLior David struct wmi_set_rf_sector_params_cmd {
3742cbf795c1SLior David 	/* Sector number to be retrieved */
3743cbf795c1SLior David 	__le16 sector_idx;
3744cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
3745cbf795c1SLior David 	u8 sector_type;
3746cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3747cbf795c1SLior David 	u8 rf_modules_vec;
3748cbf795c1SLior David 	/* Content of RF sector to be written to each RF module */
3749cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3750cbf795c1SLior David } __packed;
3751cbf795c1SLior David 
3752cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
3753cbf795c1SLior David struct wmi_set_rf_sector_params_done_event {
3754cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
3755cbf795c1SLior David 	 * wmi_rf_sector_status)
3756cbf795c1SLior David 	 */
3757cbf795c1SLior David 	u8 status;
3758cbf795c1SLior David } __packed;
3759cbf795c1SLior David 
3760cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
3761cbf795c1SLior David  * TXSS/BRP for communication with specified CID
3762cbf795c1SLior David  */
3763cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd {
3764cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3765cbf795c1SLior David 	u8 cid;
3766cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3767cbf795c1SLior David 	u8 sector_type;
3768cbf795c1SLior David 	/* align to U32 boundary */
3769cbf795c1SLior David 	u8 reserved[2];
3770cbf795c1SLior David } __packed;
3771cbf795c1SLior David 
3772cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
3773cbf795c1SLior David  * index selected by TXSS/BRP for communication with specified CID
3774cbf795c1SLior David  */
3775cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event {
3776cbf795c1SLior David 	/* Retrieved sector index selected in TXSS (for TX sector request) or
3777cbf795c1SLior David 	 * BRP (for RX sector request)
3778cbf795c1SLior David 	 */
3779cbf795c1SLior David 	__le16 sector_idx;
3780cbf795c1SLior David 	/* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3781cbf795c1SLior David 	 * wmi_rf_sector_status)
3782cbf795c1SLior David 	 */
3783cbf795c1SLior David 	u8 status;
3784cbf795c1SLior David 	/* align next field to U64 boundary */
3785cbf795c1SLior David 	u8 reserved[5];
3786cbf795c1SLior David 	/* TSF timestamp when result was retrieved */
3787cbf795c1SLior David 	__le64 tsf;
3788cbf795c1SLior David } __packed;
3789cbf795c1SLior David 
3790cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
3791cbf795c1SLior David  * communication with specified CID. Assumes that TXSS/BRP is disabled by
3792cbf795c1SLior David  * other command
3793cbf795c1SLior David  */
3794cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd {
3795cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
3796cbf795c1SLior David 	u8 cid;
3797cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3798cbf795c1SLior David 	u8 sector_type;
3799cbf795c1SLior David 	/* Forced sector index */
3800cbf795c1SLior David 	__le16 sector_idx;
3801cbf795c1SLior David } __packed;
3802cbf795c1SLior David 
3803cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
3804cbf795c1SLior David  * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
3805cbf795c1SLior David  */
3806cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event {
3807cbf795c1SLior David 	/* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3808cbf795c1SLior David 	 * wmi_rf_sector_status)
3809cbf795c1SLior David 	 */
3810cbf795c1SLior David 	u8 status;
3811cbf795c1SLior David 	/* align to U32 boundary */
3812cbf795c1SLior David 	u8 reserved[3];
3813cbf795c1SLior David } __packed;
3814cbf795c1SLior David 
3815cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
3816cbf795c1SLior David  * modules
3817cbf795c1SLior David  */
3818cbf795c1SLior David struct wmi_set_rf_sector_on_cmd {
3819cbf795c1SLior David 	/* Sector index to be activated */
3820cbf795c1SLior David 	__le16 sector_idx;
3821cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
3822cbf795c1SLior David 	u8 sector_type;
3823cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
3824cbf795c1SLior David 	u8 rf_modules_vec;
3825cbf795c1SLior David } __packed;
3826cbf795c1SLior David 
3827cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
3828cbf795c1SLior David  * WMI_SET_RF_SECTOR_ON_CMD
3829cbf795c1SLior David  */
3830cbf795c1SLior David struct wmi_set_rf_sector_on_done_event {
3831cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
3832cbf795c1SLior David 	 * wmi_rf_sector_status)
3833cbf795c1SLior David 	 */
3834cbf795c1SLior David 	u8 status;
3835cbf795c1SLior David 	/* align to U32 boundary */
3836cbf795c1SLior David 	u8 reserved[3];
3837cbf795c1SLior David } __packed;
3838cbf795c1SLior David 
38398ae5d62cSLior David enum wmi_sector_sweep_type {
38408ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS		= 0x00,
38418ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_BCON		= 0x01,
38428ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON	= 0x02,
38438ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_NUM		= 0x03,
38448ae5d62cSLior David };
38458ae5d62cSLior David 
38468ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
38478ae5d62cSLior David  *
38488ae5d62cSLior David  * Set the order of TX sectors in TXSS and/or Beacon(AP).
38498ae5d62cSLior David  *
38508ae5d62cSLior David  * Returned event:
38518ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
38528ae5d62cSLior David  */
38538ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd {
38548ae5d62cSLior David 	/* tx sectors order to be applied, 0xFF for end of array */
38558ae5d62cSLior David 	u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
38568ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
38578ae5d62cSLior David 	u8 sector_sweep_type;
38588ae5d62cSLior David 	/* needed only for TXSS configuration */
38598ae5d62cSLior David 	u8 cid;
38608ae5d62cSLior David 	/* alignment to 32b */
38618ae5d62cSLior David 	u8 reserved[2];
38628ae5d62cSLior David } __packed;
38638ae5d62cSLior David 
38648ae5d62cSLior David /* completion status codes */
38658ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status {
38668ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS	= 0x00,
38678ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM	= 0x01,
38688ae5d62cSLior David 	/* other error */
38698ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_ERROR	= 0x02,
38708ae5d62cSLior David };
38718ae5d62cSLior David 
38728ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
38738ae5d62cSLior David struct wmi_prio_tx_sectors_order_event {
38748ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
38758ae5d62cSLior David 	u8 status;
38768ae5d62cSLior David 	/* alignment to 32b */
38778ae5d62cSLior David 	u8 reserved[3];
38788ae5d62cSLior David } __packed;
38798ae5d62cSLior David 
38808ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd {
38818ae5d62cSLior David 	/* [0-128], 0 = No changes */
38828ae5d62cSLior David 	u8 beacon_number_of_sectors;
38838ae5d62cSLior David 	/* [0-128], 0 = No changes */
38848ae5d62cSLior David 	u8 txss_number_of_sectors;
38858ae5d62cSLior David 	/* [0-8] needed only for TXSS configuration */
38868ae5d62cSLior David 	u8 cid;
38878ae5d62cSLior David } __packed;
38888ae5d62cSLior David 
38898ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
38908ae5d62cSLior David  *
38918ae5d62cSLior David  * Set the number of active sectors in TXSS and/or Beacon.
38928ae5d62cSLior David  *
38938ae5d62cSLior David  * Returned event:
38948ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
38958ae5d62cSLior David  */
38968ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd {
38978ae5d62cSLior David 	struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
38988ae5d62cSLior David 	/* alignment to 32b */
38998ae5d62cSLior David 	u8 reserved;
39008ae5d62cSLior David } __packed;
39018ae5d62cSLior David 
39028ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
39038ae5d62cSLior David struct wmi_prio_tx_sectors_number_event {
39048ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
39058ae5d62cSLior David 	u8 status;
39068ae5d62cSLior David 	/* alignment to 32b */
39078ae5d62cSLior David 	u8 reserved[3];
39088ae5d62cSLior David } __packed;
39098ae5d62cSLior David 
39108ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
39118ae5d62cSLior David  *
39128ae5d62cSLior David  * Set default sectors order and number (hard coded in board file)
39138ae5d62cSLior David  * in TXSS and/or Beacon.
39148ae5d62cSLior David  *
39158ae5d62cSLior David  * Returned event:
39168ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
39178ae5d62cSLior David  */
39188ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd {
39198ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
39208ae5d62cSLior David 	u8 sector_sweep_type;
39218ae5d62cSLior David 	/* needed only for TXSS configuration */
39228ae5d62cSLior David 	u8 cid;
39238ae5d62cSLior David 	/* alignment to 32b */
39248ae5d62cSLior David 	u8 reserved[2];
39258ae5d62cSLior David } __packed;
39268ae5d62cSLior David 
39278ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
39288ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event {
39298ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
39308ae5d62cSLior David 	u8 status;
39318ae5d62cSLior David 	/* alignment to 32b */
39328ae5d62cSLior David 	u8 reserved[3];
39338ae5d62cSLior David } __packed;
39348ae5d62cSLior David 
3935761f8e4dSLazar Alexei /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
3936761f8e4dSLazar Alexei struct wmi_set_silent_rssi_table_done_event {
3937761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_status */
3938761f8e4dSLazar Alexei 	__le32 status;
3939761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
3940761f8e4dSLazar Alexei 	__le32 table;
3941761f8e4dSLazar Alexei } __packed;
3942761f8e4dSLazar Alexei 
39438a4fa214SAhmad Masri /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */
39448a4fa214SAhmad Masri struct wmi_vring_switch_timing_config_event {
39458a4fa214SAhmad Masri 	/* enum wmi_fw_status */
39468a4fa214SAhmad Masri 	u8 status;
39478a4fa214SAhmad Masri 	u8 reserved[3];
39488a4fa214SAhmad Masri } __packed;
39498a4fa214SAhmad Masri 
39508a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID */
39518a4fa214SAhmad Masri struct wmi_assoc_sta_info {
39528a4fa214SAhmad Masri 	u8 mac[WMI_MAC_LEN];
39538a4fa214SAhmad Masri 	u8 omni_index_address;
39548a4fa214SAhmad Masri 	u8 reserved;
39558a4fa214SAhmad Masri } __packed;
39568a4fa214SAhmad Masri 
39578a4fa214SAhmad Masri #define WMI_GET_ASSOC_LIST_SIZE	(8)
39588a4fa214SAhmad Masri 
39598a4fa214SAhmad Masri /* WMI_GET_ASSOC_LIST_RES_EVENTID
39608a4fa214SAhmad Masri  * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs
39618a4fa214SAhmad Masri  */
39628a4fa214SAhmad Masri struct wmi_get_assoc_list_res_event {
39638a4fa214SAhmad Masri 	struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
39648a4fa214SAhmad Masri 	/* STA count */
39658a4fa214SAhmad Masri 	u8 count;
39668a4fa214SAhmad Masri 	u8 reserved[3];
39678a4fa214SAhmad Masri } __packed;
39688a4fa214SAhmad Masri 
3969b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EVENTID - deprecated */
39708a4fa214SAhmad Masri struct wmi_bf_control_event {
39718a4fa214SAhmad Masri 	/* wmi_fw_status */
39728a4fa214SAhmad Masri 	u8 status;
39738a4fa214SAhmad Masri 	u8 reserved[3];
39748a4fa214SAhmad Masri } __packed;
39758a4fa214SAhmad Masri 
3976b5aeff16SDedy Lansky /* WMI_BF_CONTROL_EX_EVENTID */
3977b5aeff16SDedy Lansky struct wmi_bf_control_ex_event {
3978b5aeff16SDedy Lansky 	/* wmi_fw_status */
3979b5aeff16SDedy Lansky 	u8 status;
3980b5aeff16SDedy Lansky 	u8 reserved[3];
3981b5aeff16SDedy Lansky } __packed;
3982b5aeff16SDedy Lansky 
39838a4fa214SAhmad Masri /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */
3984761f8e4dSLazar Alexei struct wmi_command_not_supported_event {
3985761f8e4dSLazar Alexei 	/* device id */
3986761f8e4dSLazar Alexei 	u8 mid;
3987761f8e4dSLazar Alexei 	u8 reserved0;
3988761f8e4dSLazar Alexei 	__le16 command_id;
3989761f8e4dSLazar Alexei 	/* for UT command only, otherwise reserved */
3990761f8e4dSLazar Alexei 	__le16 command_subtype;
3991761f8e4dSLazar Alexei 	__le16 reserved1;
3992761f8e4dSLazar Alexei } __packed;
3993761f8e4dSLazar Alexei 
39948a4fa214SAhmad Masri /* WMI_TSF_SYNC_CMDID */
39958a4fa214SAhmad Masri struct wmi_tsf_sync_cmd {
39968a4fa214SAhmad Masri 	/* The time interval to send announce frame in one BI */
39978a4fa214SAhmad Masri 	u8 interval_ms;
39988a4fa214SAhmad Masri 	/* The mcs to send announce frame */
39998a4fa214SAhmad Masri 	u8 mcs;
40008a4fa214SAhmad Masri 	u8 reserved[6];
40018a4fa214SAhmad Masri } __packed;
40028a4fa214SAhmad Masri 
40038a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
40048a4fa214SAhmad Masri enum wmi_tsf_sync_status {
40058a4fa214SAhmad Masri 	WMI_TSF_SYNC_SUCCESS	= 0x00,
40068a4fa214SAhmad Masri 	WMI_TSF_SYNC_FAILED	= 0x01,
40078a4fa214SAhmad Masri 	WMI_TSF_SYNC_REJECTED	= 0x02,
40088a4fa214SAhmad Masri };
40098a4fa214SAhmad Masri 
40108a4fa214SAhmad Masri /* WMI_TSF_SYNC_STATUS_EVENTID */
40118a4fa214SAhmad Masri struct wmi_tsf_sync_status_event {
40128a4fa214SAhmad Masri 	/* enum wmi_tsf_sync_status */
40138a4fa214SAhmad Masri 	u8 status;
40148a4fa214SAhmad Masri 	u8 reserved[3];
40158a4fa214SAhmad Masri } __packed;
40168a4fa214SAhmad Masri 
40178a4fa214SAhmad Masri /* WMI_GET_CCA_INDICATIONS_EVENTID */
40188a4fa214SAhmad Masri struct wmi_get_cca_indications_event {
40198a4fa214SAhmad Masri 	/* wmi_fw_status */
40208a4fa214SAhmad Masri 	u8 status;
40218a4fa214SAhmad Masri 	/* CCA-Energy Detect in percentage over last BI (0..100) */
40228a4fa214SAhmad Masri 	u8 cca_ed_percent;
40238a4fa214SAhmad Masri 	/* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */
40248a4fa214SAhmad Masri 	u8 cca_ed_avg_percent;
40258a4fa214SAhmad Masri 	/* NAV percent over last BI (0..100) */
40268a4fa214SAhmad Masri 	u8 nav_percent;
40278a4fa214SAhmad Masri 	/* Averaged NAV percent over number of BIs (0..100) */
40288a4fa214SAhmad Masri 	u8 nav_avg_percent;
40298a4fa214SAhmad Masri 	u8 reserved[3];
40308a4fa214SAhmad Masri } __packed;
40318a4fa214SAhmad Masri 
40328a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */
40338a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_cmd {
40348a4fa214SAhmad Masri 	/* set the number of bis to average cca_ed (0..255) */
40358a4fa214SAhmad Masri 	u8 bi_number;
40368a4fa214SAhmad Masri 	u8 reserved[3];
40378a4fa214SAhmad Masri } __packed;
40388a4fa214SAhmad Masri 
40398a4fa214SAhmad Masri /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */
40408a4fa214SAhmad Masri struct wmi_set_cca_indications_bi_avg_num_event {
40418a4fa214SAhmad Masri 	/* wmi_fw_status */
40428a4fa214SAhmad Masri 	u8 status;
40438a4fa214SAhmad Masri 	u8 reserved[3];
40448a4fa214SAhmad Masri } __packed;
40458a4fa214SAhmad Masri 
40468a4fa214SAhmad Masri /* WMI_INTERNAL_FW_SET_CHANNEL */
40478a4fa214SAhmad Masri struct wmi_internal_fw_set_channel_event {
40488a4fa214SAhmad Masri 	u8 channel_num;
40498a4fa214SAhmad Masri 	u8 reserved[3];
40508a4fa214SAhmad Masri } __packed;
40518a4fa214SAhmad Masri 
4052b5aeff16SDedy Lansky /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */
4053b5aeff16SDedy Lansky struct wmi_link_stats_config_done_event {
4054b5aeff16SDedy Lansky 	/* wmi_fw_status_e */
4055b5aeff16SDedy Lansky 	u8 status;
4056b5aeff16SDedy Lansky 	u8 reserved[3];
4057b5aeff16SDedy Lansky } __packed;
4058b5aeff16SDedy Lansky 
4059b5aeff16SDedy Lansky /* WMI_LINK_STATS_EVENTID */
4060b5aeff16SDedy Lansky struct wmi_link_stats_event {
40610c936b3cSDedy Lansky 	__le64 tsf;
4062b5aeff16SDedy Lansky 	__le16 payload_size;
4063b5aeff16SDedy Lansky 	u8 has_next;
4064b5aeff16SDedy Lansky 	u8 reserved[5];
40650c936b3cSDedy Lansky 	/* a stream of wmi_link_stats_record_s */
4066b5aeff16SDedy Lansky 	u8 payload[0];
4067b5aeff16SDedy Lansky } __packed;
4068b5aeff16SDedy Lansky 
40690c936b3cSDedy Lansky /* WMI_LINK_STATS_EVENT */
40700c936b3cSDedy Lansky struct wmi_link_stats_record {
40710c936b3cSDedy Lansky 	/* wmi_link_stats_record_type_e */
4072b5aeff16SDedy Lansky 	u8 record_type_id;
40730c936b3cSDedy Lansky 	u8 reserved;
40740c936b3cSDedy Lansky 	__le16 record_size;
40750c936b3cSDedy Lansky 	u8 record[0];
40760c936b3cSDedy Lansky } __packed;
40770c936b3cSDedy Lansky 
40780c936b3cSDedy Lansky /* WMI_LINK_STATS_TYPE_BASIC */
40790c936b3cSDedy Lansky struct wmi_link_stats_basic {
4080b5aeff16SDedy Lansky 	u8 cid;
4081b5aeff16SDedy Lansky 	s8 rssi;
4082b5aeff16SDedy Lansky 	u8 sqi;
40830c936b3cSDedy Lansky 	u8 bf_mcs;
40840c936b3cSDedy Lansky 	u8 per_average;
4085b5aeff16SDedy Lansky 	u8 selected_rfc;
40860c936b3cSDedy Lansky 	u8 rx_effective_ant_num;
40870c936b3cSDedy Lansky 	u8 my_rx_sector;
40880c936b3cSDedy Lansky 	u8 my_tx_sector;
40890c936b3cSDedy Lansky 	u8 other_rx_sector;
40900c936b3cSDedy Lansky 	u8 other_tx_sector;
40910c936b3cSDedy Lansky 	u8 reserved[7];
40920c936b3cSDedy Lansky 	/* 1/4 Db units */
40930c936b3cSDedy Lansky 	__le16 snr;
4094b5aeff16SDedy Lansky 	__le32 tx_tpt;
4095b5aeff16SDedy Lansky 	__le32 tx_goodput;
4096b5aeff16SDedy Lansky 	__le32 rx_goodput;
40970c936b3cSDedy Lansky 	__le32 bf_count;
40980c936b3cSDedy Lansky 	__le32 rx_bcast_frames;
40990c936b3cSDedy Lansky } __packed;
41000c936b3cSDedy Lansky 
41010c936b3cSDedy Lansky /* WMI_LINK_STATS_TYPE_GLOBAL */
41020c936b3cSDedy Lansky struct wmi_link_stats_global {
41030c936b3cSDedy Lansky 	/* all ack-able frames */
41040c936b3cSDedy Lansky 	__le32 rx_frames;
41050c936b3cSDedy Lansky 	/* all ack-able frames */
41060c936b3cSDedy Lansky 	__le32 tx_frames;
41070c936b3cSDedy Lansky 	__le32 rx_ba_frames;
41080c936b3cSDedy Lansky 	__le32 tx_ba_frames;
41090c936b3cSDedy Lansky 	__le32 tx_beacons;
41100c936b3cSDedy Lansky 	__le32 rx_mic_errors;
41110c936b3cSDedy Lansky 	__le32 rx_crc_errors;
41120c936b3cSDedy Lansky 	__le32 tx_fail_no_ack;
41130c936b3cSDedy Lansky 	u8 reserved[8];
4114b5aeff16SDedy Lansky } __packed;
4115b5aeff16SDedy Lansky 
4116b5aeff16SDedy Lansky /* WMI_SET_GRANT_MCS_EVENTID */
4117b5aeff16SDedy Lansky struct wmi_set_grant_mcs_event {
4118b5aeff16SDedy Lansky 	/* wmi_fw_status */
4119b5aeff16SDedy Lansky 	u8 status;
4120b5aeff16SDedy Lansky 	u8 reserved[3];
4121b5aeff16SDedy Lansky } __packed;
4122b5aeff16SDedy Lansky 
4123b5aeff16SDedy Lansky /* WMI_SET_AP_SLOT_SIZE_EVENTID */
4124b5aeff16SDedy Lansky struct wmi_set_ap_slot_size_event {
4125b5aeff16SDedy Lansky 	/* wmi_fw_status */
4126b5aeff16SDedy Lansky 	u8 status;
4127b5aeff16SDedy Lansky 	u8 reserved[3];
4128b5aeff16SDedy Lansky } __packed;
4129b5aeff16SDedy Lansky 
4130b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */
4131b5aeff16SDedy Lansky struct wmi_set_vring_priority_weight_event {
4132b5aeff16SDedy Lansky 	/* wmi_fw_status */
4133b5aeff16SDedy Lansky 	u8 status;
4134b5aeff16SDedy Lansky 	u8 reserved[3];
4135b5aeff16SDedy Lansky } __packed;
4136b5aeff16SDedy Lansky 
4137b5aeff16SDedy Lansky /* WMI_SET_VRING_PRIORITY_EVENTID */
4138b5aeff16SDedy Lansky struct wmi_set_vring_priority_event {
4139b5aeff16SDedy Lansky 	/* wmi_fw_status */
4140b5aeff16SDedy Lansky 	u8 status;
4141b5aeff16SDedy Lansky 	u8 reserved[3];
4142b5aeff16SDedy Lansky } __packed;
4143b5aeff16SDedy Lansky 
414473a7d1e3SAlexei Avshalom Lazar /* WMI_RADAR_PCI_CTRL_BLOCK struct */
414573a7d1e3SAlexei Avshalom Lazar struct wmi_radar_pci_ctrl_block {
414673a7d1e3SAlexei Avshalom Lazar 	/* last fw tail address index */
414773a7d1e3SAlexei Avshalom Lazar 	__le32 fw_tail_index;
414873a7d1e3SAlexei Avshalom Lazar 	/* last SW head address index known to FW */
414973a7d1e3SAlexei Avshalom Lazar 	__le32 sw_head_index;
415073a7d1e3SAlexei Avshalom Lazar 	__le32 last_wr_pulse_tsf_low;
415173a7d1e3SAlexei Avshalom Lazar 	__le32 last_wr_pulse_count;
415273a7d1e3SAlexei Avshalom Lazar 	__le32 last_wr_in_bytes;
415373a7d1e3SAlexei Avshalom Lazar 	__le32 last_wr_pulse_id;
415473a7d1e3SAlexei Avshalom Lazar 	__le32 last_wr_burst_id;
415573a7d1e3SAlexei Avshalom Lazar 	/* When pre overflow detected, advance sw head in unit of pulses */
415673a7d1e3SAlexei Avshalom Lazar 	__le32 sw_head_inc;
415773a7d1e3SAlexei Avshalom Lazar 	__le32 reserved[8];
415873a7d1e3SAlexei Avshalom Lazar } __packed;
415973a7d1e3SAlexei Avshalom Lazar 
416073a7d1e3SAlexei Avshalom Lazar /* WMI_RBUFCAP_CFG_CMD */
416173a7d1e3SAlexei Avshalom Lazar struct wmi_rbufcap_cfg_cmd {
416273a7d1e3SAlexei Avshalom Lazar 	u8 enable;
416373a7d1e3SAlexei Avshalom Lazar 	u8 reserved;
416473a7d1e3SAlexei Avshalom Lazar 	/* RBUFCAP indicates rx space unavailable when number of rx
416573a7d1e3SAlexei Avshalom Lazar 	 * descriptors drops below this threshold. Set 0 to use system
416673a7d1e3SAlexei Avshalom Lazar 	 * default
416773a7d1e3SAlexei Avshalom Lazar 	 */
416873a7d1e3SAlexei Avshalom Lazar 	__le16 rx_desc_threshold;
416973a7d1e3SAlexei Avshalom Lazar } __packed;
417073a7d1e3SAlexei Avshalom Lazar 
417173a7d1e3SAlexei Avshalom Lazar /* WMI_RBUFCAP_CFG_EVENTID */
417273a7d1e3SAlexei Avshalom Lazar struct wmi_rbufcap_cfg_event {
417373a7d1e3SAlexei Avshalom Lazar 	/* enum wmi_fw_status */
417473a7d1e3SAlexei Avshalom Lazar 	u8 status;
417573a7d1e3SAlexei Avshalom Lazar 	u8 reserved[3];
417673a7d1e3SAlexei Avshalom Lazar } __packed;
417773a7d1e3SAlexei Avshalom Lazar 
41789b586118STzahi Sabo /* WMI_TEMP_SENSE_ALL_DONE_EVENTID
41799b586118STzahi Sabo  * Measure MAC and all radio temperatures
41809b586118STzahi Sabo  */
41819b586118STzahi Sabo struct wmi_temp_sense_all_done_event {
41829b586118STzahi Sabo 	/* enum wmi_fw_status */
41839b586118STzahi Sabo 	u8 status;
41849b586118STzahi Sabo 	/* Bitmap of connected RFs */
41859b586118STzahi Sabo 	u8 rf_bitmap;
41869b586118STzahi Sabo 	u8 reserved[2];
41879b586118STzahi Sabo 	/* Temperature times 1000 (actual temperature will be achieved by
41889b586118STzahi Sabo 	 * dividing the value by 1000). When temperature cannot be read from
41899b586118STzahi Sabo 	 * device return WMI_INVALID_TEMPERATURE
41909b586118STzahi Sabo 	 */
41919b586118STzahi Sabo 	__le32 rf_t1000[WMI_MAX_XIF_PORTS_NUM];
41929b586118STzahi Sabo 	/* Temperature times 1000 (actual temperature will be achieved by
41939b586118STzahi Sabo 	 * dividing the value by 1000). When temperature cannot be read from
41949b586118STzahi Sabo 	 * device return WMI_INVALID_TEMPERATURE
41959b586118STzahi Sabo 	 */
41969b586118STzahi Sabo 	__le32 baseband_t1000;
41979b586118STzahi Sabo } __packed;
41989b586118STzahi Sabo 
41992be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */
4200