hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/net/wireless/ath/wil6210/wmi.h
....@@ -1,19 +1,8 @@
1
+/* SPDX-License-Identifier: ISC */
12 /*
2
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
3
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
34 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
45 * Copyright (c) 2006-2012 Wilocity
5
- *
6
- * Permission to use, copy, modify, and/or distribute this software for any
7
- * purpose with or without fee is hereby granted, provided that the above
8
- * copyright notice and this permission notice appear in all copies.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
176 */
187
198 /*
....@@ -35,6 +24,7 @@
3524 #define WMI_PROX_RANGE_NUM (3)
3625 #define WMI_MAX_LOSS_DMG_BEACONS (20)
3726 #define MAX_NUM_OF_SECTORS (128)
27
+#define WMI_INVALID_TEMPERATURE (0xFFFFFFFF)
3828 #define WMI_SCHED_MAX_ALLOCS_PER_CMD (4)
3929 #define WMI_RF_DTYPE_LENGTH (3)
4030 #define WMI_RF_ETYPE_LENGTH (3)
....@@ -64,6 +54,7 @@
6454 #define WMI_QOS_MAX_WEIGHT 50
6555 #define WMI_QOS_SET_VIF_PRIORITY (0xFF)
6656 #define WMI_QOS_DEFAULT_PRIORITY (WMI_QOS_NUM_OF_PRIORITY)
57
+#define WMI_MAX_XIF_PORTS_NUM (8)
6758
6859 /* Mailbox interface
6960 * used for commands and events
....@@ -95,6 +86,7 @@
9586 WMI_FW_CAPABILITY_SET_SILENT_RSSI_TABLE = 13,
9687 WMI_FW_CAPABILITY_LO_POWER_CALIB_FROM_OTP = 14,
9788 WMI_FW_CAPABILITY_PNO = 15,
89
+ WMI_FW_CAPABILITY_CHANNEL_BONDING = 17,
9890 WMI_FW_CAPABILITY_REF_CLOCK_CONTROL = 18,
9991 WMI_FW_CAPABILITY_AP_SME_OFFLOAD_NONE = 19,
10092 WMI_FW_CAPABILITY_MULTI_VIFS = 20,
....@@ -103,6 +95,10 @@
10395 WMI_FW_CAPABILITY_AMSDU = 23,
10496 WMI_FW_CAPABILITY_RAW_MODE = 24,
10597 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,
106102 WMI_FW_CAPABILITY_MAX,
107103 };
108104
....@@ -196,6 +192,7 @@
196192 WMI_RCP_ADDBA_RESP_EDMA_CMDID = 0x83B,
197193 WMI_LINK_MAINTAIN_CFG_WRITE_CMDID = 0x842,
198194 WMI_LINK_MAINTAIN_CFG_READ_CMDID = 0x843,
195
+ WMI_SET_LINK_MONITOR_CMDID = 0x845,
199196 WMI_SET_SECTORS_CMDID = 0x849,
200197 WMI_MAINTAIN_PAUSE_CMDID = 0x850,
201198 WMI_MAINTAIN_RESUME_CMDID = 0x851,
....@@ -293,6 +290,8 @@
293290 WMI_SET_AP_SLOT_SIZE_CMDID = 0xA0F,
294291 WMI_SET_VRING_PRIORITY_WEIGHT_CMDID = 0xA10,
295292 WMI_SET_VRING_PRIORITY_CMDID = 0xA11,
293
+ WMI_RBUFCAP_CFG_CMDID = 0xA12,
294
+ WMI_TEMP_SENSE_ALL_CMDID = 0xA13,
296295 WMI_SET_MAC_ADDRESS_CMDID = 0xF003,
297296 WMI_ABORT_SCAN_CMDID = 0xF007,
298297 WMI_SET_PROMISCUOUS_MODE_CMDID = 0xF041,
....@@ -354,6 +353,19 @@
354353
355354 #define WMI_MAX_SSID_LEN (32)
356355
356
+enum 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
+
357369 /* WMI_CONNECT_CMDID */
358370 struct wmi_connect_cmd {
359371 u8 network_type;
....@@ -365,8 +377,12 @@
365377 u8 group_crypto_len;
366378 u8 ssid_len;
367379 u8 ssid[WMI_MAX_SSID_LEN];
380
+ /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
381
+ * the primary channel number
382
+ */
368383 u8 channel;
369
- u8 reserved0;
384
+ /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
385
+ u8 edmg_channel;
370386 u8 bssid[WMI_MAC_LEN];
371387 __le32 ctrl_flags;
372388 u8 dst_mac[WMI_MAC_LEN];
....@@ -396,6 +412,8 @@
396412 WMI_KEY_USE_PAIRWISE = 0x00,
397413 WMI_KEY_USE_RX_GROUP = 0x01,
398414 WMI_KEY_USE_TX_GROUP = 0x02,
415
+ WMI_KEY_USE_STORE_PTK = 0x03,
416
+ WMI_KEY_USE_APPLY_PTK = 0x04,
399417 };
400418
401419 struct wmi_add_cipher_key_cmd {
....@@ -456,7 +474,7 @@
456474 struct {
457475 u8 channel;
458476 u8 reserved;
459
- } channel_list[0];
477
+ } channel_list[];
460478 } __packed;
461479
462480 #define WMI_MAX_PNO_SSID_NUM (16)
....@@ -512,7 +530,7 @@
512530 /* Length of the FT IEs */
513531 __le16 ie_len;
514532 u8 reserved[2];
515
- u8 ie_info[0];
533
+ u8 ie_info[];
516534 } __packed;
517535
518536 /* WMI_SET_PROBED_SSID_CMDID */
....@@ -557,7 +575,7 @@
557575 u8 reserved;
558576 /* Length of the IE to be added to MGMT frame */
559577 __le16 ie_len;
560
- u8 ie_info[0];
578
+ u8 ie_info[];
561579 } __packed;
562580
563581 /* WMI_PXMT_RANGE_CFG_CMDID */
....@@ -832,7 +850,7 @@
832850 struct wmi_sw_tx_req_cmd {
833851 u8 dst_mac[WMI_MAC_LEN];
834852 __le16 len;
835
- u8 payload[0];
853
+ u8 payload[];
836854 } __packed;
837855
838856 /* WMI_SW_TX_REQ_EXT_CMDID */
....@@ -843,7 +861,7 @@
843861 /* Channel to use, 0xFF for currently active channel */
844862 u8 channel;
845863 u8 reserved[5];
846
- u8 payload[0];
864
+ u8 payload[];
847865 } __packed;
848866
849867 /* WMI_VRING_SWITCH_TIMING_CONFIG_CMDID */
....@@ -978,10 +996,22 @@
978996 WMI_RX_MSG_TYPE_EXTENDED = 0x01,
979997 };
980998
999
+enum wmi_ring_add_irq_mode {
1000
+ /* Backwards compatibility
1001
+ * for DESC ring - interrupt disabled
1002
+ * for STATUS ring - interrupt enabled
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
+
9811009 struct wmi_tx_status_ring_add_cmd {
9821010 struct wmi_edma_ring_cfg ring_cfg;
9831011 u8 irq_index;
984
- u8 reserved[3];
1012
+ /* wmi_ring_add_irq_mode */
1013
+ u8 irq_mode;
1014
+ u8 reserved[2];
9851015 } __packed;
9861016
9871017 struct wmi_rx_status_ring_add_cmd {
....@@ -1015,7 +1045,10 @@
10151045 u8 mac_ctrl;
10161046 u8 to_resolution;
10171047 u8 agg_max_wsize;
1018
- u8 reserved[3];
1048
+ u8 irq_index;
1049
+ /* wmi_ring_add_irq_mode */
1050
+ u8 irq_mode;
1051
+ u8 reserved;
10191052 struct wmi_vring_cfg_schd schd_params;
10201053 } __packed;
10211054
....@@ -1390,15 +1423,10 @@
13901423 u8 verify;
13911424 u8 reserved1[3];
13921425 /* actual size=num_bytes */
1393
- u8 data_bytes[0];
1426
+ u8 data_bytes[];
13941427 } __packed;
13951428
1396
-/* WMI_TEMP_SENSE_CMDID
1397
- *
1398
- * Measure MAC and radio temperatures
1399
- *
1400
- * Possible modes for temperature measurement
1401
- */
1429
+/* Possible modes for temperature measurement */
14021430 enum wmi_temperature_measure_mode {
14031431 TEMPERATURE_USE_OLD_VALUE = 0x01,
14041432 TEMPERATURE_MEASURE_NOW = 0x02,
....@@ -1544,7 +1572,7 @@
15441572 u8 aoa_type;
15451573 __le16 num_of_dest;
15461574 u8 reserved[4];
1547
- struct wmi_ftm_dest_info ftm_dest_info[0];
1575
+ struct wmi_ftm_dest_info ftm_dest_info[];
15481576 } __packed;
15491577
15501578 /* WMI_TOF_CFG_RESPONDER_CMDID */
....@@ -1738,7 +1766,7 @@
17381766 /* payload max size is WMI_MAX_IOCTL_PAYLOAD_SIZE
17391767 * Must be the last member of the struct
17401768 */
1741
- __le32 payload[0];
1769
+ __le32 payload[];
17421770 } __packed;
17431771
17441772 /* WMI_INTERNAL_FW_IOCTL_EVENTID */
....@@ -1750,7 +1778,7 @@
17501778 /* payload max size is WMI_MAX_IOCTL_REPLY_PAYLOAD_SIZE
17511779 * Must be the last member of the struct
17521780 */
1753
- __le32 payload[0];
1781
+ __le32 payload[];
17541782 } __packed;
17551783
17561784 /* WMI_INTERNAL_FW_EVENT_EVENTID */
....@@ -1760,7 +1788,7 @@
17601788 /* payload max size is WMI_MAX_INTERNAL_EVENT_PAYLOAD_SIZE
17611789 * Must be the last member of the struct
17621790 */
1763
- __le32 payload[0];
1791
+ __le32 payload[];
17641792 } __packed;
17651793
17661794 /* WMI_SET_VRING_PRIORITY_WEIGHT_CMDID */
....@@ -1790,7 +1818,7 @@
17901818 */
17911819 u8 num_of_vrings;
17921820 u8 reserved[3];
1793
- struct wmi_vring_priority vring_priority[0];
1821
+ struct wmi_vring_priority vring_priority[];
17941822 } __packed;
17951823
17961824 /* WMI_BF_CONTROL_CMDID - deprecated */
....@@ -1882,7 +1910,7 @@
18821910 u8 each_mcs_cfg_size;
18831911 u8 reserved1;
18841912 /* Configuration for each MCS */
1885
- struct wmi_bf_control_ex_mcs each_mcs_cfg[0];
1913
+ struct wmi_bf_control_ex_mcs each_mcs_cfg[];
18861914 } __packed;
18871915
18881916 /* WMI_LINK_STATS_CMD */
....@@ -1924,6 +1952,14 @@
19241952 __le32 slot_size;
19251953 } __packed;
19261954
1955
+/* WMI_TEMP_SENSE_ALL_CMDID */
1956
+struct 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
+
19271963 /* WMI Events
19281964 * List of Events (target to host)
19291965 */
....@@ -1938,6 +1974,7 @@
19381974 WMI_REPORT_STATISTICS_EVENTID = 0x100B,
19391975 WMI_FT_AUTH_STATUS_EVENTID = 0x100C,
19401976 WMI_FT_REASSOC_STATUS_EVENTID = 0x100D,
1977
+ WMI_LINK_MONITOR_EVENTID = 0x100E,
19411978 WMI_RADAR_GENERAL_CONFIG_EVENTID = 0x1100,
19421979 WMI_RADAR_CONFIG_SELECT_EVENTID = 0x1101,
19431980 WMI_RADAR_PARAMS_CONFIG_EVENTID = 0x1102,
....@@ -1981,6 +2018,7 @@
19812018 WMI_BEAMFORMING_MGMT_DONE_EVENTID = 0x1836,
19822019 WMI_BF_TXSS_MGMT_DONE_EVENTID = 0x1837,
19832020 WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839,
2021
+ WMI_BF_TRIG_EVENTID = 0x183A,
19842022 WMI_RS_MGMT_DONE_EVENTID = 0x1852,
19852023 WMI_RF_MGMT_STATUS_EVENTID = 0x1853,
19862024 WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838,
....@@ -1988,6 +2026,7 @@
19882026 WMI_TX_MGMT_PACKET_EVENTID = 0x1841,
19892027 WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID = 0x1842,
19902028 WMI_LINK_MAINTAIN_CFG_READ_DONE_EVENTID = 0x1843,
2029
+ WMI_SET_LINK_MONITOR_EVENTID = 0x1845,
19912030 WMI_RF_XPM_READ_RESULT_EVENTID = 0x1856,
19922031 WMI_RF_XPM_WRITE_RESULT_EVENTID = 0x1857,
19932032 WMI_LED_CFG_DONE_EVENTID = 0x1858,
....@@ -2081,6 +2120,8 @@
20812120 WMI_SET_AP_SLOT_SIZE_EVENTID = 0x1A0F,
20822121 WMI_SET_VRING_PRIORITY_WEIGHT_EVENTID = 0x1A10,
20832122 WMI_SET_VRING_PRIORITY_EVENTID = 0x1A11,
2123
+ WMI_RBUFCAP_CFG_EVENTID = 0x1A12,
2124
+ WMI_TEMP_SENSE_ALL_DONE_EVENTID = 0x1A13,
20842125 WMI_SET_CHANNEL_EVENTID = 0x9000,
20852126 WMI_ASSOC_REQ_EVENTID = 0x9001,
20862127 WMI_EAPOL_RX_EVENTID = 0x9002,
....@@ -2151,7 +2192,7 @@
21512192 /* FW capabilities info
21522193 * Must be the last member of the struct
21532194 */
2154
- __le32 fw_capabilities[0];
2195
+ __le32 fw_capabilities[];
21552196 } __packed;
21562197
21572198 /* WMI_GET_RF_STATUS_EVENTID */
....@@ -2229,7 +2270,7 @@
22292270 struct wmi_eapol_rx_event {
22302271 u8 src_mac[WMI_MAC_LEN];
22312272 __le16 eapol_len;
2232
- u8 eapol[0];
2273
+ u8 eapol[];
22332274 } __packed;
22342275
22352276 /* WMI_READY_EVENTID */
....@@ -2266,7 +2307,9 @@
22662307 __le32 status;
22672308 __le64 tsf;
22682309 s8 rssi;
2269
- u8 reserved0[3];
2310
+ /* enum wmi_edmg_tx_mode */
2311
+ u8 tx_mode;
2312
+ u8 reserved0[2];
22702313 __le32 tx_tpt;
22712314 __le32 tx_goodput;
22722315 __le32 rx_goodput;
....@@ -2282,8 +2325,12 @@
22822325
22832326 /* WMI_CONNECT_EVENTID */
22842327 struct wmi_connect_event {
2328
+ /* enum wmi_channel WMI_CHANNEL_1..WMI_CHANNEL_6; for EDMG this is
2329
+ * the primary channel number
2330
+ */
22852331 u8 channel;
2286
- u8 reserved0;
2332
+ /* enum wmi_channel WMI_CHANNEL_9..WMI_CHANNEL_12 */
2333
+ u8 edmg_channel;
22872334 u8 bssid[WMI_MAC_LEN];
22882335 __le16 listen_interval;
22892336 __le16 beacon_interval;
....@@ -2296,7 +2343,7 @@
22962343 u8 aid;
22972344 u8 reserved2[2];
22982345 /* not in use */
2299
- u8 assoc_info[0];
2346
+ u8 assoc_info[];
23002347 } __packed;
23012348
23022349 /* disconnect_reason */
....@@ -2315,6 +2362,7 @@
23152362 WMI_DIS_REASON_PROFILE_MISMATCH = 0x0C,
23162363 WMI_DIS_REASON_CONNECTION_EVICTED = 0x0D,
23172364 WMI_DIS_REASON_IBSS_MERGE = 0x0E,
2365
+ WMI_DIS_REASON_HIGH_TEMPERATURE = 0x0F,
23182366 };
23192367
23202368 /* WMI_DISCONNECT_EVENTID */
....@@ -2328,7 +2376,7 @@
23282376 /* last assoc req may passed to host - not in used */
23292377 u8 assoc_resp_len;
23302378 /* last assoc req may passed to host - not in used */
2331
- u8 assoc_info[0];
2379
+ u8 assoc_info[];
23322380 } __packed;
23332381
23342382 /* WMI_SCAN_COMPLETE_EVENTID */
....@@ -2352,7 +2400,7 @@
23522400 u8 reserved[3];
23532401 u8 mac_addr[WMI_MAC_LEN];
23542402 __le16 ie_len;
2355
- u8 ie_info[0];
2403
+ u8 ie_info[];
23562404 } __packed;
23572405
23582406 /* WMI_FT_REASSOC_STATUS_EVENTID */
....@@ -2369,7 +2417,8 @@
23692417 __le16 beacon_ie_len;
23702418 __le16 reassoc_req_ie_len;
23712419 __le16 reassoc_resp_ie_len;
2372
- u8 ie_info[0];
2420
+ u8 reserved[4];
2421
+ u8 ie_info[];
23732422 } __packed;
23742423
23752424 /* wmi_rx_mgmt_info */
....@@ -2412,7 +2461,7 @@
24122461
24132462 struct wmi_sched_scan_result_event {
24142463 struct wmi_rx_mgmt_info info;
2415
- u8 payload[0];
2464
+ u8 payload[];
24162465 } __packed;
24172466
24182467 /* WMI_ACS_PASSIVE_SCAN_COMPLETE_EVENT */
....@@ -2443,7 +2492,7 @@
24432492 __le16 filled;
24442493 u8 num_scanned_channels;
24452494 u8 reserved;
2446
- struct scan_acs_info scan_info_list[0];
2495
+ struct scan_acs_info scan_info_list[];
24472496 } __packed;
24482497
24492498 /* WMI_BA_STATUS_EVENTID */
....@@ -2702,7 +2751,7 @@
27022751 u8 status;
27032752 u8 reserved[3];
27042753 /* requested num_bytes of data */
2705
- u8 data_bytes[0];
2754
+ u8 data_bytes[];
27062755 } __packed;
27072756
27082757 /* EVENT: WMI_RF_XPM_WRITE_RESULT_EVENTID */
....@@ -2720,7 +2769,7 @@
27202769 /* WMI_RX_MGMT_PACKET_EVENTID */
27212770 struct wmi_rx_mgmt_packet_event {
27222771 struct wmi_rx_mgmt_info info;
2723
- u8 payload[0];
2772
+ u8 payload[];
27242773 } __packed;
27252774
27262775 /* WMI_ECHO_RSP_EVENTID */
....@@ -2760,11 +2809,13 @@
27602809 */
27612810 struct wmi_temp_sense_done_event {
27622811 /* Temperature times 1000 (actual temperature will be achieved by
2763
- * dividing the value by 1000)
2812
+ * dividing the value by 1000). When temperature cannot be read from
2813
+ * device return WMI_INVALID_TEMPERATURE
27642814 */
27652815 __le32 baseband_t1000;
27662816 /* Temperature times 1000 (actual temperature will be achieved by
2767
- * dividing the value by 1000)
2817
+ * dividing the value by 1000). When temperature cannot be read from
2818
+ * device return WMI_INVALID_TEMPERATURE
27682819 */
27692820 __le32 rf_t1000;
27702821 } __packed;
....@@ -2918,7 +2969,7 @@
29182969 u8 each_mcs_cfg_size;
29192970 u8 reserved[3];
29202971 /* Configuration for each MCS */
2921
- struct wmi_rs_cfg_ex_mcs each_mcs_cfg[0];
2972
+ struct wmi_rs_cfg_ex_mcs each_mcs_cfg[];
29222973 } __packed;
29232974
29242975 /* WMI_RS_CFG_EX_EVENTID */
....@@ -3127,7 +3178,7 @@
31273178 u8 each_mcs_results_size;
31283179 u8 reserved1[3];
31293180 /* Results for each MCS */
3130
- struct wmi_rs_results_ex_mcs each_mcs_results[0];
3181
+ struct wmi_rs_results_ex_mcs each_mcs_results[];
31313182 } __packed;
31323183
31333184 /* BRP antenna limit mode */
....@@ -3164,6 +3215,30 @@
31643215 /* wmi_fw_status */
31653216 u8 status;
31663217 u8 reserved[3];
3218
+} __packed;
3219
+
3220
+enum wmi_bf_type {
3221
+ WMI_BF_TYPE_SLS = 0x00,
3222
+ WMI_BF_TYPE_BRP_RX = 0x01,
3223
+};
3224
+
3225
+/* WMI_BF_TRIG_CMDID */
3226
+struct wmi_bf_trig_cmd {
3227
+ /* enum wmi_bf_type - type of requested beamforming */
3228
+ u8 bf_type;
3229
+ /* used only for WMI_BF_TYPE_BRP_RX */
3230
+ u8 cid;
3231
+ /* used only for WMI_BF_TYPE_SLS */
3232
+ u8 dst_mac[WMI_MAC_LEN];
3233
+ u8 reserved[4];
3234
+} __packed;
3235
+
3236
+/* WMI_BF_TRIG_EVENTID */
3237
+struct wmi_bf_trig_event {
3238
+ /* enum wmi_fw_status */
3239
+ u8 status;
3240
+ u8 cid;
3241
+ u8 reserved[2];
31673242 } __packed;
31683243
31693244 /* broadcast connection ID */
....@@ -3240,6 +3315,36 @@
32403315 __le32 cid;
32413316 } __packed;
32423317
3318
+/* WMI_SET_LINK_MONITOR_CMDID */
3319
+struct 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
+/* wmi_link_monitor_event_type */
3327
+enum 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
+/* WMI_SET_LINK_MONITOR_EVENTID */
3334
+struct wmi_set_link_monitor_event {
3335
+ /* wmi_fw_status */
3336
+ u8 status;
3337
+ u8 reserved[3];
3338
+} __packed;
3339
+
3340
+/* WMI_LINK_MONITOR_EVENTID */
3341
+struct wmi_link_monitor_event {
3342
+ /* link_monitor_event_type */
3343
+ u8 type;
3344
+ s8 rssi_level;
3345
+ u8 reserved[2];
3346
+} __packed;
3347
+
32433348 /* WMI_LINK_MAINTAIN_CFG_WRITE_DONE_EVENTID */
32443349 struct wmi_link_maintain_cfg_write_done_event {
32453350 /* requested connection ID */
....@@ -3261,6 +3366,8 @@
32613366 enum wmi_traffic_suspend_status {
32623367 WMI_TRAFFIC_SUSPEND_APPROVED = 0x0,
32633368 WMI_TRAFFIC_SUSPEND_REJECTED_LINK_NOT_IDLE = 0x1,
3369
+ WMI_TRAFFIC_SUSPEND_REJECTED_DISCONNECT = 0x2,
3370
+ WMI_TRAFFIC_SUSPEND_REJECTED_OTHER = 0x3,
32643371 };
32653372
32663373 /* WMI_TRAFFIC_SUSPEND_EVENTID */
....@@ -3280,6 +3387,7 @@
32803387 WMI_RESUME_TRIGGER_UCAST_RX = 0x2,
32813388 WMI_RESUME_TRIGGER_BCAST_RX = 0x4,
32823389 WMI_RESUME_TRIGGER_WMI_EVT = 0x8,
3390
+ WMI_RESUME_TRIGGER_DISCONNECT = 0x10,
32833391 };
32843392
32853393 /* WMI_TRAFFIC_RESUME_EVENTID */
....@@ -3529,7 +3637,7 @@
35293637 /* Measurments are from RFs, defined by the mask */
35303638 __le32 meas_rf_mask;
35313639 u8 reserved0[3];
3532
- struct wmi_responder_ftm_res responder_ftm_res[0];
3640
+ struct wmi_responder_ftm_res responder_ftm_res[];
35333641 } __packed;
35343642
35353643 /* WMI_TOF_CFG_RESPONDER_EVENTID */
....@@ -3561,7 +3669,7 @@
35613669 /* data report length */
35623670 u8 len;
35633671 /* data report payload */
3564
- u8 report[0];
3672
+ u8 report[];
35653673 } __packed;
35663674
35673675 /* WMI_TOF_SET_TX_RX_OFFSET_EVENTID */
....@@ -3977,7 +4085,7 @@
39774085 u8 has_next;
39784086 u8 reserved[5];
39794087 /* a stream of wmi_link_stats_record_s */
3980
- u8 payload[0];
4088
+ u8 payload[];
39814089 } __packed;
39824090
39834091 /* WMI_LINK_STATS_EVENT */
....@@ -3986,7 +4094,7 @@
39864094 u8 record_type_id;
39874095 u8 reserved;
39884096 __le16 record_size;
3989
- u8 record[0];
4097
+ u8 record[];
39904098 } __packed;
39914099
39924100 /* WMI_LINK_STATS_TYPE_BASIC */
....@@ -4055,4 +4163,59 @@
40554163 u8 reserved[3];
40564164 } __packed;
40574165
4166
+/* WMI_RADAR_PCI_CTRL_BLOCK struct */
4167
+struct wmi_radar_pci_ctrl_block {
4168
+ /* last fw tail address index */
4169
+ __le32 fw_tail_index;
4170
+ /* last SW head address index known to FW */
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
+ /* When pre overflow detected, advance sw head in unit of pulses */
4178
+ __le32 sw_head_inc;
4179
+ __le32 reserved[8];
4180
+} __packed;
4181
+
4182
+/* WMI_RBUFCAP_CFG_CMD */
4183
+struct wmi_rbufcap_cfg_cmd {
4184
+ u8 enable;
4185
+ u8 reserved;
4186
+ /* RBUFCAP indicates rx space unavailable when number of rx
4187
+ * descriptors drops below this threshold. Set 0 to use system
4188
+ * default
4189
+ */
4190
+ __le16 rx_desc_threshold;
4191
+} __packed;
4192
+
4193
+/* WMI_RBUFCAP_CFG_EVENTID */
4194
+struct wmi_rbufcap_cfg_event {
4195
+ /* enum wmi_fw_status */
4196
+ u8 status;
4197
+ u8 reserved[3];
4198
+} __packed;
4199
+
4200
+/* WMI_TEMP_SENSE_ALL_DONE_EVENTID
4201
+ * Measure MAC and all radio temperatures
4202
+ */
4203
+struct wmi_temp_sense_all_done_event {
4204
+ /* enum wmi_fw_status */
4205
+ u8 status;
4206
+ /* Bitmap of connected RFs */
4207
+ u8 rf_bitmap;
4208
+ u8 reserved[2];
4209
+ /* Temperature times 1000 (actual temperature will be achieved by
4210
+ * dividing the value by 1000). When temperature cannot be read from
4211
+ * device return WMI_INVALID_TEMPERATURE
4212
+ */
4213
+ __le32 rf_t1000[WMI_MAX_XIF_PORTS_NUM];
4214
+ /* Temperature times 1000 (actual temperature will be achieved by
4215
+ * dividing the value by 1000). When temperature cannot be read from
4216
+ * device return WMI_INVALID_TEMPERATURE
4217
+ */
4218
+ __le32 baseband_t1000;
4219
+} __packed;
4220
+
40584221 #endif /* __WILOCITY_WMI_H__ */