| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: ISC */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2005-2011 Atheros Communications Inc. |
|---|
| 3 | 4 | * 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. |
|---|
| 17 | 6 | */ |
|---|
| 18 | 7 | |
|---|
| 19 | 8 | #ifndef _WMI_H_ |
|---|
| 20 | 9 | #define _WMI_H_ |
|---|
| 21 | 10 | |
|---|
| 22 | 11 | #include <linux/types.h> |
|---|
| 23 | | -#include <net/mac80211.h> |
|---|
| 12 | +#include <linux/ieee80211.h> |
|---|
| 24 | 13 | |
|---|
| 25 | 14 | /* |
|---|
| 26 | 15 | * This file specifies the WMI interface for the Unified Software |
|---|
| .. | .. |
|---|
| 203 | 192 | WMI_SERVICE_TPC_STATS_FINAL, |
|---|
| 204 | 193 | WMI_SERVICE_RESET_CHIP, |
|---|
| 205 | 194 | 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()! */ |
|---|
| 206 | 210 | |
|---|
| 207 | 211 | /* keep last */ |
|---|
| 208 | 212 | WMI_SERVICE_MAX, |
|---|
| .. | .. |
|---|
| 242 | 246 | WMI_10X_SERVICE_PEER_STATS, |
|---|
| 243 | 247 | WMI_10X_SERVICE_RESET_CHIP, |
|---|
| 244 | 248 | 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, |
|---|
| 245 | 252 | }; |
|---|
| 246 | 253 | |
|---|
| 247 | 254 | enum wmi_main_service { |
|---|
| .. | .. |
|---|
| 350 | 357 | WMI_10_4_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, |
|---|
| 351 | 358 | WMI_10_4_SERVICE_HOST_DFS_CHECK_SUPPORT, |
|---|
| 352 | 359 | 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, |
|---|
| 353 | 381 | }; |
|---|
| 354 | 382 | |
|---|
| 355 | | -static inline char *wmi_service_name(int service_id) |
|---|
| 383 | +static inline char *wmi_service_name(enum wmi_service service_id) |
|---|
| 356 | 384 | { |
|---|
| 357 | 385 | #define SVCSTR(x) case x: return #x |
|---|
| 358 | 386 | |
|---|
| .. | .. |
|---|
| 449 | 477 | SVCSTR(WMI_SERVICE_TX_MODE_PUSH_PULL); |
|---|
| 450 | 478 | SVCSTR(WMI_SERVICE_TX_MODE_DYNAMIC); |
|---|
| 451 | 479 | SVCSTR(WMI_SERVICE_VDEV_RX_FILTER); |
|---|
| 480 | + SVCSTR(WMI_SERVICE_BTCOEX); |
|---|
| 452 | 481 | SVCSTR(WMI_SERVICE_CHECK_CAL_VERSION); |
|---|
| 453 | 482 | SVCSTR(WMI_SERVICE_DBGLOG_WARN2); |
|---|
| 454 | 483 | SVCSTR(WMI_SERVICE_BTCOEX_DUTY_CYCLE); |
|---|
| .. | .. |
|---|
| 458 | 487 | SVCSTR(WMI_SERVICE_SMART_LOGGING_SUPPORT); |
|---|
| 459 | 488 | SVCSTR(WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE); |
|---|
| 460 | 489 | SVCSTR(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY); |
|---|
| 490 | + SVCSTR(WMI_SERVICE_MGMT_TX_WMI); |
|---|
| 461 | 491 | SVCSTR(WMI_SERVICE_TDLS_WIDER_BANDWIDTH); |
|---|
| 462 | 492 | SVCSTR(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS); |
|---|
| 463 | 493 | SVCSTR(WMI_SERVICE_HOST_DFS_CHECK_SUPPORT); |
|---|
| 464 | 494 | SVCSTR(WMI_SERVICE_TPC_STATS_FINAL); |
|---|
| 465 | 495 | 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: |
|---|
| 467 | 512 | return NULL; |
|---|
| 468 | 513 | } |
|---|
| 469 | 514 | |
|---|
| 470 | 515 | #undef SVCSTR |
|---|
| 516 | + |
|---|
| 517 | + return NULL; |
|---|
| 471 | 518 | } |
|---|
| 472 | 519 | |
|---|
| 473 | 520 | #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \ |
|---|
| .. | .. |
|---|
| 557 | 604 | WMI_SERVICE_RESET_CHIP, len); |
|---|
| 558 | 605 | SVCMAP(WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, |
|---|
| 559 | 606 | 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); |
|---|
| 560 | 611 | } |
|---|
| 561 | 612 | |
|---|
| 562 | 613 | static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out, |
|---|
| .. | .. |
|---|
| 771 | 822 | WMI_SERVICE_HOST_DFS_CHECK_SUPPORT, len); |
|---|
| 772 | 823 | SVCMAP(WMI_10_4_SERVICE_TPC_STATS_FINAL, |
|---|
| 773 | 824 | 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); |
|---|
| 774 | 845 | } |
|---|
| 775 | 846 | |
|---|
| 776 | 847 | #undef SVCMAP |
|---|
| .. | .. |
|---|
| 877 | 948 | u32 vdev_spectral_scan_configure_cmdid; |
|---|
| 878 | 949 | u32 vdev_spectral_scan_enable_cmdid; |
|---|
| 879 | 950 | u32 request_stats_cmdid; |
|---|
| 951 | + u32 request_peer_stats_info_cmdid; |
|---|
| 880 | 952 | u32 set_arp_ns_offload_cmdid; |
|---|
| 881 | 953 | u32 network_list_offload_config_cmdid; |
|---|
| 882 | 954 | u32 gtk_offload_cmdid; |
|---|
| .. | .. |
|---|
| 971 | 1043 | u32 pdev_wds_entry_list_cmdid; |
|---|
| 972 | 1044 | u32 tdls_set_offchan_mode_cmdid; |
|---|
| 973 | 1045 | u32 radar_found_cmdid; |
|---|
| 1046 | + u32 set_bb_timing_cmdid; |
|---|
| 1047 | + u32 per_peer_per_tid_config_cmdid; |
|---|
| 974 | 1048 | }; |
|---|
| 975 | 1049 | |
|---|
| 976 | 1050 | /* |
|---|
| .. | .. |
|---|
| 1586 | 1660 | WMI_10_2_SET_LTEU_CONFIG_CMDID, |
|---|
| 1587 | 1661 | WMI_10_2_SET_CCA_PARAMS, |
|---|
| 1588 | 1662 | 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, |
|---|
| 1589 | 1665 | WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1, |
|---|
| 1590 | 1666 | }; |
|---|
| 1591 | 1667 | |
|---|
| .. | .. |
|---|
| 1810 | 1886 | WMI_10_4_PDEV_SET_BRIDGE_MACADDR_CMDID, |
|---|
| 1811 | 1887 | WMI_10_4_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID, |
|---|
| 1812 | 1888 | WMI_10_4_RADAR_FOUND_CMDID, |
|---|
| 1889 | + WMI_10_4_PEER_CFR_CAPTURE_CMDID, |
|---|
| 1890 | + WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID, |
|---|
| 1813 | 1891 | WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1, |
|---|
| 1814 | 1892 | }; |
|---|
| 1815 | 1893 | |
|---|
| .. | .. |
|---|
| 1955 | 2033 | /* no default handler to allow compiler to check that the |
|---|
| 1956 | 2034 | * enum is fully handled |
|---|
| 1957 | 2035 | */ |
|---|
| 1958 | | - }; |
|---|
| 2036 | + } |
|---|
| 1959 | 2037 | |
|---|
| 1960 | 2038 | return "<unknown>"; |
|---|
| 1961 | 2039 | } |
|---|
| .. | .. |
|---|
| 2031 | 2109 | |
|---|
| 2032 | 2110 | /* Indicate reason for channel switch */ |
|---|
| 2033 | 2111 | #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) |
|---|
| 2035 | 2114 | #define WMI_MAX_SPATIAL_STREAM 3 /* default max ss */ |
|---|
| 2036 | 2115 | |
|---|
| 2037 | 2116 | /* HT Capabilities*/ |
|---|
| .. | .. |
|---|
| 2047 | 2126 | #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */ |
|---|
| 2048 | 2127 | #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8 |
|---|
| 2049 | 2128 | #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 */ |
|---|
| 2050 | 2131 | |
|---|
| 2051 | 2132 | #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \ |
|---|
| 2052 | 2133 | WMI_HT_CAP_HT20_SGI | \ |
|---|
| .. | .. |
|---|
| 2225 | 2306 | * where FW can access this memory directly (or) by DMA. |
|---|
| 2226 | 2307 | */ |
|---|
| 2227 | 2308 | __le32 num_mem_reqs; |
|---|
| 2228 | | - struct wlan_host_mem_req mem_reqs[0]; |
|---|
| 2309 | + struct wlan_host_mem_req mem_reqs[]; |
|---|
| 2229 | 2310 | } __packed; |
|---|
| 2230 | 2311 | |
|---|
| 2231 | 2312 | /* This is the definition from 10.X firmware branch */ |
|---|
| .. | .. |
|---|
| 2264 | 2345 | */ |
|---|
| 2265 | 2346 | __le32 num_mem_reqs; |
|---|
| 2266 | 2347 | |
|---|
| 2267 | | - struct wlan_host_mem_req mem_reqs[0]; |
|---|
| 2348 | + struct wlan_host_mem_req mem_reqs[]; |
|---|
| 2268 | 2349 | } __packed; |
|---|
| 2269 | 2350 | |
|---|
| 2270 | 2351 | #define WMI_SERVICE_READY_TIMEOUT_HZ (5 * HZ) |
|---|
| .. | .. |
|---|
| 2927 | 3008 | * @WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE: TDLS connection tracker in host |
|---|
| 2928 | 3009 | * enable/disable |
|---|
| 2929 | 3010 | * @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 |
|---|
| 2930 | 3012 | */ |
|---|
| 2931 | 3013 | enum wmi_10_4_feature_mask { |
|---|
| 2932 | 3014 | WMI_10_4_LTEU_SUPPORT = BIT(0), |
|---|
| .. | .. |
|---|
| 2942 | 3024 | WMI_10_4_TDLS_UAPSD_SLEEP_STA = BIT(10), |
|---|
| 2943 | 3025 | WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE = BIT(11), |
|---|
| 2944 | 3026 | 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), |
|---|
| 2945 | 3030 | |
|---|
| 2946 | 3031 | }; |
|---|
| 2947 | 3032 | |
|---|
| .. | .. |
|---|
| 3015 | 3100 | struct wmi_chan_list { |
|---|
| 3016 | 3101 | __le32 tag; /* WMI_CHAN_LIST_TAG */ |
|---|
| 3017 | 3102 | __le32 num_chan; |
|---|
| 3018 | | - struct wmi_chan_list_entry channel_list[0]; |
|---|
| 3103 | + struct wmi_chan_list_entry channel_list[]; |
|---|
| 3019 | 3104 | } __packed; |
|---|
| 3020 | 3105 | |
|---|
| 3021 | 3106 | struct wmi_bssid_list { |
|---|
| 3022 | 3107 | __le32 tag; /* WMI_BSSID_LIST_TAG */ |
|---|
| 3023 | 3108 | __le32 num_bssid; |
|---|
| 3024 | | - struct wmi_mac_addr bssid_list[0]; |
|---|
| 3109 | + struct wmi_mac_addr bssid_list[]; |
|---|
| 3025 | 3110 | } __packed; |
|---|
| 3026 | 3111 | |
|---|
| 3027 | 3112 | struct wmi_ie_data { |
|---|
| 3028 | 3113 | __le32 tag; /* WMI_IE_TAG */ |
|---|
| 3029 | 3114 | __le32 ie_len; |
|---|
| 3030 | | - u8 ie_data[0]; |
|---|
| 3115 | + u8 ie_data[]; |
|---|
| 3031 | 3116 | } __packed; |
|---|
| 3032 | 3117 | |
|---|
| 3033 | 3118 | struct wmi_ssid { |
|---|
| .. | .. |
|---|
| 3038 | 3123 | struct wmi_ssid_list { |
|---|
| 3039 | 3124 | __le32 tag; /* WMI_SSID_LIST_TAG */ |
|---|
| 3040 | 3125 | __le32 num_ssids; |
|---|
| 3041 | | - struct wmi_ssid ssids[0]; |
|---|
| 3126 | + struct wmi_ssid ssids[]; |
|---|
| 3042 | 3127 | } __packed; |
|---|
| 3043 | 3128 | |
|---|
| 3044 | 3129 | /* prefix used by scan requestor ids on the host */ |
|---|
| .. | .. |
|---|
| 3240 | 3325 | |
|---|
| 3241 | 3326 | struct wmi_scan_chan_list_cmd { |
|---|
| 3242 | 3327 | __le32 num_scan_chans; |
|---|
| 3243 | | - struct wmi_channel chan_info[0]; |
|---|
| 3328 | + struct wmi_channel chan_info[]; |
|---|
| 3244 | 3329 | } __packed; |
|---|
| 3245 | 3330 | |
|---|
| 3246 | 3331 | struct wmi_scan_chan_list_arg { |
|---|
| .. | .. |
|---|
| 3324 | 3409 | |
|---|
| 3325 | 3410 | struct wmi_mgmt_rx_event_v1 { |
|---|
| 3326 | 3411 | struct wmi_mgmt_rx_hdr_v1 hdr; |
|---|
| 3327 | | - u8 buf[0]; |
|---|
| 3412 | + u8 buf[]; |
|---|
| 3328 | 3413 | } __packed; |
|---|
| 3329 | 3414 | |
|---|
| 3330 | 3415 | struct wmi_mgmt_rx_event_v2 { |
|---|
| 3331 | 3416 | struct wmi_mgmt_rx_hdr_v2 hdr; |
|---|
| 3332 | | - u8 buf[0]; |
|---|
| 3417 | + u8 buf[]; |
|---|
| 3333 | 3418 | } __packed; |
|---|
| 3334 | 3419 | |
|---|
| 3335 | 3420 | struct wmi_10_4_mgmt_rx_hdr { |
|---|
| .. | .. |
|---|
| 3344 | 3429 | |
|---|
| 3345 | 3430 | struct wmi_10_4_mgmt_rx_event { |
|---|
| 3346 | 3431 | struct wmi_10_4_mgmt_rx_hdr hdr; |
|---|
| 3347 | | - u8 buf[0]; |
|---|
| 3432 | + u8 buf[]; |
|---|
| 3348 | 3433 | } __packed; |
|---|
| 3349 | 3434 | |
|---|
| 3350 | 3435 | struct wmi_mgmt_rx_ext_info { |
|---|
| .. | .. |
|---|
| 3384 | 3469 | __le32 rssi_chains[4]; |
|---|
| 3385 | 3470 | __le16 nf_chains[4]; |
|---|
| 3386 | 3471 | __le32 buf_len; |
|---|
| 3387 | | - u8 buf[0]; |
|---|
| 3472 | + u8 buf[]; |
|---|
| 3388 | 3473 | } __packed; |
|---|
| 3389 | 3474 | |
|---|
| 3390 | 3475 | struct wmi_phyerr_event { |
|---|
| 3391 | 3476 | __le32 num_phyerrs; |
|---|
| 3392 | 3477 | __le32 tsf_l32; |
|---|
| 3393 | 3478 | __le32 tsf_u32; |
|---|
| 3394 | | - struct wmi_phyerr phyerrs[0]; |
|---|
| 3479 | + struct wmi_phyerr phyerrs[]; |
|---|
| 3395 | 3480 | } __packed; |
|---|
| 3396 | 3481 | |
|---|
| 3397 | 3482 | struct wmi_10_4_phyerr_event { |
|---|
| .. | .. |
|---|
| 3408 | 3493 | __le32 phy_err_mask[2]; |
|---|
| 3409 | 3494 | __le32 tsf_timestamp; |
|---|
| 3410 | 3495 | __le32 buf_len; |
|---|
| 3411 | | - u8 buf[0]; |
|---|
| 3496 | + u8 buf[]; |
|---|
| 3412 | 3497 | } __packed; |
|---|
| 3413 | 3498 | |
|---|
| 3414 | 3499 | struct wmi_radar_found_info { |
|---|
| .. | .. |
|---|
| 3521 | 3606 | |
|---|
| 3522 | 3607 | struct wmi_mgmt_tx_cmd { |
|---|
| 3523 | 3608 | struct wmi_mgmt_tx_hdr hdr; |
|---|
| 3524 | | - u8 buf[0]; |
|---|
| 3609 | + u8 buf[]; |
|---|
| 3525 | 3610 | } __packed; |
|---|
| 3526 | 3611 | |
|---|
| 3527 | 3612 | struct wmi_echo_event { |
|---|
| .. | .. |
|---|
| 3726 | 3811 | u32 arp_srcaddr; |
|---|
| 3727 | 3812 | u32 arp_dstaddr; |
|---|
| 3728 | 3813 | u32 enable_btcoex; |
|---|
| 3814 | + u32 rfkill_config; |
|---|
| 3815 | + u32 rfkill_enable; |
|---|
| 3816 | + u32 peer_stats_info_enable; |
|---|
| 3729 | 3817 | }; |
|---|
| 3730 | 3818 | |
|---|
| 3731 | 3819 | #define WMI_PDEV_PARAM_UNSUPPORTED 0 |
|---|
| .. | .. |
|---|
| 4053 | 4141 | __le32 param_value; |
|---|
| 4054 | 4142 | } __packed; |
|---|
| 4055 | 4143 | |
|---|
| 4144 | +struct wmi_pdev_set_base_macaddr_cmd { |
|---|
| 4145 | + struct wmi_mac_addr mac_addr; |
|---|
| 4146 | +} __packed; |
|---|
| 4147 | + |
|---|
| 4056 | 4148 | /* valid period is 1 ~ 60000ms, unit in millisecond */ |
|---|
| 4057 | 4149 | #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000 |
|---|
| 4058 | 4150 | |
|---|
| .. | .. |
|---|
| 4155 | 4247 | WMI_TPC_PREAM_5GHZ_VHT80, |
|---|
| 4156 | 4248 | WMI_TPC_PREAM_5GHZ_HTCUP, |
|---|
| 4157 | 4249 | }; |
|---|
| 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; |
|---|
| 4158 | 4257 | |
|---|
| 4159 | 4258 | struct wmi_pdev_chanlist_update_event { |
|---|
| 4160 | 4259 | /* number of channels */ |
|---|
| .. | .. |
|---|
| 4470 | 4569 | WMI_10_4_STAT_VDEV_EXTD = BIT(4), |
|---|
| 4471 | 4570 | }; |
|---|
| 4472 | 4571 | |
|---|
| 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 | + |
|---|
| 4473 | 4580 | struct wlan_inst_rssi_args { |
|---|
| 4474 | 4581 | __le16 cfg_retry_count; |
|---|
| 4475 | 4582 | __le16 retry_count; |
|---|
| .. | .. |
|---|
| 4486 | 4593 | /* Instantaneous RSSI arguments */ |
|---|
| 4487 | 4594 | struct wlan_inst_rssi_args inst_rssi_args; |
|---|
| 4488 | 4595 | } __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 | +}; |
|---|
| 4489 | 4603 | |
|---|
| 4490 | 4604 | /* Suspend option */ |
|---|
| 4491 | 4605 | enum { |
|---|
| .. | .. |
|---|
| 4528 | 4642 | * By having a zero sized array, the pointer to data area |
|---|
| 4529 | 4643 | * becomes available without increasing the struct size |
|---|
| 4530 | 4644 | */ |
|---|
| 4531 | | - u8 data[0]; |
|---|
| 4645 | + u8 data[]; |
|---|
| 4532 | 4646 | } __packed; |
|---|
| 4533 | 4647 | |
|---|
| 4534 | 4648 | struct wmi_10_2_stats_event { |
|---|
| .. | .. |
|---|
| 4538 | 4652 | __le32 num_vdev_stats; |
|---|
| 4539 | 4653 | __le32 num_peer_stats; |
|---|
| 4540 | 4654 | __le32 num_bcnflt_stats; |
|---|
| 4541 | | - u8 data[0]; |
|---|
| 4655 | + u8 data[]; |
|---|
| 4542 | 4656 | } __packed; |
|---|
| 4543 | 4657 | |
|---|
| 4544 | 4658 | /* |
|---|
| .. | .. |
|---|
| 4892 | 5006 | __le32 key_seq_counter_h; |
|---|
| 4893 | 5007 | } __packed; |
|---|
| 4894 | 5008 | |
|---|
| 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 | +}; |
|---|
| 4904 | 5033 | |
|---|
| 4905 | 5034 | struct wmi_vdev_install_key_cmd { |
|---|
| 4906 | 5035 | __le32 vdev_id; |
|---|
| .. | .. |
|---|
| 4918 | 5047 | __le32 key_rxmic_len; |
|---|
| 4919 | 5048 | |
|---|
| 4920 | 5049 | /* contains key followed by tx mic followed by rx mic */ |
|---|
| 4921 | | - u8 key_data[0]; |
|---|
| 5050 | + u8 key_data[]; |
|---|
| 4922 | 5051 | } __packed; |
|---|
| 4923 | 5052 | |
|---|
| 4924 | 5053 | struct wmi_vdev_install_key_arg { |
|---|
| .. | .. |
|---|
| 4961 | 5090 | #define ATH10K_HW_GI(flags) (((flags) >> 5) & 0x1) |
|---|
| 4962 | 5091 | #define ATH10K_HW_RATECODE(rate, nss, preamble) \ |
|---|
| 4963 | 5092 | (((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) |
|---|
| 4964 | 5096 | |
|---|
| 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 |
|---|
| 4968 | 5105 | |
|---|
| 4969 | 5106 | /* Value to disable fixed rate setting */ |
|---|
| 4970 | 5107 | #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 | +}; |
|---|
| 4971 | 5127 | |
|---|
| 4972 | 5128 | struct wmi_vdev_param_map { |
|---|
| 4973 | 5129 | u32 rts_threshold; |
|---|
| .. | .. |
|---|
| 5038 | 5194 | u32 bw_nss_ratemask; |
|---|
| 5039 | 5195 | u32 inc_tsf; |
|---|
| 5040 | 5196 | u32 dec_tsf; |
|---|
| 5197 | + u32 disable_4addr_src_lrn; |
|---|
| 5198 | + u32 rtt_responder_role; |
|---|
| 5041 | 5199 | }; |
|---|
| 5042 | 5200 | |
|---|
| 5043 | 5201 | #define WMI_VDEV_PARAM_UNSUPPORTED 0 |
|---|
| .. | .. |
|---|
| 5377 | 5535 | WMI_10_4_VDEV_PARAM_ATF_SSID_SCHED_POLICY, |
|---|
| 5378 | 5536 | WMI_10_4_VDEV_PARAM_DISABLE_DYN_BW_RTS, |
|---|
| 5379 | 5537 | 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, |
|---|
| 5380 | 5548 | }; |
|---|
| 5549 | + |
|---|
| 5550 | +#define WMI_VDEV_DISABLE_4_ADDR_SRC_LRN 1 |
|---|
| 5381 | 5551 | |
|---|
| 5382 | 5552 | #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0) |
|---|
| 5383 | 5553 | #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1) |
|---|
| .. | .. |
|---|
| 5547 | 5717 | |
|---|
| 5548 | 5718 | struct wmi_bcn_tx_cmd { |
|---|
| 5549 | 5719 | struct wmi_bcn_tx_hdr hdr; |
|---|
| 5550 | | - u8 *bcn[0]; |
|---|
| 5720 | + u8 *bcn[]; |
|---|
| 5551 | 5721 | } __packed; |
|---|
| 5552 | 5722 | |
|---|
| 5553 | 5723 | struct wmi_bcn_tx_arg { |
|---|
| .. | .. |
|---|
| 5964 | 6134 | |
|---|
| 5965 | 6135 | struct wmi_host_swba_event { |
|---|
| 5966 | 6136 | __le32 vdev_map; |
|---|
| 5967 | | - struct wmi_bcn_info bcn_info[0]; |
|---|
| 6137 | + struct wmi_bcn_info bcn_info[]; |
|---|
| 5968 | 6138 | } __packed; |
|---|
| 5969 | 6139 | |
|---|
| 5970 | 6140 | struct wmi_10_2_4_bcn_info { |
|---|
| .. | .. |
|---|
| 5974 | 6144 | |
|---|
| 5975 | 6145 | struct wmi_10_2_4_host_swba_event { |
|---|
| 5976 | 6146 | __le32 vdev_map; |
|---|
| 5977 | | - struct wmi_10_2_4_bcn_info bcn_info[0]; |
|---|
| 6147 | + struct wmi_10_2_4_bcn_info bcn_info[]; |
|---|
| 5978 | 6148 | } __packed; |
|---|
| 5979 | 6149 | |
|---|
| 5980 | 6150 | /* 16 words = 512 client + 1 word = for guard */ |
|---|
| .. | .. |
|---|
| 6015 | 6185 | |
|---|
| 6016 | 6186 | struct wmi_10_4_host_swba_event { |
|---|
| 6017 | 6187 | __le32 vdev_map; |
|---|
| 6018 | | - struct wmi_10_4_bcn_info bcn_info[0]; |
|---|
| 6188 | + struct wmi_10_4_bcn_info bcn_info[]; |
|---|
| 6019 | 6189 | } __packed; |
|---|
| 6020 | 6190 | |
|---|
| 6021 | 6191 | #define WMI_MAX_AP_VDEV 16 |
|---|
| .. | .. |
|---|
| 6151 | 6321 | WMI_PEER_CHAN_WIDTH = 0x4, |
|---|
| 6152 | 6322 | WMI_PEER_NSS = 0x5, |
|---|
| 6153 | 6323 | WMI_PEER_USE_4ADDR = 0x6, |
|---|
| 6324 | + WMI_PEER_USE_FIXED_PWR = 0x8, |
|---|
| 6325 | + WMI_PEER_PARAM_FIXED_RATE = 0x9, |
|---|
| 6154 | 6326 | WMI_PEER_DEBUG = 0xa, |
|---|
| 6155 | 6327 | WMI_PEER_PHYMODE = 0xd, |
|---|
| 6156 | 6328 | WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */ |
|---|
| .. | .. |
|---|
| 6360 | 6532 | __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */ |
|---|
| 6361 | 6533 | } __packed; |
|---|
| 6362 | 6534 | |
|---|
| 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) |
|---|
| 6364 | 6539 | |
|---|
| 6365 | 6540 | struct wmi_10_4_peer_assoc_complete_cmd { |
|---|
| 6366 | 6541 | struct wmi_10_2_peer_assoc_complete_cmd cmd; |
|---|
| .. | .. |
|---|
| 6617 | 6792 | __le32 vdev_id; |
|---|
| 6618 | 6793 | }; |
|---|
| 6619 | 6794 | |
|---|
| 6795 | +struct mgmt_tx_compl_params { |
|---|
| 6796 | + u32 desc_id; |
|---|
| 6797 | + u32 status; |
|---|
| 6798 | + u32 ppdu_id; |
|---|
| 6799 | + int ack_rssi; |
|---|
| 6800 | +}; |
|---|
| 6801 | + |
|---|
| 6620 | 6802 | struct wmi_tlv_mgmt_tx_compl_ev_arg { |
|---|
| 6621 | 6803 | __le32 desc_id; |
|---|
| 6622 | 6804 | __le32 status; |
|---|
| 6623 | 6805 | __le32 pdev_id; |
|---|
| 6806 | + __le32 ppdu_id; |
|---|
| 6807 | + __le32 ack_rssi; |
|---|
| 6624 | 6808 | }; |
|---|
| 6625 | 6809 | |
|---|
| 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 |
|---|
| 6626 | 6824 | struct wmi_mgmt_rx_ev_arg { |
|---|
| 6627 | 6825 | __le32 channel; |
|---|
| 6628 | 6826 | __le32 snr; |
|---|
| .. | .. |
|---|
| 6631 | 6829 | __le32 buf_len; |
|---|
| 6632 | 6830 | __le32 status; /* %WMI_RX_STATUS_ */ |
|---|
| 6633 | 6831 | struct wmi_mgmt_rx_ext_info ext_info; |
|---|
| 6832 | + __le32 rssi[WMI_MGMT_RX_NUM_RSSI]; |
|---|
| 6634 | 6833 | }; |
|---|
| 6635 | 6834 | |
|---|
| 6636 | 6835 | struct wmi_ch_info_ev_arg { |
|---|
| .. | .. |
|---|
| 6643 | 6842 | __le32 chan_tx_pwr_range; |
|---|
| 6644 | 6843 | __le32 chan_tx_pwr_tp; |
|---|
| 6645 | 6844 | __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; |
|---|
| 6646 | 6849 | }; |
|---|
| 6647 | 6850 | |
|---|
| 6648 | 6851 | /* From 10.4 firmware, not sure all have the same values. */ |
|---|
| .. | .. |
|---|
| 6698 | 6901 | __le32 max_tx_power; |
|---|
| 6699 | 6902 | __le32 ht_cap; |
|---|
| 6700 | 6903 | __le32 vht_cap; |
|---|
| 6904 | + __le32 vht_supp_mcs; |
|---|
| 6701 | 6905 | __le32 sw_ver0; |
|---|
| 6702 | 6906 | __le32 sw_ver1; |
|---|
| 6703 | 6907 | __le32 fw_build; |
|---|
| .. | .. |
|---|
| 6705 | 6909 | __le32 num_rf_chains; |
|---|
| 6706 | 6910 | __le32 eeprom_rd; |
|---|
| 6707 | 6911 | __le32 num_mem_reqs; |
|---|
| 6912 | + __le32 low_2ghz_chan; |
|---|
| 6913 | + __le32 high_2ghz_chan; |
|---|
| 6708 | 6914 | __le32 low_5ghz_chan; |
|---|
| 6709 | 6915 | __le32 high_5ghz_chan; |
|---|
| 6916 | + __le32 sys_cap_info; |
|---|
| 6710 | 6917 | const __le32 *service_map; |
|---|
| 6711 | 6918 | size_t service_map_len; |
|---|
| 6712 | 6919 | const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS]; |
|---|
| .. | .. |
|---|
| 7028 | 7235 | __le32 vdev_id; |
|---|
| 7029 | 7236 | } __packed; |
|---|
| 7030 | 7237 | |
|---|
| 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 | + |
|---|
| 7031 | 7303 | enum wmi_txbf_conf { |
|---|
| 7032 | 7304 | WMI_TXBF_CONF_UNSUPPORTED, |
|---|
| 7033 | 7305 | WMI_TXBF_CONF_BEFORE_ASSOC, |
|---|
| .. | .. |
|---|
| 7043 | 7315 | __le32 cca_detect_margin; |
|---|
| 7044 | 7316 | } __packed; |
|---|
| 7045 | 7317 | |
|---|
| 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 | + |
|---|
| 7046 | 7375 | enum wmi_host_platform_type { |
|---|
| 7047 | 7376 | WMI_HOST_PLATFORM_HIGH_PERF, |
|---|
| 7048 | 7377 | WMI_HOST_PLATFORM_LOW_PERF, |
|---|
| .. | .. |
|---|
| 7056 | 7385 | struct wmi_pdev_chan_info_req_cmd { |
|---|
| 7057 | 7386 | __le32 type; |
|---|
| 7058 | 7387 | __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; |
|---|
| 7059 | 7405 | } __packed; |
|---|
| 7060 | 7406 | |
|---|
| 7061 | 7407 | struct ath10k; |
|---|
| .. | .. |
|---|
| 7095 | 7441 | const struct wmi_start_scan_arg *arg); |
|---|
| 7096 | 7442 | void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params, |
|---|
| 7097 | 7443 | 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, |
|---|
| 7099 | 7445 | const struct wmi_channel_arg *arg); |
|---|
| 7100 | 7446 | int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg); |
|---|
| 7101 | 7447 | |
|---|
| 7102 | 7448 | int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb); |
|---|
| 7103 | 7449 | int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb); |
|---|
| 7104 | 7450 | 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); |
|---|
| 7105 | 7452 | void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb); |
|---|
| 7106 | 7453 | void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb); |
|---|
| 7107 | 7454 | int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb); |
|---|