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