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