1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
44
45
46#define WMI_RF_DTYPE_CONF_LENGTH (4)
47
48
49
50
51#define WMI_RF_ETYPE_CONF_LENGTH (8)
52
53
54
55#define WMI_RF_RX2TX_CONF_LENGTH (4)
56
57
58
59
60enum wmi_mid {
61 MID_DEFAULT = 0x00,
62 FIRST_DBG_MID_ID = 0x10,
63 LAST_DBG_MID_ID = 0xFE,
64 MID_BROADCAST = 0xFF,
65};
66
67
68
69
70
71enum wmi_fw_capability {
72 WMI_FW_CAPABILITY_FTM = 0,
73 WMI_FW_CAPABILITY_PS_CONFIG = 1,
74 WMI_FW_CAPABILITY_RF_SECTORS = 2,
75 WMI_FW_CAPABILITY_MGMT_RETRY_LIMIT = 3,
76 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_PARTIAL = 4,
77 WMI_FW_CAPABILITY_WMI_ONLY = 5,
78 WMI_FW_CAPABILITY_THERMAL_THROTTLING = 7,
79 WMI_FW_CAPABILITY_D3_SUSPEND = 8,
80 WMI_FW_CAPABILITY_LONG_RANGE = 9,
81 WMI_FW_CAPABILITY_FIXED_SCHEDULING = 10,
82 WMI_FW_CAPABILITY_MULTI_DIRECTED_OMNIS = 11,
83 WMI_FW_CAPABILITY_RSSI_REPORTING = 12,
84 WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13,
85 WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14,
86 WMI_FW_CAPABILITY_PNO = 15,
87 WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18,
88 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE = 19,
89 WMI_FW_CAPABILITY_MAX,
90};
91
92
93struct wmi_cmd_hdr {
94 u8 mid;
95 u8 reserved;
96 __le16 command_id;
97 __le32 fw_timestamp;
98} __packed;
99
100
101enum wmi_command_id {
102 WMI_CONNECT_CMDID = 0x01,
103 WMI_DISCONNECT_CMDID = 0x03,
104 WMI_DISCONNECT_STA_CMDID = 0x04,
105 WMI_START_SCHED_SCAN_CMDID = 0x05,
106 WMI_STOP_SCHED_SCAN_CMDID = 0x06,
107 WMI_START_SCAN_CMDID = 0x07,
108 WMI_SET_BSS_FILTER_CMDID = 0x09,
109 WMI_SET_PROBED_SSID_CMDID = 0x0A,
110
111 WMI_SET_LISTEN_INT_CMDID = 0x0B,
112 WMI_BCON_CTRL_CMDID = 0x0F,
113 WMI_ADD_CIPHER_KEY_CMDID = 0x16,
114 WMI_DELETE_CIPHER_KEY_CMDID = 0x17,
115 WMI_PCP_CONF_CMDID = 0x18,
116 WMI_SET_APPIE_CMDID = 0x3F,
117 WMI_SET_WSC_STATUS_CMDID = 0x41,
118 WMI_PXMT_RANGE_CFG_CMDID = 0x42,
119 WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x43,
120 WMI_MEM_READ_CMDID = 0x800,
121 WMI_MEM_WR_CMDID = 0x801,
122 WMI_ECHO_CMDID = 0x803,
123 WMI_DEEP_ECHO_CMDID = 0x804,
124 WMI_CONFIG_MAC_CMDID = 0x805,
125
126 WMI_CONFIG_PHY_DEBUG_CMDID = 0x806,
127 WMI_ADD_DEBUG_TX_PCKT_CMDID = 0x808,
128 WMI_PHY_GET_STATISTICS_CMDID = 0x809,
129
130 WMI_FS_TUNE_CMDID = 0x80A,
131
132 WMI_CORR_MEASURE_CMDID = 0x80B,
133 WMI_READ_RSSI_CMDID = 0x80C,
134 WMI_TEMP_SENSE_CMDID = 0x80E,
135 WMI_DC_CALIB_CMDID = 0x80F,
136
137 WMI_SEND_TONE_CMDID = 0x810,
138
139 WMI_IQ_TX_CALIB_CMDID = 0x811,
140
141 WMI_IQ_RX_CALIB_CMDID = 0x812,
142 WMI_SET_WORK_MODE_CMDID = 0x815,
143 WMI_LO_LEAKAGE_CALIB_CMDID = 0x816,
144 WMI_LO_POWER_CALIB_FROM_OTP_CMDID = 0x817,
145 WMI_SILENT_RSSI_CALIB_CMDID = 0x81D,
146
147 WMI_RF_RX_TEST_CMDID = 0x81E,
148 WMI_CFG_RX_CHAIN_CMDID = 0x820,
149 WMI_VRING_CFG_CMDID = 0x821,
150 WMI_BCAST_VRING_CFG_CMDID = 0x822,
151 WMI_VRING_BA_EN_CMDID = 0x823,
152 WMI_VRING_BA_DIS_CMDID = 0x824,
153 WMI_RCP_ADDBA_RESP_CMDID = 0x825,
154 WMI_RCP_DELBA_CMDID = 0x826,
155 WMI_SET_SSID_CMDID = 0x827,
156 WMI_GET_SSID_CMDID = 0x828,
157 WMI_SET_PCP_CHANNEL_CMDID = 0x829,
158 WMI_GET_PCP_CHANNEL_CMDID = 0x82A,
159 WMI_SW_TX_REQ_CMDID = 0x82B,
160 WMI_MLME_PUSH_CMDID = 0x835,
161 WMI_BEAMFORMING_MGMT_CMDID = 0x836,
162 WMI_BF_TXSS_MGMT_CMDID = 0x837,
163 WMI_BF_SM_MGMT_CMDID = 0x838,
164 WMI_BF_RXSS_MGMT_CMDID = 0x839,
165 WMI_BF_TRIG_CMDID = 0x83A,
166 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842,
167 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843,
168 WMI_SET_SECTORS_CMDID = 0x849,
169 WMI_MAINTAIN_PAUSE_CMDID = 0x850,
170 WMI_MAINTAIN_RESUME_CMDID = 0x851,
171 WMI_RS_MGMT_CMDID = 0x852,
172 WMI_RF_MGMT_CMDID = 0x853,
173 WMI_RF_XPM_READ_CMDID = 0x856,
174 WMI_RF_XPM_WRITE_CMDID = 0x857,
175 WMI_LED_CFG_CMDID = 0x858,
176 WMI_SET_CONNECT_SNR_THR_CMDID = 0x85B,
177 WMI_SET_ACTIVE_SILENT_RSSI_TABLE_CMDID = 0x85C,
178 WMI_RF_PWR_ON_DELAY_CMDID = 0x85D,
179 WMI_SET_HIGH_POWER_TABLE_PARAMS_CMDID = 0x85E,
180 WMI_FIXED_SCHEDULING_UL_CONFIG_CMDID = 0x85F,
181
182 WMI_BF_CTRL_CMDID = 0x862,
183 WMI_NOTIFY_REQ_CMDID = 0x863,
184 WMI_GET_STATUS_CMDID = 0x864,
185 WMI_GET_RF_STATUS_CMDID = 0x866,
186 WMI_GET_BASEBAND_TYPE_CMDID = 0x867,
187 WMI_VRING_SWITCH_TIMING_CONFIG_CMDID = 0x868,
188 WMI_UNIT_TEST_CMDID = 0x900,
189 WMI_FLASH_READ_CMDID = 0x902,
190 WMI_FLASH_WRITE_CMDID = 0x903,
191
192 WMI_TRAFFIC_SUSPEND_CMDID = 0x904,
193 WMI_TRAFFIC_RESUME_CMDID = 0x905,
194
195 WMI_P2P_CFG_CMDID = 0x910,
196 WMI_PORT_ALLOCATE_CMDID = 0x911,
197 WMI_PORT_DELETE_CMDID = 0x912,
198 WMI_POWER_MGMT_CFG_CMDID = 0x913,
199 WMI_START_LISTEN_CMDID = 0x914,
200 WMI_START_SEARCH_CMDID = 0x915,
201 WMI_DISCOVERY_START_CMDID = 0x916,
202 WMI_DISCOVERY_STOP_CMDID = 0x917,
203 WMI_PCP_START_CMDID = 0x918,
204 WMI_PCP_STOP_CMDID = 0x919,
205 WMI_GET_PCP_FACTOR_CMDID = 0x91B,
206
207 WMI_PS_DEV_PROFILE_CFG_CMDID = 0x91C,
208 WMI_RS_CFG_CMDID = 0x921,
209 WMI_GET_DETAILED_RS_RES_CMDID = 0x922,
210 WMI_AOA_MEAS_CMDID = 0x923,
211 WMI_BRP_SET_ANT_LIMIT_CMDID = 0x924,
212 WMI_SET_MGMT_RETRY_LIMIT_CMDID = 0x930,
213 WMI_GET_MGMT_RETRY_LIMIT_CMDID = 0x931,
214 WMI_NEW_STA_CMDID = 0x935,
215 WMI_DEL_STA_CMDID = 0x936,
216 WMI_SET_THERMAL_THROTTLING_CFG_CMDID = 0x940,
217 WMI_GET_THERMAL_THROTTLING_CFG_CMDID = 0x941,
218
219 WMI_PS_DEV_PROFILE_CFG_READ_CMDID = 0x942,
220 WMI_TSF_SYNC_CMDID = 0x973,
221 WMI_TOF_SESSION_START_CMDID = 0x991,
222 WMI_TOF_GET_CAPABILITIES_CMDID = 0x992,
223 WMI_TOF_SET_LCR_CMDID = 0x993,
224 WMI_TOF_SET_LCI_CMDID = 0x994,
225 WMI_TOF_CFG_RESPONDER_CMDID = 0x996,
226 WMI_TOF_SET_TX_RX_OFFSET_CMDID = 0x997,
227 WMI_TOF_GET_TX_RX_OFFSET_CMDID = 0x998,
228 WMI_TOF_CHANNEL_INFO_CMDID = 0x999,
229 WMI_GET_RF_SECTOR_PARAMS_CMDID = 0x9A0,
230 WMI_SET_RF_SECTOR_PARAMS_CMDID = 0x9A1,
231 WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A2,
232 WMI_SET_SELECTED_RF_SECTOR_INDEX_CMDID = 0x9A3,
233 WMI_SET_RF_SECTOR_ON_CMDID = 0x9A4,
234 WMI_PRIO_TX_SECTORS_ORDER_CMDID = 0x9A5,
235 WMI_PRIO_TX_SECTORS_NUMBER_CMDID = 0x9A6,
236 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_CMDID = 0x9A7,
237 WMI_BF_CONTROL_CMDID = 0x9AA,
238 WMI_SCHEDULING_SCHEME_CMDID = 0xA01,
239 WMI_FIXED_SCHEDULING_CONFIG_CMDID = 0xA02,
240 WMI_ENABLE_FIXED_SCHEDULING_CMDID = 0xA03,
241 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_CMDID = 0xA04,
242 WMI_SET_LONG_RANGE_CONFIG_CMDID = 0xA05,
243 WMI_GET_ASSOC_LIST_CMDID = 0xA06,
244 WMI_GET_CCA_INDICATIONS_CMDID = 0xA07,
245 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_CMDID = 0xA08,
246 WMI_INTERNAL_FW_IOCTL_CMDID = 0xA0B,
247 WMI_SET_MAC_ADDRESS_CMDID = 0xF003,
248 WMI_ABORT_SCAN_CMDID = 0xF007,
249 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041,
250
251 WMI_GET_PMK_CMDID = 0xF048,
252 WMI_SET_PASSPHRASE_CMDID = 0xF049,
253
254 WMI_SEND_ASSOC_RES_CMDID = 0xF04A,
255
256 WMI_SET_ASSOC_REQ_RELAY_CMDID = 0xF04B,
257 WMI_MAC_ADDR_REQ_CMDID = 0xF04D,
258 WMI_FW_VER_CMDID = 0xF04E,
259 WMI_PMC_CMDID = 0xF04F,
260};
261
262
263enum wmi_network_type {
264 WMI_NETTYPE_INFRA = 0x01,
265 WMI_NETTYPE_ADHOC = 0x02,
266 WMI_NETTYPE_ADHOC_CREATOR = 0x04,
267 WMI_NETTYPE_AP = 0x10,
268 WMI_NETTYPE_P2P = 0x20,
269
270 WMI_NETTYPE_WBE = 0x40,
271};
272
273enum wmi_dot11_auth_mode {
274 WMI_AUTH11_OPEN = 0x01,
275 WMI_AUTH11_SHARED = 0x02,
276 WMI_AUTH11_LEAP = 0x04,
277 WMI_AUTH11_WSC = 0x08,
278};
279
280enum wmi_auth_mode {
281 WMI_AUTH_NONE = 0x01,
282 WMI_AUTH_WPA = 0x02,
283 WMI_AUTH_WPA2 = 0x04,
284 WMI_AUTH_WPA_PSK = 0x08,
285 WMI_AUTH_WPA2_PSK = 0x10,
286 WMI_AUTH_WPA_CCKM = 0x20,
287 WMI_AUTH_WPA2_CCKM = 0x40,
288};
289
290enum wmi_crypto_type {
291 WMI_CRYPT_NONE = 0x01,
292 WMI_CRYPT_AES_GCMP = 0x20,
293};
294
295enum wmi_connect_ctrl_flag_bits {
296 WMI_CONNECT_ASSOC_POLICY_USER = 0x01,
297 WMI_CONNECT_SEND_REASSOC = 0x02,
298 WMI_CONNECT_IGNORE_WPA_GROUP_CIPHER = 0x04,
299 WMI_CONNECT_PROFILE_MATCH_DONE = 0x08,
300 WMI_CONNECT_IGNORE_AAC_BEACON = 0x10,
301 WMI_CONNECT_CSA_FOLLOW_BSS = 0x20,
302 WMI_CONNECT_DO_WPA_OFFLOAD = 0x40,
303 WMI_CONNECT_DO_NOT_DEAUTH = 0x80,
304};
305
306#define WMI_MAX_SSID_LEN (32)
307
308
309struct wmi_connect_cmd {
310 u8 network_type;
311 u8 dot11_auth_mode;
312 u8 auth_mode;
313 u8 pairwise_crypto_type;
314 u8 pairwise_crypto_len;
315 u8 group_crypto_type;
316 u8 group_crypto_len;
317 u8 ssid_len;
318 u8 ssid[WMI_MAX_SSID_LEN];
319 u8 channel;
320 u8 reserved0;
321 u8 bssid[WMI_MAC_LEN];
322 __le32 ctrl_flags;
323 u8 dst_mac[WMI_MAC_LEN];
324 u8 reserved1[2];
325} __packed;
326
327
328struct wmi_disconnect_sta_cmd {
329 u8 dst_mac[WMI_MAC_LEN];
330 __le16 disconnect_reason;
331} __packed;
332
333#define WMI_MAX_KEY_INDEX (3)
334#define WMI_MAX_KEY_LEN (32)
335#define WMI_PASSPHRASE_LEN (64)
336
337
338struct wmi_set_passphrase_cmd {
339 u8 ssid[WMI_MAX_SSID_LEN];
340 u8 passphrase[WMI_PASSPHRASE_LEN];
341 u8 ssid_len;
342 u8 passphrase_len;
343} __packed;
344
345
346enum wmi_key_usage {
347 WMI_KEY_USE_PAIRWISE = 0x00,
348 WMI_KEY_USE_RX_GROUP = 0x01,
349 WMI_KEY_USE_TX_GROUP = 0x02,
350};
351
352struct wmi_add_cipher_key_cmd {
353 u8 key_index;
354 u8 key_type;
355
356 u8 key_usage;
357 u8 key_len;
358
359 u8 key_rsc[8];
360 u8 key[WMI_MAX_KEY_LEN];
361
362 u8 key_op_ctrl;
363 u8 mac[WMI_MAC_LEN];
364} __packed;
365
366
367struct wmi_delete_cipher_key_cmd {
368 u8 key_index;
369 u8 mac[WMI_MAC_LEN];
370} __packed;
371
372
373
374
375
376
377
378
379
380enum wmi_scan_type {
381 WMI_ACTIVE_SCAN = 0x00,
382 WMI_SHORT_SCAN = 0x01,
383 WMI_PASSIVE_SCAN = 0x02,
384 WMI_DIRECT_SCAN = 0x03,
385 WMI_LONG_SCAN = 0x04,
386};
387
388
389struct wmi_start_scan_cmd {
390 u8 direct_scan_mac_addr[WMI_MAC_LEN];
391
392 u8 discovery_mode;
393 u8 reserved;
394
395 __le32 dwell_time;
396
397 __le32 force_scan_interval;
398
399 u8 scan_type;
400
401 u8 num_channels;
402
403
404
405
406
407 struct {
408 u8 channel;
409 u8 reserved;
410 } channel_list[0];
411} __packed;
412
413#define WMI_MAX_PNO_SSID_NUM (16)
414#define WMI_MAX_CHANNEL_NUM (6)
415#define WMI_MAX_PLANS_NUM (2)
416
417
418struct wmi_sched_scan_ssid_match {
419 u8 ssid_len;
420 u8 ssid[WMI_MAX_SSID_LEN];
421 s8 rssi_threshold;
422
423 u8 add_ssid_to_probe;
424 u8 reserved;
425} __packed;
426
427
428struct wmi_sched_scan_plan {
429 __le16 interval_sec;
430 __le16 num_of_iterations;
431} __packed;
432
433
434struct wmi_start_sched_scan_cmd {
435 struct wmi_sched_scan_ssid_match ssid_for_match[WMI_MAX_PNO_SSID_NUM];
436 u8 num_of_ssids;
437 s8 min_rssi_threshold;
438 u8 channel_list[WMI_MAX_CHANNEL_NUM];
439 u8 num_of_channels;
440 u8 reserved;
441 __le16 initial_delay_sec;
442 struct wmi_sched_scan_plan scan_plans[WMI_MAX_PLANS_NUM];
443} __packed;
444
445
446#define MAX_PROBED_SSID_INDEX (3)
447
448enum wmi_ssid_flag {
449
450 WMI_SSID_FLAG_DISABLE = 0x00,
451
452 WMI_SSID_FLAG_SPECIFIC = 0x01,
453
454 WMI_SSID_FLAG_ANY = 0x02,
455};
456
457struct wmi_probed_ssid_cmd {
458
459 u8 entry_index;
460
461 u8 flag;
462 u8 ssid_len;
463 u8 ssid[WMI_MAX_SSID_LEN];
464} __packed;
465
466
467
468
469#define WMI_MAX_IE_LEN (1024)
470
471
472enum wmi_mgmt_frame_type {
473 WMI_FRAME_BEACON = 0x00,
474 WMI_FRAME_PROBE_REQ = 0x01,
475 WMI_FRAME_PROBE_RESP = 0x02,
476 WMI_FRAME_ASSOC_REQ = 0x03,
477 WMI_FRAME_ASSOC_RESP = 0x04,
478 WMI_NUM_MGMT_FRAME = 0x05,
479};
480
481struct wmi_set_appie_cmd {
482
483 u8 mgmt_frm_type;
484 u8 reserved;
485
486 __le16 ie_len;
487 u8 ie_info[0];
488} __packed;
489
490
491struct wmi_pxmt_range_cfg_cmd {
492 u8 dst_mac[WMI_MAC_LEN];
493 __le16 range;
494} __packed;
495
496
497struct wmi_pxmt_snr2_range_cfg_cmd {
498 s8 snr2range_arr[2];
499} __packed;
500
501
502enum wmi_rf_mgmt_type {
503 WMI_RF_MGMT_W_DISABLE = 0x00,
504 WMI_RF_MGMT_W_ENABLE = 0x01,
505 WMI_RF_MGMT_GET_STATUS = 0x02,
506};
507
508
509enum wmi_bf_triggers {
510 WMI_BF_TRIGGER_RS_MCS1_TH_FAILURE = 0x01,
511 WMI_BF_TRIGGER_RS_MCS1_NO_BACK_FAILURE = 0x02,
512 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_TXOP = 0x04,
513 WMI_BF_TRIGGER_MAX_BACK_FAILURE = 0x08,
514 WMI_BF_TRIGGER_FW = 0x10,
515 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_KEEP_ALIVE = 0x20,
516 WMI_BF_TRIGGER_AOA = 0x40,
517 WMI_BF_TRIGGER_MAX_CTS_FAILURE_IN_UPM = 0x80,
518};
519
520
521struct wmi_rf_mgmt_cmd {
522 __le32 rf_mgmt_type;
523} __packed;
524
525
526struct wmi_corr_measure_cmd {
527 __le32 freq_mhz;
528 __le32 length_samples;
529 __le32 iterations;
530} __packed;
531
532
533struct wmi_set_ssid_cmd {
534 __le32 ssid_len;
535 u8 ssid[WMI_MAX_SSID_LEN];
536} __packed;
537
538
539struct wmi_set_pcp_channel_cmd {
540 u8 channel;
541 u8 reserved[3];
542} __packed;
543
544
545struct wmi_bcon_ctrl_cmd {
546 __le16 bcon_interval;
547 __le16 frag_num;
548 __le64 ss_mask;
549 u8 network_type;
550 u8 pcp_max_assoc_sta;
551 u8 disable_sec_offload;
552 u8 disable_sec;
553 u8 hidden_ssid;
554 u8 is_go;
555
556 u8 abft_len;
557 u8 reserved;
558} __packed;
559
560
561enum wmi_port_role {
562 WMI_PORT_STA = 0x00,
563 WMI_PORT_PCP = 0x01,
564 WMI_PORT_AP = 0x02,
565 WMI_PORT_P2P_DEV = 0x03,
566 WMI_PORT_P2P_CLIENT = 0x04,
567 WMI_PORT_P2P_GO = 0x05,
568};
569
570
571struct wmi_port_allocate_cmd {
572 u8 mac[WMI_MAC_LEN];
573 u8 port_role;
574 u8 mid;
575} __packed;
576
577
578struct wmi_port_delete_cmd {
579 u8 mid;
580 u8 reserved[3];
581} __packed;
582
583
584enum wmi_wakeup_trigger {
585 WMI_WAKEUP_TRIGGER_UCAST = 0x01,
586 WMI_WAKEUP_TRIGGER_BCAST = 0x02,
587};
588
589
590struct wmi_traffic_suspend_cmd {
591
592 u8 wakeup_trigger;
593} __packed;
594
595
596enum wmi_discovery_mode {
597 WMI_DISCOVERY_MODE_NON_OFFLOAD = 0x00,
598 WMI_DISCOVERY_MODE_OFFLOAD = 0x01,
599 WMI_DISCOVERY_MODE_PEER2PEER = 0x02,
600};
601
602struct wmi_p2p_cfg_cmd {
603
604 u8 discovery_mode;
605 u8 channel;
606
607 __le16 bcon_interval;
608} __packed;
609
610
611enum wmi_power_source_type {
612 WMI_POWER_SOURCE_BATTERY = 0x00,
613 WMI_POWER_SOURCE_OTHER = 0x01,
614};
615
616struct wmi_power_mgmt_cfg_cmd {
617
618 u8 power_source;
619 u8 reserved[3];
620} __packed;
621
622
623enum wmi_ap_sme_offload_mode {
624
625 WMI_AP_SME_OFFLOAD_FULL = 0x00,
626
627 WMI_AP_SME_OFFLOAD_PARTIAL = 0x01,
628
629 WMI_AP_SME_OFFLOAD_NONE = 0x02,
630};
631
632
633struct wmi_pcp_start_cmd {
634 __le16 bcon_interval;
635 u8 pcp_max_assoc_sta;
636 u8 hidden_ssid;
637 u8 is_go;
638 u8 reserved0[5];
639
640 u8 abft_len;
641
642 u8 ap_sme_offload_mode;
643 u8 network_type;
644 u8 channel;
645 u8 disable_sec_offload;
646 u8 disable_sec;
647} __packed;
648
649
650struct wmi_sw_tx_req_cmd {
651 u8 dst_mac[WMI_MAC_LEN];
652 __le16 len;
653 u8 payload[0];
654} __packed;
655
656
657struct wmi_vring_switch_timing_config_cmd {
658
659
660
661
662 __le32 interval_usec;
663
664 __le32 idle_th_usec;
665} __packed;
666
667struct wmi_sw_ring_cfg {
668 __le64 ring_mem_base;
669 __le16 ring_size;
670 __le16 max_mpdu_size;
671} __packed;
672
673
674struct wmi_vring_cfg_schd {
675 __le16 priority;
676 __le16 timeslot_us;
677} __packed;
678
679enum wmi_vring_cfg_encap_trans_type {
680 WMI_VRING_ENC_TYPE_802_3 = 0x00,
681 WMI_VRING_ENC_TYPE_NATIVE_WIFI = 0x01,
682};
683
684enum wmi_vring_cfg_ds_cfg {
685 WMI_VRING_DS_PBSS = 0x00,
686 WMI_VRING_DS_STATION = 0x01,
687 WMI_VRING_DS_AP = 0x02,
688 WMI_VRING_DS_ADDR4 = 0x03,
689};
690
691enum wmi_vring_cfg_nwifi_ds_trans_type {
692 WMI_NWIFI_TX_TRANS_MODE_NO = 0x00,
693 WMI_NWIFI_TX_TRANS_MODE_AP2PBSS = 0x01,
694 WMI_NWIFI_TX_TRANS_MODE_STA2PBSS = 0x02,
695};
696
697enum wmi_vring_cfg_schd_params_priority {
698 WMI_SCH_PRIO_REGULAR = 0x00,
699 WMI_SCH_PRIO_HIGH = 0x01,
700};
701
702#define CIDXTID_EXTENDED_CID_TID (0xFF)
703#define CIDXTID_CID_POS (0)
704#define CIDXTID_CID_LEN (4)
705#define CIDXTID_CID_MSK (0xF)
706#define CIDXTID_TID_POS (4)
707#define CIDXTID_TID_LEN (4)
708#define CIDXTID_TID_MSK (0xF0)
709#define VRING_CFG_MAC_CTRL_LIFETIME_EN_POS (0)
710#define VRING_CFG_MAC_CTRL_LIFETIME_EN_LEN (1)
711#define VRING_CFG_MAC_CTRL_LIFETIME_EN_MSK (0x1)
712#define VRING_CFG_MAC_CTRL_AGGR_EN_POS (1)
713#define VRING_CFG_MAC_CTRL_AGGR_EN_LEN (1)
714#define VRING_CFG_MAC_CTRL_AGGR_EN_MSK (0x2)
715#define VRING_CFG_TO_RESOLUTION_VALUE_POS (0)
716#define VRING_CFG_TO_RESOLUTION_VALUE_LEN (6)
717#define VRING_CFG_TO_RESOLUTION_VALUE_MSK (0x3F)
718
719struct wmi_vring_cfg {
720 struct wmi_sw_ring_cfg tx_sw_ring;
721
722 u8 ringid;
723
724
725
726 u8 cidxtid;
727 u8 encap_trans_type;
728
729 u8 ds_cfg;
730 u8 nwifi_ds_trans_type;
731 u8 mac_ctrl;
732 u8 to_resolution;
733 u8 agg_max_wsize;
734 struct wmi_vring_cfg_schd schd_params;
735
736 u8 cid;
737
738 u8 tid;
739 u8 reserved[2];
740} __packed;
741
742enum wmi_vring_cfg_cmd_action {
743 WMI_VRING_CMD_ADD = 0x00,
744 WMI_VRING_CMD_MODIFY = 0x01,
745 WMI_VRING_CMD_DELETE = 0x02,
746};
747
748
749struct wmi_vring_cfg_cmd {
750 __le32 action;
751 struct wmi_vring_cfg vring_cfg;
752} __packed;
753
754struct wmi_bcast_vring_cfg {
755 struct wmi_sw_ring_cfg tx_sw_ring;
756
757 u8 ringid;
758 u8 encap_trans_type;
759
760 u8 ds_cfg;
761 u8 nwifi_ds_trans_type;
762} __packed;
763
764
765struct wmi_bcast_vring_cfg_cmd {
766 __le32 action;
767 struct wmi_bcast_vring_cfg vring_cfg;
768} __packed;
769
770
771struct wmi_lo_power_calib_from_otp_cmd {
772
773 u8 index;
774 u8 reserved[3];
775} __packed;
776
777
778struct wmi_lo_power_calib_from_otp_event {
779
780 u8 status;
781 u8 reserved[3];
782} __packed;
783
784
785struct wmi_vring_ba_en_cmd {
786 u8 ringid;
787 u8 agg_max_wsize;
788 __le16 ba_timeout;
789 u8 amsdu;
790 u8 reserved[3];
791} __packed;
792
793
794struct wmi_vring_ba_dis_cmd {
795 u8 ringid;
796 u8 reserved;
797 __le16 reason;
798} __packed;
799
800
801struct wmi_notify_req_cmd {
802 u8 cid;
803 u8 year;
804 u8 month;
805 u8 day;
806 __le32 interval_usec;
807 u8 hour;
808 u8 minute;
809 u8 second;
810 u8 miliseconds;
811} __packed;
812
813
814enum wmi_sniffer_cfg_mode {
815 WMI_SNIFFER_OFF = 0x00,
816 WMI_SNIFFER_ON = 0x01,
817};
818
819
820enum wmi_silent_rssi_table {
821 RF_TEMPERATURE_CALIB_DEFAULT_DB = 0x00,
822 RF_TEMPERATURE_CALIB_HIGH_POWER_DB = 0x01,
823};
824
825
826enum wmi_silent_rssi_status {
827 SILENT_RSSI_SUCCESS = 0x00,
828 SILENT_RSSI_FAILURE = 0x01,
829};
830
831
832struct wmi_set_active_silent_rssi_table_cmd {
833
834 __le32 table;
835} __packed;
836
837enum wmi_sniffer_cfg_phy_info_mode {
838 WMI_SNIFFER_PHY_INFO_DISABLED = 0x00,
839 WMI_SNIFFER_PHY_INFO_ENABLED = 0x01,
840};
841
842enum wmi_sniffer_cfg_phy_support {
843 WMI_SNIFFER_CP = 0x00,
844 WMI_SNIFFER_DP = 0x01,
845 WMI_SNIFFER_BOTH_PHYS = 0x02,
846};
847
848
849struct wmi_sniffer_cfg {
850
851 __le32 mode;
852
853 __le32 phy_info_mode;
854
855 __le32 phy_support;
856 u8 channel;
857 u8 reserved[3];
858} __packed;
859
860enum wmi_cfg_rx_chain_cmd_action {
861 WMI_RX_CHAIN_ADD = 0x00,
862 WMI_RX_CHAIN_DEL = 0x01,
863};
864
865enum wmi_cfg_rx_chain_cmd_decap_trans_type {
866 WMI_DECAP_TYPE_802_3 = 0x00,
867 WMI_DECAP_TYPE_NATIVE_WIFI = 0x01,
868 WMI_DECAP_TYPE_NONE = 0x02,
869};
870
871enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type {
872 WMI_NWIFI_RX_TRANS_MODE_NO = 0x00,
873 WMI_NWIFI_RX_TRANS_MODE_PBSS2AP = 0x01,
874 WMI_NWIFI_RX_TRANS_MODE_PBSS2STA = 0x02,
875};
876
877enum wmi_cfg_rx_chain_cmd_reorder_type {
878 WMI_RX_HW_REORDER = 0x00,
879 WMI_RX_SW_REORDER = 0x01,
880};
881
882#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_POS (0)
883#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_LEN (1)
884#define L2_802_3_OFFLOAD_CTRL_VLAN_TAG_INSERTION_MSK (0x1)
885#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_POS (1)
886#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_LEN (1)
887#define L2_802_3_OFFLOAD_CTRL_SNAP_KEEP_MSK (0x2)
888#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_POS (0)
889#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_LEN (1)
890#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_QOS_MSK (0x1)
891#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_POS (1)
892#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_LEN (1)
893#define L2_NWIFI_OFFLOAD_CTRL_REMOVE_PN_MSK (0x2)
894#define L3_L4_CTRL_IPV4_CHECKSUM_EN_POS (0)
895#define L3_L4_CTRL_IPV4_CHECKSUM_EN_LEN (1)
896#define L3_L4_CTRL_IPV4_CHECKSUM_EN_MSK (0x1)
897#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_POS (1)
898#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_LEN (1)
899#define L3_L4_CTRL_TCPIP_CHECKSUM_EN_MSK (0x2)
900#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_POS (0)
901#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_LEN (1)
902#define RING_CTRL_OVERRIDE_PREFETCH_THRSH_MSK (0x1)
903#define RING_CTRL_OVERRIDE_WB_THRSH_POS (1)
904#define RING_CTRL_OVERRIDE_WB_THRSH_LEN (1)
905#define RING_CTRL_OVERRIDE_WB_THRSH_MSK (0x2)
906#define RING_CTRL_OVERRIDE_ITR_THRSH_POS (2)
907#define RING_CTRL_OVERRIDE_ITR_THRSH_LEN (1)
908#define RING_CTRL_OVERRIDE_ITR_THRSH_MSK (0x4)
909#define RING_CTRL_OVERRIDE_HOST_THRSH_POS (3)
910#define RING_CTRL_OVERRIDE_HOST_THRSH_LEN (1)
911#define RING_CTRL_OVERRIDE_HOST_THRSH_MSK (0x8)
912
913
914struct wmi_cfg_rx_chain_cmd {
915 __le32 action;
916 struct wmi_sw_ring_cfg rx_sw_ring;
917 u8 mid;
918 u8 decap_trans_type;
919 u8 l2_802_3_offload_ctrl;
920 u8 l2_nwifi_offload_ctrl;
921 u8 vlan_id;
922 u8 nwifi_ds_trans_type;
923 u8 l3_l4_ctrl;
924 u8 ring_ctrl;
925 __le16 prefetch_thrsh;
926 __le16 wb_thrsh;
927 __le32 itr_value;
928 __le16 host_thrsh;
929 u8 reorder_type;
930 u8 reserved;
931 struct wmi_sniffer_cfg sniffer_cfg;
932 __le16 max_rx_pl_per_desc;
933} __packed;
934
935
936struct wmi_rcp_addba_resp_cmd {
937
938
939
940 u8 cidxtid;
941 u8 dialog_token;
942 __le16 status_code;
943
944 __le16 ba_param_set;
945 __le16 ba_timeout;
946
947 u8 cid;
948
949 u8 tid;
950 u8 reserved[2];
951} __packed;
952
953
954struct wmi_rcp_delba_cmd {
955
956
957
958 u8 cidxtid;
959 u8 reserved;
960 __le16 reason;
961
962 u8 cid;
963
964 u8 tid;
965 u8 reserved2[2];
966} __packed;
967
968
969struct wmi_rcp_addba_req_cmd {
970
971
972
973 u8 cidxtid;
974 u8 dialog_token;
975
976 __le16 ba_param_set;
977 __le16 ba_timeout;
978
979 __le16 ba_seq_ctrl;
980
981 u8 cid;
982
983 u8 tid;
984 u8 reserved[2];
985} __packed;
986
987
988struct wmi_set_mac_address_cmd {
989 u8 mac[WMI_MAC_LEN];
990 u8 reserved[2];
991} __packed;
992
993
994
995
996
997struct wmi_echo_cmd {
998 __le32 value;
999} __packed;
1000
1001
1002
1003
1004
1005struct wmi_deep_echo_cmd {
1006 __le32 value;
1007} __packed;
1008
1009
1010
1011
1012
1013
1014
1015struct wmi_rf_pwr_on_delay_cmd {
1016
1017
1018
1019 __le16 down_delay_usec;
1020
1021
1022
1023 __le16 up_delay_usec;
1024} __packed;
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035struct wmi_set_high_power_table_params_cmd {
1036
1037 u8 tx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1038 u8 reserved0;
1039
1040 __le32 tx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1041
1042 u8 tx_etype_temp[WMI_RF_ETYPE_LENGTH];
1043 u8 reserved1;
1044
1045
1046
1047
1048 __le32 tx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1049
1050 u8 rx_dtype_temp[WMI_RF_DTYPE_LENGTH];
1051 u8 reserved2;
1052
1053 __le32 rx_dtype_conf[WMI_RF_DTYPE_CONF_LENGTH];
1054
1055 u8 rx_etype_temp[WMI_RF_ETYPE_LENGTH];
1056 u8 reserved3;
1057
1058
1059
1060
1061 __le32 rx_etype_conf[WMI_RF_ETYPE_CONF_LENGTH];
1062
1063 u8 rx_2_tx_temp[WMI_RF_RX2TX_LENGTH];
1064 u8 reserved4;
1065
1066 s8 rx_2_tx_offs[WMI_RF_RX2TX_CONF_LENGTH];
1067} __packed;
1068
1069
1070
1071
1072
1073
1074struct wmi_fixed_scheduling_ul_config_cmd {
1075
1076 s8 mcs;
1077
1078 u8 rd_count_per_slot;
1079 u8 reserved[2];
1080} __packed;
1081
1082
1083struct wmi_rf_xpm_read_cmd {
1084 u8 rf_id;
1085 u8 reserved[3];
1086
1087
1088
1089 __le32 xpm_bit_address;
1090 __le32 num_bytes;
1091} __packed;
1092
1093
1094struct wmi_rf_xpm_write_cmd {
1095 u8 rf_id;
1096 u8 reserved0[3];
1097
1098
1099
1100 __le32 xpm_bit_address;
1101 __le32 num_bytes;
1102
1103
1104
1105 u8 verify;
1106 u8 reserved1[3];
1107
1108 u8 data_bytes[0];
1109} __packed;
1110
1111
1112
1113
1114
1115
1116
1117enum wmi_temperature_measure_mode {
1118 TEMPERATURE_USE_OLD_VALUE = 0x01,
1119 TEMPERATURE_MEASURE_NOW = 0x02,
1120};
1121
1122
1123struct wmi_temp_sense_cmd {
1124 __le32 measure_baseband_en;
1125 __le32 measure_rf_en;
1126 __le32 measure_mode;
1127} __packed;
1128
1129enum wmi_pmc_op {
1130 WMI_PMC_ALLOCATE = 0x00,
1131 WMI_PMC_RELEASE = 0x01,
1132};
1133
1134
1135struct wmi_pmc_cmd {
1136
1137 u8 op;
1138 u8 reserved;
1139 __le16 ring_size;
1140 __le64 mem_base;
1141} __packed;
1142
1143enum wmi_aoa_meas_type {
1144 WMI_AOA_PHASE_MEAS = 0x00,
1145 WMI_AOA_PHASE_AMP_MEAS = 0x01,
1146};
1147
1148
1149struct wmi_aoa_meas_cmd {
1150 u8 mac_addr[WMI_MAC_LEN];
1151
1152
1153
1154
1155
1156 u8 channel;
1157
1158 u8 aoa_meas_type;
1159 __le32 meas_rf_mask;
1160} __packed;
1161
1162
1163struct wmi_set_mgmt_retry_limit_cmd {
1164
1165 u8 mgmt_retry_limit;
1166
1167 u8 reserved[3];
1168} __packed;
1169
1170
1171#define WMI_NUM_OF_TT_ZONES (3)
1172
1173struct wmi_tt_zone_limits {
1174
1175 u8 temperature_high;
1176
1177 u8 temperature_low;
1178 u8 reserved[2];
1179} __packed;
1180
1181
1182
1183
1184struct wmi_tt_data {
1185
1186 u8 bb_enabled;
1187 u8 reserved0[3];
1188
1189 struct wmi_tt_zone_limits bb_zones[WMI_NUM_OF_TT_ZONES];
1190
1191 u8 rf_enabled;
1192 u8 reserved1[3];
1193
1194 struct wmi_tt_zone_limits rf_zones[WMI_NUM_OF_TT_ZONES];
1195} __packed;
1196
1197
1198struct wmi_set_thermal_throttling_cfg_cmd {
1199
1200 struct wmi_tt_data tt_data;
1201} __packed;
1202
1203
1204struct wmi_new_sta_cmd {
1205 u8 dst_mac[WMI_MAC_LEN];
1206 u8 aid;
1207} __packed;
1208
1209
1210struct wmi_del_sta_cmd {
1211 u8 dst_mac[WMI_MAC_LEN];
1212 __le16 disconnect_reason;
1213} __packed;
1214
1215enum wmi_tof_burst_duration {
1216 WMI_TOF_BURST_DURATION_250_USEC = 2,
1217 WMI_TOF_BURST_DURATION_500_USEC = 3,
1218 WMI_TOF_BURST_DURATION_1_MSEC = 4,
1219 WMI_TOF_BURST_DURATION_2_MSEC = 5,
1220 WMI_TOF_BURST_DURATION_4_MSEC = 6,
1221 WMI_TOF_BURST_DURATION_8_MSEC = 7,
1222 WMI_TOF_BURST_DURATION_16_MSEC = 8,
1223 WMI_TOF_BURST_DURATION_32_MSEC = 9,
1224 WMI_TOF_BURST_DURATION_64_MSEC = 10,
1225 WMI_TOF_BURST_DURATION_128_MSEC = 11,
1226 WMI_TOF_BURST_DURATION_NO_PREFERENCES = 15,
1227};
1228
1229enum wmi_tof_session_start_flags {
1230 WMI_TOF_SESSION_START_FLAG_SECURED = 0x1,
1231 WMI_TOF_SESSION_START_FLAG_ASAP = 0x2,
1232 WMI_TOF_SESSION_START_FLAG_LCI_REQ = 0x4,
1233 WMI_TOF_SESSION_START_FLAG_LCR_REQ = 0x8,
1234};
1235
1236
1237struct wmi_ftm_dest_info {
1238 u8 channel;
1239
1240 u8 flags;
1241 u8 initial_token;
1242 u8 num_of_ftm_per_burst;
1243 u8 num_of_bursts_exp;
1244
1245 u8 burst_duration;
1246
1247
1248
1249 __le16 burst_period;
1250 u8 dst_mac[WMI_MAC_LEN];
1251 u8 reserved;
1252 u8 num_burst_per_aoa_meas;
1253} __packed;
1254
1255
1256struct wmi_tof_session_start_cmd {
1257 __le32 session_id;
1258 u8 reserved1;
1259 u8 aoa_type;
1260 __le16 num_of_dest;
1261 u8 reserved[4];
1262 struct wmi_ftm_dest_info ftm_dest_info[0];
1263} __packed;
1264
1265
1266struct wmi_tof_cfg_responder_cmd {
1267 u8 enable;
1268 u8 reserved[3];
1269} __packed;
1270
1271enum wmi_tof_channel_info_report_type {
1272 WMI_TOF_CHANNEL_INFO_TYPE_CIR = 0x1,
1273 WMI_TOF_CHANNEL_INFO_TYPE_RSSI = 0x2,
1274 WMI_TOF_CHANNEL_INFO_TYPE_SNR = 0x4,
1275 WMI_TOF_CHANNEL_INFO_TYPE_DEBUG_DATA = 0x8,
1276 WMI_TOF_CHANNEL_INFO_TYPE_VENDOR_SPECIFIC = 0x10,
1277};
1278
1279
1280struct wmi_tof_channel_info_cmd {
1281
1282 __le32 channel_info_report_request;
1283} __packed;
1284
1285
1286struct wmi_tof_set_tx_rx_offset_cmd {
1287
1288 __le32 tx_offset;
1289
1290 __le32 rx_offset;
1291
1292 __le32 rf_mask;
1293
1294 __le32 precursor;
1295} __packed;
1296
1297
1298struct wmi_tof_get_tx_rx_offset_cmd {
1299
1300 u8 rf_index;
1301 u8 reserved[3];
1302} __packed;
1303
1304
1305struct wmi_map_mcs_to_schd_params {
1306 u8 mcs;
1307
1308 u8 time_in_usec_before_initiate_tx;
1309
1310 u8 rd_enabled;
1311 u8 reserved;
1312
1313 __le16 time_in_usec_to_stop_vring;
1314
1315 __le16 flush_to_in_usec;
1316
1317 __le32 mac_buff_size_in_bytes;
1318} __packed;
1319
1320
1321struct wmi_fixed_scheduling_config_complete_event {
1322
1323 u8 status;
1324 u8 reserved[3];
1325} __packed;
1326
1327#define WMI_NUM_MCS (13)
1328
1329
1330struct wmi_fixed_scheduling_config_cmd {
1331
1332 struct wmi_map_mcs_to_schd_params mcs_to_schd_params_map[WMI_NUM_MCS];
1333
1334 __le16 max_sta_rd_ppdu_duration_in_usec;
1335
1336 __le16 max_sta_grant_ppdu_duration_in_usec;
1337
1338 __le16 assoc_slot_duration_in_usec;
1339
1340 __le16 virtual_slot_duration_in_usec;
1341
1342
1343
1344 u8 number_of_ap_slots_for_initiate_grant;
1345 u8 reserved[3];
1346} __packed;
1347
1348
1349struct wmi_enable_fixed_scheduling_cmd {
1350 __le32 reserved;
1351} __packed;
1352
1353
1354struct wmi_enable_fixed_scheduling_complete_event {
1355
1356 u8 status;
1357 u8 reserved[3];
1358} __packed;
1359
1360
1361struct wmi_set_multi_directed_omnis_config_cmd {
1362
1363 u8 dest_ap_num_directed_omnis;
1364 u8 reserved[3];
1365} __packed;
1366
1367
1368struct wmi_set_multi_directed_omnis_config_event {
1369
1370 u8 status;
1371 u8 reserved[3];
1372} __packed;
1373
1374
1375struct wmi_set_long_range_config_cmd {
1376 __le32 reserved;
1377} __packed;
1378
1379
1380struct wmi_set_long_range_config_complete_event {
1381
1382 u8 status;
1383 u8 reserved[3];
1384} __packed;
1385
1386
1387
1388
1389#define WMI_MAX_IOCTL_PAYLOAD_SIZE (236)
1390#define WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE (236)
1391#define WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE (236)
1392
1393enum wmi_internal_fw_ioctl_code {
1394 WMI_INTERNAL_FW_CODE_NONE = 0x0,
1395 WMI_INTERNAL_FW_CODE_QCOM = 0x1,
1396};
1397
1398
1399struct wmi_internal_fw_ioctl_cmd {
1400
1401 __le16 code;
1402 __le16 length;
1403
1404
1405
1406 __le32 payload[0];
1407} __packed;
1408
1409
1410struct wmi_internal_fw_ioctl_event {
1411
1412 u8 status;
1413 u8 reserved;
1414 __le16 length;
1415
1416
1417
1418 __le32 payload[0];
1419} __packed;
1420
1421
1422struct wmi_internal_fw_event_event {
1423 __le16 id;
1424 __le16 length;
1425
1426
1427
1428 __le32 payload[0];
1429} __packed;
1430
1431
1432struct wmi_bf_control_cmd {
1433
1434 __le32 triggers;
1435 u8 cid;
1436
1437 u8 txss_mode;
1438
1439 u8 brp_mode;
1440
1441
1442
1443 u8 bf_trigger_max_cts_failure_thr;
1444
1445
1446
1447 u8 bf_trigger_max_cts_failure_dense_thr;
1448
1449
1450
1451 u8 bf_trigger_max_back_failure_thr;
1452
1453
1454
1455 u8 bf_trigger_max_back_failure_dense_thr;
1456 u8 reserved0;
1457
1458 __le32 wrong_sector_bis_thr;
1459
1460 u8 long_term_enable;
1461
1462
1463
1464 u8 long_term_update_thr;
1465
1466 u8 long_term_mbps_th_tbl[WMI_NUM_MCS];
1467 u8 reserved1;
1468
1469 __le16 long_term_trig_timeout_per_mcs[WMI_NUM_MCS];
1470 u8 reserved2[2];
1471} __packed;
1472
1473
1474
1475
1476enum wmi_event_id {
1477 WMI_READY_EVENTID = 0x1001,
1478 WMI_CONNECT_EVENTID = 0x1002,
1479 WMI_DISCONNECT_EVENTID = 0x1003,
1480 WMI_START_SCHED_SCAN_EVENTID = 0x1005,
1481 WMI_STOP_SCHED_SCAN_EVENTID = 0x1006,
1482 WMI_SCHED_SCAN_RESULT_EVENTID = 0x1007,
1483 WMI_SCAN_COMPLETE_EVENTID = 0x100A,
1484 WMI_REPORT_STATISTICS_EVENTID = 0x100B,
1485 WMI_RD_MEM_RSP_EVENTID = 0x1800,
1486 WMI_FW_READY_EVENTID = 0x1801,
1487 WMI_EXIT_FAST_MEM_ACC_MODE_EVENTID = 0x200,
1488 WMI_ECHO_RSP_EVENTID = 0x1803,
1489
1490 WMI_FS_TUNE_DONE_EVENTID = 0x180A,
1491
1492 WMI_CORR_MEASURE_EVENTID = 0x180B,
1493 WMI_READ_RSSI_EVENTID = 0x180C,
1494 WMI_TEMP_SENSE_DONE_EVENTID = 0x180E,
1495 WMI_DC_CALIB_DONE_EVENTID = 0x180F,
1496
1497 WMI_IQ_TX_CALIB_DONE_EVENTID = 0x1811,
1498
1499 WMI_IQ_RX_CALIB_DONE_EVENTID = 0x1812,
1500 WMI_SET_WORK_MODE_DONE_EVENTID = 0x1815,
1501 WMI_LO_LEAKAGE_CALIB_DONE_EVENTID = 0x1816,
1502 WMI_LO_POWER_CALIB_FROM_OTP_EVENTID = 0x1817,
1503 WMI_SILENT_RSSI_CALIB_DONE_EVENTID = 0x181D,
1504
1505 WMI_RF_RX_TEST_DONE_EVENTID = 0x181E,
1506 WMI_CFG_RX_CHAIN_DONE_EVENTID = 0x1820,
1507 WMI_VRING_CFG_DONE_EVENTID = 0x1821,
1508 WMI_BA_STATUS_EVENTID = 0x1823,
1509 WMI_RCP_ADDBA_REQ_EVENTID = 0x1824,
1510 WMI_RCP_ADDBA_RESP_SENT_EVENTID = 0x1825,
1511 WMI_DELBA_EVENTID = 0x1826,
1512 WMI_GET_SSID_EVENTID = 0x1828,
1513 WMI_GET_PCP_CHANNEL_EVENTID = 0x182A,
1514 WMI_SW_TX_COMPLETE_EVENTID = 0x182B,
1515 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836,
1516 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837,
1517 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839,
1518 WMI_RS_MGMT_DONE_EVENTID = 0x1852,
1519 WMI_RF_MGMT_STATUS_EVENTID = 0x1853,
1520 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838,
1521 WMI_RX_MGMT_PACKET_EVENTID = 0x1840,
1522 WMI_TX_MGMT_PACKET_EVENTID = 0x1841,
1523 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842,
1524 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843,
1525 WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856,
1526 WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857,
1527 WMI_LED_CFG_DONE_EVENTID = 0x1858,
1528 WMI_SET_SILENT_RSSI_TABLE_DONE_EVENTID = 0x185C,
1529 WMI_RF_PWR_ON_DELAY_RSP_EVENTID = 0x185D,
1530 WMI_SET_HIGH_POWER_TABLE_PARAMS_EVENTID = 0x185E,
1531 WMI_FIXED_SCHEDULING_UL_CONFIG_EVENTID = 0x185F,
1532
1533 WMI_DATA_PORT_OPEN_EVENTID = 0x1860,
1534 WMI_WBE_LINK_DOWN_EVENTID = 0x1861,
1535 WMI_BF_CTRL_DONE_EVENTID = 0x1862,
1536 WMI_NOTIFY_REQ_DONE_EVENTID = 0x1863,
1537 WMI_GET_STATUS_DONE_EVENTID = 0x1864,
1538 WMI_VRING_EN_EVENTID = 0x1865,
1539 WMI_GET_RF_STATUS_EVENTID = 0x1866,
1540 WMI_GET_BASEBAND_TYPE_EVENTID = 0x1867,
1541 WMI_VRING_SWITCH_TIMING_CONFIG_EVENTID = 0x1868,
1542 WMI_UNIT_TEST_EVENTID = 0x1900,
1543 WMI_FLASH_READ_DONE_EVENTID = 0x1902,
1544 WMI_FLASH_WRITE_DONE_EVENTID = 0x1903,
1545
1546 WMI_TRAFFIC_SUSPEND_EVENTID = 0x1904,
1547 WMI_TRAFFIC_RESUME_EVENTID = 0x1905,
1548
1549 WMI_P2P_CFG_DONE_EVENTID = 0x1910,
1550 WMI_PORT_ALLOCATED_EVENTID = 0x1911,
1551 WMI_PORT_DELETED_EVENTID = 0x1912,
1552 WMI_LISTEN_STARTED_EVENTID = 0x1914,
1553 WMI_SEARCH_STARTED_EVENTID = 0x1915,
1554 WMI_DISCOVERY_STARTED_EVENTID = 0x1916,
1555 WMI_DISCOVERY_STOPPED_EVENTID = 0x1917,
1556 WMI_PCP_STARTED_EVENTID = 0x1918,
1557 WMI_PCP_STOPPED_EVENTID = 0x1919,
1558 WMI_PCP_FACTOR_EVENTID = 0x191A,
1559
1560 WMI_PS_DEV_PROFILE_CFG_EVENTID = 0x191C,
1561 WMI_RS_CFG_DONE_EVENTID = 0x1921,
1562 WMI_GET_DETAILED_RS_RES_EVENTID = 0x1922,
1563 WMI_AOA_MEAS_EVENTID = 0x1923,
1564 WMI_BRP_SET_ANT_LIMIT_EVENTID = 0x1924,
1565 WMI_SET_MGMT_RETRY_LIMIT_EVENTID = 0x1930,
1566 WMI_GET_MGMT_RETRY_LIMIT_EVENTID = 0x1931,
1567 WMI_SET_THERMAL_THROTTLING_CFG_EVENTID = 0x1940,
1568 WMI_GET_THERMAL_THROTTLING_CFG_EVENTID = 0x1941,
1569
1570 WMI_PS_DEV_PROFILE_CFG_READ_EVENTID = 0x1942,
1571 WMI_TSF_SYNC_STATUS_EVENTID = 0x1973,
1572 WMI_TOF_SESSION_END_EVENTID = 0x1991,
1573 WMI_TOF_GET_CAPABILITIES_EVENTID = 0x1992,
1574 WMI_TOF_SET_LCR_EVENTID = 0x1993,
1575 WMI_TOF_SET_LCI_EVENTID = 0x1994,
1576 WMI_TOF_FTM_PER_DEST_RES_EVENTID = 0x1995,
1577 WMI_TOF_CFG_RESPONDER_EVENTID = 0x1996,
1578 WMI_TOF_SET_TX_RX_OFFSET_EVENTID = 0x1997,
1579 WMI_TOF_GET_TX_RX_OFFSET_EVENTID = 0x1998,
1580 WMI_TOF_CHANNEL_INFO_EVENTID = 0x1999,
1581 WMI_GET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A0,
1582 WMI_SET_RF_SECTOR_PARAMS_DONE_EVENTID = 0x19A1,
1583 WMI_GET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A2,
1584 WMI_SET_SELECTED_RF_SECTOR_INDEX_DONE_EVENTID = 0x19A3,
1585 WMI_SET_RF_SECTOR_ON_DONE_EVENTID = 0x19A4,
1586 WMI_PRIO_TX_SECTORS_ORDER_EVENTID = 0x19A5,
1587 WMI_PRIO_TX_SECTORS_NUMBER_EVENTID = 0x19A6,
1588 WMI_PRIO_TX_SECTORS_SET_DEFAULT_CFG_EVENTID = 0x19A7,
1589 WMI_BF_CONTROL_EVENTID = 0x19AA,
1590 WMI_SCHEDULING_SCHEME_EVENTID = 0x1A01,
1591 WMI_FIXED_SCHEDULING_CONFIG_COMPLETE_EVENTID = 0x1A02,
1592 WMI_ENABLE_FIXED_SCHEDULING_COMPLETE_EVENTID = 0x1A03,
1593 WMI_SET_MULTI_DIRECTED_OMNIS_CONFIG_EVENTID = 0x1A04,
1594 WMI_SET_LONG_RANGE_CONFIG_COMPLETE_EVENTID = 0x1A05,
1595 WMI_GET_ASSOC_LIST_RES_EVENTID = 0x1A06,
1596 WMI_GET_CCA_INDICATIONS_EVENTID = 0x1A07,
1597 WMI_SET_CCA_INDICATIONS_BI_AVG_NUM_EVENTID = 0x1A08,
1598 WMI_INTERNAL_FW_EVENT_EVENTID = 0x1A0A,
1599 WMI_INTERNAL_FW_IOCTL_EVENTID = 0x1A0B,
1600 WMI_SET_CHANNEL_EVENTID = 0x9000,
1601 WMI_ASSOC_REQ_EVENTID = 0x9001,
1602 WMI_EAPOL_RX_EVENTID = 0x9002,
1603 WMI_MAC_ADDR_RESP_EVENTID = 0x9003,
1604 WMI_FW_VER_EVENTID = 0x9004,
1605 WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENTID = 0x9005,
1606 WMI_INTERNAL_FW_SET_CHANNEL = 0x9006,
1607 WMI_COMMAND_NOT_SUPPORTED_EVENTID = 0xFFFF,
1608};
1609
1610
1611enum wmi_fw_status {
1612 WMI_FW_STATUS_SUCCESS = 0x00,
1613 WMI_FW_STATUS_FAILURE = 0x01,
1614};
1615
1616
1617enum wmi_rf_status {
1618 WMI_RF_ENABLED = 0x00,
1619 WMI_RF_DISABLED_HW = 0x01,
1620 WMI_RF_DISABLED_SW = 0x02,
1621 WMI_RF_DISABLED_HW_SW = 0x03,
1622};
1623
1624
1625struct wmi_rf_mgmt_status_event {
1626 __le32 rf_status;
1627} __packed;
1628
1629
1630struct wmi_get_status_done_event {
1631 __le32 is_associated;
1632 u8 cid;
1633 u8 reserved0[3];
1634 u8 bssid[WMI_MAC_LEN];
1635 u8 channel;
1636 u8 reserved1;
1637 u8 network_type;
1638 u8 reserved2[3];
1639 __le32 ssid_len;
1640 u8 ssid[WMI_MAX_SSID_LEN];
1641 __le32 rf_status;
1642 __le32 is_secured;
1643} __packed;
1644
1645
1646struct wmi_fw_ver_event {
1647
1648 __le32 fw_major;
1649 __le32 fw_minor;
1650 __le32 fw_subminor;
1651 __le32 fw_build;
1652
1653 __le32 hour;
1654 __le32 minute;
1655 __le32 second;
1656 __le32 day;
1657 __le32 month;
1658 __le32 year;
1659
1660 __le32 bl_major;
1661 __le32 bl_minor;
1662 __le32 bl_subminor;
1663 __le32 bl_build;
1664
1665 u8 fw_capabilities_len;
1666 u8 reserved[3];
1667
1668
1669
1670 __le32 fw_capabilities[0];
1671} __packed;
1672
1673
1674enum rf_type {
1675 RF_UNKNOWN = 0x00,
1676 RF_MARLON = 0x01,
1677 RF_SPARROW = 0x02,
1678 RF_TALYNA1 = 0x03,
1679 RF_TALYNA2 = 0x04,
1680};
1681
1682
1683enum board_file_rf_type {
1684 BF_RF_MARLON = 0x00,
1685 BF_RF_SPARROW = 0x01,
1686 BF_RF_TALYNA1 = 0x02,
1687 BF_RF_TALYNA2 = 0x03,
1688};
1689
1690
1691enum rf_status {
1692 RF_OK = 0x00,
1693 RF_NO_COMM = 0x01,
1694 RF_WRONG_BOARD_FILE = 0x02,
1695};
1696
1697
1698struct wmi_get_rf_status_event {
1699
1700 __le32 rf_type;
1701
1702 __le32 attached_rf_vector;
1703
1704 __le32 enabled_rf_vector;
1705
1706 u8 rf_status[32];
1707
1708 __le32 board_file_rf_type;
1709
1710 __le32 board_file_platform_type;
1711
1712 __le32 board_file_version;
1713
1714 __le32 enabled_xif_vector;
1715 __le32 reserved;
1716} __packed;
1717
1718
1719enum baseband_type {
1720 BASEBAND_UNKNOWN = 0x00,
1721 BASEBAND_SPARROW_M_A0 = 0x03,
1722 BASEBAND_SPARROW_M_A1 = 0x04,
1723 BASEBAND_SPARROW_M_B0 = 0x05,
1724 BASEBAND_SPARROW_M_C0 = 0x06,
1725 BASEBAND_SPARROW_M_D0 = 0x07,
1726 BASEBAND_TALYN_M_A0 = 0x08,
1727 BASEBAND_TALYN_M_B0 = 0x09,
1728};
1729
1730
1731struct wmi_get_baseband_type_event {
1732
1733 __le32 baseband_type;
1734} __packed;
1735
1736
1737struct wmi_mac_addr_resp_event {
1738 u8 mac[WMI_MAC_LEN];
1739 u8 auth_mode;
1740 u8 crypt_mode;
1741 __le32 offload_mode;
1742} __packed;
1743
1744
1745struct wmi_eapol_rx_event {
1746 u8 src_mac[WMI_MAC_LEN];
1747 __le16 eapol_len;
1748 u8 eapol[0];
1749} __packed;
1750
1751
1752enum wmi_phy_capability {
1753 WMI_11A_CAPABILITY = 0x01,
1754 WMI_11G_CAPABILITY = 0x02,
1755 WMI_11AG_CAPABILITY = 0x03,
1756 WMI_11NA_CAPABILITY = 0x04,
1757 WMI_11NG_CAPABILITY = 0x05,
1758 WMI_11NAG_CAPABILITY = 0x06,
1759 WMI_11AD_CAPABILITY = 0x07,
1760 WMI_11N_CAPABILITY_OFFSET = 0x03,
1761};
1762
1763struct wmi_ready_event {
1764 __le32 sw_version;
1765 __le32 abi_version;
1766 u8 mac[WMI_MAC_LEN];
1767
1768 u8 phy_capability;
1769 u8 numof_additional_mids;
1770
1771 u8 rfc_read_calib_result;
1772
1773
1774
1775 u8 max_assoc_sta;
1776 u8 reserved[2];
1777} __packed;
1778
1779
1780struct wmi_notify_req_done_event {
1781
1782 __le32 status;
1783 __le64 tsf;
1784 s8 rssi;
1785 u8 reserved0[3];
1786 __le32 tx_tpt;
1787 __le32 tx_goodput;
1788 __le32 rx_goodput;
1789 __le16 bf_mcs;
1790 __le16 my_rx_sector;
1791 __le16 my_tx_sector;
1792 __le16 other_rx_sector;
1793 __le16 other_tx_sector;
1794 __le16 range;
1795 u8 sqi;
1796 u8 reserved[3];
1797} __packed;
1798
1799
1800struct wmi_connect_event {
1801 u8 channel;
1802 u8 reserved0;
1803 u8 bssid[WMI_MAC_LEN];
1804 __le16 listen_interval;
1805 __le16 beacon_interval;
1806 u8 network_type;
1807 u8 reserved1[3];
1808 u8 beacon_ie_len;
1809 u8 assoc_req_len;
1810 u8 assoc_resp_len;
1811 u8 cid;
1812 u8 aid;
1813 u8 reserved2[2];
1814
1815 u8 assoc_info[0];
1816} __packed;
1817
1818
1819enum wmi_disconnect_reason {
1820 WMI_DIS_REASON_NO_NETWORK_AVAIL = 0x01,
1821
1822 WMI_DIS_REASON_LOST_LINK = 0x02,
1823 WMI_DIS_REASON_DISCONNECT_CMD = 0x03,
1824 WMI_DIS_REASON_BSS_DISCONNECTED = 0x04,
1825 WMI_DIS_REASON_AUTH_FAILED = 0x05,
1826 WMI_DIS_REASON_ASSOC_FAILED = 0x06,
1827 WMI_DIS_REASON_NO_RESOURCES_AVAIL = 0x07,
1828 WMI_DIS_REASON_CSERV_DISCONNECT = 0x08,
1829 WMI_DIS_REASON_INVALID_PROFILE = 0x0A,
1830 WMI_DIS_REASON_DOT11H_CHANNEL_SWITCH = 0x0B,
1831 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C,
1832 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D,
1833 WMI_DIS_REASON_IBSS_MERGE = 0x0E,
1834};
1835
1836
1837struct wmi_disconnect_event {
1838
1839 __le16 protocol_reason_status;
1840
1841 u8 bssid[WMI_MAC_LEN];
1842
1843 u8 disconnect_reason;
1844
1845 u8 assoc_resp_len;
1846
1847 u8 assoc_info[0];
1848} __packed;
1849
1850
1851enum scan_status {
1852 WMI_SCAN_SUCCESS = 0x00,
1853 WMI_SCAN_FAILED = 0x01,
1854 WMI_SCAN_ABORTED = 0x02,
1855 WMI_SCAN_REJECTED = 0x03,
1856 WMI_SCAN_ABORT_REJECTED = 0x04,
1857};
1858
1859struct wmi_scan_complete_event {
1860
1861 __le32 status;
1862} __packed;
1863
1864
1865struct wmi_rx_mgmt_info {
1866 u8 mcs;
1867 s8 rssi;
1868 u8 range;
1869 u8 sqi;
1870 __le16 stype;
1871 __le16 status;
1872 __le32 len;
1873
1874 u8 qid;
1875
1876 u8 mid;
1877 u8 cid;
1878
1879 u8 channel;
1880} __packed;
1881
1882
1883enum wmi_pno_result {
1884 WMI_PNO_SUCCESS = 0x00,
1885 WMI_PNO_REJECT = 0x01,
1886 WMI_PNO_INVALID_PARAMETERS = 0x02,
1887 WMI_PNO_NOT_ENABLED = 0x03,
1888};
1889
1890struct wmi_start_sched_scan_event {
1891
1892 u8 result;
1893 u8 reserved[3];
1894} __packed;
1895
1896struct wmi_stop_sched_scan_event {
1897
1898 u8 result;
1899 u8 reserved[3];
1900} __packed;
1901
1902struct wmi_sched_scan_result_event {
1903 struct wmi_rx_mgmt_info info;
1904 u8 payload[0];
1905} __packed;
1906
1907
1908enum wmi_acs_info_bitmask {
1909 WMI_ACS_INFO_BITMASK_BEACON_FOUND = 0x01,
1910 WMI_ACS_INFO_BITMASK_BUSY_TIME = 0x02,
1911 WMI_ACS_INFO_BITMASK_TX_TIME = 0x04,
1912 WMI_ACS_INFO_BITMASK_RX_TIME = 0x08,
1913 WMI_ACS_INFO_BITMASK_NOISE = 0x10,
1914};
1915
1916struct scan_acs_info {
1917 u8 channel;
1918 u8 beacon_found;
1919
1920 __le16 busy_time;
1921 __le16 tx_time;
1922 __le16 rx_time;
1923 u8 noise;
1924 u8 reserved[3];
1925} __packed;
1926
1927struct wmi_acs_passive_scan_complete_event {
1928 __le32 dwell_time;
1929
1930
1931
1932 __le16 filled;
1933 u8 num_scanned_channels;
1934 u8 reserved;
1935 struct scan_acs_info scan_info_list[0];
1936} __packed;
1937
1938
1939enum wmi_vring_ba_status {
1940 WMI_BA_AGREED = 0x00,
1941 WMI_BA_NON_AGREED = 0x01,
1942
1943 WMI_BA_TD_WIP = 0x02,
1944
1945 WMI_BA_SETUP_WIP = 0x03,
1946
1947 WMI_BA_SESSION_ACTIVE = 0x04,
1948
1949 WMI_BA_SESSION_NOT_ACTIVE = 0x05,
1950};
1951
1952struct wmi_ba_status_event {
1953
1954 __le16 status;
1955 u8 reserved[2];
1956 u8 ringid;
1957 u8 agg_wsize;
1958 __le16 ba_timeout;
1959 u8 amsdu;
1960} __packed;
1961
1962
1963struct wmi_delba_event {
1964
1965
1966
1967 u8 cidxtid;
1968 u8 from_initiator;
1969 __le16 reason;
1970
1971 u8 cid;
1972
1973 u8 tid;
1974 u8 reserved[2];
1975} __packed;
1976
1977
1978struct wmi_vring_cfg_done_event {
1979 u8 ringid;
1980 u8 status;
1981 u8 reserved[2];
1982 __le32 tx_vring_tail_ptr;
1983} __packed;
1984
1985
1986struct wmi_rcp_addba_resp_sent_event {
1987
1988
1989
1990 u8 cidxtid;
1991 u8 reserved;
1992 __le16 status;
1993
1994 u8 cid;
1995
1996 u8 tid;
1997 u8 reserved2[2];
1998} __packed;
1999
2000
2001struct wmi_rcp_addba_req_event {
2002
2003
2004
2005 u8 cidxtid;
2006 u8 dialog_token;
2007
2008 __le16 ba_param_set;
2009 __le16 ba_timeout;
2010
2011 __le16 ba_seq_ctrl;
2012
2013 u8 cid;
2014
2015 u8 tid;
2016 u8 reserved[2];
2017} __packed;
2018
2019
2020enum wmi_cfg_rx_chain_done_event_status {
2021 WMI_CFG_RX_CHAIN_SUCCESS = 0x01,
2022};
2023
2024struct wmi_cfg_rx_chain_done_event {
2025
2026 __le32 rx_ring_tail_ptr;
2027 __le32 status;
2028} __packed;
2029
2030
2031enum wmi_wbe_link_down_event_reason {
2032 WMI_WBE_REASON_USER_REQUEST = 0x00,
2033 WMI_WBE_REASON_RX_DISASSOC = 0x01,
2034 WMI_WBE_REASON_BAD_PHY_LINK = 0x02,
2035};
2036
2037
2038struct wmi_wbe_link_down_event {
2039 u8 cid;
2040 u8 reserved[3];
2041 __le32 reason;
2042} __packed;
2043
2044
2045struct wmi_data_port_open_event {
2046 u8 cid;
2047 u8 reserved[3];
2048} __packed;
2049
2050
2051struct wmi_vring_en_event {
2052 u8 vring_index;
2053 u8 reserved[3];
2054} __packed;
2055
2056
2057struct wmi_get_pcp_channel_event {
2058 u8 channel;
2059 u8 reserved[3];
2060} __packed;
2061
2062
2063struct wmi_p2p_cfg_done_event {
2064
2065 u8 status;
2066 u8 reserved[3];
2067} __packed;
2068
2069
2070struct wmi_port_allocated_event {
2071
2072 u8 status;
2073 u8 reserved[3];
2074} __packed;
2075
2076
2077struct wmi_port_deleted_event {
2078
2079 u8 status;
2080 u8 reserved[3];
2081} __packed;
2082
2083
2084struct wmi_listen_started_event {
2085
2086 u8 status;
2087 u8 reserved[3];
2088} __packed;
2089
2090
2091struct wmi_search_started_event {
2092
2093 u8 status;
2094 u8 reserved[3];
2095} __packed;
2096
2097
2098struct wmi_pcp_started_event {
2099
2100 u8 status;
2101 u8 reserved[3];
2102} __packed;
2103
2104
2105struct wmi_pcp_factor_event {
2106 __le32 pcp_factor;
2107} __packed;
2108
2109enum wmi_sw_tx_status {
2110 WMI_TX_SW_STATUS_SUCCESS = 0x00,
2111 WMI_TX_SW_STATUS_FAILED_NO_RESOURCES = 0x01,
2112 WMI_TX_SW_STATUS_FAILED_TX = 0x02,
2113};
2114
2115
2116struct wmi_sw_tx_complete_event {
2117
2118 u8 status;
2119 u8 reserved[3];
2120} __packed;
2121
2122
2123struct wmi_corr_measure_event {
2124
2125 __le32 i;
2126
2127 __le32 q;
2128
2129 __le32 image_i;
2130
2131 __le32 image_q;
2132} __packed;
2133
2134
2135struct wmi_read_rssi_event {
2136 __le32 ina_rssi_adc_dbm;
2137} __packed;
2138
2139
2140struct wmi_get_ssid_event {
2141 __le32 ssid_len;
2142 u8 ssid[WMI_MAX_SSID_LEN];
2143} __packed;
2144
2145
2146struct wmi_rf_xpm_read_result_event {
2147
2148 u8 status;
2149 u8 reserved[3];
2150
2151 u8 data_bytes[0];
2152} __packed;
2153
2154
2155struct wmi_rf_xpm_write_result_event {
2156
2157 u8 status;
2158 u8 reserved[3];
2159} __packed;
2160
2161
2162struct wmi_tx_mgmt_packet_event {
2163 u8 payload[0];
2164} __packed;
2165
2166
2167struct wmi_rx_mgmt_packet_event {
2168 struct wmi_rx_mgmt_info info;
2169 u8 payload[0];
2170} __packed;
2171
2172
2173struct wmi_echo_rsp_event {
2174 __le32 echoed_value;
2175} __packed;
2176
2177
2178struct wmi_rf_pwr_on_delay_rsp_event {
2179
2180 u8 status;
2181 u8 reserved[3];
2182} __packed;
2183
2184
2185struct wmi_set_high_power_table_params_event {
2186
2187 u8 status;
2188 u8 reserved[3];
2189} __packed;
2190
2191
2192struct wmi_fixed_scheduling_ul_config_event {
2193
2194 u8 status;
2195 u8 reserved[3];
2196} __packed;
2197
2198
2199
2200
2201
2202struct wmi_temp_sense_done_event {
2203
2204
2205
2206 __le32 baseband_t1000;
2207
2208
2209
2210 __le32 rf_t1000;
2211} __packed;
2212
2213#define WMI_SCAN_DWELL_TIME_MS (100)
2214#define WMI_SURVEY_TIMEOUT_MS (10000)
2215
2216enum wmi_hidden_ssid {
2217 WMI_HIDDEN_SSID_DISABLED = 0x00,
2218 WMI_HIDDEN_SSID_SEND_EMPTY = 0x10,
2219 WMI_HIDDEN_SSID_CLEAR = 0xFE,
2220};
2221
2222
2223
2224
2225
2226
2227
2228
2229enum led_mode {
2230 LED_DISABLE = 0x00,
2231 LED_ENABLE = 0x01,
2232};
2233
2234
2235
2236
2237enum wmi_led_id {
2238 WMI_LED_WLAN = 0x00,
2239 WMI_LED_WPAN = 0x01,
2240 WMI_LED_WWAN = 0x02,
2241};
2242
2243
2244enum wmi_led_polarity {
2245 LED_POLARITY_HIGH_ACTIVE = 0x00,
2246 LED_POLARITY_LOW_ACTIVE = 0x01,
2247};
2248
2249
2250
2251
2252struct wmi_led_blink_mode {
2253 __le32 blink_on;
2254 __le32 blink_off;
2255} __packed;
2256
2257
2258struct wmi_led_cfg_cmd {
2259
2260 u8 led_mode;
2261
2262 u8 id;
2263
2264 struct wmi_led_blink_mode slow_blink_cfg;
2265
2266 struct wmi_led_blink_mode medium_blink_cfg;
2267
2268 struct wmi_led_blink_mode fast_blink_cfg;
2269
2270 u8 led_polarity;
2271
2272 u8 reserved;
2273} __packed;
2274
2275
2276struct wmi_set_connect_snr_thr_cmd {
2277 u8 enable;
2278 u8 reserved;
2279
2280 __le16 omni_snr_thr;
2281
2282 __le16 direct_snr_thr;
2283} __packed;
2284
2285
2286struct wmi_led_cfg_done_event {
2287
2288 __le32 status;
2289} __packed;
2290
2291
2292struct wmi_rs_cfg {
2293
2294
2295
2296 u8 per_threshold[WMI_NUM_MCS];
2297
2298
2299
2300
2301 u8 min_frame_cnt[WMI_NUM_MCS];
2302
2303 u8 stop_th;
2304
2305 u8 mcs1_fail_th;
2306 u8 max_back_failure_th;
2307
2308
2309
2310 u8 dbg_disable_internal_trigger;
2311 __le32 back_failure_mask;
2312 __le32 mcs_en_vec;
2313} __packed;
2314
2315
2316enum wmi_sched_scheme_slot_type {
2317 WMI_SCHED_SLOT_SP = 0x0,
2318 WMI_SCHED_SLOT_CBAP = 0x1,
2319 WMI_SCHED_SLOT_IDLE = 0x2,
2320 WMI_SCHED_SLOT_ANNOUNCE_NO_ACK = 0x3,
2321 WMI_SCHED_SLOT_DISCOVERY = 0x4,
2322};
2323
2324enum wmi_sched_scheme_slot_flags {
2325 WMI_SCHED_SCHEME_SLOT_PERIODIC = 0x1,
2326};
2327
2328struct wmi_sched_scheme_slot {
2329
2330 __le32 tbtt_offset;
2331
2332 u8 flags;
2333
2334 u8 type;
2335
2336 __le16 duration;
2337
2338 __le16 tx_op;
2339
2340
2341
2342 __le16 period;
2343
2344
2345
2346 u8 num_of_blocks;
2347
2348
2349
2350 u8 idle_period;
2351 u8 src_aid;
2352 u8 dest_aid;
2353 __le32 reserved;
2354} __packed;
2355
2356enum wmi_sched_scheme_flags {
2357
2358 WMI_SCHED_SCHEME_ENABLE = 0x01,
2359 WMI_SCHED_PROTECTED_SP = 0x02,
2360
2361 WMI_SCHED_FIRST = 0x04,
2362
2363 WMI_SCHED_LAST = 0x08,
2364 WMI_SCHED_IMMEDIATE_START = 0x10,
2365};
2366
2367enum wmi_sched_scheme_advertisment {
2368
2369
2370
2371 WMI_ADVERTISE_ESE_DISABLED = 0x0,
2372 WMI_ADVERTISE_ESE_IN_BEACON = 0x1,
2373 WMI_ADVERTISE_ESE_IN_ANNOUNCE_FRAME = 0x2,
2374};
2375
2376
2377struct wmi_scheduling_scheme_cmd {
2378 u8 serial_num;
2379
2380 u8 ese_advertisment;
2381
2382 __le16 flags;
2383 u8 num_allocs;
2384 u8 reserved[3];
2385 __le64 start_tbtt;
2386
2387 struct wmi_sched_scheme_slot allocs[WMI_SCHED_MAX_ALLOCS_PER_CMD];
2388} __packed;
2389
2390enum wmi_sched_scheme_failure_type {
2391 WMI_SCHED_SCHEME_FAILURE_NO_ERROR = 0x00,
2392 WMI_SCHED_SCHEME_FAILURE_OLD_START_TSF_ERR = 0x01,
2393};
2394
2395
2396struct wmi_scheduling_scheme_event {
2397
2398 u8 status;
2399
2400 u8 serial_num;
2401
2402 u8 failure_type;
2403
2404 u8 reserved[1];
2405} __packed;
2406
2407
2408struct wmi_rs_cfg_cmd {
2409
2410 u8 cid;
2411
2412 u8 rs_enable;
2413
2414 struct wmi_rs_cfg rs_cfg;
2415} __packed;
2416
2417
2418struct wmi_rs_cfg_done_event {
2419 u8 cid;
2420
2421 u8 status;
2422 u8 reserved[2];
2423} __packed;
2424
2425
2426struct wmi_get_detailed_rs_res_cmd {
2427
2428 u8 cid;
2429 u8 reserved[3];
2430} __packed;
2431
2432
2433enum wmi_rs_results_status {
2434 WMI_RS_RES_VALID = 0x00,
2435 WMI_RS_RES_INVALID = 0x01,
2436};
2437
2438
2439struct wmi_rs_results {
2440
2441 u8 num_of_tx_pkt[WMI_NUM_MCS];
2442
2443 u8 num_of_non_acked_pkt[WMI_NUM_MCS];
2444
2445 __le32 tsf;
2446
2447 u8 mcs;
2448} __packed;
2449
2450
2451struct wmi_get_detailed_rs_res_event {
2452 u8 cid;
2453
2454 u8 status;
2455
2456 struct wmi_rs_results rs_results;
2457 u8 reserved[3];
2458} __packed;
2459
2460
2461enum wmi_brp_ant_limit_mode {
2462
2463 WMI_BRP_ANT_LIMIT_MODE_DISABLE = 0x00,
2464
2465
2466
2467 WMI_BRP_ANT_LIMIT_MODE_EFFECTIVE = 0x01,
2468
2469 WMI_BRP_ANT_LIMIT_MODE_FORCE = 0x02,
2470
2471 WMI_BRP_ANT_LIMIT_MODES_NUM = 0x03,
2472};
2473
2474
2475struct wmi_brp_set_ant_limit_cmd {
2476
2477 u8 cid;
2478
2479 u8 limit_mode;
2480
2481
2482
2483
2484
2485 u8 ant_limit;
2486 u8 reserved;
2487} __packed;
2488
2489
2490struct wmi_brp_set_ant_limit_event {
2491
2492 u8 status;
2493 u8 reserved[3];
2494} __packed;
2495
2496
2497#define WMI_LINK_MAINTAIN_CFG_CID_BROADCAST (0xFFFFFFFF)
2498
2499
2500enum wmi_link_maintain_cfg_type {
2501
2502 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_AP = 0x00,
2503
2504 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_AP = 0x01,
2505
2506 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_NORMAL_STA = 0x02,
2507
2508 WMI_LINK_MAINTAIN_CFG_TYPE_DEFAULT_FST_STA = 0x03,
2509
2510 WMI_LINK_MAINTAIN_CFG_TYPE_CUSTOM = 0x04,
2511
2512 WMI_LINK_MAINTAIN_CFG_TYPES_NUM = 0x05,
2513};
2514
2515
2516enum wmi_link_maintain_cfg_response_status {
2517
2518
2519 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_OK = 0x00,
2520
2521
2522
2523 WMI_LINK_MAINTAIN_CFG_RESPONSE_STATUS_BAD_ARGUMENT = 0x01,
2524};
2525
2526
2527struct wmi_link_maintain_cfg {
2528
2529 __le32 link_loss_enable_detectors_vec;
2530
2531 __le32 check_link_loss_period_usec;
2532
2533 __le32 tx_ageing_threshold_usec;
2534
2535 __le32 keep_alive_period_usec_high_snr;
2536
2537 __le32 keep_alive_period_usec_low_snr;
2538
2539 __le32 keep_alive_snr_threshold_low_db;
2540
2541 __le32 keep_alive_snr_threshold_high_db;
2542
2543 __le32 bad_beacons_num_threshold;
2544
2545 __le32 bad_beacons_snr_threshold_db;
2546
2547 __le32 disconnect_timeout;
2548} __packed;
2549
2550
2551struct wmi_link_maintain_cfg_write_cmd {
2552
2553
2554
2555 __le32 cfg_type;
2556
2557 __le32 cid;
2558
2559
2560
2561 struct wmi_link_maintain_cfg lm_cfg;
2562} __packed;
2563
2564
2565struct wmi_link_maintain_cfg_read_cmd {
2566
2567 __le32 cid;
2568} __packed;
2569
2570
2571struct wmi_link_maintain_cfg_write_done_event {
2572
2573 __le32 cid;
2574
2575 __le32 status;
2576} __packed;
2577
2578
2579struct wmi_link_maintain_cfg_read_done_event {
2580
2581 __le32 cid;
2582
2583 __le32 status;
2584
2585 struct wmi_link_maintain_cfg lm_cfg;
2586} __packed;
2587
2588enum wmi_traffic_suspend_status {
2589 WMI_TRAFFIC_SUSPEND_APPROVED = 0x0,
2590 WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1,
2591};
2592
2593
2594struct wmi_traffic_suspend_event {
2595
2596 u8 status;
2597} __packed;
2598
2599enum wmi_traffic_resume_status {
2600 WMI_TRAFFIC_RESUME_SUCCESS = 0x0,
2601 WMI_TRAFFIC_RESUME_FAILED = 0x1,
2602};
2603
2604enum wmi_resume_trigger {
2605 WMI_RESUME_TRIGGER_UNKNOWN = 0x0,
2606 WMI_RESUME_TRIGGER_HOST = 0x1,
2607 WMI_RESUME_TRIGGER_UCAST_RX = 0x2,
2608 WMI_RESUME_TRIGGER_BCAST_RX = 0x4,
2609 WMI_RESUME_TRIGGER_WMI_EVT = 0x8,
2610};
2611
2612
2613struct wmi_traffic_resume_event {
2614
2615 u8 status;
2616 u8 reserved[3];
2617
2618 __le32 resume_triggers;
2619} __packed;
2620
2621
2622enum wmi_ps_cfg_cmd_status {
2623 WMI_PS_CFG_CMD_STATUS_SUCCESS = 0x00,
2624 WMI_PS_CFG_CMD_STATUS_BAD_PARAM = 0x01,
2625
2626 WMI_PS_CFG_CMD_STATUS_ERROR = 0x02,
2627};
2628
2629
2630enum wmi_ps_profile_type {
2631 WMI_PS_PROFILE_TYPE_DEFAULT = 0x00,
2632 WMI_PS_PROFILE_TYPE_PS_DISABLED = 0x01,
2633 WMI_PS_PROFILE_TYPE_MAX_PS = 0x02,
2634 WMI_PS_PROFILE_TYPE_LOW_LATENCY_PS = 0x03,
2635};
2636
2637
2638struct wmi_ps_dev_profile_cfg_read_cmd {
2639
2640 __le32 reserved;
2641} __packed;
2642
2643
2644struct wmi_ps_dev_profile_cfg_read_event {
2645
2646 u8 ps_profile;
2647 u8 reserved[3];
2648} __packed;
2649
2650
2651
2652
2653
2654
2655
2656
2657struct wmi_ps_dev_profile_cfg_cmd {
2658
2659 u8 ps_profile;
2660 u8 reserved[3];
2661} __packed;
2662
2663
2664struct wmi_ps_dev_profile_cfg_event {
2665
2666 __le32 status;
2667} __packed;
2668
2669enum wmi_ps_level {
2670 WMI_PS_LEVEL_DEEP_SLEEP = 0x00,
2671 WMI_PS_LEVEL_SHALLOW_SLEEP = 0x01,
2672
2673 WMI_PS_LEVEL_AWAKE = 0x02,
2674};
2675
2676enum wmi_ps_deep_sleep_clk_level {
2677
2678 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC = 0x00,
2679
2680 WMI_PS_DEEP_SLEEP_CLK_LEVEL_OSC = 0x01,
2681
2682 WMI_PS_DEEP_SLEEP_CLK_LEVEL_RTC_LT = 0x02,
2683 WMI_PS_DEEP_SLEEP_CLK_LEVEL_XTAL = 0x03,
2684 WMI_PS_DEEP_SLEEP_CLK_LEVEL_SYSCLK = 0x04,
2685
2686 WMI_PS_DEEP_SLEEP_CLK_LEVEL_N_A = 0xFF,
2687};
2688
2689
2690enum wmi_ps_d3_resp_policy {
2691 WMI_PS_D3_RESP_POLICY_DEFAULT = 0x00,
2692
2693 WMI_PS_D3_RESP_POLICY_DENIED = 0x01,
2694
2695 WMI_PS_D3_RESP_POLICY_APPROVED = 0x02,
2696};
2697
2698#define WMI_AOA_MAX_DATA_SIZE (128)
2699
2700enum wmi_aoa_meas_status {
2701 WMI_AOA_MEAS_SUCCESS = 0x00,
2702 WMI_AOA_MEAS_PEER_INCAPABLE = 0x01,
2703 WMI_AOA_MEAS_FAILURE = 0x02,
2704};
2705
2706
2707struct wmi_aoa_meas_event {
2708 u8 mac_addr[WMI_MAC_LEN];
2709
2710
2711
2712
2713
2714 u8 channel;
2715
2716 u8 aoa_meas_type;
2717
2718 __le32 meas_rf_mask;
2719
2720 u8 meas_status;
2721 u8 reserved;
2722
2723 __le16 length;
2724 u8 meas_data[WMI_AOA_MAX_DATA_SIZE];
2725} __packed;
2726
2727
2728struct wmi_set_mgmt_retry_limit_event {
2729
2730 u8 status;
2731
2732 u8 reserved[3];
2733} __packed;
2734
2735
2736struct wmi_get_mgmt_retry_limit_event {
2737
2738 u8 mgmt_retry_limit;
2739
2740 u8 reserved[3];
2741} __packed;
2742
2743
2744struct wmi_tof_get_capabilities_event {
2745 u8 ftm_capability;
2746
2747 u8 max_num_of_dest;
2748
2749 u8 max_num_of_meas_per_burst;
2750 u8 reserved;
2751
2752 __le16 max_multi_bursts_sessions;
2753
2754 __le16 max_ftm_burst_duration;
2755
2756 __le32 aoa_supported_types;
2757} __packed;
2758
2759
2760struct wmi_set_thermal_throttling_cfg_event {
2761
2762 u8 status;
2763 u8 reserved[3];
2764} __packed;
2765
2766
2767struct wmi_get_thermal_throttling_cfg_event {
2768
2769 struct wmi_tt_data tt_data;
2770} __packed;
2771
2772enum wmi_tof_session_end_status {
2773 WMI_TOF_SESSION_END_NO_ERROR = 0x00,
2774 WMI_TOF_SESSION_END_FAIL = 0x01,
2775 WMI_TOF_SESSION_END_PARAMS_ERROR = 0x02,
2776 WMI_TOF_SESSION_END_ABORTED = 0x03,
2777 WMI_TOF_SESSION_END_BUSY = 0x04,
2778};
2779
2780
2781struct wmi_tof_session_end_event {
2782
2783 __le32 session_id;
2784
2785 u8 status;
2786 u8 reserved[3];
2787} __packed;
2788
2789
2790struct wmi_tof_set_lci_event {
2791
2792 u8 status;
2793 u8 reserved[3];
2794} __packed;
2795
2796
2797struct wmi_tof_set_lcr_event {
2798
2799 u8 status;
2800 u8 reserved[3];
2801} __packed;
2802
2803
2804struct wmi_responder_ftm_res {
2805 u8 t1[6];
2806 u8 t2[6];
2807 u8 t3[6];
2808 u8 t4[6];
2809 __le16 tod_err;
2810 __le16 toa_err;
2811 __le16 tod_err_initiator;
2812 __le16 toa_err_initiator;
2813} __packed;
2814
2815enum wmi_tof_ftm_per_dest_res_status {
2816 WMI_PER_DEST_RES_NO_ERROR = 0x00,
2817 WMI_PER_DEST_RES_TX_RX_FAIL = 0x01,
2818 WMI_PER_DEST_RES_PARAM_DONT_MATCH = 0x02,
2819};
2820
2821enum wmi_tof_ftm_per_dest_res_flags {
2822 WMI_PER_DEST_RES_REQ_START = 0x01,
2823 WMI_PER_DEST_RES_BURST_REPORT_END = 0x02,
2824 WMI_PER_DEST_RES_REQ_END = 0x04,
2825 WMI_PER_DEST_RES_PARAM_UPDATE = 0x08,
2826};
2827
2828
2829struct wmi_tof_ftm_per_dest_res_event {
2830
2831 __le32 session_id;
2832
2833 u8 dst_mac[WMI_MAC_LEN];
2834
2835 u8 flags;
2836
2837 u8 status;
2838
2839 u8 responder_asap;
2840
2841 u8 responder_num_ftm_per_burst;
2842
2843 u8 responder_num_ftm_bursts_exp;
2844
2845 u8 responder_burst_duration;
2846
2847
2848
2849 __le16 responder_burst_period;
2850
2851 __le16 bursts_cnt;
2852
2853 __le32 tsf_sync;
2854
2855 u8 actual_ftm_per_burst;
2856
2857 __le32 meas_rf_mask;
2858 u8 reserved0[3];
2859 struct wmi_responder_ftm_res responder_ftm_res[0];
2860} __packed;
2861
2862
2863struct wmi_tof_cfg_responder_event {
2864
2865 u8 status;
2866 u8 reserved[3];
2867} __packed;
2868
2869enum wmi_tof_channel_info_type {
2870 WMI_TOF_CHANNEL_INFO_AOA = 0x00,
2871 WMI_TOF_CHANNEL_INFO_LCI = 0x01,
2872 WMI_TOF_CHANNEL_INFO_LCR = 0x02,
2873 WMI_TOF_CHANNEL_INFO_VENDOR_SPECIFIC = 0x03,
2874 WMI_TOF_CHANNEL_INFO_CIR = 0x04,
2875 WMI_TOF_CHANNEL_INFO_RSSI = 0x05,
2876 WMI_TOF_CHANNEL_INFO_SNR = 0x06,
2877 WMI_TOF_CHANNEL_INFO_DEBUG = 0x07,
2878};
2879
2880
2881struct wmi_tof_channel_info_event {
2882
2883 __le32 session_id;
2884
2885 u8 dst_mac[WMI_MAC_LEN];
2886
2887 u8 type;
2888
2889 u8 len;
2890
2891 u8 report[0];
2892} __packed;
2893
2894
2895struct wmi_tof_set_tx_rx_offset_event {
2896
2897 u8 status;
2898 u8 reserved[3];
2899} __packed;
2900
2901
2902struct wmi_tof_get_tx_rx_offset_event {
2903
2904 u8 status;
2905
2906 u8 rf_index;
2907 u8 reserved1[2];
2908
2909 __le32 tx_offset;
2910
2911 __le32 rx_offset;
2912
2913 __le32 precursor;
2914} __packed;
2915
2916
2917enum wmi_rf_sector_status {
2918 WMI_RF_SECTOR_STATUS_SUCCESS = 0x00,
2919 WMI_RF_SECTOR_STATUS_BAD_PARAMETERS_ERROR = 0x01,
2920 WMI_RF_SECTOR_STATUS_BUSY_ERROR = 0x02,
2921 WMI_RF_SECTOR_STATUS_NOT_SUPPORTED_ERROR = 0x03,
2922};
2923
2924
2925enum wmi_rf_sector_type {
2926 WMI_RF_SECTOR_TYPE_RX = 0x00,
2927 WMI_RF_SECTOR_TYPE_TX = 0x01,
2928};
2929
2930
2931struct wmi_rf_sector_info {
2932
2933 __le32 psh_hi;
2934
2935 __le32 psh_lo;
2936
2937
2938
2939 __le32 etype0;
2940
2941
2942
2943 __le32 etype1;
2944
2945
2946
2947 __le32 etype2;
2948
2949
2950
2951 __le32 dtype_swch_off;
2952} __packed;
2953
2954#define WMI_INVALID_RF_SECTOR_INDEX (0xFFFF)
2955#define WMI_MAX_RF_MODULES_NUM (8)
2956
2957
2958struct wmi_get_rf_sector_params_cmd {
2959
2960 __le16 sector_idx;
2961
2962 u8 sector_type;
2963
2964 u8 rf_modules_vec;
2965} __packed;
2966
2967
2968struct wmi_get_rf_sector_params_done_event {
2969
2970
2971
2972 u8 status;
2973
2974 u8 reserved[7];
2975
2976 __le64 tsf;
2977
2978 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2979} __packed;
2980
2981
2982struct wmi_set_rf_sector_params_cmd {
2983
2984 __le16 sector_idx;
2985
2986 u8 sector_type;
2987
2988 u8 rf_modules_vec;
2989
2990 struct wmi_rf_sector_info sectors_info[WMI_MAX_RF_MODULES_NUM];
2991} __packed;
2992
2993
2994struct wmi_set_rf_sector_params_done_event {
2995
2996
2997
2998 u8 status;
2999} __packed;
3000
3001
3002
3003
3004struct wmi_get_selected_rf_sector_index_cmd {
3005
3006 u8 cid;
3007
3008 u8 sector_type;
3009
3010 u8 reserved[2];
3011} __packed;
3012
3013
3014
3015
3016struct wmi_get_selected_rf_sector_index_done_event {
3017
3018
3019
3020 __le16 sector_idx;
3021
3022
3023
3024 u8 status;
3025
3026 u8 reserved[5];
3027
3028 __le64 tsf;
3029} __packed;
3030
3031
3032
3033
3034
3035struct wmi_set_selected_rf_sector_index_cmd {
3036
3037 u8 cid;
3038
3039 u8 sector_type;
3040
3041 __le16 sector_idx;
3042} __packed;
3043
3044
3045
3046
3047struct wmi_set_selected_rf_sector_index_done_event {
3048
3049
3050
3051 u8 status;
3052
3053 u8 reserved[3];
3054} __packed;
3055
3056
3057
3058
3059struct wmi_set_rf_sector_on_cmd {
3060
3061 __le16 sector_idx;
3062
3063 u8 sector_type;
3064
3065 u8 rf_modules_vec;
3066} __packed;
3067
3068
3069
3070
3071struct wmi_set_rf_sector_on_done_event {
3072
3073
3074
3075 u8 status;
3076
3077 u8 reserved[3];
3078} __packed;
3079
3080enum wmi_sector_sweep_type {
3081 WMI_SECTOR_SWEEP_TYPE_TXSS = 0x00,
3082 WMI_SECTOR_SWEEP_TYPE_BCON = 0x01,
3083 WMI_SECTOR_SWEEP_TYPE_TXSS_AND_BCON = 0x02,
3084 WMI_SECTOR_SWEEP_TYPE_NUM = 0x03,
3085};
3086
3087
3088
3089
3090
3091
3092
3093
3094struct wmi_prio_tx_sectors_order_cmd {
3095
3096 u8 tx_sectors_priority_array[MAX_NUM_OF_SECTORS];
3097
3098 u8 sector_sweep_type;
3099
3100 u8 cid;
3101
3102 u8 reserved[2];
3103} __packed;
3104
3105
3106enum wmi_prio_tx_sectors_cmd_status {
3107 WMI_PRIO_TX_SECT_CMD_STATUS_SUCCESS = 0x00,
3108 WMI_PRIO_TX_SECT_CMD_STATUS_BAD_PARAM = 0x01,
3109
3110 WMI_PRIO_TX_SECT_CMD_STATUS_ERROR = 0x02,
3111};
3112
3113
3114struct wmi_prio_tx_sectors_order_event {
3115
3116 u8 status;
3117
3118 u8 reserved[3];
3119} __packed;
3120
3121struct wmi_prio_tx_sectors_num_cmd {
3122
3123 u8 beacon_number_of_sectors;
3124
3125 u8 txss_number_of_sectors;
3126
3127 u8 cid;
3128} __packed;
3129
3130
3131
3132
3133
3134
3135
3136
3137struct wmi_prio_tx_sectors_number_cmd {
3138 struct wmi_prio_tx_sectors_num_cmd active_sectors_num;
3139
3140 u8 reserved;
3141} __packed;
3142
3143
3144struct wmi_prio_tx_sectors_number_event {
3145
3146 u8 status;
3147
3148 u8 reserved[3];
3149} __packed;
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159struct wmi_prio_tx_sectors_set_default_cfg_cmd {
3160
3161 u8 sector_sweep_type;
3162
3163 u8 cid;
3164
3165 u8 reserved[2];
3166} __packed;
3167
3168
3169struct wmi_prio_tx_sectors_set_default_cfg_event {
3170
3171 u8 status;
3172
3173 u8 reserved[3];
3174} __packed;
3175
3176
3177struct wmi_set_silent_rssi_table_done_event {
3178
3179 __le32 status;
3180
3181 __le32 table;
3182} __packed;
3183
3184
3185struct wmi_vring_switch_timing_config_event {
3186
3187 u8 status;
3188 u8 reserved[3];
3189} __packed;
3190
3191
3192struct wmi_assoc_sta_info {
3193 u8 mac[WMI_MAC_LEN];
3194 u8 omni_index_address;
3195 u8 reserved;
3196} __packed;
3197
3198#define WMI_GET_ASSOC_LIST_SIZE (8)
3199
3200
3201
3202
3203struct wmi_get_assoc_list_res_event {
3204 struct wmi_assoc_sta_info assoc_sta_list[WMI_GET_ASSOC_LIST_SIZE];
3205
3206 u8 count;
3207 u8 reserved[3];
3208} __packed;
3209
3210
3211struct wmi_bf_control_event {
3212
3213 u8 status;
3214 u8 reserved[3];
3215} __packed;
3216
3217
3218struct wmi_command_not_supported_event {
3219
3220 u8 mid;
3221 u8 reserved0;
3222 __le16 command_id;
3223
3224 __le16 command_subtype;
3225 __le16 reserved1;
3226} __packed;
3227
3228
3229struct wmi_tsf_sync_cmd {
3230
3231 u8 interval_ms;
3232
3233 u8 mcs;
3234 u8 reserved[6];
3235} __packed;
3236
3237
3238enum wmi_tsf_sync_status {
3239 WMI_TSF_SYNC_SUCCESS = 0x00,
3240 WMI_TSF_SYNC_FAILED = 0x01,
3241 WMI_TSF_SYNC_REJECTED = 0x02,
3242};
3243
3244
3245struct wmi_tsf_sync_status_event {
3246
3247 u8 status;
3248 u8 reserved[3];
3249} __packed;
3250
3251
3252struct wmi_get_cca_indications_event {
3253
3254 u8 status;
3255
3256 u8 cca_ed_percent;
3257
3258 u8 cca_ed_avg_percent;
3259
3260 u8 nav_percent;
3261
3262 u8 nav_avg_percent;
3263 u8 reserved[3];
3264} __packed;
3265
3266
3267struct wmi_set_cca_indications_bi_avg_num_cmd {
3268
3269 u8 bi_number;
3270 u8 reserved[3];
3271} __packed;
3272
3273
3274struct wmi_set_cca_indications_bi_avg_num_event {
3275
3276 u8 status;
3277 u8 reserved[3];
3278} __packed;
3279
3280
3281struct wmi_internal_fw_set_channel_event {
3282 u8 channel_num;
3283 u8 reserved[3];
3284} __packed;
3285
3286#endif
3287