forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/drivers/net/wireless/ath/ath10k/wmi.h
....@@ -1,26 +1,15 @@
1
+/* SPDX-License-Identifier: ISC */
12 /*
23 * Copyright (c) 2005-2011 Atheros Communications Inc.
34 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
4
- * Copyright (c) 2018, The Linux Foundation. All rights reserved.
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.
5
+ * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
176 */
187
198 #ifndef _WMI_H_
209 #define _WMI_H_
2110
2211 #include <linux/types.h>
23
-#include <net/mac80211.h>
12
+#include <linux/ieee80211.h>
2413
2514 /*
2615 * This file specifies the WMI interface for the Unified Software
....@@ -203,6 +192,21 @@
203192 WMI_SERVICE_TPC_STATS_FINAL,
204193 WMI_SERVICE_RESET_CHIP,
205194 WMI_SERVICE_SPOOF_MAC_SUPPORT,
195
+ WMI_SERVICE_TX_DATA_ACK_RSSI,
196
+ WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
197
+ WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
198
+ WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT,
199
+ WMI_SERVICE_THERM_THROT,
200
+ WMI_SERVICE_RTT_RESPONDER_ROLE,
201
+ WMI_SERVICE_PER_PACKET_SW_ENCRYPT,
202
+ WMI_SERVICE_REPORT_AIRTIME,
203
+ WMI_SERVICE_SYNC_DELETE_CMDS,
204
+ WMI_SERVICE_TX_PWR_PER_PEER,
205
+ WMI_SERVICE_SUPPORT_EXTEND_ADDRESS,
206
+ WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT,
207
+ WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
208
+
209
+ /* Remember to add the new value to wmi_service_name()! */
206210
207211 /* keep last */
208212 WMI_SERVICE_MAX,
....@@ -242,6 +246,9 @@
242246 WMI_10X_SERVICE_PEER_STATS,
243247 WMI_10X_SERVICE_RESET_CHIP,
244248 WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
249
+ WMI_10X_SERVICE_VDEV_BCN_RATE_CONTROL,
250
+ WMI_10X_SERVICE_PER_PACKET_SW_ENCRYPT,
251
+ WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT,
245252 };
246253
247254 enum wmi_main_service {
....@@ -350,9 +357,30 @@
350357 WMI_10_4_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
351358 WMI_10_4_SERVICE_HOST_DFS_CHECK_SUPPORT,
352359 WMI_10_4_SERVICE_TPC_STATS_FINAL,
360
+ WMI_10_4_SERVICE_CFR_CAPTURE_SUPPORT,
361
+ WMI_10_4_SERVICE_TX_DATA_ACK_RSSI,
362
+ WMI_10_4_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_LEGACY,
363
+ WMI_10_4_SERVICE_PER_PACKET_SW_ENCRYPT,
364
+ WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT,
365
+ WMI_10_4_SERVICE_VDEV_BCN_RATE_CONTROL,
366
+ WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
367
+ WMI_10_4_SERVICE_HTT_ASSERT_TRIGGER_SUPPORT,
368
+ WMI_10_4_SERVICE_VDEV_FILTER_NEIGHBOR_RX_PACKETS,
369
+ WMI_10_4_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
370
+ WMI_10_4_SERVICE_PEER_CHWIDTH_CHANGE,
371
+ WMI_10_4_SERVICE_RX_FILTER_OUT_COUNT,
372
+ WMI_10_4_SERVICE_RTT_RESPONDER_ROLE,
373
+ WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
374
+ WMI_10_4_SERVICE_REPORT_AIRTIME,
375
+ WMI_10_4_SERVICE_TX_PWR_PER_PEER,
376
+ WMI_10_4_SERVICE_FETCH_PEER_TX_PN,
377
+ WMI_10_4_SERVICE_MULTIPLE_VDEV_RESTART,
378
+ WMI_10_4_SERVICE_ENHANCED_RADIO_COUNTERS,
379
+ WMI_10_4_SERVICE_QINQ_SUPPORT,
380
+ WMI_10_4_SERVICE_RESET_CHIP,
353381 };
354382
355
-static inline char *wmi_service_name(int service_id)
383
+static inline char *wmi_service_name(enum wmi_service service_id)
356384 {
357385 #define SVCSTR(x) case x: return #x
358386
....@@ -449,6 +477,7 @@
449477 SVCSTR(WMI_SERVICE_TX_MODE_PUSH_PULL);
450478 SVCSTR(WMI_SERVICE_TX_MODE_DYNAMIC);
451479 SVCSTR(WMI_SERVICE_VDEV_RX_FILTER);
480
+ SVCSTR(WMI_SERVICE_BTCOEX);
452481 SVCSTR(WMI_SERVICE_CHECK_CAL_VERSION);
453482 SVCSTR(WMI_SERVICE_DBGLOG_WARN2);
454483 SVCSTR(WMI_SERVICE_BTCOEX_DUTY_CYCLE);
....@@ -458,16 +487,34 @@
458487 SVCSTR(WMI_SERVICE_SMART_LOGGING_SUPPORT);
459488 SVCSTR(WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE);
460489 SVCSTR(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY);
490
+ SVCSTR(WMI_SERVICE_MGMT_TX_WMI);
461491 SVCSTR(WMI_SERVICE_TDLS_WIDER_BANDWIDTH);
462492 SVCSTR(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS);
463493 SVCSTR(WMI_SERVICE_HOST_DFS_CHECK_SUPPORT);
464494 SVCSTR(WMI_SERVICE_TPC_STATS_FINAL);
465495 SVCSTR(WMI_SERVICE_RESET_CHIP);
466
- default:
496
+ SVCSTR(WMI_SERVICE_SPOOF_MAC_SUPPORT);
497
+ SVCSTR(WMI_SERVICE_TX_DATA_ACK_RSSI);
498
+ SVCSTR(WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT);
499
+ SVCSTR(WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT);
500
+ SVCSTR(WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT);
501
+ SVCSTR(WMI_SERVICE_THERM_THROT);
502
+ SVCSTR(WMI_SERVICE_RTT_RESPONDER_ROLE);
503
+ SVCSTR(WMI_SERVICE_PER_PACKET_SW_ENCRYPT);
504
+ SVCSTR(WMI_SERVICE_REPORT_AIRTIME);
505
+ SVCSTR(WMI_SERVICE_SYNC_DELETE_CMDS);
506
+ SVCSTR(WMI_SERVICE_TX_PWR_PER_PEER);
507
+ SVCSTR(WMI_SERVICE_SUPPORT_EXTEND_ADDRESS);
508
+ SVCSTR(WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT);
509
+ SVCSTR(WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT);
510
+
511
+ case WMI_SERVICE_MAX:
467512 return NULL;
468513 }
469514
470515 #undef SVCSTR
516
+
517
+ return NULL;
471518 }
472519
473520 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
....@@ -557,6 +604,10 @@
557604 WMI_SERVICE_RESET_CHIP, len);
558605 SVCMAP(WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
559606 WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, len);
607
+ SVCMAP(WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT,
608
+ WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT, len);
609
+ SVCMAP(WMI_10X_SERVICE_PER_PACKET_SW_ENCRYPT,
610
+ WMI_SERVICE_PER_PACKET_SW_ENCRYPT, len);
560611 }
561612
562613 static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
....@@ -771,6 +822,26 @@
771822 WMI_SERVICE_HOST_DFS_CHECK_SUPPORT, len);
772823 SVCMAP(WMI_10_4_SERVICE_TPC_STATS_FINAL,
773824 WMI_SERVICE_TPC_STATS_FINAL, len);
825
+ SVCMAP(WMI_10_4_SERVICE_TX_DATA_ACK_RSSI,
826
+ WMI_SERVICE_TX_DATA_ACK_RSSI, len);
827
+ SVCMAP(WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
828
+ WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, len);
829
+ SVCMAP(WMI_10_4_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
830
+ WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT, len);
831
+ SVCMAP(WMI_10_4_SERVICE_RTT_RESPONDER_ROLE,
832
+ WMI_SERVICE_RTT_RESPONDER_ROLE, len);
833
+ SVCMAP(WMI_10_4_SERVICE_PER_PACKET_SW_ENCRYPT,
834
+ WMI_SERVICE_PER_PACKET_SW_ENCRYPT, len);
835
+ SVCMAP(WMI_10_4_SERVICE_REPORT_AIRTIME,
836
+ WMI_SERVICE_REPORT_AIRTIME, len);
837
+ SVCMAP(WMI_10_4_SERVICE_TX_PWR_PER_PEER,
838
+ WMI_SERVICE_TX_PWR_PER_PEER, len);
839
+ SVCMAP(WMI_10_4_SERVICE_RESET_CHIP,
840
+ WMI_SERVICE_RESET_CHIP, len);
841
+ SVCMAP(WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT,
842
+ WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT, len);
843
+ SVCMAP(WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
844
+ WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT, len);
774845 }
775846
776847 #undef SVCMAP
....@@ -877,6 +948,7 @@
877948 u32 vdev_spectral_scan_configure_cmdid;
878949 u32 vdev_spectral_scan_enable_cmdid;
879950 u32 request_stats_cmdid;
951
+ u32 request_peer_stats_info_cmdid;
880952 u32 set_arp_ns_offload_cmdid;
881953 u32 network_list_offload_config_cmdid;
882954 u32 gtk_offload_cmdid;
....@@ -971,6 +1043,8 @@
9711043 u32 pdev_wds_entry_list_cmdid;
9721044 u32 tdls_set_offchan_mode_cmdid;
9731045 u32 radar_found_cmdid;
1046
+ u32 set_bb_timing_cmdid;
1047
+ u32 per_peer_per_tid_config_cmdid;
9741048 };
9751049
9761050 /*
....@@ -1586,6 +1660,8 @@
15861660 WMI_10_2_SET_LTEU_CONFIG_CMDID,
15871661 WMI_10_2_SET_CCA_PARAMS,
15881662 WMI_10_2_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
1663
+ WMI_10_2_FWTEST_CMDID,
1664
+ WMI_10_2_PDEV_SET_BB_TIMING_CONFIG_CMDID,
15891665 WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
15901666 };
15911667
....@@ -1810,6 +1886,8 @@
18101886 WMI_10_4_PDEV_SET_BRIDGE_MACADDR_CMDID,
18111887 WMI_10_4_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
18121888 WMI_10_4_RADAR_FOUND_CMDID,
1889
+ WMI_10_4_PEER_CFR_CAPTURE_CMDID,
1890
+ WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID,
18131891 WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
18141892 };
18151893
....@@ -1955,7 +2033,7 @@
19552033 /* no default handler to allow compiler to check that the
19562034 * enum is fully handled
19572035 */
1958
- };
2036
+ }
19592037
19602038 return "<unknown>";
19612039 }
....@@ -2031,7 +2109,8 @@
20312109
20322110 /* Indicate reason for channel switch */
20332111 #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
2034
-
2112
+/* DFS required on channel for 2nd segment of VHT160 and VHT80+80*/
2113
+#define WMI_CHAN_FLAG_DFS_CFREQ2 (1 << 15)
20352114 #define WMI_MAX_SPATIAL_STREAM 3 /* default max ss */
20362115
20372116 /* HT Capabilities*/
....@@ -2047,6 +2126,8 @@
20472126 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
20482127 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
20492128 #define WMI_HT_CAP_HT40_SGI 0x0800
2129
+#define WMI_HT_CAP_RX_LDPC 0x1000 /* LDPC RX support */
2130
+#define WMI_HT_CAP_TX_LDPC 0x2000 /* LDPC TX support */
20502131
20512132 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
20522133 WMI_HT_CAP_HT20_SGI | \
....@@ -2225,7 +2306,7 @@
22252306 * where FW can access this memory directly (or) by DMA.
22262307 */
22272308 __le32 num_mem_reqs;
2228
- struct wlan_host_mem_req mem_reqs[0];
2309
+ struct wlan_host_mem_req mem_reqs[];
22292310 } __packed;
22302311
22312312 /* This is the definition from 10.X firmware branch */
....@@ -2264,7 +2345,7 @@
22642345 */
22652346 __le32 num_mem_reqs;
22662347
2267
- struct wlan_host_mem_req mem_reqs[0];
2348
+ struct wlan_host_mem_req mem_reqs[];
22682349 } __packed;
22692350
22702351 #define WMI_SERVICE_READY_TIMEOUT_HZ (5 * HZ)
....@@ -2927,6 +3008,7 @@
29273008 * @WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE: TDLS connection tracker in host
29283009 * enable/disable
29293010 * @WMI_10_4_TDLS_EXPLICIT_MODE_ONLY:Explicit TDLS mode enable/disable
3011
+ * @WMI_10_4_TX_DATA_ACK_RSSI: Enable DATA ACK RSSI if firmware is capable
29303012 */
29313013 enum wmi_10_4_feature_mask {
29323014 WMI_10_4_LTEU_SUPPORT = BIT(0),
....@@ -2942,6 +3024,9 @@
29423024 WMI_10_4_TDLS_UAPSD_SLEEP_STA = BIT(10),
29433025 WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE = BIT(11),
29443026 WMI_10_4_TDLS_EXPLICIT_MODE_ONLY = BIT(12),
3027
+ WMI_10_4_TX_DATA_ACK_RSSI = BIT(16),
3028
+ WMI_10_4_EXT_PEER_TID_CONFIGS_SUPPORT = BIT(17),
3029
+ WMI_10_4_REPORT_AIRTIME = BIT(18),
29453030
29463031 };
29473032
....@@ -3015,19 +3100,19 @@
30153100 struct wmi_chan_list {
30163101 __le32 tag; /* WMI_CHAN_LIST_TAG */
30173102 __le32 num_chan;
3018
- struct wmi_chan_list_entry channel_list[0];
3103
+ struct wmi_chan_list_entry channel_list[];
30193104 } __packed;
30203105
30213106 struct wmi_bssid_list {
30223107 __le32 tag; /* WMI_BSSID_LIST_TAG */
30233108 __le32 num_bssid;
3024
- struct wmi_mac_addr bssid_list[0];
3109
+ struct wmi_mac_addr bssid_list[];
30253110 } __packed;
30263111
30273112 struct wmi_ie_data {
30283113 __le32 tag; /* WMI_IE_TAG */
30293114 __le32 ie_len;
3030
- u8 ie_data[0];
3115
+ u8 ie_data[];
30313116 } __packed;
30323117
30333118 struct wmi_ssid {
....@@ -3038,7 +3123,7 @@
30383123 struct wmi_ssid_list {
30393124 __le32 tag; /* WMI_SSID_LIST_TAG */
30403125 __le32 num_ssids;
3041
- struct wmi_ssid ssids[0];
3126
+ struct wmi_ssid ssids[];
30423127 } __packed;
30433128
30443129 /* prefix used by scan requestor ids on the host */
....@@ -3240,7 +3325,7 @@
32403325
32413326 struct wmi_scan_chan_list_cmd {
32423327 __le32 num_scan_chans;
3243
- struct wmi_channel chan_info[0];
3328
+ struct wmi_channel chan_info[];
32443329 } __packed;
32453330
32463331 struct wmi_scan_chan_list_arg {
....@@ -3324,12 +3409,12 @@
33243409
33253410 struct wmi_mgmt_rx_event_v1 {
33263411 struct wmi_mgmt_rx_hdr_v1 hdr;
3327
- u8 buf[0];
3412
+ u8 buf[];
33283413 } __packed;
33293414
33303415 struct wmi_mgmt_rx_event_v2 {
33313416 struct wmi_mgmt_rx_hdr_v2 hdr;
3332
- u8 buf[0];
3417
+ u8 buf[];
33333418 } __packed;
33343419
33353420 struct wmi_10_4_mgmt_rx_hdr {
....@@ -3344,7 +3429,7 @@
33443429
33453430 struct wmi_10_4_mgmt_rx_event {
33463431 struct wmi_10_4_mgmt_rx_hdr hdr;
3347
- u8 buf[0];
3432
+ u8 buf[];
33483433 } __packed;
33493434
33503435 struct wmi_mgmt_rx_ext_info {
....@@ -3384,14 +3469,14 @@
33843469 __le32 rssi_chains[4];
33853470 __le16 nf_chains[4];
33863471 __le32 buf_len;
3387
- u8 buf[0];
3472
+ u8 buf[];
33883473 } __packed;
33893474
33903475 struct wmi_phyerr_event {
33913476 __le32 num_phyerrs;
33923477 __le32 tsf_l32;
33933478 __le32 tsf_u32;
3394
- struct wmi_phyerr phyerrs[0];
3479
+ struct wmi_phyerr phyerrs[];
33953480 } __packed;
33963481
33973482 struct wmi_10_4_phyerr_event {
....@@ -3408,7 +3493,7 @@
34083493 __le32 phy_err_mask[2];
34093494 __le32 tsf_timestamp;
34103495 __le32 buf_len;
3411
- u8 buf[0];
3496
+ u8 buf[];
34123497 } __packed;
34133498
34143499 struct wmi_radar_found_info {
....@@ -3521,7 +3606,7 @@
35213606
35223607 struct wmi_mgmt_tx_cmd {
35233608 struct wmi_mgmt_tx_hdr hdr;
3524
- u8 buf[0];
3609
+ u8 buf[];
35253610 } __packed;
35263611
35273612 struct wmi_echo_event {
....@@ -3726,6 +3811,9 @@
37263811 u32 arp_srcaddr;
37273812 u32 arp_dstaddr;
37283813 u32 enable_btcoex;
3814
+ u32 rfkill_config;
3815
+ u32 rfkill_enable;
3816
+ u32 peer_stats_info_enable;
37293817 };
37303818
37313819 #define WMI_PDEV_PARAM_UNSUPPORTED 0
....@@ -4053,6 +4141,10 @@
40534141 __le32 param_value;
40544142 } __packed;
40554143
4144
+struct wmi_pdev_set_base_macaddr_cmd {
4145
+ struct wmi_mac_addr mac_addr;
4146
+} __packed;
4147
+
40564148 /* valid period is 1 ~ 60000ms, unit in millisecond */
40574149 #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
40584150
....@@ -4155,6 +4247,13 @@
41554247 WMI_TPC_PREAM_5GHZ_VHT80,
41564248 WMI_TPC_PREAM_5GHZ_HTCUP,
41574249 };
4250
+
4251
+#define WMI_PEER_PS_STATE_DISABLED 2
4252
+
4253
+struct wmi_peer_sta_ps_state_chg_event {
4254
+ struct wmi_mac_addr peer_macaddr;
4255
+ __le32 peer_ps_state;
4256
+} __packed;
41584257
41594258 struct wmi_pdev_chanlist_update_event {
41604259 /* number of channels */
....@@ -4470,6 +4569,14 @@
44704569 WMI_10_4_STAT_VDEV_EXTD = BIT(4),
44714570 };
44724571
4572
+enum wmi_tlv_stats_id {
4573
+ WMI_TLV_STAT_PEER = BIT(0),
4574
+ WMI_TLV_STAT_AP = BIT(1),
4575
+ WMI_TLV_STAT_PDEV = BIT(2),
4576
+ WMI_TLV_STAT_VDEV = BIT(3),
4577
+ WMI_TLV_STAT_PEER_EXTD = BIT(10),
4578
+};
4579
+
44734580 struct wlan_inst_rssi_args {
44744581 __le16 cfg_retry_count;
44754582 __le16 retry_count;
....@@ -4486,6 +4593,13 @@
44864593 /* Instantaneous RSSI arguments */
44874594 struct wlan_inst_rssi_args inst_rssi_args;
44884595 } __packed;
4596
+
4597
+enum wmi_peer_stats_info_request_type {
4598
+ /* request stats of one specified peer */
4599
+ WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01,
4600
+ /* request stats of all peers belong to specified VDEV */
4601
+ WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02,
4602
+};
44894603
44904604 /* Suspend option */
44914605 enum {
....@@ -4528,7 +4642,7 @@
45284642 * By having a zero sized array, the pointer to data area
45294643 * becomes available without increasing the struct size
45304644 */
4531
- u8 data[0];
4645
+ u8 data[];
45324646 } __packed;
45334647
45344648 struct wmi_10_2_stats_event {
....@@ -4538,7 +4652,7 @@
45384652 __le32 num_vdev_stats;
45394653 __le32 num_peer_stats;
45404654 __le32 num_bcnflt_stats;
4541
- u8 data[0];
4655
+ u8 data[];
45424656 } __packed;
45434657
45444658 /*
....@@ -4892,15 +5006,30 @@
48925006 __le32 key_seq_counter_h;
48935007 } __packed;
48945008
4895
-#define WMI_CIPHER_NONE 0x0 /* clear key */
4896
-#define WMI_CIPHER_WEP 0x1
4897
-#define WMI_CIPHER_TKIP 0x2
4898
-#define WMI_CIPHER_AES_OCB 0x3
4899
-#define WMI_CIPHER_AES_CCM 0x4
4900
-#define WMI_CIPHER_WAPI 0x5
4901
-#define WMI_CIPHER_CKIP 0x6
4902
-#define WMI_CIPHER_AES_CMAC 0x7
4903
-#define WMI_CIPHER_AES_GCM 0x8
5009
+enum wmi_cipher_suites {
5010
+ WMI_CIPHER_NONE,
5011
+ WMI_CIPHER_WEP,
5012
+ WMI_CIPHER_TKIP,
5013
+ WMI_CIPHER_AES_OCB,
5014
+ WMI_CIPHER_AES_CCM,
5015
+ WMI_CIPHER_WAPI,
5016
+ WMI_CIPHER_CKIP,
5017
+ WMI_CIPHER_AES_CMAC,
5018
+ WMI_CIPHER_AES_GCM,
5019
+};
5020
+
5021
+enum wmi_tlv_cipher_suites {
5022
+ WMI_TLV_CIPHER_NONE,
5023
+ WMI_TLV_CIPHER_WEP,
5024
+ WMI_TLV_CIPHER_TKIP,
5025
+ WMI_TLV_CIPHER_AES_OCB,
5026
+ WMI_TLV_CIPHER_AES_CCM,
5027
+ WMI_TLV_CIPHER_WAPI,
5028
+ WMI_TLV_CIPHER_CKIP,
5029
+ WMI_TLV_CIPHER_AES_CMAC,
5030
+ WMI_TLV_CIPHER_ANY,
5031
+ WMI_TLV_CIPHER_AES_GCM,
5032
+};
49045033
49055034 struct wmi_vdev_install_key_cmd {
49065035 __le32 vdev_id;
....@@ -4918,7 +5047,7 @@
49185047 __le32 key_rxmic_len;
49195048
49205049 /* contains key followed by tx mic followed by rx mic */
4921
- u8 key_data[0];
5050
+ u8 key_data[];
49225051 } __packed;
49235052
49245053 struct wmi_vdev_install_key_arg {
....@@ -4961,13 +5090,40 @@
49615090 #define ATH10K_HW_GI(flags) (((flags) >> 5) & 0x1)
49625091 #define ATH10K_HW_RATECODE(rate, nss, preamble) \
49635092 (((preamble) << 6) | ((nss) << 4) | (rate))
5093
+#define ATH10K_HW_AMPDU(flags) ((flags) & 0x1)
5094
+#define ATH10K_HW_BA_FAIL(flags) (((flags) >> 1) & 0x3)
5095
+#define ATH10K_FW_SKIPPED_RATE_CTRL(flags) (((flags) >> 6) & 0x1)
49645096
4965
-#define VHT_MCS_NUM 10
4966
-#define VHT_BW_NUM 4
4967
-#define VHT_NSS_NUM 4
5097
+#define ATH10K_VHT_MCS_NUM 10
5098
+#define ATH10K_BW_NUM 6
5099
+#define ATH10K_NSS_NUM 4
5100
+#define ATH10K_LEGACY_NUM 12
5101
+#define ATH10K_GI_NUM 2
5102
+#define ATH10K_HT_MCS_NUM 32
5103
+#define ATH10K_RATE_TABLE_NUM 320
5104
+#define ATH10K_RATE_INFO_FLAGS_SGI_BIT 2
49685105
49695106 /* Value to disable fixed rate setting */
49705107 #define WMI_FIXED_RATE_NONE (0xff)
5108
+
5109
+struct wmi_peer_param_map {
5110
+ u32 smps_state;
5111
+ u32 ampdu;
5112
+ u32 authorize;
5113
+ u32 chan_width;
5114
+ u32 nss;
5115
+ u32 use_4addr;
5116
+ u32 membership;
5117
+ u32 use_fixed_power;
5118
+ u32 user_pos;
5119
+ u32 crit_proto_hint_enabled;
5120
+ u32 tx_fail_cnt_thr;
5121
+ u32 set_hw_retry_cts2s;
5122
+ u32 ibss_atim_win_len;
5123
+ u32 debug;
5124
+ u32 phymode;
5125
+ u32 dummy_var;
5126
+};
49715127
49725128 struct wmi_vdev_param_map {
49735129 u32 rts_threshold;
....@@ -5038,6 +5194,8 @@
50385194 u32 bw_nss_ratemask;
50395195 u32 inc_tsf;
50405196 u32 dec_tsf;
5197
+ u32 disable_4addr_src_lrn;
5198
+ u32 rtt_responder_role;
50415199 };
50425200
50435201 #define WMI_VDEV_PARAM_UNSUPPORTED 0
....@@ -5377,7 +5535,19 @@
53775535 WMI_10_4_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
53785536 WMI_10_4_VDEV_PARAM_DISABLE_DYN_BW_RTS,
53795537 WMI_10_4_VDEV_PARAM_TSF_DECREMENT,
5538
+ WMI_10_4_VDEV_PARAM_SELFGEN_FIXED_RATE,
5539
+ WMI_10_4_VDEV_PARAM_AMPDU_SUBFRAME_SIZE_PER_AC,
5540
+ WMI_10_4_VDEV_PARAM_NSS_VHT160,
5541
+ WMI_10_4_VDEV_PARAM_NSS_VHT80_80,
5542
+ WMI_10_4_VDEV_PARAM_AMSDU_SUBFRAME_SIZE_PER_AC,
5543
+ WMI_10_4_VDEV_PARAM_DISABLE_CABQ,
5544
+ WMI_10_4_VDEV_PARAM_SIFS_TRIGGER_RATE,
5545
+ WMI_10_4_VDEV_PARAM_TX_POWER,
5546
+ WMI_10_4_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE,
5547
+ WMI_10_4_VDEV_PARAM_DISABLE_4_ADDR_SRC_LRN,
53805548 };
5549
+
5550
+#define WMI_VDEV_DISABLE_4_ADDR_SRC_LRN 1
53815551
53825552 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
53835553 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
....@@ -5547,7 +5717,7 @@
55475717
55485718 struct wmi_bcn_tx_cmd {
55495719 struct wmi_bcn_tx_hdr hdr;
5550
- u8 *bcn[0];
5720
+ u8 *bcn[];
55515721 } __packed;
55525722
55535723 struct wmi_bcn_tx_arg {
....@@ -5964,7 +6134,7 @@
59646134
59656135 struct wmi_host_swba_event {
59666136 __le32 vdev_map;
5967
- struct wmi_bcn_info bcn_info[0];
6137
+ struct wmi_bcn_info bcn_info[];
59686138 } __packed;
59696139
59706140 struct wmi_10_2_4_bcn_info {
....@@ -5974,7 +6144,7 @@
59746144
59756145 struct wmi_10_2_4_host_swba_event {
59766146 __le32 vdev_map;
5977
- struct wmi_10_2_4_bcn_info bcn_info[0];
6147
+ struct wmi_10_2_4_bcn_info bcn_info[];
59786148 } __packed;
59796149
59806150 /* 16 words = 512 client + 1 word = for guard */
....@@ -6015,7 +6185,7 @@
60156185
60166186 struct wmi_10_4_host_swba_event {
60176187 __le32 vdev_map;
6018
- struct wmi_10_4_bcn_info bcn_info[0];
6188
+ struct wmi_10_4_bcn_info bcn_info[];
60196189 } __packed;
60206190
60216191 #define WMI_MAX_AP_VDEV 16
....@@ -6151,6 +6321,8 @@
61516321 WMI_PEER_CHAN_WIDTH = 0x4,
61526322 WMI_PEER_NSS = 0x5,
61536323 WMI_PEER_USE_4ADDR = 0x6,
6324
+ WMI_PEER_USE_FIXED_PWR = 0x8,
6325
+ WMI_PEER_PARAM_FIXED_RATE = 0x9,
61546326 WMI_PEER_DEBUG = 0xa,
61556327 WMI_PEER_PHYMODE = 0xd,
61566328 WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
....@@ -6360,7 +6532,10 @@
63606532 __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
63616533 } __packed;
63626534
6363
-#define PEER_BW_RXNSS_OVERRIDE_OFFSET 31
6535
+/* NSS Mapping to FW */
6536
+#define WMI_PEER_NSS_MAP_ENABLE BIT(31)
6537
+#define WMI_PEER_NSS_160MHZ_MASK GENMASK(2, 0)
6538
+#define WMI_PEER_NSS_80_80MHZ_MASK GENMASK(5, 3)
63646539
63656540 struct wmi_10_4_peer_assoc_complete_cmd {
63666541 struct wmi_10_2_peer_assoc_complete_cmd cmd;
....@@ -6617,12 +6792,35 @@
66176792 __le32 vdev_id;
66186793 };
66196794
6795
+struct mgmt_tx_compl_params {
6796
+ u32 desc_id;
6797
+ u32 status;
6798
+ u32 ppdu_id;
6799
+ int ack_rssi;
6800
+};
6801
+
66206802 struct wmi_tlv_mgmt_tx_compl_ev_arg {
66216803 __le32 desc_id;
66226804 __le32 status;
66236805 __le32 pdev_id;
6806
+ __le32 ppdu_id;
6807
+ __le32 ack_rssi;
66246808 };
66256809
6810
+struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg {
6811
+ __le32 num_reports;
6812
+ const __le32 *desc_ids;
6813
+ const __le32 *status;
6814
+ const __le32 *ppdu_ids;
6815
+ const __le32 *ack_rssi;
6816
+};
6817
+
6818
+struct wmi_peer_delete_resp_ev_arg {
6819
+ __le32 vdev_id;
6820
+ struct wmi_mac_addr peer_addr;
6821
+};
6822
+
6823
+#define WMI_MGMT_RX_NUM_RSSI 4
66266824 struct wmi_mgmt_rx_ev_arg {
66276825 __le32 channel;
66286826 __le32 snr;
....@@ -6631,6 +6829,7 @@
66316829 __le32 buf_len;
66326830 __le32 status; /* %WMI_RX_STATUS_ */
66336831 struct wmi_mgmt_rx_ext_info ext_info;
6832
+ __le32 rssi[WMI_MGMT_RX_NUM_RSSI];
66346833 };
66356834
66366835 struct wmi_ch_info_ev_arg {
....@@ -6643,6 +6842,10 @@
66436842 __le32 chan_tx_pwr_range;
66446843 __le32 chan_tx_pwr_tp;
66456844 __le32 rx_frame_count;
6845
+ __le32 my_bss_rx_cycle_count;
6846
+ __le32 rx_11b_mode_data_duration;
6847
+ __le32 tx_frame_cnt;
6848
+ __le32 mac_clk_mhz;
66466849 };
66476850
66486851 /* From 10.4 firmware, not sure all have the same values. */
....@@ -6698,6 +6901,7 @@
66986901 __le32 max_tx_power;
66996902 __le32 ht_cap;
67006903 __le32 vht_cap;
6904
+ __le32 vht_supp_mcs;
67016905 __le32 sw_ver0;
67026906 __le32 sw_ver1;
67036907 __le32 fw_build;
....@@ -6705,8 +6909,11 @@
67056909 __le32 num_rf_chains;
67066910 __le32 eeprom_rd;
67076911 __le32 num_mem_reqs;
6912
+ __le32 low_2ghz_chan;
6913
+ __le32 high_2ghz_chan;
67086914 __le32 low_5ghz_chan;
67096915 __le32 high_5ghz_chan;
6916
+ __le32 sys_cap_info;
67106917 const __le32 *service_map;
67116918 size_t service_map_len;
67126919 const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
....@@ -7028,6 +7235,71 @@
70287235 __le32 vdev_id;
70297236 } __packed;
70307237
7238
+enum wmi_tid_aggr_control_conf {
7239
+ WMI_TID_CONFIG_AGGR_CONTROL_IGNORE,
7240
+ WMI_TID_CONFIG_AGGR_CONTROL_ENABLE,
7241
+ WMI_TID_CONFIG_AGGR_CONTROL_DISABLE,
7242
+};
7243
+
7244
+enum wmi_noack_tid_conf {
7245
+ WMI_NOACK_TID_CONFIG_IGNORE_ACK_POLICY,
7246
+ WMI_PEER_TID_CONFIG_ACK,
7247
+ WMI_PEER_TID_CONFIG_NOACK,
7248
+};
7249
+
7250
+enum wmi_tid_rate_ctrl_conf {
7251
+ WMI_TID_CONFIG_RATE_CONTROL_IGNORE,
7252
+ WMI_TID_CONFIG_RATE_CONTROL_AUTO,
7253
+ WMI_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
7254
+ WMI_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
7255
+ WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
7256
+};
7257
+
7258
+enum wmi_tid_rtscts_control_conf {
7259
+ WMI_TID_CONFIG_RTSCTS_CONTROL_ENABLE,
7260
+ WMI_TID_CONFIG_RTSCTS_CONTROL_DISABLE,
7261
+};
7262
+
7263
+enum wmi_ext_tid_config_map {
7264
+ WMI_EXT_TID_RTS_CTS_CONFIG = BIT(0),
7265
+};
7266
+
7267
+struct wmi_per_peer_per_tid_cfg_arg {
7268
+ u32 vdev_id;
7269
+ struct wmi_mac_addr peer_macaddr;
7270
+ u32 tid;
7271
+ enum wmi_noack_tid_conf ack_policy;
7272
+ enum wmi_tid_aggr_control_conf aggr_control;
7273
+ u8 rate_ctrl;
7274
+ u32 retry_count;
7275
+ u32 rcode_flags;
7276
+ u32 ext_tid_cfg_bitmap;
7277
+ u32 rtscts_ctrl;
7278
+};
7279
+
7280
+struct wmi_peer_per_tid_cfg_cmd {
7281
+ __le32 vdev_id;
7282
+ struct wmi_mac_addr peer_macaddr;
7283
+ __le32 tid;
7284
+
7285
+ /* see enum wmi_noack_tid_conf */
7286
+ __le32 ack_policy;
7287
+
7288
+ /* see enum wmi_tid_aggr_control_conf */
7289
+ __le32 aggr_control;
7290
+
7291
+ /* see enum wmi_tid_rate_ctrl_conf */
7292
+ __le32 rate_control;
7293
+ __le32 rcode_flags;
7294
+ __le32 retry_count;
7295
+
7296
+ /* See enum wmi_ext_tid_config_map */
7297
+ __le32 ext_tid_cfg_bitmap;
7298
+
7299
+ /* see enum wmi_tid_rtscts_control_conf */
7300
+ __le32 rtscts_ctrl;
7301
+} __packed;
7302
+
70317303 enum wmi_txbf_conf {
70327304 WMI_TXBF_CONF_UNSUPPORTED,
70337305 WMI_TXBF_CONF_BEFORE_ASSOC,
....@@ -7043,6 +7315,63 @@
70437315 __le32 cca_detect_margin;
70447316 } __packed;
70457317
7318
+#define WMI_PNO_MAX_SCHED_SCAN_PLANS 2
7319
+#define WMI_PNO_MAX_SCHED_SCAN_PLAN_INT 7200
7320
+#define WMI_PNO_MAX_SCHED_SCAN_PLAN_ITRNS 100
7321
+#define WMI_PNO_MAX_NETW_CHANNELS 26
7322
+#define WMI_PNO_MAX_NETW_CHANNELS_EX 60
7323
+#define WMI_PNO_MAX_SUPP_NETWORKS WLAN_SCAN_PARAMS_MAX_SSID
7324
+#define WMI_PNO_MAX_IE_LENGTH WLAN_SCAN_PARAMS_MAX_IE_LEN
7325
+
7326
+/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
7327
+#define WMI_PNO_MAX_PB_REQ_SIZE 450
7328
+
7329
+#define WMI_PNO_24G_DEFAULT_CH 1
7330
+#define WMI_PNO_5G_DEFAULT_CH 36
7331
+
7332
+#define WMI_ACTIVE_MAX_CHANNEL_TIME 40
7333
+#define WMI_PASSIVE_MAX_CHANNEL_TIME 110
7334
+
7335
+/* SSID broadcast type */
7336
+enum wmi_SSID_bcast_type {
7337
+ BCAST_UNKNOWN = 0,
7338
+ BCAST_NORMAL = 1,
7339
+ BCAST_HIDDEN = 2,
7340
+};
7341
+
7342
+struct wmi_network_type {
7343
+ struct wmi_ssid ssid;
7344
+ u32 authentication;
7345
+ u32 encryption;
7346
+ u32 bcast_nw_type;
7347
+ u8 channel_count;
7348
+ u16 channels[WMI_PNO_MAX_NETW_CHANNELS_EX];
7349
+ s32 rssi_threshold;
7350
+} __packed;
7351
+
7352
+struct wmi_pno_scan_req {
7353
+ u8 enable;
7354
+ u8 vdev_id;
7355
+ u8 uc_networks_count;
7356
+ struct wmi_network_type a_networks[WMI_PNO_MAX_SUPP_NETWORKS];
7357
+ u32 fast_scan_period;
7358
+ u32 slow_scan_period;
7359
+ u8 fast_scan_max_cycles;
7360
+
7361
+ bool do_passive_scan;
7362
+
7363
+ u32 delay_start_time;
7364
+ u32 active_min_time;
7365
+ u32 active_max_time;
7366
+ u32 passive_min_time;
7367
+ u32 passive_max_time;
7368
+
7369
+ /* mac address randomization attributes */
7370
+ u32 enable_pno_scan_randomization;
7371
+ u8 mac_addr[ETH_ALEN];
7372
+ u8 mac_addr_mask[ETH_ALEN];
7373
+} __packed;
7374
+
70467375 enum wmi_host_platform_type {
70477376 WMI_HOST_PLATFORM_HIGH_PERF,
70487377 WMI_HOST_PLATFORM_LOW_PERF,
....@@ -7056,6 +7385,23 @@
70567385 struct wmi_pdev_chan_info_req_cmd {
70577386 __le32 type;
70587387 __le32 reserved;
7388
+} __packed;
7389
+
7390
+/* bb timing register configurations */
7391
+struct wmi_bb_timing_cfg_arg {
7392
+ /* Tx_end to pa off timing */
7393
+ u32 bb_tx_timing;
7394
+
7395
+ /* Tx_end to external pa off timing */
7396
+ u32 bb_xpa_timing;
7397
+};
7398
+
7399
+struct wmi_pdev_bb_timing_cfg_cmd {
7400
+ /* Tx_end to pa off timing */
7401
+ __le32 bb_tx_timing;
7402
+
7403
+ /* Tx_end to external pa off timing */
7404
+ __le32 bb_xpa_timing;
70597405 } __packed;
70607406
70617407 struct ath10k;
....@@ -7095,13 +7441,14 @@
70957441 const struct wmi_start_scan_arg *arg);
70967442 void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
70977443 const struct wmi_wmm_params_arg *arg);
7098
-void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
7444
+void ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
70997445 const struct wmi_channel_arg *arg);
71007446 int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
71017447
71027448 int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
71037449 int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
71047450 int ath10k_wmi_event_mgmt_tx_compl(struct ath10k *ar, struct sk_buff *skb);
7451
+int ath10k_wmi_event_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb);
71057452 void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
71067453 void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
71077454 int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);