]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - drivers/net/wireless/ath/wil6210/wmi.h
slip: Fix use-after-free Read in slip_open
[mirror_ubuntu-jammy-kernel.git] / drivers / net / wireless / ath / wil6210 / wmi.h
1 /*
2 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
3 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
4 * Copyright (c) 2006-2012 Wilocity
5 *
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 /*
20 * This file contains the definitions of the WMI protocol specified in the
21 * Wireless Module Interface (WMI) for the Qualcomm
22 * 60 GHz wireless solution.
23 * It includes definitions of all the commands and events.
24 * Commands are messages from the host to the WM.
25 * Events are messages from the WM to the host.
26 *
27 * This is an automatically generated file.
28 */
29
30 #ifndef __WILOCITY_WMI_H__
31 #define __WILOCITY_WMI_H__
32
33 #define WMI_DEFAULT_ASSOC_STA (1)
34 #define WMI_MAC_LEN (6)
35 #define WMI_PROX_RANGE_NUM (3)
36 #define WMI_MAX_LOSS_DMG_BEACONS (20)
37 #define MAX_NUM_OF_SECTORS (128)
38 #define WMI_INVALID_TEMPERATURE (0xFFFFFFFF)
39 #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4)
40 #define WMI_RF_DTYPE_LENGTH (3)
41 #define WMI_RF_ETYPE_LENGTH (3)
42 #define WMI_RF_RX2TX_LENGTH (3)
43 #define WMI_RF_ETYPE_VAL_PER_RANGE (5)
44 /* DTYPE configuration array size
45 * must always be kept equal to (WMI_RF_DTYPE_LENGTH+1)
46 */
47 #define WMI_RF_DTYPE_CONF_LENGTH (4)
48 /* ETYPE configuration array size
49 * must always be kept equal to
50 * (WMI_RF_ETYPE_LENGTH+WMI_RF_ETYPE_VAL_PER_RANGE)
51 */
52 #define WMI_RF_ETYPE_CONF_LENGTH (8)
53 /* RX2TX configuration array size
54 * must always be kept equal to (WMI_RF_RX2TX_LENGTH+1)
55 */
56 #define WMI_RF_RX2TX_CONF_LENGTH (4)
57 /* Qos configuration */
58 #define WMI_QOS_NUM_OF_PRIORITY (4)
59 #define WMI_QOS_MIN_DEFAULT_WEIGHT (10)
60 #define WMI_QOS_VRING_SLOT_MIN_MS (2)
61 #define WMI_QOS_VRING_SLOT_MAX_MS (10)
62 /* (WMI_QOS_MIN_DEFAULT_WEIGHT * WMI_QOS_VRING_SLOT_MAX_MS /
63 * WMI_QOS_VRING_SLOT_MIN_MS)
64 */
65 #define WMI_QOS_MAX_WEIGHT 50
66 #define WMI_QOS_SET_VIF_PRIORITY (0xFF)
67 #define WMI_QOS_DEFAULT_PRIORITY (WMI_QOS_NUM_OF_PRIORITY)
68 #define WMI_MAX_XIF_PORTS_NUM (8)
69
70 /* Mailbox interface
71 * used for commands and events
72 */
73 enum wmi_mid {
74 MID_DEFAULT = 0x00,
75 FIRST_DBG_MID_ID = 0x10,
76 LAST_DBG_MID_ID = 0xFE,
77 MID_BROADCAST = 0xFF,
78 };
79
80 /* FW capability IDs
81 * Each ID maps to a bit in a 32-bit bitmask value provided by the FW to
82 * the host
83 */
84 enum wmi_fw_capability {
85 WMI_FW_CAPABILITY_FTM = 0,
86 WMI_FW_CAPABILITY_PS_CONFIG = 1,
87 WMI_FW_CAPABILITY_RF_SECTORS = 2,
88 WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3,
89 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL = 4,
90 WMI_FW_CAPABILITY_WMI_ONLY = 5,
91 WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7,
92 WMI_FW_CAPABILITY_D3_SUSPEND = 8,
93 WMI_FW_CAPABILITY_LONG_RANGE = 9,
94 WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10,
95 WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11,
96 WMI_FW_CAPABILITY_RSSI_REPORTING = 12,
97 WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13,
98 WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14,
99 WMI_FW_CAPABILITY_PNO = 15,
100 WMI_FW_CAPABILITY_CHANNEL_BONDING = 17,
101 WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18,
102 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE = 19,
103 WMI_FW_CAPABILITY_MULTI_VIFS = 20,
104 WMI_FW_CAPABILITY_FT_ROAMING = 21,
105 WMI_FW_CAPABILITY_BACK_WIN_SIZE_64 = 22,
106 WMI_FW_CAPABILITY_AMSDU = 23,
107 WMI_FW_CAPABILITY_RAW_MODE = 24,
108 WMI_FW_CAPABILITY_TX_REQ_EXT = 25,
109 WMI_FW_CAPABILITY_CHANNEL_4 = 26,
110 WMI_FW_CAPABILITY_IPA = 27,
111 WMI_FW_CAPABILITY_TEMPERATURE_ALL_RF = 30,
112 WMI_FW_CAPABILITY_SPLIT_REKEY = 31,
113 WMI_FW_CAPABILITY_MAX,
114 };
115
116 /* WMI_CMD_HDR */
117 struct wmi_cmd_hdr {
118 u8 mid;
119 u8 reserved;
120 __le16 command_id;
121 __le32 fw_timestamp;
122 } __packed;
123
124 /* List of Commands */
125 enum wmi_command_id {
126 WMI_CONNECT_CMDID = 0x01,
127 WMI_DISCONNECT_CMDID = 0x03,
128 WMI_DISCONNECT_STA_CMDID = 0x04,
129 WMI_START_SCHED_SCAN_CMDID = 0x05,
130 WMI_STOP_SCHED_SCAN_CMDID = 0x06,
131 WMI_START_SCAN_CMDID = 0x07,
132 WMI_SET_BSS_FILTER_CMDID = 0x09,
133 WMI_SET_PROBED_SSID_CMDID = 0x0A,
134 /* deprecated */
135 WMI_SET_LISTEN_INT_CMDID = 0x0B,
136 WMI_FT_AUTH_CMDID = 0x0C,
137 WMI_FT_REASSOC_CMDID = 0x0D,
138 WMI_UPDATE_FT_IES_CMDID = 0x0E,
139 WMI_BCON_CTRL_CMDID = 0x0F,
140 WMI_ADD_CIPHER_KEY_CMDID = 0x16,
141 WMI_DELETE_CIPHER_KEY_CMDID = 0x17,
142 WMI_PCP_CONF_CMDID = 0x18,
143 WMI_SET_APPIE_CMDID = 0x3F,
144 WMI_SET_WSC_STATUS_CMDID = 0x41,
145 WMI_PXMT_RANGE_CFG_CMDID = 0x42,
146 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43,
147 WMI_RADAR_GENERAL_CONFIG_CMDID = 0x100,
148 WMI_RADAR_CONFIG_SELECT_CMDID = 0x101,
149 WMI_RADAR_PARAMS_CONFIG_CMDID = 0x102,
150 WMI_RADAR_SET_MODE_CMDID = 0x103,
151 WMI_RADAR_CONTROL_CMDID = 0x104,
152 WMI_RADAR_PCI_CONTROL_CMDID = 0x105,
153 WMI_MEM_READ_CMDID = 0x800,
154 WMI_MEM_WR_CMDID = 0x801,
155 WMI_ECHO_CMDID = 0x803,
156 WMI_DEEP_ECHO_CMDID = 0x804,
157 WMI_CONFIG_MAC_CMDID = 0x805,
158 /* deprecated */
159 WMI_CONFIG_PHY_DEBUG_CMDID = 0x806,
160 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808,
161 WMI_PHY_GET_STATISTICS_CMDID = 0x809,
162 /* deprecated */
163 WMI_FS_TUNE_CMDID = 0x80A,
164 /* deprecated */
165 WMI_CORR_MEASURE_CMDID = 0x80B,
166 WMI_READ_RSSI_CMDID = 0x80C,
167 WMI_TEMP_SENSE_CMDID = 0x80E,
168 WMI_DC_CALIB_CMDID = 0x80F,
169 /* deprecated */
170 WMI_SEND_TONE_CMDID = 0x810,
171 /* deprecated */
172 WMI_IQ_TX_CALIB_CMDID = 0x811,
173 /* deprecated */
174 WMI_IQ_RX_CALIB_CMDID = 0x812,
175 WMI_SET_WORK_MODE_CMDID = 0x815,
176 WMI_LO_LEAKAGE_CALIB_CMDID = 0x816,
177 WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817,
178 WMI_SILENT_RSSI_CALIB_CMDID = 0x81D,
179 /* deprecated */
180 WMI_RF_RX_TEST_CMDID = 0x81E,
181 WMI_CFG_RX_CHAIN_CMDID = 0x820,
182 WMI_VRING_CFG_CMDID = 0x821,
183 WMI_BCAST_VRING_CFG_CMDID = 0x822,
184 WMI_RING_BA_EN_CMDID = 0x823,
185 WMI_RING_BA_DIS_CMDID = 0x824,
186 WMI_RCP_ADDBA_RESP_CMDID = 0x825,
187 WMI_RCP_DELBA_CMDID = 0x826,
188 WMI_SET_SSID_CMDID = 0x827,
189 WMI_GET_SSID_CMDID = 0x828,
190 WMI_SET_PCP_CHANNEL_CMDID = 0x829,
191 WMI_GET_PCP_CHANNEL_CMDID = 0x82A,
192 WMI_SW_TX_REQ_CMDID = 0x82B,
193 /* Event is shared between WMI_SW_TX_REQ_CMDID and
194 * WMI_SW_TX_REQ_EXT_CMDID
195 */
196 WMI_SW_TX_REQ_EXT_CMDID = 0x82C,
197 WMI_MLME_PUSH_CMDID = 0x835,
198 WMI_BEAMFORMING_MGMT_CMDID = 0x836,
199 WMI_BF_TXSS_MGMT_CMDID = 0x837,
200 WMI_BF_SM_MGMT_CMDID = 0x838,
201 WMI_BF_RXSS_MGMT_CMDID = 0x839,
202 WMI_BF_TRIG_CMDID = 0x83A,
203 WMI_RCP_ADDBA_RESP_EDMA_CMDID = 0x83B,
204 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842,
205 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843,
206 WMI_SET_SECTORS_CMDID = 0x849,
207 WMI_MAINTAIN_PAUSE_CMDID = 0x850,
208 WMI_MAINTAIN_RESUME_CMDID = 0x851,
209 WMI_RS_MGMT_CMDID = 0x852,
210 WMI_RF_MGMT_CMDID = 0x853,
211 WMI_RF_XPM_READ_CMDID = 0x856,
212 WMI_RF_XPM_WRITE_CMDID = 0x857,
213 WMI_LED_CFG_CMDID = 0x858,
214 WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B,
215 WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C,
216 WMI_RF_PWR_ON_DELAY_CMDID = 0x85D,
217 WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E,
218 WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID = 0x85F,
219 /* Performance monitoring commands */
220 WMI_BF_CTRL_CMDID = 0x862,
221 WMI_NOTIFY_REQ_CMDID = 0x863,
222 WMI_GET_STATUS_CMDID = 0x864,
223 WMI_GET_RF_STATUS_CMDID = 0x866,
224 WMI_GET_BASEBAND_TYPE_CMDID = 0x867,
225 WMI_VRING_SWITCH_TIMING_CONFIG_CMDID = 0x868,
226 WMI_UNIT_TEST_CMDID = 0x900,
227 WMI_FLASH_READ_CMDID = 0x902,
228 WMI_FLASH_WRITE_CMDID = 0x903,
229 /* Power management */
230 WMI_TRAFFIC_SUSPEND_CMDID = 0x904,
231 WMI_TRAFFIC_RESUME_CMDID = 0x905,
232 /* P2P */
233 WMI_P2P_CFG_CMDID = 0x910,
234 WMI_PORT_ALLOCATE_CMDID = 0x911,
235 WMI_PORT_DELETE_CMDID = 0x912,
236 WMI_POWER_MGMT_CFG_CMDID = 0x913,
237 WMI_START_LISTEN_CMDID = 0x914,
238 WMI_START_SEARCH_CMDID = 0x915,
239 WMI_DISCOVERY_START_CMDID = 0x916,
240 WMI_DISCOVERY_STOP_CMDID = 0x917,
241 WMI_PCP_START_CMDID = 0x918,
242 WMI_PCP_STOP_CMDID = 0x919,
243 WMI_GET_PCP_FACTOR_CMDID = 0x91B,
244 /* Power Save Configuration Commands */
245 WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C,
246 WMI_RS_ENABLE_CMDID = 0x91E,
247 WMI_RS_CFG_EX_CMDID = 0x91F,
248 WMI_GET_DETAILED_RS_RES_EX_CMDID = 0x920,
249 /* deprecated */
250 WMI_RS_CFG_CMDID = 0x921,
251 /* deprecated */
252 WMI_GET_DETAILED_RS_RES_CMDID = 0x922,
253 WMI_AOA_MEAS_CMDID = 0x923,
254 WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924,
255 WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930,
256 WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931,
257 WMI_NEW_STA_CMDID = 0x935,
258 WMI_DEL_STA_CMDID = 0x936,
259 WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940,
260 WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941,
261 /* Read Power Save profile type */
262 WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942,
263 WMI_TSF_SYNC_CMDID = 0x973,
264 WMI_TOF_SESSION_START_CMDID = 0x991,
265 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992,
266 WMI_TOF_SET_LCR_CMDID = 0x993,
267 WMI_TOF_SET_LCI_CMDID = 0x994,
268 WMI_TOF_CFG_RESPONDER_CMDID = 0x996,
269 WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997,
270 WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998,
271 WMI_TOF_CHANNEL_INFO_CMDID = 0x999,
272 WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0,
273 WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1,
274 WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2,
275 WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3,
276 WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4,
277 WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5,
278 WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6,
279 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7,
280 /* deprecated */
281 WMI_BF_CONTROL_CMDID = 0x9AA,
282 WMI_BF_CONTROL_EX_CMDID = 0x9AB,
283 WMI_TX_STATUS_RING_ADD_CMDID = 0x9C0,
284 WMI_RX_STATUS_RING_ADD_CMDID = 0x9C1,
285 WMI_TX_DESC_RING_ADD_CMDID = 0x9C2,
286 WMI_RX_DESC_RING_ADD_CMDID = 0x9C3,
287 WMI_BCAST_DESC_RING_ADD_CMDID = 0x9C4,
288 WMI_CFG_DEF_RX_OFFLOAD_CMDID = 0x9C5,
289 WMI_SCHEDULING_SCHEME_CMDID = 0xA01,
290 WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02,
291 WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03,
292 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04,
293 WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05,
294 WMI_GET_ASSOC_LIST_CMDID = 0xA06,
295 WMI_GET_CCA_INDICATIONS_CMDID = 0xA07,
296 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID = 0xA08,
297 WMI_INTERNAL_FW_IOCTL_CMDID = 0xA0B,
298 WMI_LINK_STATS_CMDID = 0xA0C,
299 WMI_SET_GRANT_MCS_CMDID = 0xA0E,
300 WMI_SET_AP_SLOT_SIZE_CMDID = 0xA0F,
301 WMI_SET_VRING_PRIORITY_WEIGHT_CMDID = 0xA10,
302 WMI_SET_VRING_PRIORITY_CMDID = 0xA11,
303 WMI_RBUFCAP_CFG_CMDID = 0xA12,
304 WMI_TEMP_SENSE_ALL_CMDID = 0xA13,
305 WMI_SET_MAC_ADDRESS_CMDID = 0xF003,
306 WMI_ABORT_SCAN_CMDID = 0xF007,
307 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041,
308 /* deprecated */
309 WMI_GET_PMK_CMDID = 0xF048,
310 WMI_SET_PASSPHRASE_CMDID = 0xF049,
311 /* deprecated */
312 WMI_SEND_ASSOC_RES_CMDID = 0xF04A,
313 /* deprecated */
314 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B,
315 WMI_MAC_ADDR_REQ_CMDID = 0xF04D,
316 WMI_FW_VER_CMDID = 0xF04E,
317 WMI_PMC_CMDID = 0xF04F,
318 };
319
320 /* WMI_CONNECT_CMDID */
321 enum wmi_network_type {
322 WMI_NETTYPE_INFRA = 0x01,
323 WMI_NETTYPE_ADHOC = 0x02,
324 WMI_NETTYPE_ADHOC_CREATOR = 0x04,
325 WMI_NETTYPE_AP = 0x10,
326 WMI_NETTYPE_P2P = 0x20,
327 /* PCIE over 60g */
328 WMI_NETTYPE_WBE = 0x40,
329 };
330
331 enum wmi_dot11_auth_mode {
332 WMI_AUTH11_OPEN = 0x01,
333 WMI_AUTH11_SHARED = 0x02,
334 WMI_AUTH11_LEAP = 0x04,
335 WMI_AUTH11_WSC = 0x08,
336 };
337
338 enum wmi_auth_mode {
339 WMI_AUTH_NONE = 0x01,
340 WMI_AUTH_WPA = 0x02,
341 WMI_AUTH_WPA2 = 0x04,
342 WMI_AUTH_WPA_PSK = 0x08,
343 WMI_AUTH_WPA2_PSK = 0x10,
344 WMI_AUTH_WPA_CCKM = 0x20,
345 WMI_AUTH_WPA2_CCKM = 0x40,
346 };
347
348 enum wmi_crypto_type {
349 WMI_CRYPT_NONE = 0x01,
350 WMI_CRYPT_AES_GCMP = 0x20,
351 };
352
353 enum wmi_connect_ctrl_flag_bits {
354 WMI_CONNECT_ASSOC_POLICY_USER = 0x01,
355 WMI_CONNECT_SEND_REASSOC = 0x02,
356 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04,
357 WMI_CONNECT_PROFILE_MATCH_DONE = 0x08,
358 WMI_CONNECT_IGNORE_AAC_BEACON = 0x10,
359 WMI_CONNECT_CSA_FOLLOW_BSS = 0x20,
360 WMI_CONNECT_DO_WPA_OFFLOAD = 0x40,
361 WMI_CONNECT_DO_NOT_DEAUTH = 0x80,
362 };
363
364 #define WMI_MAX_SSID_LEN (32)
365
366 enum wmi_channel {
367 WMI_CHANNEL_1 = 0x00,
368 WMI_CHANNEL_2 = 0x01,
369 WMI_CHANNEL_3 = 0x02,
370 WMI_CHANNEL_4 = 0x03,
371 WMI_CHANNEL_5 = 0x04,
372 WMI_CHANNEL_6 = 0x05,
373 WMI_CHANNEL_9 = 0x06,
374 WMI_CHANNEL_10 = 0x07,
375 WMI_CHANNEL_11 = 0x08,
376 WMI_CHANNEL_12 = 0x09,
377 };
378
379 /* WMI_CONNECT_CMDID */
380 struct wmi_connect_cmd {
381 u8 network_type;
382 u8 dot11_auth_mode;
383 u8 auth_mode;
384 u8 pairwise_crypto_type;
385 u8 pairwise_crypto_len;
386 u8 group_crypto_type;
387 u8 group_crypto_len;
388 u8 ssid_len;
389 u8 ssid[WMI_MAX_SSID_LEN];
390 /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
391 * the primary channel number
392 */
393 u8 channel;
394 /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
395 u8 edmg_channel;
396 u8 bssid[WMI_MAC_LEN];
397 __le32 ctrl_flags;
398 u8 dst_mac[WMI_MAC_LEN];
399 u8 reserved1[2];
400 } __packed;
401
402 /* WMI_DISCONNECT_STA_CMDID */
403 struct wmi_disconnect_sta_cmd {
404 u8 dst_mac[WMI_MAC_LEN];
405 __le16 disconnect_reason;
406 } __packed;
407
408 #define WMI_MAX_KEY_INDEX (3)
409 #define WMI_MAX_KEY_LEN (32)
410 #define WMI_PASSPHRASE_LEN (64)
411
412 /* WMI_SET_PASSPHRASE_CMDID */
413 struct wmi_set_passphrase_cmd {
414 u8 ssid[WMI_MAX_SSID_LEN];
415 u8 passphrase[WMI_PASSPHRASE_LEN];
416 u8 ssid_len;
417 u8 passphrase_len;
418 } __packed;
419
420 /* WMI_ADD_CIPHER_KEY_CMDID */
421 enum wmi_key_usage {
422 WMI_KEY_USE_PAIRWISE = 0x00,
423 WMI_KEY_USE_RX_GROUP = 0x01,
424 WMI_KEY_USE_TX_GROUP = 0x02,
425 WMI_KEY_USE_STORE_PTK = 0x03,
426 WMI_KEY_USE_APPLY_PTK = 0x04,
427 };
428
429 struct wmi_add_cipher_key_cmd {
430 u8 key_index;
431 u8 key_type;
432 /* enum wmi_key_usage */
433 u8 key_usage;
434 u8 key_len;
435 /* key replay sequence counter */
436 u8 key_rsc[8];
437 u8 key[WMI_MAX_KEY_LEN];
438 /* Additional Key Control information */
439 u8 key_op_ctrl;
440 u8 mac[WMI_MAC_LEN];
441 } __packed;
442
443 /* WMI_DELETE_CIPHER_KEY_CMDID */
444 struct wmi_delete_cipher_key_cmd {
445 u8 key_index;
446 u8 mac[WMI_MAC_LEN];
447 } __packed;
448
449 /* WMI_START_SCAN_CMDID
450 *
451 * Start L1 scan operation
452 *
453 * Returned events:
454 * - WMI_RX_MGMT_PACKET_EVENTID - for every probe resp.
455 * - WMI_SCAN_COMPLETE_EVENTID
456 */
457 enum wmi_scan_type {
458 WMI_ACTIVE_SCAN = 0x00,
459 WMI_SHORT_SCAN = 0x01,
460 WMI_PASSIVE_SCAN = 0x02,
461 WMI_DIRECT_SCAN = 0x03,
462 WMI_LONG_SCAN = 0x04,
463 };
464
465 /* WMI_START_SCAN_CMDID */
466 struct wmi_start_scan_cmd {
467 u8 direct_scan_mac_addr[WMI_MAC_LEN];
468 /* run scan with discovery beacon. Relevant for ACTIVE scan only. */
469 u8 discovery_mode;
470 u8 reserved;
471 /* Max duration in the home channel(ms) */
472 __le32 dwell_time;
473 /* Time interval between scans (ms) */
474 __le32 force_scan_interval;
475 /* enum wmi_scan_type */
476 u8 scan_type;
477 /* how many channels follow */
478 u8 num_channels;
479 /* channels ID's:
480 * 0 - 58320 MHz
481 * 1 - 60480 MHz
482 * 2 - 62640 MHz
483 */
484 struct {
485 u8 channel;
486 u8 reserved;
487 } channel_list[0];
488 } __packed;
489
490 #define WMI_MAX_PNO_SSID_NUM (16)
491 #define WMI_MAX_CHANNEL_NUM (6)
492 #define WMI_MAX_PLANS_NUM (2)
493
494 /* WMI_START_SCHED_SCAN_CMDID */
495 struct wmi_sched_scan_ssid_match {
496 u8 ssid_len;
497 u8 ssid[WMI_MAX_SSID_LEN];
498 s8 rssi_threshold;
499 /* boolean */
500 u8 add_ssid_to_probe;
501 u8 reserved;
502 } __packed;
503
504 /* WMI_START_SCHED_SCAN_CMDID */
505 struct wmi_sched_scan_plan {
506 __le16 interval_sec;
507 __le16 num_of_iterations;
508 } __packed;
509
510 /* WMI_START_SCHED_SCAN_CMDID */
511 struct wmi_start_sched_scan_cmd {
512 struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
513 u8 num_of_ssids;
514 s8 min_rssi_threshold;
515 u8 channel_list[WMI_MAX_CHANNEL_NUM];
516 u8 num_of_channels;
517 u8 reserved;
518 __le16 initial_delay_sec;
519 struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
520 } __packed;
521
522 /* WMI_FT_AUTH_CMDID */
523 struct wmi_ft_auth_cmd {
524 u8 bssid[WMI_MAC_LEN];
525 /* enum wmi_channel */
526 u8 channel;
527 /* enum wmi_channel */
528 u8 edmg_channel;
529 u8 reserved[4];
530 } __packed;
531
532 /* WMI_FT_REASSOC_CMDID */
533 struct wmi_ft_reassoc_cmd {
534 u8 bssid[WMI_MAC_LEN];
535 u8 reserved[2];
536 } __packed;
537
538 /* WMI_UPDATE_FT_IES_CMDID */
539 struct wmi_update_ft_ies_cmd {
540 /* Length of the FT IEs */
541 __le16 ie_len;
542 u8 reserved[2];
543 u8 ie_info[0];
544 } __packed;
545
546 /* WMI_SET_PROBED_SSID_CMDID */
547 #define MAX_PROBED_SSID_INDEX (3)
548
549 enum wmi_ssid_flag {
550 /* disables entry */
551 WMI_SSID_FLAG_DISABLE = 0x00,
552 /* probes specified ssid */
553 WMI_SSID_FLAG_SPECIFIC = 0x01,
554 /* probes for any ssid */
555 WMI_SSID_FLAG_ANY = 0x02,
556 };
557
558 struct wmi_probed_ssid_cmd {
559 /* 0 to MAX_PROBED_SSID_INDEX */
560 u8 entry_index;
561 /* enum wmi_ssid_flag */
562 u8 flag;
563 u8 ssid_len;
564 u8 ssid[WMI_MAX_SSID_LEN];
565 } __packed;
566
567 /* WMI_SET_APPIE_CMDID
568 * Add Application specified IE to a management frame
569 */
570 #define WMI_MAX_IE_LEN (1024)
571
572 /* Frame Types */
573 enum wmi_mgmt_frame_type {
574 WMI_FRAME_BEACON = 0x00,
575 WMI_FRAME_PROBE_REQ = 0x01,
576 WMI_FRAME_PROBE_RESP = 0x02,
577 WMI_FRAME_ASSOC_REQ = 0x03,
578 WMI_FRAME_ASSOC_RESP = 0x04,
579 WMI_NUM_MGMT_FRAME = 0x05,
580 };
581
582 struct wmi_set_appie_cmd {
583 /* enum wmi_mgmt_frame_type */
584 u8 mgmt_frm_type;
585 u8 reserved;
586 /* Length of the IE to be added to MGMT frame */
587 __le16 ie_len;
588 u8 ie_info[0];
589 } __packed;
590
591 /* WMI_PXMT_RANGE_CFG_CMDID */
592 struct wmi_pxmt_range_cfg_cmd {
593 u8 dst_mac[WMI_MAC_LEN];
594 __le16 range;
595 } __packed;
596
597 /* WMI_PXMT_SNR2_RANGE_CFG_CMDID */
598 struct wmi_pxmt_snr2_range_cfg_cmd {
599 s8 snr2range_arr[2];
600 } __packed;
601
602 /* WMI_RADAR_GENERAL_CONFIG_CMDID */
603 struct wmi_radar_general_config_cmd {
604 /* Number of pulses (CIRs) in FW FIFO to initiate pulses transfer
605 * from FW to Host
606 */
607 __le32 fifo_watermark;
608 /* In unit of us, in the range [100, 1000000] */
609 __le32 t_burst;
610 /* Valid in the range [1, 32768], 0xFFFF means infinite */
611 __le32 n_bursts;
612 /* In unit of 330Mhz clk, in the range [4, 2000]*330 */
613 __le32 t_pulse;
614 /* In the range of [1,4096] */
615 __le16 n_pulses;
616 /* Number of taps after cTap per CIR */
617 __le16 n_samples;
618 /* Offset from the main tap (0 = zero-distance). In the range of [0,
619 * 255]
620 */
621 u8 first_sample_offset;
622 /* Number of Pulses to average, 1, 2, 4, 8 */
623 u8 pulses_to_avg;
624 /* Number of adjacent taps to average, 1, 2, 4, 8 */
625 u8 samples_to_avg;
626 /* The index to config general params */
627 u8 general_index;
628 u8 reserved[4];
629 } __packed;
630
631 /* WMI_RADAR_CONFIG_SELECT_CMDID */
632 struct wmi_radar_config_select_cmd {
633 /* Select the general params index to use */
634 u8 general_index;
635 u8 reserved[3];
636 /* 0 means don't update burst_active_vector */
637 __le32 burst_active_vector;
638 /* 0 means don't update pulse_active_vector */
639 __le32 pulse_active_vector;
640 } __packed;
641
642 /* WMI_RADAR_PARAMS_CONFIG_CMDID */
643 struct wmi_radar_params_config_cmd {
644 /* The burst index selected to config */
645 u8 burst_index;
646 /* 0-not active, 1-active */
647 u8 burst_en;
648 /* The pulse index selected to config */
649 u8 pulse_index;
650 /* 0-not active, 1-active */
651 u8 pulse_en;
652 /* TX RF to use on current pulse */
653 u8 tx_rfc_idx;
654 u8 tx_sector;
655 /* Offset from calibrated value.(expected to be 0)(value is row in
656 * Gain-LUT, not dB)
657 */
658 s8 tx_rf_gain_comp;
659 /* expected to be 0 */
660 s8 tx_bb_gain_comp;
661 /* RX RF to use on current pulse */
662 u8 rx_rfc_idx;
663 u8 rx_sector;
664 /* Offset from calibrated value.(expected to be 0)(value is row in
665 * Gain-LUT, not dB)
666 */
667 s8 rx_rf_gain_comp;
668 /* Value in dB.(expected to be 0) */
669 s8 rx_bb_gain_comp;
670 /* Offset from calibrated value.(expected to be 0) */
671 s8 rx_timing_offset;
672 u8 reserved[3];
673 } __packed;
674
675 /* WMI_RADAR_SET_MODE_CMDID */
676 struct wmi_radar_set_mode_cmd {
677 /* 0-disable/1-enable */
678 u8 enable;
679 /* enum wmi_channel */
680 u8 channel;
681 /* In the range of [0,7], 0xff means use default */
682 u8 tx_rfc_idx;
683 /* In the range of [0,7], 0xff means use default */
684 u8 rx_rfc_idx;
685 } __packed;
686
687 /* WMI_RADAR_CONTROL_CMDID */
688 struct wmi_radar_control_cmd {
689 /* 0-stop/1-start */
690 u8 start;
691 u8 reserved[3];
692 } __packed;
693
694 /* WMI_RADAR_PCI_CONTROL_CMDID */
695 struct wmi_radar_pci_control_cmd {
696 /* pcie host buffer start address */
697 __le64 base_addr;
698 /* pcie host control block address */
699 __le64 control_block_addr;
700 /* pcie host buffer size */
701 __le32 buffer_size;
702 __le32 reserved;
703 } __packed;
704
705 /* WMI_RF_MGMT_CMDID */
706 enum wmi_rf_mgmt_type {
707 WMI_RF_MGMT_W_DISABLE = 0x00,
708 WMI_RF_MGMT_W_ENABLE = 0x01,
709 WMI_RF_MGMT_GET_STATUS = 0x02,
710 };
711
712 /* WMI_BF_CONTROL_CMDID */
713 enum wmi_bf_triggers {
714 WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE = 0x01,
715 WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE = 0x02,
716 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP = 0x04,
717 WMI_BF_TRIGGER_MAX_BACK_FAILURE = 0x08,
718 WMI_BF_TRIGGER_FW = 0x10,
719 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE = 0x20,
720 WMI_BF_TRIGGER_AOA = 0x40,
721 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM = 0x80,
722 };
723
724 /* WMI_RF_MGMT_CMDID */
725 struct wmi_rf_mgmt_cmd {
726 __le32 rf_mgmt_type;
727 } __packed;
728
729 /* WMI_CORR_MEASURE_CMDID */
730 struct wmi_corr_measure_cmd {
731 __le32 freq_mhz;
732 __le32 length_samples;
733 __le32 iterations;
734 } __packed;
735
736 /* WMI_SET_SSID_CMDID */
737 struct wmi_set_ssid_cmd {
738 __le32 ssid_len;
739 u8 ssid[WMI_MAX_SSID_LEN];
740 } __packed;
741
742 /* WMI_SET_PCP_CHANNEL_CMDID */
743 struct wmi_set_pcp_channel_cmd {
744 u8 channel;
745 u8 reserved[3];
746 } __packed;
747
748 /* WMI_BCON_CTRL_CMDID */
749 struct wmi_bcon_ctrl_cmd {
750 __le16 bcon_interval;
751 __le16 frag_num;
752 __le64 ss_mask;
753 u8 network_type;
754 u8 pcp_max_assoc_sta;
755 u8 disable_sec_offload;
756 u8 disable_sec;
757 u8 hidden_ssid;
758 u8 is_go;
759 /* A-BFT length override if non-0 */
760 u8 abft_len;
761 u8 reserved;
762 } __packed;
763
764 /* WMI_PORT_ALLOCATE_CMDID */
765 enum wmi_port_role {
766 WMI_PORT_STA = 0x00,
767 WMI_PORT_PCP = 0x01,
768 WMI_PORT_AP = 0x02,
769 WMI_PORT_P2P_DEV = 0x03,
770 WMI_PORT_P2P_CLIENT = 0x04,
771 WMI_PORT_P2P_GO = 0x05,
772 };
773
774 /* WMI_PORT_ALLOCATE_CMDID */
775 struct wmi_port_allocate_cmd {
776 u8 mac[WMI_MAC_LEN];
777 u8 port_role;
778 u8 mid;
779 } __packed;
780
781 /* WMI_PORT_DELETE_CMDID */
782 struct wmi_port_delete_cmd {
783 u8 mid;
784 u8 reserved[3];
785 } __packed;
786
787 /* WMI_TRAFFIC_SUSPEND_CMD wakeup trigger bit mask values */
788 enum wmi_wakeup_trigger {
789 WMI_WAKEUP_TRIGGER_UCAST = 0x01,
790 WMI_WAKEUP_TRIGGER_BCAST = 0x02,
791 };
792
793 /* WMI_TRAFFIC_SUSPEND_CMDID */
794 struct wmi_traffic_suspend_cmd {
795 /* Bit vector: bit[0] - wake on Unicast, bit[1] - wake on Broadcast */
796 u8 wakeup_trigger;
797 } __packed;
798
799 /* WMI_P2P_CFG_CMDID */
800 enum wmi_discovery_mode {
801 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00,
802 WMI_DISCOVERY_MODE_OFFLOAD = 0x01,
803 WMI_DISCOVERY_MODE_PEER2PEER = 0x02,
804 };
805
806 struct wmi_p2p_cfg_cmd {
807 /* enum wmi_discovery_mode */
808 u8 discovery_mode;
809 u8 channel;
810 /* base to listen/search duration calculation */
811 __le16 bcon_interval;
812 } __packed;
813
814 /* WMI_POWER_MGMT_CFG_CMDID */
815 enum wmi_power_source_type {
816 WMI_POWER_SOURCE_BATTERY = 0x00,
817 WMI_POWER_SOURCE_OTHER = 0x01,
818 };
819
820 struct wmi_power_mgmt_cfg_cmd {
821 /* enum wmi_power_source_type */
822 u8 power_source;
823 u8 reserved[3];
824 } __packed;
825
826 /* WMI_PCP_START_CMDID */
827 enum wmi_ap_sme_offload_mode {
828 /* Full AP SME in FW */
829 WMI_AP_SME_OFFLOAD_FULL = 0x00,
830 /* Probe AP SME in FW */
831 WMI_AP_SME_OFFLOAD_PARTIAL = 0x01,
832 /* AP SME in host */
833 WMI_AP_SME_OFFLOAD_NONE = 0x02,
834 };
835
836 /* WMI_PCP_START_CMDID */
837 struct wmi_pcp_start_cmd {
838 __le16 bcon_interval;
839 u8 pcp_max_assoc_sta;
840 u8 hidden_ssid;
841 u8 is_go;
842 /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
843 u8 edmg_channel;
844 u8 raw_mode;
845 u8 reserved[3];
846 /* A-BFT length override if non-0 */
847 u8 abft_len;
848 /* enum wmi_ap_sme_offload_mode_e */
849 u8 ap_sme_offload_mode;
850 u8 network_type;
851 /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
852 * the primary channel number
853 */
854 u8 channel;
855 u8 disable_sec_offload;
856 u8 disable_sec;
857 } __packed;
858
859 /* WMI_SW_TX_REQ_CMDID */
860 struct wmi_sw_tx_req_cmd {
861 u8 dst_mac[WMI_MAC_LEN];
862 __le16 len;
863 u8 payload[0];
864 } __packed;
865
866 /* WMI_SW_TX_REQ_EXT_CMDID */
867 struct wmi_sw_tx_req_ext_cmd {
868 u8 dst_mac[WMI_MAC_LEN];
869 __le16 len;
870 __le16 duration_ms;
871 /* Channel to use, 0xFF for currently active channel */
872 u8 channel;
873 u8 reserved[5];
874 u8 payload[0];
875 } __packed;
876
877 /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
878 struct wmi_vring_switch_timing_config_cmd {
879 /* Set vring timing configuration:
880 *
881 * defined interval for vring switch
882 */
883 __le32 interval_usec;
884 /* vring inactivity threshold */
885 __le32 idle_th_usec;
886 } __packed;
887
888 struct wmi_sw_ring_cfg {
889 __le64 ring_mem_base;
890 __le16 ring_size;
891 __le16 max_mpdu_size;
892 } __packed;
893
894 /* wmi_vring_cfg_schd */
895 struct wmi_vring_cfg_schd {
896 __le16 priority;
897 __le16 timeslot_us;
898 } __packed;
899
900 enum wmi_vring_cfg_encap_trans_type {
901 WMI_VRING_ENC_TYPE_802_3 = 0x00,
902 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01,
903 WMI_VRING_ENC_TYPE_NONE = 0x02,
904 };
905
906 enum wmi_vring_cfg_ds_cfg {
907 WMI_VRING_DS_PBSS = 0x00,
908 WMI_VRING_DS_STATION = 0x01,
909 WMI_VRING_DS_AP = 0x02,
910 WMI_VRING_DS_ADDR4 = 0x03,
911 };
912
913 enum wmi_vring_cfg_nwifi_ds_trans_type {
914 WMI_NWIFI_TX_TRANS_MODE_NO = 0x00,
915 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01,
916 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02,
917 };
918
919 enum wmi_vring_cfg_schd_params_priority {
920 WMI_SCH_PRIO_REGULAR = 0x00,
921 WMI_SCH_PRIO_HIGH = 0x01,
922 };
923
924 #define CIDXTID_EXTENDED_CID_TID (0xFF)
925 #define CIDXTID_CID_POS (0)
926 #define CIDXTID_CID_LEN (4)
927 #define CIDXTID_CID_MSK (0xF)
928 #define CIDXTID_TID_POS (4)
929 #define CIDXTID_TID_LEN (4)
930 #define CIDXTID_TID_MSK (0xF0)
931 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0)
932 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1)
933 #define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1)
934 #define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1)
935 #define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1)
936 #define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2)
937 #define VRING_CFG_TO_RESOLUTION_VALUE_POS (0)
938 #define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6)
939 #define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F)
940
941 struct wmi_vring_cfg {
942 struct wmi_sw_ring_cfg tx_sw_ring;
943 /* 0-23 vrings */
944 u8 ringid;
945 /* Used for cid less than 8. For higher cid set
946 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
947 */
948 u8 cidxtid;
949 u8 encap_trans_type;
950 /* 802.3 DS cfg */
951 u8 ds_cfg;
952 u8 nwifi_ds_trans_type;
953 u8 mac_ctrl;
954 u8 to_resolution;
955 u8 agg_max_wsize;
956 struct wmi_vring_cfg_schd schd_params;
957 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
958 u8 cid;
959 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
960 u8 tid;
961 /* Update the vring's priority for Qos purpose. Set to
962 * WMI_QOS_DEFAULT_PRIORITY to use MID's QoS priority
963 */
964 u8 qos_priority;
965 u8 reserved;
966 } __packed;
967
968 enum wmi_vring_cfg_cmd_action {
969 WMI_VRING_CMD_ADD = 0x00,
970 WMI_VRING_CMD_MODIFY = 0x01,
971 WMI_VRING_CMD_DELETE = 0x02,
972 };
973
974 /* WMI_VRING_CFG_CMDID */
975 struct wmi_vring_cfg_cmd {
976 __le32 action;
977 struct wmi_vring_cfg vring_cfg;
978 } __packed;
979
980 struct wmi_bcast_vring_cfg {
981 struct wmi_sw_ring_cfg tx_sw_ring;
982 /* 0-23 vrings */
983 u8 ringid;
984 u8 encap_trans_type;
985 /* 802.3 DS cfg */
986 u8 ds_cfg;
987 u8 nwifi_ds_trans_type;
988 } __packed;
989
990 /* WMI_BCAST_VRING_CFG_CMDID */
991 struct wmi_bcast_vring_cfg_cmd {
992 __le32 action;
993 struct wmi_bcast_vring_cfg vring_cfg;
994 } __packed;
995
996 struct wmi_edma_ring_cfg {
997 __le64 ring_mem_base;
998 /* size in number of items */
999 __le16 ring_size;
1000 u8 ring_id;
1001 u8 reserved;
1002 } __packed;
1003
1004 enum wmi_rx_msg_type {
1005 WMI_RX_MSG_TYPE_COMPRESSED = 0x00,
1006 WMI_RX_MSG_TYPE_EXTENDED = 0x01,
1007 };
1008
1009 enum wmi_ring_add_irq_mode {
1010 /* Backwards compatibility
1011 * for DESC ring - interrupt disabled
1012 * for STATUS ring - interrupt enabled
1013 */
1014 WMI_RING_ADD_IRQ_MODE_BWC = 0x00,
1015 WMI_RING_ADD_IRQ_MODE_DISABLE = 0x01,
1016 WMI_RING_ADD_IRQ_MODE_ENABLE = 0x02,
1017 };
1018
1019 struct wmi_tx_status_ring_add_cmd {
1020 struct wmi_edma_ring_cfg ring_cfg;
1021 u8 irq_index;
1022 /* wmi_ring_add_irq_mode */
1023 u8 irq_mode;
1024 u8 reserved[2];
1025 } __packed;
1026
1027 struct wmi_rx_status_ring_add_cmd {
1028 struct wmi_edma_ring_cfg ring_cfg;
1029 u8 irq_index;
1030 /* wmi_rx_msg_type */
1031 u8 rx_msg_type;
1032 u8 reserved[2];
1033 } __packed;
1034
1035 struct wmi_cfg_def_rx_offload_cmd {
1036 __le16 max_msdu_size;
1037 __le16 max_rx_pl_per_desc;
1038 u8 decap_trans_type;
1039 u8 l2_802_3_offload_ctrl;
1040 u8 l2_nwifi_offload_ctrl;
1041 u8 vlan_id;
1042 u8 nwifi_ds_trans_type;
1043 u8 l3_l4_ctrl;
1044 u8 reserved[6];
1045 } __packed;
1046
1047 struct wmi_tx_desc_ring_add_cmd {
1048 struct wmi_edma_ring_cfg ring_cfg;
1049 __le16 max_msdu_size;
1050 /* Correlated status ring (0-63) */
1051 u8 status_ring_id;
1052 u8 cid;
1053 u8 tid;
1054 u8 encap_trans_type;
1055 u8 mac_ctrl;
1056 u8 to_resolution;
1057 u8 agg_max_wsize;
1058 u8 irq_index;
1059 /* wmi_ring_add_irq_mode */
1060 u8 irq_mode;
1061 u8 reserved;
1062 struct wmi_vring_cfg_schd schd_params;
1063 } __packed;
1064
1065 struct wmi_rx_desc_ring_add_cmd {
1066 struct wmi_edma_ring_cfg ring_cfg;
1067 u8 irq_index;
1068 /* 0-63 status rings */
1069 u8 status_ring_id;
1070 u8 reserved[2];
1071 __le64 sw_tail_host_addr;
1072 } __packed;
1073
1074 struct wmi_bcast_desc_ring_add_cmd {
1075 struct wmi_edma_ring_cfg ring_cfg;
1076 __le16 max_msdu_size;
1077 /* Correlated status ring (0-63) */
1078 u8 status_ring_id;
1079 u8 encap_trans_type;
1080 u8 reserved[4];
1081 } __packed;
1082
1083 /* WMI_LO_POWER_CALIB_FROM_OTP_CMDID */
1084 struct wmi_lo_power_calib_from_otp_cmd {
1085 /* index to read from OTP. zero based */
1086 u8 index;
1087 u8 reserved[3];
1088 } __packed;
1089
1090 /* WMI_LO_POWER_CALIB_FROM_OTP_EVENTID */
1091 struct wmi_lo_power_calib_from_otp_event {
1092 /* wmi_fw_status */
1093 u8 status;
1094 u8 reserved[3];
1095 } __packed;
1096
1097 /* WMI_RING_BA_EN_CMDID */
1098 struct wmi_ring_ba_en_cmd {
1099 u8 ring_id;
1100 u8 agg_max_wsize;
1101 __le16 ba_timeout;
1102 u8 amsdu;
1103 u8 reserved[3];
1104 } __packed;
1105
1106 /* WMI_RING_BA_DIS_CMDID */
1107 struct wmi_ring_ba_dis_cmd {
1108 u8 ring_id;
1109 u8 reserved;
1110 __le16 reason;
1111 } __packed;
1112
1113 /* WMI_NOTIFY_REQ_CMDID */
1114 struct wmi_notify_req_cmd {
1115 u8 cid;
1116 u8 year;
1117 u8 month;
1118 u8 day;
1119 __le32 interval_usec;
1120 u8 hour;
1121 u8 minute;
1122 u8 second;
1123 u8 miliseconds;
1124 } __packed;
1125
1126 /* WMI_CFG_RX_CHAIN_CMDID */
1127 enum wmi_sniffer_cfg_mode {
1128 WMI_SNIFFER_OFF = 0x00,
1129 WMI_SNIFFER_ON = 0x01,
1130 };
1131
1132 /* WMI_SILENT_RSSI_TABLE */
1133 enum wmi_silent_rssi_table {
1134 RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00,
1135 RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01,
1136 };
1137
1138 /* WMI_SILENT_RSSI_STATUS */
1139 enum wmi_silent_rssi_status {
1140 SILENT_RSSI_SUCCESS = 0x00,
1141 SILENT_RSSI_FAILURE = 0x01,
1142 };
1143
1144 /* WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID */
1145 struct wmi_set_active_silent_rssi_table_cmd {
1146 /* enum wmi_silent_rssi_table */
1147 __le32 table;
1148 } __packed;
1149
1150 enum wmi_sniffer_cfg_phy_info_mode {
1151 WMI_SNIFFER_PHY_INFO_DISABLED = 0x00,
1152 WMI_SNIFFER_PHY_INFO_ENABLED = 0x01,
1153 };
1154
1155 enum wmi_sniffer_cfg_phy_support {
1156 WMI_SNIFFER_CP = 0x00,
1157 WMI_SNIFFER_DP = 0x01,
1158 WMI_SNIFFER_BOTH_PHYS = 0x02,
1159 };
1160
1161 /* wmi_sniffer_cfg */
1162 struct wmi_sniffer_cfg {
1163 /* enum wmi_sniffer_cfg_mode */
1164 __le32 mode;
1165 /* enum wmi_sniffer_cfg_phy_info_mode */
1166 __le32 phy_info_mode;
1167 /* enum wmi_sniffer_cfg_phy_support */
1168 __le32 phy_support;
1169 u8 channel;
1170 u8 reserved[3];
1171 } __packed;
1172
1173 enum wmi_cfg_rx_chain_cmd_action {
1174 WMI_RX_CHAIN_ADD = 0x00,
1175 WMI_RX_CHAIN_DEL = 0x01,
1176 };
1177
1178 enum wmi_cfg_rx_chain_cmd_decap_trans_type {
1179 WMI_DECAP_TYPE_802_3 = 0x00,
1180 WMI_DECAP_TYPE_NATIVE_WIFI = 0x01,
1181 WMI_DECAP_TYPE_NONE = 0x02,
1182 };
1183
1184 enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
1185 WMI_NWIFI_RX_TRANS_MODE_NO = 0x00,
1186 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01,
1187 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02,
1188 };
1189
1190 enum wmi_cfg_rx_chain_cmd_reorder_type {
1191 WMI_RX_HW_REORDER = 0x00,
1192 WMI_RX_SW_REORDER = 0x01,
1193 };
1194
1195 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0)
1196 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1)
1197 #define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1)
1198 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1)
1199 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1)
1200 #define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2)
1201 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0)
1202 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1)
1203 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1)
1204 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1)
1205 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1)
1206 #define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2)
1207 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0)
1208 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1)
1209 #define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1)
1210 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1)
1211 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1)
1212 #define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2)
1213 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0)
1214 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1)
1215 #define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1)
1216 #define RING_CTRL_OVERRIDE_WB_THRSH_POS (1)
1217 #define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1)
1218 #define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2)
1219 #define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2)
1220 #define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1)
1221 #define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4)
1222 #define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3)
1223 #define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1)
1224 #define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8)
1225
1226 /* WMI_CFG_RX_CHAIN_CMDID */
1227 struct wmi_cfg_rx_chain_cmd {
1228 __le32 action;
1229 struct wmi_sw_ring_cfg rx_sw_ring;
1230 u8 mid;
1231 u8 decap_trans_type;
1232 u8 l2_802_3_offload_ctrl;
1233 u8 l2_nwifi_offload_ctrl;
1234 u8 vlan_id;
1235 u8 nwifi_ds_trans_type;
1236 u8 l3_l4_ctrl;
1237 u8 ring_ctrl;
1238 __le16 prefetch_thrsh;
1239 __le16 wb_thrsh;
1240 __le32 itr_value;
1241 __le16 host_thrsh;
1242 u8 reorder_type;
1243 u8 reserved;
1244 struct wmi_sniffer_cfg sniffer_cfg;
1245 __le16 max_rx_pl_per_desc;
1246 } __packed;
1247
1248 /* WMI_RCP_ADDBA_RESP_CMDID */
1249 struct wmi_rcp_addba_resp_cmd {
1250 /* Used for cid less than 8. For higher cid set
1251 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
1252 */
1253 u8 cidxtid;
1254 u8 dialog_token;
1255 __le16 status_code;
1256 /* ieee80211_ba_parameterset field to send */
1257 __le16 ba_param_set;
1258 __le16 ba_timeout;
1259 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1260 u8 cid;
1261 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1262 u8 tid;
1263 u8 reserved[2];
1264 } __packed;
1265
1266 /* WMI_RCP_ADDBA_RESP_EDMA_CMDID */
1267 struct wmi_rcp_addba_resp_edma_cmd {
1268 u8 cid;
1269 u8 tid;
1270 u8 dialog_token;
1271 u8 reserved;
1272 __le16 status_code;
1273 /* ieee80211_ba_parameterset field to send */
1274 __le16 ba_param_set;
1275 __le16 ba_timeout;
1276 u8 status_ring_id;
1277 /* wmi_cfg_rx_chain_cmd_reorder_type */
1278 u8 reorder_type;
1279 } __packed;
1280
1281 /* WMI_RCP_DELBA_CMDID */
1282 struct wmi_rcp_delba_cmd {
1283 /* Used for cid less than 8. For higher cid set
1284 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
1285 */
1286 u8 cidxtid;
1287 u8 reserved;
1288 __le16 reason;
1289 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1290 u8 cid;
1291 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1292 u8 tid;
1293 u8 reserved2[2];
1294 } __packed;
1295
1296 /* WMI_RCP_ADDBA_REQ_CMDID */
1297 struct wmi_rcp_addba_req_cmd {
1298 /* Used for cid less than 8. For higher cid set
1299 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
1300 */
1301 u8 cidxtid;
1302 u8 dialog_token;
1303 /* ieee80211_ba_parameterset field as it received */
1304 __le16 ba_param_set;
1305 __le16 ba_timeout;
1306 /* ieee80211_ba_seqstrl field as it received */
1307 __le16 ba_seq_ctrl;
1308 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1309 u8 cid;
1310 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
1311 u8 tid;
1312 u8 reserved[2];
1313 } __packed;
1314
1315 /* WMI_SET_MAC_ADDRESS_CMDID */
1316 struct wmi_set_mac_address_cmd {
1317 u8 mac[WMI_MAC_LEN];
1318 u8 reserved[2];
1319 } __packed;
1320
1321 /* WMI_ECHO_CMDID
1322 * Check FW is alive
1323 * Returned event: WMI_ECHO_RSP_EVENTID
1324 */
1325 struct wmi_echo_cmd {
1326 __le32 value;
1327 } __packed;
1328
1329 /* WMI_DEEP_ECHO_CMDID
1330 * Check FW and uCode is alive
1331 * Returned event: WMI_DEEP_ECHO_RSP_EVENTID
1332 */
1333 struct wmi_deep_echo_cmd {
1334 __le32 value;
1335 } __packed;
1336
1337 /* WMI_RF_PWR_ON_DELAY_CMDID
1338 * set FW time parameters used through RF resetting
1339 * RF reset consists of bringing its power down for a period of time, then
1340 * bringing the power up
1341 * Returned event: WMI_RF_PWR_ON_DELAY_RSP_EVENTID
1342 */
1343 struct wmi_rf_pwr_on_delay_cmd {
1344 /* time in usec the FW waits after bringing the RF PWR down,
1345 * set 0 for default
1346 */
1347 __le16 down_delay_usec;
1348 /* time in usec the FW waits after bringing the RF PWR up,
1349 * set 0 for default
1350 */
1351 __le16 up_delay_usec;
1352 } __packed;
1353
1354 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID
1355 * This API controls the Tx and Rx gain over temperature.
1356 * It controls the Tx D-type, Rx D-type and Rx E-type amplifiers.
1357 * It also controls the Tx gain index, by controlling the Rx to Tx gain index
1358 * offset.
1359 * The control is divided by 3 temperature values to 4 temperature ranges.
1360 * Each parameter uses its own temperature values.
1361 * Returned event: WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID
1362 */
1363 struct wmi_set_high_power_table_params_cmd {
1364 /* Temperature range for Tx D-type parameters */
1365 u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1366 u8 reserved0;
1367 /* Tx D-type values to be used for each temperature range */
1368 __le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1369 /* Temperature range for Tx E-type parameters */
1370 u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
1371 u8 reserved1;
1372 /* Tx E-type values to be used for each temperature range.
1373 * The last 4 values of any range are the first 4 values of the next
1374 * range and so on
1375 */
1376 __le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1377 /* Temperature range for Rx D-type parameters */
1378 u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1379 u8 reserved2;
1380 /* Rx D-type values to be used for each temperature range */
1381 __le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1382 /* Temperature range for Rx E-type parameters */
1383 u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
1384 u8 reserved3;
1385 /* Rx E-type values to be used for each temperature range.
1386 * The last 4 values of any range are the first 4 values of the next
1387 * range and so on
1388 */
1389 __le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1390 /* Temperature range for rx_2_tx_offs parameters */
1391 u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
1392 u8 reserved4;
1393 /* Rx to Tx gain index offset */
1394 s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
1395 } __packed;
1396
1397 /* WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID
1398 * This API sets rd parameter per mcs.
1399 * Relevant only in Fixed Scheduling mode.
1400 * Returned event: WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID
1401 */
1402 struct wmi_fixed_scheduling_ul_config_cmd {
1403 /* Use mcs -1 to set for every mcs */
1404 s8 mcs;
1405 /* Number of frames with rd bit set in a single virtual slot */
1406 u8 rd_count_per_slot;
1407 u8 reserved[2];
1408 } __packed;
1409
1410 /* CMD: WMI_RF_XPM_READ_CMDID */
1411 struct wmi_rf_xpm_read_cmd {
1412 u8 rf_id;
1413 u8 reserved[3];
1414 /* XPM bit start address in range [0,8191]bits - rounded by FW to
1415 * multiple of 8bits
1416 */
1417 __le32 xpm_bit_address;
1418 __le32 num_bytes;
1419 } __packed;
1420
1421 /* CMD: WMI_RF_XPM_WRITE_CMDID */
1422 struct wmi_rf_xpm_write_cmd {
1423 u8 rf_id;
1424 u8 reserved0[3];
1425 /* XPM bit start address in range [0,8191]bits - rounded by FW to
1426 * multiple of 8bits
1427 */
1428 __le32 xpm_bit_address;
1429 __le32 num_bytes;
1430 /* boolean flag indicating whether FW should verify the write
1431 * operation
1432 */
1433 u8 verify;
1434 u8 reserved1[3];
1435 /* actual size=num_bytes */
1436 u8 data_bytes[0];
1437 } __packed;
1438
1439 /* Possible modes for temperature measurement */
1440 enum wmi_temperature_measure_mode {
1441 TEMPERATURE_USE_OLD_VALUE = 0x01,
1442 TEMPERATURE_MEASURE_NOW = 0x02,
1443 };
1444
1445 /* WMI_TEMP_SENSE_CMDID */
1446 struct wmi_temp_sense_cmd {
1447 __le32 measure_baseband_en;
1448 __le32 measure_rf_en;
1449 __le32 measure_mode;
1450 } __packed;
1451
1452 enum wmi_pmc_op {
1453 WMI_PMC_ALLOCATE = 0x00,
1454 WMI_PMC_RELEASE = 0x01,
1455 };
1456
1457 /* WMI_PMC_CMDID */
1458 struct wmi_pmc_cmd {
1459 /* enum wmi_pmc_cmd_op_type */
1460 u8 op;
1461 u8 reserved;
1462 __le16 ring_size;
1463 __le64 mem_base;
1464 } __packed;
1465
1466 enum wmi_aoa_meas_type {
1467 WMI_AOA_PHASE_MEAS = 0x00,
1468 WMI_AOA_PHASE_AMP_MEAS = 0x01,
1469 };
1470
1471 /* WMI_AOA_MEAS_CMDID */
1472 struct wmi_aoa_meas_cmd {
1473 u8 mac_addr[WMI_MAC_LEN];
1474 /* channels IDs:
1475 * 0 - 58320 MHz
1476 * 1 - 60480 MHz
1477 * 2 - 62640 MHz
1478 */
1479 u8 channel;
1480 /* enum wmi_aoa_meas_type */
1481 u8 aoa_meas_type;
1482 __le32 meas_rf_mask;
1483 } __packed;
1484
1485 /* WMI_SET_MGMT_RETRY_LIMIT_CMDID */
1486 struct wmi_set_mgmt_retry_limit_cmd {
1487 /* MAC retransmit limit for mgmt frames */
1488 u8 mgmt_retry_limit;
1489 /* alignment to 32b */
1490 u8 reserved[3];
1491 } __packed;
1492
1493 /* Zones: HIGH, MAX, CRITICAL */
1494 #define WMI_NUM_OF_TT_ZONES (3)
1495
1496 struct wmi_tt_zone_limits {
1497 /* Above this temperature this zone is active */
1498 u8 temperature_high;
1499 /* Below this temperature the adjacent lower zone is active */
1500 u8 temperature_low;
1501 u8 reserved[2];
1502 } __packed;
1503
1504 /* Struct used for both configuration and status commands of thermal
1505 * throttling
1506 */
1507 struct wmi_tt_data {
1508 /* Enable/Disable TT algorithm for baseband */
1509 u8 bb_enabled;
1510 u8 reserved0[3];
1511 /* Define zones for baseband */
1512 struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
1513 /* Enable/Disable TT algorithm for radio */
1514 u8 rf_enabled;
1515 u8 reserved1[3];
1516 /* Define zones for all radio chips */
1517 struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
1518 } __packed;
1519
1520 /* WMI_SET_THERMAL_THROTTLING_CFG_CMDID */
1521 struct wmi_set_thermal_throttling_cfg_cmd {
1522 /* Command data */
1523 struct wmi_tt_data tt_data;
1524 } __packed;
1525
1526 /* WMI_NEW_STA_CMDID */
1527 struct wmi_new_sta_cmd {
1528 u8 dst_mac[WMI_MAC_LEN];
1529 u8 aid;
1530 } __packed;
1531
1532 /* WMI_DEL_STA_CMDID */
1533 struct wmi_del_sta_cmd {
1534 u8 dst_mac[WMI_MAC_LEN];
1535 __le16 disconnect_reason;
1536 } __packed;
1537
1538 enum wmi_tof_burst_duration {
1539 WMI_TOF_BURST_DURATION_250_USEC = 2,
1540 WMI_TOF_BURST_DURATION_500_USEC = 3,
1541 WMI_TOF_BURST_DURATION_1_MSEC = 4,
1542 WMI_TOF_BURST_DURATION_2_MSEC = 5,
1543 WMI_TOF_BURST_DURATION_4_MSEC = 6,
1544 WMI_TOF_BURST_DURATION_8_MSEC = 7,
1545 WMI_TOF_BURST_DURATION_16_MSEC = 8,
1546 WMI_TOF_BURST_DURATION_32_MSEC = 9,
1547 WMI_TOF_BURST_DURATION_64_MSEC = 10,
1548 WMI_TOF_BURST_DURATION_128_MSEC = 11,
1549 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15,
1550 };
1551
1552 enum wmi_tof_session_start_flags {
1553 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1,
1554 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2,
1555 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4,
1556 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8,
1557 };
1558
1559 /* WMI_TOF_SESSION_START_CMDID */
1560 struct wmi_ftm_dest_info {
1561 u8 channel;
1562 /* wmi_tof_session_start_flags_e */
1563 u8 flags;
1564 u8 initial_token;
1565 u8 num_of_ftm_per_burst;
1566 u8 num_of_bursts_exp;
1567 /* wmi_tof_burst_duration_e */
1568 u8 burst_duration;
1569 /* Burst Period indicate interval between two consecutive burst
1570 * instances, in units of 100 ms
1571 */
1572 __le16 burst_period;
1573 u8 dst_mac[WMI_MAC_LEN];
1574 u8 reserved;
1575 u8 num_burst_per_aoa_meas;
1576 } __packed;
1577
1578 /* WMI_TOF_SESSION_START_CMDID */
1579 struct wmi_tof_session_start_cmd {
1580 __le32 session_id;
1581 u8 reserved1;
1582 u8 aoa_type;
1583 __le16 num_of_dest;
1584 u8 reserved[4];
1585 struct wmi_ftm_dest_info ftm_dest_info[0];
1586 } __packed;
1587
1588 /* WMI_TOF_CFG_RESPONDER_CMDID */
1589 struct wmi_tof_cfg_responder_cmd {
1590 u8 enable;
1591 u8 reserved[3];
1592 } __packed;
1593
1594 enum wmi_tof_channel_info_report_type {
1595 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1,
1596 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2,
1597 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4,
1598 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8,
1599 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10,
1600 };
1601
1602 /* WMI_TOF_CHANNEL_INFO_CMDID */
1603 struct wmi_tof_channel_info_cmd {
1604 /* wmi_tof_channel_info_report_type_e */
1605 __le32 channel_info_report_request;
1606 } __packed;
1607
1608 /* WMI_TOF_SET_TX_RX_OFFSET_CMDID */
1609 struct wmi_tof_set_tx_rx_offset_cmd {
1610 /* TX delay offset */
1611 __le32 tx_offset;
1612 /* RX delay offset */
1613 __le32 rx_offset;
1614 /* Mask to define which RFs to configure. 0 means all RFs */
1615 __le32 rf_mask;
1616 /* Offset to strongest tap of CIR */
1617 __le32 precursor;
1618 } __packed;
1619
1620 /* WMI_TOF_GET_TX_RX_OFFSET_CMDID */
1621 struct wmi_tof_get_tx_rx_offset_cmd {
1622 /* rf index to read offsets from */
1623 u8 rf_index;
1624 u8 reserved[3];
1625 } __packed;
1626
1627 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1628 struct wmi_map_mcs_to_schd_params {
1629 u8 mcs;
1630 /* time in usec from start slot to start tx flow - default 15 */
1631 u8 time_in_usec_before_initiate_tx;
1632 /* RD enable - if yes consider RD according to STA mcs */
1633 u8 rd_enabled;
1634 u8 reserved;
1635 /* time in usec from start slot to stop vring */
1636 __le16 time_in_usec_to_stop_vring;
1637 /* timeout to force flush from start of slot */
1638 __le16 flush_to_in_usec;
1639 /* per mcs the mac buffer limit size in bytes */
1640 __le32 mac_buff_size_in_bytes;
1641 } __packed;
1642
1643 /* WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID */
1644 struct wmi_fixed_scheduling_config_complete_event {
1645 /* wmi_fw_status */
1646 u8 status;
1647 u8 reserved[3];
1648 } __packed;
1649
1650 /* This value exists for backwards compatibility only.
1651 * Do not use it in new commands.
1652 * Use dynamic arrays where possible.
1653 */
1654 #define WMI_NUM_MCS (13)
1655
1656 /* WMI_FIXED_SCHEDULING_CONFIG_CMDID */
1657 struct wmi_fixed_scheduling_config_cmd {
1658 /* defaults in the SAS table */
1659 struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1660 /* default 150 uSec */
1661 __le16 max_sta_rd_ppdu_duration_in_usec;
1662 /* default 300 uSec */
1663 __le16 max_sta_grant_ppdu_duration_in_usec;
1664 /* default 1000 uSec */
1665 __le16 assoc_slot_duration_in_usec;
1666 /* default 360 uSec */
1667 __le16 virtual_slot_duration_in_usec;
1668 /* each this field value slots start with grant frame to the station
1669 * - default 2
1670 */
1671 u8 number_of_ap_slots_for_initiate_grant;
1672 u8 reserved[3];
1673 } __packed;
1674
1675 /* WMI_ENABLE_FIXED_SCHEDULING_CMDID */
1676 struct wmi_enable_fixed_scheduling_cmd {
1677 __le32 reserved;
1678 } __packed;
1679
1680 /* WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID */
1681 struct wmi_enable_fixed_scheduling_complete_event {
1682 /* wmi_fw_status */
1683 u8 status;
1684 u8 reserved[3];
1685 } __packed;
1686
1687 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID */
1688 struct wmi_set_multi_directed_omnis_config_cmd {
1689 /* number of directed omnis at destination AP */
1690 u8 dest_ap_num_directed_omnis;
1691 u8 reserved[3];
1692 } __packed;
1693
1694 /* WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID */
1695 struct wmi_set_multi_directed_omnis_config_event {
1696 /* wmi_fw_status */
1697 u8 status;
1698 u8 reserved[3];
1699 } __packed;
1700
1701 /* WMI_RADAR_GENERAL_CONFIG_EVENTID */
1702 struct wmi_radar_general_config_event {
1703 /* wmi_fw_status */
1704 u8 status;
1705 u8 reserved[3];
1706 } __packed;
1707
1708 /* WMI_RADAR_CONFIG_SELECT_EVENTID */
1709 struct wmi_radar_config_select_event {
1710 /* wmi_fw_status */
1711 u8 status;
1712 u8 reserved[3];
1713 /* In unit of bytes */
1714 __le32 fifo_size;
1715 /* In unit of bytes */
1716 __le32 pulse_size;
1717 } __packed;
1718
1719 /* WMI_RADAR_PARAMS_CONFIG_EVENTID */
1720 struct wmi_radar_params_config_event {
1721 /* wmi_fw_status */
1722 u8 status;
1723 u8 reserved[3];
1724 } __packed;
1725
1726 /* WMI_RADAR_SET_MODE_EVENTID */
1727 struct wmi_radar_set_mode_event {
1728 /* wmi_fw_status */
1729 u8 status;
1730 u8 reserved[3];
1731 } __packed;
1732
1733 /* WMI_RADAR_CONTROL_EVENTID */
1734 struct wmi_radar_control_event {
1735 /* wmi_fw_status */
1736 u8 status;
1737 u8 reserved[3];
1738 } __packed;
1739
1740 /* WMI_RADAR_PCI_CONTROL_EVENTID */
1741 struct wmi_radar_pci_control_event {
1742 /* wmi_fw_status */
1743 u8 status;
1744 u8 reserved[3];
1745 } __packed;
1746
1747 /* WMI_SET_LONG_RANGE_CONFIG_CMDID */
1748 struct wmi_set_long_range_config_cmd {
1749 __le32 reserved;
1750 } __packed;
1751
1752 /* WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID */
1753 struct wmi_set_long_range_config_complete_event {
1754 /* wmi_fw_status */
1755 u8 status;
1756 u8 reserved[3];
1757 } __packed;
1758
1759 /* payload max size is 1024 bytes: max event buffer size (1044) - WMI headers
1760 * (16) - prev struct field size (4)
1761 */
1762 #define WMI_MAX_IOCTL_PAYLOAD_SIZE (1024)
1763 #define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE (1024)
1764 #define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE (1024)
1765
1766 enum wmi_internal_fw_ioctl_code {
1767 WMI_INTERNAL_FW_CODE_NONE = 0x0,
1768 WMI_INTERNAL_FW_CODE_QCOM = 0x1,
1769 };
1770
1771 /* WMI_INTERNAL_FW_IOCTL_CMDID */
1772 struct wmi_internal_fw_ioctl_cmd {
1773 /* enum wmi_internal_fw_ioctl_code */
1774 __le16 code;
1775 __le16 length;
1776 /* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
1777 * Must be the last member of the struct
1778 */
1779 __le32 payload[0];
1780 } __packed;
1781
1782 /* WMI_INTERNAL_FW_IOCTL_EVENTID */
1783 struct wmi_internal_fw_ioctl_event {
1784 /* wmi_fw_status */
1785 u8 status;
1786 u8 reserved;
1787 __le16 length;
1788 /* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
1789 * Must be the last member of the struct
1790 */
1791 __le32 payload[0];
1792 } __packed;
1793
1794 /* WMI_INTERNAL_FW_EVENT_EVENTID */
1795 struct wmi_internal_fw_event_event {
1796 __le16 id;
1797 __le16 length;
1798 /* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
1799 * Must be the last member of the struct
1800 */
1801 __le32 payload[0];
1802 } __packed;
1803
1804 /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */
1805 struct wmi_set_vring_priority_weight_cmd {
1806 /* Array of weights. Valid values are
1807 * WMI_QOS_MIN_DEFAULT_WEIGHT...WMI_QOS_MAX_WEIGHT. Weight #0 is
1808 * hard-coded WMI_QOS_MIN_WEIGHT. This array provide the weights
1809 * #1..#3
1810 */
1811 u8 weight[3];
1812 u8 reserved;
1813 } __packed;
1814
1815 /* WMI_SET_VRING_PRIORITY_CMDID */
1816 struct wmi_vring_priority {
1817 u8 vring_idx;
1818 /* Weight index. Valid value is 0-3 */
1819 u8 priority;
1820 u8 reserved[2];
1821 } __packed;
1822
1823 /* WMI_SET_VRING_PRIORITY_CMDID */
1824 struct wmi_set_vring_priority_cmd {
1825 /* number of entries in vring_priority. Set to
1826 * WMI_QOS_SET_VIF_PRIORITY to update the VIF's priority, and there
1827 * will be only one entry in vring_priority
1828 */
1829 u8 num_of_vrings;
1830 u8 reserved[3];
1831 struct wmi_vring_priority vring_priority[0];
1832 } __packed;
1833
1834 /* WMI_BF_CONTROL_CMDID - deprecated */
1835 struct wmi_bf_control_cmd {
1836 /* wmi_bf_triggers */
1837 __le32 triggers;
1838 u8 cid;
1839 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1840 u8 txss_mode;
1841 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1842 u8 brp_mode;
1843 /* Max cts threshold (correspond to
1844 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1845 */
1846 u8 bf_trigger_max_cts_failure_thr;
1847 /* Max cts threshold in dense (correspond to
1848 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1849 */
1850 u8 bf_trigger_max_cts_failure_dense_thr;
1851 /* Max b-ack threshold (correspond to
1852 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1853 */
1854 u8 bf_trigger_max_back_failure_thr;
1855 /* Max b-ack threshold in dense (correspond to
1856 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1857 */
1858 u8 bf_trigger_max_back_failure_dense_thr;
1859 u8 reserved0;
1860 /* Wrong sectors threshold */
1861 __le32 wrong_sector_bis_thr;
1862 /* BOOL to enable/disable long term trigger */
1863 u8 long_term_enable;
1864 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1865 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1866 */
1867 u8 long_term_update_thr;
1868 /* Long term throughput threshold [Mbps] */
1869 u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
1870 u8 reserved1;
1871 /* Long term timeout threshold table [msec] */
1872 __le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
1873 u8 reserved2[2];
1874 } __packed;
1875
1876 /* BF configuration for each MCS */
1877 struct wmi_bf_control_ex_mcs {
1878 /* Long term throughput threshold [Mbps] */
1879 u8 long_term_mbps_th_tbl;
1880 u8 reserved;
1881 /* Long term timeout threshold table [msec] */
1882 __le16 long_term_trig_timeout_per_mcs;
1883 } __packed;
1884
1885 /* WMI_BF_CONTROL_EX_CMDID */
1886 struct wmi_bf_control_ex_cmd {
1887 /* wmi_bf_triggers */
1888 __le32 triggers;
1889 /* enum wmi_edmg_tx_mode */
1890 u8 tx_mode;
1891 /* DISABLED = 0, ENABLED = 1 , DRY_RUN = 2 */
1892 u8 txss_mode;
1893 /* DISABLED = 0, ENABLED = 1, DRY_RUN = 2 */
1894 u8 brp_mode;
1895 /* Max cts threshold (correspond to
1896 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1897 */
1898 u8 bf_trigger_max_cts_failure_thr;
1899 /* Max cts threshold in dense (correspond to
1900 * WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP)
1901 */
1902 u8 bf_trigger_max_cts_failure_dense_thr;
1903 /* Max b-ack threshold (correspond to
1904 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1905 */
1906 u8 bf_trigger_max_back_failure_thr;
1907 /* Max b-ack threshold in dense (correspond to
1908 * WMI_BF_TRIGGER_MAX_BACK_FAILURE)
1909 */
1910 u8 bf_trigger_max_back_failure_dense_thr;
1911 u8 reserved0;
1912 /* Wrong sectors threshold */
1913 __le32 wrong_sector_bis_thr;
1914 /* BOOL to enable/disable long term trigger */
1915 u8 long_term_enable;
1916 /* 1 = Update long term thresholds from the long_term_mbps_th_tbl and
1917 * long_term_trig_timeout_per_mcs arrays, 0 = Ignore
1918 */
1919 u8 long_term_update_thr;
1920 u8 each_mcs_cfg_size;
1921 u8 reserved1;
1922 /* Configuration for each MCS */
1923 struct wmi_bf_control_ex_mcs each_mcs_cfg[0];
1924 } __packed;
1925
1926 /* WMI_LINK_STATS_CMD */
1927 enum wmi_link_stats_action {
1928 WMI_LINK_STATS_SNAPSHOT = 0x00,
1929 WMI_LINK_STATS_PERIODIC = 0x01,
1930 WMI_LINK_STATS_STOP_PERIODIC = 0x02,
1931 };
1932
1933 /* WMI_LINK_STATS_EVENT record identifiers */
1934 enum wmi_link_stats_record_type {
1935 WMI_LINK_STATS_TYPE_BASIC = 0x01,
1936 WMI_LINK_STATS_TYPE_GLOBAL = 0x02,
1937 };
1938
1939 /* WMI_LINK_STATS_CMDID */
1940 struct wmi_link_stats_cmd {
1941 /* bitmask of required record types
1942 * (wmi_link_stats_record_type_e)
1943 */
1944 __le32 record_type_mask;
1945 /* 0xff for all cids */
1946 u8 cid;
1947 /* wmi_link_stats_action_e */
1948 u8 action;
1949 u8 reserved[6];
1950 /* range = 100 - 10000 */
1951 __le32 interval_msec;
1952 } __packed;
1953
1954 /* WMI_SET_GRANT_MCS_CMDID */
1955 struct wmi_set_grant_mcs_cmd {
1956 u8 mcs;
1957 u8 reserved[3];
1958 } __packed;
1959
1960 /* WMI_SET_AP_SLOT_SIZE_CMDID */
1961 struct wmi_set_ap_slot_size_cmd {
1962 __le32 slot_size;
1963 } __packed;
1964
1965 /* WMI_TEMP_SENSE_ALL_CMDID */
1966 struct wmi_temp_sense_all_cmd {
1967 u8 measure_baseband_en;
1968 u8 measure_rf_en;
1969 u8 measure_mode;
1970 u8 reserved;
1971 } __packed;
1972
1973 /* WMI Events
1974 * List of Events (target to host)
1975 */
1976 enum wmi_event_id {
1977 WMI_READY_EVENTID = 0x1001,
1978 WMI_CONNECT_EVENTID = 0x1002,
1979 WMI_DISCONNECT_EVENTID = 0x1003,
1980 WMI_START_SCHED_SCAN_EVENTID = 0x1005,
1981 WMI_STOP_SCHED_SCAN_EVENTID = 0x1006,
1982 WMI_SCHED_SCAN_RESULT_EVENTID = 0x1007,
1983 WMI_SCAN_COMPLETE_EVENTID = 0x100A,
1984 WMI_REPORT_STATISTICS_EVENTID = 0x100B,
1985 WMI_FT_AUTH_STATUS_EVENTID = 0x100C,
1986 WMI_FT_REASSOC_STATUS_EVENTID = 0x100D,
1987 WMI_RADAR_GENERAL_CONFIG_EVENTID = 0x1100,
1988 WMI_RADAR_CONFIG_SELECT_EVENTID = 0x1101,
1989 WMI_RADAR_PARAMS_CONFIG_EVENTID = 0x1102,
1990 WMI_RADAR_SET_MODE_EVENTID = 0x1103,
1991 WMI_RADAR_CONTROL_EVENTID = 0x1104,
1992 WMI_RADAR_PCI_CONTROL_EVENTID = 0x1105,
1993 WMI_RD_MEM_RSP_EVENTID = 0x1800,
1994 WMI_FW_READY_EVENTID = 0x1801,
1995 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200,
1996 WMI_ECHO_RSP_EVENTID = 0x1803,
1997 WMI_DEEP_ECHO_RSP_EVENTID = 0x1804,
1998 /* deprecated */
1999 WMI_FS_TUNE_DONE_EVENTID = 0x180A,
2000 /* deprecated */
2001 WMI_CORR_MEASURE_EVENTID = 0x180B,
2002 WMI_READ_RSSI_EVENTID = 0x180C,
2003 WMI_TEMP_SENSE_DONE_EVENTID = 0x180E,
2004 WMI_DC_CALIB_DONE_EVENTID = 0x180F,
2005 /* deprecated */
2006 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811,
2007 /* deprecated */
2008 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812,
2009 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815,
2010 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816,
2011 WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817,
2012 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D,
2013 /* deprecated */
2014 WMI_RF_RX_TEST_DONE_EVENTID = 0x181E,
2015 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820,
2016 WMI_VRING_CFG_DONE_EVENTID = 0x1821,
2017 WMI_BA_STATUS_EVENTID = 0x1823,
2018 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824,
2019 WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825,
2020 WMI_DELBA_EVENTID = 0x1826,
2021 WMI_GET_SSID_EVENTID = 0x1828,
2022 WMI_GET_PCP_CHANNEL_EVENTID = 0x182A,
2023 /* Event is shared between WMI_SW_TX_REQ_CMDID and
2024 * WMI_SW_TX_REQ_EXT_CMDID
2025 */
2026 WMI_SW_TX_COMPLETE_EVENTID = 0x182B,
2027 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836,
2028 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837,
2029 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839,
2030 WMI_BF_TRIG_EVENTID = 0x183A,
2031 WMI_RS_MGMT_DONE_EVENTID = 0x1852,
2032 WMI_RF_MGMT_STATUS_EVENTID = 0x1853,
2033 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838,
2034 WMI_RX_MGMT_PACKET_EVENTID = 0x1840,
2035 WMI_TX_MGMT_PACKET_EVENTID = 0x1841,
2036 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842,
2037 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843,
2038 WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856,
2039 WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857,
2040 WMI_LED_CFG_DONE_EVENTID = 0x1858,
2041 WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C,
2042 WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D,
2043 WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E,
2044 WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID = 0x185F,
2045 /* Performance monitoring events */
2046 WMI_DATA_PORT_OPEN_EVENTID = 0x1860,
2047 WMI_WBE_LINK_DOWN_EVENTID = 0x1861,
2048 WMI_BF_CTRL_DONE_EVENTID = 0x1862,
2049 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863,
2050 WMI_GET_STATUS_DONE_EVENTID = 0x1864,
2051 WMI_RING_EN_EVENTID = 0x1865,
2052 WMI_GET_RF_STATUS_EVENTID = 0x1866,
2053 WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867,
2054 WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID = 0x1868,
2055 WMI_UNIT_TEST_EVENTID = 0x1900,
2056 WMI_FLASH_READ_DONE_EVENTID = 0x1902,
2057 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903,
2058 /* Power management */
2059 WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904,
2060 WMI_TRAFFIC_RESUME_EVENTID = 0x1905,
2061 /* P2P */
2062 WMI_P2P_CFG_DONE_EVENTID = 0x1910,
2063 WMI_PORT_ALLOCATED_EVENTID = 0x1911,
2064 WMI_PORT_DELETED_EVENTID = 0x1912,
2065 WMI_LISTEN_STARTED_EVENTID = 0x1914,
2066 WMI_SEARCH_STARTED_EVENTID = 0x1915,
2067 WMI_DISCOVERY_STARTED_EVENTID = 0x1916,
2068 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917,
2069 WMI_PCP_STARTED_EVENTID = 0x1918,
2070 WMI_PCP_STOPPED_EVENTID = 0x1919,
2071 WMI_PCP_FACTOR_EVENTID = 0x191A,
2072 /* Power Save Configuration Events */
2073 WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C,
2074 WMI_RS_ENABLE_EVENTID = 0x191E,
2075 WMI_RS_CFG_EX_EVENTID = 0x191F,
2076 WMI_GET_DETAILED_RS_RES_EX_EVENTID = 0x1920,
2077 /* deprecated */
2078 WMI_RS_CFG_DONE_EVENTID = 0x1921,
2079 /* deprecated */
2080 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922,
2081 WMI_AOA_MEAS_EVENTID = 0x1923,
2082 WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924,
2083 WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930,
2084 WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931,
2085 WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940,
2086 WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941,
2087 /* return the Power Save profile */
2088 WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942,
2089 WMI_TSF_SYNC_STATUS_EVENTID = 0x1973,
2090 WMI_TOF_SESSION_END_EVENTID = 0x1991,
2091 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992,
2092 WMI_TOF_SET_LCR_EVENTID = 0x1993,
2093 WMI_TOF_SET_LCI_EVENTID = 0x1994,
2094 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995,
2095 WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996,
2096 WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997,
2097 WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998,
2098 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999,
2099 WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0,
2100 WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1,
2101 WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2,
2102 WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3,
2103 WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4,
2104 WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5,
2105 WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6,
2106 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7,
2107 /* deprecated */
2108 WMI_BF_CONTROL_EVENTID = 0x19AA,
2109 WMI_BF_CONTROL_EX_EVENTID = 0x19AB,
2110 WMI_TX_STATUS_RING_CFG_DONE_EVENTID = 0x19C0,
2111 WMI_RX_STATUS_RING_CFG_DONE_EVENTID = 0x19C1,
2112 WMI_TX_DESC_RING_CFG_DONE_EVENTID = 0x19C2,
2113 WMI_RX_DESC_RING_CFG_DONE_EVENTID = 0x19C3,
2114 WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID = 0x19C5,
2115 WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01,
2116 WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02,
2117 WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03,
2118 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04,
2119 WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05,
2120 WMI_GET_ASSOC_LIST_RES_EVENTID = 0x1A06,
2121 WMI_GET_CCA_INDICATIONS_EVENTID = 0x1A07,
2122 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID = 0x1A08,
2123 WMI_INTERNAL_FW_EVENT_EVENTID = 0x1A0A,
2124 WMI_INTERNAL_FW_IOCTL_EVENTID = 0x1A0B,
2125 WMI_LINK_STATS_CONFIG_DONE_EVENTID = 0x1A0C,
2126 WMI_LINK_STATS_EVENTID = 0x1A0D,
2127 WMI_SET_GRANT_MCS_EVENTID = 0x1A0E,
2128 WMI_SET_AP_SLOT_SIZE_EVENTID = 0x1A0F,
2129 WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID = 0x1A10,
2130 WMI_SET_VRING_PRIORITY_EVENTID = 0x1A11,
2131 WMI_RBUFCAP_CFG_EVENTID = 0x1A12,
2132 WMI_TEMP_SENSE_ALL_DONE_EVENTID = 0x1A13,
2133 WMI_SET_CHANNEL_EVENTID = 0x9000,
2134 WMI_ASSOC_REQ_EVENTID = 0x9001,
2135 WMI_EAPOL_RX_EVENTID = 0x9002,
2136 WMI_MAC_ADDR_RESP_EVENTID = 0x9003,
2137 WMI_FW_VER_EVENTID = 0x9004,
2138 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005,
2139 WMI_INTERNAL_FW_SET_CHANNEL = 0x9006,
2140 WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF,
2141 };
2142
2143 /* Events data structures */
2144 enum wmi_fw_status {
2145 WMI_FW_STATUS_SUCCESS = 0x00,
2146 WMI_FW_STATUS_FAILURE = 0x01,
2147 };
2148
2149 /* WMI_RF_MGMT_STATUS_EVENTID */
2150 enum wmi_rf_status {
2151 WMI_RF_ENABLED = 0x00,
2152 WMI_RF_DISABLED_HW = 0x01,
2153 WMI_RF_DISABLED_SW = 0x02,
2154 WMI_RF_DISABLED_HW_SW = 0x03,
2155 };
2156
2157 /* WMI_RF_MGMT_STATUS_EVENTID */
2158 struct wmi_rf_mgmt_status_event {
2159 __le32 rf_status;
2160 } __packed;
2161
2162 /* WMI_GET_STATUS_DONE_EVENTID */
2163 struct wmi_get_status_done_event {
2164 __le32 is_associated;
2165 u8 cid;
2166 u8 reserved0[3];
2167 u8 bssid[WMI_MAC_LEN];
2168 u8 channel;
2169 u8 reserved1;
2170 u8 network_type;
2171 u8 reserved2[3];
2172 __le32 ssid_len;
2173 u8 ssid[WMI_MAX_SSID_LEN];
2174 __le32 rf_status;
2175 __le32 is_secured;
2176 } __packed;
2177
2178 /* WMI_FW_VER_EVENTID */
2179 struct wmi_fw_ver_event {
2180 /* FW image version */
2181 __le32 fw_major;
2182 __le32 fw_minor;
2183 __le32 fw_subminor;
2184 __le32 fw_build;
2185 /* FW image build time stamp */
2186 __le32 hour;
2187 __le32 minute;
2188 __le32 second;
2189 __le32 day;
2190 __le32 month;
2191 __le32 year;
2192 /* Boot Loader image version */
2193 __le32 bl_major;
2194 __le32 bl_minor;
2195 __le32 bl_subminor;
2196 __le32 bl_build;
2197 /* The number of entries in the FW capabilities array */
2198 u8 fw_capabilities_len;
2199 u8 reserved[3];
2200 /* FW capabilities info
2201 * Must be the last member of the struct
2202 */
2203 __le32 fw_capabilities[0];
2204 } __packed;
2205
2206 /* WMI_GET_RF_STATUS_EVENTID */
2207 enum rf_type {
2208 RF_UNKNOWN = 0x00,
2209 RF_MARLON = 0x01,
2210 RF_SPARROW = 0x02,
2211 RF_TALYNA1 = 0x03,
2212 RF_TALYNA2 = 0x04,
2213 };
2214
2215 /* WMI_GET_RF_STATUS_EVENTID */
2216 enum board_file_rf_type {
2217 BF_RF_MARLON = 0x00,
2218 BF_RF_SPARROW = 0x01,
2219 BF_RF_TALYNA1 = 0x02,
2220 BF_RF_TALYNA2 = 0x03,
2221 };
2222
2223 /* WMI_GET_RF_STATUS_EVENTID */
2224 enum rf_status {
2225 RF_OK = 0x00,
2226 RF_NO_COMM = 0x01,
2227 RF_WRONG_BOARD_FILE = 0x02,
2228 };
2229
2230 /* WMI_GET_RF_STATUS_EVENTID */
2231 struct wmi_get_rf_status_event {
2232 /* enum rf_type */
2233 __le32 rf_type;
2234 /* attached RFs bit vector */
2235 __le32 attached_rf_vector;
2236 /* enabled RFs bit vector */
2237 __le32 enabled_rf_vector;
2238 /* enum rf_status, refers to enabled RFs */
2239 u8 rf_status[32];
2240 /* enum board file RF type */
2241 __le32 board_file_rf_type;
2242 /* board file platform type */
2243 __le32 board_file_platform_type;
2244 /* board file version */
2245 __le32 board_file_version;
2246 /* enabled XIFs bit vector */
2247 __le32 enabled_xif_vector;
2248 __le32 reserved;
2249 } __packed;
2250
2251 /* WMI_GET_BASEBAND_TYPE_EVENTID */
2252 enum baseband_type {
2253 BASEBAND_UNKNOWN = 0x00,
2254 BASEBAND_SPARROW_M_A0 = 0x03,
2255 BASEBAND_SPARROW_M_A1 = 0x04,
2256 BASEBAND_SPARROW_M_B0 = 0x05,
2257 BASEBAND_SPARROW_M_C0 = 0x06,
2258 BASEBAND_SPARROW_M_D0 = 0x07,
2259 BASEBAND_TALYN_M_A0 = 0x08,
2260 BASEBAND_TALYN_M_B0 = 0x09,
2261 };
2262
2263 /* WMI_GET_BASEBAND_TYPE_EVENTID */
2264 struct wmi_get_baseband_type_event {
2265 /* enum baseband_type */
2266 __le32 baseband_type;
2267 } __packed;
2268
2269 /* WMI_MAC_ADDR_RESP_EVENTID */
2270 struct wmi_mac_addr_resp_event {
2271 u8 mac[WMI_MAC_LEN];
2272 u8 auth_mode;
2273 u8 crypt_mode;
2274 __le32 offload_mode;
2275 } __packed;
2276
2277 /* WMI_EAPOL_RX_EVENTID */
2278 struct wmi_eapol_rx_event {
2279 u8 src_mac[WMI_MAC_LEN];
2280 __le16 eapol_len;
2281 u8 eapol[0];
2282 } __packed;
2283
2284 /* WMI_READY_EVENTID */
2285 enum wmi_phy_capability {
2286 WMI_11A_CAPABILITY = 0x01,
2287 WMI_11G_CAPABILITY = 0x02,
2288 WMI_11AG_CAPABILITY = 0x03,
2289 WMI_11NA_CAPABILITY = 0x04,
2290 WMI_11NG_CAPABILITY = 0x05,
2291 WMI_11NAG_CAPABILITY = 0x06,
2292 WMI_11AD_CAPABILITY = 0x07,
2293 WMI_11N_CAPABILITY_OFFSET = 0x03,
2294 };
2295
2296 struct wmi_ready_event {
2297 __le32 sw_version;
2298 __le32 abi_version;
2299 u8 mac[WMI_MAC_LEN];
2300 /* enum wmi_phy_capability */
2301 u8 phy_capability;
2302 u8 numof_additional_mids;
2303 /* rfc read calibration result. 5..15 */
2304 u8 rfc_read_calib_result;
2305 /* Max associated STAs supported by FW in AP mode (default 0 means 8
2306 * STA)
2307 */
2308 u8 max_assoc_sta;
2309 u8 reserved[2];
2310 } __packed;
2311
2312 /* WMI_NOTIFY_REQ_DONE_EVENTID */
2313 struct wmi_notify_req_done_event {
2314 /* beamforming status, 0: fail; 1: OK; 2: retrying */
2315 __le32 status;
2316 __le64 tsf;
2317 s8 rssi;
2318 /* enum wmi_edmg_tx_mode */
2319 u8 tx_mode;
2320 u8 reserved0[2];
2321 __le32 tx_tpt;
2322 __le32 tx_goodput;
2323 __le32 rx_goodput;
2324 __le16 bf_mcs;
2325 __le16 my_rx_sector;
2326 __le16 my_tx_sector;
2327 __le16 other_rx_sector;
2328 __le16 other_tx_sector;
2329 __le16 range;
2330 u8 sqi;
2331 u8 reserved[3];
2332 } __packed;
2333
2334 /* WMI_CONNECT_EVENTID */
2335 struct wmi_connect_event {
2336 /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
2337 * the primary channel number
2338 */
2339 u8 channel;
2340 /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
2341 u8 edmg_channel;
2342 u8 bssid[WMI_MAC_LEN];
2343 __le16 listen_interval;
2344 __le16 beacon_interval;
2345 u8 network_type;
2346 u8 reserved1[3];
2347 u8 beacon_ie_len;
2348 u8 assoc_req_len;
2349 u8 assoc_resp_len;
2350 u8 cid;
2351 u8 aid;
2352 u8 reserved2[2];
2353 /* not in use */
2354 u8 assoc_info[0];
2355 } __packed;
2356
2357 /* disconnect_reason */
2358 enum wmi_disconnect_reason {
2359 WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01,
2360 /* bmiss */
2361 WMI_DIS_REASON_LOST_LINK = 0x02,
2362 WMI_DIS_REASON_DISCONNECT_CMD = 0x03,
2363 WMI_DIS_REASON_BSS_DISCONNECTED = 0x04,
2364 WMI_DIS_REASON_AUTH_FAILED = 0x05,
2365 WMI_DIS_REASON_ASSOC_FAILED = 0x06,
2366 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07,
2367 WMI_DIS_REASON_CSERV_DISCONNECT = 0x08,
2368 WMI_DIS_REASON_INVALID_PROFILE = 0x0A,
2369 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B,
2370 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C,
2371 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D,
2372 WMI_DIS_REASON_IBSS_MERGE = 0x0E,
2373 WMI_DIS_REASON_HIGH_TEMPERATURE = 0x0F,
2374 };
2375
2376 /* WMI_DISCONNECT_EVENTID */
2377 struct wmi_disconnect_event {
2378 /* reason code, see 802.11 spec. */
2379 __le16 protocol_reason_status;
2380 /* set if known */
2381 u8 bssid[WMI_MAC_LEN];
2382 /* see enum wmi_disconnect_reason */
2383 u8 disconnect_reason;
2384 /* last assoc req may passed to host - not in used */
2385 u8 assoc_resp_len;
2386 /* last assoc req may passed to host - not in used */
2387 u8 assoc_info[0];
2388 } __packed;
2389
2390 /* WMI_SCAN_COMPLETE_EVENTID */
2391 enum scan_status {
2392 WMI_SCAN_SUCCESS = 0x00,
2393 WMI_SCAN_FAILED = 0x01,
2394 WMI_SCAN_ABORTED = 0x02,
2395 WMI_SCAN_REJECTED = 0x03,
2396 WMI_SCAN_ABORT_REJECTED = 0x04,
2397 };
2398
2399 struct wmi_scan_complete_event {
2400 /* enum scan_status */
2401 __le32 status;
2402 } __packed;
2403
2404 /* WMI_FT_AUTH_STATUS_EVENTID */
2405 struct wmi_ft_auth_status_event {
2406 /* enum wmi_fw_status */
2407 u8 status;
2408 u8 reserved[3];
2409 u8 mac_addr[WMI_MAC_LEN];
2410 __le16 ie_len;
2411 u8 ie_info[0];
2412 } __packed;
2413
2414 /* WMI_FT_REASSOC_STATUS_EVENTID */
2415 struct wmi_ft_reassoc_status_event {
2416 /* enum wmi_fw_status */
2417 u8 status;
2418 /* association id received from new AP */
2419 u8 aid;
2420 /* enum wmi_channel */
2421 u8 channel;
2422 /* enum wmi_channel */
2423 u8 edmg_channel;
2424 u8 mac_addr[WMI_MAC_LEN];
2425 __le16 beacon_ie_len;
2426 __le16 reassoc_req_ie_len;
2427 __le16 reassoc_resp_ie_len;
2428 u8 reserved[4];
2429 u8 ie_info[0];
2430 } __packed;
2431
2432 /* wmi_rx_mgmt_info */
2433 struct wmi_rx_mgmt_info {
2434 u8 mcs;
2435 s8 rssi;
2436 u8 range;
2437 u8 sqi;
2438 __le16 stype;
2439 __le16 status;
2440 __le32 len;
2441 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2442 u8 qid;
2443 /* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
2444 u8 mid;
2445 u8 cid;
2446 /* From Radio MNGR */
2447 u8 channel;
2448 } __packed;
2449
2450 /* WMI_START_SCHED_SCAN_EVENTID */
2451 enum wmi_pno_result {
2452 WMI_PNO_SUCCESS = 0x00,
2453 WMI_PNO_REJECT = 0x01,
2454 WMI_PNO_INVALID_PARAMETERS = 0x02,
2455 WMI_PNO_NOT_ENABLED = 0x03,
2456 };
2457
2458 struct wmi_start_sched_scan_event {
2459 /* wmi_pno_result */
2460 u8 result;
2461 u8 reserved[3];
2462 } __packed;
2463
2464 struct wmi_stop_sched_scan_event {
2465 /* wmi_pno_result */
2466 u8 result;
2467 u8 reserved[3];
2468 } __packed;
2469
2470 struct wmi_sched_scan_result_event {
2471 struct wmi_rx_mgmt_info info;
2472 u8 payload[0];
2473 } __packed;
2474
2475 /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
2476 enum wmi_acs_info_bitmask {
2477 WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01,
2478 WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02,
2479 WMI_ACS_INFO_BITMASK_TX_TIME = 0x04,
2480 WMI_ACS_INFO_BITMASK_RX_TIME = 0x08,
2481 WMI_ACS_INFO_BITMASK_NOISE = 0x10,
2482 };
2483
2484 struct scan_acs_info {
2485 u8 channel;
2486 u8 beacon_found;
2487 /* msec */
2488 __le16 busy_time;
2489 __le16 tx_time;
2490 __le16 rx_time;
2491 u8 noise;
2492 u8 reserved[3];
2493 } __packed;
2494
2495 struct wmi_acs_passive_scan_complete_event {
2496 __le32 dwell_time;
2497 /* valid fields within channel info according to
2498 * their appearance in struct order
2499 */
2500 __le16 filled;
2501 u8 num_scanned_channels;
2502 u8 reserved;
2503 struct scan_acs_info scan_info_list[0];
2504 } __packed;
2505
2506 /* WMI_BA_STATUS_EVENTID */
2507 enum wmi_vring_ba_status {
2508 WMI_BA_AGREED = 0x00,
2509 WMI_BA_NON_AGREED = 0x01,
2510 /* BA_EN in middle of teardown flow */
2511 WMI_BA_TD_WIP = 0x02,
2512 /* BA_DIS or BA_EN in middle of BA SETUP flow */
2513 WMI_BA_SETUP_WIP = 0x03,
2514 /* BA_EN when the BA session is already active */
2515 WMI_BA_SESSION_ACTIVE = 0x04,
2516 /* BA_DIS when the BA session is not active */
2517 WMI_BA_SESSION_NOT_ACTIVE = 0x05,
2518 };
2519
2520 struct wmi_ba_status_event {
2521 /* enum wmi_vring_ba_status */
2522 __le16 status;
2523 u8 reserved[2];
2524 u8 ringid;
2525 u8 agg_wsize;
2526 __le16 ba_timeout;
2527 u8 amsdu;
2528 } __packed;
2529
2530 /* WMI_DELBA_EVENTID */
2531 struct wmi_delba_event {
2532 /* Used for cid less than 8. For higher cid set
2533 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
2534 */
2535 u8 cidxtid;
2536 u8 from_initiator;
2537 __le16 reason;
2538 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2539 u8 cid;
2540 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2541 u8 tid;
2542 u8 reserved[2];
2543 } __packed;
2544
2545 /* WMI_VRING_CFG_DONE_EVENTID */
2546 struct wmi_vring_cfg_done_event {
2547 u8 ringid;
2548 u8 status;
2549 u8 reserved[2];
2550 __le32 tx_vring_tail_ptr;
2551 } __packed;
2552
2553 /* WMI_RCP_ADDBA_RESP_SENT_EVENTID */
2554 struct wmi_rcp_addba_resp_sent_event {
2555 /* Used for cid less than 8. For higher cid set
2556 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
2557 */
2558 u8 cidxtid;
2559 u8 reserved;
2560 __le16 status;
2561 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2562 u8 cid;
2563 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2564 u8 tid;
2565 u8 reserved2[2];
2566 } __packed;
2567
2568 /* WMI_TX_STATUS_RING_CFG_DONE_EVENTID */
2569 struct wmi_tx_status_ring_cfg_done_event {
2570 u8 ring_id;
2571 /* wmi_fw_status */
2572 u8 status;
2573 u8 reserved[2];
2574 __le32 ring_tail_ptr;
2575 } __packed;
2576
2577 /* WMI_RX_STATUS_RING_CFG_DONE_EVENTID */
2578 struct wmi_rx_status_ring_cfg_done_event {
2579 u8 ring_id;
2580 /* wmi_fw_status */
2581 u8 status;
2582 u8 reserved[2];
2583 __le32 ring_tail_ptr;
2584 } __packed;
2585
2586 /* WMI_CFG_DEF_RX_OFFLOAD_DONE_EVENTID */
2587 struct wmi_cfg_def_rx_offload_done_event {
2588 /* wmi_fw_status */
2589 u8 status;
2590 u8 reserved[3];
2591 } __packed;
2592
2593 /* WMI_TX_DESC_RING_CFG_DONE_EVENTID */
2594 struct wmi_tx_desc_ring_cfg_done_event {
2595 u8 ring_id;
2596 /* wmi_fw_status */
2597 u8 status;
2598 u8 reserved[2];
2599 __le32 ring_tail_ptr;
2600 } __packed;
2601
2602 /* WMI_RX_DESC_RING_CFG_DONE_EVENTID */
2603 struct wmi_rx_desc_ring_cfg_done_event {
2604 u8 ring_id;
2605 /* wmi_fw_status */
2606 u8 status;
2607 u8 reserved[2];
2608 __le32 ring_tail_ptr;
2609 } __packed;
2610
2611 /* WMI_RCP_ADDBA_REQ_EVENTID */
2612 struct wmi_rcp_addba_req_event {
2613 /* Used for cid less than 8. For higher cid set
2614 * CIDXTID_EXTENDED_CID_TID here and use cid and tid members instead
2615 */
2616 u8 cidxtid;
2617 u8 dialog_token;
2618 /* ieee80211_ba_parameterset as it received */
2619 __le16 ba_param_set;
2620 __le16 ba_timeout;
2621 /* ieee80211_ba_seqstrl field as it received */
2622 __le16 ba_seq_ctrl;
2623 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2624 u8 cid;
2625 /* Used when cidxtid = CIDXTID_EXTENDED_CID_TID */
2626 u8 tid;
2627 u8 reserved[2];
2628 } __packed;
2629
2630 /* WMI_CFG_RX_CHAIN_DONE_EVENTID */
2631 enum wmi_cfg_rx_chain_done_event_status {
2632 WMI_CFG_RX_CHAIN_SUCCESS = 0x01,
2633 };
2634
2635 struct wmi_cfg_rx_chain_done_event {
2636 /* V-Ring Tail pointer */
2637 __le32 rx_ring_tail_ptr;
2638 __le32 status;
2639 } __packed;
2640
2641 /* WMI_WBE_LINK_DOWN_EVENTID */
2642 enum wmi_wbe_link_down_event_reason {
2643 WMI_WBE_REASON_USER_REQUEST = 0x00,
2644 WMI_WBE_REASON_RX_DISASSOC = 0x01,
2645 WMI_WBE_REASON_BAD_PHY_LINK = 0x02,
2646 };
2647
2648 /* WMI_WBE_LINK_DOWN_EVENTID */
2649 struct wmi_wbe_link_down_event {
2650 u8 cid;
2651 u8 reserved[3];
2652 __le32 reason;
2653 } __packed;
2654
2655 /* WMI_DATA_PORT_OPEN_EVENTID */
2656 struct wmi_data_port_open_event {
2657 u8 cid;
2658 u8 reserved[3];
2659 } __packed;
2660
2661 /* WMI_RING_EN_EVENTID */
2662 struct wmi_ring_en_event {
2663 u8 ring_index;
2664 u8 reserved[3];
2665 } __packed;
2666
2667 /* WMI_GET_PCP_CHANNEL_EVENTID */
2668 struct wmi_get_pcp_channel_event {
2669 u8 channel;
2670 u8 reserved[3];
2671 } __packed;
2672
2673 /* WMI_P2P_CFG_DONE_EVENTID */
2674 struct wmi_p2p_cfg_done_event {
2675 /* wmi_fw_status */
2676 u8 status;
2677 u8 reserved[3];
2678 } __packed;
2679
2680 /* WMI_PORT_ALLOCATED_EVENTID */
2681 struct wmi_port_allocated_event {
2682 /* wmi_fw_status */
2683 u8 status;
2684 u8 reserved[3];
2685 } __packed;
2686
2687 /* WMI_PORT_DELETED_EVENTID */
2688 struct wmi_port_deleted_event {
2689 /* wmi_fw_status */
2690 u8 status;
2691 u8 reserved[3];
2692 } __packed;
2693
2694 /* WMI_LISTEN_STARTED_EVENTID */
2695 struct wmi_listen_started_event {
2696 /* wmi_fw_status */
2697 u8 status;
2698 u8 reserved[3];
2699 } __packed;
2700
2701 /* WMI_SEARCH_STARTED_EVENTID */
2702 struct wmi_search_started_event {
2703 /* wmi_fw_status */
2704 u8 status;
2705 u8 reserved[3];
2706 } __packed;
2707
2708 /* WMI_PCP_STARTED_EVENTID */
2709 struct wmi_pcp_started_event {
2710 /* wmi_fw_status */
2711 u8 status;
2712 u8 reserved[3];
2713 } __packed;
2714
2715 /* WMI_PCP_FACTOR_EVENTID */
2716 struct wmi_pcp_factor_event {
2717 __le32 pcp_factor;
2718 } __packed;
2719
2720 enum wmi_sw_tx_status {
2721 WMI_TX_SW_STATUS_SUCCESS = 0x00,
2722 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01,
2723 WMI_TX_SW_STATUS_FAILED_TX = 0x02,
2724 };
2725
2726 /* WMI_SW_TX_COMPLETE_EVENTID */
2727 struct wmi_sw_tx_complete_event {
2728 /* enum wmi_sw_tx_status */
2729 u8 status;
2730 u8 reserved[3];
2731 } __packed;
2732
2733 /* WMI_CORR_MEASURE_EVENTID - deprecated */
2734 struct wmi_corr_measure_event {
2735 /* signed */
2736 __le32 i;
2737 /* signed */
2738 __le32 q;
2739 /* signed */
2740 __le32 image_i;
2741 /* signed */
2742 __le32 image_q;
2743 } __packed;
2744
2745 /* WMI_READ_RSSI_EVENTID */
2746 struct wmi_read_rssi_event {
2747 __le32 ina_rssi_adc_dbm;
2748 } __packed;
2749
2750 /* WMI_GET_SSID_EVENTID */
2751 struct wmi_get_ssid_event {
2752 __le32 ssid_len;
2753 u8 ssid[WMI_MAX_SSID_LEN];
2754 } __packed;
2755
2756 /* EVENT: WMI_RF_XPM_READ_RESULT_EVENTID */
2757 struct wmi_rf_xpm_read_result_event {
2758 /* enum wmi_fw_status_e - success=0 or fail=1 */
2759 u8 status;
2760 u8 reserved[3];
2761 /* requested num_bytes of data */
2762 u8 data_bytes[0];
2763 } __packed;
2764
2765 /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
2766 struct wmi_rf_xpm_write_result_event {
2767 /* enum wmi_fw_status_e - success=0 or fail=1 */
2768 u8 status;
2769 u8 reserved[3];
2770 } __packed;
2771
2772 /* WMI_TX_MGMT_PACKET_EVENTID */
2773 struct wmi_tx_mgmt_packet_event {
2774 u8 payload[0];
2775 } __packed;
2776
2777 /* WMI_RX_MGMT_PACKET_EVENTID */
2778 struct wmi_rx_mgmt_packet_event {
2779 struct wmi_rx_mgmt_info info;
2780 u8 payload[0];
2781 } __packed;
2782
2783 /* WMI_ECHO_RSP_EVENTID */
2784 struct wmi_echo_rsp_event {
2785 __le32 echoed_value;
2786 } __packed;
2787
2788 /* WMI_DEEP_ECHO_RSP_EVENTID */
2789 struct wmi_deep_echo_rsp_event {
2790 __le32 echoed_value;
2791 } __packed;
2792
2793 /* WMI_RF_PWR_ON_DELAY_RSP_EVENTID */
2794 struct wmi_rf_pwr_on_delay_rsp_event {
2795 /* wmi_fw_status */
2796 u8 status;
2797 u8 reserved[3];
2798 } __packed;
2799
2800 /* WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID */
2801 struct wmi_set_high_power_table_params_event {
2802 /* wmi_fw_status */
2803 u8 status;
2804 u8 reserved[3];
2805 } __packed;
2806
2807 /* WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID */
2808 struct wmi_fixed_scheduling_ul_config_event {
2809 /* wmi_fw_status */
2810 u8 status;
2811 u8 reserved[3];
2812 } __packed;
2813
2814 /* WMI_TEMP_SENSE_DONE_EVENTID
2815 *
2816 * Measure MAC and radio temperatures
2817 */
2818 struct wmi_temp_sense_done_event {
2819 /* Temperature times 1000 (actual temperature will be achieved by
2820 * dividing the value by 1000). When temperature cannot be read from
2821 * device return WMI_INVALID_TEMPERATURE
2822 */
2823 __le32 baseband_t1000;
2824 /* Temperature times 1000 (actual temperature will be achieved by
2825 * dividing the value by 1000). When temperature cannot be read from
2826 * device return WMI_INVALID_TEMPERATURE
2827 */
2828 __le32 rf_t1000;
2829 } __packed;
2830
2831 #define WMI_SCAN_DWELL_TIME_MS (100)
2832 #define WMI_SURVEY_TIMEOUT_MS (10000)
2833
2834 enum wmi_hidden_ssid {
2835 WMI_HIDDEN_SSID_DISABLED = 0x00,
2836 WMI_HIDDEN_SSID_SEND_EMPTY = 0x10,
2837 WMI_HIDDEN_SSID_CLEAR = 0xFE,
2838 };
2839
2840 /* WMI_LED_CFG_CMDID
2841 *
2842 * Configure LED On\Off\Blinking operation
2843 *
2844 * Returned events:
2845 * - WMI_LED_CFG_DONE_EVENTID
2846 */
2847 enum led_mode {
2848 LED_DISABLE = 0x00,
2849 LED_ENABLE = 0x01,
2850 };
2851
2852 /* The names of the led as
2853 * described on HW schemes.
2854 */
2855 enum wmi_led_id {
2856 WMI_LED_WLAN = 0x00,
2857 WMI_LED_WPAN = 0x01,
2858 WMI_LED_WWAN = 0x02,
2859 };
2860
2861 /* Led polarity mode. */
2862 enum wmi_led_polarity {
2863 LED_POLARITY_HIGH_ACTIVE = 0x00,
2864 LED_POLARITY_LOW_ACTIVE = 0x01,
2865 };
2866
2867 /* Combination of on and off
2868 * creates the blinking period
2869 */
2870 struct wmi_led_blink_mode {
2871 __le32 blink_on;
2872 __le32 blink_off;
2873 } __packed;
2874
2875 /* WMI_LED_CFG_CMDID */
2876 struct wmi_led_cfg_cmd {
2877 /* enum led_mode_e */
2878 u8 led_mode;
2879 /* enum wmi_led_id_e */
2880 u8 id;
2881 /* slow speed blinking combination */
2882 struct wmi_led_blink_mode slow_blink_cfg;
2883 /* medium speed blinking combination */
2884 struct wmi_led_blink_mode medium_blink_cfg;
2885 /* high speed blinking combination */
2886 struct wmi_led_blink_mode fast_blink_cfg;
2887 /* polarity of the led */
2888 u8 led_polarity;
2889 /* reserved */
2890 u8 reserved;
2891 } __packed;
2892
2893 /* \WMI_SET_CONNECT_SNR_THR_CMDID */
2894 struct wmi_set_connect_snr_thr_cmd {
2895 u8 enable;
2896 u8 reserved;
2897 /* 1/4 Db units */
2898 __le16 omni_snr_thr;
2899 /* 1/4 Db units */
2900 __le16 direct_snr_thr;
2901 } __packed;
2902
2903 /* WMI_LED_CFG_DONE_EVENTID */
2904 struct wmi_led_cfg_done_event {
2905 /* led config status */
2906 __le32 status;
2907 } __packed;
2908
2909 /* Rate search parameters configuration per connection */
2910 struct wmi_rs_cfg {
2911 /* The maximal allowed PER for each MCS
2912 * MCS will be considered as failed if PER during RS is higher
2913 */
2914 u8 per_threshold[WMI_NUM_MCS];
2915 /* Number of MPDUs for each MCS
2916 * this is the minimal statistic required to make an educated
2917 * decision
2918 */
2919 u8 min_frame_cnt[WMI_NUM_MCS];
2920 /* stop threshold [0-100] */
2921 u8 stop_th;
2922 /* MCS1 stop threshold [0-100] */
2923 u8 mcs1_fail_th;
2924 u8 max_back_failure_th;
2925 /* Debug feature for disabling internal RS trigger (which is
2926 * currently triggered by BF Done)
2927 */
2928 u8 dbg_disable_internal_trigger;
2929 __le32 back_failure_mask;
2930 __le32 mcs_en_vec;
2931 } __packed;
2932
2933 enum wmi_edmg_tx_mode {
2934 WMI_TX_MODE_DMG = 0x0,
2935 WMI_TX_MODE_EDMG_CB1 = 0x1,
2936 WMI_TX_MODE_EDMG_CB2 = 0x2,
2937 WMI_TX_MODE_EDMG_CB1_LONG_LDPC = 0x3,
2938 WMI_TX_MODE_EDMG_CB2_LONG_LDPC = 0x4,
2939 WMI_TX_MODE_MAX,
2940 };
2941
2942 /* Rate search parameters common configuration */
2943 struct wmi_rs_cfg_ex_common {
2944 /* enum wmi_edmg_tx_mode */
2945 u8 mode;
2946 /* stop threshold [0-100] */
2947 u8 stop_th;
2948 /* MCS1 stop threshold [0-100] */
2949 u8 mcs1_fail_th;
2950 u8 max_back_failure_th;
2951 /* Debug feature for disabling internal RS trigger (which is
2952 * currently triggered by BF Done)
2953 */
2954 u8 dbg_disable_internal_trigger;
2955 u8 reserved[3];
2956 __le32 back_failure_mask;
2957 } __packed;
2958
2959 /* Rate search parameters configuration per MCS */
2960 struct wmi_rs_cfg_ex_mcs {
2961 /* The maximal allowed PER for each MCS
2962 * MCS will be considered as failed if PER during RS is higher
2963 */
2964 u8 per_threshold;
2965 /* Number of MPDUs for each MCS
2966 * this is the minimal statistic required to make an educated
2967 * decision
2968 */
2969 u8 min_frame_cnt;
2970 u8 reserved[2];
2971 } __packed;
2972
2973 /* WMI_RS_CFG_EX_CMDID */
2974 struct wmi_rs_cfg_ex_cmd {
2975 /* Configuration for all MCSs */
2976 struct wmi_rs_cfg_ex_common common_cfg;
2977 u8 each_mcs_cfg_size;
2978 u8 reserved[3];
2979 /* Configuration for each MCS */
2980 struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0];
2981 } __packed;
2982
2983 /* WMI_RS_CFG_EX_EVENTID */
2984 struct wmi_rs_cfg_ex_event {
2985 /* enum wmi_edmg_tx_mode */
2986 u8 mode;
2987 /* enum wmi_fw_status */
2988 u8 status;
2989 u8 reserved[2];
2990 } __packed;
2991
2992 /* WMI_RS_ENABLE_CMDID */
2993 struct wmi_rs_enable_cmd {
2994 u8 cid;
2995 /* enable or disable rate search */
2996 u8 rs_enable;
2997 u8 reserved[2];
2998 __le32 mcs_en_vec;
2999 } __packed;
3000
3001 /* WMI_RS_ENABLE_EVENTID */
3002 struct wmi_rs_enable_event {
3003 /* enum wmi_fw_status */
3004 u8 status;
3005 u8 reserved[3];
3006 } __packed;
3007
3008 /* Slot types */
3009 enum wmi_sched_scheme_slot_type {
3010 WMI_SCHED_SLOT_SP = 0x0,
3011 WMI_SCHED_SLOT_CBAP = 0x1,
3012 WMI_SCHED_SLOT_IDLE = 0x2,
3013 WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3,
3014 WMI_SCHED_SLOT_DISCOVERY = 0x4,
3015 };
3016
3017 enum wmi_sched_scheme_slot_flags {
3018 WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1,
3019 };
3020
3021 struct wmi_sched_scheme_slot {
3022 /* in microsecond */
3023 __le32 tbtt_offset;
3024 /* wmi_sched_scheme_slot_flags */
3025 u8 flags;
3026 /* wmi_sched_scheme_slot_type */
3027 u8 type;
3028 /* in microsecond */
3029 __le16 duration;
3030 /* frame_exchange_sequence_duration */
3031 __le16 tx_op;
3032 /* time in microseconds between two consecutive slots
3033 * relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3034 */
3035 __le16 period;
3036 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3037 * number of times to repeat allocation
3038 */
3039 u8 num_of_blocks;
3040 /* relevant only if flag WMI_SCHED_SCHEME_SLOT_PERIODIC set
3041 * every idle_period allocation will be idle
3042 */
3043 u8 idle_period;
3044 u8 src_aid;
3045 u8 dest_aid;
3046 __le32 reserved;
3047 } __packed;
3048
3049 enum wmi_sched_scheme_flags {
3050 /* should not be set when clearing scheduling scheme */
3051 WMI_SCHED_SCHEME_ENABLE = 0x01,
3052 WMI_SCHED_PROTECTED_SP = 0x02,
3053 /* should be set only on first WMI fragment of scheme */
3054 WMI_SCHED_FIRST = 0x04,
3055 /* should be set only on last WMI fragment of scheme */
3056 WMI_SCHED_LAST = 0x08,
3057 WMI_SCHED_IMMEDIATE_START = 0x10,
3058 };
3059
3060 enum wmi_sched_scheme_advertisment {
3061 /* ESE is not advertised at all, STA has to be configured with WMI
3062 * also
3063 */
3064 WMI_ADVERTISE_ESE_DISABLED = 0x0,
3065 WMI_ADVERTISE_ESE_IN_BEACON = 0x1,
3066 WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2,
3067 };
3068
3069 /* WMI_SCHEDULING_SCHEME_CMD */
3070 struct wmi_scheduling_scheme_cmd {
3071 u8 serial_num;
3072 /* wmi_sched_scheme_advertisment */
3073 u8 ese_advertisment;
3074 /* wmi_sched_scheme_flags */
3075 __le16 flags;
3076 u8 num_allocs;
3077 u8 reserved[3];
3078 __le64 start_tbtt;
3079 /* allocations list */
3080 struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
3081 } __packed;
3082
3083 enum wmi_sched_scheme_failure_type {
3084 WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00,
3085 WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01,
3086 };
3087
3088 /* WMI_SCHEDULING_SCHEME_EVENTID */
3089 struct wmi_scheduling_scheme_event {
3090 /* wmi_fw_status_e */
3091 u8 status;
3092 /* serial number given in command */
3093 u8 serial_num;
3094 /* wmi_sched_scheme_failure_type */
3095 u8 failure_type;
3096 /* alignment to 32b */
3097 u8 reserved[1];
3098 } __packed;
3099
3100 /* WMI_RS_CFG_CMDID - deprecated */
3101 struct wmi_rs_cfg_cmd {
3102 /* connection id */
3103 u8 cid;
3104 /* enable or disable rate search */
3105 u8 rs_enable;
3106 /* rate search configuration */
3107 struct wmi_rs_cfg rs_cfg;
3108 } __packed;
3109
3110 /* WMI_RS_CFG_DONE_EVENTID - deprecated */
3111 struct wmi_rs_cfg_done_event {
3112 u8 cid;
3113 /* enum wmi_fw_status */
3114 u8 status;
3115 u8 reserved[2];
3116 } __packed;
3117
3118 /* WMI_GET_DETAILED_RS_RES_CMDID - deprecated */
3119 struct wmi_get_detailed_rs_res_cmd {
3120 /* connection id */
3121 u8 cid;
3122 u8 reserved[3];
3123 } __packed;
3124
3125 /* RS results status */
3126 enum wmi_rs_results_status {
3127 WMI_RS_RES_VALID = 0x00,
3128 WMI_RS_RES_INVALID = 0x01,
3129 };
3130
3131 /* Rate search results */
3132 struct wmi_rs_results {
3133 /* number of sent MPDUs */
3134 u8 num_of_tx_pkt[WMI_NUM_MCS];
3135 /* number of non-acked MPDUs */
3136 u8 num_of_non_acked_pkt[WMI_NUM_MCS];
3137 /* RS timestamp */
3138 __le32 tsf;
3139 /* RS selected MCS */
3140 u8 mcs;
3141 } __packed;
3142
3143 /* WMI_GET_DETAILED_RS_RES_EVENTID - deprecated */
3144 struct wmi_get_detailed_rs_res_event {
3145 u8 cid;
3146 /* enum wmi_rs_results_status */
3147 u8 status;
3148 /* detailed rs results */
3149 struct wmi_rs_results rs_results;
3150 u8 reserved[3];
3151 } __packed;
3152
3153 /* WMI_GET_DETAILED_RS_RES_EX_CMDID */
3154 struct wmi_get_detailed_rs_res_ex_cmd {
3155 u8 cid;
3156 u8 reserved[3];
3157 } __packed;
3158
3159 /* Rate search results */
3160 struct wmi_rs_results_ex_common {
3161 /* RS timestamp */
3162 __le32 tsf;
3163 /* RS selected MCS */
3164 u8 mcs;
3165 /* enum wmi_edmg_tx_mode */
3166 u8 mode;
3167 u8 reserved[2];
3168 } __packed;
3169
3170 /* Rate search results */
3171 struct wmi_rs_results_ex_mcs {
3172 /* number of sent MPDUs */
3173 u8 num_of_tx_pkt;
3174 /* number of non-acked MPDUs */
3175 u8 num_of_non_acked_pkt;
3176 u8 reserved[2];
3177 } __packed;
3178
3179 /* WMI_GET_DETAILED_RS_RES_EX_EVENTID */
3180 struct wmi_get_detailed_rs_res_ex_event {
3181 u8 cid;
3182 /* enum wmi_rs_results_status */
3183 u8 status;
3184 u8 reserved0[2];
3185 struct wmi_rs_results_ex_common common_rs_results;
3186 u8 each_mcs_results_size;
3187 u8 reserved1[3];
3188 /* Results for each MCS */
3189 struct wmi_rs_results_ex_mcs each_mcs_results[0];
3190 } __packed;
3191
3192 /* BRP antenna limit mode */
3193 enum wmi_brp_ant_limit_mode {
3194 /* Disable BRP force antenna limit */
3195 WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00,
3196 /* Define maximal antennas limit. Only effective antennas will be
3197 * actually used
3198 */
3199 WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01,
3200 /* Force a specific number of antennas */
3201 WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02,
3202 /* number of BRP antenna limit modes */
3203 WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03,
3204 };
3205
3206 /* WMI_BRP_SET_ANT_LIMIT_CMDID */
3207 struct wmi_brp_set_ant_limit_cmd {
3208 /* connection id */
3209 u8 cid;
3210 /* enum wmi_brp_ant_limit_mode */
3211 u8 limit_mode;
3212 /* antenna limit count, 1-27
3213 * disable_mode - ignored
3214 * effective_mode - upper limit to number of antennas to be used
3215 * force_mode - exact number of antennas to be used
3216 */
3217 u8 ant_limit;
3218 u8 reserved;
3219 } __packed;
3220
3221 /* WMI_BRP_SET_ANT_LIMIT_EVENTID */
3222 struct wmi_brp_set_ant_limit_event {
3223 /* wmi_fw_status */
3224 u8 status;
3225 u8 reserved[3];
3226 } __packed;
3227
3228 enum wmi_bf_type {
3229 WMI_BF_TYPE_SLS = 0x00,
3230 WMI_BF_TYPE_BRP_RX = 0x01,
3231 };
3232
3233 /* WMI_BF_TRIG_CMDID */
3234 struct wmi_bf_trig_cmd {
3235 /* enum wmi_bf_type - type of requested beamforming */
3236 u8 bf_type;
3237 /* used only for WMI_BF_TYPE_BRP_RX */
3238 u8 cid;
3239 /* used only for WMI_BF_TYPE_SLS */
3240 u8 dst_mac[WMI_MAC_LEN];
3241 u8 reserved[4];
3242 } __packed;
3243
3244 /* WMI_BF_TRIG_EVENTID */
3245 struct wmi_bf_trig_event {
3246 /* enum wmi_fw_status */
3247 u8 status;
3248 u8 cid;
3249 u8 reserved[2];
3250 } __packed;
3251
3252 /* broadcast connection ID */
3253 #define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF)
3254
3255 /* Types wmi_link_maintain_cfg presets for WMI_LINK_MAINTAIN_CFG_WRITE_CMD */
3256 enum wmi_link_maintain_cfg_type {
3257 /* AP/PCP default normal (non-FST) configuration settings */
3258 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00,
3259 /* AP/PCP default FST configuration settings */
3260 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01,
3261 /* STA default normal (non-FST) configuration settings */
3262 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02,
3263 /* STA default FST configuration settings */
3264 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03,
3265 /* custom configuration settings */
3266 WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04,
3267 /* number of defined configuration types */
3268 WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05,
3269 };
3270
3271 /* Response status codes for WMI_LINK_MAINTAIN_CFG_WRITE/READ commands */
3272 enum wmi_link_maintain_cfg_response_status {
3273 /* WMI_LINK_MAINTAIN_CFG_WRITE/READ command successfully accomplished
3274 */
3275 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00,
3276 /* ERROR due to bad argument in WMI_LINK_MAINTAIN_CFG_WRITE/READ
3277 * command request
3278 */
3279 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01,
3280 };
3281
3282 /* Link Loss and Keep Alive configuration */
3283 struct wmi_link_maintain_cfg {
3284 /* link_loss_enable_detectors_vec */
3285 __le32 link_loss_enable_detectors_vec;
3286 /* detectors check period usec */
3287 __le32 check_link_loss_period_usec;
3288 /* max allowed tx ageing */
3289 __le32 tx_ageing_threshold_usec;
3290 /* keep alive period for high SNR */
3291 __le32 keep_alive_period_usec_high_snr;
3292 /* keep alive period for low SNR */
3293 __le32 keep_alive_period_usec_low_snr;
3294 /* lower snr limit for keep alive period update */
3295 __le32 keep_alive_snr_threshold_low_db;
3296 /* upper snr limit for keep alive period update */
3297 __le32 keep_alive_snr_threshold_high_db;
3298 /* num of successive bad bcons causing link-loss */
3299 __le32 bad_beacons_num_threshold;
3300 /* SNR limit for bad_beacons_detector */
3301 __le32 bad_beacons_snr_threshold_db;
3302 /* timeout for disassoc response frame in uSec */
3303 __le32 disconnect_timeout;
3304 } __packed;
3305
3306 /* WMI_LINK_MAINTAIN_CFG_WRITE_CMDID */
3307 struct wmi_link_maintain_cfg_write_cmd {
3308 /* enum wmi_link_maintain_cfg_type_e - type of requested default
3309 * configuration to be applied
3310 */
3311 __le32 cfg_type;
3312 /* requested connection ID or WMI_LINK_MAINTAIN_CFG_CID_BROADCAST */
3313 __le32 cid;
3314 /* custom configuration settings to be applied (relevant only if
3315 * cfg_type==WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM)
3316 */
3317 struct wmi_link_maintain_cfg lm_cfg;
3318 } __packed;
3319
3320 /* WMI_LINK_MAINTAIN_CFG_READ_CMDID */
3321 struct wmi_link_maintain_cfg_read_cmd {
3322 /* connection ID which configuration settings are requested */
3323 __le32 cid;
3324 } __packed;
3325
3326 /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
3327 struct wmi_link_maintain_cfg_write_done_event {
3328 /* requested connection ID */
3329 __le32 cid;
3330 /* wmi_link_maintain_cfg_response_status_e - write status */
3331 __le32 status;
3332 } __packed;
3333
3334 /* \WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENT */
3335 struct wmi_link_maintain_cfg_read_done_event {
3336 /* requested connection ID */
3337 __le32 cid;
3338 /* wmi_link_maintain_cfg_response_status_e - read status */
3339 __le32 status;
3340 /* Retrieved configuration settings */
3341 struct wmi_link_maintain_cfg lm_cfg;
3342 } __packed;
3343
3344 enum wmi_traffic_suspend_status {
3345 WMI_TRAFFIC_SUSPEND_APPROVED = 0x0,
3346 WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1,
3347 WMI_TRAFFIC_SUSPEND_REJECTED_DISCONNECT = 0x2,
3348 WMI_TRAFFIC_SUSPEND_REJECTED_OTHER = 0x3,
3349 };
3350
3351 /* WMI_TRAFFIC_SUSPEND_EVENTID */
3352 struct wmi_traffic_suspend_event {
3353 /* enum wmi_traffic_suspend_status_e */
3354 u8 status;
3355 } __packed;
3356
3357 enum wmi_traffic_resume_status {
3358 WMI_TRAFFIC_RESUME_SUCCESS = 0x0,
3359 WMI_TRAFFIC_RESUME_FAILED = 0x1,
3360 };
3361
3362 enum wmi_resume_trigger {
3363 WMI_RESUME_TRIGGER_UNKNOWN = 0x0,
3364 WMI_RESUME_TRIGGER_HOST = 0x1,
3365 WMI_RESUME_TRIGGER_UCAST_RX = 0x2,
3366 WMI_RESUME_TRIGGER_BCAST_RX = 0x4,
3367 WMI_RESUME_TRIGGER_WMI_EVT = 0x8,
3368 WMI_RESUME_TRIGGER_DISCONNECT = 0x10,
3369 };
3370
3371 /* WMI_TRAFFIC_RESUME_EVENTID */
3372 struct wmi_traffic_resume_event {
3373 /* enum wmi_traffic_resume_status */
3374 u8 status;
3375 u8 reserved[3];
3376 /* enum wmi_resume_trigger bitmap */
3377 __le32 resume_triggers;
3378 } __packed;
3379
3380 /* Power Save command completion status codes */
3381 enum wmi_ps_cfg_cmd_status {
3382 WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00,
3383 WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
3384 /* other error */
3385 WMI_PS_CFG_CMD_STATUS_ERROR = 0x02,
3386 };
3387
3388 /* Device Power Save Profiles */
3389 enum wmi_ps_profile_type {
3390 WMI_PS_PROFILE_TYPE_DEFAULT = 0x00,
3391 WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01,
3392 WMI_PS_PROFILE_TYPE_MAX_PS = 0x02,
3393 WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03,
3394 };
3395
3396 /* WMI_PS_DEV_PROFILE_CFG_READ_CMDID */
3397 struct wmi_ps_dev_profile_cfg_read_cmd {
3398 /* reserved */
3399 __le32 reserved;
3400 } __packed;
3401
3402 /* WMI_PS_DEV_PROFILE_CFG_READ_EVENTID */
3403 struct wmi_ps_dev_profile_cfg_read_event {
3404 /* wmi_ps_profile_type_e */
3405 u8 ps_profile;
3406 u8 reserved[3];
3407 } __packed;
3408
3409 /* WMI_PS_DEV_PROFILE_CFG_CMDID
3410 *
3411 * Power save profile to be used by the device
3412 *
3413 * Returned event:
3414 * - WMI_PS_DEV_PROFILE_CFG_EVENTID
3415 */
3416 struct wmi_ps_dev_profile_cfg_cmd {
3417 /* wmi_ps_profile_type_e */
3418 u8 ps_profile;
3419 u8 reserved[3];
3420 } __packed;
3421
3422 /* WMI_PS_DEV_PROFILE_CFG_EVENTID */
3423 struct wmi_ps_dev_profile_cfg_event {
3424 /* wmi_ps_cfg_cmd_status_e */
3425 __le32 status;
3426 } __packed;
3427
3428 enum wmi_ps_level {
3429 WMI_PS_LEVEL_DEEP_SLEEP = 0x00,
3430 WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01,
3431 /* awake = all PS mechanisms are disabled */
3432 WMI_PS_LEVEL_AWAKE = 0x02,
3433 };
3434
3435 enum wmi_ps_deep_sleep_clk_level {
3436 /* 33k */
3437 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00,
3438 /* 10k */
3439 WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01,
3440 /* @RTC Low latency */
3441 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02,
3442 WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03,
3443 WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04,
3444 /* Not Applicable */
3445 WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF,
3446 };
3447
3448 /* Response by the FW to a D3 entry request */
3449 enum wmi_ps_d3_resp_policy {
3450 WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00,
3451 /* debug -D3 req is always denied */
3452 WMI_PS_D3_RESP_POLICY_DENIED = 0x01,
3453 /* debug -D3 req is always approved */
3454 WMI_PS_D3_RESP_POLICY_APPROVED = 0x02,
3455 };
3456
3457 #define WMI_AOA_MAX_DATA_SIZE (128)
3458
3459 enum wmi_aoa_meas_status {
3460 WMI_AOA_MEAS_SUCCESS = 0x00,
3461 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01,
3462 WMI_AOA_MEAS_FAILURE = 0x02,
3463 };
3464
3465 /* WMI_AOA_MEAS_EVENTID */
3466 struct wmi_aoa_meas_event {
3467 u8 mac_addr[WMI_MAC_LEN];
3468 /* channels IDs:
3469 * 0 - 58320 MHz
3470 * 1 - 60480 MHz
3471 * 2 - 62640 MHz
3472 */
3473 u8 channel;
3474 /* enum wmi_aoa_meas_type */
3475 u8 aoa_meas_type;
3476 /* Measurments are from RFs, defined by the mask */
3477 __le32 meas_rf_mask;
3478 /* enum wmi_aoa_meas_status */
3479 u8 meas_status;
3480 u8 reserved;
3481 /* Length of meas_data in bytes */
3482 __le16 length;
3483 u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
3484 } __packed;
3485
3486 /* WMI_SET_MGMT_RETRY_LIMIT_EVENTID */
3487 struct wmi_set_mgmt_retry_limit_event {
3488 /* enum wmi_fw_status */
3489 u8 status;
3490 /* alignment to 32b */
3491 u8 reserved[3];
3492 } __packed;
3493
3494 /* WMI_GET_MGMT_RETRY_LIMIT_EVENTID */
3495 struct wmi_get_mgmt_retry_limit_event {
3496 /* MAC retransmit limit for mgmt frames */
3497 u8 mgmt_retry_limit;
3498 /* alignment to 32b */
3499 u8 reserved[3];
3500 } __packed;
3501
3502 /* WMI_TOF_GET_CAPABILITIES_EVENTID */
3503 struct wmi_tof_get_capabilities_event {
3504 u8 ftm_capability;
3505 /* maximum supported number of destination to start TOF */
3506 u8 max_num_of_dest;
3507 /* maximum supported number of measurements per burst */
3508 u8 max_num_of_meas_per_burst;
3509 u8 reserved;
3510 /* maximum supported multi bursts */
3511 __le16 max_multi_bursts_sessions;
3512 /* maximum supported FTM burst duration , wmi_tof_burst_duration_e */
3513 __le16 max_ftm_burst_duration;
3514 /* AOA supported types */
3515 __le32 aoa_supported_types;
3516 } __packed;
3517
3518 /* WMI_SET_THERMAL_THROTTLING_CFG_EVENTID */
3519 struct wmi_set_thermal_throttling_cfg_event {
3520 /* wmi_fw_status */
3521 u8 status;
3522 u8 reserved[3];
3523 } __packed;
3524
3525 /* WMI_GET_THERMAL_THROTTLING_CFG_EVENTID */
3526 struct wmi_get_thermal_throttling_cfg_event {
3527 /* Status data */
3528 struct wmi_tt_data tt_data;
3529 } __packed;
3530
3531 enum wmi_tof_session_end_status {
3532 WMI_TOF_SESSION_END_NO_ERROR = 0x00,
3533 WMI_TOF_SESSION_END_FAIL = 0x01,
3534 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02,
3535 WMI_TOF_SESSION_END_ABORTED = 0x03,
3536 WMI_TOF_SESSION_END_BUSY = 0x04,
3537 };
3538
3539 /* WMI_TOF_SESSION_END_EVENTID */
3540 struct wmi_tof_session_end_event {
3541 /* FTM session ID */
3542 __le32 session_id;
3543 /* wmi_tof_session_end_status_e */
3544 u8 status;
3545 u8 reserved[3];
3546 } __packed;
3547
3548 /* WMI_TOF_SET_LCI_EVENTID */
3549 struct wmi_tof_set_lci_event {
3550 /* enum wmi_fw_status */
3551 u8 status;
3552 u8 reserved[3];
3553 } __packed;
3554
3555 /* WMI_TOF_SET_LCR_EVENTID */
3556 struct wmi_tof_set_lcr_event {
3557 /* enum wmi_fw_status */
3558 u8 status;
3559 u8 reserved[3];
3560 } __packed;
3561
3562 /* Responder FTM Results */
3563 struct wmi_responder_ftm_res {
3564 u8 t1[6];
3565 u8 t2[6];
3566 u8 t3[6];
3567 u8 t4[6];
3568 __le16 tod_err;
3569 __le16 toa_err;
3570 __le16 tod_err_initiator;
3571 __le16 toa_err_initiator;
3572 } __packed;
3573
3574 enum wmi_tof_ftm_per_dest_res_status {
3575 WMI_PER_DEST_RES_NO_ERROR = 0x00,
3576 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01,
3577 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02,
3578 };
3579
3580 enum wmi_tof_ftm_per_dest_res_flags {
3581 WMI_PER_DEST_RES_REQ_START = 0x01,
3582 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02,
3583 WMI_PER_DEST_RES_REQ_END = 0x04,
3584 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08,
3585 };
3586
3587 /* WMI_TOF_FTM_PER_DEST_RES_EVENTID */
3588 struct wmi_tof_ftm_per_dest_res_event {
3589 /* FTM session ID */
3590 __le32 session_id;
3591 /* destination MAC address */
3592 u8 dst_mac[WMI_MAC_LEN];
3593 /* wmi_tof_ftm_per_dest_res_flags_e */
3594 u8 flags;
3595 /* wmi_tof_ftm_per_dest_res_status_e */
3596 u8 status;
3597 /* responder ASAP */
3598 u8 responder_asap;
3599 /* responder number of FTM per burst */
3600 u8 responder_num_ftm_per_burst;
3601 /* responder number of FTM burst exponent */
3602 u8 responder_num_ftm_bursts_exp;
3603 /* responder burst duration ,wmi_tof_burst_duration_e */
3604 u8 responder_burst_duration;
3605 /* responder burst period, indicate interval between two consecutive
3606 * burst instances, in units of 100 ms
3607 */
3608 __le16 responder_burst_period;
3609 /* receive burst counter */
3610 __le16 bursts_cnt;
3611 /* tsf of responder start burst */
3612 __le32 tsf_sync;
3613 /* actual received ftm per burst */
3614 u8 actual_ftm_per_burst;
3615 /* Measurments are from RFs, defined by the mask */
3616 __le32 meas_rf_mask;
3617 u8 reserved0[3];
3618 struct wmi_responder_ftm_res responder_ftm_res[0];
3619 } __packed;
3620
3621 /* WMI_TOF_CFG_RESPONDER_EVENTID */
3622 struct wmi_tof_cfg_responder_event {
3623 /* enum wmi_fw_status */
3624 u8 status;
3625 u8 reserved[3];
3626 } __packed;
3627
3628 enum wmi_tof_channel_info_type {
3629 WMI_TOF_CHANNEL_INFO_AOA = 0x00,
3630 WMI_TOF_CHANNEL_INFO_LCI = 0x01,
3631 WMI_TOF_CHANNEL_INFO_LCR = 0x02,
3632 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03,
3633 WMI_TOF_CHANNEL_INFO_CIR = 0x04,
3634 WMI_TOF_CHANNEL_INFO_RSSI = 0x05,
3635 WMI_TOF_CHANNEL_INFO_SNR = 0x06,
3636 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07,
3637 };
3638
3639 /* WMI_TOF_CHANNEL_INFO_EVENTID */
3640 struct wmi_tof_channel_info_event {
3641 /* FTM session ID */
3642 __le32 session_id;
3643 /* destination MAC address */
3644 u8 dst_mac[WMI_MAC_LEN];
3645 /* wmi_tof_channel_info_type_e */
3646 u8 type;
3647 /* data report length */
3648 u8 len;
3649 /* data report payload */
3650 u8 report[0];
3651 } __packed;
3652
3653 /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
3654 struct wmi_tof_set_tx_rx_offset_event {
3655 /* enum wmi_fw_status */
3656 u8 status;
3657 u8 reserved[3];
3658 } __packed;
3659
3660 /* WMI_TOF_GET_TX_RX_OFFSET_EVENTID */
3661 struct wmi_tof_get_tx_rx_offset_event {
3662 /* enum wmi_fw_status */
3663 u8 status;
3664 /* RF index used to read the offsets */
3665 u8 rf_index;
3666 u8 reserved1[2];
3667 /* TX delay offset */
3668 __le32 tx_offset;
3669 /* RX delay offset */
3670 __le32 rx_offset;
3671 /* Offset to strongest tap of CIR */
3672 __le32 precursor;
3673 } __packed;
3674
3675 /* Result status codes for WMI commands */
3676 enum wmi_rf_sector_status {
3677 WMI_RF_SECTOR_STATUS_SUCCESS = 0x00,
3678 WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01,
3679 WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02,
3680 WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03,
3681 };
3682
3683 /* Types of the RF sector (TX,RX) */
3684 enum wmi_rf_sector_type {
3685 WMI_RF_SECTOR_TYPE_RX = 0x00,
3686 WMI_RF_SECTOR_TYPE_TX = 0x01,
3687 };
3688
3689 /* Content of RF Sector (six 32-bits registers) */
3690 struct wmi_rf_sector_info {
3691 /* Phase values for RF Chains[15-0] (2bits per RF chain) */
3692 __le32 psh_hi;
3693 /* Phase values for RF Chains[31-16] (2bits per RF chain) */
3694 __le32 psh_lo;
3695 /* ETYPE Bit0 for all RF chains[31-0] - bit0 of Edge amplifier gain
3696 * index
3697 */
3698 __le32 etype0;
3699 /* ETYPE Bit1 for all RF chains[31-0] - bit1 of Edge amplifier gain
3700 * index
3701 */
3702 __le32 etype1;
3703 /* ETYPE Bit2 for all RF chains[31-0] - bit2 of Edge amplifier gain
3704 * index
3705 */
3706 __le32 etype2;
3707 /* D-Type values (3bits each) for 8 Distribution amplifiers + X16
3708 * switch bits
3709 */
3710 __le32 dtype_swch_off;
3711 } __packed;
3712
3713 #define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF)
3714 #define WMI_MAX_RF_MODULES_NUM (8)
3715
3716 /* WMI_GET_RF_SECTOR_PARAMS_CMD */
3717 struct wmi_get_rf_sector_params_cmd {
3718 /* Sector number to be retrieved */
3719 __le16 sector_idx;
3720 /* enum wmi_rf_sector_type - type of requested RF sector */
3721 u8 sector_type;
3722 /* bitmask vector specifying destination RF modules */
3723 u8 rf_modules_vec;
3724 } __packed;
3725
3726 /* \WMI_GET_RF_SECTOR_PARAMS_DONE_EVENT */
3727 struct wmi_get_rf_sector_params_done_event {
3728 /* result status of WMI_GET_RF_SECTOR_PARAMS_CMD (enum
3729 * wmi_rf_sector_status)
3730 */
3731 u8 status;
3732 /* align next field to U64 boundary */
3733 u8 reserved[7];
3734 /* TSF timestamp when RF sectors where retrieved */
3735 __le64 tsf;
3736 /* Content of RF sector retrieved from each RF module */
3737 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3738 } __packed;
3739
3740 /* WMI_SET_RF_SECTOR_PARAMS_CMD */
3741 struct wmi_set_rf_sector_params_cmd {
3742 /* Sector number to be retrieved */
3743 __le16 sector_idx;
3744 /* enum wmi_rf_sector_type - type of requested RF sector */
3745 u8 sector_type;
3746 /* bitmask vector specifying destination RF modules */
3747 u8 rf_modules_vec;
3748 /* Content of RF sector to be written to each RF module */
3749 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
3750 } __packed;
3751
3752 /* \WMI_SET_RF_SECTOR_PARAMS_DONE_EVENT */
3753 struct wmi_set_rf_sector_params_done_event {
3754 /* result status of WMI_SET_RF_SECTOR_PARAMS_CMD (enum
3755 * wmi_rf_sector_status)
3756 */
3757 u8 status;
3758 } __packed;
3759
3760 /* WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD - Get RF sector index selected by
3761 * TXSS/BRP for communication with specified CID
3762 */
3763 struct wmi_get_selected_rf_sector_index_cmd {
3764 /* Connection/Station ID in [0:7] range */
3765 u8 cid;
3766 /* type of requested RF sector (enum wmi_rf_sector_type) */
3767 u8 sector_type;
3768 /* align to U32 boundary */
3769 u8 reserved[2];
3770 } __packed;
3771
3772 /* \WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Returns retrieved RF sector
3773 * index selected by TXSS/BRP for communication with specified CID
3774 */
3775 struct wmi_get_selected_rf_sector_index_done_event {
3776 /* Retrieved sector index selected in TXSS (for TX sector request) or
3777 * BRP (for RX sector request)
3778 */
3779 __le16 sector_idx;
3780 /* result status of WMI_GET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3781 * wmi_rf_sector_status)
3782 */
3783 u8 status;
3784 /* align next field to U64 boundary */
3785 u8 reserved[5];
3786 /* TSF timestamp when result was retrieved */
3787 __le64 tsf;
3788 } __packed;
3789
3790 /* WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD - Force RF sector index for
3791 * communication with specified CID. Assumes that TXSS/BRP is disabled by
3792 * other command
3793 */
3794 struct wmi_set_selected_rf_sector_index_cmd {
3795 /* Connection/Station ID in [0:7] range */
3796 u8 cid;
3797 /* type of requested RF sector (enum wmi_rf_sector_type) */
3798 u8 sector_type;
3799 /* Forced sector index */
3800 __le16 sector_idx;
3801 } __packed;
3802
3803 /* \WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENT - Success/Fail status for
3804 * WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD
3805 */
3806 struct wmi_set_selected_rf_sector_index_done_event {
3807 /* result status of WMI_SET_SELECTED_RF_SECTOR_INDEX_CMD (enum
3808 * wmi_rf_sector_status)
3809 */
3810 u8 status;
3811 /* align to U32 boundary */
3812 u8 reserved[3];
3813 } __packed;
3814
3815 /* WMI_SET_RF_SECTOR_ON_CMD - Activates specified sector for specified rf
3816 * modules
3817 */
3818 struct wmi_set_rf_sector_on_cmd {
3819 /* Sector index to be activated */
3820 __le16 sector_idx;
3821 /* type of requested RF sector (enum wmi_rf_sector_type) */
3822 u8 sector_type;
3823 /* bitmask vector specifying destination RF modules */
3824 u8 rf_modules_vec;
3825 } __packed;
3826
3827 /* \WMI_SET_RF_SECTOR_ON_DONE_EVENT - Success/Fail status for
3828 * WMI_SET_RF_SECTOR_ON_CMD
3829 */
3830 struct wmi_set_rf_sector_on_done_event {
3831 /* result status of WMI_SET_RF_SECTOR_ON_CMD (enum
3832 * wmi_rf_sector_status)
3833 */
3834 u8 status;
3835 /* align to U32 boundary */
3836 u8 reserved[3];
3837 } __packed;
3838
3839 enum wmi_sector_sweep_type {
3840 WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00,
3841 WMI_SECTOR_SWEEP_TYPE_BCON = 0x01,
3842 WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02,
3843 WMI_SECTOR_SWEEP_TYPE_NUM = 0x03,
3844 };
3845
3846 /* WMI_PRIO_TX_SECTORS_ORDER_CMDID
3847 *
3848 * Set the order of TX sectors in TXSS and/or Beacon(AP).
3849 *
3850 * Returned event:
3851 * - WMI_PRIO_TX_SECTORS_ORDER_EVENTID
3852 */
3853 struct wmi_prio_tx_sectors_order_cmd {
3854 /* tx sectors order to be applied, 0xFF for end of array */
3855 u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
3856 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
3857 u8 sector_sweep_type;
3858 /* needed only for TXSS configuration */
3859 u8 cid;
3860 /* alignment to 32b */
3861 u8 reserved[2];
3862 } __packed;
3863
3864 /* completion status codes */
3865 enum wmi_prio_tx_sectors_cmd_status {
3866 WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00,
3867 WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01,
3868 /* other error */
3869 WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02,
3870 };
3871
3872 /* WMI_PRIO_TX_SECTORS_ORDER_EVENTID */
3873 struct wmi_prio_tx_sectors_order_event {
3874 /* enum wmi_prio_tx_sectors_cmd_status */
3875 u8 status;
3876 /* alignment to 32b */
3877 u8 reserved[3];
3878 } __packed;
3879
3880 struct wmi_prio_tx_sectors_num_cmd {
3881 /* [0-128], 0 = No changes */
3882 u8 beacon_number_of_sectors;
3883 /* [0-128], 0 = No changes */
3884 u8 txss_number_of_sectors;
3885 /* [0-8] needed only for TXSS configuration */
3886 u8 cid;
3887 } __packed;
3888
3889 /* WMI_PRIO_TX_SECTORS_NUMBER_CMDID
3890 *
3891 * Set the number of active sectors in TXSS and/or Beacon.
3892 *
3893 * Returned event:
3894 * - WMI_PRIO_TX_SECTORS_NUMBER_EVENTID
3895 */
3896 struct wmi_prio_tx_sectors_number_cmd {
3897 struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
3898 /* alignment to 32b */
3899 u8 reserved;
3900 } __packed;
3901
3902 /* WMI_PRIO_TX_SECTORS_NUMBER_EVENTID */
3903 struct wmi_prio_tx_sectors_number_event {
3904 /* enum wmi_prio_tx_sectors_cmd_status */
3905 u8 status;
3906 /* alignment to 32b */
3907 u8 reserved[3];
3908 } __packed;
3909
3910 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID
3911 *
3912 * Set default sectors order and number (hard coded in board file)
3913 * in TXSS and/or Beacon.
3914 *
3915 * Returned event:
3916 * - WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID
3917 */
3918 struct wmi_prio_tx_sectors_set_default_cfg_cmd {
3919 /* enum wmi_sector_sweep_type, TXSS and/or Beacon */
3920 u8 sector_sweep_type;
3921 /* needed only for TXSS configuration */
3922 u8 cid;
3923 /* alignment to 32b */
3924 u8 reserved[2];
3925 } __packed;
3926
3927 /* WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID */
3928 struct wmi_prio_tx_sectors_set_default_cfg_event {
3929 /* enum wmi_prio_tx_sectors_cmd_status */
3930 u8 status;
3931 /* alignment to 32b */
3932 u8 reserved[3];
3933 } __packed;
3934
3935 /* WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID */
3936 struct wmi_set_silent_rssi_table_done_event {
3937 /* enum wmi_silent_rssi_status */
3938 __le32 status;
3939 /* enum wmi_silent_rssi_table */
3940 __le32 table;
3941 } __packed;
3942
3943 /* WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID */
3944 struct wmi_vring_switch_timing_config_event {
3945 /* enum wmi_fw_status */
3946 u8 status;
3947 u8 reserved[3];
3948 } __packed;
3949
3950 /* WMI_GET_ASSOC_LIST_RES_EVENTID */
3951 struct wmi_assoc_sta_info {
3952 u8 mac[WMI_MAC_LEN];
3953 u8 omni_index_address;
3954 u8 reserved;
3955 } __packed;
3956
3957 #define WMI_GET_ASSOC_LIST_SIZE (8)
3958
3959 /* WMI_GET_ASSOC_LIST_RES_EVENTID
3960 * Returns up to MAX_ASSOC_STA_LIST_SIZE associated STAs
3961 */
3962 struct wmi_get_assoc_list_res_event {
3963 struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
3964 /* STA count */
3965 u8 count;
3966 u8 reserved[3];
3967 } __packed;
3968
3969 /* WMI_BF_CONTROL_EVENTID - deprecated */
3970 struct wmi_bf_control_event {
3971 /* wmi_fw_status */
3972 u8 status;
3973 u8 reserved[3];
3974 } __packed;
3975
3976 /* WMI_BF_CONTROL_EX_EVENTID */
3977 struct wmi_bf_control_ex_event {
3978 /* wmi_fw_status */
3979 u8 status;
3980 u8 reserved[3];
3981 } __packed;
3982
3983 /* WMI_COMMAND_NOT_SUPPORTED_EVENTID */
3984 struct wmi_command_not_supported_event {
3985 /* device id */
3986 u8 mid;
3987 u8 reserved0;
3988 __le16 command_id;
3989 /* for UT command only, otherwise reserved */
3990 __le16 command_subtype;
3991 __le16 reserved1;
3992 } __packed;
3993
3994 /* WMI_TSF_SYNC_CMDID */
3995 struct wmi_tsf_sync_cmd {
3996 /* The time interval to send announce frame in one BI */
3997 u8 interval_ms;
3998 /* The mcs to send announce frame */
3999 u8 mcs;
4000 u8 reserved[6];
4001 } __packed;
4002
4003 /* WMI_TSF_SYNC_STATUS_EVENTID */
4004 enum wmi_tsf_sync_status {
4005 WMI_TSF_SYNC_SUCCESS = 0x00,
4006 WMI_TSF_SYNC_FAILED = 0x01,
4007 WMI_TSF_SYNC_REJECTED = 0x02,
4008 };
4009
4010 /* WMI_TSF_SYNC_STATUS_EVENTID */
4011 struct wmi_tsf_sync_status_event {
4012 /* enum wmi_tsf_sync_status */
4013 u8 status;
4014 u8 reserved[3];
4015 } __packed;
4016
4017 /* WMI_GET_CCA_INDICATIONS_EVENTID */
4018 struct wmi_get_cca_indications_event {
4019 /* wmi_fw_status */
4020 u8 status;
4021 /* CCA-Energy Detect in percentage over last BI (0..100) */
4022 u8 cca_ed_percent;
4023 /* Averaged CCA-Energy Detect in percent over number of BIs (0..100) */
4024 u8 cca_ed_avg_percent;
4025 /* NAV percent over last BI (0..100) */
4026 u8 nav_percent;
4027 /* Averaged NAV percent over number of BIs (0..100) */
4028 u8 nav_avg_percent;
4029 u8 reserved[3];
4030 } __packed;
4031
4032 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID */
4033 struct wmi_set_cca_indications_bi_avg_num_cmd {
4034 /* set the number of bis to average cca_ed (0..255) */
4035 u8 bi_number;
4036 u8 reserved[3];
4037 } __packed;
4038
4039 /* WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID */
4040 struct wmi_set_cca_indications_bi_avg_num_event {
4041 /* wmi_fw_status */
4042 u8 status;
4043 u8 reserved[3];
4044 } __packed;
4045
4046 /* WMI_INTERNAL_FW_SET_CHANNEL */
4047 struct wmi_internal_fw_set_channel_event {
4048 u8 channel_num;
4049 u8 reserved[3];
4050 } __packed;
4051
4052 /* WMI_LINK_STATS_CONFIG_DONE_EVENTID */
4053 struct wmi_link_stats_config_done_event {
4054 /* wmi_fw_status_e */
4055 u8 status;
4056 u8 reserved[3];
4057 } __packed;
4058
4059 /* WMI_LINK_STATS_EVENTID */
4060 struct wmi_link_stats_event {
4061 __le64 tsf;
4062 __le16 payload_size;
4063 u8 has_next;
4064 u8 reserved[5];
4065 /* a stream of wmi_link_stats_record_s */
4066 u8 payload[0];
4067 } __packed;
4068
4069 /* WMI_LINK_STATS_EVENT */
4070 struct wmi_link_stats_record {
4071 /* wmi_link_stats_record_type_e */
4072 u8 record_type_id;
4073 u8 reserved;
4074 __le16 record_size;
4075 u8 record[0];
4076 } __packed;
4077
4078 /* WMI_LINK_STATS_TYPE_BASIC */
4079 struct wmi_link_stats_basic {
4080 u8 cid;
4081 s8 rssi;
4082 u8 sqi;
4083 u8 bf_mcs;
4084 u8 per_average;
4085 u8 selected_rfc;
4086 u8 rx_effective_ant_num;
4087 u8 my_rx_sector;
4088 u8 my_tx_sector;
4089 u8 other_rx_sector;
4090 u8 other_tx_sector;
4091 u8 reserved[7];
4092 /* 1/4 Db units */
4093 __le16 snr;
4094 __le32 tx_tpt;
4095 __le32 tx_goodput;
4096 __le32 rx_goodput;
4097 __le32 bf_count;
4098 __le32 rx_bcast_frames;
4099 } __packed;
4100
4101 /* WMI_LINK_STATS_TYPE_GLOBAL */
4102 struct wmi_link_stats_global {
4103 /* all ack-able frames */
4104 __le32 rx_frames;
4105 /* all ack-able frames */
4106 __le32 tx_frames;
4107 __le32 rx_ba_frames;
4108 __le32 tx_ba_frames;
4109 __le32 tx_beacons;
4110 __le32 rx_mic_errors;
4111 __le32 rx_crc_errors;
4112 __le32 tx_fail_no_ack;
4113 u8 reserved[8];
4114 } __packed;
4115
4116 /* WMI_SET_GRANT_MCS_EVENTID */
4117 struct wmi_set_grant_mcs_event {
4118 /* wmi_fw_status */
4119 u8 status;
4120 u8 reserved[3];
4121 } __packed;
4122
4123 /* WMI_SET_AP_SLOT_SIZE_EVENTID */
4124 struct wmi_set_ap_slot_size_event {
4125 /* wmi_fw_status */
4126 u8 status;
4127 u8 reserved[3];
4128 } __packed;
4129
4130 /* WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID */
4131 struct wmi_set_vring_priority_weight_event {
4132 /* wmi_fw_status */
4133 u8 status;
4134 u8 reserved[3];
4135 } __packed;
4136
4137 /* WMI_SET_VRING_PRIORITY_EVENTID */
4138 struct wmi_set_vring_priority_event {
4139 /* wmi_fw_status */
4140 u8 status;
4141 u8 reserved[3];
4142 } __packed;
4143
4144 /* WMI_RADAR_PCI_CTRL_BLOCK struct */
4145 struct wmi_radar_pci_ctrl_block {
4146 /* last fw tail address index */
4147 __le32 fw_tail_index;
4148 /* last SW head address index known to FW */
4149 __le32 sw_head_index;
4150 __le32 last_wr_pulse_tsf_low;
4151 __le32 last_wr_pulse_count;
4152 __le32 last_wr_in_bytes;
4153 __le32 last_wr_pulse_id;
4154 __le32 last_wr_burst_id;
4155 /* When pre overflow detected, advance sw head in unit of pulses */
4156 __le32 sw_head_inc;
4157 __le32 reserved[8];
4158 } __packed;
4159
4160 /* WMI_RBUFCAP_CFG_CMD */
4161 struct wmi_rbufcap_cfg_cmd {
4162 u8 enable;
4163 u8 reserved;
4164 /* RBUFCAP indicates rx space unavailable when number of rx
4165 * descriptors drops below this threshold. Set 0 to use system
4166 * default
4167 */
4168 __le16 rx_desc_threshold;
4169 } __packed;
4170
4171 /* WMI_RBUFCAP_CFG_EVENTID */
4172 struct wmi_rbufcap_cfg_event {
4173 /* enum wmi_fw_status */
4174 u8 status;
4175 u8 reserved[3];
4176 } __packed;
4177
4178 /* WMI_TEMP_SENSE_ALL_DONE_EVENTID
4179 * Measure MAC and all radio temperatures
4180 */
4181 struct wmi_temp_sense_all_done_event {
4182 /* enum wmi_fw_status */
4183 u8 status;
4184 /* Bitmap of connected RFs */
4185 u8 rf_bitmap;
4186 u8 reserved[2];
4187 /* Temperature times 1000 (actual temperature will be achieved by
4188 * dividing the value by 1000). When temperature cannot be read from
4189 * device return WMI_INVALID_TEMPERATURE
4190 */
4191 __le32 rf_t1000[WMI_MAX_XIF_PORTS_NUM];
4192 /* Temperature times 1000 (actual temperature will be achieved by
4193 * dividing the value by 1000). When temperature cannot be read from
4194 * device return WMI_INVALID_TEMPERATURE
4195 */
4196 __le32 baseband_t1000;
4197 } __packed;
4198
4199 #endif /* __WILOCITY_WMI_H__ */