xref: /openbmc/linux/drivers/net/wireless/ath/wil6210/wmi.h (revision 761f8e4d463e1cbf6da0d228bc74cecc800d4de5)
12be7d22fSVladimir Kondratiev /*
2849a564bSDedy Lansky  * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
3b874ddecSLior David  * Copyright (c) 2006-2012 Wilocity
42be7d22fSVladimir Kondratiev  *
52be7d22fSVladimir Kondratiev  * Permission to use, copy, modify, and/or distribute this software for any
62be7d22fSVladimir Kondratiev  * purpose with or without fee is hereby granted, provided that the above
72be7d22fSVladimir Kondratiev  * copyright notice and this permission notice appear in all copies.
82be7d22fSVladimir Kondratiev  *
92be7d22fSVladimir Kondratiev  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
102be7d22fSVladimir Kondratiev  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
112be7d22fSVladimir Kondratiev  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
122be7d22fSVladimir Kondratiev  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
132be7d22fSVladimir Kondratiev  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
142be7d22fSVladimir Kondratiev  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
152be7d22fSVladimir Kondratiev  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
162be7d22fSVladimir Kondratiev  */
172be7d22fSVladimir Kondratiev 
182be7d22fSVladimir Kondratiev /*
192be7d22fSVladimir Kondratiev  * This file contains the definitions of the WMI protocol specified in the
20b874ddecSLior David  * Wireless Module Interface (WMI) for the Qualcomm
21b874ddecSLior David  * 60 GHz wireless solution.
222be7d22fSVladimir Kondratiev  * It includes definitions of all the commands and events.
232be7d22fSVladimir Kondratiev  * Commands are messages from the host to the WM.
242be7d22fSVladimir Kondratiev  * Events are messages from the WM to the host.
25b874ddecSLior David  *
26b874ddecSLior David  * This is an automatically generated file.
272be7d22fSVladimir Kondratiev  */
282be7d22fSVladimir Kondratiev 
292be7d22fSVladimir Kondratiev #ifndef __WILOCITY_WMI_H__
302be7d22fSVladimir Kondratiev #define __WILOCITY_WMI_H__
312be7d22fSVladimir Kondratiev 
322be7d22fSVladimir Kondratiev /* General */
33b874ddecSLior David #define WMI_MAX_ASSOC_STA		(8)
34b874ddecSLior David #define WMI_DEFAULT_ASSOC_STA		(1)
352be7d22fSVladimir Kondratiev #define WMI_MAC_LEN			(6)
362be7d22fSVladimir Kondratiev #define WMI_PROX_RANGE_NUM		(3)
37b874ddecSLior David #define WMI_MAX_LOSS_DMG_BEACONS	(20)
388ae5d62cSLior David #define MAX_NUM_OF_SECTORS		(128)
39*761f8e4dSLazar Alexei #define WMI_SCHED_MAX_ALLOCS_PER_CMD	(4)
40*761f8e4dSLazar Alexei #define WMI_RF_DTYPE_LENGTH		(3)
41*761f8e4dSLazar Alexei #define WMI_RF_ETYPE_LENGTH		(3)
42*761f8e4dSLazar Alexei #define WMI_RF_RX2TX_LENGTH		(3)
43*761f8e4dSLazar Alexei #define WMI_RF_ETYPE_VAL_PER_RANGE	(5)
44b874ddecSLior David 
45b874ddecSLior David /* Mailbox interface
46b874ddecSLior David  * used for commands and events
47b874ddecSLior David  */
48b874ddecSLior David enum wmi_mid {
49b874ddecSLior David 	MID_DEFAULT		= 0x00,
50b874ddecSLior David 	FIRST_DBG_MID_ID	= 0x10,
51b874ddecSLior David 	LAST_DBG_MID_ID		= 0xFE,
52b874ddecSLior David 	MID_BROADCAST		= 0xFF,
53b874ddecSLior David };
54b874ddecSLior David 
5508989f96SLior David /* FW capability IDs
5608989f96SLior David  * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
5708989f96SLior David  * the host
5808989f96SLior David  */
5908989f96SLior David enum wmi_fw_capability {
6008989f96SLior David 	WMI_FW_CAPABILITY_FTM				= 0,
6108989f96SLior David 	WMI_FW_CAPABILITY_PS_CONFIG			= 1,
62cbf795c1SLior David 	WMI_FW_CAPABILITY_RF_SECTORS			= 2,
63cbf795c1SLior David 	WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT		= 3,
64849a564bSDedy Lansky 	WMI_FW_CAPABILITY_DISABLE_AP_SME		= 4,
650d2370e9SDedy Lansky 	WMI_FW_CAPABILITY_WMI_ONLY			= 5,
6690ffabb0SDedy Lansky 	WMI_FW_CAPABILITY_THERMAL_THROTTLING		= 7,
67fe9ee51eSMaya Erez 	WMI_FW_CAPABILITY_D3_SUSPEND			= 8,
68*761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LONG_RANGE			= 9,
69*761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_FIXED_SCHEDULING		= 10,
70*761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS		= 11,
7130868f5dSDedy Lansky 	WMI_FW_CAPABILITY_RSSI_REPORTING		= 12,
72*761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE		= 13,
73*761f8e4dSLazar Alexei 	WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP	= 14,
7408989f96SLior David 	WMI_FW_CAPABILITY_MAX,
7508989f96SLior David };
7608989f96SLior David 
77b874ddecSLior David /* WMI_CMD_HDR */
78b874ddecSLior David struct wmi_cmd_hdr {
79b874ddecSLior David 	u8 mid;
80b874ddecSLior David 	u8 reserved;
81b874ddecSLior David 	__le16 command_id;
82b874ddecSLior David 	__le32 fw_timestamp;
83b874ddecSLior David } __packed;
842be7d22fSVladimir Kondratiev 
852be7d22fSVladimir Kondratiev /* List of Commands */
862be7d22fSVladimir Kondratiev enum wmi_command_id {
87b874ddecSLior David 	WMI_CONNECT_CMDID				= 0x01,
88b874ddecSLior David 	WMI_DISCONNECT_CMDID				= 0x03,
89b874ddecSLior David 	WMI_DISCONNECT_STA_CMDID			= 0x04,
90b874ddecSLior David 	WMI_START_SCAN_CMDID				= 0x07,
91b874ddecSLior David 	WMI_SET_BSS_FILTER_CMDID			= 0x09,
92b874ddecSLior David 	WMI_SET_PROBED_SSID_CMDID			= 0x0A,
93*761f8e4dSLazar Alexei 	/* deprecated */
94b874ddecSLior David 	WMI_SET_LISTEN_INT_CMDID			= 0x0B,
95b874ddecSLior David 	WMI_BCON_CTRL_CMDID				= 0x0F,
96b874ddecSLior David 	WMI_ADD_CIPHER_KEY_CMDID			= 0x16,
97b874ddecSLior David 	WMI_DELETE_CIPHER_KEY_CMDID			= 0x17,
98b874ddecSLior David 	WMI_PCP_CONF_CMDID				= 0x18,
99b874ddecSLior David 	WMI_SET_APPIE_CMDID				= 0x3F,
100b874ddecSLior David 	WMI_SET_WSC_STATUS_CMDID			= 0x41,
101b874ddecSLior David 	WMI_PXMT_RANGE_CFG_CMDID			= 0x42,
102b874ddecSLior David 	WMI_PXMT_SNR2_RANGE_CFG_CMDID			= 0x43,
103b874ddecSLior David 	WMI_MEM_READ_CMDID				= 0x800,
104b874ddecSLior David 	WMI_MEM_WR_CMDID				= 0x801,
105b874ddecSLior David 	WMI_ECHO_CMDID					= 0x803,
106b874ddecSLior David 	WMI_DEEP_ECHO_CMDID				= 0x804,
107b874ddecSLior David 	WMI_CONFIG_MAC_CMDID				= 0x805,
108*761f8e4dSLazar Alexei 	/* deprecated */
109b874ddecSLior David 	WMI_CONFIG_PHY_DEBUG_CMDID			= 0x806,
110b874ddecSLior David 	WMI_ADD_DEBUG_TX_PCKT_CMDID			= 0x808,
111b874ddecSLior David 	WMI_PHY_GET_STATISTICS_CMDID			= 0x809,
112*761f8e4dSLazar Alexei 	/* deprecated */
113b874ddecSLior David 	WMI_FS_TUNE_CMDID				= 0x80A,
114*761f8e4dSLazar Alexei 	/* deprecated */
115b874ddecSLior David 	WMI_CORR_MEASURE_CMDID				= 0x80B,
116b874ddecSLior David 	WMI_READ_RSSI_CMDID				= 0x80C,
117b874ddecSLior David 	WMI_TEMP_SENSE_CMDID				= 0x80E,
118b874ddecSLior David 	WMI_DC_CALIB_CMDID				= 0x80F,
119*761f8e4dSLazar Alexei 	/* deprecated */
120b874ddecSLior David 	WMI_SEND_TONE_CMDID				= 0x810,
121*761f8e4dSLazar Alexei 	/* deprecated */
122b874ddecSLior David 	WMI_IQ_TX_CALIB_CMDID				= 0x811,
123*761f8e4dSLazar Alexei 	/* deprecated */
124b874ddecSLior David 	WMI_IQ_RX_CALIB_CMDID				= 0x812,
125b874ddecSLior David 	WMI_SET_WORK_MODE_CMDID				= 0x815,
126b874ddecSLior David 	WMI_LO_LEAKAGE_CALIB_CMDID			= 0x816,
127*761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_CMDID		= 0x817,
128b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_CMDID			= 0x81D,
129*761f8e4dSLazar Alexei 	/* deprecated */
130b874ddecSLior David 	WMI_RF_RX_TEST_CMDID				= 0x81E,
131b874ddecSLior David 	WMI_CFG_RX_CHAIN_CMDID				= 0x820,
132b874ddecSLior David 	WMI_VRING_CFG_CMDID				= 0x821,
133b874ddecSLior David 	WMI_BCAST_VRING_CFG_CMDID			= 0x822,
134b874ddecSLior David 	WMI_VRING_BA_EN_CMDID				= 0x823,
135b874ddecSLior David 	WMI_VRING_BA_DIS_CMDID				= 0x824,
136b874ddecSLior David 	WMI_RCP_ADDBA_RESP_CMDID			= 0x825,
137b874ddecSLior David 	WMI_RCP_DELBA_CMDID				= 0x826,
138b874ddecSLior David 	WMI_SET_SSID_CMDID				= 0x827,
139b874ddecSLior David 	WMI_GET_SSID_CMDID				= 0x828,
140b874ddecSLior David 	WMI_SET_PCP_CHANNEL_CMDID			= 0x829,
141b874ddecSLior David 	WMI_GET_PCP_CHANNEL_CMDID			= 0x82A,
142b874ddecSLior David 	WMI_SW_TX_REQ_CMDID				= 0x82B,
143b874ddecSLior David 	WMI_MLME_PUSH_CMDID				= 0x835,
144b874ddecSLior David 	WMI_BEAMFORMING_MGMT_CMDID			= 0x836,
145b874ddecSLior David 	WMI_BF_TXSS_MGMT_CMDID				= 0x837,
146b874ddecSLior David 	WMI_BF_SM_MGMT_CMDID				= 0x838,
147b874ddecSLior David 	WMI_BF_RXSS_MGMT_CMDID				= 0x839,
148b874ddecSLior David 	WMI_BF_TRIG_CMDID				= 0x83A,
1490163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_CMDID		= 0x842,
1500163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_CMDID		= 0x843,
151b874ddecSLior David 	WMI_SET_SECTORS_CMDID				= 0x849,
152b874ddecSLior David 	WMI_MAINTAIN_PAUSE_CMDID			= 0x850,
153b874ddecSLior David 	WMI_MAINTAIN_RESUME_CMDID			= 0x851,
154b874ddecSLior David 	WMI_RS_MGMT_CMDID				= 0x852,
155b874ddecSLior David 	WMI_RF_MGMT_CMDID				= 0x853,
156*761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_CMDID				= 0x856,
157*761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_CMDID				= 0x857,
15810d599adSMaya Erez 	WMI_LED_CFG_CMDID				= 0x858,
159*761f8e4dSLazar Alexei 	WMI_SET_CONNECT_SNR_THR_CMDID			= 0x85B,
160*761f8e4dSLazar Alexei 	WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID		= 0x85C,
161*761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_CMDID			= 0x85D,
162*761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID		= 0x85E,
1632be7d22fSVladimir Kondratiev 	/* Performance monitoring commands */
164b874ddecSLior David 	WMI_BF_CTRL_CMDID				= 0x862,
165b874ddecSLior David 	WMI_NOTIFY_REQ_CMDID				= 0x863,
166b874ddecSLior David 	WMI_GET_STATUS_CMDID				= 0x864,
1670163b031SMaya Erez 	WMI_GET_RF_STATUS_CMDID				= 0x866,
1680163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_CMDID			= 0x867,
169b874ddecSLior David 	WMI_UNIT_TEST_CMDID				= 0x900,
170b874ddecSLior David 	WMI_FLASH_READ_CMDID				= 0x902,
171b874ddecSLior David 	WMI_FLASH_WRITE_CMDID				= 0x903,
1720163b031SMaya Erez 	/* Power management */
173fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_CMDID			= 0x904,
1740163b031SMaya Erez 	WMI_TRAFFIC_RESUME_CMDID			= 0x905,
175b8023177SVladimir Kondratiev 	/* P2P */
176b874ddecSLior David 	WMI_P2P_CFG_CMDID				= 0x910,
177b874ddecSLior David 	WMI_PORT_ALLOCATE_CMDID				= 0x911,
178b874ddecSLior David 	WMI_PORT_DELETE_CMDID				= 0x912,
179b874ddecSLior David 	WMI_POWER_MGMT_CFG_CMDID			= 0x913,
180b874ddecSLior David 	WMI_START_LISTEN_CMDID				= 0x914,
181b874ddecSLior David 	WMI_START_SEARCH_CMDID				= 0x915,
182b874ddecSLior David 	WMI_DISCOVERY_START_CMDID			= 0x916,
183b874ddecSLior David 	WMI_DISCOVERY_STOP_CMDID			= 0x917,
184b874ddecSLior David 	WMI_PCP_START_CMDID				= 0x918,
185b874ddecSLior David 	WMI_PCP_STOP_CMDID				= 0x919,
186b874ddecSLior David 	WMI_GET_PCP_FACTOR_CMDID			= 0x91B,
1870163b031SMaya Erez 	/* Power Save Configuration Commands */
1880163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_CMDID			= 0x91C,
1890163b031SMaya Erez 	WMI_RS_CFG_CMDID				= 0x921,
19008989f96SLior David 	WMI_GET_DETAILED_RS_RES_CMDID			= 0x922,
19108989f96SLior David 	WMI_AOA_MEAS_CMDID				= 0x923,
192a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_CMDID			= 0x924,
193cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_CMDID			= 0x930,
194cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_CMDID			= 0x931,
195849a564bSDedy Lansky 	WMI_NEW_STA_CMDID				= 0x935,
196849a564bSDedy Lansky 	WMI_DEL_STA_CMDID				= 0x936,
19790ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_CMDID		= 0x940,
19890ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_CMDID		= 0x941,
199*761f8e4dSLazar Alexei 	/* Read Power Save profile type */
200*761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_CMDID		= 0x942,
20108989f96SLior David 	WMI_TOF_SESSION_START_CMDID			= 0x991,
20208989f96SLior David 	WMI_TOF_GET_CAPABILITIES_CMDID			= 0x992,
20308989f96SLior David 	WMI_TOF_SET_LCR_CMDID				= 0x993,
20408989f96SLior David 	WMI_TOF_SET_LCI_CMDID				= 0x994,
205*761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_CMDID			= 0x996,
2068ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_CMDID			= 0x997,
2078ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_CMDID			= 0x998,
208*761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_CMDID			= 0x999,
209cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_CMDID			= 0x9A0,
210cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_CMDID			= 0x9A1,
211cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A2,
212cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID		= 0x9A3,
213cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_CMDID			= 0x9A4,
2148ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_CMDID			= 0x9A5,
2158ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_CMDID		= 0x9A6,
2168ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID	= 0x9A7,
217*761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_CMDID			= 0xA01,
218*761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_CMDID		= 0xA02,
219*761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_CMDID		= 0xA03,
220*761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID	= 0xA04,
221*761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_CMDID			= 0xA05,
222b874ddecSLior David 	WMI_SET_MAC_ADDRESS_CMDID			= 0xF003,
223b874ddecSLior David 	WMI_ABORT_SCAN_CMDID				= 0xF007,
224b874ddecSLior David 	WMI_SET_PROMISCUOUS_MODE_CMDID			= 0xF041,
225*761f8e4dSLazar Alexei 	/* deprecated */
226b874ddecSLior David 	WMI_GET_PMK_CMDID				= 0xF048,
227b874ddecSLior David 	WMI_SET_PASSPHRASE_CMDID			= 0xF049,
228*761f8e4dSLazar Alexei 	/* deprecated */
229b874ddecSLior David 	WMI_SEND_ASSOC_RES_CMDID			= 0xF04A,
230*761f8e4dSLazar Alexei 	/* deprecated */
231b874ddecSLior David 	WMI_SET_ASSOC_REQ_RELAY_CMDID			= 0xF04B,
232b874ddecSLior David 	WMI_MAC_ADDR_REQ_CMDID				= 0xF04D,
233b874ddecSLior David 	WMI_FW_VER_CMDID				= 0xF04E,
234b874ddecSLior David 	WMI_PMC_CMDID					= 0xF04F,
2352be7d22fSVladimir Kondratiev };
2362be7d22fSVladimir Kondratiev 
237b874ddecSLior David /* WMI_CONNECT_CMDID */
2382be7d22fSVladimir Kondratiev enum wmi_network_type {
2392be7d22fSVladimir Kondratiev 	WMI_NETTYPE_INFRA		= 0x01,
2402be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC		= 0x02,
2412be7d22fSVladimir Kondratiev 	WMI_NETTYPE_ADHOC_CREATOR	= 0x04,
2422be7d22fSVladimir Kondratiev 	WMI_NETTYPE_AP			= 0x10,
2432be7d22fSVladimir Kondratiev 	WMI_NETTYPE_P2P			= 0x20,
244b874ddecSLior David 	/* PCIE over 60g */
245b874ddecSLior David 	WMI_NETTYPE_WBE			= 0x40,
2462be7d22fSVladimir Kondratiev };
2472be7d22fSVladimir Kondratiev 
2482be7d22fSVladimir Kondratiev enum wmi_dot11_auth_mode {
2492be7d22fSVladimir Kondratiev 	WMI_AUTH11_OPEN		= 0x01,
2502be7d22fSVladimir Kondratiev 	WMI_AUTH11_SHARED	= 0x02,
2512be7d22fSVladimir Kondratiev 	WMI_AUTH11_LEAP		= 0x04,
2522be7d22fSVladimir Kondratiev 	WMI_AUTH11_WSC		= 0x08,
2532be7d22fSVladimir Kondratiev };
2542be7d22fSVladimir Kondratiev 
2552be7d22fSVladimir Kondratiev enum wmi_auth_mode {
2562be7d22fSVladimir Kondratiev 	WMI_AUTH_NONE		= 0x01,
2572be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA		= 0x02,
2582be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2		= 0x04,
2592be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_PSK	= 0x08,
2602be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_PSK	= 0x10,
2612be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA_CCKM	= 0x20,
2622be7d22fSVladimir Kondratiev 	WMI_AUTH_WPA2_CCKM	= 0x40,
2632be7d22fSVladimir Kondratiev };
2642be7d22fSVladimir Kondratiev 
2652be7d22fSVladimir Kondratiev enum wmi_crypto_type {
2662be7d22fSVladimir Kondratiev 	WMI_CRYPT_NONE		= 0x01,
2672be7d22fSVladimir Kondratiev 	WMI_CRYPT_AES_GCMP	= 0x20,
2682be7d22fSVladimir Kondratiev };
2692be7d22fSVladimir Kondratiev 
2702be7d22fSVladimir Kondratiev enum wmi_connect_ctrl_flag_bits {
271b874ddecSLior David 	WMI_CONNECT_ASSOC_POLICY_USER		= 0x01,
272b874ddecSLior David 	WMI_CONNECT_SEND_REASSOC		= 0x02,
273b874ddecSLior David 	WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER	= 0x04,
274b874ddecSLior David 	WMI_CONNECT_PROFILE_MATCH_DONE		= 0x08,
275b874ddecSLior David 	WMI_CONNECT_IGNORE_AAC_BEACON		= 0x10,
276b874ddecSLior David 	WMI_CONNECT_CSA_FOLLOW_BSS		= 0x20,
277b874ddecSLior David 	WMI_CONNECT_DO_WPA_OFFLOAD		= 0x40,
278b874ddecSLior David 	WMI_CONNECT_DO_NOT_DEAUTH		= 0x80,
2792be7d22fSVladimir Kondratiev };
2802be7d22fSVladimir Kondratiev 
2812be7d22fSVladimir Kondratiev #define WMI_MAX_SSID_LEN	(32)
2822be7d22fSVladimir Kondratiev 
283b874ddecSLior David /* WMI_CONNECT_CMDID */
2842be7d22fSVladimir Kondratiev struct wmi_connect_cmd {
2852be7d22fSVladimir Kondratiev 	u8 network_type;
2862be7d22fSVladimir Kondratiev 	u8 dot11_auth_mode;
2872be7d22fSVladimir Kondratiev 	u8 auth_mode;
2882be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_type;
2892be7d22fSVladimir Kondratiev 	u8 pairwise_crypto_len;
2902be7d22fSVladimir Kondratiev 	u8 group_crypto_type;
2912be7d22fSVladimir Kondratiev 	u8 group_crypto_len;
2922be7d22fSVladimir Kondratiev 	u8 ssid_len;
2932be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
2942be7d22fSVladimir Kondratiev 	u8 channel;
2952be7d22fSVladimir Kondratiev 	u8 reserved0;
2962be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
2972be7d22fSVladimir Kondratiev 	__le32 ctrl_flags;
2982be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
2992be7d22fSVladimir Kondratiev 	u8 reserved1[2];
3002be7d22fSVladimir Kondratiev } __packed;
3012be7d22fSVladimir Kondratiev 
302b874ddecSLior David /* WMI_DISCONNECT_STA_CMDID */
303b8023177SVladimir Kondratiev struct wmi_disconnect_sta_cmd {
304b8023177SVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
305b8023177SVladimir Kondratiev 	__le16 disconnect_reason;
306b8023177SVladimir Kondratiev } __packed;
3072be7d22fSVladimir Kondratiev 
3082be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_INDEX	(3)
3092be7d22fSVladimir Kondratiev #define WMI_MAX_KEY_LEN		(32)
3102be7d22fSVladimir Kondratiev #define WMI_PASSPHRASE_LEN	(64)
3112be7d22fSVladimir Kondratiev 
312b874ddecSLior David /* WMI_SET_PASSPHRASE_CMDID */
3132be7d22fSVladimir Kondratiev struct wmi_set_passphrase_cmd {
3142be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
3152be7d22fSVladimir Kondratiev 	u8 passphrase[WMI_PASSPHRASE_LEN];
3162be7d22fSVladimir Kondratiev 	u8 ssid_len;
3172be7d22fSVladimir Kondratiev 	u8 passphrase_len;
3182be7d22fSVladimir Kondratiev } __packed;
3192be7d22fSVladimir Kondratiev 
320b874ddecSLior David /* WMI_ADD_CIPHER_KEY_CMDID */
3212be7d22fSVladimir Kondratiev enum wmi_key_usage {
322b874ddecSLior David 	WMI_KEY_USE_PAIRWISE	= 0x00,
323b874ddecSLior David 	WMI_KEY_USE_RX_GROUP	= 0x01,
324b874ddecSLior David 	WMI_KEY_USE_TX_GROUP	= 0x02,
3252be7d22fSVladimir Kondratiev };
3262be7d22fSVladimir Kondratiev 
3272be7d22fSVladimir Kondratiev struct wmi_add_cipher_key_cmd {
3282be7d22fSVladimir Kondratiev 	u8 key_index;
3292be7d22fSVladimir Kondratiev 	u8 key_type;
330b874ddecSLior David 	/* enum wmi_key_usage */
331b874ddecSLior David 	u8 key_usage;
3322be7d22fSVladimir Kondratiev 	u8 key_len;
333b874ddecSLior David 	/* key replay sequence counter */
334b874ddecSLior David 	u8 key_rsc[8];
3352be7d22fSVladimir Kondratiev 	u8 key[WMI_MAX_KEY_LEN];
336b874ddecSLior David 	/* Additional Key Control information */
337b874ddecSLior David 	u8 key_op_ctrl;
3382be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
3392be7d22fSVladimir Kondratiev } __packed;
3402be7d22fSVladimir Kondratiev 
341b874ddecSLior David /* WMI_DELETE_CIPHER_KEY_CMDID */
3422be7d22fSVladimir Kondratiev struct wmi_delete_cipher_key_cmd {
3432be7d22fSVladimir Kondratiev 	u8 key_index;
3442be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
3452be7d22fSVladimir Kondratiev } __packed;
3462be7d22fSVladimir Kondratiev 
347b874ddecSLior David /* WMI_START_SCAN_CMDID
3482be7d22fSVladimir Kondratiev  *
3492be7d22fSVladimir Kondratiev  * Start L1 scan operation
3502be7d22fSVladimir Kondratiev  *
3512be7d22fSVladimir Kondratiev  * Returned events:
3522be7d22fSVladimir Kondratiev  * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
3532be7d22fSVladimir Kondratiev  * - WMI_SCAN_COMPLETE_EVENTID
3542be7d22fSVladimir Kondratiev  */
3552be7d22fSVladimir Kondratiev enum wmi_scan_type {
356b874ddecSLior David 	WMI_ACTIVE_SCAN		= 0x00,
357b874ddecSLior David 	WMI_SHORT_SCAN		= 0x01,
358b874ddecSLior David 	WMI_PASSIVE_SCAN	= 0x02,
359b874ddecSLior David 	WMI_DIRECT_SCAN		= 0x03,
360b874ddecSLior David 	WMI_LONG_SCAN		= 0x04,
3612be7d22fSVladimir Kondratiev };
3622be7d22fSVladimir Kondratiev 
363b874ddecSLior David /* WMI_START_SCAN_CMDID */
3642be7d22fSVladimir Kondratiev struct wmi_start_scan_cmd {
365b874ddecSLior David 	u8 direct_scan_mac_addr[WMI_MAC_LEN];
3660163b031SMaya Erez 	/* run scan with discovery beacon. Relevant for ACTIVE scan only. */
36774997a53SLior David 	u8 discovery_mode;
36874997a53SLior David 	u8 reserved;
369b874ddecSLior David 	/* Max duration in the home channel(ms) */
370b874ddecSLior David 	__le32 dwell_time;
371b874ddecSLior David 	/* Time interval between scans (ms) */
372b874ddecSLior David 	__le32 force_scan_interval;
373b874ddecSLior David 	/* enum wmi_scan_type */
374b874ddecSLior David 	u8 scan_type;
375b874ddecSLior David 	/* how many channels follow */
376b874ddecSLior David 	u8 num_channels;
377b874ddecSLior David 	/* channels ID's:
378b874ddecSLior David 	 * 0 - 58320 MHz
379b874ddecSLior David 	 * 1 - 60480 MHz
380b874ddecSLior David 	 * 2 - 62640 MHz
381b874ddecSLior David 	 */
3822be7d22fSVladimir Kondratiev 	struct {
3832be7d22fSVladimir Kondratiev 		u8 channel;
3842be7d22fSVladimir Kondratiev 		u8 reserved;
385b874ddecSLior David 	} channel_list[0];
3862be7d22fSVladimir Kondratiev } __packed;
3872be7d22fSVladimir Kondratiev 
388b874ddecSLior David /* WMI_SET_PROBED_SSID_CMDID */
389b8023177SVladimir Kondratiev #define MAX_PROBED_SSID_INDEX	(3)
3902be7d22fSVladimir Kondratiev 
3912be7d22fSVladimir Kondratiev enum wmi_ssid_flag {
392b874ddecSLior David 	/* disables entry */
393b874ddecSLior David 	WMI_SSID_FLAG_DISABLE	= 0x00,
394b874ddecSLior David 	/* probes specified ssid */
395b874ddecSLior David 	WMI_SSID_FLAG_SPECIFIC	= 0x01,
396b874ddecSLior David 	/* probes for any ssid */
397b874ddecSLior David 	WMI_SSID_FLAG_ANY	= 0x02,
3982be7d22fSVladimir Kondratiev };
3992be7d22fSVladimir Kondratiev 
4002be7d22fSVladimir Kondratiev struct wmi_probed_ssid_cmd {
401b874ddecSLior David 	/* 0 to MAX_PROBED_SSID_INDEX */
402b874ddecSLior David 	u8 entry_index;
403b874ddecSLior David 	/* enum wmi_ssid_flag */
404b874ddecSLior David 	u8 flag;
4052be7d22fSVladimir Kondratiev 	u8 ssid_len;
4062be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
4072be7d22fSVladimir Kondratiev } __packed;
4082be7d22fSVladimir Kondratiev 
409b874ddecSLior David /* WMI_SET_APPIE_CMDID
4102be7d22fSVladimir Kondratiev  * Add Application specified IE to a management frame
4112be7d22fSVladimir Kondratiev  */
412b8023177SVladimir Kondratiev #define WMI_MAX_IE_LEN	(1024)
413b8023177SVladimir Kondratiev 
414b874ddecSLior David /* Frame Types */
415b8023177SVladimir Kondratiev enum wmi_mgmt_frame_type {
416b874ddecSLior David 	WMI_FRAME_BEACON	= 0x00,
417b874ddecSLior David 	WMI_FRAME_PROBE_REQ	= 0x01,
418b874ddecSLior David 	WMI_FRAME_PROBE_RESP	= 0x02,
419b874ddecSLior David 	WMI_FRAME_ASSOC_REQ	= 0x03,
420b874ddecSLior David 	WMI_FRAME_ASSOC_RESP	= 0x04,
421b874ddecSLior David 	WMI_NUM_MGMT_FRAME	= 0x05,
422b8023177SVladimir Kondratiev };
423b8023177SVladimir Kondratiev 
4242be7d22fSVladimir Kondratiev struct wmi_set_appie_cmd {
425b874ddecSLior David 	/* enum wmi_mgmt_frame_type */
426b874ddecSLior David 	u8 mgmt_frm_type;
4272be7d22fSVladimir Kondratiev 	u8 reserved;
428b874ddecSLior David 	/* Length of the IE to be added to MGMT frame */
429b874ddecSLior David 	__le16 ie_len;
4302be7d22fSVladimir Kondratiev 	u8 ie_info[0];
4312be7d22fSVladimir Kondratiev } __packed;
4322be7d22fSVladimir Kondratiev 
433b874ddecSLior David /* WMI_PXMT_RANGE_CFG_CMDID */
4342be7d22fSVladimir Kondratiev struct wmi_pxmt_range_cfg_cmd {
4352be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
4362be7d22fSVladimir Kondratiev 	__le16 range;
4372be7d22fSVladimir Kondratiev } __packed;
4382be7d22fSVladimir Kondratiev 
439b874ddecSLior David /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
4402be7d22fSVladimir Kondratiev struct wmi_pxmt_snr2_range_cfg_cmd {
441b874ddecSLior David 	s8 snr2range_arr[2];
4422be7d22fSVladimir Kondratiev } __packed;
4432be7d22fSVladimir Kondratiev 
444b874ddecSLior David /* WMI_RF_MGMT_CMDID */
4452be7d22fSVladimir Kondratiev enum wmi_rf_mgmt_type {
446b874ddecSLior David 	WMI_RF_MGMT_W_DISABLE	= 0x00,
447b874ddecSLior David 	WMI_RF_MGMT_W_ENABLE	= 0x01,
448b874ddecSLior David 	WMI_RF_MGMT_GET_STATUS	= 0x02,
4492be7d22fSVladimir Kondratiev };
4502be7d22fSVladimir Kondratiev 
451b874ddecSLior David /* WMI_RF_MGMT_CMDID */
4522be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_cmd {
4532be7d22fSVladimir Kondratiev 	__le32 rf_mgmt_type;
4542be7d22fSVladimir Kondratiev } __packed;
4552be7d22fSVladimir Kondratiev 
456b874ddecSLior David /* WMI_CORR_MEASURE_CMDID */
457b8023177SVladimir Kondratiev struct wmi_corr_measure_cmd {
458b874ddecSLior David 	__le32 freq_mhz;
459b8023177SVladimir Kondratiev 	__le32 length_samples;
460b8023177SVladimir Kondratiev 	__le32 iterations;
461b8023177SVladimir Kondratiev } __packed;
462b8023177SVladimir Kondratiev 
463b874ddecSLior David /* WMI_SET_SSID_CMDID */
4642be7d22fSVladimir Kondratiev struct wmi_set_ssid_cmd {
4652be7d22fSVladimir Kondratiev 	__le32 ssid_len;
4662be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
4672be7d22fSVladimir Kondratiev } __packed;
4682be7d22fSVladimir Kondratiev 
469b874ddecSLior David /* WMI_SET_PCP_CHANNEL_CMDID */
4702be7d22fSVladimir Kondratiev struct wmi_set_pcp_channel_cmd {
4712be7d22fSVladimir Kondratiev 	u8 channel;
4722be7d22fSVladimir Kondratiev 	u8 reserved[3];
4732be7d22fSVladimir Kondratiev } __packed;
4742be7d22fSVladimir Kondratiev 
475b874ddecSLior David /* WMI_BCON_CTRL_CMDID */
4762be7d22fSVladimir Kondratiev struct wmi_bcon_ctrl_cmd {
4772be7d22fSVladimir Kondratiev 	__le16 bcon_interval;
4782be7d22fSVladimir Kondratiev 	__le16 frag_num;
4792be7d22fSVladimir Kondratiev 	__le64 ss_mask;
4802be7d22fSVladimir Kondratiev 	u8 network_type;
4816c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
4822be7d22fSVladimir Kondratiev 	u8 disable_sec_offload;
4832be7d22fSVladimir Kondratiev 	u8 disable_sec;
484b874ddecSLior David 	u8 hidden_ssid;
485b874ddecSLior David 	u8 is_go;
486b874ddecSLior David 	u8 reserved[2];
4872be7d22fSVladimir Kondratiev } __packed;
4882be7d22fSVladimir Kondratiev 
489b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
490b8023177SVladimir Kondratiev enum wmi_port_role {
491b874ddecSLior David 	WMI_PORT_STA		= 0x00,
492b874ddecSLior David 	WMI_PORT_PCP		= 0x01,
493b874ddecSLior David 	WMI_PORT_AP		= 0x02,
494b874ddecSLior David 	WMI_PORT_P2P_DEV	= 0x03,
495b874ddecSLior David 	WMI_PORT_P2P_CLIENT	= 0x04,
496b874ddecSLior David 	WMI_PORT_P2P_GO		= 0x05,
497b8023177SVladimir Kondratiev };
498b8023177SVladimir Kondratiev 
499b874ddecSLior David /* WMI_PORT_ALLOCATE_CMDID */
500b8023177SVladimir Kondratiev struct wmi_port_allocate_cmd {
501b8023177SVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
502b8023177SVladimir Kondratiev 	u8 port_role;
5036c2faf09SVladimir Kondratiev 	u8 mid;
504b8023177SVladimir Kondratiev } __packed;
505b8023177SVladimir Kondratiev 
506b874ddecSLior David /* WMI_PORT_DELETE_CMDID */
507b874ddecSLior David struct wmi_port_delete_cmd {
508b8023177SVladimir Kondratiev 	u8 mid;
509b8023177SVladimir Kondratiev 	u8 reserved[3];
510b8023177SVladimir Kondratiev } __packed;
511b8023177SVladimir Kondratiev 
512fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
513fe9ee51eSMaya Erez enum wmi_wakeup_trigger {
514fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_UCAST	= 0x01,
515fe9ee51eSMaya Erez 	WMI_WAKEUP_TRIGGER_BCAST	= 0x02,
516fe9ee51eSMaya Erez };
517fe9ee51eSMaya Erez 
518fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_CMDID */
519fe9ee51eSMaya Erez struct wmi_traffic_suspend_cmd {
5200163b031SMaya Erez 	/* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
5210163b031SMaya Erez 	u8 wakeup_trigger;
5220163b031SMaya Erez } __packed;
5230163b031SMaya Erez 
524b874ddecSLior David /* WMI_P2P_CFG_CMDID */
525b8023177SVladimir Kondratiev enum wmi_discovery_mode {
526b874ddecSLior David 	WMI_DISCOVERY_MODE_NON_OFFLOAD	= 0x00,
527b874ddecSLior David 	WMI_DISCOVERY_MODE_OFFLOAD	= 0x01,
528b874ddecSLior David 	WMI_DISCOVERY_MODE_PEER2PEER	= 0x02,
529b8023177SVladimir Kondratiev };
530b8023177SVladimir Kondratiev 
531b8023177SVladimir Kondratiev struct wmi_p2p_cfg_cmd {
532b874ddecSLior David 	/* enum wmi_discovery_mode */
533b874ddecSLior David 	u8 discovery_mode;
534b8023177SVladimir Kondratiev 	u8 channel;
535b874ddecSLior David 	/* base to listen/search duration calculation */
536b874ddecSLior David 	__le16 bcon_interval;
537b8023177SVladimir Kondratiev } __packed;
538b8023177SVladimir Kondratiev 
539b874ddecSLior David /* WMI_POWER_MGMT_CFG_CMDID */
540b8023177SVladimir Kondratiev enum wmi_power_source_type {
541b874ddecSLior David 	WMI_POWER_SOURCE_BATTERY	= 0x00,
542b874ddecSLior David 	WMI_POWER_SOURCE_OTHER		= 0x01,
543b8023177SVladimir Kondratiev };
544b8023177SVladimir Kondratiev 
545b8023177SVladimir Kondratiev struct wmi_power_mgmt_cfg_cmd {
546b874ddecSLior David 	/* enum wmi_power_source_type */
547b874ddecSLior David 	u8 power_source;
548b8023177SVladimir Kondratiev 	u8 reserved[3];
549b8023177SVladimir Kondratiev } __packed;
550b8023177SVladimir Kondratiev 
551b874ddecSLior David /* WMI_PCP_START_CMDID */
552b8023177SVladimir Kondratiev struct wmi_pcp_start_cmd {
553b8023177SVladimir Kondratiev 	__le16 bcon_interval;
5546c2faf09SVladimir Kondratiev 	u8 pcp_max_assoc_sta;
5558e52fe30SHamad Kadmany 	u8 hidden_ssid;
556b874ddecSLior David 	u8 is_go;
557a52fb913SLior David 	u8 reserved0[5];
55890ffabb0SDedy Lansky 	/* A-BFT length override if non-0 */
559a52fb913SLior David 	u8 abft_len;
560849a564bSDedy Lansky 	u8 disable_ap_sme;
561b8023177SVladimir Kondratiev 	u8 network_type;
562b8023177SVladimir Kondratiev 	u8 channel;
563b8023177SVladimir Kondratiev 	u8 disable_sec_offload;
564b8023177SVladimir Kondratiev 	u8 disable_sec;
565b8023177SVladimir Kondratiev } __packed;
566b8023177SVladimir Kondratiev 
567b874ddecSLior David /* WMI_SW_TX_REQ_CMDID */
5682be7d22fSVladimir Kondratiev struct wmi_sw_tx_req_cmd {
5692be7d22fSVladimir Kondratiev 	u8 dst_mac[WMI_MAC_LEN];
5702be7d22fSVladimir Kondratiev 	__le16 len;
5712be7d22fSVladimir Kondratiev 	u8 payload[0];
5722be7d22fSVladimir Kondratiev } __packed;
5732be7d22fSVladimir Kondratiev 
5742be7d22fSVladimir Kondratiev struct wmi_sw_ring_cfg {
5752be7d22fSVladimir Kondratiev 	__le64 ring_mem_base;
5762be7d22fSVladimir Kondratiev 	__le16 ring_size;
5772be7d22fSVladimir Kondratiev 	__le16 max_mpdu_size;
5782be7d22fSVladimir Kondratiev } __packed;
5792be7d22fSVladimir Kondratiev 
580b874ddecSLior David /* wmi_vring_cfg_schd */
5812be7d22fSVladimir Kondratiev struct wmi_vring_cfg_schd {
5822be7d22fSVladimir Kondratiev 	__le16 priority;
5832be7d22fSVladimir Kondratiev 	__le16 timeslot_us;
5842be7d22fSVladimir Kondratiev } __packed;
5852be7d22fSVladimir Kondratiev 
5862be7d22fSVladimir Kondratiev enum wmi_vring_cfg_encap_trans_type {
587b874ddecSLior David 	WMI_VRING_ENC_TYPE_802_3	= 0x00,
588b874ddecSLior David 	WMI_VRING_ENC_TYPE_NATIVE_WIFI	= 0x01,
5892be7d22fSVladimir Kondratiev };
5902be7d22fSVladimir Kondratiev 
5912be7d22fSVladimir Kondratiev enum wmi_vring_cfg_ds_cfg {
592b874ddecSLior David 	WMI_VRING_DS_PBSS	= 0x00,
593b874ddecSLior David 	WMI_VRING_DS_STATION	= 0x01,
594b874ddecSLior David 	WMI_VRING_DS_AP		= 0x02,
595b874ddecSLior David 	WMI_VRING_DS_ADDR4	= 0x03,
5962be7d22fSVladimir Kondratiev };
5972be7d22fSVladimir Kondratiev 
5982be7d22fSVladimir Kondratiev enum wmi_vring_cfg_nwifi_ds_trans_type {
599b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_NO		= 0x00,
600b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_AP2PBSS		= 0x01,
601b874ddecSLior David 	WMI_NWIFI_TX_TRANS_MODE_STA2PBSS	= 0x02,
6022be7d22fSVladimir Kondratiev };
6032be7d22fSVladimir Kondratiev 
6042be7d22fSVladimir Kondratiev enum wmi_vring_cfg_schd_params_priority {
605b874ddecSLior David 	WMI_SCH_PRIO_REGULAR	= 0x00,
606b874ddecSLior David 	WMI_SCH_PRIO_HIGH	= 0x01,
6072be7d22fSVladimir Kondratiev };
6082be7d22fSVladimir Kondratiev 
6092be7d22fSVladimir Kondratiev #define CIDXTID_CID_POS				(0)
6102be7d22fSVladimir Kondratiev #define CIDXTID_CID_LEN				(4)
6112be7d22fSVladimir Kondratiev #define CIDXTID_CID_MSK				(0xF)
6122be7d22fSVladimir Kondratiev #define CIDXTID_TID_POS				(4)
6132be7d22fSVladimir Kondratiev #define CIDXTID_TID_LEN				(4)
6142be7d22fSVladimir Kondratiev #define CIDXTID_TID_MSK				(0xF0)
6152be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS	(0)
6162be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN	(1)
6172be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK	(0x1)
6182be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_POS		(1)
6192be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN		(1)
6202be7d22fSVladimir Kondratiev #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK		(0x2)
6212be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_POS	(0)
6222be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_LEN	(6)
6232be7d22fSVladimir Kondratiev #define VRING_CFG_TO_RESOLUTION_VALUE_MSK	(0x3F)
624b874ddecSLior David 
625b874ddecSLior David struct wmi_vring_cfg {
626b874ddecSLior David 	struct wmi_sw_ring_cfg tx_sw_ring;
627b874ddecSLior David 	/* 0-23 vrings */
628b874ddecSLior David 	u8 ringid;
629b874ddecSLior David 	u8 cidxtid;
630b874ddecSLior David 	u8 encap_trans_type;
631b874ddecSLior David 	/* 802.3 DS cfg */
632b874ddecSLior David 	u8 ds_cfg;
633b874ddecSLior David 	u8 nwifi_ds_trans_type;
634b874ddecSLior David 	u8 mac_ctrl;
6352be7d22fSVladimir Kondratiev 	u8 to_resolution;
6362be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
6372be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg_schd schd_params;
6382be7d22fSVladimir Kondratiev } __packed;
6392be7d22fSVladimir Kondratiev 
6402be7d22fSVladimir Kondratiev enum wmi_vring_cfg_cmd_action {
641b874ddecSLior David 	WMI_VRING_CMD_ADD	= 0x00,
642b874ddecSLior David 	WMI_VRING_CMD_MODIFY	= 0x01,
643b874ddecSLior David 	WMI_VRING_CMD_DELETE	= 0x02,
6442be7d22fSVladimir Kondratiev };
6452be7d22fSVladimir Kondratiev 
646b874ddecSLior David /* WMI_VRING_CFG_CMDID */
6472be7d22fSVladimir Kondratiev struct wmi_vring_cfg_cmd {
6482be7d22fSVladimir Kondratiev 	__le32 action;
6492be7d22fSVladimir Kondratiev 	struct wmi_vring_cfg vring_cfg;
6502be7d22fSVladimir Kondratiev } __packed;
6512be7d22fSVladimir Kondratiev 
65262bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg {
65362bfd300SVladimir Kondratiev 	struct wmi_sw_ring_cfg tx_sw_ring;
654b874ddecSLior David 	/* 0-23 vrings */
655b874ddecSLior David 	u8 ringid;
65662bfd300SVladimir Kondratiev 	u8 encap_trans_type;
657b874ddecSLior David 	/* 802.3 DS cfg */
658b874ddecSLior David 	u8 ds_cfg;
65962bfd300SVladimir Kondratiev 	u8 nwifi_ds_trans_type;
66062bfd300SVladimir Kondratiev } __packed;
66162bfd300SVladimir Kondratiev 
662b874ddecSLior David /* WMI_BCAST_VRING_CFG_CMDID */
66362bfd300SVladimir Kondratiev struct wmi_bcast_vring_cfg_cmd {
66462bfd300SVladimir Kondratiev 	__le32 action;
66562bfd300SVladimir Kondratiev 	struct wmi_bcast_vring_cfg vring_cfg;
66662bfd300SVladimir Kondratiev } __packed;
66762bfd300SVladimir Kondratiev 
668*761f8e4dSLazar Alexei /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
669*761f8e4dSLazar Alexei struct wmi_lo_power_calib_from_otp_cmd {
670*761f8e4dSLazar Alexei 	/* index to read from OTP. zero based */
671*761f8e4dSLazar Alexei 	u8 index;
672*761f8e4dSLazar Alexei 	u8 reserved[3];
673*761f8e4dSLazar Alexei } __packed;
674*761f8e4dSLazar Alexei 
675*761f8e4dSLazar Alexei /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
676*761f8e4dSLazar Alexei struct wmi_lo_power_calib_from_otp_event {
677*761f8e4dSLazar Alexei 	/* wmi_fw_status */
678*761f8e4dSLazar Alexei 	u8 status;
679*761f8e4dSLazar Alexei 	u8 reserved[3];
680*761f8e4dSLazar Alexei } __packed;
681*761f8e4dSLazar Alexei 
682b874ddecSLior David /* WMI_VRING_BA_EN_CMDID */
6832be7d22fSVladimir Kondratiev struct wmi_vring_ba_en_cmd {
6842be7d22fSVladimir Kondratiev 	u8 ringid;
6852be7d22fSVladimir Kondratiev 	u8 agg_max_wsize;
6862be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
687cbcf5866SVladimir Kondratiev 	u8 amsdu;
688b874ddecSLior David 	u8 reserved[3];
6892be7d22fSVladimir Kondratiev } __packed;
6902be7d22fSVladimir Kondratiev 
691b874ddecSLior David /* WMI_VRING_BA_DIS_CMDID */
6922be7d22fSVladimir Kondratiev struct wmi_vring_ba_dis_cmd {
6932be7d22fSVladimir Kondratiev 	u8 ringid;
6942be7d22fSVladimir Kondratiev 	u8 reserved;
6952be7d22fSVladimir Kondratiev 	__le16 reason;
6962be7d22fSVladimir Kondratiev } __packed;
6972be7d22fSVladimir Kondratiev 
698b874ddecSLior David /* WMI_NOTIFY_REQ_CMDID */
6992be7d22fSVladimir Kondratiev struct wmi_notify_req_cmd {
7002be7d22fSVladimir Kondratiev 	u8 cid;
701b8023177SVladimir Kondratiev 	u8 year;
702b8023177SVladimir Kondratiev 	u8 month;
703b8023177SVladimir Kondratiev 	u8 day;
7042be7d22fSVladimir Kondratiev 	__le32 interval_usec;
705b8023177SVladimir Kondratiev 	u8 hour;
706b8023177SVladimir Kondratiev 	u8 minute;
707b8023177SVladimir Kondratiev 	u8 second;
708b8023177SVladimir Kondratiev 	u8 miliseconds;
7092be7d22fSVladimir Kondratiev } __packed;
7102be7d22fSVladimir Kondratiev 
711b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
7122be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_mode {
713b874ddecSLior David 	WMI_SNIFFER_OFF	= 0x00,
714b874ddecSLior David 	WMI_SNIFFER_ON	= 0x01,
7152be7d22fSVladimir Kondratiev };
7162be7d22fSVladimir Kondratiev 
717*761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_TABLE */
718*761f8e4dSLazar Alexei enum wmi_silent_rssi_table {
719*761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_DEFAULT_DB		= 0x00,
720*761f8e4dSLazar Alexei 	RF_TEMPERATURE_CALIB_HIGH_POWER_DB	= 0x01,
721*761f8e4dSLazar Alexei };
722*761f8e4dSLazar Alexei 
723*761f8e4dSLazar Alexei /* WMI_SILENT_RSSI_STATUS */
724*761f8e4dSLazar Alexei enum wmi_silent_rssi_status {
725*761f8e4dSLazar Alexei 	SILENT_RSSI_SUCCESS	= 0x00,
726*761f8e4dSLazar Alexei 	SILENT_RSSI_FAILURE	= 0x01,
727*761f8e4dSLazar Alexei };
728*761f8e4dSLazar Alexei 
729*761f8e4dSLazar Alexei /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
730*761f8e4dSLazar Alexei struct wmi_set_active_silent_rssi_table_cmd {
731*761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
732*761f8e4dSLazar Alexei 	__le32 table;
733*761f8e4dSLazar Alexei } __packed;
734*761f8e4dSLazar Alexei 
7352be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_info_mode {
736b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_DISABLED	= 0x00,
737b874ddecSLior David 	WMI_SNIFFER_PHY_INFO_ENABLED	= 0x01,
7382be7d22fSVladimir Kondratiev };
7392be7d22fSVladimir Kondratiev 
7402be7d22fSVladimir Kondratiev enum wmi_sniffer_cfg_phy_support {
741b874ddecSLior David 	WMI_SNIFFER_CP		= 0x00,
742b874ddecSLior David 	WMI_SNIFFER_DP		= 0x01,
743b874ddecSLior David 	WMI_SNIFFER_BOTH_PHYS	= 0x02,
7442be7d22fSVladimir Kondratiev };
7452be7d22fSVladimir Kondratiev 
746b874ddecSLior David /* wmi_sniffer_cfg */
7472be7d22fSVladimir Kondratiev struct wmi_sniffer_cfg {
748b874ddecSLior David 	/* enum wmi_sniffer_cfg_mode */
749b874ddecSLior David 	__le32 mode;
750b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_info_mode */
751b874ddecSLior David 	__le32 phy_info_mode;
752b874ddecSLior David 	/* enum wmi_sniffer_cfg_phy_support */
753b874ddecSLior David 	__le32 phy_support;
7542be7d22fSVladimir Kondratiev 	u8 channel;
7552be7d22fSVladimir Kondratiev 	u8 reserved[3];
7562be7d22fSVladimir Kondratiev } __packed;
7572be7d22fSVladimir Kondratiev 
7582be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_action {
759b874ddecSLior David 	WMI_RX_CHAIN_ADD	= 0x00,
760b874ddecSLior David 	WMI_RX_CHAIN_DEL	= 0x01,
7612be7d22fSVladimir Kondratiev };
7622be7d22fSVladimir Kondratiev 
7632be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_decap_trans_type {
764b874ddecSLior David 	WMI_DECAP_TYPE_802_3		= 0x00,
765b874ddecSLior David 	WMI_DECAP_TYPE_NATIVE_WIFI	= 0x01,
766b874ddecSLior David 	WMI_DECAP_TYPE_NONE		= 0x02,
7672be7d22fSVladimir Kondratiev };
7682be7d22fSVladimir Kondratiev 
7692be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
770b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_NO		= 0x00,
771b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2AP		= 0x01,
772b874ddecSLior David 	WMI_NWIFI_RX_TRANS_MODE_PBSS2STA	= 0x02,
7732be7d22fSVladimir Kondratiev };
7742be7d22fSVladimir Kondratiev 
775b8023177SVladimir Kondratiev enum wmi_cfg_rx_chain_cmd_reorder_type {
776b874ddecSLior David 	WMI_RX_HW_REORDER	= 0x00,
777b874ddecSLior David 	WMI_RX_SW_REORDER	= 0x01,
778b8023177SVladimir Kondratiev };
779b8023177SVladimir Kondratiev 
7802be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS	(0)
7812be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN	(1)
7822be7d22fSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK	(0x1)
783c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS		(1)
784c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN		(1)
785c406ea7cSVladimir Kondratiev #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK		(0x2)
7862be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS		(0)
7872be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN		(1)
7882be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK		(0x1)
7892be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS		(1)
7902be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN		(1)
7912be7d22fSVladimir Kondratiev #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK		(0x2)
7922be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS			(0)
7932be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN			(1)
7942be7d22fSVladimir Kondratiev #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK			(0x1)
7952be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS		(1)
7962be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN		(1)
7972be7d22fSVladimir Kondratiev #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK		(0x2)
7982be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS		(0)
7992be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN		(1)
8002be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK		(0x1)
8012be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_POS			(1)
8022be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_LEN			(1)
8032be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_WB_THRSH_MSK			(0x2)
8042be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_POS		(2)
8052be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN		(1)
8062be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK		(0x4)
8072be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_POS		(3)
8082be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN		(1)
8092be7d22fSVladimir Kondratiev #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK		(0x8)
8102be7d22fSVladimir Kondratiev 
811b874ddecSLior David /* WMI_CFG_RX_CHAIN_CMDID */
812b874ddecSLior David struct wmi_cfg_rx_chain_cmd {
813b874ddecSLior David 	__le32 action;
814b874ddecSLior David 	struct wmi_sw_ring_cfg rx_sw_ring;
815b874ddecSLior David 	u8 mid;
816b874ddecSLior David 	u8 decap_trans_type;
817b874ddecSLior David 	u8 l2_802_3_offload_ctrl;
818b874ddecSLior David 	u8 l2_nwifi_offload_ctrl;
819b874ddecSLior David 	u8 vlan_id;
820b874ddecSLior David 	u8 nwifi_ds_trans_type;
821b874ddecSLior David 	u8 l3_l4_ctrl;
822b874ddecSLior David 	u8 ring_ctrl;
8232be7d22fSVladimir Kondratiev 	__le16 prefetch_thrsh;
8242be7d22fSVladimir Kondratiev 	__le16 wb_thrsh;
8252be7d22fSVladimir Kondratiev 	__le32 itr_value;
8262be7d22fSVladimir Kondratiev 	__le16 host_thrsh;
827b8023177SVladimir Kondratiev 	u8 reorder_type;
828b8023177SVladimir Kondratiev 	u8 reserved;
8292be7d22fSVladimir Kondratiev 	struct wmi_sniffer_cfg sniffer_cfg;
830b874ddecSLior David 	__le16 max_rx_pl_per_desc;
8312be7d22fSVladimir Kondratiev } __packed;
8322be7d22fSVladimir Kondratiev 
833b874ddecSLior David /* WMI_RCP_ADDBA_RESP_CMDID */
8342be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_cmd {
8352be7d22fSVladimir Kondratiev 	u8 cidxtid;
8362be7d22fSVladimir Kondratiev 	u8 dialog_token;
8372be7d22fSVladimir Kondratiev 	__le16 status_code;
838b874ddecSLior David 	/* ieee80211_ba_parameterset field to send */
839b874ddecSLior David 	__le16 ba_param_set;
8402be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
8412be7d22fSVladimir Kondratiev } __packed;
8422be7d22fSVladimir Kondratiev 
843b874ddecSLior David /* WMI_RCP_DELBA_CMDID */
8442be7d22fSVladimir Kondratiev struct wmi_rcp_delba_cmd {
8452be7d22fSVladimir Kondratiev 	u8 cidxtid;
8462be7d22fSVladimir Kondratiev 	u8 reserved;
8472be7d22fSVladimir Kondratiev 	__le16 reason;
8482be7d22fSVladimir Kondratiev } __packed;
8492be7d22fSVladimir Kondratiev 
850b874ddecSLior David /* WMI_RCP_ADDBA_REQ_CMDID */
8512be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_cmd {
8522be7d22fSVladimir Kondratiev 	u8 cidxtid;
8532be7d22fSVladimir Kondratiev 	u8 dialog_token;
8542be7d22fSVladimir Kondratiev 	/* ieee80211_ba_parameterset field as it received */
8552be7d22fSVladimir Kondratiev 	__le16 ba_param_set;
8562be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
8572be7d22fSVladimir Kondratiev 	/* ieee80211_ba_seqstrl field as it received */
8582be7d22fSVladimir Kondratiev 	__le16 ba_seq_ctrl;
8592be7d22fSVladimir Kondratiev } __packed;
8602be7d22fSVladimir Kondratiev 
861b874ddecSLior David /* WMI_SET_MAC_ADDRESS_CMDID */
8622be7d22fSVladimir Kondratiev struct wmi_set_mac_address_cmd {
8632be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
8642be7d22fSVladimir Kondratiev 	u8 reserved[2];
8652be7d22fSVladimir Kondratiev } __packed;
8662be7d22fSVladimir Kondratiev 
867b874ddecSLior David /* WMI_ECHO_CMDID
8682be7d22fSVladimir Kondratiev  * Check FW is alive
8692be7d22fSVladimir Kondratiev  * WMI_DEEP_ECHO_CMDID
8702be7d22fSVladimir Kondratiev  * Check FW and ucode are alive
8712be7d22fSVladimir Kondratiev  * Returned event: WMI_ECHO_RSP_EVENTID
8722be7d22fSVladimir Kondratiev  * same event for both commands
8732be7d22fSVladimir Kondratiev  */
8742be7d22fSVladimir Kondratiev struct wmi_echo_cmd {
8752be7d22fSVladimir Kondratiev 	__le32 value;
8762be7d22fSVladimir Kondratiev } __packed;
8772be7d22fSVladimir Kondratiev 
878*761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_CMDID
879*761f8e4dSLazar Alexei  * set FW time parameters used through RF resetting
880*761f8e4dSLazar Alexei  *  RF reset consists of bringing its power down for a period of time, then
881*761f8e4dSLazar Alexei  * bringing the power up
882*761f8e4dSLazar Alexei  * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
883*761f8e4dSLazar Alexei  */
884*761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_cmd {
885*761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR down,
886*761f8e4dSLazar Alexei 	 * set 0 for default
887*761f8e4dSLazar Alexei 	 */
888*761f8e4dSLazar Alexei 	__le16 down_delay_usec;
889*761f8e4dSLazar Alexei 	/* time in usec the FW waits after bringing the RF PWR up,
890*761f8e4dSLazar Alexei 	 * set 0 for default
891*761f8e4dSLazar Alexei 	 */
892*761f8e4dSLazar Alexei 	__le16 up_delay_usec;
893b874ddecSLior David } __packed;
894b874ddecSLior David 
895*761f8e4dSLazar Alexei /* \WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
896*761f8e4dSLazar Alexei  * This API controls the Tx and Rx gain over temperature.
897*761f8e4dSLazar Alexei  * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
898*761f8e4dSLazar Alexei  * It also controls the Tx gain index, by controlling the Rx to Tx gain index
899*761f8e4dSLazar Alexei  * offset.
900*761f8e4dSLazar Alexei  * The control is divided by 3 temperature values to 4 temperature ranges.
901*761f8e4dSLazar Alexei  * Each parameter uses its own temperature values.
902*761f8e4dSLazar Alexei  * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
903*761f8e4dSLazar Alexei  */
904*761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_cmd {
905*761f8e4dSLazar Alexei 	/* Temperature range for Tx D-type parameters */
906*761f8e4dSLazar Alexei 	u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
907*761f8e4dSLazar Alexei 	u8 reserved0;
908*761f8e4dSLazar Alexei 	/* Tx D-type values to be used for each temperature range */
909*761f8e4dSLazar Alexei 	__le32 tx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1];
910*761f8e4dSLazar Alexei 	/* Temperature range for Rx D-type parameters */
911*761f8e4dSLazar Alexei 	u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
912*761f8e4dSLazar Alexei 	u8 reserved1;
913*761f8e4dSLazar Alexei 	/* Rx D-type values to be used for each temperature range */
914*761f8e4dSLazar Alexei 	__le32 rx_dtype_conf[WMI_RF_DTYPE_LENGTH + 1];
915*761f8e4dSLazar Alexei 	/* Temperature range for Rx E-type parameters */
916*761f8e4dSLazar Alexei 	u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
917*761f8e4dSLazar Alexei 	u8 reserved2;
918*761f8e4dSLazar Alexei 	/* Rx E-type values to be used for each temperature range.
919*761f8e4dSLazar Alexei 	 * The last 4 values of any range are the first 4 values of the next
920*761f8e4dSLazar Alexei 	 * range and so on
921*761f8e4dSLazar Alexei 	 */
922*761f8e4dSLazar Alexei 	__le32 rx_etype_conf[WMI_RF_ETYPE_VAL_PER_RANGE + WMI_RF_ETYPE_LENGTH];
923*761f8e4dSLazar Alexei 	/* Temperature range for rx_2_tx_offs parameters */
924*761f8e4dSLazar Alexei 	u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
925*761f8e4dSLazar Alexei 	u8 reserved3;
926*761f8e4dSLazar Alexei 	/* Rx to Tx gain index offset */
927*761f8e4dSLazar Alexei 	s8 rx_2_tx_offs[WMI_RF_RX2TX_LENGTH + 1];
928*761f8e4dSLazar Alexei } __packed;
929*761f8e4dSLazar Alexei 
930*761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_READ_CMDID */
931*761f8e4dSLazar Alexei struct wmi_rf_xpm_read_cmd {
932*761f8e4dSLazar Alexei 	u8 rf_id;
933*761f8e4dSLazar Alexei 	u8 reserved[3];
934*761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
935*761f8e4dSLazar Alexei 	 * multiple of 8bits
936*761f8e4dSLazar Alexei 	 */
937*761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
938*761f8e4dSLazar Alexei 	__le32 num_bytes;
939*761f8e4dSLazar Alexei } __packed;
940*761f8e4dSLazar Alexei 
941*761f8e4dSLazar Alexei /* CMD: WMI_RF_XPM_WRITE_CMDID */
942*761f8e4dSLazar Alexei struct wmi_rf_xpm_write_cmd {
943*761f8e4dSLazar Alexei 	u8 rf_id;
944*761f8e4dSLazar Alexei 	u8 reserved0[3];
945*761f8e4dSLazar Alexei 	/* XPM bit start address in range [0,8191]bits - rounded by FW to
946*761f8e4dSLazar Alexei 	 * multiple of 8bits
947*761f8e4dSLazar Alexei 	 */
948*761f8e4dSLazar Alexei 	__le32 xpm_bit_address;
949*761f8e4dSLazar Alexei 	__le32 num_bytes;
950*761f8e4dSLazar Alexei 	/* boolean flag indicating whether FW should verify the write
951*761f8e4dSLazar Alexei 	 * operation
952*761f8e4dSLazar Alexei 	 */
953*761f8e4dSLazar Alexei 	u8 verify;
954*761f8e4dSLazar Alexei 	u8 reserved1[3];
955*761f8e4dSLazar Alexei 	/* actual size=num_bytes */
956*761f8e4dSLazar Alexei 	u8 data_bytes[0];
957b874ddecSLior David } __packed;
958b874ddecSLior David 
959b874ddecSLior David /* WMI_TEMP_SENSE_CMDID
960b8023177SVladimir Kondratiev  *
961b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
962b874ddecSLior David  *
963b874ddecSLior David  * Possible modes for temperature measurement
964b8023177SVladimir Kondratiev  */
9658c679675SVladimir Kondratiev enum wmi_temperature_measure_mode {
966b874ddecSLior David 	TEMPERATURE_USE_OLD_VALUE	= 0x01,
967b874ddecSLior David 	TEMPERATURE_MEASURE_NOW		= 0x02,
9688c679675SVladimir Kondratiev };
9698c679675SVladimir Kondratiev 
970b874ddecSLior David /* WMI_TEMP_SENSE_CMDID */
971b8023177SVladimir Kondratiev struct wmi_temp_sense_cmd {
9728c679675SVladimir Kondratiev 	__le32 measure_baseband_en;
9738c679675SVladimir Kondratiev 	__le32 measure_rf_en;
9748c679675SVladimir Kondratiev 	__le32 measure_mode;
975b8023177SVladimir Kondratiev } __packed;
976b8023177SVladimir Kondratiev 
977b874ddecSLior David enum wmi_pmc_op {
978b874ddecSLior David 	WMI_PMC_ALLOCATE	= 0x00,
979b874ddecSLior David 	WMI_PMC_RELEASE		= 0x01,
980dc16427bSVladimir Kondratiev };
981dc16427bSVladimir Kondratiev 
982b874ddecSLior David /* WMI_PMC_CMDID */
983dc16427bSVladimir Kondratiev struct wmi_pmc_cmd {
984b874ddecSLior David 	/* enum wmi_pmc_cmd_op_type */
985b874ddecSLior David 	u8 op;
986dc16427bSVladimir Kondratiev 	u8 reserved;
987dc16427bSVladimir Kondratiev 	__le16 ring_size;
988dc16427bSVladimir Kondratiev 	__le64 mem_base;
989dc16427bSVladimir Kondratiev } __packed;
990dc16427bSVladimir Kondratiev 
99108989f96SLior David enum wmi_aoa_meas_type {
99208989f96SLior David 	WMI_AOA_PHASE_MEAS	= 0x00,
99308989f96SLior David 	WMI_AOA_PHASE_AMP_MEAS	= 0x01,
99408989f96SLior David };
99508989f96SLior David 
99608989f96SLior David /* WMI_AOA_MEAS_CMDID */
99708989f96SLior David struct wmi_aoa_meas_cmd {
99808989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
99908989f96SLior David 	/* channels IDs:
100008989f96SLior David 	 * 0 - 58320 MHz
100108989f96SLior David 	 * 1 - 60480 MHz
100208989f96SLior David 	 * 2 - 62640 MHz
100308989f96SLior David 	 */
100408989f96SLior David 	u8 channel;
100508989f96SLior David 	/* enum wmi_aoa_meas_type */
100608989f96SLior David 	u8 aoa_meas_type;
100708989f96SLior David 	__le32 meas_rf_mask;
100808989f96SLior David } __packed;
100908989f96SLior David 
1010cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1011cbf795c1SLior David struct wmi_set_mgmt_retry_limit_cmd {
1012cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
1013cbf795c1SLior David 	u8 mgmt_retry_limit;
1014cbf795c1SLior David 	/* alignment to 32b */
1015cbf795c1SLior David 	u8 reserved[3];
1016cbf795c1SLior David } __packed;
1017cbf795c1SLior David 
101890ffabb0SDedy Lansky /* Zones: HIGH, MAX, CRITICAL */
101990ffabb0SDedy Lansky #define WMI_NUM_OF_TT_ZONES	(3)
102090ffabb0SDedy Lansky 
102190ffabb0SDedy Lansky struct wmi_tt_zone_limits {
102290ffabb0SDedy Lansky 	/* Above this temperature this zone is active */
102390ffabb0SDedy Lansky 	u8 temperature_high;
102490ffabb0SDedy Lansky 	/* Below this temperature the adjacent lower zone is active */
102590ffabb0SDedy Lansky 	u8 temperature_low;
102690ffabb0SDedy Lansky 	u8 reserved[2];
102790ffabb0SDedy Lansky } __packed;
102890ffabb0SDedy Lansky 
102990ffabb0SDedy Lansky /* Struct used for both configuration and status commands of thermal
103090ffabb0SDedy Lansky  * throttling
103190ffabb0SDedy Lansky  */
103290ffabb0SDedy Lansky struct wmi_tt_data {
103390ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for baseband */
103490ffabb0SDedy Lansky 	u8 bb_enabled;
103590ffabb0SDedy Lansky 	u8 reserved0[3];
103690ffabb0SDedy Lansky 	/* Define zones for baseband */
103790ffabb0SDedy Lansky 	struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
103890ffabb0SDedy Lansky 	/* Enable/Disable TT algorithm for radio */
103990ffabb0SDedy Lansky 	u8 rf_enabled;
104090ffabb0SDedy Lansky 	u8 reserved1[3];
104190ffabb0SDedy Lansky 	/* Define zones for all radio chips */
104290ffabb0SDedy Lansky 	struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
104390ffabb0SDedy Lansky } __packed;
104490ffabb0SDedy Lansky 
104590ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
104690ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_cmd {
104790ffabb0SDedy Lansky 	/* Command data */
104890ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
104990ffabb0SDedy Lansky } __packed;
105090ffabb0SDedy Lansky 
1051849a564bSDedy Lansky /* WMI_NEW_STA_CMDID */
1052849a564bSDedy Lansky struct wmi_new_sta_cmd {
1053849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1054849a564bSDedy Lansky 	u8 aid;
1055849a564bSDedy Lansky } __packed;
1056849a564bSDedy Lansky 
1057849a564bSDedy Lansky /* WMI_DEL_STA_CMDID */
1058849a564bSDedy Lansky struct wmi_del_sta_cmd {
1059849a564bSDedy Lansky 	u8 dst_mac[WMI_MAC_LEN];
1060849a564bSDedy Lansky 	__le16 disconnect_reason;
1061849a564bSDedy Lansky } __packed;
1062849a564bSDedy Lansky 
106308989f96SLior David enum wmi_tof_burst_duration {
106408989f96SLior David 	WMI_TOF_BURST_DURATION_250_USEC		= 2,
106508989f96SLior David 	WMI_TOF_BURST_DURATION_500_USEC		= 3,
106608989f96SLior David 	WMI_TOF_BURST_DURATION_1_MSEC		= 4,
106708989f96SLior David 	WMI_TOF_BURST_DURATION_2_MSEC		= 5,
106808989f96SLior David 	WMI_TOF_BURST_DURATION_4_MSEC		= 6,
106908989f96SLior David 	WMI_TOF_BURST_DURATION_8_MSEC		= 7,
107008989f96SLior David 	WMI_TOF_BURST_DURATION_16_MSEC		= 8,
107108989f96SLior David 	WMI_TOF_BURST_DURATION_32_MSEC		= 9,
107208989f96SLior David 	WMI_TOF_BURST_DURATION_64_MSEC		= 10,
107308989f96SLior David 	WMI_TOF_BURST_DURATION_128_MSEC		= 11,
107408989f96SLior David 	WMI_TOF_BURST_DURATION_NO_PREFERENCES	= 15,
107508989f96SLior David };
107608989f96SLior David 
107708989f96SLior David enum wmi_tof_session_start_flags {
107808989f96SLior David 	WMI_TOF_SESSION_START_FLAG_SECURED	= 0x1,
107908989f96SLior David 	WMI_TOF_SESSION_START_FLAG_ASAP		= 0x2,
108008989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCI_REQ	= 0x4,
108108989f96SLior David 	WMI_TOF_SESSION_START_FLAG_LCR_REQ	= 0x8,
108208989f96SLior David };
108308989f96SLior David 
108408989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
108508989f96SLior David struct wmi_ftm_dest_info {
108608989f96SLior David 	u8 channel;
108708989f96SLior David 	/* wmi_tof_session_start_flags_e */
108808989f96SLior David 	u8 flags;
108908989f96SLior David 	u8 initial_token;
109008989f96SLior David 	u8 num_of_ftm_per_burst;
109108989f96SLior David 	u8 num_of_bursts_exp;
109208989f96SLior David 	/* wmi_tof_burst_duration_e */
109308989f96SLior David 	u8 burst_duration;
109408989f96SLior David 	/* Burst Period indicate interval between two consecutive burst
109508989f96SLior David 	 * instances, in units of 100 ms
109608989f96SLior David 	 */
109708989f96SLior David 	__le16 burst_period;
109808989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
1099*761f8e4dSLazar Alexei 	u8 reserved;
1100*761f8e4dSLazar Alexei 	u8 num_burst_per_aoa_meas;
110108989f96SLior David } __packed;
110208989f96SLior David 
110308989f96SLior David /* WMI_TOF_SESSION_START_CMDID */
110408989f96SLior David struct wmi_tof_session_start_cmd {
110508989f96SLior David 	__le32 session_id;
1106*761f8e4dSLazar Alexei 	u8 reserved1;
110708989f96SLior David 	u8 aoa_type;
110808989f96SLior David 	__le16 num_of_dest;
110908989f96SLior David 	u8 reserved[4];
111008989f96SLior David 	struct wmi_ftm_dest_info ftm_dest_info[0];
111108989f96SLior David } __packed;
111208989f96SLior David 
1113*761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_CMDID */
1114*761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_cmd {
1115*761f8e4dSLazar Alexei 	u8 enable;
1116*761f8e4dSLazar Alexei 	u8 reserved[3];
1117*761f8e4dSLazar Alexei } __packed;
1118*761f8e4dSLazar Alexei 
111908989f96SLior David enum wmi_tof_channel_info_report_type {
112008989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_CIR			= 0x1,
112108989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_RSSI			= 0x2,
112208989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_SNR			= 0x4,
112308989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA		= 0x8,
112408989f96SLior David 	WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC	= 0x10,
112508989f96SLior David };
112608989f96SLior David 
112708989f96SLior David /* WMI_TOF_CHANNEL_INFO_CMDID */
112808989f96SLior David struct wmi_tof_channel_info_cmd {
112908989f96SLior David 	/* wmi_tof_channel_info_report_type_e */
113008989f96SLior David 	__le32 channel_info_report_request;
113108989f96SLior David } __packed;
113208989f96SLior David 
11338ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
11348ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_cmd {
11358ae5d62cSLior David 	/* TX delay offset */
11368ae5d62cSLior David 	__le32 tx_offset;
11378ae5d62cSLior David 	/* RX delay offset */
11388ae5d62cSLior David 	__le32 rx_offset;
1139*761f8e4dSLazar Alexei 	/* Mask to define which RFs to configure. 0 means all RFs */
1140*761f8e4dSLazar Alexei 	__le32 rf_mask;
1141*761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
1142*761f8e4dSLazar Alexei 	__le32 precursor;
1143*761f8e4dSLazar Alexei } __packed;
1144*761f8e4dSLazar Alexei 
1145*761f8e4dSLazar Alexei /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1146*761f8e4dSLazar Alexei struct wmi_tof_get_tx_rx_offset_cmd {
1147*761f8e4dSLazar Alexei 	/* rf index to read offsets from */
1148*761f8e4dSLazar Alexei 	u8 rf_index;
1149*761f8e4dSLazar Alexei 	u8 reserved[3];
1150*761f8e4dSLazar Alexei } __packed;
1151*761f8e4dSLazar Alexei 
1152*761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1153*761f8e4dSLazar Alexei struct wmi_map_mcs_to_schd_params {
1154*761f8e4dSLazar Alexei 	u8 mcs;
1155*761f8e4dSLazar Alexei 	/* time in usec from start slot to start tx flow - default 15 */
1156*761f8e4dSLazar Alexei 	u8 time_in_usec_before_initiate_tx;
1157*761f8e4dSLazar Alexei 	/* RD enable - if yes consider RD according to STA mcs */
1158*761f8e4dSLazar Alexei 	u8 rd_enabled;
1159*761f8e4dSLazar Alexei 	u8 reserved;
1160*761f8e4dSLazar Alexei 	/* time in usec from start slot to stop vring */
1161*761f8e4dSLazar Alexei 	__le16 time_in_usec_to_stop_vring;
1162*761f8e4dSLazar Alexei 	/* timeout to force flush from start of slot */
1163*761f8e4dSLazar Alexei 	__le16 flush_to_in_usec;
1164*761f8e4dSLazar Alexei 	/* per mcs the mac buffer limit size in bytes */
1165*761f8e4dSLazar Alexei 	__le32 mac_buff_size_in_bytes;
1166*761f8e4dSLazar Alexei } __packed;
1167*761f8e4dSLazar Alexei 
1168*761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1169*761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_complete_event {
1170*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1171*761f8e4dSLazar Alexei 	u8 status;
1172*761f8e4dSLazar Alexei 	u8 reserved[3];
1173*761f8e4dSLazar Alexei } __packed;
1174*761f8e4dSLazar Alexei 
1175*761f8e4dSLazar Alexei #define WMI_NUM_MCS	(13)
1176*761f8e4dSLazar Alexei 
1177*761f8e4dSLazar Alexei /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1178*761f8e4dSLazar Alexei struct wmi_fixed_scheduling_config_cmd {
1179*761f8e4dSLazar Alexei 	/* defaults in the SAS table */
1180*761f8e4dSLazar Alexei 	struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1181*761f8e4dSLazar Alexei 	/* default 150 uSec */
1182*761f8e4dSLazar Alexei 	__le16 max_sta_rd_ppdu_duration_in_usec;
1183*761f8e4dSLazar Alexei 	/* default 300 uSec */
1184*761f8e4dSLazar Alexei 	__le16 max_sta_grant_ppdu_duration_in_usec;
1185*761f8e4dSLazar Alexei 	/* default 1000 uSec */
1186*761f8e4dSLazar Alexei 	__le16 assoc_slot_duration_in_usec;
1187*761f8e4dSLazar Alexei 	/* default 360 uSec */
1188*761f8e4dSLazar Alexei 	__le16 virtual_slot_duration_in_usec;
1189*761f8e4dSLazar Alexei 	/* each this field value slots start with grant frame to the station
1190*761f8e4dSLazar Alexei 	 * - default 2
1191*761f8e4dSLazar Alexei 	 */
1192*761f8e4dSLazar Alexei 	u8 number_of_ap_slots_for_initiate_grant;
1193*761f8e4dSLazar Alexei 	u8 reserved[3];
1194*761f8e4dSLazar Alexei } __packed;
1195*761f8e4dSLazar Alexei 
1196*761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1197*761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_cmd {
1198*761f8e4dSLazar Alexei 	__le32 reserved;
1199*761f8e4dSLazar Alexei } __packed;
1200*761f8e4dSLazar Alexei 
1201*761f8e4dSLazar Alexei /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1202*761f8e4dSLazar Alexei struct wmi_enable_fixed_scheduling_complete_event {
1203*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1204*761f8e4dSLazar Alexei 	u8 status;
1205*761f8e4dSLazar Alexei 	u8 reserved[3];
1206*761f8e4dSLazar Alexei } __packed;
1207*761f8e4dSLazar Alexei 
1208*761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1209*761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_cmd {
1210*761f8e4dSLazar Alexei 	/* number of directed omnis at destination AP */
1211*761f8e4dSLazar Alexei 	u8 dest_ap_num_directed_omnis;
1212*761f8e4dSLazar Alexei 	u8 reserved[3];
1213*761f8e4dSLazar Alexei } __packed;
1214*761f8e4dSLazar Alexei 
1215*761f8e4dSLazar Alexei /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1216*761f8e4dSLazar Alexei struct wmi_set_multi_directed_omnis_config_event {
1217*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1218*761f8e4dSLazar Alexei 	u8 status;
1219*761f8e4dSLazar Alexei 	u8 reserved[3];
1220*761f8e4dSLazar Alexei } __packed;
1221*761f8e4dSLazar Alexei 
1222*761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1223*761f8e4dSLazar Alexei struct wmi_set_long_range_config_cmd {
1224*761f8e4dSLazar Alexei 	__le32 reserved;
1225*761f8e4dSLazar Alexei } __packed;
1226*761f8e4dSLazar Alexei 
1227*761f8e4dSLazar Alexei /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1228*761f8e4dSLazar Alexei struct wmi_set_long_range_config_complete_event {
1229*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1230*761f8e4dSLazar Alexei 	u8 status;
1231*761f8e4dSLazar Alexei 	u8 reserved[3];
12328ae5d62cSLior David } __packed;
12338ae5d62cSLior David 
1234b874ddecSLior David /* WMI Events
12352be7d22fSVladimir Kondratiev  * List of Events (target to host)
12362be7d22fSVladimir Kondratiev  */
12372be7d22fSVladimir Kondratiev enum wmi_event_id {
12382be7d22fSVladimir Kondratiev 	WMI_READY_EVENTID				= 0x1001,
12392be7d22fSVladimir Kondratiev 	WMI_CONNECT_EVENTID				= 0x1002,
12402be7d22fSVladimir Kondratiev 	WMI_DISCONNECT_EVENTID				= 0x1003,
1241b874ddecSLior David 	WMI_SCAN_COMPLETE_EVENTID			= 0x100A,
1242b874ddecSLior David 	WMI_REPORT_STATISTICS_EVENTID			= 0x100B,
12432be7d22fSVladimir Kondratiev 	WMI_RD_MEM_RSP_EVENTID				= 0x1800,
12442be7d22fSVladimir Kondratiev 	WMI_FW_READY_EVENTID				= 0x1801,
1245b874ddecSLior David 	WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID		= 0x200,
12462be7d22fSVladimir Kondratiev 	WMI_ECHO_RSP_EVENTID				= 0x1803,
1247*761f8e4dSLazar Alexei 	/* deprecated */
1248b874ddecSLior David 	WMI_FS_TUNE_DONE_EVENTID			= 0x180A,
1249*761f8e4dSLazar Alexei 	/* deprecated */
1250b874ddecSLior David 	WMI_CORR_MEASURE_EVENTID			= 0x180B,
1251b874ddecSLior David 	WMI_READ_RSSI_EVENTID				= 0x180C,
1252b874ddecSLior David 	WMI_TEMP_SENSE_DONE_EVENTID			= 0x180E,
1253b874ddecSLior David 	WMI_DC_CALIB_DONE_EVENTID			= 0x180F,
1254*761f8e4dSLazar Alexei 	/* deprecated */
12552be7d22fSVladimir Kondratiev 	WMI_IQ_TX_CALIB_DONE_EVENTID			= 0x1811,
1256*761f8e4dSLazar Alexei 	/* deprecated */
12572be7d22fSVladimir Kondratiev 	WMI_IQ_RX_CALIB_DONE_EVENTID			= 0x1812,
12582be7d22fSVladimir Kondratiev 	WMI_SET_WORK_MODE_DONE_EVENTID			= 0x1815,
12592be7d22fSVladimir Kondratiev 	WMI_LO_LEAKAGE_CALIB_DONE_EVENTID		= 0x1816,
1260*761f8e4dSLazar Alexei 	WMI_LO_POWER_CALIB_FROM_OTP_EVENTID		= 0x1817,
1261b874ddecSLior David 	WMI_SILENT_RSSI_CALIB_DONE_EVENTID		= 0x181D,
1262*761f8e4dSLazar Alexei 	/* deprecated */
1263b874ddecSLior David 	WMI_RF_RX_TEST_DONE_EVENTID			= 0x181E,
12642be7d22fSVladimir Kondratiev 	WMI_CFG_RX_CHAIN_DONE_EVENTID			= 0x1820,
12652be7d22fSVladimir Kondratiev 	WMI_VRING_CFG_DONE_EVENTID			= 0x1821,
12662be7d22fSVladimir Kondratiev 	WMI_BA_STATUS_EVENTID				= 0x1823,
12672be7d22fSVladimir Kondratiev 	WMI_RCP_ADDBA_REQ_EVENTID			= 0x1824,
1268230d8442SVladimir Kondratiev 	WMI_RCP_ADDBA_RESP_SENT_EVENTID			= 0x1825,
12692be7d22fSVladimir Kondratiev 	WMI_DELBA_EVENTID				= 0x1826,
12702be7d22fSVladimir Kondratiev 	WMI_GET_SSID_EVENTID				= 0x1828,
1271b874ddecSLior David 	WMI_GET_PCP_CHANNEL_EVENTID			= 0x182A,
1272b874ddecSLior David 	WMI_SW_TX_COMPLETE_EVENTID			= 0x182B,
1273230d8442SVladimir Kondratiev 	WMI_BEAMFORMING_MGMT_DONE_EVENTID		= 0x1836,
12742be7d22fSVladimir Kondratiev 	WMI_BF_TXSS_MGMT_DONE_EVENTID			= 0x1837,
12752be7d22fSVladimir Kondratiev 	WMI_BF_RXSS_MGMT_DONE_EVENTID			= 0x1839,
12762be7d22fSVladimir Kondratiev 	WMI_RS_MGMT_DONE_EVENTID			= 0x1852,
12772be7d22fSVladimir Kondratiev 	WMI_RF_MGMT_STATUS_EVENTID			= 0x1853,
12782be7d22fSVladimir Kondratiev 	WMI_BF_SM_MGMT_DONE_EVENTID			= 0x1838,
12792be7d22fSVladimir Kondratiev 	WMI_RX_MGMT_PACKET_EVENTID			= 0x1840,
12806c2faf09SVladimir Kondratiev 	WMI_TX_MGMT_PACKET_EVENTID			= 0x1841,
12810163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID	= 0x1842,
12820163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID		= 0x1843,
1283*761f8e4dSLazar Alexei 	WMI_RF_XPM_READ_RESULT_EVENTID			= 0x1856,
1284*761f8e4dSLazar Alexei 	WMI_RF_XPM_WRITE_RESULT_EVENTID			= 0x1857,
128510d599adSMaya Erez 	WMI_LED_CFG_DONE_EVENTID			= 0x1858,
1286*761f8e4dSLazar Alexei 	WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID		= 0x185C,
1287*761f8e4dSLazar Alexei 	WMI_RF_PWR_ON_DELAY_RSP_EVENTID			= 0x185D,
1288*761f8e4dSLazar Alexei 	WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID		= 0x185E,
12892be7d22fSVladimir Kondratiev 	/* Performance monitoring events */
12902be7d22fSVladimir Kondratiev 	WMI_DATA_PORT_OPEN_EVENTID			= 0x1860,
1291230d8442SVladimir Kondratiev 	WMI_WBE_LINK_DOWN_EVENTID			= 0x1861,
12922be7d22fSVladimir Kondratiev 	WMI_BF_CTRL_DONE_EVENTID			= 0x1862,
12932be7d22fSVladimir Kondratiev 	WMI_NOTIFY_REQ_DONE_EVENTID			= 0x1863,
12942be7d22fSVladimir Kondratiev 	WMI_GET_STATUS_DONE_EVENTID			= 0x1864,
1295230d8442SVladimir Kondratiev 	WMI_VRING_EN_EVENTID				= 0x1865,
12960163b031SMaya Erez 	WMI_GET_RF_STATUS_EVENTID			= 0x1866,
12970163b031SMaya Erez 	WMI_GET_BASEBAND_TYPE_EVENTID			= 0x1867,
12982be7d22fSVladimir Kondratiev 	WMI_UNIT_TEST_EVENTID				= 0x1900,
12992be7d22fSVladimir Kondratiev 	WMI_FLASH_READ_DONE_EVENTID			= 0x1902,
13002be7d22fSVladimir Kondratiev 	WMI_FLASH_WRITE_DONE_EVENTID			= 0x1903,
13010163b031SMaya Erez 	/* Power management */
1302fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_EVENTID			= 0x1904,
13030163b031SMaya Erez 	WMI_TRAFFIC_RESUME_EVENTID			= 0x1905,
1304b8023177SVladimir Kondratiev 	/* P2P */
13058c679675SVladimir Kondratiev 	WMI_P2P_CFG_DONE_EVENTID			= 0x1910,
1306b8023177SVladimir Kondratiev 	WMI_PORT_ALLOCATED_EVENTID			= 0x1911,
1307b8023177SVladimir Kondratiev 	WMI_PORT_DELETED_EVENTID			= 0x1912,
1308b8023177SVladimir Kondratiev 	WMI_LISTEN_STARTED_EVENTID			= 0x1914,
1309b8023177SVladimir Kondratiev 	WMI_SEARCH_STARTED_EVENTID			= 0x1915,
1310b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STARTED_EVENTID			= 0x1916,
1311b8023177SVladimir Kondratiev 	WMI_DISCOVERY_STOPPED_EVENTID			= 0x1917,
1312b8023177SVladimir Kondratiev 	WMI_PCP_STARTED_EVENTID				= 0x1918,
1313b8023177SVladimir Kondratiev 	WMI_PCP_STOPPED_EVENTID				= 0x1919,
1314b874ddecSLior David 	WMI_PCP_FACTOR_EVENTID				= 0x191A,
13150163b031SMaya Erez 	/* Power Save Configuration Events */
13160163b031SMaya Erez 	WMI_PS_DEV_PROFILE_CFG_EVENTID			= 0x191C,
13170163b031SMaya Erez 	WMI_RS_CFG_DONE_EVENTID				= 0x1921,
131808989f96SLior David 	WMI_GET_DETAILED_RS_RES_EVENTID			= 0x1922,
131908989f96SLior David 	WMI_AOA_MEAS_EVENTID				= 0x1923,
1320a52fb913SLior David 	WMI_BRP_SET_ANT_LIMIT_EVENTID			= 0x1924,
1321cbf795c1SLior David 	WMI_SET_MGMT_RETRY_LIMIT_EVENTID		= 0x1930,
1322cbf795c1SLior David 	WMI_GET_MGMT_RETRY_LIMIT_EVENTID		= 0x1931,
132390ffabb0SDedy Lansky 	WMI_SET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1940,
132490ffabb0SDedy Lansky 	WMI_GET_THERMAL_THROTTLING_CFG_EVENTID		= 0x1941,
1325*761f8e4dSLazar Alexei 	/* return the Power Save profile */
1326*761f8e4dSLazar Alexei 	WMI_PS_DEV_PROFILE_CFG_READ_EVENTID		= 0x1942,
132708989f96SLior David 	WMI_TOF_SESSION_END_EVENTID			= 0x1991,
132808989f96SLior David 	WMI_TOF_GET_CAPABILITIES_EVENTID		= 0x1992,
132908989f96SLior David 	WMI_TOF_SET_LCR_EVENTID				= 0x1993,
133008989f96SLior David 	WMI_TOF_SET_LCI_EVENTID				= 0x1994,
133108989f96SLior David 	WMI_TOF_FTM_PER_DEST_RES_EVENTID		= 0x1995,
1332*761f8e4dSLazar Alexei 	WMI_TOF_CFG_RESPONDER_EVENTID			= 0x1996,
13338ae5d62cSLior David 	WMI_TOF_SET_TX_RX_OFFSET_EVENTID		= 0x1997,
13348ae5d62cSLior David 	WMI_TOF_GET_TX_RX_OFFSET_EVENTID		= 0x1998,
1335*761f8e4dSLazar Alexei 	WMI_TOF_CHANNEL_INFO_EVENTID			= 0x1999,
1336cbf795c1SLior David 	WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A0,
1337cbf795c1SLior David 	WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID		= 0x19A1,
1338cbf795c1SLior David 	WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A2,
1339cbf795c1SLior David 	WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID	= 0x19A3,
1340cbf795c1SLior David 	WMI_SET_RF_SECTOR_ON_DONE_EVENTID		= 0x19A4,
13418ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_ORDER_EVENTID		= 0x19A5,
13428ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_NUMBER_EVENTID		= 0x19A6,
13438ae5d62cSLior David 	WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID	= 0x19A7,
1344*761f8e4dSLazar Alexei 	WMI_SCHEDULING_SCHEME_EVENTID			= 0x1A01,
1345*761f8e4dSLazar Alexei 	WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID	= 0x1A02,
1346*761f8e4dSLazar Alexei 	WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID	= 0x1A03,
1347*761f8e4dSLazar Alexei 	WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID	= 0x1A04,
1348*761f8e4dSLazar Alexei 	WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID	= 0x1A05,
13492be7d22fSVladimir Kondratiev 	WMI_SET_CHANNEL_EVENTID				= 0x9000,
13502be7d22fSVladimir Kondratiev 	WMI_ASSOC_REQ_EVENTID				= 0x9001,
13512be7d22fSVladimir Kondratiev 	WMI_EAPOL_RX_EVENTID				= 0x9002,
13522be7d22fSVladimir Kondratiev 	WMI_MAC_ADDR_RESP_EVENTID			= 0x9003,
13532be7d22fSVladimir Kondratiev 	WMI_FW_VER_EVENTID				= 0x9004,
1354b874ddecSLior David 	WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID		= 0x9005,
1355*761f8e4dSLazar Alexei 	WMI_COMMAND_NOT_SUPPORTED_EVENTID		= 0xFFFF,
13562be7d22fSVladimir Kondratiev };
13572be7d22fSVladimir Kondratiev 
1358b874ddecSLior David /* Events data structures */
1359b8023177SVladimir Kondratiev enum wmi_fw_status {
1360b874ddecSLior David 	WMI_FW_STATUS_SUCCESS	= 0x00,
1361b874ddecSLior David 	WMI_FW_STATUS_FAILURE	= 0x01,
1362b8023177SVladimir Kondratiev };
1363b8023177SVladimir Kondratiev 
1364b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
13652be7d22fSVladimir Kondratiev enum wmi_rf_status {
1366b874ddecSLior David 	WMI_RF_ENABLED		= 0x00,
1367b874ddecSLior David 	WMI_RF_DISABLED_HW	= 0x01,
1368b874ddecSLior David 	WMI_RF_DISABLED_SW	= 0x02,
1369b874ddecSLior David 	WMI_RF_DISABLED_HW_SW	= 0x03,
13702be7d22fSVladimir Kondratiev };
13712be7d22fSVladimir Kondratiev 
1372b874ddecSLior David /* WMI_RF_MGMT_STATUS_EVENTID */
13732be7d22fSVladimir Kondratiev struct wmi_rf_mgmt_status_event {
13742be7d22fSVladimir Kondratiev 	__le32 rf_status;
13752be7d22fSVladimir Kondratiev } __packed;
13762be7d22fSVladimir Kondratiev 
1377b874ddecSLior David /* WMI_GET_STATUS_DONE_EVENTID */
13782be7d22fSVladimir Kondratiev struct wmi_get_status_done_event {
13792be7d22fSVladimir Kondratiev 	__le32 is_associated;
13802be7d22fSVladimir Kondratiev 	u8 cid;
13812be7d22fSVladimir Kondratiev 	u8 reserved0[3];
13822be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
13832be7d22fSVladimir Kondratiev 	u8 channel;
13842be7d22fSVladimir Kondratiev 	u8 reserved1;
13852be7d22fSVladimir Kondratiev 	u8 network_type;
13862be7d22fSVladimir Kondratiev 	u8 reserved2[3];
13872be7d22fSVladimir Kondratiev 	__le32 ssid_len;
13882be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
13892be7d22fSVladimir Kondratiev 	__le32 rf_status;
13902be7d22fSVladimir Kondratiev 	__le32 is_secured;
13912be7d22fSVladimir Kondratiev } __packed;
13922be7d22fSVladimir Kondratiev 
1393b874ddecSLior David /* WMI_FW_VER_EVENTID */
13942be7d22fSVladimir Kondratiev struct wmi_fw_ver_event {
13950163b031SMaya Erez 	/* FW image version */
13960163b031SMaya Erez 	__le32 fw_major;
13970163b031SMaya Erez 	__le32 fw_minor;
13980163b031SMaya Erez 	__le32 fw_subminor;
13990163b031SMaya Erez 	__le32 fw_build;
14000163b031SMaya Erez 	/* FW image build time stamp */
14010163b031SMaya Erez 	__le32 hour;
14020163b031SMaya Erez 	__le32 minute;
14030163b031SMaya Erez 	__le32 second;
14040163b031SMaya Erez 	__le32 day;
14050163b031SMaya Erez 	__le32 month;
14060163b031SMaya Erez 	__le32 year;
14070163b031SMaya Erez 	/* Boot Loader image version */
14080163b031SMaya Erez 	__le32 bl_major;
14090163b031SMaya Erez 	__le32 bl_minor;
14100163b031SMaya Erez 	__le32 bl_subminor;
14110163b031SMaya Erez 	__le32 bl_build;
1412*761f8e4dSLazar Alexei 	/* The number of entries in the FW capabilities array */
141308989f96SLior David 	u8 fw_capabilities_len;
141408989f96SLior David 	u8 reserved[3];
141508989f96SLior David 	/* FW capabilities info
141608989f96SLior David 	 * Must be the last member of the struct
141708989f96SLior David 	 */
141808989f96SLior David 	__le32 fw_capabilities[0];
14190163b031SMaya Erez } __packed;
14200163b031SMaya Erez 
14210163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
14220163b031SMaya Erez enum rf_type {
14230163b031SMaya Erez 	RF_UNKNOWN	= 0x00,
14240163b031SMaya Erez 	RF_MARLON	= 0x01,
14250163b031SMaya Erez 	RF_SPARROW	= 0x02,
14260163b031SMaya Erez };
14270163b031SMaya Erez 
14280163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
14290163b031SMaya Erez enum board_file_rf_type {
14300163b031SMaya Erez 	BF_RF_MARLON	= 0x00,
14310163b031SMaya Erez 	BF_RF_SPARROW	= 0x01,
14320163b031SMaya Erez };
14330163b031SMaya Erez 
14340163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
14350163b031SMaya Erez enum rf_status {
14360163b031SMaya Erez 	RF_OK			= 0x00,
14370163b031SMaya Erez 	RF_NO_COMM		= 0x01,
14380163b031SMaya Erez 	RF_WRONG_BOARD_FILE	= 0x02,
14390163b031SMaya Erez };
14400163b031SMaya Erez 
14410163b031SMaya Erez /* WMI_GET_RF_STATUS_EVENTID */
14420163b031SMaya Erez struct wmi_get_rf_status_event {
14430163b031SMaya Erez 	/* enum rf_type */
14440163b031SMaya Erez 	__le32 rf_type;
14450163b031SMaya Erez 	/* attached RFs bit vector */
14460163b031SMaya Erez 	__le32 attached_rf_vector;
14470163b031SMaya Erez 	/* enabled RFs bit vector */
14480163b031SMaya Erez 	__le32 enabled_rf_vector;
14490163b031SMaya Erez 	/* enum rf_status, refers to enabled RFs */
14500163b031SMaya Erez 	u8 rf_status[32];
14510163b031SMaya Erez 	/* enum board file RF type */
14520163b031SMaya Erez 	__le32 board_file_rf_type;
14530163b031SMaya Erez 	/* board file platform type */
14540163b031SMaya Erez 	__le32 board_file_platform_type;
14550163b031SMaya Erez 	/* board file version */
14560163b031SMaya Erez 	__le32 board_file_version;
1457*761f8e4dSLazar Alexei 	/* enabled XIFs bit vector */
1458*761f8e4dSLazar Alexei 	__le32 enabled_xif_vector;
1459*761f8e4dSLazar Alexei 	__le32 reserved;
14600163b031SMaya Erez } __packed;
14610163b031SMaya Erez 
14620163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
14630163b031SMaya Erez enum baseband_type {
14640163b031SMaya Erez 	BASEBAND_UNKNOWN	= 0x00,
14650163b031SMaya Erez 	BASEBAND_SPARROW_M_A0	= 0x03,
14660163b031SMaya Erez 	BASEBAND_SPARROW_M_A1	= 0x04,
14670163b031SMaya Erez 	BASEBAND_SPARROW_M_B0	= 0x05,
14680163b031SMaya Erez 	BASEBAND_SPARROW_M_C0	= 0x06,
14690163b031SMaya Erez 	BASEBAND_SPARROW_M_D0	= 0x07,
14708ae5d62cSLior David 	BASEBAND_TALYN_M_A0	= 0x08,
14710163b031SMaya Erez };
14720163b031SMaya Erez 
14730163b031SMaya Erez /* WMI_GET_BASEBAND_TYPE_EVENTID */
14740163b031SMaya Erez struct wmi_get_baseband_type_event {
14750163b031SMaya Erez 	/* enum baseband_type */
14760163b031SMaya Erez 	__le32 baseband_type;
14772be7d22fSVladimir Kondratiev } __packed;
14782be7d22fSVladimir Kondratiev 
1479b874ddecSLior David /* WMI_MAC_ADDR_RESP_EVENTID */
14802be7d22fSVladimir Kondratiev struct wmi_mac_addr_resp_event {
14812be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
14822be7d22fSVladimir Kondratiev 	u8 auth_mode;
14832be7d22fSVladimir Kondratiev 	u8 crypt_mode;
14842be7d22fSVladimir Kondratiev 	__le32 offload_mode;
14852be7d22fSVladimir Kondratiev } __packed;
14862be7d22fSVladimir Kondratiev 
1487b874ddecSLior David /* WMI_EAPOL_RX_EVENTID */
14882be7d22fSVladimir Kondratiev struct wmi_eapol_rx_event {
14892be7d22fSVladimir Kondratiev 	u8 src_mac[WMI_MAC_LEN];
14902be7d22fSVladimir Kondratiev 	__le16 eapol_len;
14912be7d22fSVladimir Kondratiev 	u8 eapol[0];
14922be7d22fSVladimir Kondratiev } __packed;
14932be7d22fSVladimir Kondratiev 
1494b874ddecSLior David /* WMI_READY_EVENTID */
14952be7d22fSVladimir Kondratiev enum wmi_phy_capability {
1496b874ddecSLior David 	WMI_11A_CAPABILITY		= 0x01,
1497b874ddecSLior David 	WMI_11G_CAPABILITY		= 0x02,
1498b874ddecSLior David 	WMI_11AG_CAPABILITY		= 0x03,
1499b874ddecSLior David 	WMI_11NA_CAPABILITY		= 0x04,
1500b874ddecSLior David 	WMI_11NG_CAPABILITY		= 0x05,
1501b874ddecSLior David 	WMI_11NAG_CAPABILITY		= 0x06,
1502b874ddecSLior David 	WMI_11AD_CAPABILITY		= 0x07,
1503b874ddecSLior David 	WMI_11N_CAPABILITY_OFFSET	= 0x03,
15042be7d22fSVladimir Kondratiev };
15052be7d22fSVladimir Kondratiev 
15062be7d22fSVladimir Kondratiev struct wmi_ready_event {
15072be7d22fSVladimir Kondratiev 	__le32 sw_version;
15082be7d22fSVladimir Kondratiev 	__le32 abi_version;
15092be7d22fSVladimir Kondratiev 	u8 mac[WMI_MAC_LEN];
1510b874ddecSLior David 	/* enum wmi_phy_capability */
1511b874ddecSLior David 	u8 phy_capability;
1512b8023177SVladimir Kondratiev 	u8 numof_additional_mids;
1513*761f8e4dSLazar Alexei 	/* rfc read calibration result. 5..15 */
1514eb4c0215SDedy Lansky 	u8 rfc_read_calib_result;
1515eb4c0215SDedy Lansky 	u8 reserved[3];
15162be7d22fSVladimir Kondratiev } __packed;
15172be7d22fSVladimir Kondratiev 
1518b874ddecSLior David /* WMI_NOTIFY_REQ_DONE_EVENTID */
15192be7d22fSVladimir Kondratiev struct wmi_notify_req_done_event {
1520b874ddecSLior David 	/* beamforming status, 0: fail; 1: OK; 2: retrying */
1521b874ddecSLior David 	__le32 status;
15222be7d22fSVladimir Kondratiev 	__le64 tsf;
152330868f5dSDedy Lansky 	s8 rssi;
152430868f5dSDedy Lansky 	u8 reserved0[3];
15252be7d22fSVladimir Kondratiev 	__le32 tx_tpt;
15262be7d22fSVladimir Kondratiev 	__le32 tx_goodput;
15272be7d22fSVladimir Kondratiev 	__le32 rx_goodput;
15282be7d22fSVladimir Kondratiev 	__le16 bf_mcs;
15292be7d22fSVladimir Kondratiev 	__le16 my_rx_sector;
15302be7d22fSVladimir Kondratiev 	__le16 my_tx_sector;
15312be7d22fSVladimir Kondratiev 	__le16 other_rx_sector;
15322be7d22fSVladimir Kondratiev 	__le16 other_tx_sector;
15332be7d22fSVladimir Kondratiev 	__le16 range;
1534b8023177SVladimir Kondratiev 	u8 sqi;
1535b8023177SVladimir Kondratiev 	u8 reserved[3];
15362be7d22fSVladimir Kondratiev } __packed;
15372be7d22fSVladimir Kondratiev 
1538b874ddecSLior David /* WMI_CONNECT_EVENTID */
15392be7d22fSVladimir Kondratiev struct wmi_connect_event {
15402be7d22fSVladimir Kondratiev 	u8 channel;
15412be7d22fSVladimir Kondratiev 	u8 reserved0;
15422be7d22fSVladimir Kondratiev 	u8 bssid[WMI_MAC_LEN];
15432be7d22fSVladimir Kondratiev 	__le16 listen_interval;
15442be7d22fSVladimir Kondratiev 	__le16 beacon_interval;
15452be7d22fSVladimir Kondratiev 	u8 network_type;
15462be7d22fSVladimir Kondratiev 	u8 reserved1[3];
15472be7d22fSVladimir Kondratiev 	u8 beacon_ie_len;
15482be7d22fSVladimir Kondratiev 	u8 assoc_req_len;
15492be7d22fSVladimir Kondratiev 	u8 assoc_resp_len;
15502be7d22fSVladimir Kondratiev 	u8 cid;
1551a52fb913SLior David 	u8 aid;
1552a52fb913SLior David 	u8 reserved2[2];
1553b874ddecSLior David 	/* not in use */
15542be7d22fSVladimir Kondratiev 	u8 assoc_info[0];
15552be7d22fSVladimir Kondratiev } __packed;
15562be7d22fSVladimir Kondratiev 
1557849a564bSDedy Lansky /* disconnect_reason */
15582be7d22fSVladimir Kondratiev enum wmi_disconnect_reason {
1559b874ddecSLior David 	WMI_DIS_REASON_NO_NETWORK_AVAIL		= 0x01,
1560b874ddecSLior David 	/* bmiss */
1561b874ddecSLior David 	WMI_DIS_REASON_LOST_LINK		= 0x02,
1562b874ddecSLior David 	WMI_DIS_REASON_DISCONNECT_CMD		= 0x03,
1563b874ddecSLior David 	WMI_DIS_REASON_BSS_DISCONNECTED		= 0x04,
1564b874ddecSLior David 	WMI_DIS_REASON_AUTH_FAILED		= 0x05,
1565b874ddecSLior David 	WMI_DIS_REASON_ASSOC_FAILED		= 0x06,
1566b874ddecSLior David 	WMI_DIS_REASON_NO_RESOURCES_AVAIL	= 0x07,
1567b874ddecSLior David 	WMI_DIS_REASON_CSERV_DISCONNECT		= 0x08,
1568b874ddecSLior David 	WMI_DIS_REASON_INVALID_PROFILE		= 0x0A,
1569b874ddecSLior David 	WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH	= 0x0B,
1570b874ddecSLior David 	WMI_DIS_REASON_PROFILE_MISMATCH		= 0x0C,
1571b874ddecSLior David 	WMI_DIS_REASON_CONNECTION_EVICTED	= 0x0D,
1572b874ddecSLior David 	WMI_DIS_REASON_IBSS_MERGE		= 0x0E,
15732be7d22fSVladimir Kondratiev };
15742be7d22fSVladimir Kondratiev 
1575849a564bSDedy Lansky /* WMI_DISCONNECT_EVENTID */
15762be7d22fSVladimir Kondratiev struct wmi_disconnect_event {
1577b874ddecSLior David 	/* reason code, see 802.11 spec. */
1578b874ddecSLior David 	__le16 protocol_reason_status;
1579b874ddecSLior David 	/* set if known */
1580b874ddecSLior David 	u8 bssid[WMI_MAC_LEN];
1581b874ddecSLior David 	/* see enum wmi_disconnect_reason */
1582b874ddecSLior David 	u8 disconnect_reason;
1583b874ddecSLior David 	/* last assoc req may passed to host - not in used */
1584b874ddecSLior David 	u8 assoc_resp_len;
1585b874ddecSLior David 	/* last assoc req may passed to host - not in used */
1586b874ddecSLior David 	u8 assoc_info[0];
15872be7d22fSVladimir Kondratiev } __packed;
15882be7d22fSVladimir Kondratiev 
1589b874ddecSLior David /* WMI_SCAN_COMPLETE_EVENTID */
15906c2faf09SVladimir Kondratiev enum scan_status {
1591b874ddecSLior David 	WMI_SCAN_SUCCESS	= 0x00,
1592b874ddecSLior David 	WMI_SCAN_FAILED		= 0x01,
1593b874ddecSLior David 	WMI_SCAN_ABORTED	= 0x02,
1594b874ddecSLior David 	WMI_SCAN_REJECTED	= 0x03,
1595b874ddecSLior David 	WMI_SCAN_ABORT_REJECTED	= 0x04,
15966c2faf09SVladimir Kondratiev };
15976c2faf09SVladimir Kondratiev 
15982be7d22fSVladimir Kondratiev struct wmi_scan_complete_event {
1599b874ddecSLior David 	/* enum scan_status */
1600b874ddecSLior David 	__le32 status;
16012be7d22fSVladimir Kondratiev } __packed;
16022be7d22fSVladimir Kondratiev 
1603b874ddecSLior David /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
1604b874ddecSLior David enum wmi_acs_info_bitmask {
1605b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BEACON_FOUND	= 0x01,
1606b874ddecSLior David 	WMI_ACS_INFO_BITMASK_BUSY_TIME		= 0x02,
1607b874ddecSLior David 	WMI_ACS_INFO_BITMASK_TX_TIME		= 0x04,
1608b874ddecSLior David 	WMI_ACS_INFO_BITMASK_RX_TIME		= 0x08,
1609b874ddecSLior David 	WMI_ACS_INFO_BITMASK_NOISE		= 0x10,
16102be7d22fSVladimir Kondratiev };
16112be7d22fSVladimir Kondratiev 
1612b874ddecSLior David struct scan_acs_info {
1613b874ddecSLior David 	u8 channel;
1614b874ddecSLior David 	u8 beacon_found;
1615b874ddecSLior David 	/* msec */
1616b874ddecSLior David 	__le16 busy_time;
1617b874ddecSLior David 	__le16 tx_time;
1618b874ddecSLior David 	__le16 rx_time;
1619b874ddecSLior David 	u8 noise;
1620b874ddecSLior David 	u8 reserved[3];
1621b874ddecSLior David } __packed;
1622b874ddecSLior David 
1623b874ddecSLior David struct wmi_acs_passive_scan_complete_event {
1624b874ddecSLior David 	__le32 dwell_time;
1625b874ddecSLior David 	/* valid fields within channel info according to
1626b874ddecSLior David 	 * their appearance in struct order
1627b874ddecSLior David 	 */
1628b874ddecSLior David 	__le16 filled;
1629b874ddecSLior David 	u8 num_scanned_channels;
1630b874ddecSLior David 	u8 reserved;
1631b874ddecSLior David 	struct scan_acs_info scan_info_list[0];
1632b874ddecSLior David } __packed;
1633b874ddecSLior David 
1634b874ddecSLior David /* WMI_BA_STATUS_EVENTID */
1635b874ddecSLior David enum wmi_vring_ba_status {
1636b874ddecSLior David 	WMI_BA_AGREED			= 0x00,
1637b874ddecSLior David 	WMI_BA_NON_AGREED		= 0x01,
1638b874ddecSLior David 	/* BA_EN in middle of teardown flow */
1639b874ddecSLior David 	WMI_BA_TD_WIP			= 0x02,
1640b874ddecSLior David 	/* BA_DIS or BA_EN in middle of BA SETUP flow */
1641b874ddecSLior David 	WMI_BA_SETUP_WIP		= 0x03,
1642b874ddecSLior David 	/* BA_EN when the BA session is already active */
1643b874ddecSLior David 	WMI_BA_SESSION_ACTIVE		= 0x04,
1644b874ddecSLior David 	/* BA_DIS when the BA session is not active */
1645b874ddecSLior David 	WMI_BA_SESSION_NOT_ACTIVE	= 0x05,
1646b874ddecSLior David };
1647b874ddecSLior David 
1648b874ddecSLior David struct wmi_ba_status_event {
1649b874ddecSLior David 	/* enum wmi_vring_ba_status */
1650b874ddecSLior David 	__le16 status;
16512be7d22fSVladimir Kondratiev 	u8 reserved[2];
16522be7d22fSVladimir Kondratiev 	u8 ringid;
16532be7d22fSVladimir Kondratiev 	u8 agg_wsize;
16542be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
1655cbcf5866SVladimir Kondratiev 	u8 amsdu;
16562be7d22fSVladimir Kondratiev } __packed;
16572be7d22fSVladimir Kondratiev 
1658b874ddecSLior David /* WMI_DELBA_EVENTID */
16592be7d22fSVladimir Kondratiev struct wmi_delba_event {
16602be7d22fSVladimir Kondratiev 	u8 cidxtid;
16612be7d22fSVladimir Kondratiev 	u8 from_initiator;
16622be7d22fSVladimir Kondratiev 	__le16 reason;
16632be7d22fSVladimir Kondratiev } __packed;
16642be7d22fSVladimir Kondratiev 
1665b874ddecSLior David /* WMI_VRING_CFG_DONE_EVENTID */
16662be7d22fSVladimir Kondratiev struct wmi_vring_cfg_done_event {
16672be7d22fSVladimir Kondratiev 	u8 ringid;
16682be7d22fSVladimir Kondratiev 	u8 status;
16692be7d22fSVladimir Kondratiev 	u8 reserved[2];
16702be7d22fSVladimir Kondratiev 	__le32 tx_vring_tail_ptr;
16712be7d22fSVladimir Kondratiev } __packed;
16722be7d22fSVladimir Kondratiev 
1673b874ddecSLior David /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
16742be7d22fSVladimir Kondratiev struct wmi_rcp_addba_resp_sent_event {
16752be7d22fSVladimir Kondratiev 	u8 cidxtid;
16762be7d22fSVladimir Kondratiev 	u8 reserved;
16772be7d22fSVladimir Kondratiev 	__le16 status;
16782be7d22fSVladimir Kondratiev } __packed;
16792be7d22fSVladimir Kondratiev 
1680b874ddecSLior David /* WMI_RCP_ADDBA_REQ_EVENTID */
16812be7d22fSVladimir Kondratiev struct wmi_rcp_addba_req_event {
16822be7d22fSVladimir Kondratiev 	u8 cidxtid;
16832be7d22fSVladimir Kondratiev 	u8 dialog_token;
1684b874ddecSLior David 	/* ieee80211_ba_parameterset as it received */
1685b874ddecSLior David 	__le16 ba_param_set;
16862be7d22fSVladimir Kondratiev 	__le16 ba_timeout;
1687b874ddecSLior David 	/* ieee80211_ba_seqstrl field as it received */
1688b874ddecSLior David 	__le16 ba_seq_ctrl;
16892be7d22fSVladimir Kondratiev } __packed;
16902be7d22fSVladimir Kondratiev 
1691b874ddecSLior David /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
16922be7d22fSVladimir Kondratiev enum wmi_cfg_rx_chain_done_event_status {
1693b874ddecSLior David 	WMI_CFG_RX_CHAIN_SUCCESS	= 0x01,
16942be7d22fSVladimir Kondratiev };
16952be7d22fSVladimir Kondratiev 
16962be7d22fSVladimir Kondratiev struct wmi_cfg_rx_chain_done_event {
1697b874ddecSLior David 	/* V-Ring Tail pointer */
1698b874ddecSLior David 	__le32 rx_ring_tail_ptr;
16992be7d22fSVladimir Kondratiev 	__le32 status;
17002be7d22fSVladimir Kondratiev } __packed;
17012be7d22fSVladimir Kondratiev 
1702b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
17032be7d22fSVladimir Kondratiev enum wmi_wbe_link_down_event_reason {
1704b874ddecSLior David 	WMI_WBE_REASON_USER_REQUEST	= 0x00,
1705b874ddecSLior David 	WMI_WBE_REASON_RX_DISASSOC	= 0x01,
1706b874ddecSLior David 	WMI_WBE_REASON_BAD_PHY_LINK	= 0x02,
17072be7d22fSVladimir Kondratiev };
17082be7d22fSVladimir Kondratiev 
1709b874ddecSLior David /* WMI_WBE_LINK_DOWN_EVENTID */
17102be7d22fSVladimir Kondratiev struct wmi_wbe_link_down_event {
17112be7d22fSVladimir Kondratiev 	u8 cid;
17122be7d22fSVladimir Kondratiev 	u8 reserved[3];
17132be7d22fSVladimir Kondratiev 	__le32 reason;
17142be7d22fSVladimir Kondratiev } __packed;
17152be7d22fSVladimir Kondratiev 
1716b874ddecSLior David /* WMI_DATA_PORT_OPEN_EVENTID */
17172be7d22fSVladimir Kondratiev struct wmi_data_port_open_event {
17182be7d22fSVladimir Kondratiev 	u8 cid;
17192be7d22fSVladimir Kondratiev 	u8 reserved[3];
17202be7d22fSVladimir Kondratiev } __packed;
17212be7d22fSVladimir Kondratiev 
1722b874ddecSLior David /* WMI_VRING_EN_EVENTID */
1723230d8442SVladimir Kondratiev struct wmi_vring_en_event {
1724230d8442SVladimir Kondratiev 	u8 vring_index;
1725230d8442SVladimir Kondratiev 	u8 reserved[3];
1726230d8442SVladimir Kondratiev } __packed;
1727230d8442SVladimir Kondratiev 
1728b874ddecSLior David /* WMI_GET_PCP_CHANNEL_EVENTID */
17292be7d22fSVladimir Kondratiev struct wmi_get_pcp_channel_event {
17302be7d22fSVladimir Kondratiev 	u8 channel;
17312be7d22fSVladimir Kondratiev 	u8 reserved[3];
17322be7d22fSVladimir Kondratiev } __packed;
17332be7d22fSVladimir Kondratiev 
1734b874ddecSLior David /* WMI_P2P_CFG_DONE_EVENTID */
17358c679675SVladimir Kondratiev struct wmi_p2p_cfg_done_event {
1736b874ddecSLior David 	/* wmi_fw_status */
1737b874ddecSLior David 	u8 status;
17388c679675SVladimir Kondratiev 	u8 reserved[3];
17398c679675SVladimir Kondratiev } __packed;
17408c679675SVladimir Kondratiev 
1741b874ddecSLior David /* WMI_PORT_ALLOCATED_EVENTID */
1742b8023177SVladimir Kondratiev struct wmi_port_allocated_event {
1743b874ddecSLior David 	/* wmi_fw_status */
1744b874ddecSLior David 	u8 status;
1745b8023177SVladimir Kondratiev 	u8 reserved[3];
1746b8023177SVladimir Kondratiev } __packed;
1747b8023177SVladimir Kondratiev 
1748b874ddecSLior David /* WMI_PORT_DELETED_EVENTID */
1749b8023177SVladimir Kondratiev struct wmi_port_deleted_event {
1750b874ddecSLior David 	/* wmi_fw_status */
1751b874ddecSLior David 	u8 status;
1752b8023177SVladimir Kondratiev 	u8 reserved[3];
1753b8023177SVladimir Kondratiev } __packed;
1754b8023177SVladimir Kondratiev 
1755b874ddecSLior David /* WMI_LISTEN_STARTED_EVENTID */
1756b8023177SVladimir Kondratiev struct wmi_listen_started_event {
1757b874ddecSLior David 	/* wmi_fw_status */
1758b874ddecSLior David 	u8 status;
1759b8023177SVladimir Kondratiev 	u8 reserved[3];
1760b8023177SVladimir Kondratiev } __packed;
1761b8023177SVladimir Kondratiev 
1762b874ddecSLior David /* WMI_SEARCH_STARTED_EVENTID */
1763b8023177SVladimir Kondratiev struct wmi_search_started_event {
1764b874ddecSLior David 	/* wmi_fw_status */
1765b874ddecSLior David 	u8 status;
1766b8023177SVladimir Kondratiev 	u8 reserved[3];
1767b8023177SVladimir Kondratiev } __packed;
1768b8023177SVladimir Kondratiev 
1769b874ddecSLior David /* WMI_PCP_STARTED_EVENTID */
1770b8023177SVladimir Kondratiev struct wmi_pcp_started_event {
1771b874ddecSLior David 	/* wmi_fw_status */
1772b874ddecSLior David 	u8 status;
1773b8023177SVladimir Kondratiev 	u8 reserved[3];
1774b8023177SVladimir Kondratiev } __packed;
1775b8023177SVladimir Kondratiev 
1776b874ddecSLior David /* WMI_PCP_FACTOR_EVENTID */
1777b8023177SVladimir Kondratiev struct wmi_pcp_factor_event {
1778b8023177SVladimir Kondratiev 	__le32 pcp_factor;
1779b8023177SVladimir Kondratiev } __packed;
1780b8023177SVladimir Kondratiev 
17812be7d22fSVladimir Kondratiev enum wmi_sw_tx_status {
1782b874ddecSLior David 	WMI_TX_SW_STATUS_SUCCESS		= 0x00,
1783b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_NO_RESOURCES	= 0x01,
1784b874ddecSLior David 	WMI_TX_SW_STATUS_FAILED_TX		= 0x02,
17852be7d22fSVladimir Kondratiev };
17862be7d22fSVladimir Kondratiev 
1787b874ddecSLior David /* WMI_SW_TX_COMPLETE_EVENTID */
17882be7d22fSVladimir Kondratiev struct wmi_sw_tx_complete_event {
1789b874ddecSLior David 	/* enum wmi_sw_tx_status */
1790b874ddecSLior David 	u8 status;
17912be7d22fSVladimir Kondratiev 	u8 reserved[3];
17922be7d22fSVladimir Kondratiev } __packed;
17932be7d22fSVladimir Kondratiev 
1794*761f8e4dSLazar Alexei /* WMI_CORR_MEASURE_EVENTID - deprecated */
1795b8023177SVladimir Kondratiev struct wmi_corr_measure_event {
1796b874ddecSLior David 	/* signed */
1797b874ddecSLior David 	__le32 i;
1798b874ddecSLior David 	/* signed */
1799b874ddecSLior David 	__le32 q;
1800b874ddecSLior David 	/* signed */
1801b874ddecSLior David 	__le32 image_i;
1802b874ddecSLior David 	/* signed */
1803b874ddecSLior David 	__le32 image_q;
1804b8023177SVladimir Kondratiev } __packed;
1805b8023177SVladimir Kondratiev 
1806b874ddecSLior David /* WMI_READ_RSSI_EVENTID */
1807b8023177SVladimir Kondratiev struct wmi_read_rssi_event {
1808b8023177SVladimir Kondratiev 	__le32 ina_rssi_adc_dbm;
1809b8023177SVladimir Kondratiev } __packed;
1810b8023177SVladimir Kondratiev 
1811b874ddecSLior David /* WMI_GET_SSID_EVENTID */
18122be7d22fSVladimir Kondratiev struct wmi_get_ssid_event {
18132be7d22fSVladimir Kondratiev 	__le32 ssid_len;
18142be7d22fSVladimir Kondratiev 	u8 ssid[WMI_MAX_SSID_LEN];
18152be7d22fSVladimir Kondratiev } __packed;
18162be7d22fSVladimir Kondratiev 
1817b874ddecSLior David /* wmi_rx_mgmt_info */
18182be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_info {
18192be7d22fSVladimir Kondratiev 	u8 mcs;
182030868f5dSDedy Lansky 	s8 rssi;
1821b8023177SVladimir Kondratiev 	u8 range;
1822b8023177SVladimir Kondratiev 	u8 sqi;
18232be7d22fSVladimir Kondratiev 	__le16 stype;
18242be7d22fSVladimir Kondratiev 	__le16 status;
18252be7d22fSVladimir Kondratiev 	__le32 len;
1826b874ddecSLior David 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
18272be7d22fSVladimir Kondratiev 	u8 qid;
1828b874ddecSLior David 	/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
18292be7d22fSVladimir Kondratiev 	u8 mid;
18302be7d22fSVladimir Kondratiev 	u8 cid;
1831b874ddecSLior David 	/* From Radio MNGR */
1832b874ddecSLior David 	u8 channel;
18332be7d22fSVladimir Kondratiev } __packed;
18342be7d22fSVladimir Kondratiev 
1835*761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
1836*761f8e4dSLazar Alexei struct wmi_rf_xpm_read_result_event {
1837*761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
1838*761f8e4dSLazar Alexei 	u8 status;
1839*761f8e4dSLazar Alexei 	u8 reserved[3];
1840*761f8e4dSLazar Alexei 	/* requested num_bytes of data */
1841*761f8e4dSLazar Alexei 	u8 data_bytes[0];
1842b874ddecSLior David } __packed;
1843b874ddecSLior David 
1844*761f8e4dSLazar Alexei /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
1845*761f8e4dSLazar Alexei struct wmi_rf_xpm_write_result_event {
1846*761f8e4dSLazar Alexei 	/* enum wmi_fw_status_e - success=0 or fail=1 */
1847*761f8e4dSLazar Alexei 	u8 status;
1848*761f8e4dSLazar Alexei 	u8 reserved[3];
1849b874ddecSLior David } __packed;
1850b874ddecSLior David 
1851b874ddecSLior David /* WMI_TX_MGMT_PACKET_EVENTID */
18526c2faf09SVladimir Kondratiev struct wmi_tx_mgmt_packet_event {
18536c2faf09SVladimir Kondratiev 	u8 payload[0];
18546c2faf09SVladimir Kondratiev } __packed;
18556c2faf09SVladimir Kondratiev 
1856b874ddecSLior David /* WMI_RX_MGMT_PACKET_EVENTID */
18572be7d22fSVladimir Kondratiev struct wmi_rx_mgmt_packet_event {
18582be7d22fSVladimir Kondratiev 	struct wmi_rx_mgmt_info info;
18592be7d22fSVladimir Kondratiev 	u8 payload[0];
18602be7d22fSVladimir Kondratiev } __packed;
18612be7d22fSVladimir Kondratiev 
1862b874ddecSLior David /* WMI_ECHO_RSP_EVENTID */
1863b874ddecSLior David struct wmi_echo_rsp_event {
18642be7d22fSVladimir Kondratiev 	__le32 echoed_value;
18652be7d22fSVladimir Kondratiev } __packed;
18662be7d22fSVladimir Kondratiev 
1867*761f8e4dSLazar Alexei /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
1868*761f8e4dSLazar Alexei struct wmi_rf_pwr_on_delay_rsp_event {
1869*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1870*761f8e4dSLazar Alexei 	u8 status;
1871*761f8e4dSLazar Alexei 	u8 reserved[3];
1872*761f8e4dSLazar Alexei } __packed;
1873*761f8e4dSLazar Alexei 
1874*761f8e4dSLazar Alexei /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
1875*761f8e4dSLazar Alexei struct wmi_set_high_power_table_params_event {
1876*761f8e4dSLazar Alexei 	/* wmi_fw_status */
1877*761f8e4dSLazar Alexei 	u8 status;
1878*761f8e4dSLazar Alexei 	u8 reserved[3];
1879*761f8e4dSLazar Alexei } __packed;
1880*761f8e4dSLazar Alexei 
1881b874ddecSLior David /* WMI_TEMP_SENSE_DONE_EVENTID
1882b8023177SVladimir Kondratiev  *
1883b8023177SVladimir Kondratiev  * Measure MAC and radio temperatures
1884b8023177SVladimir Kondratiev  */
1885b8023177SVladimir Kondratiev struct wmi_temp_sense_done_event {
1886b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
1887b874ddecSLior David 	 * dividing the value by 1000)
1888b874ddecSLior David 	 */
18898c679675SVladimir Kondratiev 	__le32 baseband_t1000;
1890b874ddecSLior David 	/* Temperature times 1000 (actual temperature will be achieved by
1891b874ddecSLior David 	 * dividing the value by 1000)
1892b874ddecSLior David 	 */
18938c679675SVladimir Kondratiev 	__le32 rf_t1000;
1894b8023177SVladimir Kondratiev } __packed;
1895b8023177SVladimir Kondratiev 
1896b874ddecSLior David #define WMI_SCAN_DWELL_TIME_MS	(100)
1897b874ddecSLior David #define WMI_SURVEY_TIMEOUT_MS	(10000)
1898b874ddecSLior David 
1899b874ddecSLior David enum wmi_hidden_ssid {
1900b874ddecSLior David 	WMI_HIDDEN_SSID_DISABLED	= 0x00,
1901b874ddecSLior David 	WMI_HIDDEN_SSID_SEND_EMPTY	= 0x10,
1902b874ddecSLior David 	WMI_HIDDEN_SSID_CLEAR		= 0xFE,
1903b874ddecSLior David };
1904b874ddecSLior David 
190510d599adSMaya Erez /* WMI_LED_CFG_CMDID
190610d599adSMaya Erez  *
190710d599adSMaya Erez  * Configure LED On\Off\Blinking operation
190810d599adSMaya Erez  *
190910d599adSMaya Erez  * Returned events:
191010d599adSMaya Erez  * - WMI_LED_CFG_DONE_EVENTID
191110d599adSMaya Erez  */
191210d599adSMaya Erez enum led_mode {
191310d599adSMaya Erez 	LED_DISABLE	= 0x00,
191410d599adSMaya Erez 	LED_ENABLE	= 0x01,
191510d599adSMaya Erez };
191610d599adSMaya Erez 
191710d599adSMaya Erez /* The names of the led as
191810d599adSMaya Erez  * described on HW schemes.
191910d599adSMaya Erez  */
192010d599adSMaya Erez enum wmi_led_id {
192110d599adSMaya Erez 	WMI_LED_WLAN	= 0x00,
192210d599adSMaya Erez 	WMI_LED_WPAN	= 0x01,
192310d599adSMaya Erez 	WMI_LED_WWAN	= 0x02,
192410d599adSMaya Erez };
192510d599adSMaya Erez 
192610d599adSMaya Erez /* Led polarity mode. */
192710d599adSMaya Erez enum wmi_led_polarity {
192810d599adSMaya Erez 	LED_POLARITY_HIGH_ACTIVE	= 0x00,
192910d599adSMaya Erez 	LED_POLARITY_LOW_ACTIVE		= 0x01,
193010d599adSMaya Erez };
193110d599adSMaya Erez 
193210d599adSMaya Erez /* Combination of on and off
193310d599adSMaya Erez  * creates the blinking period
193410d599adSMaya Erez  */
193510d599adSMaya Erez struct wmi_led_blink_mode {
193610d599adSMaya Erez 	__le32 blink_on;
193710d599adSMaya Erez 	__le32 blink_off;
193810d599adSMaya Erez } __packed;
193910d599adSMaya Erez 
194010d599adSMaya Erez /* WMI_LED_CFG_CMDID */
194110d599adSMaya Erez struct wmi_led_cfg_cmd {
194210d599adSMaya Erez 	/* enum led_mode_e */
194310d599adSMaya Erez 	u8 led_mode;
194410d599adSMaya Erez 	/* enum wmi_led_id_e */
194510d599adSMaya Erez 	u8 id;
194610d599adSMaya Erez 	/* slow speed blinking combination */
194710d599adSMaya Erez 	struct wmi_led_blink_mode slow_blink_cfg;
194810d599adSMaya Erez 	/* medium speed blinking combination */
194910d599adSMaya Erez 	struct wmi_led_blink_mode medium_blink_cfg;
195010d599adSMaya Erez 	/* high speed blinking combination */
195110d599adSMaya Erez 	struct wmi_led_blink_mode fast_blink_cfg;
195210d599adSMaya Erez 	/* polarity of the led */
195310d599adSMaya Erez 	u8 led_polarity;
195410d599adSMaya Erez 	/* reserved */
195510d599adSMaya Erez 	u8 reserved;
195610d599adSMaya Erez } __packed;
195710d599adSMaya Erez 
1958*761f8e4dSLazar Alexei /* \WMI_SET_CONNECT_SNR_THR_CMDID */
1959*761f8e4dSLazar Alexei struct wmi_set_connect_snr_thr_cmd {
1960*761f8e4dSLazar Alexei 	u8 enable;
1961*761f8e4dSLazar Alexei 	u8 reserved;
1962*761f8e4dSLazar Alexei 	/* 1/4 Db units */
1963*761f8e4dSLazar Alexei 	__le16 omni_snr_thr;
1964*761f8e4dSLazar Alexei 	/* 1/4 Db units */
1965*761f8e4dSLazar Alexei 	__le16 direct_snr_thr;
1966*761f8e4dSLazar Alexei } __packed;
1967*761f8e4dSLazar Alexei 
196810d599adSMaya Erez /* WMI_LED_CFG_DONE_EVENTID */
196910d599adSMaya Erez struct wmi_led_cfg_done_event {
197010d599adSMaya Erez 	/* led config status */
197110d599adSMaya Erez 	__le32 status;
197210d599adSMaya Erez } __packed;
197310d599adSMaya Erez 
19740163b031SMaya Erez /* Rate search parameters configuration per connection */
19750163b031SMaya Erez struct wmi_rs_cfg {
19760163b031SMaya Erez 	/* The maximal allowed PER for each MCS
19770163b031SMaya Erez 	 * MCS will be considered as failed if PER during RS is higher
19780163b031SMaya Erez 	 */
19790163b031SMaya Erez 	u8 per_threshold[WMI_NUM_MCS];
19800163b031SMaya Erez 	/* Number of MPDUs for each MCS
19810163b031SMaya Erez 	 * this is the minimal statistic required to make an educated
19820163b031SMaya Erez 	 * decision
19830163b031SMaya Erez 	 */
19840163b031SMaya Erez 	u8 min_frame_cnt[WMI_NUM_MCS];
19850163b031SMaya Erez 	/* stop threshold [0-100] */
19860163b031SMaya Erez 	u8 stop_th;
19870163b031SMaya Erez 	/* MCS1 stop threshold [0-100] */
19880163b031SMaya Erez 	u8 mcs1_fail_th;
19890163b031SMaya Erez 	u8 max_back_failure_th;
19900163b031SMaya Erez 	/* Debug feature for disabling internal RS trigger (which is
19910163b031SMaya Erez 	 * currently triggered by BF Done)
19920163b031SMaya Erez 	 */
19930163b031SMaya Erez 	u8 dbg_disable_internal_trigger;
19940163b031SMaya Erez 	__le32 back_failure_mask;
19950163b031SMaya Erez 	__le32 mcs_en_vec;
19960163b031SMaya Erez } __packed;
19970163b031SMaya Erez 
1998*761f8e4dSLazar Alexei /* Slot types */
1999*761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_type {
2000*761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_SP		= 0x0,
2001*761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_CBAP		= 0x1,
2002*761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_IDLE		= 0x2,
2003*761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_ANNOUNCE_NO_ACK	= 0x3,
2004*761f8e4dSLazar Alexei 	WMI_SCHED_SLOT_DISCOVERY	= 0x4,
2005*761f8e4dSLazar Alexei };
2006*761f8e4dSLazar Alexei 
2007*761f8e4dSLazar Alexei enum wmi_sched_scheme_slot_flags {
2008*761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_SLOT_PERIODIC	= 0x1,
2009*761f8e4dSLazar Alexei };
2010*761f8e4dSLazar Alexei 
2011*761f8e4dSLazar Alexei struct wmi_sched_scheme_slot {
2012*761f8e4dSLazar Alexei 	/* in microsecond */
2013*761f8e4dSLazar Alexei 	__le32 tbtt_offset;
2014*761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_flags */
2015*761f8e4dSLazar Alexei 	u8 flags;
2016*761f8e4dSLazar Alexei 	/* wmi_sched_scheme_slot_type */
2017*761f8e4dSLazar Alexei 	u8 type;
2018*761f8e4dSLazar Alexei 	/* in microsecond */
2019*761f8e4dSLazar Alexei 	__le16 duration;
2020*761f8e4dSLazar Alexei 	/* frame_exchange_sequence_duration */
2021*761f8e4dSLazar Alexei 	__le16 tx_op;
2022*761f8e4dSLazar Alexei 	/* time in microseconds between two consecutive slots
2023*761f8e4dSLazar Alexei 	 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2024*761f8e4dSLazar Alexei 	 */
2025*761f8e4dSLazar Alexei 	__le16 period;
2026*761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2027*761f8e4dSLazar Alexei 	 * number of times to repeat allocation
2028*761f8e4dSLazar Alexei 	 */
2029*761f8e4dSLazar Alexei 	u8 num_of_blocks;
2030*761f8e4dSLazar Alexei 	/* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
2031*761f8e4dSLazar Alexei 	 * every idle_period allocation will be idle
2032*761f8e4dSLazar Alexei 	 */
2033*761f8e4dSLazar Alexei 	u8 idle_period;
2034*761f8e4dSLazar Alexei 	u8 src_aid;
2035*761f8e4dSLazar Alexei 	u8 dest_aid;
2036*761f8e4dSLazar Alexei 	__le32 reserved;
2037*761f8e4dSLazar Alexei } __packed;
2038*761f8e4dSLazar Alexei 
2039*761f8e4dSLazar Alexei enum wmi_sched_scheme_flags {
2040*761f8e4dSLazar Alexei 	/* should not be set when clearing scheduling scheme */
2041*761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_ENABLE		= 0x01,
2042*761f8e4dSLazar Alexei 	WMI_SCHED_PROTECTED_SP		= 0x02,
2043*761f8e4dSLazar Alexei 	/* should be set only on first WMI fragment of scheme */
2044*761f8e4dSLazar Alexei 	WMI_SCHED_FIRST			= 0x04,
2045*761f8e4dSLazar Alexei 	/* should be set only on last WMI fragment of scheme */
2046*761f8e4dSLazar Alexei 	WMI_SCHED_LAST			= 0x08,
2047*761f8e4dSLazar Alexei 	WMI_SCHED_IMMEDIATE_START	= 0x10,
2048*761f8e4dSLazar Alexei };
2049*761f8e4dSLazar Alexei 
2050*761f8e4dSLazar Alexei enum wmi_sched_scheme_advertisment {
2051*761f8e4dSLazar Alexei 	/* ESE is not advertised at all, STA has to be configured with WMI
2052*761f8e4dSLazar Alexei 	 * also
2053*761f8e4dSLazar Alexei 	 */
2054*761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_DISABLED		= 0x0,
2055*761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_BEACON		= 0x1,
2056*761f8e4dSLazar Alexei 	WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME	= 0x2,
2057*761f8e4dSLazar Alexei };
2058*761f8e4dSLazar Alexei 
2059*761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_CMD */
2060*761f8e4dSLazar Alexei struct wmi_scheduling_scheme_cmd {
2061*761f8e4dSLazar Alexei 	u8 serial_num;
2062*761f8e4dSLazar Alexei 	/* wmi_sched_scheme_advertisment */
2063*761f8e4dSLazar Alexei 	u8 ese_advertisment;
2064*761f8e4dSLazar Alexei 	/* wmi_sched_scheme_flags */
2065*761f8e4dSLazar Alexei 	__le16 flags;
2066*761f8e4dSLazar Alexei 	u8 num_allocs;
2067*761f8e4dSLazar Alexei 	u8 reserved[3];
2068*761f8e4dSLazar Alexei 	__le64 start_tbtt;
2069*761f8e4dSLazar Alexei 	/* allocations list */
2070*761f8e4dSLazar Alexei 	struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
2071*761f8e4dSLazar Alexei } __packed;
2072*761f8e4dSLazar Alexei 
2073*761f8e4dSLazar Alexei enum wmi_sched_scheme_failure_type {
2074*761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_NO_ERROR		= 0x00,
2075*761f8e4dSLazar Alexei 	WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR	= 0x01,
2076*761f8e4dSLazar Alexei };
2077*761f8e4dSLazar Alexei 
2078*761f8e4dSLazar Alexei /* WMI_SCHEDULING_SCHEME_EVENTID */
2079*761f8e4dSLazar Alexei struct wmi_scheduling_scheme_event {
2080*761f8e4dSLazar Alexei 	/* wmi_fw_status_e */
2081*761f8e4dSLazar Alexei 	u8 status;
2082*761f8e4dSLazar Alexei 	/* serial number given in command */
2083*761f8e4dSLazar Alexei 	u8 serial_num;
2084*761f8e4dSLazar Alexei 	/* wmi_sched_scheme_failure_type */
2085*761f8e4dSLazar Alexei 	u8 failure_type;
2086*761f8e4dSLazar Alexei 	/* alignment to 32b */
2087*761f8e4dSLazar Alexei 	u8 reserved[1];
2088*761f8e4dSLazar Alexei } __packed;
2089*761f8e4dSLazar Alexei 
20900163b031SMaya Erez /* WMI_RS_CFG_CMDID */
20910163b031SMaya Erez struct wmi_rs_cfg_cmd {
20920163b031SMaya Erez 	/* connection id */
20930163b031SMaya Erez 	u8 cid;
20940163b031SMaya Erez 	/* enable or disable rate search */
20950163b031SMaya Erez 	u8 rs_enable;
20960163b031SMaya Erez 	/* rate search configuration */
20970163b031SMaya Erez 	struct wmi_rs_cfg rs_cfg;
20980163b031SMaya Erez } __packed;
20990163b031SMaya Erez 
21000163b031SMaya Erez /* WMI_RS_CFG_DONE_EVENTID */
21010163b031SMaya Erez struct wmi_rs_cfg_done_event {
21020163b031SMaya Erez 	u8 cid;
21030163b031SMaya Erez 	/* enum wmi_fw_status */
21040163b031SMaya Erez 	u8 status;
21050163b031SMaya Erez 	u8 reserved[2];
21060163b031SMaya Erez } __packed;
21070163b031SMaya Erez 
210808989f96SLior David /* WMI_GET_DETAILED_RS_RES_CMDID */
210908989f96SLior David struct wmi_get_detailed_rs_res_cmd {
211008989f96SLior David 	/* connection id */
211108989f96SLior David 	u8 cid;
211208989f96SLior David 	u8 reserved[3];
211308989f96SLior David } __packed;
211408989f96SLior David 
211508989f96SLior David /* RS results status */
211608989f96SLior David enum wmi_rs_results_status {
211708989f96SLior David 	WMI_RS_RES_VALID	= 0x00,
211808989f96SLior David 	WMI_RS_RES_INVALID	= 0x01,
211908989f96SLior David };
212008989f96SLior David 
212108989f96SLior David /* Rate search results */
212208989f96SLior David struct wmi_rs_results {
212308989f96SLior David 	/* number of sent MPDUs */
212408989f96SLior David 	u8 num_of_tx_pkt[WMI_NUM_MCS];
212508989f96SLior David 	/* number of non-acked MPDUs */
212608989f96SLior David 	u8 num_of_non_acked_pkt[WMI_NUM_MCS];
212708989f96SLior David 	/* RS timestamp */
212808989f96SLior David 	__le32 tsf;
212908989f96SLior David 	/* RS selected MCS */
213008989f96SLior David 	u8 mcs;
213108989f96SLior David } __packed;
213208989f96SLior David 
213308989f96SLior David /* WMI_GET_DETAILED_RS_RES_EVENTID */
213408989f96SLior David struct wmi_get_detailed_rs_res_event {
213508989f96SLior David 	u8 cid;
213608989f96SLior David 	/* enum wmi_rs_results_status */
213708989f96SLior David 	u8 status;
213808989f96SLior David 	/* detailed rs results */
213908989f96SLior David 	struct wmi_rs_results rs_results;
214008989f96SLior David 	u8 reserved[3];
214108989f96SLior David } __packed;
214208989f96SLior David 
2143a52fb913SLior David /* BRP antenna limit mode */
2144a52fb913SLior David enum wmi_brp_ant_limit_mode {
2145a52fb913SLior David 	/* Disable BRP force antenna limit */
2146a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_DISABLE		= 0x00,
2147a52fb913SLior David 	/* Define maximal antennas limit. Only effective antennas will be
2148a52fb913SLior David 	 * actually used
2149a52fb913SLior David 	 */
2150a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE	= 0x01,
2151a52fb913SLior David 	/* Force a specific number of antennas */
2152a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODE_FORCE		= 0x02,
2153a52fb913SLior David 	/* number of BRP antenna limit modes */
2154a52fb913SLior David 	WMI_BRP_ANT_LIMIT_MODES_NUM		= 0x03,
2155a52fb913SLior David };
2156a52fb913SLior David 
2157a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_CMDID */
2158a52fb913SLior David struct wmi_brp_set_ant_limit_cmd {
2159a52fb913SLior David 	/* connection id */
2160a52fb913SLior David 	u8 cid;
2161a52fb913SLior David 	/* enum wmi_brp_ant_limit_mode */
2162a52fb913SLior David 	u8 limit_mode;
2163a52fb913SLior David 	/* antenna limit count, 1-27
2164a52fb913SLior David 	 * disable_mode - ignored
2165a52fb913SLior David 	 * effective_mode - upper limit to number of antennas to be used
2166a52fb913SLior David 	 * force_mode - exact number of antennas to be used
2167a52fb913SLior David 	 */
2168a52fb913SLior David 	u8 ant_limit;
2169a52fb913SLior David 	u8 reserved;
2170a52fb913SLior David } __packed;
2171a52fb913SLior David 
2172a52fb913SLior David /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
2173a52fb913SLior David struct wmi_brp_set_ant_limit_event {
2174a52fb913SLior David 	/* wmi_fw_status */
2175a52fb913SLior David 	u8 status;
2176a52fb913SLior David 	u8 reserved[3];
2177a52fb913SLior David } __packed;
2178a52fb913SLior David 
21790163b031SMaya Erez /* broadcast connection ID */
21800163b031SMaya Erez #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST	(0xFFFFFFFF)
21810163b031SMaya Erez 
21820163b031SMaya Erez /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
21830163b031SMaya Erez enum wmi_link_maintain_cfg_type {
21840163b031SMaya Erez 	/* AP/PCP default normal (non-FST) configuration settings */
21850163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP	= 0x00,
21860163b031SMaya Erez 	/* AP/PCP  default FST configuration settings */
21870163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP	= 0x01,
21880163b031SMaya Erez 	/* STA default normal (non-FST) configuration settings */
21890163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA	= 0x02,
21900163b031SMaya Erez 	/* STA default FST configuration settings */
21910163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA	= 0x03,
21920163b031SMaya Erez 	/* custom configuration settings */
21930163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM		= 0x04,
21940163b031SMaya Erez 	/* number of defined configuration types */
21950163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_TYPES_NUM			= 0x05,
21960163b031SMaya Erez };
21970163b031SMaya Erez 
21980163b031SMaya Erez /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
21990163b031SMaya Erez enum wmi_link_maintain_cfg_response_status {
22000163b031SMaya Erez 	/* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
22010163b031SMaya Erez 	 */
22020163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK		= 0x00,
22030163b031SMaya Erez 	/* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
22040163b031SMaya Erez 	 * command request
22050163b031SMaya Erez 	 */
22060163b031SMaya Erez 	WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT	= 0x01,
22070163b031SMaya Erez };
22080163b031SMaya Erez 
22090163b031SMaya Erez /* Link Loss and Keep Alive configuration */
22100163b031SMaya Erez struct wmi_link_maintain_cfg {
22110163b031SMaya Erez 	/* link_loss_enable_detectors_vec */
22120163b031SMaya Erez 	__le32 link_loss_enable_detectors_vec;
22130163b031SMaya Erez 	/* detectors check period usec */
22140163b031SMaya Erez 	__le32 check_link_loss_period_usec;
22150163b031SMaya Erez 	/* max allowed tx ageing */
22160163b031SMaya Erez 	__le32 tx_ageing_threshold_usec;
22170163b031SMaya Erez 	/* keep alive period for high SNR */
22180163b031SMaya Erez 	__le32 keep_alive_period_usec_high_snr;
22190163b031SMaya Erez 	/* keep alive period for low SNR */
22200163b031SMaya Erez 	__le32 keep_alive_period_usec_low_snr;
22210163b031SMaya Erez 	/* lower snr limit for keep alive period update */
22220163b031SMaya Erez 	__le32 keep_alive_snr_threshold_low_db;
22230163b031SMaya Erez 	/* upper snr limit for keep alive period update */
22240163b031SMaya Erez 	__le32 keep_alive_snr_threshold_high_db;
22250163b031SMaya Erez 	/* num of successive bad bcons causing link-loss */
22260163b031SMaya Erez 	__le32 bad_beacons_num_threshold;
22270163b031SMaya Erez 	/* SNR limit for bad_beacons_detector */
22280163b031SMaya Erez 	__le32 bad_beacons_snr_threshold_db;
22290163b031SMaya Erez } __packed;
22300163b031SMaya Erez 
22310163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
22320163b031SMaya Erez struct wmi_link_maintain_cfg_write_cmd {
22330163b031SMaya Erez 	/* enum wmi_link_maintain_cfg_type_e - type of requested default
22340163b031SMaya Erez 	 * configuration to be applied
22350163b031SMaya Erez 	 */
22360163b031SMaya Erez 	__le32 cfg_type;
22370163b031SMaya Erez 	/* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
22380163b031SMaya Erez 	__le32 cid;
22390163b031SMaya Erez 	/* custom configuration settings to be applied (relevant only if
22400163b031SMaya Erez 	 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
22410163b031SMaya Erez 	 */
22420163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
22430163b031SMaya Erez } __packed;
22440163b031SMaya Erez 
22450163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
22460163b031SMaya Erez struct wmi_link_maintain_cfg_read_cmd {
22470163b031SMaya Erez 	/* connection ID which configuration settings are requested */
22480163b031SMaya Erez 	__le32 cid;
22490163b031SMaya Erez } __packed;
22500163b031SMaya Erez 
22510163b031SMaya Erez /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
22520163b031SMaya Erez struct wmi_link_maintain_cfg_write_done_event {
22530163b031SMaya Erez 	/* requested connection ID */
22540163b031SMaya Erez 	__le32 cid;
22550163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - write status */
22560163b031SMaya Erez 	__le32 status;
22570163b031SMaya Erez } __packed;
22580163b031SMaya Erez 
22590163b031SMaya Erez /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
22600163b031SMaya Erez struct wmi_link_maintain_cfg_read_done_event {
22610163b031SMaya Erez 	/* requested connection ID */
22620163b031SMaya Erez 	__le32 cid;
22630163b031SMaya Erez 	/* wmi_link_maintain_cfg_response_status_e - read status */
22640163b031SMaya Erez 	__le32 status;
22650163b031SMaya Erez 	/* Retrieved configuration settings */
22660163b031SMaya Erez 	struct wmi_link_maintain_cfg lm_cfg;
22670163b031SMaya Erez } __packed;
22680163b031SMaya Erez 
2269fe9ee51eSMaya Erez enum wmi_traffic_suspend_status {
2270fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_APPROVED	= 0x0,
2271fe9ee51eSMaya Erez 	WMI_TRAFFIC_SUSPEND_REJECTED	= 0x1,
22720163b031SMaya Erez };
22730163b031SMaya Erez 
2274fe9ee51eSMaya Erez /* WMI_TRAFFIC_SUSPEND_EVENTID */
2275fe9ee51eSMaya Erez struct wmi_traffic_suspend_event {
2276fe9ee51eSMaya Erez 	/* enum wmi_traffic_suspend_status_e */
22770163b031SMaya Erez 	u8 status;
22780163b031SMaya Erez } __packed;
22790163b031SMaya Erez 
22800163b031SMaya Erez enum wmi_traffic_resume_status {
22810163b031SMaya Erez 	WMI_TRAFFIC_RESUME_SUCCESS	= 0x0,
22820163b031SMaya Erez 	WMI_TRAFFIC_RESUME_FAILED	= 0x1,
22830163b031SMaya Erez };
22840163b031SMaya Erez 
22850163b031SMaya Erez /* WMI_TRAFFIC_RESUME_EVENTID */
22860163b031SMaya Erez struct wmi_traffic_resume_event {
22870163b031SMaya Erez 	/* enum wmi_traffic_resume_status_e */
22880163b031SMaya Erez 	u8 status;
22890163b031SMaya Erez } __packed;
22900163b031SMaya Erez 
22910163b031SMaya Erez /* Power Save command completion status codes */
22920163b031SMaya Erez enum wmi_ps_cfg_cmd_status {
22930163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_SUCCESS	= 0x00,
22940163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_BAD_PARAM	= 0x01,
22950163b031SMaya Erez 	/* other error */
22960163b031SMaya Erez 	WMI_PS_CFG_CMD_STATUS_ERROR	= 0x02,
22970163b031SMaya Erez };
22980163b031SMaya Erez 
22990163b031SMaya Erez /* Device Power Save Profiles */
23000163b031SMaya Erez enum wmi_ps_profile_type {
23010163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_DEFAULT		= 0x00,
23020163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_PS_DISABLED		= 0x01,
23030163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_MAX_PS		= 0x02,
23040163b031SMaya Erez 	WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS	= 0x03,
23050163b031SMaya Erez };
23060163b031SMaya Erez 
2307*761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
2308*761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_cmd {
2309*761f8e4dSLazar Alexei 	/* reserved */
2310*761f8e4dSLazar Alexei 	__le32 reserved;
2311*761f8e4dSLazar Alexei } __packed;
2312*761f8e4dSLazar Alexei 
2313*761f8e4dSLazar Alexei /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
2314*761f8e4dSLazar Alexei struct wmi_ps_dev_profile_cfg_read_event {
2315*761f8e4dSLazar Alexei 	/* wmi_ps_profile_type_e */
2316*761f8e4dSLazar Alexei 	u8 ps_profile;
2317*761f8e4dSLazar Alexei 	u8 reserved[3];
2318*761f8e4dSLazar Alexei } __packed;
2319*761f8e4dSLazar Alexei 
23200163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_CMDID
23210163b031SMaya Erez  *
23220163b031SMaya Erez  * Power save profile to be used by the device
23230163b031SMaya Erez  *
23240163b031SMaya Erez  * Returned event:
23250163b031SMaya Erez  * - WMI_PS_DEV_PROFILE_CFG_EVENTID
23260163b031SMaya Erez  */
23270163b031SMaya Erez struct wmi_ps_dev_profile_cfg_cmd {
23280163b031SMaya Erez 	/* wmi_ps_profile_type_e */
23290163b031SMaya Erez 	u8 ps_profile;
23300163b031SMaya Erez 	u8 reserved[3];
23310163b031SMaya Erez } __packed;
23320163b031SMaya Erez 
23330163b031SMaya Erez /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
23340163b031SMaya Erez struct wmi_ps_dev_profile_cfg_event {
23350163b031SMaya Erez 	/* wmi_ps_cfg_cmd_status_e */
23360163b031SMaya Erez 	__le32 status;
23370163b031SMaya Erez } __packed;
23380163b031SMaya Erez 
23390163b031SMaya Erez enum wmi_ps_level {
23400163b031SMaya Erez 	WMI_PS_LEVEL_DEEP_SLEEP		= 0x00,
23410163b031SMaya Erez 	WMI_PS_LEVEL_SHALLOW_SLEEP	= 0x01,
23420163b031SMaya Erez 	/* awake = all PS mechanisms are disabled */
23430163b031SMaya Erez 	WMI_PS_LEVEL_AWAKE		= 0x02,
23440163b031SMaya Erez };
23450163b031SMaya Erez 
23460163b031SMaya Erez enum wmi_ps_deep_sleep_clk_level {
23470163b031SMaya Erez 	/* 33k */
23480163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC		= 0x00,
23490163b031SMaya Erez 	/* 10k */
23500163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC		= 0x01,
23510163b031SMaya Erez 	/* @RTC Low latency */
23520163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT	= 0x02,
23530163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL	= 0x03,
23540163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK	= 0x04,
23550163b031SMaya Erez 	/* Not Applicable */
23560163b031SMaya Erez 	WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A		= 0xFF,
23570163b031SMaya Erez };
23580163b031SMaya Erez 
23590163b031SMaya Erez /* Response by the FW to a D3 entry request */
23600163b031SMaya Erez enum wmi_ps_d3_resp_policy {
23610163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DEFAULT	= 0x00,
23620163b031SMaya Erez 	/* debug -D3 req is always denied */
23630163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_DENIED	= 0x01,
23640163b031SMaya Erez 	/* debug -D3 req is always approved */
23650163b031SMaya Erez 	WMI_PS_D3_RESP_POLICY_APPROVED	= 0x02,
23660163b031SMaya Erez };
23670163b031SMaya Erez 
236808989f96SLior David #define WMI_AOA_MAX_DATA_SIZE	(128)
236908989f96SLior David 
237008989f96SLior David enum wmi_aoa_meas_status {
237108989f96SLior David 	WMI_AOA_MEAS_SUCCESS		= 0x00,
237208989f96SLior David 	WMI_AOA_MEAS_PEER_INCAPABLE	= 0x01,
237308989f96SLior David 	WMI_AOA_MEAS_FAILURE		= 0x02,
237408989f96SLior David };
237508989f96SLior David 
237608989f96SLior David /* WMI_AOA_MEAS_EVENTID */
237708989f96SLior David struct wmi_aoa_meas_event {
237808989f96SLior David 	u8 mac_addr[WMI_MAC_LEN];
237908989f96SLior David 	/* channels IDs:
238008989f96SLior David 	 * 0 - 58320 MHz
238108989f96SLior David 	 * 1 - 60480 MHz
238208989f96SLior David 	 * 2 - 62640 MHz
238308989f96SLior David 	 */
238408989f96SLior David 	u8 channel;
238508989f96SLior David 	/* enum wmi_aoa_meas_type */
238608989f96SLior David 	u8 aoa_meas_type;
238708989f96SLior David 	/* Measurments are from RFs, defined by the mask */
238808989f96SLior David 	__le32 meas_rf_mask;
238908989f96SLior David 	/* enum wmi_aoa_meas_status */
239008989f96SLior David 	u8 meas_status;
239108989f96SLior David 	u8 reserved;
239208989f96SLior David 	/* Length of meas_data in bytes */
239308989f96SLior David 	__le16 length;
239408989f96SLior David 	u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
239508989f96SLior David } __packed;
239608989f96SLior David 
2397cbf795c1SLior David /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
2398cbf795c1SLior David struct wmi_set_mgmt_retry_limit_event {
2399cbf795c1SLior David 	/* enum wmi_fw_status */
2400cbf795c1SLior David 	u8 status;
2401cbf795c1SLior David 	/* alignment to 32b */
2402cbf795c1SLior David 	u8 reserved[3];
2403cbf795c1SLior David } __packed;
2404cbf795c1SLior David 
2405cbf795c1SLior David /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
2406cbf795c1SLior David struct wmi_get_mgmt_retry_limit_event {
2407cbf795c1SLior David 	/* MAC retransmit limit for mgmt frames */
2408cbf795c1SLior David 	u8 mgmt_retry_limit;
2409cbf795c1SLior David 	/* alignment to 32b */
2410cbf795c1SLior David 	u8 reserved[3];
2411cbf795c1SLior David } __packed;
2412cbf795c1SLior David 
241308989f96SLior David /* WMI_TOF_GET_CAPABILITIES_EVENTID */
241408989f96SLior David struct wmi_tof_get_capabilities_event {
241508989f96SLior David 	u8 ftm_capability;
241608989f96SLior David 	/* maximum supported number of destination to start TOF */
241708989f96SLior David 	u8 max_num_of_dest;
241808989f96SLior David 	/* maximum supported number of measurements per burst */
241908989f96SLior David 	u8 max_num_of_meas_per_burst;
242008989f96SLior David 	u8 reserved;
242108989f96SLior David 	/* maximum supported multi bursts */
242208989f96SLior David 	__le16 max_multi_bursts_sessions;
242308989f96SLior David 	/* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
242408989f96SLior David 	__le16 max_ftm_burst_duration;
242508989f96SLior David 	/* AOA supported types */
242608989f96SLior David 	__le32 aoa_supported_types;
242708989f96SLior David } __packed;
242808989f96SLior David 
242990ffabb0SDedy Lansky /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
243090ffabb0SDedy Lansky struct wmi_set_thermal_throttling_cfg_event {
243190ffabb0SDedy Lansky 	/* wmi_fw_status */
243290ffabb0SDedy Lansky 	u8 status;
243390ffabb0SDedy Lansky 	u8 reserved[3];
243490ffabb0SDedy Lansky } __packed;
243590ffabb0SDedy Lansky 
243690ffabb0SDedy Lansky /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
243790ffabb0SDedy Lansky struct wmi_get_thermal_throttling_cfg_event {
243890ffabb0SDedy Lansky 	/* Status data */
243990ffabb0SDedy Lansky 	struct wmi_tt_data tt_data;
244090ffabb0SDedy Lansky } __packed;
244190ffabb0SDedy Lansky 
244208989f96SLior David enum wmi_tof_session_end_status {
244308989f96SLior David 	WMI_TOF_SESSION_END_NO_ERROR		= 0x00,
244408989f96SLior David 	WMI_TOF_SESSION_END_FAIL		= 0x01,
244508989f96SLior David 	WMI_TOF_SESSION_END_PARAMS_ERROR	= 0x02,
244608989f96SLior David 	WMI_TOF_SESSION_END_ABORTED		= 0x03,
244708989f96SLior David };
244808989f96SLior David 
244908989f96SLior David /* WMI_TOF_SESSION_END_EVENTID */
245008989f96SLior David struct wmi_tof_session_end_event {
245108989f96SLior David 	/* FTM session ID */
245208989f96SLior David 	__le32 session_id;
245308989f96SLior David 	/* wmi_tof_session_end_status_e */
245408989f96SLior David 	u8 status;
245508989f96SLior David 	u8 reserved[3];
245608989f96SLior David } __packed;
245708989f96SLior David 
2458*761f8e4dSLazar Alexei /* WMI_TOF_SET_LCI_EVENTID */
2459*761f8e4dSLazar Alexei struct wmi_tof_set_lci_event {
2460*761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
2461*761f8e4dSLazar Alexei 	u8 status;
2462*761f8e4dSLazar Alexei 	u8 reserved[3];
2463*761f8e4dSLazar Alexei } __packed;
2464*761f8e4dSLazar Alexei 
2465*761f8e4dSLazar Alexei /* WMI_TOF_SET_LCR_EVENTID */
2466*761f8e4dSLazar Alexei struct wmi_tof_set_lcr_event {
2467*761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
2468*761f8e4dSLazar Alexei 	u8 status;
2469*761f8e4dSLazar Alexei 	u8 reserved[3];
2470*761f8e4dSLazar Alexei } __packed;
2471*761f8e4dSLazar Alexei 
247208989f96SLior David /* Responder FTM Results */
247308989f96SLior David struct wmi_responder_ftm_res {
247408989f96SLior David 	u8 t1[6];
247508989f96SLior David 	u8 t2[6];
247608989f96SLior David 	u8 t3[6];
247708989f96SLior David 	u8 t4[6];
247808989f96SLior David 	__le16 tod_err;
247908989f96SLior David 	__le16 toa_err;
248008989f96SLior David 	__le16 tod_err_initiator;
248108989f96SLior David 	__le16 toa_err_initiator;
248208989f96SLior David } __packed;
248308989f96SLior David 
248408989f96SLior David enum wmi_tof_ftm_per_dest_res_status {
248508989f96SLior David 	WMI_PER_DEST_RES_NO_ERROR		= 0x00,
248608989f96SLior David 	WMI_PER_DEST_RES_TX_RX_FAIL		= 0x01,
248708989f96SLior David 	WMI_PER_DEST_RES_PARAM_DONT_MATCH	= 0x02,
248808989f96SLior David };
248908989f96SLior David 
249008989f96SLior David enum wmi_tof_ftm_per_dest_res_flags {
249108989f96SLior David 	WMI_PER_DEST_RES_REQ_START		= 0x01,
249208989f96SLior David 	WMI_PER_DEST_RES_BURST_REPORT_END	= 0x02,
249308989f96SLior David 	WMI_PER_DEST_RES_REQ_END		= 0x04,
249408989f96SLior David 	WMI_PER_DEST_RES_PARAM_UPDATE		= 0x08,
249508989f96SLior David };
249608989f96SLior David 
249708989f96SLior David /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
249808989f96SLior David struct wmi_tof_ftm_per_dest_res_event {
249908989f96SLior David 	/* FTM session ID */
250008989f96SLior David 	__le32 session_id;
250108989f96SLior David 	/* destination MAC address */
250208989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
250308989f96SLior David 	/* wmi_tof_ftm_per_dest_res_flags_e */
250408989f96SLior David 	u8 flags;
250508989f96SLior David 	/* wmi_tof_ftm_per_dest_res_status_e */
250608989f96SLior David 	u8 status;
250708989f96SLior David 	/* responder ASAP */
250808989f96SLior David 	u8 responder_asap;
250908989f96SLior David 	/* responder number of FTM per burst */
251008989f96SLior David 	u8 responder_num_ftm_per_burst;
251108989f96SLior David 	/* responder number of FTM burst exponent */
251208989f96SLior David 	u8 responder_num_ftm_bursts_exp;
251308989f96SLior David 	/* responder burst duration ,wmi_tof_burst_duration_e */
251408989f96SLior David 	u8 responder_burst_duration;
251508989f96SLior David 	/* responder burst period, indicate interval between two consecutive
251608989f96SLior David 	 * burst instances, in units of 100 ms
251708989f96SLior David 	 */
251808989f96SLior David 	__le16 responder_burst_period;
251908989f96SLior David 	/* receive burst counter */
252008989f96SLior David 	__le16 bursts_cnt;
252108989f96SLior David 	/* tsf of responder start burst */
252208989f96SLior David 	__le32 tsf_sync;
252308989f96SLior David 	/* actual received ftm per burst */
252408989f96SLior David 	u8 actual_ftm_per_burst;
2525*761f8e4dSLazar Alexei 	/* Measurments are from RFs, defined by the mask */
2526*761f8e4dSLazar Alexei 	__le32 meas_rf_mask;
2527*761f8e4dSLazar Alexei 	u8 reserved0[3];
252808989f96SLior David 	struct wmi_responder_ftm_res responder_ftm_res[0];
252908989f96SLior David } __packed;
253008989f96SLior David 
2531*761f8e4dSLazar Alexei /* WMI_TOF_CFG_RESPONDER_EVENTID */
2532*761f8e4dSLazar Alexei struct wmi_tof_cfg_responder_event {
2533*761f8e4dSLazar Alexei 	/* enum wmi_fw_status */
2534*761f8e4dSLazar Alexei 	u8 status;
2535*761f8e4dSLazar Alexei 	u8 reserved[3];
2536*761f8e4dSLazar Alexei } __packed;
2537*761f8e4dSLazar Alexei 
253808989f96SLior David enum wmi_tof_channel_info_type {
253908989f96SLior David 	WMI_TOF_CHANNEL_INFO_AOA		= 0x00,
254008989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCI		= 0x01,
254108989f96SLior David 	WMI_TOF_CHANNEL_INFO_LCR		= 0x02,
254208989f96SLior David 	WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC	= 0x03,
254308989f96SLior David 	WMI_TOF_CHANNEL_INFO_CIR		= 0x04,
254408989f96SLior David 	WMI_TOF_CHANNEL_INFO_RSSI		= 0x05,
254508989f96SLior David 	WMI_TOF_CHANNEL_INFO_SNR		= 0x06,
254608989f96SLior David 	WMI_TOF_CHANNEL_INFO_DEBUG		= 0x07,
254708989f96SLior David };
254808989f96SLior David 
254908989f96SLior David /* WMI_TOF_CHANNEL_INFO_EVENTID */
255008989f96SLior David struct wmi_tof_channel_info_event {
255108989f96SLior David 	/* FTM session ID */
255208989f96SLior David 	__le32 session_id;
255308989f96SLior David 	/* destination MAC address */
255408989f96SLior David 	u8 dst_mac[WMI_MAC_LEN];
255508989f96SLior David 	/* wmi_tof_channel_info_type_e */
255608989f96SLior David 	u8 type;
255708989f96SLior David 	/* data report length */
255808989f96SLior David 	u8 len;
255908989f96SLior David 	/* data report payload */
256008989f96SLior David 	u8 report[0];
256108989f96SLior David } __packed;
256208989f96SLior David 
25638ae5d62cSLior David /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
25648ae5d62cSLior David struct wmi_tof_set_tx_rx_offset_event {
25658ae5d62cSLior David 	/* enum wmi_fw_status */
25668ae5d62cSLior David 	u8 status;
25678ae5d62cSLior David 	u8 reserved[3];
25688ae5d62cSLior David } __packed;
25698ae5d62cSLior David 
25708ae5d62cSLior David /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
25718ae5d62cSLior David struct wmi_tof_get_tx_rx_offset_event {
25728ae5d62cSLior David 	/* enum wmi_fw_status */
25738ae5d62cSLior David 	u8 status;
2574*761f8e4dSLazar Alexei 	/* RF index used to read the offsets */
2575*761f8e4dSLazar Alexei 	u8 rf_index;
2576*761f8e4dSLazar Alexei 	u8 reserved1[2];
25778ae5d62cSLior David 	/* TX delay offset */
25788ae5d62cSLior David 	__le32 tx_offset;
25798ae5d62cSLior David 	/* RX delay offset */
25808ae5d62cSLior David 	__le32 rx_offset;
2581*761f8e4dSLazar Alexei 	/* Offset to strongest tap of CIR */
2582*761f8e4dSLazar Alexei 	__le32 precursor;
25838ae5d62cSLior David } __packed;
25848ae5d62cSLior David 
2585cbf795c1SLior David /* Result status codes for WMI commands */
2586cbf795c1SLior David enum wmi_rf_sector_status {
2587cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_SUCCESS			= 0x00,
2588cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR	= 0x01,
2589cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_BUSY_ERROR			= 0x02,
2590cbf795c1SLior David 	WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR	= 0x03,
2591cbf795c1SLior David };
2592cbf795c1SLior David 
2593cbf795c1SLior David /* Types of the RF sector (TX,RX) */
2594cbf795c1SLior David enum wmi_rf_sector_type {
2595cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_RX	= 0x00,
2596cbf795c1SLior David 	WMI_RF_SECTOR_TYPE_TX	= 0x01,
2597cbf795c1SLior David };
2598cbf795c1SLior David 
2599cbf795c1SLior David /* Content of RF Sector (six 32-bits registers) */
2600cbf795c1SLior David struct wmi_rf_sector_info {
2601cbf795c1SLior David 	/* Phase values for RF Chains[15-0] (2bits per RF chain) */
2602cbf795c1SLior David 	__le32 psh_hi;
2603cbf795c1SLior David 	/* Phase values for RF Chains[31-16] (2bits per RF chain) */
2604cbf795c1SLior David 	__le32 psh_lo;
2605cbf795c1SLior David 	/* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
2606cbf795c1SLior David 	 * index
2607cbf795c1SLior David 	 */
2608cbf795c1SLior David 	__le32 etype0;
2609cbf795c1SLior David 	/* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
2610cbf795c1SLior David 	 * index
2611cbf795c1SLior David 	 */
2612cbf795c1SLior David 	__le32 etype1;
2613cbf795c1SLior David 	/* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
2614cbf795c1SLior David 	 * index
2615cbf795c1SLior David 	 */
2616cbf795c1SLior David 	__le32 etype2;
2617cbf795c1SLior David 	/* D-Type values (3bits each) for 8 Distribution amplifiers + X16
2618cbf795c1SLior David 	 * switch bits
2619cbf795c1SLior David 	 */
2620cbf795c1SLior David 	__le32 dtype_swch_off;
2621cbf795c1SLior David } __packed;
2622cbf795c1SLior David 
2623cbf795c1SLior David #define WMI_INVALID_RF_SECTOR_INDEX	(0xFFFF)
2624cbf795c1SLior David #define WMI_MAX_RF_MODULES_NUM		(8)
2625cbf795c1SLior David 
2626cbf795c1SLior David /* WMI_GET_RF_SECTOR_PARAMS_CMD */
2627cbf795c1SLior David struct wmi_get_rf_sector_params_cmd {
2628cbf795c1SLior David 	/* Sector number to be retrieved */
2629cbf795c1SLior David 	__le16 sector_idx;
2630cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
2631cbf795c1SLior David 	u8 sector_type;
2632cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
2633cbf795c1SLior David 	u8 rf_modules_vec;
2634cbf795c1SLior David } __packed;
2635cbf795c1SLior David 
2636cbf795c1SLior David /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
2637cbf795c1SLior David struct wmi_get_rf_sector_params_done_event {
2638cbf795c1SLior David 	/* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
2639cbf795c1SLior David 	 * wmi_rf_sector_status)
2640cbf795c1SLior David 	 */
2641cbf795c1SLior David 	u8 status;
2642cbf795c1SLior David 	/* align next field to U64 boundary */
2643cbf795c1SLior David 	u8 reserved[7];
2644cbf795c1SLior David 	/* TSF timestamp when RF sectors where retrieved */
2645cbf795c1SLior David 	__le64 tsf;
2646cbf795c1SLior David 	/* Content of RF sector retrieved from each RF module */
2647cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2648cbf795c1SLior David } __packed;
2649cbf795c1SLior David 
2650cbf795c1SLior David /* WMI_SET_RF_SECTOR_PARAMS_CMD */
2651cbf795c1SLior David struct wmi_set_rf_sector_params_cmd {
2652cbf795c1SLior David 	/* Sector number to be retrieved */
2653cbf795c1SLior David 	__le16 sector_idx;
2654cbf795c1SLior David 	/* enum wmi_rf_sector_type - type of requested RF sector */
2655cbf795c1SLior David 	u8 sector_type;
2656cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
2657cbf795c1SLior David 	u8 rf_modules_vec;
2658cbf795c1SLior David 	/* Content of RF sector to be written to each RF module */
2659cbf795c1SLior David 	struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2660cbf795c1SLior David } __packed;
2661cbf795c1SLior David 
2662cbf795c1SLior David /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
2663cbf795c1SLior David struct wmi_set_rf_sector_params_done_event {
2664cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
2665cbf795c1SLior David 	 * wmi_rf_sector_status)
2666cbf795c1SLior David 	 */
2667cbf795c1SLior David 	u8 status;
2668cbf795c1SLior David } __packed;
2669cbf795c1SLior David 
2670cbf795c1SLior David /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
2671cbf795c1SLior David  * TXSS/BRP for communication with specified CID
2672cbf795c1SLior David  */
2673cbf795c1SLior David struct wmi_get_selected_rf_sector_index_cmd {
2674cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
2675cbf795c1SLior David 	u8 cid;
2676cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
2677cbf795c1SLior David 	u8 sector_type;
2678cbf795c1SLior David 	/* align to U32 boundary */
2679cbf795c1SLior David 	u8 reserved[2];
2680cbf795c1SLior David } __packed;
2681cbf795c1SLior David 
2682cbf795c1SLior David /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
2683cbf795c1SLior David  * index selected by TXSS/BRP for communication with specified CID
2684cbf795c1SLior David  */
2685cbf795c1SLior David struct wmi_get_selected_rf_sector_index_done_event {
2686cbf795c1SLior David 	/* Retrieved sector index selected in TXSS (for TX sector request) or
2687cbf795c1SLior David 	 * BRP (for RX sector request)
2688cbf795c1SLior David 	 */
2689cbf795c1SLior David 	__le16 sector_idx;
2690cbf795c1SLior David 	/* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
2691cbf795c1SLior David 	 * wmi_rf_sector_status)
2692cbf795c1SLior David 	 */
2693cbf795c1SLior David 	u8 status;
2694cbf795c1SLior David 	/* align next field to U64 boundary */
2695cbf795c1SLior David 	u8 reserved[5];
2696cbf795c1SLior David 	/* TSF timestamp when result was retrieved */
2697cbf795c1SLior David 	__le64 tsf;
2698cbf795c1SLior David } __packed;
2699cbf795c1SLior David 
2700cbf795c1SLior David /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
2701cbf795c1SLior David  * communication with specified CID. Assumes that TXSS/BRP is disabled by
2702cbf795c1SLior David  * other command
2703cbf795c1SLior David  */
2704cbf795c1SLior David struct wmi_set_selected_rf_sector_index_cmd {
2705cbf795c1SLior David 	/* Connection/Station ID in [0:7] range */
2706cbf795c1SLior David 	u8 cid;
2707cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
2708cbf795c1SLior David 	u8 sector_type;
2709cbf795c1SLior David 	/* Forced sector index */
2710cbf795c1SLior David 	__le16 sector_idx;
2711cbf795c1SLior David } __packed;
2712cbf795c1SLior David 
2713cbf795c1SLior David /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
2714cbf795c1SLior David  * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
2715cbf795c1SLior David  */
2716cbf795c1SLior David struct wmi_set_selected_rf_sector_index_done_event {
2717cbf795c1SLior David 	/* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
2718cbf795c1SLior David 	 * wmi_rf_sector_status)
2719cbf795c1SLior David 	 */
2720cbf795c1SLior David 	u8 status;
2721cbf795c1SLior David 	/* align to U32 boundary */
2722cbf795c1SLior David 	u8 reserved[3];
2723cbf795c1SLior David } __packed;
2724cbf795c1SLior David 
2725cbf795c1SLior David /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
2726cbf795c1SLior David  * modules
2727cbf795c1SLior David  */
2728cbf795c1SLior David struct wmi_set_rf_sector_on_cmd {
2729cbf795c1SLior David 	/* Sector index to be activated */
2730cbf795c1SLior David 	__le16 sector_idx;
2731cbf795c1SLior David 	/* type of requested RF sector (enum wmi_rf_sector_type) */
2732cbf795c1SLior David 	u8 sector_type;
2733cbf795c1SLior David 	/* bitmask vector specifying destination RF modules */
2734cbf795c1SLior David 	u8 rf_modules_vec;
2735cbf795c1SLior David } __packed;
2736cbf795c1SLior David 
2737cbf795c1SLior David /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
2738cbf795c1SLior David  * WMI_SET_RF_SECTOR_ON_CMD
2739cbf795c1SLior David  */
2740cbf795c1SLior David struct wmi_set_rf_sector_on_done_event {
2741cbf795c1SLior David 	/* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
2742cbf795c1SLior David 	 * wmi_rf_sector_status)
2743cbf795c1SLior David 	 */
2744cbf795c1SLior David 	u8 status;
2745cbf795c1SLior David 	/* align to U32 boundary */
2746cbf795c1SLior David 	u8 reserved[3];
2747cbf795c1SLior David } __packed;
2748cbf795c1SLior David 
27498ae5d62cSLior David enum wmi_sector_sweep_type {
27508ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS		= 0x00,
27518ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_BCON		= 0x01,
27528ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON	= 0x02,
27538ae5d62cSLior David 	WMI_SECTOR_SWEEP_TYPE_NUM		= 0x03,
27548ae5d62cSLior David };
27558ae5d62cSLior David 
27568ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
27578ae5d62cSLior David  *
27588ae5d62cSLior David  * Set the order of TX sectors in TXSS and/or Beacon(AP).
27598ae5d62cSLior David  *
27608ae5d62cSLior David  * Returned event:
27618ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
27628ae5d62cSLior David  */
27638ae5d62cSLior David struct wmi_prio_tx_sectors_order_cmd {
27648ae5d62cSLior David 	/* tx sectors order to be applied, 0xFF for end of array */
27658ae5d62cSLior David 	u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
27668ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
27678ae5d62cSLior David 	u8 sector_sweep_type;
27688ae5d62cSLior David 	/* needed only for TXSS configuration */
27698ae5d62cSLior David 	u8 cid;
27708ae5d62cSLior David 	/* alignment to 32b */
27718ae5d62cSLior David 	u8 reserved[2];
27728ae5d62cSLior David } __packed;
27738ae5d62cSLior David 
27748ae5d62cSLior David /* completion status codes */
27758ae5d62cSLior David enum wmi_prio_tx_sectors_cmd_status {
27768ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS	= 0x00,
27778ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM	= 0x01,
27788ae5d62cSLior David 	/* other error */
27798ae5d62cSLior David 	WMI_PRIO_TX_SECT_CMD_STATUS_ERROR	= 0x02,
27808ae5d62cSLior David };
27818ae5d62cSLior David 
27828ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
27838ae5d62cSLior David struct wmi_prio_tx_sectors_order_event {
27848ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
27858ae5d62cSLior David 	u8 status;
27868ae5d62cSLior David 	/* alignment to 32b */
27878ae5d62cSLior David 	u8 reserved[3];
27888ae5d62cSLior David } __packed;
27898ae5d62cSLior David 
27908ae5d62cSLior David struct wmi_prio_tx_sectors_num_cmd {
27918ae5d62cSLior David 	/* [0-128], 0 = No changes */
27928ae5d62cSLior David 	u8 beacon_number_of_sectors;
27938ae5d62cSLior David 	/* [0-128], 0 = No changes */
27948ae5d62cSLior David 	u8 txss_number_of_sectors;
27958ae5d62cSLior David 	/* [0-8] needed only for TXSS configuration */
27968ae5d62cSLior David 	u8 cid;
27978ae5d62cSLior David } __packed;
27988ae5d62cSLior David 
27998ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
28008ae5d62cSLior David  *
28018ae5d62cSLior David  * Set the number of active sectors in TXSS and/or Beacon.
28028ae5d62cSLior David  *
28038ae5d62cSLior David  * Returned event:
28048ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
28058ae5d62cSLior David  */
28068ae5d62cSLior David struct wmi_prio_tx_sectors_number_cmd {
28078ae5d62cSLior David 	struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
28088ae5d62cSLior David 	/* alignment to 32b */
28098ae5d62cSLior David 	u8 reserved;
28108ae5d62cSLior David } __packed;
28118ae5d62cSLior David 
28128ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
28138ae5d62cSLior David struct wmi_prio_tx_sectors_number_event {
28148ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
28158ae5d62cSLior David 	u8 status;
28168ae5d62cSLior David 	/* alignment to 32b */
28178ae5d62cSLior David 	u8 reserved[3];
28188ae5d62cSLior David } __packed;
28198ae5d62cSLior David 
28208ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
28218ae5d62cSLior David  *
28228ae5d62cSLior David  * Set default sectors order and number (hard coded in board file)
28238ae5d62cSLior David  * in TXSS and/or Beacon.
28248ae5d62cSLior David  *
28258ae5d62cSLior David  * Returned event:
28268ae5d62cSLior David  * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
28278ae5d62cSLior David  */
28288ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_cmd {
28298ae5d62cSLior David 	/* enum wmi_sector_sweep_type, TXSS and/or Beacon */
28308ae5d62cSLior David 	u8 sector_sweep_type;
28318ae5d62cSLior David 	/* needed only for TXSS configuration */
28328ae5d62cSLior David 	u8 cid;
28338ae5d62cSLior David 	/* alignment to 32b */
28348ae5d62cSLior David 	u8 reserved[2];
28358ae5d62cSLior David } __packed;
28368ae5d62cSLior David 
28378ae5d62cSLior David /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
28388ae5d62cSLior David struct wmi_prio_tx_sectors_set_default_cfg_event {
28398ae5d62cSLior David 	/* enum wmi_prio_tx_sectors_cmd_status */
28408ae5d62cSLior David 	u8 status;
28418ae5d62cSLior David 	/* alignment to 32b */
28428ae5d62cSLior David 	u8 reserved[3];
28438ae5d62cSLior David } __packed;
28448ae5d62cSLior David 
2845*761f8e4dSLazar Alexei /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
2846*761f8e4dSLazar Alexei struct wmi_set_silent_rssi_table_done_event {
2847*761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_status */
2848*761f8e4dSLazar Alexei 	__le32 status;
2849*761f8e4dSLazar Alexei 	/* enum wmi_silent_rssi_table */
2850*761f8e4dSLazar Alexei 	__le32 table;
2851*761f8e4dSLazar Alexei } __packed;
2852*761f8e4dSLazar Alexei 
2853*761f8e4dSLazar Alexei /* \WMI_COMMAND_NOT_SUPPORTED_EVENTID */
2854*761f8e4dSLazar Alexei struct wmi_command_not_supported_event {
2855*761f8e4dSLazar Alexei 	/* device id */
2856*761f8e4dSLazar Alexei 	u8 mid;
2857*761f8e4dSLazar Alexei 	u8 reserved0;
2858*761f8e4dSLazar Alexei 	__le16 command_id;
2859*761f8e4dSLazar Alexei 	/* for UT command only, otherwise reserved */
2860*761f8e4dSLazar Alexei 	__le16 command_subtype;
2861*761f8e4dSLazar Alexei 	__le16 reserved1;
2862*761f8e4dSLazar Alexei } __packed;
2863*761f8e4dSLazar Alexei 
28642be7d22fSVladimir Kondratiev #endif /* __WILOCITY_WMI_H__ */
2865