18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: ISC */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (c) 2005-2011 Atheros Communications Inc.
48c2ecf20Sopenharmony_ci * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
58c2ecf20Sopenharmony_ci * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _WMI_H_
98c2ecf20Sopenharmony_ci#define _WMI_H_
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/types.h>
128c2ecf20Sopenharmony_ci#include <linux/ieee80211.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * This file specifies the WMI interface for the Unified Software
168c2ecf20Sopenharmony_ci * Architecture.
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci * It includes definitions of all the commands and events. Commands are
198c2ecf20Sopenharmony_ci * messages from the host to the target. Events and Replies are messages
208c2ecf20Sopenharmony_ci * from the target to the host.
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * Ownership of correctness in regards to WMI commands belongs to the host
238c2ecf20Sopenharmony_ci * driver and the target is not required to validate parameters for value,
248c2ecf20Sopenharmony_ci * proper range, or any other checking.
258c2ecf20Sopenharmony_ci *
268c2ecf20Sopenharmony_ci * Guidelines for extending this interface are below.
278c2ecf20Sopenharmony_ci *
288c2ecf20Sopenharmony_ci * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
298c2ecf20Sopenharmony_ci *
308c2ecf20Sopenharmony_ci * 2. Use ONLY u32 type for defining member variables within WMI
318c2ecf20Sopenharmony_ci *    command/event structures. Do not use u8, u16, bool or
328c2ecf20Sopenharmony_ci *    enum types within these structures.
338c2ecf20Sopenharmony_ci *
348c2ecf20Sopenharmony_ci * 3. DO NOT define bit fields within structures. Implement bit fields
358c2ecf20Sopenharmony_ci *    using masks if necessary. Do not use the programming language's bit
368c2ecf20Sopenharmony_ci *    field definition.
378c2ecf20Sopenharmony_ci *
388c2ecf20Sopenharmony_ci * 4. Define macros for encode/decode of u8, u16 fields within
398c2ecf20Sopenharmony_ci *    the u32 variables. Use these macros for set/get of these fields.
408c2ecf20Sopenharmony_ci *    Try to use this to optimize the structure without bloating it with
418c2ecf20Sopenharmony_ci *    u32 variables for every lower sized field.
428c2ecf20Sopenharmony_ci *
438c2ecf20Sopenharmony_ci * 5. Do not use PACK/UNPACK attributes for the structures as each member
448c2ecf20Sopenharmony_ci *    variable is already 4-byte aligned by virtue of being a u32
458c2ecf20Sopenharmony_ci *    type.
468c2ecf20Sopenharmony_ci *
478c2ecf20Sopenharmony_ci * 6. Comment each parameter part of the WMI command/event structure by
488c2ecf20Sopenharmony_ci *    using the 2 stars at the beginning of C comment instead of one star to
498c2ecf20Sopenharmony_ci *    enable HTML document generation using Doxygen.
508c2ecf20Sopenharmony_ci *
518c2ecf20Sopenharmony_ci */
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci/* Control Path */
548c2ecf20Sopenharmony_cistruct wmi_cmd_hdr {
558c2ecf20Sopenharmony_ci	__le32 cmd_id;
568c2ecf20Sopenharmony_ci} __packed;
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#define WMI_CMD_HDR_CMD_ID_MASK   0x00FFFFFF
598c2ecf20Sopenharmony_ci#define WMI_CMD_HDR_CMD_ID_LSB    0
608c2ecf20Sopenharmony_ci#define WMI_CMD_HDR_PLT_PRIV_MASK 0xFF000000
618c2ecf20Sopenharmony_ci#define WMI_CMD_HDR_PLT_PRIV_LSB  24
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci#define HTC_PROTOCOL_VERSION    0x0002
648c2ecf20Sopenharmony_ci#define WMI_PROTOCOL_VERSION    0x0002
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci/*
678c2ecf20Sopenharmony_ci * There is no signed version of __le32, so for a temporary solution come
688c2ecf20Sopenharmony_ci * up with our own version. The idea is from fs/ntfs/endian.h.
698c2ecf20Sopenharmony_ci *
708c2ecf20Sopenharmony_ci * Use a_ prefix so that it doesn't conflict if we get proper support to
718c2ecf20Sopenharmony_ci * linux/types.h.
728c2ecf20Sopenharmony_ci */
738c2ecf20Sopenharmony_citypedef __s32 __bitwise a_sle32;
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_cistatic inline a_sle32 a_cpu_to_sle32(s32 val)
768c2ecf20Sopenharmony_ci{
778c2ecf20Sopenharmony_ci	return (__force a_sle32)cpu_to_le32(val);
788c2ecf20Sopenharmony_ci}
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_cistatic inline s32 a_sle32_to_cpu(a_sle32 val)
818c2ecf20Sopenharmony_ci{
828c2ecf20Sopenharmony_ci	return le32_to_cpu((__force __le32)val);
838c2ecf20Sopenharmony_ci}
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_cienum wmi_service {
868c2ecf20Sopenharmony_ci	WMI_SERVICE_BEACON_OFFLOAD = 0,
878c2ecf20Sopenharmony_ci	WMI_SERVICE_SCAN_OFFLOAD,
888c2ecf20Sopenharmony_ci	WMI_SERVICE_ROAM_OFFLOAD,
898c2ecf20Sopenharmony_ci	WMI_SERVICE_BCN_MISS_OFFLOAD,
908c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_PWRSAVE,
918c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_ADVANCED_PWRSAVE,
928c2ecf20Sopenharmony_ci	WMI_SERVICE_AP_UAPSD,
938c2ecf20Sopenharmony_ci	WMI_SERVICE_AP_DFS,
948c2ecf20Sopenharmony_ci	WMI_SERVICE_11AC,
958c2ecf20Sopenharmony_ci	WMI_SERVICE_BLOCKACK,
968c2ecf20Sopenharmony_ci	WMI_SERVICE_PHYERR,
978c2ecf20Sopenharmony_ci	WMI_SERVICE_BCN_FILTER,
988c2ecf20Sopenharmony_ci	WMI_SERVICE_RTT,
998c2ecf20Sopenharmony_ci	WMI_SERVICE_RATECTRL,
1008c2ecf20Sopenharmony_ci	WMI_SERVICE_WOW,
1018c2ecf20Sopenharmony_ci	WMI_SERVICE_RATECTRL_CACHE,
1028c2ecf20Sopenharmony_ci	WMI_SERVICE_IRAM_TIDS,
1038c2ecf20Sopenharmony_ci	WMI_SERVICE_ARPNS_OFFLOAD,
1048c2ecf20Sopenharmony_ci	WMI_SERVICE_NLO,
1058c2ecf20Sopenharmony_ci	WMI_SERVICE_GTK_OFFLOAD,
1068c2ecf20Sopenharmony_ci	WMI_SERVICE_SCAN_SCH,
1078c2ecf20Sopenharmony_ci	WMI_SERVICE_CSA_OFFLOAD,
1088c2ecf20Sopenharmony_ci	WMI_SERVICE_CHATTER,
1098c2ecf20Sopenharmony_ci	WMI_SERVICE_COEX_FREQAVOID,
1108c2ecf20Sopenharmony_ci	WMI_SERVICE_PACKET_POWER_SAVE,
1118c2ecf20Sopenharmony_ci	WMI_SERVICE_FORCE_FW_HANG,
1128c2ecf20Sopenharmony_ci	WMI_SERVICE_GPIO,
1138c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
1148c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
1158c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
1168c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_KEEP_ALIVE,
1178c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_ENCAP,
1188c2ecf20Sopenharmony_ci	WMI_SERVICE_BURST,
1198c2ecf20Sopenharmony_ci	WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
1208c2ecf20Sopenharmony_ci	WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
1218c2ecf20Sopenharmony_ci	WMI_SERVICE_ROAM_SCAN_OFFLOAD,
1228c2ecf20Sopenharmony_ci	WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
1238c2ecf20Sopenharmony_ci	WMI_SERVICE_EARLY_RX,
1248c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_SMPS,
1258c2ecf20Sopenharmony_ci	WMI_SERVICE_FWTEST,
1268c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_WMMAC,
1278c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS,
1288c2ecf20Sopenharmony_ci	WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE,
1298c2ecf20Sopenharmony_ci	WMI_SERVICE_ADAPTIVE_OCS,
1308c2ecf20Sopenharmony_ci	WMI_SERVICE_BA_SSN_SUPPORT,
1318c2ecf20Sopenharmony_ci	WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
1328c2ecf20Sopenharmony_ci	WMI_SERVICE_WLAN_HB,
1338c2ecf20Sopenharmony_ci	WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,
1348c2ecf20Sopenharmony_ci	WMI_SERVICE_BATCH_SCAN,
1358c2ecf20Sopenharmony_ci	WMI_SERVICE_QPOWER,
1368c2ecf20Sopenharmony_ci	WMI_SERVICE_PLMREQ,
1378c2ecf20Sopenharmony_ci	WMI_SERVICE_THERMAL_MGMT,
1388c2ecf20Sopenharmony_ci	WMI_SERVICE_RMC,
1398c2ecf20Sopenharmony_ci	WMI_SERVICE_MHF_OFFLOAD,
1408c2ecf20Sopenharmony_ci	WMI_SERVICE_COEX_SAR,
1418c2ecf20Sopenharmony_ci	WMI_SERVICE_BCN_TXRATE_OVERRIDE,
1428c2ecf20Sopenharmony_ci	WMI_SERVICE_NAN,
1438c2ecf20Sopenharmony_ci	WMI_SERVICE_L1SS_STAT,
1448c2ecf20Sopenharmony_ci	WMI_SERVICE_ESTIMATE_LINKSPEED,
1458c2ecf20Sopenharmony_ci	WMI_SERVICE_OBSS_SCAN,
1468c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_OFFCHAN,
1478c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_UAPSD_BUFFER_STA,
1488c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_UAPSD_SLEEP_STA,
1498c2ecf20Sopenharmony_ci	WMI_SERVICE_IBSS_PWRSAVE,
1508c2ecf20Sopenharmony_ci	WMI_SERVICE_LPASS,
1518c2ecf20Sopenharmony_ci	WMI_SERVICE_EXTSCAN,
1528c2ecf20Sopenharmony_ci	WMI_SERVICE_D0WOW,
1538c2ecf20Sopenharmony_ci	WMI_SERVICE_HSOFFLOAD,
1548c2ecf20Sopenharmony_ci	WMI_SERVICE_ROAM_HO_OFFLOAD,
1558c2ecf20Sopenharmony_ci	WMI_SERVICE_RX_FULL_REORDER,
1568c2ecf20Sopenharmony_ci	WMI_SERVICE_DHCP_OFFLOAD,
1578c2ecf20Sopenharmony_ci	WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT,
1588c2ecf20Sopenharmony_ci	WMI_SERVICE_MDNS_OFFLOAD,
1598c2ecf20Sopenharmony_ci	WMI_SERVICE_SAP_AUTH_OFFLOAD,
1608c2ecf20Sopenharmony_ci	WMI_SERVICE_ATF,
1618c2ecf20Sopenharmony_ci	WMI_SERVICE_COEX_GPIO,
1628c2ecf20Sopenharmony_ci	WMI_SERVICE_ENHANCED_PROXY_STA,
1638c2ecf20Sopenharmony_ci	WMI_SERVICE_TT,
1648c2ecf20Sopenharmony_ci	WMI_SERVICE_PEER_CACHING,
1658c2ecf20Sopenharmony_ci	WMI_SERVICE_AUX_SPECTRAL_INTF,
1668c2ecf20Sopenharmony_ci	WMI_SERVICE_AUX_CHAN_LOAD_INTF,
1678c2ecf20Sopenharmony_ci	WMI_SERVICE_BSS_CHANNEL_INFO_64,
1688c2ecf20Sopenharmony_ci	WMI_SERVICE_EXT_RES_CFG_SUPPORT,
1698c2ecf20Sopenharmony_ci	WMI_SERVICE_MESH_11S,
1708c2ecf20Sopenharmony_ci	WMI_SERVICE_MESH_NON_11S,
1718c2ecf20Sopenharmony_ci	WMI_SERVICE_PEER_STATS,
1728c2ecf20Sopenharmony_ci	WMI_SERVICE_RESTRT_CHNL_SUPPORT,
1738c2ecf20Sopenharmony_ci	WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT,
1748c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_MODE_PUSH_ONLY,
1758c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_MODE_PUSH_PULL,
1768c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_MODE_DYNAMIC,
1778c2ecf20Sopenharmony_ci	WMI_SERVICE_VDEV_RX_FILTER,
1788c2ecf20Sopenharmony_ci	WMI_SERVICE_BTCOEX,
1798c2ecf20Sopenharmony_ci	WMI_SERVICE_CHECK_CAL_VERSION,
1808c2ecf20Sopenharmony_ci	WMI_SERVICE_DBGLOG_WARN2,
1818c2ecf20Sopenharmony_ci	WMI_SERVICE_BTCOEX_DUTY_CYCLE,
1828c2ecf20Sopenharmony_ci	WMI_SERVICE_4_WIRE_COEX_SUPPORT,
1838c2ecf20Sopenharmony_ci	WMI_SERVICE_EXTENDED_NSS_SUPPORT,
1848c2ecf20Sopenharmony_ci	WMI_SERVICE_PROG_GPIO_BAND_SELECT,
1858c2ecf20Sopenharmony_ci	WMI_SERVICE_SMART_LOGGING_SUPPORT,
1868c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE,
1878c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
1888c2ecf20Sopenharmony_ci	WMI_SERVICE_MGMT_TX_WMI,
1898c2ecf20Sopenharmony_ci	WMI_SERVICE_TDLS_WIDER_BANDWIDTH,
1908c2ecf20Sopenharmony_ci	WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
1918c2ecf20Sopenharmony_ci	WMI_SERVICE_HOST_DFS_CHECK_SUPPORT,
1928c2ecf20Sopenharmony_ci	WMI_SERVICE_TPC_STATS_FINAL,
1938c2ecf20Sopenharmony_ci	WMI_SERVICE_RESET_CHIP,
1948c2ecf20Sopenharmony_ci	WMI_SERVICE_SPOOF_MAC_SUPPORT,
1958c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_DATA_ACK_RSSI,
1968c2ecf20Sopenharmony_ci	WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
1978c2ecf20Sopenharmony_ci	WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
1988c2ecf20Sopenharmony_ci	WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT,
1998c2ecf20Sopenharmony_ci	WMI_SERVICE_THERM_THROT,
2008c2ecf20Sopenharmony_ci	WMI_SERVICE_RTT_RESPONDER_ROLE,
2018c2ecf20Sopenharmony_ci	WMI_SERVICE_PER_PACKET_SW_ENCRYPT,
2028c2ecf20Sopenharmony_ci	WMI_SERVICE_REPORT_AIRTIME,
2038c2ecf20Sopenharmony_ci	WMI_SERVICE_SYNC_DELETE_CMDS,
2048c2ecf20Sopenharmony_ci	WMI_SERVICE_TX_PWR_PER_PEER,
2058c2ecf20Sopenharmony_ci	WMI_SERVICE_SUPPORT_EXTEND_ADDRESS,
2068c2ecf20Sopenharmony_ci	WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT,
2078c2ecf20Sopenharmony_ci	WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
2088c2ecf20Sopenharmony_ci
2098c2ecf20Sopenharmony_ci	/* Remember to add the new value to wmi_service_name()! */
2108c2ecf20Sopenharmony_ci
2118c2ecf20Sopenharmony_ci	/* keep last */
2128c2ecf20Sopenharmony_ci	WMI_SERVICE_MAX,
2138c2ecf20Sopenharmony_ci};
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_cienum wmi_10x_service {
2168c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BEACON_OFFLOAD = 0,
2178c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_SCAN_OFFLOAD,
2188c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_ROAM_OFFLOAD,
2198c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
2208c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_STA_PWRSAVE,
2218c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
2228c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_AP_UAPSD,
2238c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_AP_DFS,
2248c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_11AC,
2258c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BLOCKACK,
2268c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_PHYERR,
2278c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BCN_FILTER,
2288c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_RTT,
2298c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_RATECTRL,
2308c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_WOW,
2318c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_RATECTRL_CACHE,
2328c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_IRAM_TIDS,
2338c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BURST,
2348c2ecf20Sopenharmony_ci
2358c2ecf20Sopenharmony_ci	/* introduced in 10.2 */
2368c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
2378c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_FORCE_FW_HANG,
2388c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
2398c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_ATF,
2408c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_COEX_GPIO,
2418c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_AUX_SPECTRAL_INTF,
2428c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_AUX_CHAN_LOAD_INTF,
2438c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BSS_CHANNEL_INFO_64,
2448c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_MESH,
2458c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_EXT_RES_CFG_SUPPORT,
2468c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_PEER_STATS,
2478c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_RESET_CHIP,
2488c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
2498c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_VDEV_BCN_RATE_CONTROL,
2508c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_PER_PACKET_SW_ENCRYPT,
2518c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT,
2528c2ecf20Sopenharmony_ci};
2538c2ecf20Sopenharmony_ci
2548c2ecf20Sopenharmony_cienum wmi_main_service {
2558c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0,
2568c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_SCAN_OFFLOAD,
2578c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_ROAM_OFFLOAD,
2588c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
2598c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_PWRSAVE,
2608c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
2618c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_AP_UAPSD,
2628c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_AP_DFS,
2638c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_11AC,
2648c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_BLOCKACK,
2658c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_PHYERR,
2668c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_BCN_FILTER,
2678c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_RTT,
2688c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_RATECTRL,
2698c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_WOW,
2708c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_RATECTRL_CACHE,
2718c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_IRAM_TIDS,
2728c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
2738c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_NLO,
2748c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_GTK_OFFLOAD,
2758c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_SCAN_SCH,
2768c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_CSA_OFFLOAD,
2778c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_CHATTER,
2788c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_COEX_FREQAVOID,
2798c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
2808c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_FORCE_FW_HANG,
2818c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_GPIO,
2828c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
2838c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
2848c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
2858c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
2868c2ecf20Sopenharmony_ci	WMI_MAIN_SERVICE_TX_ENCAP,
2878c2ecf20Sopenharmony_ci};
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_cienum wmi_10_4_service {
2908c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BEACON_OFFLOAD = 0,
2918c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_SCAN_OFFLOAD,
2928c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_ROAM_OFFLOAD,
2938c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
2948c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_STA_PWRSAVE,
2958c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
2968c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_AP_UAPSD,
2978c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_AP_DFS,
2988c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_11AC,
2998c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BLOCKACK,
3008c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PHYERR,
3018c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BCN_FILTER,
3028c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RTT,
3038c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RATECTRL,
3048c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_WOW,
3058c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RATECTRL_CACHE,
3068c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_IRAM_TIDS,
3078c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BURST,
3088c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
3098c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_GTK_OFFLOAD,
3108c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_SCAN_SCH,
3118c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_CSA_OFFLOAD,
3128c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_CHATTER,
3138c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_COEX_FREQAVOID,
3148c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PACKET_POWER_SAVE,
3158c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_FORCE_FW_HANG,
3168c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
3178c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_GPIO,
3188c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
3198c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
3208c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_STA_KEEP_ALIVE,
3218c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_ENCAP,
3228c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
3238c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_EARLY_RX,
3248c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
3258c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TT,
3268c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_ATF,
3278c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PEER_CACHING,
3288c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_COEX_GPIO,
3298c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
3308c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
3318c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
3328c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_EXT_RES_CFG_SUPPORT,
3338c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_MESH_NON_11S,
3348c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RESTRT_CHNL_SUPPORT,
3358c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PEER_STATS,
3368c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_MESH_11S,
3378c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PERIODIC_CHAN_STAT_SUPPORT,
3388c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_MODE_PUSH_ONLY,
3398c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_MODE_PUSH_PULL,
3408c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_MODE_DYNAMIC,
3418c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_VDEV_RX_FILTER,
3428c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BTCOEX,
3438c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_CHECK_CAL_VERSION,
3448c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_DBGLOG_WARN2,
3458c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_BTCOEX_DUTY_CYCLE,
3468c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_4_WIRE_COEX_SUPPORT,
3478c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_EXTENDED_NSS_SUPPORT,
3488c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PROG_GPIO_BAND_SELECT,
3498c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_SMART_LOGGING_SUPPORT,
3508c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS,
3518c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_OFFCHAN,
3528c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_UAPSD_BUFFER_STA,
3538c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_UAPSD_SLEEP_STA,
3548c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE,
3558c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
3568c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH,
3578c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
3588c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_HOST_DFS_CHECK_SUPPORT,
3598c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TPC_STATS_FINAL,
3608c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_CFR_CAPTURE_SUPPORT,
3618c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_DATA_ACK_RSSI,
3628c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_CFR_CAPTURE_IND_MSG_TYPE_LEGACY,
3638c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PER_PACKET_SW_ENCRYPT,
3648c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT,
3658c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_VDEV_BCN_RATE_CONTROL,
3668c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
3678c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_HTT_ASSERT_TRIGGER_SUPPORT,
3688c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_VDEV_FILTER_NEIGHBOR_RX_PACKETS,
3698c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
3708c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_PEER_CHWIDTH_CHANGE,
3718c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RX_FILTER_OUT_COUNT,
3728c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RTT_RESPONDER_ROLE,
3738c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
3748c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_REPORT_AIRTIME,
3758c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_TX_PWR_PER_PEER,
3768c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_FETCH_PEER_TX_PN,
3778c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_MULTIPLE_VDEV_RESTART,
3788c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_ENHANCED_RADIO_COUNTERS,
3798c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_QINQ_SUPPORT,
3808c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_RESET_CHIP,
3818c2ecf20Sopenharmony_ci};
3828c2ecf20Sopenharmony_ci
3838c2ecf20Sopenharmony_cistatic inline char *wmi_service_name(enum wmi_service service_id)
3848c2ecf20Sopenharmony_ci{
3858c2ecf20Sopenharmony_ci#define SVCSTR(x) case x: return #x
3868c2ecf20Sopenharmony_ci
3878c2ecf20Sopenharmony_ci	switch (service_id) {
3888c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BEACON_OFFLOAD);
3898c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SCAN_OFFLOAD);
3908c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ROAM_OFFLOAD);
3918c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD);
3928c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_PWRSAVE);
3938c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE);
3948c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_AP_UAPSD);
3958c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_AP_DFS);
3968c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_11AC);
3978c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BLOCKACK);
3988c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PHYERR);
3998c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BCN_FILTER);
4008c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RTT);
4018c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RATECTRL);
4028c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_WOW);
4038c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RATECTRL_CACHE);
4048c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_IRAM_TIDS);
4058c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD);
4068c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_NLO);
4078c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_GTK_OFFLOAD);
4088c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SCAN_SCH);
4098c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_CSA_OFFLOAD);
4108c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_CHATTER);
4118c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_COEX_FREQAVOID);
4128c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE);
4138c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_FORCE_FW_HANG);
4148c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_GPIO);
4158c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM);
4168c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG);
4178c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG);
4188c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE);
4198c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_ENCAP);
4208c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BURST);
4218c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
4228c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
4238c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
4248c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
4258c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_EARLY_RX);
4268c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_SMPS);
4278c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_FWTEST);
4288c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_WMMAC);
4298c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS);
4308c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
4318c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
4328c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
4338c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
4348c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_WLAN_HB);
4358c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
4368c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BATCH_SCAN);
4378c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_QPOWER);
4388c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PLMREQ);
4398c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_THERMAL_MGMT);
4408c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RMC);
4418c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
4428c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_COEX_SAR);
4438c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
4448c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_NAN);
4458c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_L1SS_STAT);
4468c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
4478c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_OBSS_SCAN);
4488c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
4498c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
4508c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
4518c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
4528c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_LPASS);
4538c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_EXTSCAN);
4548c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_D0WOW);
4558c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_HSOFFLOAD);
4568c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
4578c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
4588c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
4598c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
4608c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
4618c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
4628c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ATF);
4638c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_COEX_GPIO);
4648c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_ENHANCED_PROXY_STA);
4658c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TT);
4668c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PEER_CACHING);
4678c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_AUX_SPECTRAL_INTF);
4688c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_AUX_CHAN_LOAD_INTF);
4698c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BSS_CHANNEL_INFO_64);
4708c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_EXT_RES_CFG_SUPPORT);
4718c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MESH_11S);
4728c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MESH_NON_11S);
4738c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PEER_STATS);
4748c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RESTRT_CHNL_SUPPORT);
4758c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT);
4768c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_MODE_PUSH_ONLY);
4778c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_MODE_PUSH_PULL);
4788c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_MODE_DYNAMIC);
4798c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_VDEV_RX_FILTER);
4808c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BTCOEX);
4818c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_CHECK_CAL_VERSION);
4828c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_DBGLOG_WARN2);
4838c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BTCOEX_DUTY_CYCLE);
4848c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_4_WIRE_COEX_SUPPORT);
4858c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_EXTENDED_NSS_SUPPORT);
4868c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PROG_GPIO_BAND_SELECT);
4878c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SMART_LOGGING_SUPPORT);
4888c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE);
4898c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY);
4908c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_MGMT_TX_WMI);
4918c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TDLS_WIDER_BANDWIDTH);
4928c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS);
4938c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_HOST_DFS_CHECK_SUPPORT);
4948c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TPC_STATS_FINAL);
4958c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RESET_CHIP);
4968c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SPOOF_MAC_SUPPORT);
4978c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_DATA_ACK_RSSI);
4988c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT);
4998c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT);
5008c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT);
5018c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_THERM_THROT);
5028c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_RTT_RESPONDER_ROLE);
5038c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PER_PACKET_SW_ENCRYPT);
5048c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_REPORT_AIRTIME);
5058c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SYNC_DELETE_CMDS);
5068c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_TX_PWR_PER_PEER);
5078c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_SUPPORT_EXTEND_ADDRESS);
5088c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT);
5098c2ecf20Sopenharmony_ci	SVCSTR(WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT);
5108c2ecf20Sopenharmony_ci
5118c2ecf20Sopenharmony_ci	case WMI_SERVICE_MAX:
5128c2ecf20Sopenharmony_ci		return NULL;
5138c2ecf20Sopenharmony_ci	}
5148c2ecf20Sopenharmony_ci
5158c2ecf20Sopenharmony_ci#undef SVCSTR
5168c2ecf20Sopenharmony_ci
5178c2ecf20Sopenharmony_ci	return NULL;
5188c2ecf20Sopenharmony_ci}
5198c2ecf20Sopenharmony_ci
5208c2ecf20Sopenharmony_ci#define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
5218c2ecf20Sopenharmony_ci	((svc_id) < (len) && \
5228c2ecf20Sopenharmony_ci	 __le32_to_cpu((wmi_svc_bmap)[(svc_id) / (sizeof(u32))]) & \
5238c2ecf20Sopenharmony_ci	 BIT((svc_id) % (sizeof(u32))))
5248c2ecf20Sopenharmony_ci
5258c2ecf20Sopenharmony_ci/* This extension is required to accommodate new services, current limit
5268c2ecf20Sopenharmony_ci * for wmi_services is 64 as target is using only 4-bits of each 32-bit
5278c2ecf20Sopenharmony_ci * wmi_service word. Extending this to make use of remaining unused bits
5288c2ecf20Sopenharmony_ci * for new services.
5298c2ecf20Sopenharmony_ci */
5308c2ecf20Sopenharmony_ci#define WMI_EXT_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
5318c2ecf20Sopenharmony_ci	((svc_id) >= (len) && \
5328c2ecf20Sopenharmony_ci	__le32_to_cpu((wmi_svc_bmap)[((svc_id) - (len)) / 28]) & \
5338c2ecf20Sopenharmony_ci	BIT(((((svc_id) - (len)) % 28) & 0x1f) + 4))
5348c2ecf20Sopenharmony_ci
5358c2ecf20Sopenharmony_ci#define SVCMAP(x, y, len) \
5368c2ecf20Sopenharmony_ci	do { \
5378c2ecf20Sopenharmony_ci		if ((WMI_SERVICE_IS_ENABLED((in), (x), (len))) || \
5388c2ecf20Sopenharmony_ci		    (WMI_EXT_SERVICE_IS_ENABLED((in), (x), (len)))) \
5398c2ecf20Sopenharmony_ci			__set_bit(y, out); \
5408c2ecf20Sopenharmony_ci	} while (0)
5418c2ecf20Sopenharmony_ci
5428c2ecf20Sopenharmony_cistatic inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
5438c2ecf20Sopenharmony_ci				   size_t len)
5448c2ecf20Sopenharmony_ci{
5458c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD,
5468c2ecf20Sopenharmony_ci	       WMI_SERVICE_BEACON_OFFLOAD, len);
5478c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD,
5488c2ecf20Sopenharmony_ci	       WMI_SERVICE_SCAN_OFFLOAD, len);
5498c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD,
5508c2ecf20Sopenharmony_ci	       WMI_SERVICE_ROAM_OFFLOAD, len);
5518c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
5528c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_MISS_OFFLOAD, len);
5538c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE,
5548c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_PWRSAVE, len);
5558c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
5568c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
5578c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_AP_UAPSD,
5588c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_UAPSD, len);
5598c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_AP_DFS,
5608c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_DFS, len);
5618c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_11AC,
5628c2ecf20Sopenharmony_ci	       WMI_SERVICE_11AC, len);
5638c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BLOCKACK,
5648c2ecf20Sopenharmony_ci	       WMI_SERVICE_BLOCKACK, len);
5658c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_PHYERR,
5668c2ecf20Sopenharmony_ci	       WMI_SERVICE_PHYERR, len);
5678c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BCN_FILTER,
5688c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_FILTER, len);
5698c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_RTT,
5708c2ecf20Sopenharmony_ci	       WMI_SERVICE_RTT, len);
5718c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_RATECTRL,
5728c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL, len);
5738c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_WOW,
5748c2ecf20Sopenharmony_ci	       WMI_SERVICE_WOW, len);
5758c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE,
5768c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL_CACHE, len);
5778c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_IRAM_TIDS,
5788c2ecf20Sopenharmony_ci	       WMI_SERVICE_IRAM_TIDS, len);
5798c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BURST,
5808c2ecf20Sopenharmony_ci	       WMI_SERVICE_BURST, len);
5818c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
5828c2ecf20Sopenharmony_ci	       WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
5838c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG,
5848c2ecf20Sopenharmony_ci	       WMI_SERVICE_FORCE_FW_HANG, len);
5858c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
5868c2ecf20Sopenharmony_ci	       WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
5878c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_ATF,
5888c2ecf20Sopenharmony_ci	       WMI_SERVICE_ATF, len);
5898c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_COEX_GPIO,
5908c2ecf20Sopenharmony_ci	       WMI_SERVICE_COEX_GPIO, len);
5918c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_AUX_SPECTRAL_INTF,
5928c2ecf20Sopenharmony_ci	       WMI_SERVICE_AUX_SPECTRAL_INTF, len);
5938c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_AUX_CHAN_LOAD_INTF,
5948c2ecf20Sopenharmony_ci	       WMI_SERVICE_AUX_CHAN_LOAD_INTF, len);
5958c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BSS_CHANNEL_INFO_64,
5968c2ecf20Sopenharmony_ci	       WMI_SERVICE_BSS_CHANNEL_INFO_64, len);
5978c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_MESH,
5988c2ecf20Sopenharmony_ci	       WMI_SERVICE_MESH_11S, len);
5998c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_EXT_RES_CFG_SUPPORT,
6008c2ecf20Sopenharmony_ci	       WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
6018c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_PEER_STATS,
6028c2ecf20Sopenharmony_ci	       WMI_SERVICE_PEER_STATS, len);
6038c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_RESET_CHIP,
6048c2ecf20Sopenharmony_ci	       WMI_SERVICE_RESET_CHIP, len);
6058c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
6068c2ecf20Sopenharmony_ci	       WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, len);
6078c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_BB_TIMING_CONFIG_SUPPORT,
6088c2ecf20Sopenharmony_ci	       WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT, len);
6098c2ecf20Sopenharmony_ci	SVCMAP(WMI_10X_SERVICE_PER_PACKET_SW_ENCRYPT,
6108c2ecf20Sopenharmony_ci	       WMI_SERVICE_PER_PACKET_SW_ENCRYPT, len);
6118c2ecf20Sopenharmony_ci}
6128c2ecf20Sopenharmony_ci
6138c2ecf20Sopenharmony_cistatic inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
6148c2ecf20Sopenharmony_ci				    size_t len)
6158c2ecf20Sopenharmony_ci{
6168c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD,
6178c2ecf20Sopenharmony_ci	       WMI_SERVICE_BEACON_OFFLOAD, len);
6188c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD,
6198c2ecf20Sopenharmony_ci	       WMI_SERVICE_SCAN_OFFLOAD, len);
6208c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD,
6218c2ecf20Sopenharmony_ci	       WMI_SERVICE_ROAM_OFFLOAD, len);
6228c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
6238c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_MISS_OFFLOAD, len);
6248c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE,
6258c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_PWRSAVE, len);
6268c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
6278c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
6288c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD,
6298c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_UAPSD, len);
6308c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_AP_DFS,
6318c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_DFS, len);
6328c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_11AC,
6338c2ecf20Sopenharmony_ci	       WMI_SERVICE_11AC, len);
6348c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_BLOCKACK,
6358c2ecf20Sopenharmony_ci	       WMI_SERVICE_BLOCKACK, len);
6368c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_PHYERR,
6378c2ecf20Sopenharmony_ci	       WMI_SERVICE_PHYERR, len);
6388c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER,
6398c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_FILTER, len);
6408c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_RTT,
6418c2ecf20Sopenharmony_ci	       WMI_SERVICE_RTT, len);
6428c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_RATECTRL,
6438c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL, len);
6448c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_WOW,
6458c2ecf20Sopenharmony_ci	       WMI_SERVICE_WOW, len);
6468c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE,
6478c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL_CACHE, len);
6488c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS,
6498c2ecf20Sopenharmony_ci	       WMI_SERVICE_IRAM_TIDS, len);
6508c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
6518c2ecf20Sopenharmony_ci	       WMI_SERVICE_ARPNS_OFFLOAD, len);
6528c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_NLO,
6538c2ecf20Sopenharmony_ci	       WMI_SERVICE_NLO, len);
6548c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD,
6558c2ecf20Sopenharmony_ci	       WMI_SERVICE_GTK_OFFLOAD, len);
6568c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH,
6578c2ecf20Sopenharmony_ci	       WMI_SERVICE_SCAN_SCH, len);
6588c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD,
6598c2ecf20Sopenharmony_ci	       WMI_SERVICE_CSA_OFFLOAD, len);
6608c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_CHATTER,
6618c2ecf20Sopenharmony_ci	       WMI_SERVICE_CHATTER, len);
6628c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID,
6638c2ecf20Sopenharmony_ci	       WMI_SERVICE_COEX_FREQAVOID, len);
6648c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
6658c2ecf20Sopenharmony_ci	       WMI_SERVICE_PACKET_POWER_SAVE, len);
6668c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG,
6678c2ecf20Sopenharmony_ci	       WMI_SERVICE_FORCE_FW_HANG, len);
6688c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_GPIO,
6698c2ecf20Sopenharmony_ci	       WMI_SERVICE_GPIO, len);
6708c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
6718c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len);
6728c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
6738c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
6748c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
6758c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
6768c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
6778c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_KEEP_ALIVE, len);
6788c2ecf20Sopenharmony_ci	SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP,
6798c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_ENCAP, len);
6808c2ecf20Sopenharmony_ci}
6818c2ecf20Sopenharmony_ci
6828c2ecf20Sopenharmony_cistatic inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
6838c2ecf20Sopenharmony_ci				    size_t len)
6848c2ecf20Sopenharmony_ci{
6858c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BEACON_OFFLOAD,
6868c2ecf20Sopenharmony_ci	       WMI_SERVICE_BEACON_OFFLOAD, len);
6878c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_SCAN_OFFLOAD,
6888c2ecf20Sopenharmony_ci	       WMI_SERVICE_SCAN_OFFLOAD, len);
6898c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_ROAM_OFFLOAD,
6908c2ecf20Sopenharmony_ci	       WMI_SERVICE_ROAM_OFFLOAD, len);
6918c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
6928c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_MISS_OFFLOAD, len);
6938c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_STA_PWRSAVE,
6948c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_PWRSAVE, len);
6958c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
6968c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
6978c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_AP_UAPSD,
6988c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_UAPSD, len);
6998c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_AP_DFS,
7008c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_DFS, len);
7018c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_11AC,
7028c2ecf20Sopenharmony_ci	       WMI_SERVICE_11AC, len);
7038c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BLOCKACK,
7048c2ecf20Sopenharmony_ci	       WMI_SERVICE_BLOCKACK, len);
7058c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PHYERR,
7068c2ecf20Sopenharmony_ci	       WMI_SERVICE_PHYERR, len);
7078c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BCN_FILTER,
7088c2ecf20Sopenharmony_ci	       WMI_SERVICE_BCN_FILTER, len);
7098c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RTT,
7108c2ecf20Sopenharmony_ci	       WMI_SERVICE_RTT, len);
7118c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RATECTRL,
7128c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL, len);
7138c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_WOW,
7148c2ecf20Sopenharmony_ci	       WMI_SERVICE_WOW, len);
7158c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RATECTRL_CACHE,
7168c2ecf20Sopenharmony_ci	       WMI_SERVICE_RATECTRL_CACHE, len);
7178c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_IRAM_TIDS,
7188c2ecf20Sopenharmony_ci	       WMI_SERVICE_IRAM_TIDS, len);
7198c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BURST,
7208c2ecf20Sopenharmony_ci	       WMI_SERVICE_BURST, len);
7218c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
7228c2ecf20Sopenharmony_ci	       WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
7238c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_GTK_OFFLOAD,
7248c2ecf20Sopenharmony_ci	       WMI_SERVICE_GTK_OFFLOAD, len);
7258c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_SCAN_SCH,
7268c2ecf20Sopenharmony_ci	       WMI_SERVICE_SCAN_SCH, len);
7278c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_CSA_OFFLOAD,
7288c2ecf20Sopenharmony_ci	       WMI_SERVICE_CSA_OFFLOAD, len);
7298c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_CHATTER,
7308c2ecf20Sopenharmony_ci	       WMI_SERVICE_CHATTER, len);
7318c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_COEX_FREQAVOID,
7328c2ecf20Sopenharmony_ci	       WMI_SERVICE_COEX_FREQAVOID, len);
7338c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PACKET_POWER_SAVE,
7348c2ecf20Sopenharmony_ci	       WMI_SERVICE_PACKET_POWER_SAVE, len);
7358c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_FORCE_FW_HANG,
7368c2ecf20Sopenharmony_ci	       WMI_SERVICE_FORCE_FW_HANG, len);
7378c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
7388c2ecf20Sopenharmony_ci	       WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
7398c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_GPIO,
7408c2ecf20Sopenharmony_ci	       WMI_SERVICE_GPIO, len);
7418c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
7428c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
7438c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
7448c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
7458c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_STA_KEEP_ALIVE,
7468c2ecf20Sopenharmony_ci	       WMI_SERVICE_STA_KEEP_ALIVE, len);
7478c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_ENCAP,
7488c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_ENCAP, len);
7498c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
7508c2ecf20Sopenharmony_ci	       WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, len);
7518c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_EARLY_RX,
7528c2ecf20Sopenharmony_ci	       WMI_SERVICE_EARLY_RX, len);
7538c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
7548c2ecf20Sopenharmony_ci	       WMI_SERVICE_ENHANCED_PROXY_STA, len);
7558c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TT,
7568c2ecf20Sopenharmony_ci	       WMI_SERVICE_TT, len);
7578c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_ATF,
7588c2ecf20Sopenharmony_ci	       WMI_SERVICE_ATF, len);
7598c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PEER_CACHING,
7608c2ecf20Sopenharmony_ci	       WMI_SERVICE_PEER_CACHING, len);
7618c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_COEX_GPIO,
7628c2ecf20Sopenharmony_ci	       WMI_SERVICE_COEX_GPIO, len);
7638c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
7648c2ecf20Sopenharmony_ci	       WMI_SERVICE_AUX_SPECTRAL_INTF, len);
7658c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
7668c2ecf20Sopenharmony_ci	       WMI_SERVICE_AUX_CHAN_LOAD_INTF, len);
7678c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
7688c2ecf20Sopenharmony_ci	       WMI_SERVICE_BSS_CHANNEL_INFO_64, len);
7698c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_EXT_RES_CFG_SUPPORT,
7708c2ecf20Sopenharmony_ci	       WMI_SERVICE_EXT_RES_CFG_SUPPORT, len);
7718c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_MESH_NON_11S,
7728c2ecf20Sopenharmony_ci	       WMI_SERVICE_MESH_NON_11S, len);
7738c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RESTRT_CHNL_SUPPORT,
7748c2ecf20Sopenharmony_ci	       WMI_SERVICE_RESTRT_CHNL_SUPPORT, len);
7758c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PEER_STATS,
7768c2ecf20Sopenharmony_ci	       WMI_SERVICE_PEER_STATS, len);
7778c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_MESH_11S,
7788c2ecf20Sopenharmony_ci	       WMI_SERVICE_MESH_11S, len);
7798c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PERIODIC_CHAN_STAT_SUPPORT,
7808c2ecf20Sopenharmony_ci	       WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT, len);
7818c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_MODE_PUSH_ONLY,
7828c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_MODE_PUSH_ONLY, len);
7838c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_MODE_PUSH_PULL,
7848c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_MODE_PUSH_PULL, len);
7858c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_MODE_DYNAMIC,
7868c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_MODE_DYNAMIC, len);
7878c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_VDEV_RX_FILTER,
7888c2ecf20Sopenharmony_ci	       WMI_SERVICE_VDEV_RX_FILTER, len);
7898c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BTCOEX,
7908c2ecf20Sopenharmony_ci	       WMI_SERVICE_BTCOEX, len);
7918c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_CHECK_CAL_VERSION,
7928c2ecf20Sopenharmony_ci	       WMI_SERVICE_CHECK_CAL_VERSION, len);
7938c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_DBGLOG_WARN2,
7948c2ecf20Sopenharmony_ci	       WMI_SERVICE_DBGLOG_WARN2, len);
7958c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_BTCOEX_DUTY_CYCLE,
7968c2ecf20Sopenharmony_ci	       WMI_SERVICE_BTCOEX_DUTY_CYCLE, len);
7978c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_4_WIRE_COEX_SUPPORT,
7988c2ecf20Sopenharmony_ci	       WMI_SERVICE_4_WIRE_COEX_SUPPORT, len);
7998c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_EXTENDED_NSS_SUPPORT,
8008c2ecf20Sopenharmony_ci	       WMI_SERVICE_EXTENDED_NSS_SUPPORT, len);
8018c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PROG_GPIO_BAND_SELECT,
8028c2ecf20Sopenharmony_ci	       WMI_SERVICE_PROG_GPIO_BAND_SELECT, len);
8038c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_SMART_LOGGING_SUPPORT,
8048c2ecf20Sopenharmony_ci	       WMI_SERVICE_SMART_LOGGING_SUPPORT, len);
8058c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS,
8068c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS, len);
8078c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_OFFCHAN,
8088c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_OFFCHAN, len);
8098c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_UAPSD_BUFFER_STA,
8108c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_UAPSD_BUFFER_STA, len);
8118c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_UAPSD_SLEEP_STA,
8128c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_UAPSD_SLEEP_STA, len);
8138c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE,
8148c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_CONN_TRACKER_IN_HOST_MODE, len);
8158c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_EXPLICIT_MODE_ONLY,
8168c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_EXPLICIT_MODE_ONLY, len);
8178c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TDLS_WIDER_BANDWIDTH,
8188c2ecf20Sopenharmony_ci	       WMI_SERVICE_TDLS_WIDER_BANDWIDTH, len);
8198c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS,
8208c2ecf20Sopenharmony_ci	       WMI_SERVICE_HTT_MGMT_TX_COMP_VALID_FLAGS, len);
8218c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_HOST_DFS_CHECK_SUPPORT,
8228c2ecf20Sopenharmony_ci	       WMI_SERVICE_HOST_DFS_CHECK_SUPPORT, len);
8238c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TPC_STATS_FINAL,
8248c2ecf20Sopenharmony_ci	       WMI_SERVICE_TPC_STATS_FINAL, len);
8258c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_DATA_ACK_RSSI,
8268c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_DATA_ACK_RSSI, len);
8278c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
8288c2ecf20Sopenharmony_ci	       WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT, len);
8298c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT,
8308c2ecf20Sopenharmony_ci	       WMI_SERVICE_VDEV_DISABLE_4_ADDR_SRC_LRN_SUPPORT, len);
8318c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RTT_RESPONDER_ROLE,
8328c2ecf20Sopenharmony_ci	       WMI_SERVICE_RTT_RESPONDER_ROLE, len);
8338c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PER_PACKET_SW_ENCRYPT,
8348c2ecf20Sopenharmony_ci	       WMI_SERVICE_PER_PACKET_SW_ENCRYPT, len);
8358c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_REPORT_AIRTIME,
8368c2ecf20Sopenharmony_ci	       WMI_SERVICE_REPORT_AIRTIME, len);
8378c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_TX_PWR_PER_PEER,
8388c2ecf20Sopenharmony_ci	       WMI_SERVICE_TX_PWR_PER_PEER, len);
8398c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_RESET_CHIP,
8408c2ecf20Sopenharmony_ci	       WMI_SERVICE_RESET_CHIP, len);
8418c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_PEER_TID_CONFIGS_SUPPORT,
8428c2ecf20Sopenharmony_ci	       WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT, len);
8438c2ecf20Sopenharmony_ci	SVCMAP(WMI_10_4_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT,
8448c2ecf20Sopenharmony_ci	       WMI_SERVICE_PEER_TID_CONFIGS_SUPPORT, len);
8458c2ecf20Sopenharmony_ci}
8468c2ecf20Sopenharmony_ci
8478c2ecf20Sopenharmony_ci#undef SVCMAP
8488c2ecf20Sopenharmony_ci
8498c2ecf20Sopenharmony_ci/* 2 word representation of MAC addr */
8508c2ecf20Sopenharmony_cistruct wmi_mac_addr {
8518c2ecf20Sopenharmony_ci	union {
8528c2ecf20Sopenharmony_ci		u8 addr[6];
8538c2ecf20Sopenharmony_ci		struct {
8548c2ecf20Sopenharmony_ci			u32 word0;
8558c2ecf20Sopenharmony_ci			u32 word1;
8568c2ecf20Sopenharmony_ci		} __packed;
8578c2ecf20Sopenharmony_ci	} __packed;
8588c2ecf20Sopenharmony_ci} __packed;
8598c2ecf20Sopenharmony_ci
8608c2ecf20Sopenharmony_cistruct wmi_cmd_map {
8618c2ecf20Sopenharmony_ci	u32 init_cmdid;
8628c2ecf20Sopenharmony_ci	u32 start_scan_cmdid;
8638c2ecf20Sopenharmony_ci	u32 stop_scan_cmdid;
8648c2ecf20Sopenharmony_ci	u32 scan_chan_list_cmdid;
8658c2ecf20Sopenharmony_ci	u32 scan_sch_prio_tbl_cmdid;
8668c2ecf20Sopenharmony_ci	u32 scan_prob_req_oui_cmdid;
8678c2ecf20Sopenharmony_ci	u32 pdev_set_regdomain_cmdid;
8688c2ecf20Sopenharmony_ci	u32 pdev_set_channel_cmdid;
8698c2ecf20Sopenharmony_ci	u32 pdev_set_param_cmdid;
8708c2ecf20Sopenharmony_ci	u32 pdev_pktlog_enable_cmdid;
8718c2ecf20Sopenharmony_ci	u32 pdev_pktlog_disable_cmdid;
8728c2ecf20Sopenharmony_ci	u32 pdev_set_wmm_params_cmdid;
8738c2ecf20Sopenharmony_ci	u32 pdev_set_ht_cap_ie_cmdid;
8748c2ecf20Sopenharmony_ci	u32 pdev_set_vht_cap_ie_cmdid;
8758c2ecf20Sopenharmony_ci	u32 pdev_set_dscp_tid_map_cmdid;
8768c2ecf20Sopenharmony_ci	u32 pdev_set_quiet_mode_cmdid;
8778c2ecf20Sopenharmony_ci	u32 pdev_green_ap_ps_enable_cmdid;
8788c2ecf20Sopenharmony_ci	u32 pdev_get_tpc_config_cmdid;
8798c2ecf20Sopenharmony_ci	u32 pdev_set_base_macaddr_cmdid;
8808c2ecf20Sopenharmony_ci	u32 vdev_create_cmdid;
8818c2ecf20Sopenharmony_ci	u32 vdev_delete_cmdid;
8828c2ecf20Sopenharmony_ci	u32 vdev_start_request_cmdid;
8838c2ecf20Sopenharmony_ci	u32 vdev_restart_request_cmdid;
8848c2ecf20Sopenharmony_ci	u32 vdev_up_cmdid;
8858c2ecf20Sopenharmony_ci	u32 vdev_stop_cmdid;
8868c2ecf20Sopenharmony_ci	u32 vdev_down_cmdid;
8878c2ecf20Sopenharmony_ci	u32 vdev_set_param_cmdid;
8888c2ecf20Sopenharmony_ci	u32 vdev_install_key_cmdid;
8898c2ecf20Sopenharmony_ci	u32 peer_create_cmdid;
8908c2ecf20Sopenharmony_ci	u32 peer_delete_cmdid;
8918c2ecf20Sopenharmony_ci	u32 peer_flush_tids_cmdid;
8928c2ecf20Sopenharmony_ci	u32 peer_set_param_cmdid;
8938c2ecf20Sopenharmony_ci	u32 peer_assoc_cmdid;
8948c2ecf20Sopenharmony_ci	u32 peer_add_wds_entry_cmdid;
8958c2ecf20Sopenharmony_ci	u32 peer_remove_wds_entry_cmdid;
8968c2ecf20Sopenharmony_ci	u32 peer_mcast_group_cmdid;
8978c2ecf20Sopenharmony_ci	u32 bcn_tx_cmdid;
8988c2ecf20Sopenharmony_ci	u32 pdev_send_bcn_cmdid;
8998c2ecf20Sopenharmony_ci	u32 bcn_tmpl_cmdid;
9008c2ecf20Sopenharmony_ci	u32 bcn_filter_rx_cmdid;
9018c2ecf20Sopenharmony_ci	u32 prb_req_filter_rx_cmdid;
9028c2ecf20Sopenharmony_ci	u32 mgmt_tx_cmdid;
9038c2ecf20Sopenharmony_ci	u32 mgmt_tx_send_cmdid;
9048c2ecf20Sopenharmony_ci	u32 prb_tmpl_cmdid;
9058c2ecf20Sopenharmony_ci	u32 addba_clear_resp_cmdid;
9068c2ecf20Sopenharmony_ci	u32 addba_send_cmdid;
9078c2ecf20Sopenharmony_ci	u32 addba_status_cmdid;
9088c2ecf20Sopenharmony_ci	u32 delba_send_cmdid;
9098c2ecf20Sopenharmony_ci	u32 addba_set_resp_cmdid;
9108c2ecf20Sopenharmony_ci	u32 send_singleamsdu_cmdid;
9118c2ecf20Sopenharmony_ci	u32 sta_powersave_mode_cmdid;
9128c2ecf20Sopenharmony_ci	u32 sta_powersave_param_cmdid;
9138c2ecf20Sopenharmony_ci	u32 sta_mimo_ps_mode_cmdid;
9148c2ecf20Sopenharmony_ci	u32 pdev_dfs_enable_cmdid;
9158c2ecf20Sopenharmony_ci	u32 pdev_dfs_disable_cmdid;
9168c2ecf20Sopenharmony_ci	u32 roam_scan_mode;
9178c2ecf20Sopenharmony_ci	u32 roam_scan_rssi_threshold;
9188c2ecf20Sopenharmony_ci	u32 roam_scan_period;
9198c2ecf20Sopenharmony_ci	u32 roam_scan_rssi_change_threshold;
9208c2ecf20Sopenharmony_ci	u32 roam_ap_profile;
9218c2ecf20Sopenharmony_ci	u32 ofl_scan_add_ap_profile;
9228c2ecf20Sopenharmony_ci	u32 ofl_scan_remove_ap_profile;
9238c2ecf20Sopenharmony_ci	u32 ofl_scan_period;
9248c2ecf20Sopenharmony_ci	u32 p2p_dev_set_device_info;
9258c2ecf20Sopenharmony_ci	u32 p2p_dev_set_discoverability;
9268c2ecf20Sopenharmony_ci	u32 p2p_go_set_beacon_ie;
9278c2ecf20Sopenharmony_ci	u32 p2p_go_set_probe_resp_ie;
9288c2ecf20Sopenharmony_ci	u32 p2p_set_vendor_ie_data_cmdid;
9298c2ecf20Sopenharmony_ci	u32 ap_ps_peer_param_cmdid;
9308c2ecf20Sopenharmony_ci	u32 ap_ps_peer_uapsd_coex_cmdid;
9318c2ecf20Sopenharmony_ci	u32 peer_rate_retry_sched_cmdid;
9328c2ecf20Sopenharmony_ci	u32 wlan_profile_trigger_cmdid;
9338c2ecf20Sopenharmony_ci	u32 wlan_profile_set_hist_intvl_cmdid;
9348c2ecf20Sopenharmony_ci	u32 wlan_profile_get_profile_data_cmdid;
9358c2ecf20Sopenharmony_ci	u32 wlan_profile_enable_profile_id_cmdid;
9368c2ecf20Sopenharmony_ci	u32 wlan_profile_list_profile_id_cmdid;
9378c2ecf20Sopenharmony_ci	u32 pdev_suspend_cmdid;
9388c2ecf20Sopenharmony_ci	u32 pdev_resume_cmdid;
9398c2ecf20Sopenharmony_ci	u32 add_bcn_filter_cmdid;
9408c2ecf20Sopenharmony_ci	u32 rmv_bcn_filter_cmdid;
9418c2ecf20Sopenharmony_ci	u32 wow_add_wake_pattern_cmdid;
9428c2ecf20Sopenharmony_ci	u32 wow_del_wake_pattern_cmdid;
9438c2ecf20Sopenharmony_ci	u32 wow_enable_disable_wake_event_cmdid;
9448c2ecf20Sopenharmony_ci	u32 wow_enable_cmdid;
9458c2ecf20Sopenharmony_ci	u32 wow_hostwakeup_from_sleep_cmdid;
9468c2ecf20Sopenharmony_ci	u32 rtt_measreq_cmdid;
9478c2ecf20Sopenharmony_ci	u32 rtt_tsf_cmdid;
9488c2ecf20Sopenharmony_ci	u32 vdev_spectral_scan_configure_cmdid;
9498c2ecf20Sopenharmony_ci	u32 vdev_spectral_scan_enable_cmdid;
9508c2ecf20Sopenharmony_ci	u32 request_stats_cmdid;
9518c2ecf20Sopenharmony_ci	u32 request_peer_stats_info_cmdid;
9528c2ecf20Sopenharmony_ci	u32 set_arp_ns_offload_cmdid;
9538c2ecf20Sopenharmony_ci	u32 network_list_offload_config_cmdid;
9548c2ecf20Sopenharmony_ci	u32 gtk_offload_cmdid;
9558c2ecf20Sopenharmony_ci	u32 csa_offload_enable_cmdid;
9568c2ecf20Sopenharmony_ci	u32 csa_offload_chanswitch_cmdid;
9578c2ecf20Sopenharmony_ci	u32 chatter_set_mode_cmdid;
9588c2ecf20Sopenharmony_ci	u32 peer_tid_addba_cmdid;
9598c2ecf20Sopenharmony_ci	u32 peer_tid_delba_cmdid;
9608c2ecf20Sopenharmony_ci	u32 sta_dtim_ps_method_cmdid;
9618c2ecf20Sopenharmony_ci	u32 sta_uapsd_auto_trig_cmdid;
9628c2ecf20Sopenharmony_ci	u32 sta_keepalive_cmd;
9638c2ecf20Sopenharmony_ci	u32 echo_cmdid;
9648c2ecf20Sopenharmony_ci	u32 pdev_utf_cmdid;
9658c2ecf20Sopenharmony_ci	u32 dbglog_cfg_cmdid;
9668c2ecf20Sopenharmony_ci	u32 pdev_qvit_cmdid;
9678c2ecf20Sopenharmony_ci	u32 pdev_ftm_intg_cmdid;
9688c2ecf20Sopenharmony_ci	u32 vdev_set_keepalive_cmdid;
9698c2ecf20Sopenharmony_ci	u32 vdev_get_keepalive_cmdid;
9708c2ecf20Sopenharmony_ci	u32 force_fw_hang_cmdid;
9718c2ecf20Sopenharmony_ci	u32 gpio_config_cmdid;
9728c2ecf20Sopenharmony_ci	u32 gpio_output_cmdid;
9738c2ecf20Sopenharmony_ci	u32 pdev_get_temperature_cmdid;
9748c2ecf20Sopenharmony_ci	u32 vdev_set_wmm_params_cmdid;
9758c2ecf20Sopenharmony_ci	u32 tdls_set_state_cmdid;
9768c2ecf20Sopenharmony_ci	u32 tdls_peer_update_cmdid;
9778c2ecf20Sopenharmony_ci	u32 adaptive_qcs_cmdid;
9788c2ecf20Sopenharmony_ci	u32 scan_update_request_cmdid;
9798c2ecf20Sopenharmony_ci	u32 vdev_standby_response_cmdid;
9808c2ecf20Sopenharmony_ci	u32 vdev_resume_response_cmdid;
9818c2ecf20Sopenharmony_ci	u32 wlan_peer_caching_add_peer_cmdid;
9828c2ecf20Sopenharmony_ci	u32 wlan_peer_caching_evict_peer_cmdid;
9838c2ecf20Sopenharmony_ci	u32 wlan_peer_caching_restore_peer_cmdid;
9848c2ecf20Sopenharmony_ci	u32 wlan_peer_caching_print_all_peers_info_cmdid;
9858c2ecf20Sopenharmony_ci	u32 peer_update_wds_entry_cmdid;
9868c2ecf20Sopenharmony_ci	u32 peer_add_proxy_sta_entry_cmdid;
9878c2ecf20Sopenharmony_ci	u32 rtt_keepalive_cmdid;
9888c2ecf20Sopenharmony_ci	u32 oem_req_cmdid;
9898c2ecf20Sopenharmony_ci	u32 nan_cmdid;
9908c2ecf20Sopenharmony_ci	u32 vdev_ratemask_cmdid;
9918c2ecf20Sopenharmony_ci	u32 qboost_cfg_cmdid;
9928c2ecf20Sopenharmony_ci	u32 pdev_smart_ant_enable_cmdid;
9938c2ecf20Sopenharmony_ci	u32 pdev_smart_ant_set_rx_antenna_cmdid;
9948c2ecf20Sopenharmony_ci	u32 peer_smart_ant_set_tx_antenna_cmdid;
9958c2ecf20Sopenharmony_ci	u32 peer_smart_ant_set_train_info_cmdid;
9968c2ecf20Sopenharmony_ci	u32 peer_smart_ant_set_node_config_ops_cmdid;
9978c2ecf20Sopenharmony_ci	u32 pdev_set_antenna_switch_table_cmdid;
9988c2ecf20Sopenharmony_ci	u32 pdev_set_ctl_table_cmdid;
9998c2ecf20Sopenharmony_ci	u32 pdev_set_mimogain_table_cmdid;
10008c2ecf20Sopenharmony_ci	u32 pdev_ratepwr_table_cmdid;
10018c2ecf20Sopenharmony_ci	u32 pdev_ratepwr_chainmsk_table_cmdid;
10028c2ecf20Sopenharmony_ci	u32 pdev_fips_cmdid;
10038c2ecf20Sopenharmony_ci	u32 tt_set_conf_cmdid;
10048c2ecf20Sopenharmony_ci	u32 fwtest_cmdid;
10058c2ecf20Sopenharmony_ci	u32 vdev_atf_request_cmdid;
10068c2ecf20Sopenharmony_ci	u32 peer_atf_request_cmdid;
10078c2ecf20Sopenharmony_ci	u32 pdev_get_ani_cck_config_cmdid;
10088c2ecf20Sopenharmony_ci	u32 pdev_get_ani_ofdm_config_cmdid;
10098c2ecf20Sopenharmony_ci	u32 pdev_reserve_ast_entry_cmdid;
10108c2ecf20Sopenharmony_ci	u32 pdev_get_nfcal_power_cmdid;
10118c2ecf20Sopenharmony_ci	u32 pdev_get_tpc_cmdid;
10128c2ecf20Sopenharmony_ci	u32 pdev_get_ast_info_cmdid;
10138c2ecf20Sopenharmony_ci	u32 vdev_set_dscp_tid_map_cmdid;
10148c2ecf20Sopenharmony_ci	u32 pdev_get_info_cmdid;
10158c2ecf20Sopenharmony_ci	u32 vdev_get_info_cmdid;
10168c2ecf20Sopenharmony_ci	u32 vdev_filter_neighbor_rx_packets_cmdid;
10178c2ecf20Sopenharmony_ci	u32 mu_cal_start_cmdid;
10188c2ecf20Sopenharmony_ci	u32 set_cca_params_cmdid;
10198c2ecf20Sopenharmony_ci	u32 pdev_bss_chan_info_request_cmdid;
10208c2ecf20Sopenharmony_ci	u32 pdev_enable_adaptive_cca_cmdid;
10218c2ecf20Sopenharmony_ci	u32 ext_resource_cfg_cmdid;
10228c2ecf20Sopenharmony_ci	u32 vdev_set_ie_cmdid;
10238c2ecf20Sopenharmony_ci	u32 set_lteu_config_cmdid;
10248c2ecf20Sopenharmony_ci	u32 atf_ssid_grouping_request_cmdid;
10258c2ecf20Sopenharmony_ci	u32 peer_atf_ext_request_cmdid;
10268c2ecf20Sopenharmony_ci	u32 set_periodic_channel_stats_cfg_cmdid;
10278c2ecf20Sopenharmony_ci	u32 peer_bwf_request_cmdid;
10288c2ecf20Sopenharmony_ci	u32 btcoex_cfg_cmdid;
10298c2ecf20Sopenharmony_ci	u32 peer_tx_mu_txmit_count_cmdid;
10308c2ecf20Sopenharmony_ci	u32 peer_tx_mu_txmit_rstcnt_cmdid;
10318c2ecf20Sopenharmony_ci	u32 peer_gid_userpos_list_cmdid;
10328c2ecf20Sopenharmony_ci	u32 pdev_check_cal_version_cmdid;
10338c2ecf20Sopenharmony_ci	u32 coex_version_cfg_cmid;
10348c2ecf20Sopenharmony_ci	u32 pdev_get_rx_filter_cmdid;
10358c2ecf20Sopenharmony_ci	u32 pdev_extended_nss_cfg_cmdid;
10368c2ecf20Sopenharmony_ci	u32 vdev_set_scan_nac_rssi_cmdid;
10378c2ecf20Sopenharmony_ci	u32 prog_gpio_band_select_cmdid;
10388c2ecf20Sopenharmony_ci	u32 config_smart_logging_cmdid;
10398c2ecf20Sopenharmony_ci	u32 debug_fatal_condition_cmdid;
10408c2ecf20Sopenharmony_ci	u32 get_tsf_timer_cmdid;
10418c2ecf20Sopenharmony_ci	u32 pdev_get_tpc_table_cmdid;
10428c2ecf20Sopenharmony_ci	u32 vdev_sifs_trigger_time_cmdid;
10438c2ecf20Sopenharmony_ci	u32 pdev_wds_entry_list_cmdid;
10448c2ecf20Sopenharmony_ci	u32 tdls_set_offchan_mode_cmdid;
10458c2ecf20Sopenharmony_ci	u32 radar_found_cmdid;
10468c2ecf20Sopenharmony_ci	u32 set_bb_timing_cmdid;
10478c2ecf20Sopenharmony_ci	u32 per_peer_per_tid_config_cmdid;
10488c2ecf20Sopenharmony_ci};
10498c2ecf20Sopenharmony_ci
10508c2ecf20Sopenharmony_ci/*
10518c2ecf20Sopenharmony_ci * wmi command groups.
10528c2ecf20Sopenharmony_ci */
10538c2ecf20Sopenharmony_cienum wmi_cmd_group {
10548c2ecf20Sopenharmony_ci	/* 0 to 2 are reserved */
10558c2ecf20Sopenharmony_ci	WMI_GRP_START = 0x3,
10568c2ecf20Sopenharmony_ci	WMI_GRP_SCAN = WMI_GRP_START,
10578c2ecf20Sopenharmony_ci	WMI_GRP_PDEV,
10588c2ecf20Sopenharmony_ci	WMI_GRP_VDEV,
10598c2ecf20Sopenharmony_ci	WMI_GRP_PEER,
10608c2ecf20Sopenharmony_ci	WMI_GRP_MGMT,
10618c2ecf20Sopenharmony_ci	WMI_GRP_BA_NEG,
10628c2ecf20Sopenharmony_ci	WMI_GRP_STA_PS,
10638c2ecf20Sopenharmony_ci	WMI_GRP_DFS,
10648c2ecf20Sopenharmony_ci	WMI_GRP_ROAM,
10658c2ecf20Sopenharmony_ci	WMI_GRP_OFL_SCAN,
10668c2ecf20Sopenharmony_ci	WMI_GRP_P2P,
10678c2ecf20Sopenharmony_ci	WMI_GRP_AP_PS,
10688c2ecf20Sopenharmony_ci	WMI_GRP_RATE_CTRL,
10698c2ecf20Sopenharmony_ci	WMI_GRP_PROFILE,
10708c2ecf20Sopenharmony_ci	WMI_GRP_SUSPEND,
10718c2ecf20Sopenharmony_ci	WMI_GRP_BCN_FILTER,
10728c2ecf20Sopenharmony_ci	WMI_GRP_WOW,
10738c2ecf20Sopenharmony_ci	WMI_GRP_RTT,
10748c2ecf20Sopenharmony_ci	WMI_GRP_SPECTRAL,
10758c2ecf20Sopenharmony_ci	WMI_GRP_STATS,
10768c2ecf20Sopenharmony_ci	WMI_GRP_ARP_NS_OFL,
10778c2ecf20Sopenharmony_ci	WMI_GRP_NLO_OFL,
10788c2ecf20Sopenharmony_ci	WMI_GRP_GTK_OFL,
10798c2ecf20Sopenharmony_ci	WMI_GRP_CSA_OFL,
10808c2ecf20Sopenharmony_ci	WMI_GRP_CHATTER,
10818c2ecf20Sopenharmony_ci	WMI_GRP_TID_ADDBA,
10828c2ecf20Sopenharmony_ci	WMI_GRP_MISC,
10838c2ecf20Sopenharmony_ci	WMI_GRP_GPIO,
10848c2ecf20Sopenharmony_ci};
10858c2ecf20Sopenharmony_ci
10868c2ecf20Sopenharmony_ci#define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
10878c2ecf20Sopenharmony_ci#define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
10888c2ecf20Sopenharmony_ci
10898c2ecf20Sopenharmony_ci#define WMI_CMD_UNSUPPORTED 0
10908c2ecf20Sopenharmony_ci
10918c2ecf20Sopenharmony_ci/* Command IDs and command events for MAIN FW. */
10928c2ecf20Sopenharmony_cienum wmi_cmd_id {
10938c2ecf20Sopenharmony_ci	WMI_INIT_CMDID = 0x1,
10948c2ecf20Sopenharmony_ci
10958c2ecf20Sopenharmony_ci	/* Scan specific commands */
10968c2ecf20Sopenharmony_ci	WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
10978c2ecf20Sopenharmony_ci	WMI_STOP_SCAN_CMDID,
10988c2ecf20Sopenharmony_ci	WMI_SCAN_CHAN_LIST_CMDID,
10998c2ecf20Sopenharmony_ci	WMI_SCAN_SCH_PRIO_TBL_CMDID,
11008c2ecf20Sopenharmony_ci
11018c2ecf20Sopenharmony_ci	/* PDEV (physical device) specific commands */
11028c2ecf20Sopenharmony_ci	WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
11038c2ecf20Sopenharmony_ci	WMI_PDEV_SET_CHANNEL_CMDID,
11048c2ecf20Sopenharmony_ci	WMI_PDEV_SET_PARAM_CMDID,
11058c2ecf20Sopenharmony_ci	WMI_PDEV_PKTLOG_ENABLE_CMDID,
11068c2ecf20Sopenharmony_ci	WMI_PDEV_PKTLOG_DISABLE_CMDID,
11078c2ecf20Sopenharmony_ci	WMI_PDEV_SET_WMM_PARAMS_CMDID,
11088c2ecf20Sopenharmony_ci	WMI_PDEV_SET_HT_CAP_IE_CMDID,
11098c2ecf20Sopenharmony_ci	WMI_PDEV_SET_VHT_CAP_IE_CMDID,
11108c2ecf20Sopenharmony_ci	WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
11118c2ecf20Sopenharmony_ci	WMI_PDEV_SET_QUIET_MODE_CMDID,
11128c2ecf20Sopenharmony_ci	WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
11138c2ecf20Sopenharmony_ci	WMI_PDEV_GET_TPC_CONFIG_CMDID,
11148c2ecf20Sopenharmony_ci	WMI_PDEV_SET_BASE_MACADDR_CMDID,
11158c2ecf20Sopenharmony_ci
11168c2ecf20Sopenharmony_ci	/* VDEV (virtual device) specific commands */
11178c2ecf20Sopenharmony_ci	WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
11188c2ecf20Sopenharmony_ci	WMI_VDEV_DELETE_CMDID,
11198c2ecf20Sopenharmony_ci	WMI_VDEV_START_REQUEST_CMDID,
11208c2ecf20Sopenharmony_ci	WMI_VDEV_RESTART_REQUEST_CMDID,
11218c2ecf20Sopenharmony_ci	WMI_VDEV_UP_CMDID,
11228c2ecf20Sopenharmony_ci	WMI_VDEV_STOP_CMDID,
11238c2ecf20Sopenharmony_ci	WMI_VDEV_DOWN_CMDID,
11248c2ecf20Sopenharmony_ci	WMI_VDEV_SET_PARAM_CMDID,
11258c2ecf20Sopenharmony_ci	WMI_VDEV_INSTALL_KEY_CMDID,
11268c2ecf20Sopenharmony_ci
11278c2ecf20Sopenharmony_ci	/* peer specific commands */
11288c2ecf20Sopenharmony_ci	WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
11298c2ecf20Sopenharmony_ci	WMI_PEER_DELETE_CMDID,
11308c2ecf20Sopenharmony_ci	WMI_PEER_FLUSH_TIDS_CMDID,
11318c2ecf20Sopenharmony_ci	WMI_PEER_SET_PARAM_CMDID,
11328c2ecf20Sopenharmony_ci	WMI_PEER_ASSOC_CMDID,
11338c2ecf20Sopenharmony_ci	WMI_PEER_ADD_WDS_ENTRY_CMDID,
11348c2ecf20Sopenharmony_ci	WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
11358c2ecf20Sopenharmony_ci	WMI_PEER_MCAST_GROUP_CMDID,
11368c2ecf20Sopenharmony_ci
11378c2ecf20Sopenharmony_ci	/* beacon/management specific commands */
11388c2ecf20Sopenharmony_ci	WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
11398c2ecf20Sopenharmony_ci	WMI_PDEV_SEND_BCN_CMDID,
11408c2ecf20Sopenharmony_ci	WMI_BCN_TMPL_CMDID,
11418c2ecf20Sopenharmony_ci	WMI_BCN_FILTER_RX_CMDID,
11428c2ecf20Sopenharmony_ci	WMI_PRB_REQ_FILTER_RX_CMDID,
11438c2ecf20Sopenharmony_ci	WMI_MGMT_TX_CMDID,
11448c2ecf20Sopenharmony_ci	WMI_PRB_TMPL_CMDID,
11458c2ecf20Sopenharmony_ci
11468c2ecf20Sopenharmony_ci	/* commands to directly control BA negotiation directly from host. */
11478c2ecf20Sopenharmony_ci	WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
11488c2ecf20Sopenharmony_ci	WMI_ADDBA_SEND_CMDID,
11498c2ecf20Sopenharmony_ci	WMI_ADDBA_STATUS_CMDID,
11508c2ecf20Sopenharmony_ci	WMI_DELBA_SEND_CMDID,
11518c2ecf20Sopenharmony_ci	WMI_ADDBA_SET_RESP_CMDID,
11528c2ecf20Sopenharmony_ci	WMI_SEND_SINGLEAMSDU_CMDID,
11538c2ecf20Sopenharmony_ci
11548c2ecf20Sopenharmony_ci	/* Station power save specific config */
11558c2ecf20Sopenharmony_ci	WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
11568c2ecf20Sopenharmony_ci	WMI_STA_POWERSAVE_PARAM_CMDID,
11578c2ecf20Sopenharmony_ci	WMI_STA_MIMO_PS_MODE_CMDID,
11588c2ecf20Sopenharmony_ci
11598c2ecf20Sopenharmony_ci	/** DFS-specific commands */
11608c2ecf20Sopenharmony_ci	WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
11618c2ecf20Sopenharmony_ci	WMI_PDEV_DFS_DISABLE_CMDID,
11628c2ecf20Sopenharmony_ci
11638c2ecf20Sopenharmony_ci	/* Roaming specific  commands */
11648c2ecf20Sopenharmony_ci	WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
11658c2ecf20Sopenharmony_ci	WMI_ROAM_SCAN_RSSI_THRESHOLD,
11668c2ecf20Sopenharmony_ci	WMI_ROAM_SCAN_PERIOD,
11678c2ecf20Sopenharmony_ci	WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
11688c2ecf20Sopenharmony_ci	WMI_ROAM_AP_PROFILE,
11698c2ecf20Sopenharmony_ci
11708c2ecf20Sopenharmony_ci	/* offload scan specific commands */
11718c2ecf20Sopenharmony_ci	WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
11728c2ecf20Sopenharmony_ci	WMI_OFL_SCAN_REMOVE_AP_PROFILE,
11738c2ecf20Sopenharmony_ci	WMI_OFL_SCAN_PERIOD,
11748c2ecf20Sopenharmony_ci
11758c2ecf20Sopenharmony_ci	/* P2P specific commands */
11768c2ecf20Sopenharmony_ci	WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
11778c2ecf20Sopenharmony_ci	WMI_P2P_DEV_SET_DISCOVERABILITY,
11788c2ecf20Sopenharmony_ci	WMI_P2P_GO_SET_BEACON_IE,
11798c2ecf20Sopenharmony_ci	WMI_P2P_GO_SET_PROBE_RESP_IE,
11808c2ecf20Sopenharmony_ci	WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
11818c2ecf20Sopenharmony_ci
11828c2ecf20Sopenharmony_ci	/* AP power save specific config */
11838c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
11848c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
11858c2ecf20Sopenharmony_ci
11868c2ecf20Sopenharmony_ci	/* Rate-control specific commands */
11878c2ecf20Sopenharmony_ci	WMI_PEER_RATE_RETRY_SCHED_CMDID =
11888c2ecf20Sopenharmony_ci	WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
11898c2ecf20Sopenharmony_ci
11908c2ecf20Sopenharmony_ci	/* WLAN Profiling commands. */
11918c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
11928c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
11938c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
11948c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
11958c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
11968c2ecf20Sopenharmony_ci
11978c2ecf20Sopenharmony_ci	/* Suspend resume command Ids */
11988c2ecf20Sopenharmony_ci	WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
11998c2ecf20Sopenharmony_ci	WMI_PDEV_RESUME_CMDID,
12008c2ecf20Sopenharmony_ci
12018c2ecf20Sopenharmony_ci	/* Beacon filter commands */
12028c2ecf20Sopenharmony_ci	WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
12038c2ecf20Sopenharmony_ci	WMI_RMV_BCN_FILTER_CMDID,
12048c2ecf20Sopenharmony_ci
12058c2ecf20Sopenharmony_ci	/* WOW Specific WMI commands*/
12068c2ecf20Sopenharmony_ci	WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
12078c2ecf20Sopenharmony_ci	WMI_WOW_DEL_WAKE_PATTERN_CMDID,
12088c2ecf20Sopenharmony_ci	WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
12098c2ecf20Sopenharmony_ci	WMI_WOW_ENABLE_CMDID,
12108c2ecf20Sopenharmony_ci	WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
12118c2ecf20Sopenharmony_ci
12128c2ecf20Sopenharmony_ci	/* RTT measurement related cmd */
12138c2ecf20Sopenharmony_ci	WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
12148c2ecf20Sopenharmony_ci	WMI_RTT_TSF_CMDID,
12158c2ecf20Sopenharmony_ci
12168c2ecf20Sopenharmony_ci	/* spectral scan commands */
12178c2ecf20Sopenharmony_ci	WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
12188c2ecf20Sopenharmony_ci	WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
12198c2ecf20Sopenharmony_ci
12208c2ecf20Sopenharmony_ci	/* F/W stats */
12218c2ecf20Sopenharmony_ci	WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
12228c2ecf20Sopenharmony_ci
12238c2ecf20Sopenharmony_ci	/* ARP OFFLOAD REQUEST*/
12248c2ecf20Sopenharmony_ci	WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
12258c2ecf20Sopenharmony_ci
12268c2ecf20Sopenharmony_ci	/* NS offload confid*/
12278c2ecf20Sopenharmony_ci	WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
12288c2ecf20Sopenharmony_ci
12298c2ecf20Sopenharmony_ci	/* GTK offload Specific WMI commands*/
12308c2ecf20Sopenharmony_ci	WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
12318c2ecf20Sopenharmony_ci
12328c2ecf20Sopenharmony_ci	/* CSA offload Specific WMI commands*/
12338c2ecf20Sopenharmony_ci	WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
12348c2ecf20Sopenharmony_ci	WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
12358c2ecf20Sopenharmony_ci
12368c2ecf20Sopenharmony_ci	/* Chatter commands*/
12378c2ecf20Sopenharmony_ci	WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
12388c2ecf20Sopenharmony_ci
12398c2ecf20Sopenharmony_ci	/* addba specific commands */
12408c2ecf20Sopenharmony_ci	WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
12418c2ecf20Sopenharmony_ci	WMI_PEER_TID_DELBA_CMDID,
12428c2ecf20Sopenharmony_ci
12438c2ecf20Sopenharmony_ci	/* set station mimo powersave method */
12448c2ecf20Sopenharmony_ci	WMI_STA_DTIM_PS_METHOD_CMDID,
12458c2ecf20Sopenharmony_ci	/* Configure the Station UAPSD AC Auto Trigger Parameters */
12468c2ecf20Sopenharmony_ci	WMI_STA_UAPSD_AUTO_TRIG_CMDID,
12478c2ecf20Sopenharmony_ci
12488c2ecf20Sopenharmony_ci	/* STA Keep alive parameter configuration,
12498c2ecf20Sopenharmony_ci	 * Requires WMI_SERVICE_STA_KEEP_ALIVE
12508c2ecf20Sopenharmony_ci	 */
12518c2ecf20Sopenharmony_ci	WMI_STA_KEEPALIVE_CMD,
12528c2ecf20Sopenharmony_ci
12538c2ecf20Sopenharmony_ci	/* misc command group */
12548c2ecf20Sopenharmony_ci	WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
12558c2ecf20Sopenharmony_ci	WMI_PDEV_UTF_CMDID,
12568c2ecf20Sopenharmony_ci	WMI_DBGLOG_CFG_CMDID,
12578c2ecf20Sopenharmony_ci	WMI_PDEV_QVIT_CMDID,
12588c2ecf20Sopenharmony_ci	WMI_PDEV_FTM_INTG_CMDID,
12598c2ecf20Sopenharmony_ci	WMI_VDEV_SET_KEEPALIVE_CMDID,
12608c2ecf20Sopenharmony_ci	WMI_VDEV_GET_KEEPALIVE_CMDID,
12618c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_CMDID,
12628c2ecf20Sopenharmony_ci
12638c2ecf20Sopenharmony_ci	/* GPIO Configuration */
12648c2ecf20Sopenharmony_ci	WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
12658c2ecf20Sopenharmony_ci	WMI_GPIO_OUTPUT_CMDID,
12668c2ecf20Sopenharmony_ci};
12678c2ecf20Sopenharmony_ci
12688c2ecf20Sopenharmony_cienum wmi_event_id {
12698c2ecf20Sopenharmony_ci	WMI_SERVICE_READY_EVENTID = 0x1,
12708c2ecf20Sopenharmony_ci	WMI_READY_EVENTID,
12718c2ecf20Sopenharmony_ci	WMI_SERVICE_AVAILABLE_EVENTID,
12728c2ecf20Sopenharmony_ci
12738c2ecf20Sopenharmony_ci	/* Scan specific events */
12748c2ecf20Sopenharmony_ci	WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
12758c2ecf20Sopenharmony_ci
12768c2ecf20Sopenharmony_ci	/* PDEV specific events */
12778c2ecf20Sopenharmony_ci	WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
12788c2ecf20Sopenharmony_ci	WMI_CHAN_INFO_EVENTID,
12798c2ecf20Sopenharmony_ci	WMI_PHYERR_EVENTID,
12808c2ecf20Sopenharmony_ci
12818c2ecf20Sopenharmony_ci	/* VDEV specific events */
12828c2ecf20Sopenharmony_ci	WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
12838c2ecf20Sopenharmony_ci	WMI_VDEV_STOPPED_EVENTID,
12848c2ecf20Sopenharmony_ci	WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
12858c2ecf20Sopenharmony_ci
12868c2ecf20Sopenharmony_ci	/* peer specific events */
12878c2ecf20Sopenharmony_ci	WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
12888c2ecf20Sopenharmony_ci
12898c2ecf20Sopenharmony_ci	/* beacon/mgmt specific events */
12908c2ecf20Sopenharmony_ci	WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
12918c2ecf20Sopenharmony_ci	WMI_HOST_SWBA_EVENTID,
12928c2ecf20Sopenharmony_ci	WMI_TBTTOFFSET_UPDATE_EVENTID,
12938c2ecf20Sopenharmony_ci
12948c2ecf20Sopenharmony_ci	/* ADDBA Related WMI Events*/
12958c2ecf20Sopenharmony_ci	WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
12968c2ecf20Sopenharmony_ci	WMI_TX_ADDBA_COMPLETE_EVENTID,
12978c2ecf20Sopenharmony_ci
12988c2ecf20Sopenharmony_ci	/* Roam event to trigger roaming on host */
12998c2ecf20Sopenharmony_ci	WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
13008c2ecf20Sopenharmony_ci	WMI_PROFILE_MATCH,
13018c2ecf20Sopenharmony_ci
13028c2ecf20Sopenharmony_ci	/* WoW */
13038c2ecf20Sopenharmony_ci	WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
13048c2ecf20Sopenharmony_ci
13058c2ecf20Sopenharmony_ci	/* RTT */
13068c2ecf20Sopenharmony_ci	WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
13078c2ecf20Sopenharmony_ci	WMI_TSF_MEASUREMENT_REPORT_EVENTID,
13088c2ecf20Sopenharmony_ci	WMI_RTT_ERROR_REPORT_EVENTID,
13098c2ecf20Sopenharmony_ci
13108c2ecf20Sopenharmony_ci	/* GTK offload */
13118c2ecf20Sopenharmony_ci	WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
13128c2ecf20Sopenharmony_ci	WMI_GTK_REKEY_FAIL_EVENTID,
13138c2ecf20Sopenharmony_ci
13148c2ecf20Sopenharmony_ci	/* CSA IE received event */
13158c2ecf20Sopenharmony_ci	WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
13168c2ecf20Sopenharmony_ci
13178c2ecf20Sopenharmony_ci	/* Misc events */
13188c2ecf20Sopenharmony_ci	WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
13198c2ecf20Sopenharmony_ci	WMI_PDEV_UTF_EVENTID,
13208c2ecf20Sopenharmony_ci	WMI_DEBUG_MESG_EVENTID,
13218c2ecf20Sopenharmony_ci	WMI_UPDATE_STATS_EVENTID,
13228c2ecf20Sopenharmony_ci	WMI_DEBUG_PRINT_EVENTID,
13238c2ecf20Sopenharmony_ci	WMI_DCS_INTERFERENCE_EVENTID,
13248c2ecf20Sopenharmony_ci	WMI_PDEV_QVIT_EVENTID,
13258c2ecf20Sopenharmony_ci	WMI_WLAN_PROFILE_DATA_EVENTID,
13268c2ecf20Sopenharmony_ci	WMI_PDEV_FTM_INTG_EVENTID,
13278c2ecf20Sopenharmony_ci	WMI_WLAN_FREQ_AVOID_EVENTID,
13288c2ecf20Sopenharmony_ci	WMI_VDEV_GET_KEEPALIVE_EVENTID,
13298c2ecf20Sopenharmony_ci
13308c2ecf20Sopenharmony_ci	/* GPIO Event */
13318c2ecf20Sopenharmony_ci	WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
13328c2ecf20Sopenharmony_ci};
13338c2ecf20Sopenharmony_ci
13348c2ecf20Sopenharmony_ci/* Command IDs and command events for 10.X firmware */
13358c2ecf20Sopenharmony_cienum wmi_10x_cmd_id {
13368c2ecf20Sopenharmony_ci	WMI_10X_START_CMDID = 0x9000,
13378c2ecf20Sopenharmony_ci	WMI_10X_END_CMDID = 0x9FFF,
13388c2ecf20Sopenharmony_ci
13398c2ecf20Sopenharmony_ci	/* initialize the wlan sub system */
13408c2ecf20Sopenharmony_ci	WMI_10X_INIT_CMDID,
13418c2ecf20Sopenharmony_ci
13428c2ecf20Sopenharmony_ci	/* Scan specific commands */
13438c2ecf20Sopenharmony_ci
13448c2ecf20Sopenharmony_ci	WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
13458c2ecf20Sopenharmony_ci	WMI_10X_STOP_SCAN_CMDID,
13468c2ecf20Sopenharmony_ci	WMI_10X_SCAN_CHAN_LIST_CMDID,
13478c2ecf20Sopenharmony_ci	WMI_10X_ECHO_CMDID,
13488c2ecf20Sopenharmony_ci
13498c2ecf20Sopenharmony_ci	/* PDEV(physical device) specific commands */
13508c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
13518c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_CHANNEL_CMDID,
13528c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_PARAM_CMDID,
13538c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
13548c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
13558c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
13568c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
13578c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
13588c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
13598c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
13608c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
13618c2ecf20Sopenharmony_ci	WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
13628c2ecf20Sopenharmony_ci	WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
13638c2ecf20Sopenharmony_ci
13648c2ecf20Sopenharmony_ci	/* VDEV(virtual device) specific commands */
13658c2ecf20Sopenharmony_ci	WMI_10X_VDEV_CREATE_CMDID,
13668c2ecf20Sopenharmony_ci	WMI_10X_VDEV_DELETE_CMDID,
13678c2ecf20Sopenharmony_ci	WMI_10X_VDEV_START_REQUEST_CMDID,
13688c2ecf20Sopenharmony_ci	WMI_10X_VDEV_RESTART_REQUEST_CMDID,
13698c2ecf20Sopenharmony_ci	WMI_10X_VDEV_UP_CMDID,
13708c2ecf20Sopenharmony_ci	WMI_10X_VDEV_STOP_CMDID,
13718c2ecf20Sopenharmony_ci	WMI_10X_VDEV_DOWN_CMDID,
13728c2ecf20Sopenharmony_ci	WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
13738c2ecf20Sopenharmony_ci	WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
13748c2ecf20Sopenharmony_ci	WMI_10X_VDEV_SET_PARAM_CMDID,
13758c2ecf20Sopenharmony_ci	WMI_10X_VDEV_INSTALL_KEY_CMDID,
13768c2ecf20Sopenharmony_ci
13778c2ecf20Sopenharmony_ci	/* peer specific commands */
13788c2ecf20Sopenharmony_ci	WMI_10X_PEER_CREATE_CMDID,
13798c2ecf20Sopenharmony_ci	WMI_10X_PEER_DELETE_CMDID,
13808c2ecf20Sopenharmony_ci	WMI_10X_PEER_FLUSH_TIDS_CMDID,
13818c2ecf20Sopenharmony_ci	WMI_10X_PEER_SET_PARAM_CMDID,
13828c2ecf20Sopenharmony_ci	WMI_10X_PEER_ASSOC_CMDID,
13838c2ecf20Sopenharmony_ci	WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
13848c2ecf20Sopenharmony_ci	WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
13858c2ecf20Sopenharmony_ci	WMI_10X_PEER_MCAST_GROUP_CMDID,
13868c2ecf20Sopenharmony_ci
13878c2ecf20Sopenharmony_ci	/* beacon/management specific commands */
13888c2ecf20Sopenharmony_ci
13898c2ecf20Sopenharmony_ci	WMI_10X_BCN_TX_CMDID,
13908c2ecf20Sopenharmony_ci	WMI_10X_BCN_PRB_TMPL_CMDID,
13918c2ecf20Sopenharmony_ci	WMI_10X_BCN_FILTER_RX_CMDID,
13928c2ecf20Sopenharmony_ci	WMI_10X_PRB_REQ_FILTER_RX_CMDID,
13938c2ecf20Sopenharmony_ci	WMI_10X_MGMT_TX_CMDID,
13948c2ecf20Sopenharmony_ci
13958c2ecf20Sopenharmony_ci	/* commands to directly control ba negotiation directly from host. */
13968c2ecf20Sopenharmony_ci	WMI_10X_ADDBA_CLEAR_RESP_CMDID,
13978c2ecf20Sopenharmony_ci	WMI_10X_ADDBA_SEND_CMDID,
13988c2ecf20Sopenharmony_ci	WMI_10X_ADDBA_STATUS_CMDID,
13998c2ecf20Sopenharmony_ci	WMI_10X_DELBA_SEND_CMDID,
14008c2ecf20Sopenharmony_ci	WMI_10X_ADDBA_SET_RESP_CMDID,
14018c2ecf20Sopenharmony_ci	WMI_10X_SEND_SINGLEAMSDU_CMDID,
14028c2ecf20Sopenharmony_ci
14038c2ecf20Sopenharmony_ci	/* Station power save specific config */
14048c2ecf20Sopenharmony_ci	WMI_10X_STA_POWERSAVE_MODE_CMDID,
14058c2ecf20Sopenharmony_ci	WMI_10X_STA_POWERSAVE_PARAM_CMDID,
14068c2ecf20Sopenharmony_ci	WMI_10X_STA_MIMO_PS_MODE_CMDID,
14078c2ecf20Sopenharmony_ci
14088c2ecf20Sopenharmony_ci	/* set debug log config */
14098c2ecf20Sopenharmony_ci	WMI_10X_DBGLOG_CFG_CMDID,
14108c2ecf20Sopenharmony_ci
14118c2ecf20Sopenharmony_ci	/* DFS-specific commands */
14128c2ecf20Sopenharmony_ci	WMI_10X_PDEV_DFS_ENABLE_CMDID,
14138c2ecf20Sopenharmony_ci	WMI_10X_PDEV_DFS_DISABLE_CMDID,
14148c2ecf20Sopenharmony_ci
14158c2ecf20Sopenharmony_ci	/* QVIT specific command id */
14168c2ecf20Sopenharmony_ci	WMI_10X_PDEV_QVIT_CMDID,
14178c2ecf20Sopenharmony_ci
14188c2ecf20Sopenharmony_ci	/* Offload Scan and Roaming related  commands */
14198c2ecf20Sopenharmony_ci	WMI_10X_ROAM_SCAN_MODE,
14208c2ecf20Sopenharmony_ci	WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
14218c2ecf20Sopenharmony_ci	WMI_10X_ROAM_SCAN_PERIOD,
14228c2ecf20Sopenharmony_ci	WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
14238c2ecf20Sopenharmony_ci	WMI_10X_ROAM_AP_PROFILE,
14248c2ecf20Sopenharmony_ci	WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
14258c2ecf20Sopenharmony_ci	WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
14268c2ecf20Sopenharmony_ci	WMI_10X_OFL_SCAN_PERIOD,
14278c2ecf20Sopenharmony_ci
14288c2ecf20Sopenharmony_ci	/* P2P specific commands */
14298c2ecf20Sopenharmony_ci	WMI_10X_P2P_DEV_SET_DEVICE_INFO,
14308c2ecf20Sopenharmony_ci	WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
14318c2ecf20Sopenharmony_ci	WMI_10X_P2P_GO_SET_BEACON_IE,
14328c2ecf20Sopenharmony_ci	WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
14338c2ecf20Sopenharmony_ci
14348c2ecf20Sopenharmony_ci	/* AP power save specific config */
14358c2ecf20Sopenharmony_ci	WMI_10X_AP_PS_PEER_PARAM_CMDID,
14368c2ecf20Sopenharmony_ci	WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
14378c2ecf20Sopenharmony_ci
14388c2ecf20Sopenharmony_ci	/* Rate-control specific commands */
14398c2ecf20Sopenharmony_ci	WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
14408c2ecf20Sopenharmony_ci
14418c2ecf20Sopenharmony_ci	/* WLAN Profiling commands. */
14428c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
14438c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
14448c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
14458c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
14468c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
14478c2ecf20Sopenharmony_ci
14488c2ecf20Sopenharmony_ci	/* Suspend resume command Ids */
14498c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SUSPEND_CMDID,
14508c2ecf20Sopenharmony_ci	WMI_10X_PDEV_RESUME_CMDID,
14518c2ecf20Sopenharmony_ci
14528c2ecf20Sopenharmony_ci	/* Beacon filter commands */
14538c2ecf20Sopenharmony_ci	WMI_10X_ADD_BCN_FILTER_CMDID,
14548c2ecf20Sopenharmony_ci	WMI_10X_RMV_BCN_FILTER_CMDID,
14558c2ecf20Sopenharmony_ci
14568c2ecf20Sopenharmony_ci	/* WOW Specific WMI commands*/
14578c2ecf20Sopenharmony_ci	WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
14588c2ecf20Sopenharmony_ci	WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
14598c2ecf20Sopenharmony_ci	WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
14608c2ecf20Sopenharmony_ci	WMI_10X_WOW_ENABLE_CMDID,
14618c2ecf20Sopenharmony_ci	WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
14628c2ecf20Sopenharmony_ci
14638c2ecf20Sopenharmony_ci	/* RTT measurement related cmd */
14648c2ecf20Sopenharmony_ci	WMI_10X_RTT_MEASREQ_CMDID,
14658c2ecf20Sopenharmony_ci	WMI_10X_RTT_TSF_CMDID,
14668c2ecf20Sopenharmony_ci
14678c2ecf20Sopenharmony_ci	/* transmit beacon by value */
14688c2ecf20Sopenharmony_ci	WMI_10X_PDEV_SEND_BCN_CMDID,
14698c2ecf20Sopenharmony_ci
14708c2ecf20Sopenharmony_ci	/* F/W stats */
14718c2ecf20Sopenharmony_ci	WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
14728c2ecf20Sopenharmony_ci	WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
14738c2ecf20Sopenharmony_ci	WMI_10X_REQUEST_STATS_CMDID,
14748c2ecf20Sopenharmony_ci
14758c2ecf20Sopenharmony_ci	/* GPIO Configuration */
14768c2ecf20Sopenharmony_ci	WMI_10X_GPIO_CONFIG_CMDID,
14778c2ecf20Sopenharmony_ci	WMI_10X_GPIO_OUTPUT_CMDID,
14788c2ecf20Sopenharmony_ci
14798c2ecf20Sopenharmony_ci	WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
14808c2ecf20Sopenharmony_ci};
14818c2ecf20Sopenharmony_ci
14828c2ecf20Sopenharmony_cienum wmi_10x_event_id {
14838c2ecf20Sopenharmony_ci	WMI_10X_SERVICE_READY_EVENTID = 0x8000,
14848c2ecf20Sopenharmony_ci	WMI_10X_READY_EVENTID,
14858c2ecf20Sopenharmony_ci	WMI_10X_START_EVENTID = 0x9000,
14868c2ecf20Sopenharmony_ci	WMI_10X_END_EVENTID = 0x9FFF,
14878c2ecf20Sopenharmony_ci
14888c2ecf20Sopenharmony_ci	/* Scan specific events */
14898c2ecf20Sopenharmony_ci	WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
14908c2ecf20Sopenharmony_ci	WMI_10X_ECHO_EVENTID,
14918c2ecf20Sopenharmony_ci	WMI_10X_DEBUG_MESG_EVENTID,
14928c2ecf20Sopenharmony_ci	WMI_10X_UPDATE_STATS_EVENTID,
14938c2ecf20Sopenharmony_ci
14948c2ecf20Sopenharmony_ci	/* Instantaneous RSSI event */
14958c2ecf20Sopenharmony_ci	WMI_10X_INST_RSSI_STATS_EVENTID,
14968c2ecf20Sopenharmony_ci
14978c2ecf20Sopenharmony_ci	/* VDEV specific events */
14988c2ecf20Sopenharmony_ci	WMI_10X_VDEV_START_RESP_EVENTID,
14998c2ecf20Sopenharmony_ci	WMI_10X_VDEV_STANDBY_REQ_EVENTID,
15008c2ecf20Sopenharmony_ci	WMI_10X_VDEV_RESUME_REQ_EVENTID,
15018c2ecf20Sopenharmony_ci	WMI_10X_VDEV_STOPPED_EVENTID,
15028c2ecf20Sopenharmony_ci
15038c2ecf20Sopenharmony_ci	/* peer  specific events */
15048c2ecf20Sopenharmony_ci	WMI_10X_PEER_STA_KICKOUT_EVENTID,
15058c2ecf20Sopenharmony_ci
15068c2ecf20Sopenharmony_ci	/* beacon/mgmt specific events */
15078c2ecf20Sopenharmony_ci	WMI_10X_HOST_SWBA_EVENTID,
15088c2ecf20Sopenharmony_ci	WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
15098c2ecf20Sopenharmony_ci	WMI_10X_MGMT_RX_EVENTID,
15108c2ecf20Sopenharmony_ci
15118c2ecf20Sopenharmony_ci	/* Channel stats event */
15128c2ecf20Sopenharmony_ci	WMI_10X_CHAN_INFO_EVENTID,
15138c2ecf20Sopenharmony_ci
15148c2ecf20Sopenharmony_ci	/* PHY Error specific WMI event */
15158c2ecf20Sopenharmony_ci	WMI_10X_PHYERR_EVENTID,
15168c2ecf20Sopenharmony_ci
15178c2ecf20Sopenharmony_ci	/* Roam event to trigger roaming on host */
15188c2ecf20Sopenharmony_ci	WMI_10X_ROAM_EVENTID,
15198c2ecf20Sopenharmony_ci
15208c2ecf20Sopenharmony_ci	/* matching AP found from list of profiles */
15218c2ecf20Sopenharmony_ci	WMI_10X_PROFILE_MATCH,
15228c2ecf20Sopenharmony_ci
15238c2ecf20Sopenharmony_ci	/* debug print message used for tracing FW code while debugging */
15248c2ecf20Sopenharmony_ci	WMI_10X_DEBUG_PRINT_EVENTID,
15258c2ecf20Sopenharmony_ci	/* VI spoecific event */
15268c2ecf20Sopenharmony_ci	WMI_10X_PDEV_QVIT_EVENTID,
15278c2ecf20Sopenharmony_ci	/* FW code profile data in response to profile request */
15288c2ecf20Sopenharmony_ci	WMI_10X_WLAN_PROFILE_DATA_EVENTID,
15298c2ecf20Sopenharmony_ci
15308c2ecf20Sopenharmony_ci	/*RTT related event ID*/
15318c2ecf20Sopenharmony_ci	WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
15328c2ecf20Sopenharmony_ci	WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
15338c2ecf20Sopenharmony_ci	WMI_10X_RTT_ERROR_REPORT_EVENTID,
15348c2ecf20Sopenharmony_ci
15358c2ecf20Sopenharmony_ci	WMI_10X_WOW_WAKEUP_HOST_EVENTID,
15368c2ecf20Sopenharmony_ci	WMI_10X_DCS_INTERFERENCE_EVENTID,
15378c2ecf20Sopenharmony_ci
15388c2ecf20Sopenharmony_ci	/* TPC config for the current operating channel */
15398c2ecf20Sopenharmony_ci	WMI_10X_PDEV_TPC_CONFIG_EVENTID,
15408c2ecf20Sopenharmony_ci
15418c2ecf20Sopenharmony_ci	WMI_10X_GPIO_INPUT_EVENTID,
15428c2ecf20Sopenharmony_ci	WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID - 1,
15438c2ecf20Sopenharmony_ci};
15448c2ecf20Sopenharmony_ci
15458c2ecf20Sopenharmony_cienum wmi_10_2_cmd_id {
15468c2ecf20Sopenharmony_ci	WMI_10_2_START_CMDID = 0x9000,
15478c2ecf20Sopenharmony_ci	WMI_10_2_END_CMDID = 0x9FFF,
15488c2ecf20Sopenharmony_ci	WMI_10_2_INIT_CMDID,
15498c2ecf20Sopenharmony_ci	WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID,
15508c2ecf20Sopenharmony_ci	WMI_10_2_STOP_SCAN_CMDID,
15518c2ecf20Sopenharmony_ci	WMI_10_2_SCAN_CHAN_LIST_CMDID,
15528c2ecf20Sopenharmony_ci	WMI_10_2_ECHO_CMDID,
15538c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_REGDOMAIN_CMDID,
15548c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_CHANNEL_CMDID,
15558c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_PARAM_CMDID,
15568c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID,
15578c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID,
15588c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID,
15598c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID,
15608c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID,
15618c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID,
15628c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_QUIET_MODE_CMDID,
15638c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID,
15648c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID,
15658c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_CREATE_CMDID,
15668c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_DELETE_CMDID,
15678c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_START_REQUEST_CMDID,
15688c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_RESTART_REQUEST_CMDID,
15698c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_UP_CMDID,
15708c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_STOP_CMDID,
15718c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_DOWN_CMDID,
15728c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID,
15738c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_RESUME_RESPONSE_CMDID,
15748c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_SET_PARAM_CMDID,
15758c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_INSTALL_KEY_CMDID,
15768c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID,
15778c2ecf20Sopenharmony_ci	WMI_10_2_PEER_CREATE_CMDID,
15788c2ecf20Sopenharmony_ci	WMI_10_2_PEER_DELETE_CMDID,
15798c2ecf20Sopenharmony_ci	WMI_10_2_PEER_FLUSH_TIDS_CMDID,
15808c2ecf20Sopenharmony_ci	WMI_10_2_PEER_SET_PARAM_CMDID,
15818c2ecf20Sopenharmony_ci	WMI_10_2_PEER_ASSOC_CMDID,
15828c2ecf20Sopenharmony_ci	WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID,
15838c2ecf20Sopenharmony_ci	WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID,
15848c2ecf20Sopenharmony_ci	WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID,
15858c2ecf20Sopenharmony_ci	WMI_10_2_PEER_MCAST_GROUP_CMDID,
15868c2ecf20Sopenharmony_ci	WMI_10_2_BCN_TX_CMDID,
15878c2ecf20Sopenharmony_ci	WMI_10_2_BCN_PRB_TMPL_CMDID,
15888c2ecf20Sopenharmony_ci	WMI_10_2_BCN_FILTER_RX_CMDID,
15898c2ecf20Sopenharmony_ci	WMI_10_2_PRB_REQ_FILTER_RX_CMDID,
15908c2ecf20Sopenharmony_ci	WMI_10_2_MGMT_TX_CMDID,
15918c2ecf20Sopenharmony_ci	WMI_10_2_ADDBA_CLEAR_RESP_CMDID,
15928c2ecf20Sopenharmony_ci	WMI_10_2_ADDBA_SEND_CMDID,
15938c2ecf20Sopenharmony_ci	WMI_10_2_ADDBA_STATUS_CMDID,
15948c2ecf20Sopenharmony_ci	WMI_10_2_DELBA_SEND_CMDID,
15958c2ecf20Sopenharmony_ci	WMI_10_2_ADDBA_SET_RESP_CMDID,
15968c2ecf20Sopenharmony_ci	WMI_10_2_SEND_SINGLEAMSDU_CMDID,
15978c2ecf20Sopenharmony_ci	WMI_10_2_STA_POWERSAVE_MODE_CMDID,
15988c2ecf20Sopenharmony_ci	WMI_10_2_STA_POWERSAVE_PARAM_CMDID,
15998c2ecf20Sopenharmony_ci	WMI_10_2_STA_MIMO_PS_MODE_CMDID,
16008c2ecf20Sopenharmony_ci	WMI_10_2_DBGLOG_CFG_CMDID,
16018c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_DFS_ENABLE_CMDID,
16028c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_DFS_DISABLE_CMDID,
16038c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_QVIT_CMDID,
16048c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_SCAN_MODE,
16058c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD,
16068c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_SCAN_PERIOD,
16078c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
16088c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_AP_PROFILE,
16098c2ecf20Sopenharmony_ci	WMI_10_2_OFL_SCAN_ADD_AP_PROFILE,
16108c2ecf20Sopenharmony_ci	WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE,
16118c2ecf20Sopenharmony_ci	WMI_10_2_OFL_SCAN_PERIOD,
16128c2ecf20Sopenharmony_ci	WMI_10_2_P2P_DEV_SET_DEVICE_INFO,
16138c2ecf20Sopenharmony_ci	WMI_10_2_P2P_DEV_SET_DISCOVERABILITY,
16148c2ecf20Sopenharmony_ci	WMI_10_2_P2P_GO_SET_BEACON_IE,
16158c2ecf20Sopenharmony_ci	WMI_10_2_P2P_GO_SET_PROBE_RESP_IE,
16168c2ecf20Sopenharmony_ci	WMI_10_2_AP_PS_PEER_PARAM_CMDID,
16178c2ecf20Sopenharmony_ci	WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID,
16188c2ecf20Sopenharmony_ci	WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID,
16198c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID,
16208c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
16218c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
16228c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
16238c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
16248c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SUSPEND_CMDID,
16258c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_RESUME_CMDID,
16268c2ecf20Sopenharmony_ci	WMI_10_2_ADD_BCN_FILTER_CMDID,
16278c2ecf20Sopenharmony_ci	WMI_10_2_RMV_BCN_FILTER_CMDID,
16288c2ecf20Sopenharmony_ci	WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID,
16298c2ecf20Sopenharmony_ci	WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID,
16308c2ecf20Sopenharmony_ci	WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
16318c2ecf20Sopenharmony_ci	WMI_10_2_WOW_ENABLE_CMDID,
16328c2ecf20Sopenharmony_ci	WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
16338c2ecf20Sopenharmony_ci	WMI_10_2_RTT_MEASREQ_CMDID,
16348c2ecf20Sopenharmony_ci	WMI_10_2_RTT_TSF_CMDID,
16358c2ecf20Sopenharmony_ci	WMI_10_2_RTT_KEEPALIVE_CMDID,
16368c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SEND_BCN_CMDID,
16378c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
16388c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
16398c2ecf20Sopenharmony_ci	WMI_10_2_REQUEST_STATS_CMDID,
16408c2ecf20Sopenharmony_ci	WMI_10_2_GPIO_CONFIG_CMDID,
16418c2ecf20Sopenharmony_ci	WMI_10_2_GPIO_OUTPUT_CMDID,
16428c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_RATEMASK_CMDID,
16438c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID,
16448c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
16458c2ecf20Sopenharmony_ci	WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
16468c2ecf20Sopenharmony_ci	WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
16478c2ecf20Sopenharmony_ci	WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
16488c2ecf20Sopenharmony_ci	WMI_10_2_FORCE_FW_HANG_CMDID,
16498c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
16508c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_CTL_TABLE_CMDID,
16518c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID,
16528c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_RATEPWR_TABLE_CMDID,
16538c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
16548c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_GET_INFO,
16558c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_GET_INFO,
16568c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_ATF_REQUEST_CMDID,
16578c2ecf20Sopenharmony_ci	WMI_10_2_PEER_ATF_REQUEST_CMDID,
16588c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_GET_TEMPERATURE_CMDID,
16598c2ecf20Sopenharmony_ci	WMI_10_2_MU_CAL_START_CMDID,
16608c2ecf20Sopenharmony_ci	WMI_10_2_SET_LTEU_CONFIG_CMDID,
16618c2ecf20Sopenharmony_ci	WMI_10_2_SET_CCA_PARAMS,
16628c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
16638c2ecf20Sopenharmony_ci	WMI_10_2_FWTEST_CMDID,
16648c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_SET_BB_TIMING_CONFIG_CMDID,
16658c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
16668c2ecf20Sopenharmony_ci};
16678c2ecf20Sopenharmony_ci
16688c2ecf20Sopenharmony_cienum wmi_10_2_event_id {
16698c2ecf20Sopenharmony_ci	WMI_10_2_SERVICE_READY_EVENTID = 0x8000,
16708c2ecf20Sopenharmony_ci	WMI_10_2_READY_EVENTID,
16718c2ecf20Sopenharmony_ci	WMI_10_2_DEBUG_MESG_EVENTID,
16728c2ecf20Sopenharmony_ci	WMI_10_2_START_EVENTID = 0x9000,
16738c2ecf20Sopenharmony_ci	WMI_10_2_END_EVENTID = 0x9FFF,
16748c2ecf20Sopenharmony_ci	WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID,
16758c2ecf20Sopenharmony_ci	WMI_10_2_ECHO_EVENTID,
16768c2ecf20Sopenharmony_ci	WMI_10_2_UPDATE_STATS_EVENTID,
16778c2ecf20Sopenharmony_ci	WMI_10_2_INST_RSSI_STATS_EVENTID,
16788c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_START_RESP_EVENTID,
16798c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_STANDBY_REQ_EVENTID,
16808c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_RESUME_REQ_EVENTID,
16818c2ecf20Sopenharmony_ci	WMI_10_2_VDEV_STOPPED_EVENTID,
16828c2ecf20Sopenharmony_ci	WMI_10_2_PEER_STA_KICKOUT_EVENTID,
16838c2ecf20Sopenharmony_ci	WMI_10_2_HOST_SWBA_EVENTID,
16848c2ecf20Sopenharmony_ci	WMI_10_2_TBTTOFFSET_UPDATE_EVENTID,
16858c2ecf20Sopenharmony_ci	WMI_10_2_MGMT_RX_EVENTID,
16868c2ecf20Sopenharmony_ci	WMI_10_2_CHAN_INFO_EVENTID,
16878c2ecf20Sopenharmony_ci	WMI_10_2_PHYERR_EVENTID,
16888c2ecf20Sopenharmony_ci	WMI_10_2_ROAM_EVENTID,
16898c2ecf20Sopenharmony_ci	WMI_10_2_PROFILE_MATCH,
16908c2ecf20Sopenharmony_ci	WMI_10_2_DEBUG_PRINT_EVENTID,
16918c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_QVIT_EVENTID,
16928c2ecf20Sopenharmony_ci	WMI_10_2_WLAN_PROFILE_DATA_EVENTID,
16938c2ecf20Sopenharmony_ci	WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID,
16948c2ecf20Sopenharmony_ci	WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID,
16958c2ecf20Sopenharmony_ci	WMI_10_2_RTT_ERROR_REPORT_EVENTID,
16968c2ecf20Sopenharmony_ci	WMI_10_2_RTT_KEEPALIVE_EVENTID,
16978c2ecf20Sopenharmony_ci	WMI_10_2_WOW_WAKEUP_HOST_EVENTID,
16988c2ecf20Sopenharmony_ci	WMI_10_2_DCS_INTERFERENCE_EVENTID,
16998c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_TPC_CONFIG_EVENTID,
17008c2ecf20Sopenharmony_ci	WMI_10_2_GPIO_INPUT_EVENTID,
17018c2ecf20Sopenharmony_ci	WMI_10_2_PEER_RATECODE_LIST_EVENTID,
17028c2ecf20Sopenharmony_ci	WMI_10_2_GENERIC_BUFFER_EVENTID,
17038c2ecf20Sopenharmony_ci	WMI_10_2_MCAST_BUF_RELEASE_EVENTID,
17048c2ecf20Sopenharmony_ci	WMI_10_2_MCAST_LIST_AGEOUT_EVENTID,
17058c2ecf20Sopenharmony_ci	WMI_10_2_WDS_PEER_EVENTID,
17068c2ecf20Sopenharmony_ci	WMI_10_2_PEER_STA_PS_STATECHG_EVENTID,
17078c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_TEMPERATURE_EVENTID,
17088c2ecf20Sopenharmony_ci	WMI_10_2_MU_REPORT_EVENTID,
17098c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_BSS_CHAN_INFO_EVENTID,
17108c2ecf20Sopenharmony_ci	WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1,
17118c2ecf20Sopenharmony_ci};
17128c2ecf20Sopenharmony_ci
17138c2ecf20Sopenharmony_cienum wmi_10_4_cmd_id {
17148c2ecf20Sopenharmony_ci	WMI_10_4_START_CMDID = 0x9000,
17158c2ecf20Sopenharmony_ci	WMI_10_4_END_CMDID = 0x9FFF,
17168c2ecf20Sopenharmony_ci	WMI_10_4_INIT_CMDID,
17178c2ecf20Sopenharmony_ci	WMI_10_4_START_SCAN_CMDID = WMI_10_4_START_CMDID,
17188c2ecf20Sopenharmony_ci	WMI_10_4_STOP_SCAN_CMDID,
17198c2ecf20Sopenharmony_ci	WMI_10_4_SCAN_CHAN_LIST_CMDID,
17208c2ecf20Sopenharmony_ci	WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID,
17218c2ecf20Sopenharmony_ci	WMI_10_4_SCAN_UPDATE_REQUEST_CMDID,
17228c2ecf20Sopenharmony_ci	WMI_10_4_ECHO_CMDID,
17238c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_REGDOMAIN_CMDID,
17248c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_CHANNEL_CMDID,
17258c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_PARAM_CMDID,
17268c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID,
17278c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID,
17288c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID,
17298c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID,
17308c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID,
17318c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID,
17328c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID,
17338c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_QUIET_MODE_CMDID,
17348c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID,
17358c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID,
17368c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_CREATE_CMDID,
17378c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_DELETE_CMDID,
17388c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_START_REQUEST_CMDID,
17398c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_RESTART_REQUEST_CMDID,
17408c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_UP_CMDID,
17418c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STOP_CMDID,
17428c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_DOWN_CMDID,
17438c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STANDBY_RESPONSE_CMDID,
17448c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_RESUME_RESPONSE_CMDID,
17458c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SET_PARAM_CMDID,
17468c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_INSTALL_KEY_CMDID,
17478c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PEER_CACHING_ADD_PEER_CMDID,
17488c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PEER_CACHING_EVICT_PEER_CMDID,
17498c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PEER_CACHING_RESTORE_PEER_CMDID,
17508c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PEER_CACHING_PRINT_ALL_PEERS_INFO_CMDID,
17518c2ecf20Sopenharmony_ci	WMI_10_4_PEER_CREATE_CMDID,
17528c2ecf20Sopenharmony_ci	WMI_10_4_PEER_DELETE_CMDID,
17538c2ecf20Sopenharmony_ci	WMI_10_4_PEER_FLUSH_TIDS_CMDID,
17548c2ecf20Sopenharmony_ci	WMI_10_4_PEER_SET_PARAM_CMDID,
17558c2ecf20Sopenharmony_ci	WMI_10_4_PEER_ASSOC_CMDID,
17568c2ecf20Sopenharmony_ci	WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID,
17578c2ecf20Sopenharmony_ci	WMI_10_4_PEER_UPDATE_WDS_ENTRY_CMDID,
17588c2ecf20Sopenharmony_ci	WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID,
17598c2ecf20Sopenharmony_ci	WMI_10_4_PEER_ADD_PROXY_STA_ENTRY_CMDID,
17608c2ecf20Sopenharmony_ci	WMI_10_4_PEER_MCAST_GROUP_CMDID,
17618c2ecf20Sopenharmony_ci	WMI_10_4_BCN_TX_CMDID,
17628c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SEND_BCN_CMDID,
17638c2ecf20Sopenharmony_ci	WMI_10_4_BCN_PRB_TMPL_CMDID,
17648c2ecf20Sopenharmony_ci	WMI_10_4_BCN_FILTER_RX_CMDID,
17658c2ecf20Sopenharmony_ci	WMI_10_4_PRB_REQ_FILTER_RX_CMDID,
17668c2ecf20Sopenharmony_ci	WMI_10_4_MGMT_TX_CMDID,
17678c2ecf20Sopenharmony_ci	WMI_10_4_PRB_TMPL_CMDID,
17688c2ecf20Sopenharmony_ci	WMI_10_4_ADDBA_CLEAR_RESP_CMDID,
17698c2ecf20Sopenharmony_ci	WMI_10_4_ADDBA_SEND_CMDID,
17708c2ecf20Sopenharmony_ci	WMI_10_4_ADDBA_STATUS_CMDID,
17718c2ecf20Sopenharmony_ci	WMI_10_4_DELBA_SEND_CMDID,
17728c2ecf20Sopenharmony_ci	WMI_10_4_ADDBA_SET_RESP_CMDID,
17738c2ecf20Sopenharmony_ci	WMI_10_4_SEND_SINGLEAMSDU_CMDID,
17748c2ecf20Sopenharmony_ci	WMI_10_4_STA_POWERSAVE_MODE_CMDID,
17758c2ecf20Sopenharmony_ci	WMI_10_4_STA_POWERSAVE_PARAM_CMDID,
17768c2ecf20Sopenharmony_ci	WMI_10_4_STA_MIMO_PS_MODE_CMDID,
17778c2ecf20Sopenharmony_ci	WMI_10_4_DBGLOG_CFG_CMDID,
17788c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_DFS_ENABLE_CMDID,
17798c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_DFS_DISABLE_CMDID,
17808c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_QVIT_CMDID,
17818c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_SCAN_MODE,
17828c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD,
17838c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_SCAN_PERIOD,
17848c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
17858c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_AP_PROFILE,
17868c2ecf20Sopenharmony_ci	WMI_10_4_OFL_SCAN_ADD_AP_PROFILE,
17878c2ecf20Sopenharmony_ci	WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE,
17888c2ecf20Sopenharmony_ci	WMI_10_4_OFL_SCAN_PERIOD,
17898c2ecf20Sopenharmony_ci	WMI_10_4_P2P_DEV_SET_DEVICE_INFO,
17908c2ecf20Sopenharmony_ci	WMI_10_4_P2P_DEV_SET_DISCOVERABILITY,
17918c2ecf20Sopenharmony_ci	WMI_10_4_P2P_GO_SET_BEACON_IE,
17928c2ecf20Sopenharmony_ci	WMI_10_4_P2P_GO_SET_PROBE_RESP_IE,
17938c2ecf20Sopenharmony_ci	WMI_10_4_P2P_SET_VENDOR_IE_DATA_CMDID,
17948c2ecf20Sopenharmony_ci	WMI_10_4_AP_PS_PEER_PARAM_CMDID,
17958c2ecf20Sopenharmony_ci	WMI_10_4_AP_PS_PEER_UAPSD_COEX_CMDID,
17968c2ecf20Sopenharmony_ci	WMI_10_4_PEER_RATE_RETRY_SCHED_CMDID,
17978c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_TRIGGER_CMDID,
17988c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
17998c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
18008c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
18018c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
18028c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SUSPEND_CMDID,
18038c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_RESUME_CMDID,
18048c2ecf20Sopenharmony_ci	WMI_10_4_ADD_BCN_FILTER_CMDID,
18058c2ecf20Sopenharmony_ci	WMI_10_4_RMV_BCN_FILTER_CMDID,
18068c2ecf20Sopenharmony_ci	WMI_10_4_WOW_ADD_WAKE_PATTERN_CMDID,
18078c2ecf20Sopenharmony_ci	WMI_10_4_WOW_DEL_WAKE_PATTERN_CMDID,
18088c2ecf20Sopenharmony_ci	WMI_10_4_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
18098c2ecf20Sopenharmony_ci	WMI_10_4_WOW_ENABLE_CMDID,
18108c2ecf20Sopenharmony_ci	WMI_10_4_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
18118c2ecf20Sopenharmony_ci	WMI_10_4_RTT_MEASREQ_CMDID,
18128c2ecf20Sopenharmony_ci	WMI_10_4_RTT_TSF_CMDID,
18138c2ecf20Sopenharmony_ci	WMI_10_4_RTT_KEEPALIVE_CMDID,
18148c2ecf20Sopenharmony_ci	WMI_10_4_OEM_REQ_CMDID,
18158c2ecf20Sopenharmony_ci	WMI_10_4_NAN_CMDID,
18168c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
18178c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
18188c2ecf20Sopenharmony_ci	WMI_10_4_REQUEST_STATS_CMDID,
18198c2ecf20Sopenharmony_ci	WMI_10_4_GPIO_CONFIG_CMDID,
18208c2ecf20Sopenharmony_ci	WMI_10_4_GPIO_OUTPUT_CMDID,
18218c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_RATEMASK_CMDID,
18228c2ecf20Sopenharmony_ci	WMI_10_4_CSA_OFFLOAD_ENABLE_CMDID,
18238c2ecf20Sopenharmony_ci	WMI_10_4_GTK_OFFLOAD_CMDID,
18248c2ecf20Sopenharmony_ci	WMI_10_4_QBOOST_CFG_CMDID,
18258c2ecf20Sopenharmony_ci	WMI_10_4_CSA_OFFLOAD_CHANSWITCH_CMDID,
18268c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SMART_ANT_ENABLE_CMDID,
18278c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
18288c2ecf20Sopenharmony_ci	WMI_10_4_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
18298c2ecf20Sopenharmony_ci	WMI_10_4_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
18308c2ecf20Sopenharmony_ci	WMI_10_4_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
18318c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SET_KEEPALIVE_CMDID,
18328c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_GET_KEEPALIVE_CMDID,
18338c2ecf20Sopenharmony_ci	WMI_10_4_FORCE_FW_HANG_CMDID,
18348c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
18358c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_CTL_TABLE_CMDID,
18368c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_MIMOGAIN_TABLE_CMDID,
18378c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_RATEPWR_TABLE_CMDID,
18388c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
18398c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_FIPS_CMDID,
18408c2ecf20Sopenharmony_ci	WMI_10_4_TT_SET_CONF_CMDID,
18418c2ecf20Sopenharmony_ci	WMI_10_4_FWTEST_CMDID,
18428c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_ATF_REQUEST_CMDID,
18438c2ecf20Sopenharmony_ci	WMI_10_4_PEER_ATF_REQUEST_CMDID,
18448c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_ANI_CCK_CONFIG_CMDID,
18458c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
18468c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_RESERVE_AST_ENTRY_CMDID,
18478c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_NFCAL_POWER_CMDID,
18488c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_TPC_CMDID,
18498c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_AST_INFO_CMDID,
18508c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SET_DSCP_TID_MAP_CMDID,
18518c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_TEMPERATURE_CMDID,
18528c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_INFO_CMDID,
18538c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_GET_INFO_CMDID,
18548c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
18558c2ecf20Sopenharmony_ci	WMI_10_4_MU_CAL_START_CMDID,
18568c2ecf20Sopenharmony_ci	WMI_10_4_SET_CCA_PARAMS_CMDID,
18578c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
18588c2ecf20Sopenharmony_ci	WMI_10_4_EXT_RESOURCE_CFG_CMDID,
18598c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SET_IE_CMDID,
18608c2ecf20Sopenharmony_ci	WMI_10_4_SET_LTEU_CONFIG_CMDID,
18618c2ecf20Sopenharmony_ci	WMI_10_4_ATF_SSID_GROUPING_REQUEST_CMDID,
18628c2ecf20Sopenharmony_ci	WMI_10_4_PEER_ATF_EXT_REQUEST_CMDID,
18638c2ecf20Sopenharmony_ci	WMI_10_4_SET_PERIODIC_CHANNEL_STATS_CONFIG,
18648c2ecf20Sopenharmony_ci	WMI_10_4_PEER_BWF_REQUEST_CMDID,
18658c2ecf20Sopenharmony_ci	WMI_10_4_BTCOEX_CFG_CMDID,
18668c2ecf20Sopenharmony_ci	WMI_10_4_PEER_TX_MU_TXMIT_COUNT_CMDID,
18678c2ecf20Sopenharmony_ci	WMI_10_4_PEER_TX_MU_TXMIT_RSTCNT_CMDID,
18688c2ecf20Sopenharmony_ci	WMI_10_4_PEER_GID_USERPOS_LIST_CMDID,
18698c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_CHECK_CAL_VERSION_CMDID,
18708c2ecf20Sopenharmony_ci	WMI_10_4_COEX_VERSION_CFG_CMID,
18718c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_RX_FILTER_CMDID,
18728c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_EXTENDED_NSS_CFG_CMDID,
18738c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SET_SCAN_NAC_RSSI_CMDID,
18748c2ecf20Sopenharmony_ci	WMI_10_4_PROG_GPIO_BAND_SELECT_CMDID,
18758c2ecf20Sopenharmony_ci	WMI_10_4_CONFIG_SMART_LOGGING_CMDID,
18768c2ecf20Sopenharmony_ci	WMI_10_4_DEBUG_FATAL_CONDITION_CMDID,
18778c2ecf20Sopenharmony_ci	WMI_10_4_GET_TSF_TIMER_CMDID,
18788c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_TPC_TABLE_CMDID,
18798c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_SIFS_TRIGGER_TIME_CMDID,
18808c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_WDS_ENTRY_LIST_CMDID,
18818c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_SET_STATE_CMDID,
18828c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_PEER_UPDATE_CMDID,
18838c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_SET_OFFCHAN_MODE_CMDID,
18848c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SEND_FD_CMDID,
18858c2ecf20Sopenharmony_ci	WMI_10_4_ENABLE_FILS_CMDID,
18868c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_BRIDGE_MACADDR_CMDID,
18878c2ecf20Sopenharmony_ci	WMI_10_4_ATF_GROUP_WMM_AC_CONFIG_REQUEST_CMDID,
18888c2ecf20Sopenharmony_ci	WMI_10_4_RADAR_FOUND_CMDID,
18898c2ecf20Sopenharmony_ci	WMI_10_4_PEER_CFR_CAPTURE_CMDID,
18908c2ecf20Sopenharmony_ci	WMI_10_4_PER_PEER_PER_TID_CONFIG_CMDID,
18918c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
18928c2ecf20Sopenharmony_ci};
18938c2ecf20Sopenharmony_ci
18948c2ecf20Sopenharmony_cienum wmi_10_4_event_id {
18958c2ecf20Sopenharmony_ci	WMI_10_4_SERVICE_READY_EVENTID = 0x8000,
18968c2ecf20Sopenharmony_ci	WMI_10_4_READY_EVENTID,
18978c2ecf20Sopenharmony_ci	WMI_10_4_DEBUG_MESG_EVENTID,
18988c2ecf20Sopenharmony_ci	WMI_10_4_START_EVENTID = 0x9000,
18998c2ecf20Sopenharmony_ci	WMI_10_4_END_EVENTID = 0x9FFF,
19008c2ecf20Sopenharmony_ci	WMI_10_4_SCAN_EVENTID = WMI_10_4_START_EVENTID,
19018c2ecf20Sopenharmony_ci	WMI_10_4_ECHO_EVENTID,
19028c2ecf20Sopenharmony_ci	WMI_10_4_UPDATE_STATS_EVENTID,
19038c2ecf20Sopenharmony_ci	WMI_10_4_INST_RSSI_STATS_EVENTID,
19048c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_START_RESP_EVENTID,
19058c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STANDBY_REQ_EVENTID,
19068c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_RESUME_REQ_EVENTID,
19078c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STOPPED_EVENTID,
19088c2ecf20Sopenharmony_ci	WMI_10_4_PEER_STA_KICKOUT_EVENTID,
19098c2ecf20Sopenharmony_ci	WMI_10_4_HOST_SWBA_EVENTID,
19108c2ecf20Sopenharmony_ci	WMI_10_4_TBTTOFFSET_UPDATE_EVENTID,
19118c2ecf20Sopenharmony_ci	WMI_10_4_MGMT_RX_EVENTID,
19128c2ecf20Sopenharmony_ci	WMI_10_4_CHAN_INFO_EVENTID,
19138c2ecf20Sopenharmony_ci	WMI_10_4_PHYERR_EVENTID,
19148c2ecf20Sopenharmony_ci	WMI_10_4_ROAM_EVENTID,
19158c2ecf20Sopenharmony_ci	WMI_10_4_PROFILE_MATCH,
19168c2ecf20Sopenharmony_ci	WMI_10_4_DEBUG_PRINT_EVENTID,
19178c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_QVIT_EVENTID,
19188c2ecf20Sopenharmony_ci	WMI_10_4_WLAN_PROFILE_DATA_EVENTID,
19198c2ecf20Sopenharmony_ci	WMI_10_4_RTT_MEASUREMENT_REPORT_EVENTID,
19208c2ecf20Sopenharmony_ci	WMI_10_4_TSF_MEASUREMENT_REPORT_EVENTID,
19218c2ecf20Sopenharmony_ci	WMI_10_4_RTT_ERROR_REPORT_EVENTID,
19228c2ecf20Sopenharmony_ci	WMI_10_4_RTT_KEEPALIVE_EVENTID,
19238c2ecf20Sopenharmony_ci	WMI_10_4_OEM_CAPABILITY_EVENTID,
19248c2ecf20Sopenharmony_ci	WMI_10_4_OEM_MEASUREMENT_REPORT_EVENTID,
19258c2ecf20Sopenharmony_ci	WMI_10_4_OEM_ERROR_REPORT_EVENTID,
19268c2ecf20Sopenharmony_ci	WMI_10_4_NAN_EVENTID,
19278c2ecf20Sopenharmony_ci	WMI_10_4_WOW_WAKEUP_HOST_EVENTID,
19288c2ecf20Sopenharmony_ci	WMI_10_4_GTK_OFFLOAD_STATUS_EVENTID,
19298c2ecf20Sopenharmony_ci	WMI_10_4_GTK_REKEY_FAIL_EVENTID,
19308c2ecf20Sopenharmony_ci	WMI_10_4_DCS_INTERFERENCE_EVENTID,
19318c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_TPC_CONFIG_EVENTID,
19328c2ecf20Sopenharmony_ci	WMI_10_4_CSA_HANDLING_EVENTID,
19338c2ecf20Sopenharmony_ci	WMI_10_4_GPIO_INPUT_EVENTID,
19348c2ecf20Sopenharmony_ci	WMI_10_4_PEER_RATECODE_LIST_EVENTID,
19358c2ecf20Sopenharmony_ci	WMI_10_4_GENERIC_BUFFER_EVENTID,
19368c2ecf20Sopenharmony_ci	WMI_10_4_MCAST_BUF_RELEASE_EVENTID,
19378c2ecf20Sopenharmony_ci	WMI_10_4_MCAST_LIST_AGEOUT_EVENTID,
19388c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_GET_KEEPALIVE_EVENTID,
19398c2ecf20Sopenharmony_ci	WMI_10_4_WDS_PEER_EVENTID,
19408c2ecf20Sopenharmony_ci	WMI_10_4_PEER_STA_PS_STATECHG_EVENTID,
19418c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_FIPS_EVENTID,
19428c2ecf20Sopenharmony_ci	WMI_10_4_TT_STATS_EVENTID,
19438c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_CHANNEL_HOPPING_EVENTID,
19448c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_ANI_CCK_LEVEL_EVENTID,
19458c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_ANI_OFDM_LEVEL_EVENTID,
19468c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_RESERVE_AST_ENTRY_EVENTID,
19478c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_NFCAL_POWER_EVENTID,
19488c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_TPC_EVENTID,
19498c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_AST_INFO_EVENTID,
19508c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_TEMPERATURE_EVENTID,
19518c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
19528c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_BSS_CHAN_INFO_EVENTID,
19538c2ecf20Sopenharmony_ci	WMI_10_4_MU_REPORT_EVENTID,
19548c2ecf20Sopenharmony_ci	WMI_10_4_TX_DATA_TRAFFIC_CTRL_EVENTID,
19558c2ecf20Sopenharmony_ci	WMI_10_4_PEER_TX_MU_TXMIT_COUNT_EVENTID,
19568c2ecf20Sopenharmony_ci	WMI_10_4_PEER_GID_USERPOS_LIST_EVENTID,
19578c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_CHECK_CAL_VERSION_EVENTID,
19588c2ecf20Sopenharmony_ci	WMI_10_4_ATF_PEER_STATS_EVENTID,
19598c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_GET_RX_FILTER_EVENTID,
19608c2ecf20Sopenharmony_ci	WMI_10_4_NAC_RSSI_EVENTID,
19618c2ecf20Sopenharmony_ci	WMI_10_4_DEBUG_FATAL_CONDITION_EVENTID,
19628c2ecf20Sopenharmony_ci	WMI_10_4_GET_TSF_TIMER_RESP_EVENTID,
19638c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_TPC_TABLE_EVENTID,
19648c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_WDS_ENTRY_LIST_EVENTID,
19658c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_PEER_EVENTID,
19668c2ecf20Sopenharmony_ci	WMI_10_4_HOST_SWFDA_EVENTID,
19678c2ecf20Sopenharmony_ci	WMI_10_4_ESP_ESTIMATE_EVENTID,
19688c2ecf20Sopenharmony_ci	WMI_10_4_DFS_STATUS_CHECK_EVENTID,
19698c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_UTF_EVENTID = WMI_10_4_END_EVENTID - 1,
19708c2ecf20Sopenharmony_ci};
19718c2ecf20Sopenharmony_ci
19728c2ecf20Sopenharmony_cienum wmi_phy_mode {
19738c2ecf20Sopenharmony_ci	MODE_11A        = 0,   /* 11a Mode */
19748c2ecf20Sopenharmony_ci	MODE_11G        = 1,   /* 11b/g Mode */
19758c2ecf20Sopenharmony_ci	MODE_11B        = 2,   /* 11b Mode */
19768c2ecf20Sopenharmony_ci	MODE_11GONLY    = 3,   /* 11g only Mode */
19778c2ecf20Sopenharmony_ci	MODE_11NA_HT20   = 4,  /* 11a HT20 mode */
19788c2ecf20Sopenharmony_ci	MODE_11NG_HT20   = 5,  /* 11g HT20 mode */
19798c2ecf20Sopenharmony_ci	MODE_11NA_HT40   = 6,  /* 11a HT40 mode */
19808c2ecf20Sopenharmony_ci	MODE_11NG_HT40   = 7,  /* 11g HT40 mode */
19818c2ecf20Sopenharmony_ci	MODE_11AC_VHT20 = 8,
19828c2ecf20Sopenharmony_ci	MODE_11AC_VHT40 = 9,
19838c2ecf20Sopenharmony_ci	MODE_11AC_VHT80 = 10,
19848c2ecf20Sopenharmony_ci	/*    MODE_11AC_VHT160 = 11, */
19858c2ecf20Sopenharmony_ci	MODE_11AC_VHT20_2G = 11,
19868c2ecf20Sopenharmony_ci	MODE_11AC_VHT40_2G = 12,
19878c2ecf20Sopenharmony_ci	MODE_11AC_VHT80_2G = 13,
19888c2ecf20Sopenharmony_ci	MODE_11AC_VHT80_80 = 14,
19898c2ecf20Sopenharmony_ci	MODE_11AC_VHT160 = 15,
19908c2ecf20Sopenharmony_ci	MODE_UNKNOWN    = 16,
19918c2ecf20Sopenharmony_ci	MODE_MAX        = 16
19928c2ecf20Sopenharmony_ci};
19938c2ecf20Sopenharmony_ci
19948c2ecf20Sopenharmony_cistatic inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
19958c2ecf20Sopenharmony_ci{
19968c2ecf20Sopenharmony_ci	switch (mode) {
19978c2ecf20Sopenharmony_ci	case MODE_11A:
19988c2ecf20Sopenharmony_ci		return "11a";
19998c2ecf20Sopenharmony_ci	case MODE_11G:
20008c2ecf20Sopenharmony_ci		return "11g";
20018c2ecf20Sopenharmony_ci	case MODE_11B:
20028c2ecf20Sopenharmony_ci		return "11b";
20038c2ecf20Sopenharmony_ci	case MODE_11GONLY:
20048c2ecf20Sopenharmony_ci		return "11gonly";
20058c2ecf20Sopenharmony_ci	case MODE_11NA_HT20:
20068c2ecf20Sopenharmony_ci		return "11na-ht20";
20078c2ecf20Sopenharmony_ci	case MODE_11NG_HT20:
20088c2ecf20Sopenharmony_ci		return "11ng-ht20";
20098c2ecf20Sopenharmony_ci	case MODE_11NA_HT40:
20108c2ecf20Sopenharmony_ci		return "11na-ht40";
20118c2ecf20Sopenharmony_ci	case MODE_11NG_HT40:
20128c2ecf20Sopenharmony_ci		return "11ng-ht40";
20138c2ecf20Sopenharmony_ci	case MODE_11AC_VHT20:
20148c2ecf20Sopenharmony_ci		return "11ac-vht20";
20158c2ecf20Sopenharmony_ci	case MODE_11AC_VHT40:
20168c2ecf20Sopenharmony_ci		return "11ac-vht40";
20178c2ecf20Sopenharmony_ci	case MODE_11AC_VHT80:
20188c2ecf20Sopenharmony_ci		return "11ac-vht80";
20198c2ecf20Sopenharmony_ci	case MODE_11AC_VHT160:
20208c2ecf20Sopenharmony_ci		return "11ac-vht160";
20218c2ecf20Sopenharmony_ci	case MODE_11AC_VHT80_80:
20228c2ecf20Sopenharmony_ci		return "11ac-vht80+80";
20238c2ecf20Sopenharmony_ci	case MODE_11AC_VHT20_2G:
20248c2ecf20Sopenharmony_ci		return "11ac-vht20-2g";
20258c2ecf20Sopenharmony_ci	case MODE_11AC_VHT40_2G:
20268c2ecf20Sopenharmony_ci		return "11ac-vht40-2g";
20278c2ecf20Sopenharmony_ci	case MODE_11AC_VHT80_2G:
20288c2ecf20Sopenharmony_ci		return "11ac-vht80-2g";
20298c2ecf20Sopenharmony_ci	case MODE_UNKNOWN:
20308c2ecf20Sopenharmony_ci		/* skip */
20318c2ecf20Sopenharmony_ci		break;
20328c2ecf20Sopenharmony_ci
20338c2ecf20Sopenharmony_ci		/* no default handler to allow compiler to check that the
20348c2ecf20Sopenharmony_ci		 * enum is fully handled
20358c2ecf20Sopenharmony_ci		 */
20368c2ecf20Sopenharmony_ci	}
20378c2ecf20Sopenharmony_ci
20388c2ecf20Sopenharmony_ci	return "<unknown>";
20398c2ecf20Sopenharmony_ci}
20408c2ecf20Sopenharmony_ci
20418c2ecf20Sopenharmony_ci#define WMI_CHAN_LIST_TAG	0x1
20428c2ecf20Sopenharmony_ci#define WMI_SSID_LIST_TAG	0x2
20438c2ecf20Sopenharmony_ci#define WMI_BSSID_LIST_TAG	0x3
20448c2ecf20Sopenharmony_ci#define WMI_IE_TAG		0x4
20458c2ecf20Sopenharmony_ci
20468c2ecf20Sopenharmony_cistruct wmi_channel {
20478c2ecf20Sopenharmony_ci	__le32 mhz;
20488c2ecf20Sopenharmony_ci	__le32 band_center_freq1;
20498c2ecf20Sopenharmony_ci	__le32 band_center_freq2; /* valid for 11ac, 80plus80 */
20508c2ecf20Sopenharmony_ci	union {
20518c2ecf20Sopenharmony_ci		__le32 flags; /* WMI_CHAN_FLAG_ */
20528c2ecf20Sopenharmony_ci		struct {
20538c2ecf20Sopenharmony_ci			u8 mode; /* only 6 LSBs */
20548c2ecf20Sopenharmony_ci		} __packed;
20558c2ecf20Sopenharmony_ci	} __packed;
20568c2ecf20Sopenharmony_ci	union {
20578c2ecf20Sopenharmony_ci		__le32 reginfo0;
20588c2ecf20Sopenharmony_ci		struct {
20598c2ecf20Sopenharmony_ci			/* note: power unit is 0.5 dBm */
20608c2ecf20Sopenharmony_ci			u8 min_power;
20618c2ecf20Sopenharmony_ci			u8 max_power;
20628c2ecf20Sopenharmony_ci			u8 reg_power;
20638c2ecf20Sopenharmony_ci			u8 reg_classid;
20648c2ecf20Sopenharmony_ci		} __packed;
20658c2ecf20Sopenharmony_ci	} __packed;
20668c2ecf20Sopenharmony_ci	union {
20678c2ecf20Sopenharmony_ci		__le32 reginfo1;
20688c2ecf20Sopenharmony_ci		struct {
20698c2ecf20Sopenharmony_ci			/* note: power unit is 1 dBm */
20708c2ecf20Sopenharmony_ci			u8 antenna_max;
20718c2ecf20Sopenharmony_ci			/* note: power unit is 0.5 dBm */
20728c2ecf20Sopenharmony_ci			u8 max_tx_power;
20738c2ecf20Sopenharmony_ci		} __packed;
20748c2ecf20Sopenharmony_ci	} __packed;
20758c2ecf20Sopenharmony_ci} __packed;
20768c2ecf20Sopenharmony_ci
20778c2ecf20Sopenharmony_cistruct wmi_channel_arg {
20788c2ecf20Sopenharmony_ci	u32 freq;
20798c2ecf20Sopenharmony_ci	u32 band_center_freq1;
20808c2ecf20Sopenharmony_ci	u32 band_center_freq2;
20818c2ecf20Sopenharmony_ci	bool passive;
20828c2ecf20Sopenharmony_ci	bool allow_ibss;
20838c2ecf20Sopenharmony_ci	bool allow_ht;
20848c2ecf20Sopenharmony_ci	bool allow_vht;
20858c2ecf20Sopenharmony_ci	bool ht40plus;
20868c2ecf20Sopenharmony_ci	bool chan_radar;
20878c2ecf20Sopenharmony_ci	/* note: power unit is 0.5 dBm */
20888c2ecf20Sopenharmony_ci	u32 min_power;
20898c2ecf20Sopenharmony_ci	u32 max_power;
20908c2ecf20Sopenharmony_ci	u32 max_reg_power;
20918c2ecf20Sopenharmony_ci	/* note: power unit is 1 dBm */
20928c2ecf20Sopenharmony_ci	u32 max_antenna_gain;
20938c2ecf20Sopenharmony_ci	u32 reg_class_id;
20948c2ecf20Sopenharmony_ci	enum wmi_phy_mode mode;
20958c2ecf20Sopenharmony_ci};
20968c2ecf20Sopenharmony_ci
20978c2ecf20Sopenharmony_cienum wmi_channel_change_cause {
20988c2ecf20Sopenharmony_ci	WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
20998c2ecf20Sopenharmony_ci	WMI_CHANNEL_CHANGE_CAUSE_CSA,
21008c2ecf20Sopenharmony_ci};
21018c2ecf20Sopenharmony_ci
21028c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_HT40_PLUS      (1 << 6)
21038c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_PASSIVE        (1 << 7)
21048c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_ADHOC_ALLOWED  (1 << 8)
21058c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_AP_DISABLED    (1 << 9)
21068c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_DFS            (1 << 10)
21078c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_ALLOW_HT       (1 << 11)
21088c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_ALLOW_VHT      (1 << 12)
21098c2ecf20Sopenharmony_ci
21108c2ecf20Sopenharmony_ci/* Indicate reason for channel switch */
21118c2ecf20Sopenharmony_ci#define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
21128c2ecf20Sopenharmony_ci/* DFS required on channel for 2nd segment of VHT160 and VHT80+80*/
21138c2ecf20Sopenharmony_ci#define WMI_CHAN_FLAG_DFS_CFREQ2  (1 << 15)
21148c2ecf20Sopenharmony_ci#define WMI_MAX_SPATIAL_STREAM        3 /* default max ss */
21158c2ecf20Sopenharmony_ci
21168c2ecf20Sopenharmony_ci/* HT Capabilities*/
21178c2ecf20Sopenharmony_ci#define WMI_HT_CAP_ENABLED                0x0001   /* HT Enabled/ disabled */
21188c2ecf20Sopenharmony_ci#define WMI_HT_CAP_HT20_SGI       0x0002   /* Short Guard Interval with HT20 */
21198c2ecf20Sopenharmony_ci#define WMI_HT_CAP_DYNAMIC_SMPS           0x0004   /* Dynamic MIMO powersave */
21208c2ecf20Sopenharmony_ci#define WMI_HT_CAP_TX_STBC                0x0008   /* B3 TX STBC */
21218c2ecf20Sopenharmony_ci#define WMI_HT_CAP_TX_STBC_MASK_SHIFT     3
21228c2ecf20Sopenharmony_ci#define WMI_HT_CAP_RX_STBC                0x0030   /* B4-B5 RX STBC */
21238c2ecf20Sopenharmony_ci#define WMI_HT_CAP_RX_STBC_MASK_SHIFT     4
21248c2ecf20Sopenharmony_ci#define WMI_HT_CAP_LDPC                   0x0040   /* LDPC supported */
21258c2ecf20Sopenharmony_ci#define WMI_HT_CAP_L_SIG_TXOP_PROT        0x0080   /* L-SIG TXOP Protection */
21268c2ecf20Sopenharmony_ci#define WMI_HT_CAP_MPDU_DENSITY           0x0700   /* MPDU Density */
21278c2ecf20Sopenharmony_ci#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
21288c2ecf20Sopenharmony_ci#define WMI_HT_CAP_HT40_SGI               0x0800
21298c2ecf20Sopenharmony_ci#define WMI_HT_CAP_RX_LDPC                0x1000   /* LDPC RX support */
21308c2ecf20Sopenharmony_ci#define WMI_HT_CAP_TX_LDPC                0x2000   /* LDPC TX support */
21318c2ecf20Sopenharmony_ci
21328c2ecf20Sopenharmony_ci#define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED       | \
21338c2ecf20Sopenharmony_ci				WMI_HT_CAP_HT20_SGI      | \
21348c2ecf20Sopenharmony_ci				WMI_HT_CAP_HT40_SGI      | \
21358c2ecf20Sopenharmony_ci				WMI_HT_CAP_TX_STBC       | \
21368c2ecf20Sopenharmony_ci				WMI_HT_CAP_RX_STBC       | \
21378c2ecf20Sopenharmony_ci				WMI_HT_CAP_LDPC)
21388c2ecf20Sopenharmony_ci
21398c2ecf20Sopenharmony_ci/*
21408c2ecf20Sopenharmony_ci * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
21418c2ecf20Sopenharmony_ci * field. The fields not defined here are not supported, or reserved.
21428c2ecf20Sopenharmony_ci * Do not change these masks and if you have to add new one follow the
21438c2ecf20Sopenharmony_ci * bitmask as specified by 802.11ac draft.
21448c2ecf20Sopenharmony_ci */
21458c2ecf20Sopenharmony_ci
21468c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK            0x00000003
21478c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_RX_LDPC                      0x00000010
21488c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_SGI_80MHZ                    0x00000020
21498c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_SGI_160MHZ                   0x00000040
21508c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_TX_STBC                      0x00000080
21518c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_RX_STBC_MASK                 0x00000300
21528c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT           8
21538c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_SU_BFER                      0x00000800
21548c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_SU_BFEE                      0x00001000
21558c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_CS_ANT_MASK              0x0000E000
21568c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT        13
21578c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_SND_DIM_MASK             0x00070000
21588c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT       16
21598c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MU_BFER                      0x00080000
21608c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MU_BFEE                      0x00100000
21618c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP            0x03800000
21628c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT      23
21638c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_RX_FIXED_ANT                 0x10000000
21648c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_TX_FIXED_ANT                 0x20000000
21658c2ecf20Sopenharmony_ci
21668c2ecf20Sopenharmony_ci/* The following also refer for max HT AMSDU */
21678c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_MPDU_LEN_3839            0x00000000
21688c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_MPDU_LEN_7935            0x00000001
21698c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_MAX_MPDU_LEN_11454           0x00000002
21708c2ecf20Sopenharmony_ci
21718c2ecf20Sopenharmony_ci#define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454  | \
21728c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_RX_LDPC             | \
21738c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_SGI_80MHZ           | \
21748c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_TX_STBC             | \
21758c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_RX_STBC_MASK        | \
21768c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP   | \
21778c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_RX_FIXED_ANT        | \
21788c2ecf20Sopenharmony_ci				 WMI_VHT_CAP_TX_FIXED_ANT)
21798c2ecf20Sopenharmony_ci
21808c2ecf20Sopenharmony_ci/*
21818c2ecf20Sopenharmony_ci * Interested readers refer to Rx/Tx MCS Map definition as defined in
21828c2ecf20Sopenharmony_ci * 802.11ac
21838c2ecf20Sopenharmony_ci */
21848c2ecf20Sopenharmony_ci#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss)      ((3 & (r)) << (((ss) - 1) << 1))
21858c2ecf20Sopenharmony_ci#define WMI_VHT_MAX_SUPP_RATE_MASK           0x1fff0000
21868c2ecf20Sopenharmony_ci#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT     16
21878c2ecf20Sopenharmony_ci
21888c2ecf20Sopenharmony_cienum {
21898c2ecf20Sopenharmony_ci	REGDMN_MODE_11A              = 0x00001, /* 11a channels */
21908c2ecf20Sopenharmony_ci	REGDMN_MODE_TURBO            = 0x00002, /* 11a turbo-only channels */
21918c2ecf20Sopenharmony_ci	REGDMN_MODE_11B              = 0x00004, /* 11b channels */
21928c2ecf20Sopenharmony_ci	REGDMN_MODE_PUREG            = 0x00008, /* 11g channels (OFDM only) */
21938c2ecf20Sopenharmony_ci	REGDMN_MODE_11G              = 0x00008, /* XXX historical */
21948c2ecf20Sopenharmony_ci	REGDMN_MODE_108G             = 0x00020, /* 11a+Turbo channels */
21958c2ecf20Sopenharmony_ci	REGDMN_MODE_108A             = 0x00040, /* 11g+Turbo channels */
21968c2ecf20Sopenharmony_ci	REGDMN_MODE_XR               = 0x00100, /* XR channels */
21978c2ecf20Sopenharmony_ci	REGDMN_MODE_11A_HALF_RATE    = 0x00200, /* 11A half rate channels */
21988c2ecf20Sopenharmony_ci	REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
21998c2ecf20Sopenharmony_ci	REGDMN_MODE_11NG_HT20        = 0x00800, /* 11N-G HT20 channels */
22008c2ecf20Sopenharmony_ci	REGDMN_MODE_11NA_HT20        = 0x01000, /* 11N-A HT20 channels */
22018c2ecf20Sopenharmony_ci	REGDMN_MODE_11NG_HT40PLUS    = 0x02000, /* 11N-G HT40 + channels */
22028c2ecf20Sopenharmony_ci	REGDMN_MODE_11NG_HT40MINUS   = 0x04000, /* 11N-G HT40 - channels */
22038c2ecf20Sopenharmony_ci	REGDMN_MODE_11NA_HT40PLUS    = 0x08000, /* 11N-A HT40 + channels */
22048c2ecf20Sopenharmony_ci	REGDMN_MODE_11NA_HT40MINUS   = 0x10000, /* 11N-A HT40 - channels */
22058c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT20       = 0x20000, /* 5Ghz, VHT20 */
22068c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT40PLUS   = 0x40000, /* 5Ghz, VHT40 + channels */
22078c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT40MINUS  = 0x80000, /* 5Ghz  VHT40 - channels */
22088c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT80       = 0x100000, /* 5Ghz, VHT80 channels */
22098c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT160      = 0x200000,     /* 5Ghz, VHT160 channels */
22108c2ecf20Sopenharmony_ci	REGDMN_MODE_11AC_VHT80_80    = 0x400000,     /* 5Ghz, VHT80+80 channels */
22118c2ecf20Sopenharmony_ci	REGDMN_MODE_ALL              = 0xffffffff
22128c2ecf20Sopenharmony_ci};
22138c2ecf20Sopenharmony_ci
22148c2ecf20Sopenharmony_ci#define REGDMN_CAP1_CHAN_HALF_RATE        0x00000001
22158c2ecf20Sopenharmony_ci#define REGDMN_CAP1_CHAN_QUARTER_RATE     0x00000002
22168c2ecf20Sopenharmony_ci#define REGDMN_CAP1_CHAN_HAL49GHZ         0x00000004
22178c2ecf20Sopenharmony_ci
22188c2ecf20Sopenharmony_ci/* regulatory capabilities */
22198c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND   0x0040
22208c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN    0x0080
22218c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_KK_U2         0x0100
22228c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND    0x0200
22238c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD     0x0400
22248c2ecf20Sopenharmony_ci#define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A    0x0800
22258c2ecf20Sopenharmony_ci
22268c2ecf20Sopenharmony_cistruct hal_reg_capabilities {
22278c2ecf20Sopenharmony_ci	/* regdomain value specified in EEPROM */
22288c2ecf20Sopenharmony_ci	__le32 eeprom_rd;
22298c2ecf20Sopenharmony_ci	/*regdomain */
22308c2ecf20Sopenharmony_ci	__le32 eeprom_rd_ext;
22318c2ecf20Sopenharmony_ci	/* CAP1 capabilities bit map. */
22328c2ecf20Sopenharmony_ci	__le32 regcap1;
22338c2ecf20Sopenharmony_ci	/* REGDMN EEPROM CAP. */
22348c2ecf20Sopenharmony_ci	__le32 regcap2;
22358c2ecf20Sopenharmony_ci	/* REGDMN MODE */
22368c2ecf20Sopenharmony_ci	__le32 wireless_modes;
22378c2ecf20Sopenharmony_ci	__le32 low_2ghz_chan;
22388c2ecf20Sopenharmony_ci	__le32 high_2ghz_chan;
22398c2ecf20Sopenharmony_ci	__le32 low_5ghz_chan;
22408c2ecf20Sopenharmony_ci	__le32 high_5ghz_chan;
22418c2ecf20Sopenharmony_ci} __packed;
22428c2ecf20Sopenharmony_ci
22438c2ecf20Sopenharmony_cienum wlan_mode_capability {
22448c2ecf20Sopenharmony_ci	WHAL_WLAN_11A_CAPABILITY   = 0x1,
22458c2ecf20Sopenharmony_ci	WHAL_WLAN_11G_CAPABILITY   = 0x2,
22468c2ecf20Sopenharmony_ci	WHAL_WLAN_11AG_CAPABILITY  = 0x3,
22478c2ecf20Sopenharmony_ci};
22488c2ecf20Sopenharmony_ci
22498c2ecf20Sopenharmony_ci/* structure used by FW for requesting host memory */
22508c2ecf20Sopenharmony_cistruct wlan_host_mem_req {
22518c2ecf20Sopenharmony_ci	/* ID of the request */
22528c2ecf20Sopenharmony_ci	__le32 req_id;
22538c2ecf20Sopenharmony_ci	/* size of the  of each unit */
22548c2ecf20Sopenharmony_ci	__le32 unit_size;
22558c2ecf20Sopenharmony_ci	/* flags to  indicate that
22568c2ecf20Sopenharmony_ci	 * the number units is dependent
22578c2ecf20Sopenharmony_ci	 * on number of resources(num vdevs num peers .. etc)
22588c2ecf20Sopenharmony_ci	 */
22598c2ecf20Sopenharmony_ci	__le32 num_unit_info;
22608c2ecf20Sopenharmony_ci	/*
22618c2ecf20Sopenharmony_ci	 * actual number of units to allocate . if flags in the num_unit_info
22628c2ecf20Sopenharmony_ci	 * indicate that number of units is tied to number of a particular
22638c2ecf20Sopenharmony_ci	 * resource to allocate then  num_units filed is set to 0 and host
22648c2ecf20Sopenharmony_ci	 * will derive the number units from number of the resources it is
22658c2ecf20Sopenharmony_ci	 * requesting.
22668c2ecf20Sopenharmony_ci	 */
22678c2ecf20Sopenharmony_ci	__le32 num_units;
22688c2ecf20Sopenharmony_ci} __packed;
22698c2ecf20Sopenharmony_ci
22708c2ecf20Sopenharmony_ci/*
22718c2ecf20Sopenharmony_ci * The following struct holds optional payload for
22728c2ecf20Sopenharmony_ci * wmi_service_ready_event,e.g., 11ac pass some of the
22738c2ecf20Sopenharmony_ci * device capability to the host.
22748c2ecf20Sopenharmony_ci */
22758c2ecf20Sopenharmony_cistruct wmi_service_ready_event {
22768c2ecf20Sopenharmony_ci	__le32 sw_version;
22778c2ecf20Sopenharmony_ci	__le32 sw_version_1;
22788c2ecf20Sopenharmony_ci	__le32 abi_version;
22798c2ecf20Sopenharmony_ci	/* WMI_PHY_CAPABILITY */
22808c2ecf20Sopenharmony_ci	__le32 phy_capability;
22818c2ecf20Sopenharmony_ci	/* Maximum number of frag table entries that SW will populate less 1 */
22828c2ecf20Sopenharmony_ci	__le32 max_frag_entry;
22838c2ecf20Sopenharmony_ci	__le32 wmi_service_bitmap[16];
22848c2ecf20Sopenharmony_ci	__le32 num_rf_chains;
22858c2ecf20Sopenharmony_ci	/*
22868c2ecf20Sopenharmony_ci	 * The following field is only valid for service type
22878c2ecf20Sopenharmony_ci	 * WMI_SERVICE_11AC
22888c2ecf20Sopenharmony_ci	 */
22898c2ecf20Sopenharmony_ci	__le32 ht_cap_info; /* WMI HT Capability */
22908c2ecf20Sopenharmony_ci	__le32 vht_cap_info; /* VHT capability info field of 802.11ac */
22918c2ecf20Sopenharmony_ci	__le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
22928c2ecf20Sopenharmony_ci	__le32 hw_min_tx_power;
22938c2ecf20Sopenharmony_ci	__le32 hw_max_tx_power;
22948c2ecf20Sopenharmony_ci	struct hal_reg_capabilities hal_reg_capabilities;
22958c2ecf20Sopenharmony_ci	__le32 sys_cap_info;
22968c2ecf20Sopenharmony_ci	__le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
22978c2ecf20Sopenharmony_ci	/*
22988c2ecf20Sopenharmony_ci	 * Max beacon and Probe Response IE offload size
22998c2ecf20Sopenharmony_ci	 * (includes optional P2P IEs)
23008c2ecf20Sopenharmony_ci	 */
23018c2ecf20Sopenharmony_ci	__le32 max_bcn_ie_size;
23028c2ecf20Sopenharmony_ci	/*
23038c2ecf20Sopenharmony_ci	 * request to host to allocate a chuck of memory and pss it down to FW
23048c2ecf20Sopenharmony_ci	 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
23058c2ecf20Sopenharmony_ci	 * data structures. Only valid for low latency interfaces like PCIE
23068c2ecf20Sopenharmony_ci	 * where FW can access this memory directly (or) by DMA.
23078c2ecf20Sopenharmony_ci	 */
23088c2ecf20Sopenharmony_ci	__le32 num_mem_reqs;
23098c2ecf20Sopenharmony_ci	struct wlan_host_mem_req mem_reqs[];
23108c2ecf20Sopenharmony_ci} __packed;
23118c2ecf20Sopenharmony_ci
23128c2ecf20Sopenharmony_ci/* This is the definition from 10.X firmware branch */
23138c2ecf20Sopenharmony_cistruct wmi_10x_service_ready_event {
23148c2ecf20Sopenharmony_ci	__le32 sw_version;
23158c2ecf20Sopenharmony_ci	__le32 abi_version;
23168c2ecf20Sopenharmony_ci
23178c2ecf20Sopenharmony_ci	/* WMI_PHY_CAPABILITY */
23188c2ecf20Sopenharmony_ci	__le32 phy_capability;
23198c2ecf20Sopenharmony_ci
23208c2ecf20Sopenharmony_ci	/* Maximum number of frag table entries that SW will populate less 1 */
23218c2ecf20Sopenharmony_ci	__le32 max_frag_entry;
23228c2ecf20Sopenharmony_ci	__le32 wmi_service_bitmap[16];
23238c2ecf20Sopenharmony_ci	__le32 num_rf_chains;
23248c2ecf20Sopenharmony_ci
23258c2ecf20Sopenharmony_ci	/*
23268c2ecf20Sopenharmony_ci	 * The following field is only valid for service type
23278c2ecf20Sopenharmony_ci	 * WMI_SERVICE_11AC
23288c2ecf20Sopenharmony_ci	 */
23298c2ecf20Sopenharmony_ci	__le32 ht_cap_info; /* WMI HT Capability */
23308c2ecf20Sopenharmony_ci	__le32 vht_cap_info; /* VHT capability info field of 802.11ac */
23318c2ecf20Sopenharmony_ci	__le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
23328c2ecf20Sopenharmony_ci	__le32 hw_min_tx_power;
23338c2ecf20Sopenharmony_ci	__le32 hw_max_tx_power;
23348c2ecf20Sopenharmony_ci
23358c2ecf20Sopenharmony_ci	struct hal_reg_capabilities hal_reg_capabilities;
23368c2ecf20Sopenharmony_ci
23378c2ecf20Sopenharmony_ci	__le32 sys_cap_info;
23388c2ecf20Sopenharmony_ci	__le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
23398c2ecf20Sopenharmony_ci
23408c2ecf20Sopenharmony_ci	/*
23418c2ecf20Sopenharmony_ci	 * request to host to allocate a chuck of memory and pss it down to FW
23428c2ecf20Sopenharmony_ci	 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
23438c2ecf20Sopenharmony_ci	 * data structures. Only valid for low latency interfaces like PCIE
23448c2ecf20Sopenharmony_ci	 * where FW can access this memory directly (or) by DMA.
23458c2ecf20Sopenharmony_ci	 */
23468c2ecf20Sopenharmony_ci	__le32 num_mem_reqs;
23478c2ecf20Sopenharmony_ci
23488c2ecf20Sopenharmony_ci	struct wlan_host_mem_req mem_reqs[];
23498c2ecf20Sopenharmony_ci} __packed;
23508c2ecf20Sopenharmony_ci
23518c2ecf20Sopenharmony_ci#define WMI_SERVICE_READY_TIMEOUT_HZ (5 * HZ)
23528c2ecf20Sopenharmony_ci#define WMI_UNIFIED_READY_TIMEOUT_HZ (5 * HZ)
23538c2ecf20Sopenharmony_ci
23548c2ecf20Sopenharmony_cistruct wmi_ready_event {
23558c2ecf20Sopenharmony_ci	__le32 sw_version;
23568c2ecf20Sopenharmony_ci	__le32 abi_version;
23578c2ecf20Sopenharmony_ci	struct wmi_mac_addr mac_addr;
23588c2ecf20Sopenharmony_ci	__le32 status;
23598c2ecf20Sopenharmony_ci} __packed;
23608c2ecf20Sopenharmony_ci
23618c2ecf20Sopenharmony_cistruct wmi_resource_config {
23628c2ecf20Sopenharmony_ci	/* number of virtual devices (VAPs) to support */
23638c2ecf20Sopenharmony_ci	__le32 num_vdevs;
23648c2ecf20Sopenharmony_ci
23658c2ecf20Sopenharmony_ci	/* number of peer nodes to support */
23668c2ecf20Sopenharmony_ci	__le32 num_peers;
23678c2ecf20Sopenharmony_ci
23688c2ecf20Sopenharmony_ci	/*
23698c2ecf20Sopenharmony_ci	 * In offload mode target supports features like WOW, chatter and
23708c2ecf20Sopenharmony_ci	 * other protocol offloads. In order to support them some
23718c2ecf20Sopenharmony_ci	 * functionalities like reorder buffering, PN checking need to be
23728c2ecf20Sopenharmony_ci	 * done in target. This determines maximum number of peers supported
23738c2ecf20Sopenharmony_ci	 * by target in offload mode
23748c2ecf20Sopenharmony_ci	 */
23758c2ecf20Sopenharmony_ci	__le32 num_offload_peers;
23768c2ecf20Sopenharmony_ci
23778c2ecf20Sopenharmony_ci	/* For target-based RX reordering */
23788c2ecf20Sopenharmony_ci	__le32 num_offload_reorder_bufs;
23798c2ecf20Sopenharmony_ci
23808c2ecf20Sopenharmony_ci	/* number of keys per peer */
23818c2ecf20Sopenharmony_ci	__le32 num_peer_keys;
23828c2ecf20Sopenharmony_ci
23838c2ecf20Sopenharmony_ci	/* total number of TX/RX data TIDs */
23848c2ecf20Sopenharmony_ci	__le32 num_tids;
23858c2ecf20Sopenharmony_ci
23868c2ecf20Sopenharmony_ci	/*
23878c2ecf20Sopenharmony_ci	 * max skid for resolving hash collisions
23888c2ecf20Sopenharmony_ci	 *
23898c2ecf20Sopenharmony_ci	 *   The address search table is sparse, so that if two MAC addresses
23908c2ecf20Sopenharmony_ci	 *   result in the same hash value, the second of these conflicting
23918c2ecf20Sopenharmony_ci	 *   entries can slide to the next index in the address search table,
23928c2ecf20Sopenharmony_ci	 *   and use it, if it is unoccupied.  This ast_skid_limit parameter
23938c2ecf20Sopenharmony_ci	 *   specifies the upper bound on how many subsequent indices to search
23948c2ecf20Sopenharmony_ci	 *   over to find an unoccupied space.
23958c2ecf20Sopenharmony_ci	 */
23968c2ecf20Sopenharmony_ci	__le32 ast_skid_limit;
23978c2ecf20Sopenharmony_ci
23988c2ecf20Sopenharmony_ci	/*
23998c2ecf20Sopenharmony_ci	 * the nominal chain mask for transmit
24008c2ecf20Sopenharmony_ci	 *
24018c2ecf20Sopenharmony_ci	 *   The chain mask may be modified dynamically, e.g. to operate AP
24028c2ecf20Sopenharmony_ci	 *   tx with a reduced number of chains if no clients are associated.
24038c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies the nominal chain-mask that
24048c2ecf20Sopenharmony_ci	 *   should be used when not operating with a reduced set of tx chains.
24058c2ecf20Sopenharmony_ci	 */
24068c2ecf20Sopenharmony_ci	__le32 tx_chain_mask;
24078c2ecf20Sopenharmony_ci
24088c2ecf20Sopenharmony_ci	/*
24098c2ecf20Sopenharmony_ci	 * the nominal chain mask for receive
24108c2ecf20Sopenharmony_ci	 *
24118c2ecf20Sopenharmony_ci	 *   The chain mask may be modified dynamically, e.g. for a client
24128c2ecf20Sopenharmony_ci	 *   to use a reduced number of chains for receive if the traffic to
24138c2ecf20Sopenharmony_ci	 *   the client is low enough that it doesn't require downlink MIMO
24148c2ecf20Sopenharmony_ci	 *   or antenna diversity.
24158c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies the nominal chain-mask that
24168c2ecf20Sopenharmony_ci	 *   should be used when not operating with a reduced set of rx chains.
24178c2ecf20Sopenharmony_ci	 */
24188c2ecf20Sopenharmony_ci	__le32 rx_chain_mask;
24198c2ecf20Sopenharmony_ci
24208c2ecf20Sopenharmony_ci	/*
24218c2ecf20Sopenharmony_ci	 * what rx reorder timeout (ms) to use for the AC
24228c2ecf20Sopenharmony_ci	 *
24238c2ecf20Sopenharmony_ci	 *   Each WMM access class (voice, video, best-effort, background) will
24248c2ecf20Sopenharmony_ci	 *   have its own timeout value to dictate how long to wait for missing
24258c2ecf20Sopenharmony_ci	 *   rx MPDUs to arrive before flushing subsequent MPDUs that have
24268c2ecf20Sopenharmony_ci	 *   already been received.
24278c2ecf20Sopenharmony_ci	 *   This parameter specifies the timeout in milliseconds for each
24288c2ecf20Sopenharmony_ci	 *   class.
24298c2ecf20Sopenharmony_ci	 */
24308c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_vi;
24318c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_vo;
24328c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_be;
24338c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_bk;
24348c2ecf20Sopenharmony_ci
24358c2ecf20Sopenharmony_ci	/*
24368c2ecf20Sopenharmony_ci	 * what mode the rx should decap packets to
24378c2ecf20Sopenharmony_ci	 *
24388c2ecf20Sopenharmony_ci	 *   MAC can decap to RAW (no decap), native wifi or Ethernet types
24398c2ecf20Sopenharmony_ci	 *   THis setting also determines the default TX behavior, however TX
24408c2ecf20Sopenharmony_ci	 *   behavior can be modified on a per VAP basis during VAP init
24418c2ecf20Sopenharmony_ci	 */
24428c2ecf20Sopenharmony_ci	__le32 rx_decap_mode;
24438c2ecf20Sopenharmony_ci
24448c2ecf20Sopenharmony_ci	/* what is the maximum number of scan requests that can be queued */
24458c2ecf20Sopenharmony_ci	__le32 scan_max_pending_reqs;
24468c2ecf20Sopenharmony_ci
24478c2ecf20Sopenharmony_ci	/* maximum VDEV that could use BMISS offload */
24488c2ecf20Sopenharmony_ci	__le32 bmiss_offload_max_vdev;
24498c2ecf20Sopenharmony_ci
24508c2ecf20Sopenharmony_ci	/* maximum VDEV that could use offload roaming */
24518c2ecf20Sopenharmony_ci	__le32 roam_offload_max_vdev;
24528c2ecf20Sopenharmony_ci
24538c2ecf20Sopenharmony_ci	/* maximum AP profiles that would push to offload roaming */
24548c2ecf20Sopenharmony_ci	__le32 roam_offload_max_ap_profiles;
24558c2ecf20Sopenharmony_ci
24568c2ecf20Sopenharmony_ci	/*
24578c2ecf20Sopenharmony_ci	 * how many groups to use for mcast->ucast conversion
24588c2ecf20Sopenharmony_ci	 *
24598c2ecf20Sopenharmony_ci	 *   The target's WAL maintains a table to hold information regarding
24608c2ecf20Sopenharmony_ci	 *   which peers belong to a given multicast group, so that if
24618c2ecf20Sopenharmony_ci	 *   multicast->unicast conversion is enabled, the target can convert
24628c2ecf20Sopenharmony_ci	 *   multicast tx frames to a series of unicast tx frames, to each
24638c2ecf20Sopenharmony_ci	 *   peer within the multicast group.
24648c2ecf20Sopenharmony_ci	     This num_mcast_groups configuration parameter tells the target how
24658c2ecf20Sopenharmony_ci	 *   many multicast groups to provide storage for within its multicast
24668c2ecf20Sopenharmony_ci	 *   group membership table.
24678c2ecf20Sopenharmony_ci	 */
24688c2ecf20Sopenharmony_ci	__le32 num_mcast_groups;
24698c2ecf20Sopenharmony_ci
24708c2ecf20Sopenharmony_ci	/*
24718c2ecf20Sopenharmony_ci	 * size to alloc for the mcast membership table
24728c2ecf20Sopenharmony_ci	 *
24738c2ecf20Sopenharmony_ci	 *   This num_mcast_table_elems configuration parameter tells the
24748c2ecf20Sopenharmony_ci	 *   target how many peer elements it needs to provide storage for in
24758c2ecf20Sopenharmony_ci	 *   its multicast group membership table.
24768c2ecf20Sopenharmony_ci	 *   These multicast group membership table elements are shared by the
24778c2ecf20Sopenharmony_ci	 *   multicast groups stored within the table.
24788c2ecf20Sopenharmony_ci	 */
24798c2ecf20Sopenharmony_ci	__le32 num_mcast_table_elems;
24808c2ecf20Sopenharmony_ci
24818c2ecf20Sopenharmony_ci	/*
24828c2ecf20Sopenharmony_ci	 * whether/how to do multicast->unicast conversion
24838c2ecf20Sopenharmony_ci	 *
24848c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies whether the target should
24858c2ecf20Sopenharmony_ci	 *   perform multicast --> unicast conversion on transmit, and if so,
24868c2ecf20Sopenharmony_ci	 *   what to do if it finds no entries in its multicast group
24878c2ecf20Sopenharmony_ci	 *   membership table for the multicast IP address in the tx frame.
24888c2ecf20Sopenharmony_ci	 *   Configuration value:
24898c2ecf20Sopenharmony_ci	 *   0 -> Do not perform multicast to unicast conversion.
24908c2ecf20Sopenharmony_ci	 *   1 -> Convert multicast frames to unicast, if the IP multicast
24918c2ecf20Sopenharmony_ci	 *        address from the tx frame is found in the multicast group
24928c2ecf20Sopenharmony_ci	 *        membership table.  If the IP multicast address is not found,
24938c2ecf20Sopenharmony_ci	 *        drop the frame.
24948c2ecf20Sopenharmony_ci	 *   2 -> Convert multicast frames to unicast, if the IP multicast
24958c2ecf20Sopenharmony_ci	 *        address from the tx frame is found in the multicast group
24968c2ecf20Sopenharmony_ci	 *        membership table.  If the IP multicast address is not found,
24978c2ecf20Sopenharmony_ci	 *        transmit the frame as multicast.
24988c2ecf20Sopenharmony_ci	 */
24998c2ecf20Sopenharmony_ci	__le32 mcast2ucast_mode;
25008c2ecf20Sopenharmony_ci
25018c2ecf20Sopenharmony_ci	/*
25028c2ecf20Sopenharmony_ci	 * how much memory to allocate for a tx PPDU dbg log
25038c2ecf20Sopenharmony_ci	 *
25048c2ecf20Sopenharmony_ci	 *   This parameter controls how much memory the target will allocate
25058c2ecf20Sopenharmony_ci	 *   to store a log of tx PPDU meta-information (how large the PPDU
25068c2ecf20Sopenharmony_ci	 *   was, when it was sent, whether it was successful, etc.)
25078c2ecf20Sopenharmony_ci	 */
25088c2ecf20Sopenharmony_ci	__le32 tx_dbg_log_size;
25098c2ecf20Sopenharmony_ci
25108c2ecf20Sopenharmony_ci	/* how many AST entries to be allocated for WDS */
25118c2ecf20Sopenharmony_ci	__le32 num_wds_entries;
25128c2ecf20Sopenharmony_ci
25138c2ecf20Sopenharmony_ci	/*
25148c2ecf20Sopenharmony_ci	 * MAC DMA burst size, e.g., For target PCI limit can be
25158c2ecf20Sopenharmony_ci	 * 0 -default, 1 256B
25168c2ecf20Sopenharmony_ci	 */
25178c2ecf20Sopenharmony_ci	__le32 dma_burst_size;
25188c2ecf20Sopenharmony_ci
25198c2ecf20Sopenharmony_ci	/*
25208c2ecf20Sopenharmony_ci	 * Fixed delimiters to be inserted after every MPDU to
25218c2ecf20Sopenharmony_ci	 * account for interface latency to avoid underrun.
25228c2ecf20Sopenharmony_ci	 */
25238c2ecf20Sopenharmony_ci	__le32 mac_aggr_delim;
25248c2ecf20Sopenharmony_ci
25258c2ecf20Sopenharmony_ci	/*
25268c2ecf20Sopenharmony_ci	 *   determine whether target is responsible for detecting duplicate
25278c2ecf20Sopenharmony_ci	 *   non-aggregate MPDU and timing out stale fragments.
25288c2ecf20Sopenharmony_ci	 *
25298c2ecf20Sopenharmony_ci	 *   A-MPDU reordering is always performed on the target.
25308c2ecf20Sopenharmony_ci	 *
25318c2ecf20Sopenharmony_ci	 *   0: target responsible for frag timeout and dup checking
25328c2ecf20Sopenharmony_ci	 *   1: host responsible for frag timeout and dup checking
25338c2ecf20Sopenharmony_ci	 */
25348c2ecf20Sopenharmony_ci	__le32 rx_skip_defrag_timeout_dup_detection_check;
25358c2ecf20Sopenharmony_ci
25368c2ecf20Sopenharmony_ci	/*
25378c2ecf20Sopenharmony_ci	 * Configuration for VoW :
25388c2ecf20Sopenharmony_ci	 * No of Video Nodes to be supported
25398c2ecf20Sopenharmony_ci	 * and Max no of descriptors for each Video link (node).
25408c2ecf20Sopenharmony_ci	 */
25418c2ecf20Sopenharmony_ci	__le32 vow_config;
25428c2ecf20Sopenharmony_ci
25438c2ecf20Sopenharmony_ci	/* maximum VDEV that could use GTK offload */
25448c2ecf20Sopenharmony_ci	__le32 gtk_offload_max_vdev;
25458c2ecf20Sopenharmony_ci
25468c2ecf20Sopenharmony_ci	/* Number of msdu descriptors target should use */
25478c2ecf20Sopenharmony_ci	__le32 num_msdu_desc;
25488c2ecf20Sopenharmony_ci
25498c2ecf20Sopenharmony_ci	/*
25508c2ecf20Sopenharmony_ci	 * Max. number of Tx fragments per MSDU
25518c2ecf20Sopenharmony_ci	 *  This parameter controls the max number of Tx fragments per MSDU.
25528c2ecf20Sopenharmony_ci	 *  This is sent by the target as part of the WMI_SERVICE_READY event
25538c2ecf20Sopenharmony_ci	 *  and is overridden by the OS shim as required.
25548c2ecf20Sopenharmony_ci	 */
25558c2ecf20Sopenharmony_ci	__le32 max_frag_entries;
25568c2ecf20Sopenharmony_ci} __packed;
25578c2ecf20Sopenharmony_ci
25588c2ecf20Sopenharmony_cistruct wmi_resource_config_10x {
25598c2ecf20Sopenharmony_ci	/* number of virtual devices (VAPs) to support */
25608c2ecf20Sopenharmony_ci	__le32 num_vdevs;
25618c2ecf20Sopenharmony_ci
25628c2ecf20Sopenharmony_ci	/* number of peer nodes to support */
25638c2ecf20Sopenharmony_ci	__le32 num_peers;
25648c2ecf20Sopenharmony_ci
25658c2ecf20Sopenharmony_ci	/* number of keys per peer */
25668c2ecf20Sopenharmony_ci	__le32 num_peer_keys;
25678c2ecf20Sopenharmony_ci
25688c2ecf20Sopenharmony_ci	/* total number of TX/RX data TIDs */
25698c2ecf20Sopenharmony_ci	__le32 num_tids;
25708c2ecf20Sopenharmony_ci
25718c2ecf20Sopenharmony_ci	/*
25728c2ecf20Sopenharmony_ci	 * max skid for resolving hash collisions
25738c2ecf20Sopenharmony_ci	 *
25748c2ecf20Sopenharmony_ci	 *   The address search table is sparse, so that if two MAC addresses
25758c2ecf20Sopenharmony_ci	 *   result in the same hash value, the second of these conflicting
25768c2ecf20Sopenharmony_ci	 *   entries can slide to the next index in the address search table,
25778c2ecf20Sopenharmony_ci	 *   and use it, if it is unoccupied.  This ast_skid_limit parameter
25788c2ecf20Sopenharmony_ci	 *   specifies the upper bound on how many subsequent indices to search
25798c2ecf20Sopenharmony_ci	 *   over to find an unoccupied space.
25808c2ecf20Sopenharmony_ci	 */
25818c2ecf20Sopenharmony_ci	__le32 ast_skid_limit;
25828c2ecf20Sopenharmony_ci
25838c2ecf20Sopenharmony_ci	/*
25848c2ecf20Sopenharmony_ci	 * the nominal chain mask for transmit
25858c2ecf20Sopenharmony_ci	 *
25868c2ecf20Sopenharmony_ci	 *   The chain mask may be modified dynamically, e.g. to operate AP
25878c2ecf20Sopenharmony_ci	 *   tx with a reduced number of chains if no clients are associated.
25888c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies the nominal chain-mask that
25898c2ecf20Sopenharmony_ci	 *   should be used when not operating with a reduced set of tx chains.
25908c2ecf20Sopenharmony_ci	 */
25918c2ecf20Sopenharmony_ci	__le32 tx_chain_mask;
25928c2ecf20Sopenharmony_ci
25938c2ecf20Sopenharmony_ci	/*
25948c2ecf20Sopenharmony_ci	 * the nominal chain mask for receive
25958c2ecf20Sopenharmony_ci	 *
25968c2ecf20Sopenharmony_ci	 *   The chain mask may be modified dynamically, e.g. for a client
25978c2ecf20Sopenharmony_ci	 *   to use a reduced number of chains for receive if the traffic to
25988c2ecf20Sopenharmony_ci	 *   the client is low enough that it doesn't require downlink MIMO
25998c2ecf20Sopenharmony_ci	 *   or antenna diversity.
26008c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies the nominal chain-mask that
26018c2ecf20Sopenharmony_ci	 *   should be used when not operating with a reduced set of rx chains.
26028c2ecf20Sopenharmony_ci	 */
26038c2ecf20Sopenharmony_ci	__le32 rx_chain_mask;
26048c2ecf20Sopenharmony_ci
26058c2ecf20Sopenharmony_ci	/*
26068c2ecf20Sopenharmony_ci	 * what rx reorder timeout (ms) to use for the AC
26078c2ecf20Sopenharmony_ci	 *
26088c2ecf20Sopenharmony_ci	 *   Each WMM access class (voice, video, best-effort, background) will
26098c2ecf20Sopenharmony_ci	 *   have its own timeout value to dictate how long to wait for missing
26108c2ecf20Sopenharmony_ci	 *   rx MPDUs to arrive before flushing subsequent MPDUs that have
26118c2ecf20Sopenharmony_ci	 *   already been received.
26128c2ecf20Sopenharmony_ci	 *   This parameter specifies the timeout in milliseconds for each
26138c2ecf20Sopenharmony_ci	 *   class.
26148c2ecf20Sopenharmony_ci	 */
26158c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_vi;
26168c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_vo;
26178c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_be;
26188c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri_bk;
26198c2ecf20Sopenharmony_ci
26208c2ecf20Sopenharmony_ci	/*
26218c2ecf20Sopenharmony_ci	 * what mode the rx should decap packets to
26228c2ecf20Sopenharmony_ci	 *
26238c2ecf20Sopenharmony_ci	 *   MAC can decap to RAW (no decap), native wifi or Ethernet types
26248c2ecf20Sopenharmony_ci	 *   THis setting also determines the default TX behavior, however TX
26258c2ecf20Sopenharmony_ci	 *   behavior can be modified on a per VAP basis during VAP init
26268c2ecf20Sopenharmony_ci	 */
26278c2ecf20Sopenharmony_ci	__le32 rx_decap_mode;
26288c2ecf20Sopenharmony_ci
26298c2ecf20Sopenharmony_ci	/* what is the maximum number of scan requests that can be queued */
26308c2ecf20Sopenharmony_ci	__le32 scan_max_pending_reqs;
26318c2ecf20Sopenharmony_ci
26328c2ecf20Sopenharmony_ci	/* maximum VDEV that could use BMISS offload */
26338c2ecf20Sopenharmony_ci	__le32 bmiss_offload_max_vdev;
26348c2ecf20Sopenharmony_ci
26358c2ecf20Sopenharmony_ci	/* maximum VDEV that could use offload roaming */
26368c2ecf20Sopenharmony_ci	__le32 roam_offload_max_vdev;
26378c2ecf20Sopenharmony_ci
26388c2ecf20Sopenharmony_ci	/* maximum AP profiles that would push to offload roaming */
26398c2ecf20Sopenharmony_ci	__le32 roam_offload_max_ap_profiles;
26408c2ecf20Sopenharmony_ci
26418c2ecf20Sopenharmony_ci	/*
26428c2ecf20Sopenharmony_ci	 * how many groups to use for mcast->ucast conversion
26438c2ecf20Sopenharmony_ci	 *
26448c2ecf20Sopenharmony_ci	 *   The target's WAL maintains a table to hold information regarding
26458c2ecf20Sopenharmony_ci	 *   which peers belong to a given multicast group, so that if
26468c2ecf20Sopenharmony_ci	 *   multicast->unicast conversion is enabled, the target can convert
26478c2ecf20Sopenharmony_ci	 *   multicast tx frames to a series of unicast tx frames, to each
26488c2ecf20Sopenharmony_ci	 *   peer within the multicast group.
26498c2ecf20Sopenharmony_ci	     This num_mcast_groups configuration parameter tells the target how
26508c2ecf20Sopenharmony_ci	 *   many multicast groups to provide storage for within its multicast
26518c2ecf20Sopenharmony_ci	 *   group membership table.
26528c2ecf20Sopenharmony_ci	 */
26538c2ecf20Sopenharmony_ci	__le32 num_mcast_groups;
26548c2ecf20Sopenharmony_ci
26558c2ecf20Sopenharmony_ci	/*
26568c2ecf20Sopenharmony_ci	 * size to alloc for the mcast membership table
26578c2ecf20Sopenharmony_ci	 *
26588c2ecf20Sopenharmony_ci	 *   This num_mcast_table_elems configuration parameter tells the
26598c2ecf20Sopenharmony_ci	 *   target how many peer elements it needs to provide storage for in
26608c2ecf20Sopenharmony_ci	 *   its multicast group membership table.
26618c2ecf20Sopenharmony_ci	 *   These multicast group membership table elements are shared by the
26628c2ecf20Sopenharmony_ci	 *   multicast groups stored within the table.
26638c2ecf20Sopenharmony_ci	 */
26648c2ecf20Sopenharmony_ci	__le32 num_mcast_table_elems;
26658c2ecf20Sopenharmony_ci
26668c2ecf20Sopenharmony_ci	/*
26678c2ecf20Sopenharmony_ci	 * whether/how to do multicast->unicast conversion
26688c2ecf20Sopenharmony_ci	 *
26698c2ecf20Sopenharmony_ci	 *   This configuration parameter specifies whether the target should
26708c2ecf20Sopenharmony_ci	 *   perform multicast --> unicast conversion on transmit, and if so,
26718c2ecf20Sopenharmony_ci	 *   what to do if it finds no entries in its multicast group
26728c2ecf20Sopenharmony_ci	 *   membership table for the multicast IP address in the tx frame.
26738c2ecf20Sopenharmony_ci	 *   Configuration value:
26748c2ecf20Sopenharmony_ci	 *   0 -> Do not perform multicast to unicast conversion.
26758c2ecf20Sopenharmony_ci	 *   1 -> Convert multicast frames to unicast, if the IP multicast
26768c2ecf20Sopenharmony_ci	 *        address from the tx frame is found in the multicast group
26778c2ecf20Sopenharmony_ci	 *        membership table.  If the IP multicast address is not found,
26788c2ecf20Sopenharmony_ci	 *        drop the frame.
26798c2ecf20Sopenharmony_ci	 *   2 -> Convert multicast frames to unicast, if the IP multicast
26808c2ecf20Sopenharmony_ci	 *        address from the tx frame is found in the multicast group
26818c2ecf20Sopenharmony_ci	 *        membership table.  If the IP multicast address is not found,
26828c2ecf20Sopenharmony_ci	 *        transmit the frame as multicast.
26838c2ecf20Sopenharmony_ci	 */
26848c2ecf20Sopenharmony_ci	__le32 mcast2ucast_mode;
26858c2ecf20Sopenharmony_ci
26868c2ecf20Sopenharmony_ci	/*
26878c2ecf20Sopenharmony_ci	 * how much memory to allocate for a tx PPDU dbg log
26888c2ecf20Sopenharmony_ci	 *
26898c2ecf20Sopenharmony_ci	 *   This parameter controls how much memory the target will allocate
26908c2ecf20Sopenharmony_ci	 *   to store a log of tx PPDU meta-information (how large the PPDU
26918c2ecf20Sopenharmony_ci	 *   was, when it was sent, whether it was successful, etc.)
26928c2ecf20Sopenharmony_ci	 */
26938c2ecf20Sopenharmony_ci	__le32 tx_dbg_log_size;
26948c2ecf20Sopenharmony_ci
26958c2ecf20Sopenharmony_ci	/* how many AST entries to be allocated for WDS */
26968c2ecf20Sopenharmony_ci	__le32 num_wds_entries;
26978c2ecf20Sopenharmony_ci
26988c2ecf20Sopenharmony_ci	/*
26998c2ecf20Sopenharmony_ci	 * MAC DMA burst size, e.g., For target PCI limit can be
27008c2ecf20Sopenharmony_ci	 * 0 -default, 1 256B
27018c2ecf20Sopenharmony_ci	 */
27028c2ecf20Sopenharmony_ci	__le32 dma_burst_size;
27038c2ecf20Sopenharmony_ci
27048c2ecf20Sopenharmony_ci	/*
27058c2ecf20Sopenharmony_ci	 * Fixed delimiters to be inserted after every MPDU to
27068c2ecf20Sopenharmony_ci	 * account for interface latency to avoid underrun.
27078c2ecf20Sopenharmony_ci	 */
27088c2ecf20Sopenharmony_ci	__le32 mac_aggr_delim;
27098c2ecf20Sopenharmony_ci
27108c2ecf20Sopenharmony_ci	/*
27118c2ecf20Sopenharmony_ci	 *   determine whether target is responsible for detecting duplicate
27128c2ecf20Sopenharmony_ci	 *   non-aggregate MPDU and timing out stale fragments.
27138c2ecf20Sopenharmony_ci	 *
27148c2ecf20Sopenharmony_ci	 *   A-MPDU reordering is always performed on the target.
27158c2ecf20Sopenharmony_ci	 *
27168c2ecf20Sopenharmony_ci	 *   0: target responsible for frag timeout and dup checking
27178c2ecf20Sopenharmony_ci	 *   1: host responsible for frag timeout and dup checking
27188c2ecf20Sopenharmony_ci	 */
27198c2ecf20Sopenharmony_ci	__le32 rx_skip_defrag_timeout_dup_detection_check;
27208c2ecf20Sopenharmony_ci
27218c2ecf20Sopenharmony_ci	/*
27228c2ecf20Sopenharmony_ci	 * Configuration for VoW :
27238c2ecf20Sopenharmony_ci	 * No of Video Nodes to be supported
27248c2ecf20Sopenharmony_ci	 * and Max no of descriptors for each Video link (node).
27258c2ecf20Sopenharmony_ci	 */
27268c2ecf20Sopenharmony_ci	__le32 vow_config;
27278c2ecf20Sopenharmony_ci
27288c2ecf20Sopenharmony_ci	/* Number of msdu descriptors target should use */
27298c2ecf20Sopenharmony_ci	__le32 num_msdu_desc;
27308c2ecf20Sopenharmony_ci
27318c2ecf20Sopenharmony_ci	/*
27328c2ecf20Sopenharmony_ci	 * Max. number of Tx fragments per MSDU
27338c2ecf20Sopenharmony_ci	 *  This parameter controls the max number of Tx fragments per MSDU.
27348c2ecf20Sopenharmony_ci	 *  This is sent by the target as part of the WMI_SERVICE_READY event
27358c2ecf20Sopenharmony_ci	 *  and is overridden by the OS shim as required.
27368c2ecf20Sopenharmony_ci	 */
27378c2ecf20Sopenharmony_ci	__le32 max_frag_entries;
27388c2ecf20Sopenharmony_ci} __packed;
27398c2ecf20Sopenharmony_ci
27408c2ecf20Sopenharmony_cienum wmi_10_2_feature_mask {
27418c2ecf20Sopenharmony_ci	WMI_10_2_RX_BATCH_MODE = BIT(0),
27428c2ecf20Sopenharmony_ci	WMI_10_2_ATF_CONFIG    = BIT(1),
27438c2ecf20Sopenharmony_ci	WMI_10_2_COEX_GPIO     = BIT(3),
27448c2ecf20Sopenharmony_ci	WMI_10_2_BSS_CHAN_INFO = BIT(6),
27458c2ecf20Sopenharmony_ci	WMI_10_2_PEER_STATS    = BIT(7),
27468c2ecf20Sopenharmony_ci};
27478c2ecf20Sopenharmony_ci
27488c2ecf20Sopenharmony_cistruct wmi_resource_config_10_2 {
27498c2ecf20Sopenharmony_ci	struct wmi_resource_config_10x common;
27508c2ecf20Sopenharmony_ci	__le32 max_peer_ext_stats;
27518c2ecf20Sopenharmony_ci	__le32 smart_ant_cap; /* 0-disable, 1-enable */
27528c2ecf20Sopenharmony_ci	__le32 bk_min_free;
27538c2ecf20Sopenharmony_ci	__le32 be_min_free;
27548c2ecf20Sopenharmony_ci	__le32 vi_min_free;
27558c2ecf20Sopenharmony_ci	__le32 vo_min_free;
27568c2ecf20Sopenharmony_ci	__le32 feature_mask;
27578c2ecf20Sopenharmony_ci} __packed;
27588c2ecf20Sopenharmony_ci
27598c2ecf20Sopenharmony_ci#define NUM_UNITS_IS_NUM_VDEVS         BIT(0)
27608c2ecf20Sopenharmony_ci#define NUM_UNITS_IS_NUM_PEERS         BIT(1)
27618c2ecf20Sopenharmony_ci#define NUM_UNITS_IS_NUM_ACTIVE_PEERS  BIT(2)
27628c2ecf20Sopenharmony_ci
27638c2ecf20Sopenharmony_cistruct wmi_resource_config_10_4 {
27648c2ecf20Sopenharmony_ci	/* Number of virtual devices (VAPs) to support */
27658c2ecf20Sopenharmony_ci	__le32 num_vdevs;
27668c2ecf20Sopenharmony_ci
27678c2ecf20Sopenharmony_ci	/* Number of peer nodes to support */
27688c2ecf20Sopenharmony_ci	__le32 num_peers;
27698c2ecf20Sopenharmony_ci
27708c2ecf20Sopenharmony_ci	/* Number of active peer nodes to support */
27718c2ecf20Sopenharmony_ci	__le32 num_active_peers;
27728c2ecf20Sopenharmony_ci
27738c2ecf20Sopenharmony_ci	/* In offload mode, target supports features like WOW, chatter and other
27748c2ecf20Sopenharmony_ci	 * protocol offloads. In order to support them some functionalities like
27758c2ecf20Sopenharmony_ci	 * reorder buffering, PN checking need to be done in target.
27768c2ecf20Sopenharmony_ci	 * This determines maximum number of peers supported by target in
27778c2ecf20Sopenharmony_ci	 * offload mode.
27788c2ecf20Sopenharmony_ci	 */
27798c2ecf20Sopenharmony_ci	__le32 num_offload_peers;
27808c2ecf20Sopenharmony_ci
27818c2ecf20Sopenharmony_ci	/* Number of reorder buffers available for doing target based reorder
27828c2ecf20Sopenharmony_ci	 * Rx reorder buffering
27838c2ecf20Sopenharmony_ci	 */
27848c2ecf20Sopenharmony_ci	__le32 num_offload_reorder_buffs;
27858c2ecf20Sopenharmony_ci
27868c2ecf20Sopenharmony_ci	/* Number of keys per peer */
27878c2ecf20Sopenharmony_ci	__le32 num_peer_keys;
27888c2ecf20Sopenharmony_ci
27898c2ecf20Sopenharmony_ci	/* Total number of TX/RX data TIDs */
27908c2ecf20Sopenharmony_ci	__le32 num_tids;
27918c2ecf20Sopenharmony_ci
27928c2ecf20Sopenharmony_ci	/* Max skid for resolving hash collisions.
27938c2ecf20Sopenharmony_ci	 * The address search table is sparse, so that if two MAC addresses
27948c2ecf20Sopenharmony_ci	 * result in the same hash value, the second of these conflicting
27958c2ecf20Sopenharmony_ci	 * entries can slide to the next index in the address search table,
27968c2ecf20Sopenharmony_ci	 * and use it, if it is unoccupied.  This ast_skid_limit parameter
27978c2ecf20Sopenharmony_ci	 * specifies the upper bound on how many subsequent indices to search
27988c2ecf20Sopenharmony_ci	 * over to find an unoccupied space.
27998c2ecf20Sopenharmony_ci	 */
28008c2ecf20Sopenharmony_ci	__le32 ast_skid_limit;
28018c2ecf20Sopenharmony_ci
28028c2ecf20Sopenharmony_ci	/* The nominal chain mask for transmit.
28038c2ecf20Sopenharmony_ci	 * The chain mask may be modified dynamically, e.g. to operate AP tx
28048c2ecf20Sopenharmony_ci	 * with a reduced number of chains if no clients are associated.
28058c2ecf20Sopenharmony_ci	 * This configuration parameter specifies the nominal chain-mask that
28068c2ecf20Sopenharmony_ci	 * should be used when not operating with a reduced set of tx chains.
28078c2ecf20Sopenharmony_ci	 */
28088c2ecf20Sopenharmony_ci	__le32 tx_chain_mask;
28098c2ecf20Sopenharmony_ci
28108c2ecf20Sopenharmony_ci	/* The nominal chain mask for receive.
28118c2ecf20Sopenharmony_ci	 * The chain mask may be modified dynamically, e.g. for a client to use
28128c2ecf20Sopenharmony_ci	 * a reduced number of chains for receive if the traffic to the client
28138c2ecf20Sopenharmony_ci	 * is low enough that it doesn't require downlink MIMO or antenna
28148c2ecf20Sopenharmony_ci	 * diversity. This configuration parameter specifies the nominal
28158c2ecf20Sopenharmony_ci	 * chain-mask that should be used when not operating with a reduced
28168c2ecf20Sopenharmony_ci	 * set of rx chains.
28178c2ecf20Sopenharmony_ci	 */
28188c2ecf20Sopenharmony_ci	__le32 rx_chain_mask;
28198c2ecf20Sopenharmony_ci
28208c2ecf20Sopenharmony_ci	/* What rx reorder timeout (ms) to use for the AC.
28218c2ecf20Sopenharmony_ci	 * Each WMM access class (voice, video, best-effort, background) will
28228c2ecf20Sopenharmony_ci	 * have its own timeout value to dictate how long to wait for missing
28238c2ecf20Sopenharmony_ci	 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
28248c2ecf20Sopenharmony_ci	 * been received. This parameter specifies the timeout in milliseconds
28258c2ecf20Sopenharmony_ci	 * for each class.
28268c2ecf20Sopenharmony_ci	 */
28278c2ecf20Sopenharmony_ci	__le32 rx_timeout_pri[4];
28288c2ecf20Sopenharmony_ci
28298c2ecf20Sopenharmony_ci	/* What mode the rx should decap packets to.
28308c2ecf20Sopenharmony_ci	 * MAC can decap to RAW (no decap), native wifi or Ethernet types.
28318c2ecf20Sopenharmony_ci	 * This setting also determines the default TX behavior, however TX
28328c2ecf20Sopenharmony_ci	 * behavior can be modified on a per VAP basis during VAP init
28338c2ecf20Sopenharmony_ci	 */
28348c2ecf20Sopenharmony_ci	__le32 rx_decap_mode;
28358c2ecf20Sopenharmony_ci
28368c2ecf20Sopenharmony_ci	__le32 scan_max_pending_req;
28378c2ecf20Sopenharmony_ci
28388c2ecf20Sopenharmony_ci	__le32 bmiss_offload_max_vdev;
28398c2ecf20Sopenharmony_ci
28408c2ecf20Sopenharmony_ci	__le32 roam_offload_max_vdev;
28418c2ecf20Sopenharmony_ci
28428c2ecf20Sopenharmony_ci	__le32 roam_offload_max_ap_profiles;
28438c2ecf20Sopenharmony_ci
28448c2ecf20Sopenharmony_ci	/* How many groups to use for mcast->ucast conversion.
28458c2ecf20Sopenharmony_ci	 * The target's WAL maintains a table to hold information regarding
28468c2ecf20Sopenharmony_ci	 * which peers belong to a given multicast group, so that if
28478c2ecf20Sopenharmony_ci	 * multicast->unicast conversion is enabled, the target can convert
28488c2ecf20Sopenharmony_ci	 * multicast tx frames to a series of unicast tx frames, to each peer
28498c2ecf20Sopenharmony_ci	 * within the multicast group. This num_mcast_groups configuration
28508c2ecf20Sopenharmony_ci	 * parameter tells the target how many multicast groups to provide
28518c2ecf20Sopenharmony_ci	 * storage for within its multicast group membership table.
28528c2ecf20Sopenharmony_ci	 */
28538c2ecf20Sopenharmony_ci	__le32 num_mcast_groups;
28548c2ecf20Sopenharmony_ci
28558c2ecf20Sopenharmony_ci	/* Size to alloc for the mcast membership table.
28568c2ecf20Sopenharmony_ci	 * This num_mcast_table_elems configuration parameter tells the target
28578c2ecf20Sopenharmony_ci	 * how many peer elements it needs to provide storage for in its
28588c2ecf20Sopenharmony_ci	 * multicast group membership table. These multicast group membership
28598c2ecf20Sopenharmony_ci	 * table elements are shared by the multicast groups stored within
28608c2ecf20Sopenharmony_ci	 * the table.
28618c2ecf20Sopenharmony_ci	 */
28628c2ecf20Sopenharmony_ci	__le32 num_mcast_table_elems;
28638c2ecf20Sopenharmony_ci
28648c2ecf20Sopenharmony_ci	/* Whether/how to do multicast->unicast conversion.
28658c2ecf20Sopenharmony_ci	 * This configuration parameter specifies whether the target should
28668c2ecf20Sopenharmony_ci	 * perform multicast --> unicast conversion on transmit, and if so,
28678c2ecf20Sopenharmony_ci	 * what to do if it finds no entries in its multicast group membership
28688c2ecf20Sopenharmony_ci	 * table for the multicast IP address in the tx frame.
28698c2ecf20Sopenharmony_ci	 * Configuration value:
28708c2ecf20Sopenharmony_ci	 * 0 -> Do not perform multicast to unicast conversion.
28718c2ecf20Sopenharmony_ci	 * 1 -> Convert multicast frames to unicast, if the IP multicast address
28728c2ecf20Sopenharmony_ci	 *      from the tx frame is found in the multicast group membership
28738c2ecf20Sopenharmony_ci	 *      table.  If the IP multicast address is not found, drop the frame
28748c2ecf20Sopenharmony_ci	 * 2 -> Convert multicast frames to unicast, if the IP multicast address
28758c2ecf20Sopenharmony_ci	 *      from the tx frame is found in the multicast group membership
28768c2ecf20Sopenharmony_ci	 *      table.  If the IP multicast address is not found, transmit the
28778c2ecf20Sopenharmony_ci	 *      frame as multicast.
28788c2ecf20Sopenharmony_ci	 */
28798c2ecf20Sopenharmony_ci	__le32 mcast2ucast_mode;
28808c2ecf20Sopenharmony_ci
28818c2ecf20Sopenharmony_ci	/* How much memory to allocate for a tx PPDU dbg log.
28828c2ecf20Sopenharmony_ci	 * This parameter controls how much memory the target will allocate to
28838c2ecf20Sopenharmony_ci	 * store a log of tx PPDU meta-information (how large the PPDU was,
28848c2ecf20Sopenharmony_ci	 * when it was sent, whether it was successful, etc.)
28858c2ecf20Sopenharmony_ci	 */
28868c2ecf20Sopenharmony_ci	__le32 tx_dbg_log_size;
28878c2ecf20Sopenharmony_ci
28888c2ecf20Sopenharmony_ci	/* How many AST entries to be allocated for WDS */
28898c2ecf20Sopenharmony_ci	__le32 num_wds_entries;
28908c2ecf20Sopenharmony_ci
28918c2ecf20Sopenharmony_ci	/* MAC DMA burst size. 0 -default, 1 -256B */
28928c2ecf20Sopenharmony_ci	__le32 dma_burst_size;
28938c2ecf20Sopenharmony_ci
28948c2ecf20Sopenharmony_ci	/* Fixed delimiters to be inserted after every MPDU to account for
28958c2ecf20Sopenharmony_ci	 * interface latency to avoid underrun.
28968c2ecf20Sopenharmony_ci	 */
28978c2ecf20Sopenharmony_ci	__le32 mac_aggr_delim;
28988c2ecf20Sopenharmony_ci
28998c2ecf20Sopenharmony_ci	/* Determine whether target is responsible for detecting duplicate
29008c2ecf20Sopenharmony_ci	 * non-aggregate MPDU and timing out stale fragments. A-MPDU reordering
29018c2ecf20Sopenharmony_ci	 * is always performed on the target.
29028c2ecf20Sopenharmony_ci	 *
29038c2ecf20Sopenharmony_ci	 * 0: target responsible for frag timeout and dup checking
29048c2ecf20Sopenharmony_ci	 * 1: host responsible for frag timeout and dup checking
29058c2ecf20Sopenharmony_ci	 */
29068c2ecf20Sopenharmony_ci	__le32 rx_skip_defrag_timeout_dup_detection_check;
29078c2ecf20Sopenharmony_ci
29088c2ecf20Sopenharmony_ci	/* Configuration for VoW : No of Video nodes to be supported and max
29098c2ecf20Sopenharmony_ci	 * no of descriptors for each video link (node).
29108c2ecf20Sopenharmony_ci	 */
29118c2ecf20Sopenharmony_ci	__le32 vow_config;
29128c2ecf20Sopenharmony_ci
29138c2ecf20Sopenharmony_ci	/* Maximum vdev that could use gtk offload */
29148c2ecf20Sopenharmony_ci	__le32 gtk_offload_max_vdev;
29158c2ecf20Sopenharmony_ci
29168c2ecf20Sopenharmony_ci	/* Number of msdu descriptors target should use */
29178c2ecf20Sopenharmony_ci	__le32 num_msdu_desc;
29188c2ecf20Sopenharmony_ci
29198c2ecf20Sopenharmony_ci	/* Max number of tx fragments per MSDU.
29208c2ecf20Sopenharmony_ci	 * This parameter controls the max number of tx fragments per MSDU.
29218c2ecf20Sopenharmony_ci	 * This will passed by target as part of the WMI_SERVICE_READY event
29228c2ecf20Sopenharmony_ci	 * and is overridden by the OS shim as required.
29238c2ecf20Sopenharmony_ci	 */
29248c2ecf20Sopenharmony_ci	__le32 max_frag_entries;
29258c2ecf20Sopenharmony_ci
29268c2ecf20Sopenharmony_ci	/* Max number of extended peer stats.
29278c2ecf20Sopenharmony_ci	 * This parameter controls the max number of peers for which extended
29288c2ecf20Sopenharmony_ci	 * statistics are supported by target
29298c2ecf20Sopenharmony_ci	 */
29308c2ecf20Sopenharmony_ci	__le32 max_peer_ext_stats;
29318c2ecf20Sopenharmony_ci
29328c2ecf20Sopenharmony_ci	/* Smart antenna capabilities information.
29338c2ecf20Sopenharmony_ci	 * 1 - Smart antenna is enabled
29348c2ecf20Sopenharmony_ci	 * 0 - Smart antenna is disabled
29358c2ecf20Sopenharmony_ci	 * In future this can contain smart antenna specific capabilities.
29368c2ecf20Sopenharmony_ci	 */
29378c2ecf20Sopenharmony_ci	__le32 smart_ant_cap;
29388c2ecf20Sopenharmony_ci
29398c2ecf20Sopenharmony_ci	/* User can configure the buffers allocated for each AC (BE, BK, VI, VO)
29408c2ecf20Sopenharmony_ci	 * during init.
29418c2ecf20Sopenharmony_ci	 */
29428c2ecf20Sopenharmony_ci	__le32 bk_minfree;
29438c2ecf20Sopenharmony_ci	__le32 be_minfree;
29448c2ecf20Sopenharmony_ci	__le32 vi_minfree;
29458c2ecf20Sopenharmony_ci	__le32 vo_minfree;
29468c2ecf20Sopenharmony_ci
29478c2ecf20Sopenharmony_ci	/* Rx batch mode capability.
29488c2ecf20Sopenharmony_ci	 * 1 - Rx batch mode enabled
29498c2ecf20Sopenharmony_ci	 * 0 - Rx batch mode disabled
29508c2ecf20Sopenharmony_ci	 */
29518c2ecf20Sopenharmony_ci	__le32 rx_batchmode;
29528c2ecf20Sopenharmony_ci
29538c2ecf20Sopenharmony_ci	/* Thermal throttling capability.
29548c2ecf20Sopenharmony_ci	 * 1 - Capable of thermal throttling
29558c2ecf20Sopenharmony_ci	 * 0 - Not capable of thermal throttling
29568c2ecf20Sopenharmony_ci	 */
29578c2ecf20Sopenharmony_ci	__le32 tt_support;
29588c2ecf20Sopenharmony_ci
29598c2ecf20Sopenharmony_ci	/* ATF configuration.
29608c2ecf20Sopenharmony_ci	 * 1  - Enable ATF
29618c2ecf20Sopenharmony_ci	 * 0  - Disable ATF
29628c2ecf20Sopenharmony_ci	 */
29638c2ecf20Sopenharmony_ci	__le32 atf_config;
29648c2ecf20Sopenharmony_ci
29658c2ecf20Sopenharmony_ci	/* Configure padding to manage IP header un-alignment
29668c2ecf20Sopenharmony_ci	 * 1  - Enable padding
29678c2ecf20Sopenharmony_ci	 * 0  - Disable padding
29688c2ecf20Sopenharmony_ci	 */
29698c2ecf20Sopenharmony_ci	__le32 iphdr_pad_config;
29708c2ecf20Sopenharmony_ci
29718c2ecf20Sopenharmony_ci	/* qwrap configuration (bits 15-0)
29728c2ecf20Sopenharmony_ci	 * 1  - This is qwrap configuration
29738c2ecf20Sopenharmony_ci	 * 0  - This is not qwrap
29748c2ecf20Sopenharmony_ci	 *
29758c2ecf20Sopenharmony_ci	 * Bits 31-16 is alloc_frag_desc_for_data_pkt (1 enables, 0 disables)
29768c2ecf20Sopenharmony_ci	 * In order to get ack-RSSI reporting and to specify the tx-rate for
29778c2ecf20Sopenharmony_ci	 * individual frames, this option must be enabled.  This uses an extra
29788c2ecf20Sopenharmony_ci	 * 4 bytes per tx-msdu descriptor, so don't enable it unless you need it.
29798c2ecf20Sopenharmony_ci	 */
29808c2ecf20Sopenharmony_ci	__le32 qwrap_config;
29818c2ecf20Sopenharmony_ci} __packed;
29828c2ecf20Sopenharmony_ci
29838c2ecf20Sopenharmony_cienum wmi_coex_version {
29848c2ecf20Sopenharmony_ci	WMI_NO_COEX_VERSION_SUPPORT	= 0,
29858c2ecf20Sopenharmony_ci	/* 3 wire coex support*/
29868c2ecf20Sopenharmony_ci	WMI_COEX_VERSION_1		= 1,
29878c2ecf20Sopenharmony_ci	/* 2.5 wire coex support*/
29888c2ecf20Sopenharmony_ci	WMI_COEX_VERSION_2		= 2,
29898c2ecf20Sopenharmony_ci	/* 2.5 wire coex with duty cycle support */
29908c2ecf20Sopenharmony_ci	WMI_COEX_VERSION_3		= 3,
29918c2ecf20Sopenharmony_ci	/* 4 wire coex support*/
29928c2ecf20Sopenharmony_ci	WMI_COEX_VERSION_4		= 4,
29938c2ecf20Sopenharmony_ci};
29948c2ecf20Sopenharmony_ci
29958c2ecf20Sopenharmony_ci/**
29968c2ecf20Sopenharmony_ci * enum wmi_10_4_feature_mask - WMI 10.4 feature enable/disable flags
29978c2ecf20Sopenharmony_ci * @WMI_10_4_LTEU_SUPPORT: LTEU config
29988c2ecf20Sopenharmony_ci * @WMI_10_4_COEX_GPIO_SUPPORT: COEX GPIO config
29998c2ecf20Sopenharmony_ci * @WMI_10_4_AUX_RADIO_SPECTRAL_INTF: AUX Radio Enhancement for spectral scan
30008c2ecf20Sopenharmony_ci * @WMI_10_4_AUX_RADIO_CHAN_LOAD_INTF: AUX Radio Enhancement for chan load scan
30018c2ecf20Sopenharmony_ci * @WMI_10_4_BSS_CHANNEL_INFO_64: BSS channel info stats
30028c2ecf20Sopenharmony_ci * @WMI_10_4_PEER_STATS: Per station stats
30038c2ecf20Sopenharmony_ci * @WMI_10_4_VDEV_STATS: Per vdev stats
30048c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS: Implicit TDLS support in firmware enable/disable
30058c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS_OFFCHAN: TDLS offchannel support enable/disable
30068c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS_UAPSD_BUFFER_STA: TDLS buffer sta support enable/disable
30078c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS_UAPSD_SLEEP_STA: TDLS sleep sta support enable/disable
30088c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE: TDLS connection tracker in host
30098c2ecf20Sopenharmony_ci *	enable/disable
30108c2ecf20Sopenharmony_ci * @WMI_10_4_TDLS_EXPLICIT_MODE_ONLY:Explicit TDLS mode enable/disable
30118c2ecf20Sopenharmony_ci * @WMI_10_4_TX_DATA_ACK_RSSI: Enable DATA ACK RSSI if firmware is capable
30128c2ecf20Sopenharmony_ci */
30138c2ecf20Sopenharmony_cienum wmi_10_4_feature_mask {
30148c2ecf20Sopenharmony_ci	WMI_10_4_LTEU_SUPPORT			= BIT(0),
30158c2ecf20Sopenharmony_ci	WMI_10_4_COEX_GPIO_SUPPORT		= BIT(1),
30168c2ecf20Sopenharmony_ci	WMI_10_4_AUX_RADIO_SPECTRAL_INTF	= BIT(2),
30178c2ecf20Sopenharmony_ci	WMI_10_4_AUX_RADIO_CHAN_LOAD_INTF	= BIT(3),
30188c2ecf20Sopenharmony_ci	WMI_10_4_BSS_CHANNEL_INFO_64		= BIT(4),
30198c2ecf20Sopenharmony_ci	WMI_10_4_PEER_STATS			= BIT(5),
30208c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STATS			= BIT(6),
30218c2ecf20Sopenharmony_ci	WMI_10_4_TDLS				= BIT(7),
30228c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_OFFCHAN			= BIT(8),
30238c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_UAPSD_BUFFER_STA		= BIT(9),
30248c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_UAPSD_SLEEP_STA		= BIT(10),
30258c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE = BIT(11),
30268c2ecf20Sopenharmony_ci	WMI_10_4_TDLS_EXPLICIT_MODE_ONLY	= BIT(12),
30278c2ecf20Sopenharmony_ci	WMI_10_4_TX_DATA_ACK_RSSI               = BIT(16),
30288c2ecf20Sopenharmony_ci	WMI_10_4_EXT_PEER_TID_CONFIGS_SUPPORT	= BIT(17),
30298c2ecf20Sopenharmony_ci	WMI_10_4_REPORT_AIRTIME			= BIT(18),
30308c2ecf20Sopenharmony_ci
30318c2ecf20Sopenharmony_ci};
30328c2ecf20Sopenharmony_ci
30338c2ecf20Sopenharmony_cistruct wmi_ext_resource_config_10_4_cmd {
30348c2ecf20Sopenharmony_ci	/* contains enum wmi_host_platform_type */
30358c2ecf20Sopenharmony_ci	__le32 host_platform_config;
30368c2ecf20Sopenharmony_ci	/* see enum wmi_10_4_feature_mask */
30378c2ecf20Sopenharmony_ci	__le32 fw_feature_bitmap;
30388c2ecf20Sopenharmony_ci	/* WLAN priority GPIO number */
30398c2ecf20Sopenharmony_ci	__le32 wlan_gpio_priority;
30408c2ecf20Sopenharmony_ci	/* see enum wmi_coex_version */
30418c2ecf20Sopenharmony_ci	__le32 coex_version;
30428c2ecf20Sopenharmony_ci	/* COEX GPIO config */
30438c2ecf20Sopenharmony_ci	__le32 coex_gpio_pin1;
30448c2ecf20Sopenharmony_ci	__le32 coex_gpio_pin2;
30458c2ecf20Sopenharmony_ci	__le32 coex_gpio_pin3;
30468c2ecf20Sopenharmony_ci	/* number of vdevs allowed to perform tdls */
30478c2ecf20Sopenharmony_ci	__le32 num_tdls_vdevs;
30488c2ecf20Sopenharmony_ci	/* number of peers to track per TDLS vdev */
30498c2ecf20Sopenharmony_ci	__le32 num_tdls_conn_table_entries;
30508c2ecf20Sopenharmony_ci	/* number of tdls sleep sta supported */
30518c2ecf20Sopenharmony_ci	__le32 max_tdls_concurrent_sleep_sta;
30528c2ecf20Sopenharmony_ci	/* number of tdls buffer sta supported */
30538c2ecf20Sopenharmony_ci	__le32 max_tdls_concurrent_buffer_sta;
30548c2ecf20Sopenharmony_ci};
30558c2ecf20Sopenharmony_ci
30568c2ecf20Sopenharmony_ci/* structure describing host memory chunk. */
30578c2ecf20Sopenharmony_cistruct host_memory_chunk {
30588c2ecf20Sopenharmony_ci	/* id of the request that is passed up in service ready */
30598c2ecf20Sopenharmony_ci	__le32 req_id;
30608c2ecf20Sopenharmony_ci	/* the physical address the memory chunk */
30618c2ecf20Sopenharmony_ci	__le32 ptr;
30628c2ecf20Sopenharmony_ci	/* size of the chunk */
30638c2ecf20Sopenharmony_ci	__le32 size;
30648c2ecf20Sopenharmony_ci} __packed;
30658c2ecf20Sopenharmony_ci
30668c2ecf20Sopenharmony_cistruct wmi_host_mem_chunks {
30678c2ecf20Sopenharmony_ci	__le32 count;
30688c2ecf20Sopenharmony_ci	/* some fw revisions require at least 1 chunk regardless of count */
30698c2ecf20Sopenharmony_ci	struct host_memory_chunk items[1];
30708c2ecf20Sopenharmony_ci} __packed;
30718c2ecf20Sopenharmony_ci
30728c2ecf20Sopenharmony_cistruct wmi_init_cmd {
30738c2ecf20Sopenharmony_ci	struct wmi_resource_config resource_config;
30748c2ecf20Sopenharmony_ci	struct wmi_host_mem_chunks mem_chunks;
30758c2ecf20Sopenharmony_ci} __packed;
30768c2ecf20Sopenharmony_ci
30778c2ecf20Sopenharmony_ci/* _10x structure is from 10.X FW API */
30788c2ecf20Sopenharmony_cistruct wmi_init_cmd_10x {
30798c2ecf20Sopenharmony_ci	struct wmi_resource_config_10x resource_config;
30808c2ecf20Sopenharmony_ci	struct wmi_host_mem_chunks mem_chunks;
30818c2ecf20Sopenharmony_ci} __packed;
30828c2ecf20Sopenharmony_ci
30838c2ecf20Sopenharmony_cistruct wmi_init_cmd_10_2 {
30848c2ecf20Sopenharmony_ci	struct wmi_resource_config_10_2 resource_config;
30858c2ecf20Sopenharmony_ci	struct wmi_host_mem_chunks mem_chunks;
30868c2ecf20Sopenharmony_ci} __packed;
30878c2ecf20Sopenharmony_ci
30888c2ecf20Sopenharmony_cistruct wmi_init_cmd_10_4 {
30898c2ecf20Sopenharmony_ci	struct wmi_resource_config_10_4 resource_config;
30908c2ecf20Sopenharmony_ci	struct wmi_host_mem_chunks mem_chunks;
30918c2ecf20Sopenharmony_ci} __packed;
30928c2ecf20Sopenharmony_ci
30938c2ecf20Sopenharmony_cistruct wmi_chan_list_entry {
30948c2ecf20Sopenharmony_ci	__le16 freq;
30958c2ecf20Sopenharmony_ci	u8 phy_mode; /* valid for 10.2 only */
30968c2ecf20Sopenharmony_ci	u8 reserved;
30978c2ecf20Sopenharmony_ci} __packed;
30988c2ecf20Sopenharmony_ci
30998c2ecf20Sopenharmony_ci/* TLV for channel list */
31008c2ecf20Sopenharmony_cistruct wmi_chan_list {
31018c2ecf20Sopenharmony_ci	__le32 tag; /* WMI_CHAN_LIST_TAG */
31028c2ecf20Sopenharmony_ci	__le32 num_chan;
31038c2ecf20Sopenharmony_ci	struct wmi_chan_list_entry channel_list[];
31048c2ecf20Sopenharmony_ci} __packed;
31058c2ecf20Sopenharmony_ci
31068c2ecf20Sopenharmony_cistruct wmi_bssid_list {
31078c2ecf20Sopenharmony_ci	__le32 tag; /* WMI_BSSID_LIST_TAG */
31088c2ecf20Sopenharmony_ci	__le32 num_bssid;
31098c2ecf20Sopenharmony_ci	struct wmi_mac_addr bssid_list[];
31108c2ecf20Sopenharmony_ci} __packed;
31118c2ecf20Sopenharmony_ci
31128c2ecf20Sopenharmony_cistruct wmi_ie_data {
31138c2ecf20Sopenharmony_ci	__le32 tag; /* WMI_IE_TAG */
31148c2ecf20Sopenharmony_ci	__le32 ie_len;
31158c2ecf20Sopenharmony_ci	u8 ie_data[];
31168c2ecf20Sopenharmony_ci} __packed;
31178c2ecf20Sopenharmony_ci
31188c2ecf20Sopenharmony_cistruct wmi_ssid {
31198c2ecf20Sopenharmony_ci	__le32 ssid_len;
31208c2ecf20Sopenharmony_ci	u8 ssid[32];
31218c2ecf20Sopenharmony_ci} __packed;
31228c2ecf20Sopenharmony_ci
31238c2ecf20Sopenharmony_cistruct wmi_ssid_list {
31248c2ecf20Sopenharmony_ci	__le32 tag; /* WMI_SSID_LIST_TAG */
31258c2ecf20Sopenharmony_ci	__le32 num_ssids;
31268c2ecf20Sopenharmony_ci	struct wmi_ssid ssids[];
31278c2ecf20Sopenharmony_ci} __packed;
31288c2ecf20Sopenharmony_ci
31298c2ecf20Sopenharmony_ci/* prefix used by scan requestor ids on the host */
31308c2ecf20Sopenharmony_ci#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
31318c2ecf20Sopenharmony_ci
31328c2ecf20Sopenharmony_ci/* prefix used by scan request ids generated on the host */
31338c2ecf20Sopenharmony_ci/* host cycles through the lower 12 bits to generate ids */
31348c2ecf20Sopenharmony_ci#define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
31358c2ecf20Sopenharmony_ci
31368c2ecf20Sopenharmony_ci#define WLAN_SCAN_PARAMS_MAX_SSID    16
31378c2ecf20Sopenharmony_ci#define WLAN_SCAN_PARAMS_MAX_BSSID   4
31388c2ecf20Sopenharmony_ci#define WLAN_SCAN_PARAMS_MAX_IE_LEN  256
31398c2ecf20Sopenharmony_ci
31408c2ecf20Sopenharmony_ci/* Values lower than this may be refused by some firmware revisions with a scan
31418c2ecf20Sopenharmony_ci * completion with a timedout reason.
31428c2ecf20Sopenharmony_ci */
31438c2ecf20Sopenharmony_ci#define WMI_SCAN_CHAN_MIN_TIME_MSEC 40
31448c2ecf20Sopenharmony_ci
31458c2ecf20Sopenharmony_ci/* Scan priority numbers must be sequential, starting with 0 */
31468c2ecf20Sopenharmony_cienum wmi_scan_priority {
31478c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_VERY_LOW = 0,
31488c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_LOW,
31498c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_MEDIUM,
31508c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_HIGH,
31518c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_VERY_HIGH,
31528c2ecf20Sopenharmony_ci	WMI_SCAN_PRIORITY_COUNT   /* number of priorities supported */
31538c2ecf20Sopenharmony_ci};
31548c2ecf20Sopenharmony_ci
31558c2ecf20Sopenharmony_cistruct wmi_start_scan_common {
31568c2ecf20Sopenharmony_ci	/* Scan ID */
31578c2ecf20Sopenharmony_ci	__le32 scan_id;
31588c2ecf20Sopenharmony_ci	/* Scan requestor ID */
31598c2ecf20Sopenharmony_ci	__le32 scan_req_id;
31608c2ecf20Sopenharmony_ci	/* VDEV id(interface) that is requesting scan */
31618c2ecf20Sopenharmony_ci	__le32 vdev_id;
31628c2ecf20Sopenharmony_ci	/* Scan Priority, input to scan scheduler */
31638c2ecf20Sopenharmony_ci	__le32 scan_priority;
31648c2ecf20Sopenharmony_ci	/* Scan events subscription */
31658c2ecf20Sopenharmony_ci	__le32 notify_scan_events;
31668c2ecf20Sopenharmony_ci	/* dwell time in msec on active channels */
31678c2ecf20Sopenharmony_ci	__le32 dwell_time_active;
31688c2ecf20Sopenharmony_ci	/* dwell time in msec on passive channels */
31698c2ecf20Sopenharmony_ci	__le32 dwell_time_passive;
31708c2ecf20Sopenharmony_ci	/*
31718c2ecf20Sopenharmony_ci	 * min time in msec on the BSS channel,only valid if atleast one
31728c2ecf20Sopenharmony_ci	 * VDEV is active
31738c2ecf20Sopenharmony_ci	 */
31748c2ecf20Sopenharmony_ci	__le32 min_rest_time;
31758c2ecf20Sopenharmony_ci	/*
31768c2ecf20Sopenharmony_ci	 * max rest time in msec on the BSS channel,only valid if at least
31778c2ecf20Sopenharmony_ci	 * one VDEV is active
31788c2ecf20Sopenharmony_ci	 */
31798c2ecf20Sopenharmony_ci	/*
31808c2ecf20Sopenharmony_ci	 * the scanner will rest on the bss channel at least min_rest_time
31818c2ecf20Sopenharmony_ci	 * after min_rest_time the scanner will start checking for tx/rx
31828c2ecf20Sopenharmony_ci	 * activity on all VDEVs. if there is no activity the scanner will
31838c2ecf20Sopenharmony_ci	 * switch to off channel. if there is activity the scanner will let
31848c2ecf20Sopenharmony_ci	 * the radio on the bss channel until max_rest_time expires.at
31858c2ecf20Sopenharmony_ci	 * max_rest_time scanner will switch to off channel irrespective of
31868c2ecf20Sopenharmony_ci	 * activity. activity is determined by the idle_time parameter.
31878c2ecf20Sopenharmony_ci	 */
31888c2ecf20Sopenharmony_ci	__le32 max_rest_time;
31898c2ecf20Sopenharmony_ci	/*
31908c2ecf20Sopenharmony_ci	 * time before sending next set of probe requests.
31918c2ecf20Sopenharmony_ci	 * The scanner keeps repeating probe requests transmission with
31928c2ecf20Sopenharmony_ci	 * period specified by repeat_probe_time.
31938c2ecf20Sopenharmony_ci	 * The number of probe requests specified depends on the ssid_list
31948c2ecf20Sopenharmony_ci	 * and bssid_list
31958c2ecf20Sopenharmony_ci	 */
31968c2ecf20Sopenharmony_ci	__le32 repeat_probe_time;
31978c2ecf20Sopenharmony_ci	/* time in msec between 2 consequetive probe requests with in a set. */
31988c2ecf20Sopenharmony_ci	__le32 probe_spacing_time;
31998c2ecf20Sopenharmony_ci	/*
32008c2ecf20Sopenharmony_ci	 * data inactivity time in msec on bss channel that will be used by
32018c2ecf20Sopenharmony_ci	 * scanner for measuring the inactivity.
32028c2ecf20Sopenharmony_ci	 */
32038c2ecf20Sopenharmony_ci	__le32 idle_time;
32048c2ecf20Sopenharmony_ci	/* maximum time in msec allowed for scan  */
32058c2ecf20Sopenharmony_ci	__le32 max_scan_time;
32068c2ecf20Sopenharmony_ci	/*
32078c2ecf20Sopenharmony_ci	 * delay in msec before sending first probe request after switching
32088c2ecf20Sopenharmony_ci	 * to a channel
32098c2ecf20Sopenharmony_ci	 */
32108c2ecf20Sopenharmony_ci	__le32 probe_delay;
32118c2ecf20Sopenharmony_ci	/* Scan control flags */
32128c2ecf20Sopenharmony_ci	__le32 scan_ctrl_flags;
32138c2ecf20Sopenharmony_ci} __packed;
32148c2ecf20Sopenharmony_ci
32158c2ecf20Sopenharmony_cistruct wmi_start_scan_tlvs {
32168c2ecf20Sopenharmony_ci	/* TLV parameters. These includes channel list, ssid list, bssid list,
32178c2ecf20Sopenharmony_ci	 * extra ies.
32188c2ecf20Sopenharmony_ci	 */
32198c2ecf20Sopenharmony_ci	u8 tlvs[0];
32208c2ecf20Sopenharmony_ci} __packed;
32218c2ecf20Sopenharmony_ci
32228c2ecf20Sopenharmony_cistruct wmi_start_scan_cmd {
32238c2ecf20Sopenharmony_ci	struct wmi_start_scan_common common;
32248c2ecf20Sopenharmony_ci	__le32 burst_duration_ms;
32258c2ecf20Sopenharmony_ci	struct wmi_start_scan_tlvs tlvs;
32268c2ecf20Sopenharmony_ci} __packed;
32278c2ecf20Sopenharmony_ci
32288c2ecf20Sopenharmony_ci/* This is the definition from 10.X firmware branch */
32298c2ecf20Sopenharmony_cistruct wmi_10x_start_scan_cmd {
32308c2ecf20Sopenharmony_ci	struct wmi_start_scan_common common;
32318c2ecf20Sopenharmony_ci	struct wmi_start_scan_tlvs tlvs;
32328c2ecf20Sopenharmony_ci} __packed;
32338c2ecf20Sopenharmony_ci
32348c2ecf20Sopenharmony_cistruct wmi_ssid_arg {
32358c2ecf20Sopenharmony_ci	int len;
32368c2ecf20Sopenharmony_ci	const u8 *ssid;
32378c2ecf20Sopenharmony_ci};
32388c2ecf20Sopenharmony_ci
32398c2ecf20Sopenharmony_cistruct wmi_bssid_arg {
32408c2ecf20Sopenharmony_ci	const u8 *bssid;
32418c2ecf20Sopenharmony_ci};
32428c2ecf20Sopenharmony_ci
32438c2ecf20Sopenharmony_cistruct wmi_start_scan_arg {
32448c2ecf20Sopenharmony_ci	u32 scan_id;
32458c2ecf20Sopenharmony_ci	u32 scan_req_id;
32468c2ecf20Sopenharmony_ci	u32 vdev_id;
32478c2ecf20Sopenharmony_ci	u32 scan_priority;
32488c2ecf20Sopenharmony_ci	u32 notify_scan_events;
32498c2ecf20Sopenharmony_ci	u32 dwell_time_active;
32508c2ecf20Sopenharmony_ci	u32 dwell_time_passive;
32518c2ecf20Sopenharmony_ci	u32 min_rest_time;
32528c2ecf20Sopenharmony_ci	u32 max_rest_time;
32538c2ecf20Sopenharmony_ci	u32 repeat_probe_time;
32548c2ecf20Sopenharmony_ci	u32 probe_spacing_time;
32558c2ecf20Sopenharmony_ci	u32 idle_time;
32568c2ecf20Sopenharmony_ci	u32 max_scan_time;
32578c2ecf20Sopenharmony_ci	u32 probe_delay;
32588c2ecf20Sopenharmony_ci	u32 scan_ctrl_flags;
32598c2ecf20Sopenharmony_ci	u32 burst_duration_ms;
32608c2ecf20Sopenharmony_ci
32618c2ecf20Sopenharmony_ci	u32 ie_len;
32628c2ecf20Sopenharmony_ci	u32 n_channels;
32638c2ecf20Sopenharmony_ci	u32 n_ssids;
32648c2ecf20Sopenharmony_ci	u32 n_bssids;
32658c2ecf20Sopenharmony_ci
32668c2ecf20Sopenharmony_ci	u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
32678c2ecf20Sopenharmony_ci	u16 channels[64];
32688c2ecf20Sopenharmony_ci	struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
32698c2ecf20Sopenharmony_ci	struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
32708c2ecf20Sopenharmony_ci	struct wmi_mac_addr mac_addr;
32718c2ecf20Sopenharmony_ci	struct wmi_mac_addr mac_mask;
32728c2ecf20Sopenharmony_ci};
32738c2ecf20Sopenharmony_ci
32748c2ecf20Sopenharmony_ci/* scan control flags */
32758c2ecf20Sopenharmony_ci
32768c2ecf20Sopenharmony_ci/* passively scan all channels including active channels */
32778c2ecf20Sopenharmony_ci#define WMI_SCAN_FLAG_PASSIVE        0x1
32788c2ecf20Sopenharmony_ci/* add wild card ssid probe request even though ssid_list is specified. */
32798c2ecf20Sopenharmony_ci#define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
32808c2ecf20Sopenharmony_ci/* add cck rates to rates/xrate ie for the generated probe request */
32818c2ecf20Sopenharmony_ci#define WMI_SCAN_ADD_CCK_RATES 0x4
32828c2ecf20Sopenharmony_ci/* add ofdm rates to rates/xrate ie for the generated probe request */
32838c2ecf20Sopenharmony_ci#define WMI_SCAN_ADD_OFDM_RATES 0x8
32848c2ecf20Sopenharmony_ci/* To enable indication of Chan load and Noise floor to host */
32858c2ecf20Sopenharmony_ci#define WMI_SCAN_CHAN_STAT_EVENT 0x10
32868c2ecf20Sopenharmony_ci/* Filter Probe request frames  */
32878c2ecf20Sopenharmony_ci#define WMI_SCAN_FILTER_PROBE_REQ 0x20
32888c2ecf20Sopenharmony_ci/* When set, DFS channels will not be scanned */
32898c2ecf20Sopenharmony_ci#define WMI_SCAN_BYPASS_DFS_CHN 0x40
32908c2ecf20Sopenharmony_ci/* Different FW scan engine may choose to bail out on errors.
32918c2ecf20Sopenharmony_ci * Allow the driver to have influence over that.
32928c2ecf20Sopenharmony_ci */
32938c2ecf20Sopenharmony_ci#define WMI_SCAN_CONTINUE_ON_ERROR 0x80
32948c2ecf20Sopenharmony_ci
32958c2ecf20Sopenharmony_ci/* Use random MAC address for TA for Probe Request frame and add
32968c2ecf20Sopenharmony_ci * OUI specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the Probe Request frame.
32978c2ecf20Sopenharmony_ci * if OUI is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored.
32988c2ecf20Sopenharmony_ci */
32998c2ecf20Sopenharmony_ci#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ   0x1000
33008c2ecf20Sopenharmony_ci
33018c2ecf20Sopenharmony_ci/* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
33028c2ecf20Sopenharmony_ci#define WMI_SCAN_CLASS_MASK 0xFF000000
33038c2ecf20Sopenharmony_ci
33048c2ecf20Sopenharmony_cienum wmi_stop_scan_type {
33058c2ecf20Sopenharmony_ci	WMI_SCAN_STOP_ONE	= 0x00000000, /* stop by scan_id */
33068c2ecf20Sopenharmony_ci	WMI_SCAN_STOP_VDEV_ALL	= 0x01000000, /* stop by vdev_id */
33078c2ecf20Sopenharmony_ci	WMI_SCAN_STOP_ALL	= 0x04000000, /* stop all scans */
33088c2ecf20Sopenharmony_ci};
33098c2ecf20Sopenharmony_ci
33108c2ecf20Sopenharmony_cistruct wmi_stop_scan_cmd {
33118c2ecf20Sopenharmony_ci	__le32 scan_req_id;
33128c2ecf20Sopenharmony_ci	__le32 scan_id;
33138c2ecf20Sopenharmony_ci	__le32 req_type;
33148c2ecf20Sopenharmony_ci	__le32 vdev_id;
33158c2ecf20Sopenharmony_ci} __packed;
33168c2ecf20Sopenharmony_ci
33178c2ecf20Sopenharmony_cistruct wmi_stop_scan_arg {
33188c2ecf20Sopenharmony_ci	u32 req_id;
33198c2ecf20Sopenharmony_ci	enum wmi_stop_scan_type req_type;
33208c2ecf20Sopenharmony_ci	union {
33218c2ecf20Sopenharmony_ci		u32 scan_id;
33228c2ecf20Sopenharmony_ci		u32 vdev_id;
33238c2ecf20Sopenharmony_ci	} u;
33248c2ecf20Sopenharmony_ci};
33258c2ecf20Sopenharmony_ci
33268c2ecf20Sopenharmony_cistruct wmi_scan_chan_list_cmd {
33278c2ecf20Sopenharmony_ci	__le32 num_scan_chans;
33288c2ecf20Sopenharmony_ci	struct wmi_channel chan_info[];
33298c2ecf20Sopenharmony_ci} __packed;
33308c2ecf20Sopenharmony_ci
33318c2ecf20Sopenharmony_cistruct wmi_scan_chan_list_arg {
33328c2ecf20Sopenharmony_ci	u32 n_channels;
33338c2ecf20Sopenharmony_ci	struct wmi_channel_arg *channels;
33348c2ecf20Sopenharmony_ci};
33358c2ecf20Sopenharmony_ci
33368c2ecf20Sopenharmony_cienum wmi_bss_filter {
33378c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_NONE = 0,        /* no beacons forwarded */
33388c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_ALL,             /* all beacons forwarded */
33398c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_PROFILE,         /* only beacons matching profile */
33408c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
33418c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_CURRENT_BSS,     /* only beacons matching current BSS */
33428c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_ALL_BUT_BSS,     /* all but beacons matching BSS */
33438c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_PROBED_SSID,     /* beacons matching probed ssid */
33448c2ecf20Sopenharmony_ci	WMI_BSS_FILTER_LAST_BSS,        /* marker only */
33458c2ecf20Sopenharmony_ci};
33468c2ecf20Sopenharmony_ci
33478c2ecf20Sopenharmony_cienum wmi_scan_event_type {
33488c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_STARTED              = BIT(0),
33498c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_COMPLETED            = BIT(1),
33508c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_BSS_CHANNEL          = BIT(2),
33518c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_FOREIGN_CHANNEL      = BIT(3),
33528c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_DEQUEUED             = BIT(4),
33538c2ecf20Sopenharmony_ci	/* possibly by high-prio scan */
33548c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_PREEMPTED            = BIT(5),
33558c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_START_FAILED         = BIT(6),
33568c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_RESTARTED            = BIT(7),
33578c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = BIT(8),
33588c2ecf20Sopenharmony_ci	WMI_SCAN_EVENT_MAX                  = BIT(15),
33598c2ecf20Sopenharmony_ci};
33608c2ecf20Sopenharmony_ci
33618c2ecf20Sopenharmony_cienum wmi_scan_completion_reason {
33628c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_COMPLETED,
33638c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_CANCELLED,
33648c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_PREEMPTED,
33658c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_TIMEDOUT,
33668c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_INTERNAL_FAILURE,
33678c2ecf20Sopenharmony_ci	WMI_SCAN_REASON_MAX,
33688c2ecf20Sopenharmony_ci};
33698c2ecf20Sopenharmony_ci
33708c2ecf20Sopenharmony_cistruct wmi_scan_event {
33718c2ecf20Sopenharmony_ci	__le32 event_type; /* %WMI_SCAN_EVENT_ */
33728c2ecf20Sopenharmony_ci	__le32 reason; /* %WMI_SCAN_REASON_ */
33738c2ecf20Sopenharmony_ci	__le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
33748c2ecf20Sopenharmony_ci	__le32 scan_req_id;
33758c2ecf20Sopenharmony_ci	__le32 scan_id;
33768c2ecf20Sopenharmony_ci	__le32 vdev_id;
33778c2ecf20Sopenharmony_ci} __packed;
33788c2ecf20Sopenharmony_ci
33798c2ecf20Sopenharmony_ci/*
33808c2ecf20Sopenharmony_ci * This defines how much headroom is kept in the
33818c2ecf20Sopenharmony_ci * receive frame between the descriptor and the
33828c2ecf20Sopenharmony_ci * payload, in order for the WMI PHY error and
33838c2ecf20Sopenharmony_ci * management handler to insert header contents.
33848c2ecf20Sopenharmony_ci *
33858c2ecf20Sopenharmony_ci * This is in bytes.
33868c2ecf20Sopenharmony_ci */
33878c2ecf20Sopenharmony_ci#define WMI_MGMT_RX_HDR_HEADROOM    52
33888c2ecf20Sopenharmony_ci
33898c2ecf20Sopenharmony_ci/*
33908c2ecf20Sopenharmony_ci * This event will be used for sending scan results
33918c2ecf20Sopenharmony_ci * as well as rx mgmt frames to the host. The rx buffer
33928c2ecf20Sopenharmony_ci * will be sent as part of this WMI event. It would be a
33938c2ecf20Sopenharmony_ci * good idea to pass all the fields in the RX status
33948c2ecf20Sopenharmony_ci * descriptor up to the host.
33958c2ecf20Sopenharmony_ci */
33968c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_hdr_v1 {
33978c2ecf20Sopenharmony_ci	__le32 channel;
33988c2ecf20Sopenharmony_ci	__le32 snr;
33998c2ecf20Sopenharmony_ci	__le32 rate;
34008c2ecf20Sopenharmony_ci	__le32 phy_mode;
34018c2ecf20Sopenharmony_ci	__le32 buf_len;
34028c2ecf20Sopenharmony_ci	__le32 status; /* %WMI_RX_STATUS_ */
34038c2ecf20Sopenharmony_ci} __packed;
34048c2ecf20Sopenharmony_ci
34058c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_hdr_v2 {
34068c2ecf20Sopenharmony_ci	struct wmi_mgmt_rx_hdr_v1 v1;
34078c2ecf20Sopenharmony_ci	__le32 rssi_ctl[4];
34088c2ecf20Sopenharmony_ci} __packed;
34098c2ecf20Sopenharmony_ci
34108c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_event_v1 {
34118c2ecf20Sopenharmony_ci	struct wmi_mgmt_rx_hdr_v1 hdr;
34128c2ecf20Sopenharmony_ci	u8 buf[];
34138c2ecf20Sopenharmony_ci} __packed;
34148c2ecf20Sopenharmony_ci
34158c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_event_v2 {
34168c2ecf20Sopenharmony_ci	struct wmi_mgmt_rx_hdr_v2 hdr;
34178c2ecf20Sopenharmony_ci	u8 buf[];
34188c2ecf20Sopenharmony_ci} __packed;
34198c2ecf20Sopenharmony_ci
34208c2ecf20Sopenharmony_cistruct wmi_10_4_mgmt_rx_hdr {
34218c2ecf20Sopenharmony_ci	__le32 channel;
34228c2ecf20Sopenharmony_ci	__le32 snr;
34238c2ecf20Sopenharmony_ci	    u8 rssi_ctl[4];
34248c2ecf20Sopenharmony_ci	__le32 rate;
34258c2ecf20Sopenharmony_ci	__le32 phy_mode;
34268c2ecf20Sopenharmony_ci	__le32 buf_len;
34278c2ecf20Sopenharmony_ci	__le32 status;
34288c2ecf20Sopenharmony_ci} __packed;
34298c2ecf20Sopenharmony_ci
34308c2ecf20Sopenharmony_cistruct wmi_10_4_mgmt_rx_event {
34318c2ecf20Sopenharmony_ci	struct wmi_10_4_mgmt_rx_hdr hdr;
34328c2ecf20Sopenharmony_ci	u8 buf[];
34338c2ecf20Sopenharmony_ci} __packed;
34348c2ecf20Sopenharmony_ci
34358c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_ext_info {
34368c2ecf20Sopenharmony_ci	__le64 rx_mac_timestamp;
34378c2ecf20Sopenharmony_ci} __packed __aligned(4);
34388c2ecf20Sopenharmony_ci
34398c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_OK			0x00
34408c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_ERR_CRC			0x01
34418c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_ERR_DECRYPT		0x08
34428c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_ERR_MIC			0x10
34438c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_ERR_KEY_CACHE_MISS	0x20
34448c2ecf20Sopenharmony_ci/* Extension data at the end of mgmt frame */
34458c2ecf20Sopenharmony_ci#define WMI_RX_STATUS_EXT_INFO		0x40
34468c2ecf20Sopenharmony_ci
34478c2ecf20Sopenharmony_ci#define PHY_ERROR_GEN_SPECTRAL_SCAN		0x26
34488c2ecf20Sopenharmony_ci#define PHY_ERROR_GEN_FALSE_RADAR_EXT		0x24
34498c2ecf20Sopenharmony_ci#define PHY_ERROR_GEN_RADAR			0x05
34508c2ecf20Sopenharmony_ci
34518c2ecf20Sopenharmony_ci#define PHY_ERROR_10_4_RADAR_MASK               0x4
34528c2ecf20Sopenharmony_ci#define PHY_ERROR_10_4_SPECTRAL_SCAN_MASK       0x4000000
34538c2ecf20Sopenharmony_ci
34548c2ecf20Sopenharmony_cienum phy_err_type {
34558c2ecf20Sopenharmony_ci	PHY_ERROR_UNKNOWN,
34568c2ecf20Sopenharmony_ci	PHY_ERROR_SPECTRAL_SCAN,
34578c2ecf20Sopenharmony_ci	PHY_ERROR_FALSE_RADAR_EXT,
34588c2ecf20Sopenharmony_ci	PHY_ERROR_RADAR
34598c2ecf20Sopenharmony_ci};
34608c2ecf20Sopenharmony_ci
34618c2ecf20Sopenharmony_cistruct wmi_phyerr {
34628c2ecf20Sopenharmony_ci	__le32 tsf_timestamp;
34638c2ecf20Sopenharmony_ci	__le16 freq1;
34648c2ecf20Sopenharmony_ci	__le16 freq2;
34658c2ecf20Sopenharmony_ci	u8 rssi_combined;
34668c2ecf20Sopenharmony_ci	u8 chan_width_mhz;
34678c2ecf20Sopenharmony_ci	u8 phy_err_code;
34688c2ecf20Sopenharmony_ci	u8 rsvd0;
34698c2ecf20Sopenharmony_ci	__le32 rssi_chains[4];
34708c2ecf20Sopenharmony_ci	__le16 nf_chains[4];
34718c2ecf20Sopenharmony_ci	__le32 buf_len;
34728c2ecf20Sopenharmony_ci	u8 buf[];
34738c2ecf20Sopenharmony_ci} __packed;
34748c2ecf20Sopenharmony_ci
34758c2ecf20Sopenharmony_cistruct wmi_phyerr_event {
34768c2ecf20Sopenharmony_ci	__le32 num_phyerrs;
34778c2ecf20Sopenharmony_ci	__le32 tsf_l32;
34788c2ecf20Sopenharmony_ci	__le32 tsf_u32;
34798c2ecf20Sopenharmony_ci	struct wmi_phyerr phyerrs[];
34808c2ecf20Sopenharmony_ci} __packed;
34818c2ecf20Sopenharmony_ci
34828c2ecf20Sopenharmony_cistruct wmi_10_4_phyerr_event {
34838c2ecf20Sopenharmony_ci	__le32 tsf_l32;
34848c2ecf20Sopenharmony_ci	__le32 tsf_u32;
34858c2ecf20Sopenharmony_ci	__le16 freq1;
34868c2ecf20Sopenharmony_ci	__le16 freq2;
34878c2ecf20Sopenharmony_ci	u8 rssi_combined;
34888c2ecf20Sopenharmony_ci	u8 chan_width_mhz;
34898c2ecf20Sopenharmony_ci	u8 phy_err_code;
34908c2ecf20Sopenharmony_ci	u8 rsvd0;
34918c2ecf20Sopenharmony_ci	__le32 rssi_chains[4];
34928c2ecf20Sopenharmony_ci	__le16 nf_chains[4];
34938c2ecf20Sopenharmony_ci	__le32 phy_err_mask[2];
34948c2ecf20Sopenharmony_ci	__le32 tsf_timestamp;
34958c2ecf20Sopenharmony_ci	__le32 buf_len;
34968c2ecf20Sopenharmony_ci	u8 buf[];
34978c2ecf20Sopenharmony_ci} __packed;
34988c2ecf20Sopenharmony_ci
34998c2ecf20Sopenharmony_cistruct wmi_radar_found_info {
35008c2ecf20Sopenharmony_ci	__le32 pri_min;
35018c2ecf20Sopenharmony_ci	__le32 pri_max;
35028c2ecf20Sopenharmony_ci	__le32 width_min;
35038c2ecf20Sopenharmony_ci	__le32 width_max;
35048c2ecf20Sopenharmony_ci	__le32 sidx_min;
35058c2ecf20Sopenharmony_ci	__le32 sidx_max;
35068c2ecf20Sopenharmony_ci} __packed;
35078c2ecf20Sopenharmony_ci
35088c2ecf20Sopenharmony_cienum wmi_radar_confirmation_status {
35098c2ecf20Sopenharmony_ci	/* Detected radar was due to SW pulses */
35108c2ecf20Sopenharmony_ci	WMI_SW_RADAR_DETECTED    = 0,
35118c2ecf20Sopenharmony_ci
35128c2ecf20Sopenharmony_ci	WMI_RADAR_DETECTION_FAIL = 1,
35138c2ecf20Sopenharmony_ci
35148c2ecf20Sopenharmony_ci	/* Real radar detected */
35158c2ecf20Sopenharmony_ci	WMI_HW_RADAR_DETECTED    = 2,
35168c2ecf20Sopenharmony_ci};
35178c2ecf20Sopenharmony_ci
35188c2ecf20Sopenharmony_ci#define PHYERR_TLV_SIG				0xBB
35198c2ecf20Sopenharmony_ci#define PHYERR_TLV_TAG_SEARCH_FFT_REPORT	0xFB
35208c2ecf20Sopenharmony_ci#define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY	0xF8
35218c2ecf20Sopenharmony_ci#define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT	0xF9
35228c2ecf20Sopenharmony_ci
35238c2ecf20Sopenharmony_cistruct phyerr_radar_report {
35248c2ecf20Sopenharmony_ci	__le32 reg0; /* RADAR_REPORT_REG0_* */
35258c2ecf20Sopenharmony_ci	__le32 reg1; /* RADAR_REPORT_REG1_* */
35268c2ecf20Sopenharmony_ci} __packed;
35278c2ecf20Sopenharmony_ci
35288c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK		0x80000000
35298c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB		31
35308c2ecf20Sopenharmony_ci
35318c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK	0x40000000
35328c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB	30
35338c2ecf20Sopenharmony_ci
35348c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK		0x3FF00000
35358c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB		20
35368c2ecf20Sopenharmony_ci
35378c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK		0x000F0000
35388c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB		16
35398c2ecf20Sopenharmony_ci
35408c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK		0x0000FC00
35418c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB		10
35428c2ecf20Sopenharmony_ci
35438c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_SIDX_MASK		0x000003FF
35448c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG0_PULSE_SIDX_LSB		0
35458c2ecf20Sopenharmony_ci
35468c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK	0x80000000
35478c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB	31
35488c2ecf20Sopenharmony_ci
35498c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK	0x7F000000
35508c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB		24
35518c2ecf20Sopenharmony_ci
35528c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK	0x00FF0000
35538c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB	16
35548c2ecf20Sopenharmony_ci
35558c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK		0x0000FF00
35568c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB		8
35578c2ecf20Sopenharmony_ci
35588c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_DUR_MASK		0x000000FF
35598c2ecf20Sopenharmony_ci#define RADAR_REPORT_REG1_PULSE_DUR_LSB			0
35608c2ecf20Sopenharmony_ci
35618c2ecf20Sopenharmony_cistruct phyerr_fft_report {
35628c2ecf20Sopenharmony_ci	__le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */
35638c2ecf20Sopenharmony_ci	__le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */
35648c2ecf20Sopenharmony_ci} __packed;
35658c2ecf20Sopenharmony_ci
35668c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK	0xFF800000
35678c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB	23
35688c2ecf20Sopenharmony_ci
35698c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK		0x007FC000
35708c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB		14
35718c2ecf20Sopenharmony_ci
35728c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK		0x00003000
35738c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB		12
35748c2ecf20Sopenharmony_ci
35758c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK		0x00000FFF
35768c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB		0
35778c2ecf20Sopenharmony_ci
35788c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK		0xFC000000
35798c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB		26
35808c2ecf20Sopenharmony_ci
35818c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK		0x03FC0000
35828c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB		18
35838c2ecf20Sopenharmony_ci
35848c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK		0x0003FF00
35858c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB		8
35868c2ecf20Sopenharmony_ci
35878c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK	0x000000FF
35888c2ecf20Sopenharmony_ci#define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB	0
35898c2ecf20Sopenharmony_ci
35908c2ecf20Sopenharmony_cistruct phyerr_tlv {
35918c2ecf20Sopenharmony_ci	__le16 len;
35928c2ecf20Sopenharmony_ci	u8 tag;
35938c2ecf20Sopenharmony_ci	u8 sig;
35948c2ecf20Sopenharmony_ci} __packed;
35958c2ecf20Sopenharmony_ci
35968c2ecf20Sopenharmony_ci#define DFS_RSSI_POSSIBLY_FALSE			50
35978c2ecf20Sopenharmony_ci#define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE	40
35988c2ecf20Sopenharmony_ci
35998c2ecf20Sopenharmony_cistruct wmi_mgmt_tx_hdr {
36008c2ecf20Sopenharmony_ci	__le32 vdev_id;
36018c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
36028c2ecf20Sopenharmony_ci	__le32 tx_rate;
36038c2ecf20Sopenharmony_ci	__le32 tx_power;
36048c2ecf20Sopenharmony_ci	__le32 buf_len;
36058c2ecf20Sopenharmony_ci} __packed;
36068c2ecf20Sopenharmony_ci
36078c2ecf20Sopenharmony_cistruct wmi_mgmt_tx_cmd {
36088c2ecf20Sopenharmony_ci	struct wmi_mgmt_tx_hdr hdr;
36098c2ecf20Sopenharmony_ci	u8 buf[];
36108c2ecf20Sopenharmony_ci} __packed;
36118c2ecf20Sopenharmony_ci
36128c2ecf20Sopenharmony_cistruct wmi_echo_event {
36138c2ecf20Sopenharmony_ci	__le32 value;
36148c2ecf20Sopenharmony_ci} __packed;
36158c2ecf20Sopenharmony_ci
36168c2ecf20Sopenharmony_cistruct wmi_echo_cmd {
36178c2ecf20Sopenharmony_ci	__le32 value;
36188c2ecf20Sopenharmony_ci} __packed;
36198c2ecf20Sopenharmony_ci
36208c2ecf20Sopenharmony_cistruct wmi_pdev_set_regdomain_cmd {
36218c2ecf20Sopenharmony_ci	__le32 reg_domain;
36228c2ecf20Sopenharmony_ci	__le32 reg_domain_2G;
36238c2ecf20Sopenharmony_ci	__le32 reg_domain_5G;
36248c2ecf20Sopenharmony_ci	__le32 conformance_test_limit_2G;
36258c2ecf20Sopenharmony_ci	__le32 conformance_test_limit_5G;
36268c2ecf20Sopenharmony_ci} __packed;
36278c2ecf20Sopenharmony_ci
36288c2ecf20Sopenharmony_cienum wmi_dfs_region {
36298c2ecf20Sopenharmony_ci	/* Uninitialized dfs domain */
36308c2ecf20Sopenharmony_ci	WMI_UNINIT_DFS_DOMAIN = 0,
36318c2ecf20Sopenharmony_ci
36328c2ecf20Sopenharmony_ci	/* FCC3 dfs domain */
36338c2ecf20Sopenharmony_ci	WMI_FCC_DFS_DOMAIN = 1,
36348c2ecf20Sopenharmony_ci
36358c2ecf20Sopenharmony_ci	/* ETSI dfs domain */
36368c2ecf20Sopenharmony_ci	WMI_ETSI_DFS_DOMAIN = 2,
36378c2ecf20Sopenharmony_ci
36388c2ecf20Sopenharmony_ci	/*Japan dfs domain */
36398c2ecf20Sopenharmony_ci	WMI_MKK4_DFS_DOMAIN = 3,
36408c2ecf20Sopenharmony_ci};
36418c2ecf20Sopenharmony_ci
36428c2ecf20Sopenharmony_cistruct wmi_pdev_set_regdomain_cmd_10x {
36438c2ecf20Sopenharmony_ci	__le32 reg_domain;
36448c2ecf20Sopenharmony_ci	__le32 reg_domain_2G;
36458c2ecf20Sopenharmony_ci	__le32 reg_domain_5G;
36468c2ecf20Sopenharmony_ci	__le32 conformance_test_limit_2G;
36478c2ecf20Sopenharmony_ci	__le32 conformance_test_limit_5G;
36488c2ecf20Sopenharmony_ci
36498c2ecf20Sopenharmony_ci	/* dfs domain from wmi_dfs_region */
36508c2ecf20Sopenharmony_ci	__le32 dfs_domain;
36518c2ecf20Sopenharmony_ci} __packed;
36528c2ecf20Sopenharmony_ci
36538c2ecf20Sopenharmony_ci/* Command to set/unset chip in quiet mode */
36548c2ecf20Sopenharmony_cistruct wmi_pdev_set_quiet_cmd {
36558c2ecf20Sopenharmony_ci	/* period in TUs */
36568c2ecf20Sopenharmony_ci	__le32 period;
36578c2ecf20Sopenharmony_ci
36588c2ecf20Sopenharmony_ci	/* duration in TUs */
36598c2ecf20Sopenharmony_ci	__le32 duration;
36608c2ecf20Sopenharmony_ci
36618c2ecf20Sopenharmony_ci	/* offset in TUs */
36628c2ecf20Sopenharmony_ci	__le32 next_start;
36638c2ecf20Sopenharmony_ci
36648c2ecf20Sopenharmony_ci	/* enable/disable */
36658c2ecf20Sopenharmony_ci	__le32 enabled;
36668c2ecf20Sopenharmony_ci} __packed;
36678c2ecf20Sopenharmony_ci
36688c2ecf20Sopenharmony_ci/*
36698c2ecf20Sopenharmony_ci * 802.11g protection mode.
36708c2ecf20Sopenharmony_ci */
36718c2ecf20Sopenharmony_cienum ath10k_protmode {
36728c2ecf20Sopenharmony_ci	ATH10K_PROT_NONE     = 0,    /* no protection */
36738c2ecf20Sopenharmony_ci	ATH10K_PROT_CTSONLY  = 1,    /* CTS to self */
36748c2ecf20Sopenharmony_ci	ATH10K_PROT_RTSCTS   = 2,    /* RTS-CTS */
36758c2ecf20Sopenharmony_ci};
36768c2ecf20Sopenharmony_ci
36778c2ecf20Sopenharmony_cienum wmi_rtscts_profile {
36788c2ecf20Sopenharmony_ci	WMI_RTSCTS_FOR_NO_RATESERIES = 0,
36798c2ecf20Sopenharmony_ci	WMI_RTSCTS_FOR_SECOND_RATESERIES,
36808c2ecf20Sopenharmony_ci	WMI_RTSCTS_ACROSS_SW_RETRIES
36818c2ecf20Sopenharmony_ci};
36828c2ecf20Sopenharmony_ci
36838c2ecf20Sopenharmony_ci#define WMI_RTSCTS_ENABLED		1
36848c2ecf20Sopenharmony_ci#define WMI_RTSCTS_SET_MASK		0x0f
36858c2ecf20Sopenharmony_ci#define WMI_RTSCTS_SET_LSB		0
36868c2ecf20Sopenharmony_ci
36878c2ecf20Sopenharmony_ci#define WMI_RTSCTS_PROFILE_MASK		0xf0
36888c2ecf20Sopenharmony_ci#define WMI_RTSCTS_PROFILE_LSB		4
36898c2ecf20Sopenharmony_ci
36908c2ecf20Sopenharmony_cienum wmi_beacon_gen_mode {
36918c2ecf20Sopenharmony_ci	WMI_BEACON_STAGGERED_MODE = 0,
36928c2ecf20Sopenharmony_ci	WMI_BEACON_BURST_MODE = 1
36938c2ecf20Sopenharmony_ci};
36948c2ecf20Sopenharmony_ci
36958c2ecf20Sopenharmony_cienum wmi_csa_event_ies_present_flag {
36968c2ecf20Sopenharmony_ci	WMI_CSA_IE_PRESENT = 0x00000001,
36978c2ecf20Sopenharmony_ci	WMI_XCSA_IE_PRESENT = 0x00000002,
36988c2ecf20Sopenharmony_ci	WMI_WBW_IE_PRESENT = 0x00000004,
36998c2ecf20Sopenharmony_ci	WMI_CSWARP_IE_PRESENT = 0x00000008,
37008c2ecf20Sopenharmony_ci};
37018c2ecf20Sopenharmony_ci
37028c2ecf20Sopenharmony_ci/* wmi CSA receive event from beacon frame */
37038c2ecf20Sopenharmony_cistruct wmi_csa_event {
37048c2ecf20Sopenharmony_ci	__le32 i_fc_dur;
37058c2ecf20Sopenharmony_ci	/* Bit 0-15: FC */
37068c2ecf20Sopenharmony_ci	/* Bit 16-31: DUR */
37078c2ecf20Sopenharmony_ci	struct wmi_mac_addr i_addr1;
37088c2ecf20Sopenharmony_ci	struct wmi_mac_addr i_addr2;
37098c2ecf20Sopenharmony_ci	__le32 csa_ie[2];
37108c2ecf20Sopenharmony_ci	__le32 xcsa_ie[2];
37118c2ecf20Sopenharmony_ci	__le32 wb_ie[2];
37128c2ecf20Sopenharmony_ci	__le32 cswarp_ie;
37138c2ecf20Sopenharmony_ci	__le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
37148c2ecf20Sopenharmony_ci} __packed;
37158c2ecf20Sopenharmony_ci
37168c2ecf20Sopenharmony_ci/* the definition of different PDEV parameters */
37178c2ecf20Sopenharmony_ci#define PDEV_DEFAULT_STATS_UPDATE_PERIOD    500
37188c2ecf20Sopenharmony_ci#define VDEV_DEFAULT_STATS_UPDATE_PERIOD    500
37198c2ecf20Sopenharmony_ci#define PEER_DEFAULT_STATS_UPDATE_PERIOD    500
37208c2ecf20Sopenharmony_ci
37218c2ecf20Sopenharmony_cistruct wmi_pdev_param_map {
37228c2ecf20Sopenharmony_ci	u32 tx_chain_mask;
37238c2ecf20Sopenharmony_ci	u32 rx_chain_mask;
37248c2ecf20Sopenharmony_ci	u32 txpower_limit2g;
37258c2ecf20Sopenharmony_ci	u32 txpower_limit5g;
37268c2ecf20Sopenharmony_ci	u32 txpower_scale;
37278c2ecf20Sopenharmony_ci	u32 beacon_gen_mode;
37288c2ecf20Sopenharmony_ci	u32 beacon_tx_mode;
37298c2ecf20Sopenharmony_ci	u32 resmgr_offchan_mode;
37308c2ecf20Sopenharmony_ci	u32 protection_mode;
37318c2ecf20Sopenharmony_ci	u32 dynamic_bw;
37328c2ecf20Sopenharmony_ci	u32 non_agg_sw_retry_th;
37338c2ecf20Sopenharmony_ci	u32 agg_sw_retry_th;
37348c2ecf20Sopenharmony_ci	u32 sta_kickout_th;
37358c2ecf20Sopenharmony_ci	u32 ac_aggrsize_scaling;
37368c2ecf20Sopenharmony_ci	u32 ltr_enable;
37378c2ecf20Sopenharmony_ci	u32 ltr_ac_latency_be;
37388c2ecf20Sopenharmony_ci	u32 ltr_ac_latency_bk;
37398c2ecf20Sopenharmony_ci	u32 ltr_ac_latency_vi;
37408c2ecf20Sopenharmony_ci	u32 ltr_ac_latency_vo;
37418c2ecf20Sopenharmony_ci	u32 ltr_ac_latency_timeout;
37428c2ecf20Sopenharmony_ci	u32 ltr_sleep_override;
37438c2ecf20Sopenharmony_ci	u32 ltr_rx_override;
37448c2ecf20Sopenharmony_ci	u32 ltr_tx_activity_timeout;
37458c2ecf20Sopenharmony_ci	u32 l1ss_enable;
37468c2ecf20Sopenharmony_ci	u32 dsleep_enable;
37478c2ecf20Sopenharmony_ci	u32 pcielp_txbuf_flush;
37488c2ecf20Sopenharmony_ci	u32 pcielp_txbuf_watermark;
37498c2ecf20Sopenharmony_ci	u32 pcielp_txbuf_tmo_en;
37508c2ecf20Sopenharmony_ci	u32 pcielp_txbuf_tmo_value;
37518c2ecf20Sopenharmony_ci	u32 pdev_stats_update_period;
37528c2ecf20Sopenharmony_ci	u32 vdev_stats_update_period;
37538c2ecf20Sopenharmony_ci	u32 peer_stats_update_period;
37548c2ecf20Sopenharmony_ci	u32 bcnflt_stats_update_period;
37558c2ecf20Sopenharmony_ci	u32 pmf_qos;
37568c2ecf20Sopenharmony_ci	u32 arp_ac_override;
37578c2ecf20Sopenharmony_ci	u32 dcs;
37588c2ecf20Sopenharmony_ci	u32 ani_enable;
37598c2ecf20Sopenharmony_ci	u32 ani_poll_period;
37608c2ecf20Sopenharmony_ci	u32 ani_listen_period;
37618c2ecf20Sopenharmony_ci	u32 ani_ofdm_level;
37628c2ecf20Sopenharmony_ci	u32 ani_cck_level;
37638c2ecf20Sopenharmony_ci	u32 dyntxchain;
37648c2ecf20Sopenharmony_ci	u32 proxy_sta;
37658c2ecf20Sopenharmony_ci	u32 idle_ps_config;
37668c2ecf20Sopenharmony_ci	u32 power_gating_sleep;
37678c2ecf20Sopenharmony_ci	u32 fast_channel_reset;
37688c2ecf20Sopenharmony_ci	u32 burst_dur;
37698c2ecf20Sopenharmony_ci	u32 burst_enable;
37708c2ecf20Sopenharmony_ci	u32 cal_period;
37718c2ecf20Sopenharmony_ci	u32 aggr_burst;
37728c2ecf20Sopenharmony_ci	u32 rx_decap_mode;
37738c2ecf20Sopenharmony_ci	u32 smart_antenna_default_antenna;
37748c2ecf20Sopenharmony_ci	u32 igmpmld_override;
37758c2ecf20Sopenharmony_ci	u32 igmpmld_tid;
37768c2ecf20Sopenharmony_ci	u32 antenna_gain;
37778c2ecf20Sopenharmony_ci	u32 rx_filter;
37788c2ecf20Sopenharmony_ci	u32 set_mcast_to_ucast_tid;
37798c2ecf20Sopenharmony_ci	u32 proxy_sta_mode;
37808c2ecf20Sopenharmony_ci	u32 set_mcast2ucast_mode;
37818c2ecf20Sopenharmony_ci	u32 set_mcast2ucast_buffer;
37828c2ecf20Sopenharmony_ci	u32 remove_mcast2ucast_buffer;
37838c2ecf20Sopenharmony_ci	u32 peer_sta_ps_statechg_enable;
37848c2ecf20Sopenharmony_ci	u32 igmpmld_ac_override;
37858c2ecf20Sopenharmony_ci	u32 block_interbss;
37868c2ecf20Sopenharmony_ci	u32 set_disable_reset_cmdid;
37878c2ecf20Sopenharmony_ci	u32 set_msdu_ttl_cmdid;
37888c2ecf20Sopenharmony_ci	u32 set_ppdu_duration_cmdid;
37898c2ecf20Sopenharmony_ci	u32 txbf_sound_period_cmdid;
37908c2ecf20Sopenharmony_ci	u32 set_promisc_mode_cmdid;
37918c2ecf20Sopenharmony_ci	u32 set_burst_mode_cmdid;
37928c2ecf20Sopenharmony_ci	u32 en_stats;
37938c2ecf20Sopenharmony_ci	u32 mu_group_policy;
37948c2ecf20Sopenharmony_ci	u32 noise_detection;
37958c2ecf20Sopenharmony_ci	u32 noise_threshold;
37968c2ecf20Sopenharmony_ci	u32 dpd_enable;
37978c2ecf20Sopenharmony_ci	u32 set_mcast_bcast_echo;
37988c2ecf20Sopenharmony_ci	u32 atf_strict_sch;
37998c2ecf20Sopenharmony_ci	u32 atf_sched_duration;
38008c2ecf20Sopenharmony_ci	u32 ant_plzn;
38018c2ecf20Sopenharmony_ci	u32 mgmt_retry_limit;
38028c2ecf20Sopenharmony_ci	u32 sensitivity_level;
38038c2ecf20Sopenharmony_ci	u32 signed_txpower_2g;
38048c2ecf20Sopenharmony_ci	u32 signed_txpower_5g;
38058c2ecf20Sopenharmony_ci	u32 enable_per_tid_amsdu;
38068c2ecf20Sopenharmony_ci	u32 enable_per_tid_ampdu;
38078c2ecf20Sopenharmony_ci	u32 cca_threshold;
38088c2ecf20Sopenharmony_ci	u32 rts_fixed_rate;
38098c2ecf20Sopenharmony_ci	u32 pdev_reset;
38108c2ecf20Sopenharmony_ci	u32 wapi_mbssid_offset;
38118c2ecf20Sopenharmony_ci	u32 arp_srcaddr;
38128c2ecf20Sopenharmony_ci	u32 arp_dstaddr;
38138c2ecf20Sopenharmony_ci	u32 enable_btcoex;
38148c2ecf20Sopenharmony_ci	u32 rfkill_config;
38158c2ecf20Sopenharmony_ci	u32 rfkill_enable;
38168c2ecf20Sopenharmony_ci	u32 peer_stats_info_enable;
38178c2ecf20Sopenharmony_ci};
38188c2ecf20Sopenharmony_ci
38198c2ecf20Sopenharmony_ci#define WMI_PDEV_PARAM_UNSUPPORTED 0
38208c2ecf20Sopenharmony_ci
38218c2ecf20Sopenharmony_cienum wmi_pdev_param {
38228c2ecf20Sopenharmony_ci	/* TX chain mask */
38238c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
38248c2ecf20Sopenharmony_ci	/* RX chain mask */
38258c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_RX_CHAIN_MASK,
38268c2ecf20Sopenharmony_ci	/* TX power limit for 2G Radio */
38278c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
38288c2ecf20Sopenharmony_ci	/* TX power limit for 5G Radio */
38298c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
38308c2ecf20Sopenharmony_ci	/* TX power scale */
38318c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_TXPOWER_SCALE,
38328c2ecf20Sopenharmony_ci	/* Beacon generation mode . 0: host, 1: target   */
38338c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_BEACON_GEN_MODE,
38348c2ecf20Sopenharmony_ci	/* Beacon generation mode . 0: staggered 1: bursted   */
38358c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_BEACON_TX_MODE,
38368c2ecf20Sopenharmony_ci	/*
38378c2ecf20Sopenharmony_ci	 * Resource manager off chan mode .
38388c2ecf20Sopenharmony_ci	 * 0: turn off off chan mode. 1: turn on offchan mode
38398c2ecf20Sopenharmony_ci	 */
38408c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
38418c2ecf20Sopenharmony_ci	/*
38428c2ecf20Sopenharmony_ci	 * Protection mode:
38438c2ecf20Sopenharmony_ci	 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
38448c2ecf20Sopenharmony_ci	 */
38458c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PROTECTION_MODE,
38468c2ecf20Sopenharmony_ci	/*
38478c2ecf20Sopenharmony_ci	 * Dynamic bandwidth - 0: disable, 1: enable
38488c2ecf20Sopenharmony_ci	 *
38498c2ecf20Sopenharmony_ci	 * When enabled HW rate control tries different bandwidths when
38508c2ecf20Sopenharmony_ci	 * retransmitting frames.
38518c2ecf20Sopenharmony_ci	 */
38528c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_DYNAMIC_BW,
38538c2ecf20Sopenharmony_ci	/* Non aggregrate/ 11g sw retry threshold.0-disable */
38548c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
38558c2ecf20Sopenharmony_ci	/* aggregrate sw retry threshold. 0-disable*/
38568c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
38578c2ecf20Sopenharmony_ci	/* Station kickout threshold (non of consecutive failures).0-disable */
38588c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_STA_KICKOUT_TH,
38598c2ecf20Sopenharmony_ci	/* Aggerate size scaling configuration per AC */
38608c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
38618c2ecf20Sopenharmony_ci	/* LTR enable */
38628c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_ENABLE,
38638c2ecf20Sopenharmony_ci	/* LTR latency for BE, in us */
38648c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
38658c2ecf20Sopenharmony_ci	/* LTR latency for BK, in us */
38668c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
38678c2ecf20Sopenharmony_ci	/* LTR latency for VI, in us */
38688c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
38698c2ecf20Sopenharmony_ci	/* LTR latency for VO, in us  */
38708c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
38718c2ecf20Sopenharmony_ci	/* LTR AC latency timeout, in ms */
38728c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
38738c2ecf20Sopenharmony_ci	/* LTR platform latency override, in us */
38748c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
38758c2ecf20Sopenharmony_ci	/* LTR-RX override, in us */
38768c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
38778c2ecf20Sopenharmony_ci	/* Tx activity timeout for LTR, in us */
38788c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
38798c2ecf20Sopenharmony_ci	/* L1SS state machine enable */
38808c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_L1SS_ENABLE,
38818c2ecf20Sopenharmony_ci	/* Deep sleep state machine enable */
38828c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_DSLEEP_ENABLE,
38838c2ecf20Sopenharmony_ci	/* RX buffering flush enable */
38848c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
38858c2ecf20Sopenharmony_ci	/* RX buffering matermark */
38868c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
38878c2ecf20Sopenharmony_ci	/* RX buffering timeout enable */
38888c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
38898c2ecf20Sopenharmony_ci	/* RX buffering timeout value */
38908c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
38918c2ecf20Sopenharmony_ci	/* pdev level stats update period in ms */
38928c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
38938c2ecf20Sopenharmony_ci	/* vdev level stats update period in ms */
38948c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
38958c2ecf20Sopenharmony_ci	/* peer level stats update period in ms */
38968c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
38978c2ecf20Sopenharmony_ci	/* beacon filter status update period */
38988c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
38998c2ecf20Sopenharmony_ci	/* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
39008c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PMF_QOS,
39018c2ecf20Sopenharmony_ci	/* Access category on which ARP frames are sent */
39028c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
39038c2ecf20Sopenharmony_ci	/* DCS configuration */
39048c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_DCS,
39058c2ecf20Sopenharmony_ci	/* Enable/Disable ANI on target */
39068c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ANI_ENABLE,
39078c2ecf20Sopenharmony_ci	/* configure the ANI polling period */
39088c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ANI_POLL_PERIOD,
39098c2ecf20Sopenharmony_ci	/* configure the ANI listening period */
39108c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
39118c2ecf20Sopenharmony_ci	/* configure OFDM immunity level */
39128c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
39138c2ecf20Sopenharmony_ci	/* configure CCK immunity level */
39148c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_ANI_CCK_LEVEL,
39158c2ecf20Sopenharmony_ci	/* Enable/Disable CDD for 1x1 STAs in rate control module */
39168c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_DYNTXCHAIN,
39178c2ecf20Sopenharmony_ci	/* Enable/Disable proxy STA */
39188c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_PROXY_STA,
39198c2ecf20Sopenharmony_ci	/* Enable/Disable low power state when all VDEVs are inactive/idle. */
39208c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_IDLE_PS_CONFIG,
39218c2ecf20Sopenharmony_ci	/* Enable/Disable power gating sleep */
39228c2ecf20Sopenharmony_ci	WMI_PDEV_PARAM_POWER_GATING_SLEEP,
39238c2ecf20Sopenharmony_ci};
39248c2ecf20Sopenharmony_ci
39258c2ecf20Sopenharmony_cienum wmi_10x_pdev_param {
39268c2ecf20Sopenharmony_ci	/* TX chian mask */
39278c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
39288c2ecf20Sopenharmony_ci	/* RX chian mask */
39298c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
39308c2ecf20Sopenharmony_ci	/* TX power limit for 2G Radio */
39318c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
39328c2ecf20Sopenharmony_ci	/* TX power limit for 5G Radio */
39338c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
39348c2ecf20Sopenharmony_ci	/* TX power scale */
39358c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
39368c2ecf20Sopenharmony_ci	/* Beacon generation mode . 0: host, 1: target   */
39378c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
39388c2ecf20Sopenharmony_ci	/* Beacon generation mode . 0: staggered 1: bursted   */
39398c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
39408c2ecf20Sopenharmony_ci	/*
39418c2ecf20Sopenharmony_ci	 * Resource manager off chan mode .
39428c2ecf20Sopenharmony_ci	 * 0: turn off off chan mode. 1: turn on offchan mode
39438c2ecf20Sopenharmony_ci	 */
39448c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
39458c2ecf20Sopenharmony_ci	/*
39468c2ecf20Sopenharmony_ci	 * Protection mode:
39478c2ecf20Sopenharmony_ci	 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
39488c2ecf20Sopenharmony_ci	 */
39498c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PROTECTION_MODE,
39508c2ecf20Sopenharmony_ci	/* Dynamic bandwidth 0: disable 1: enable */
39518c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_DYNAMIC_BW,
39528c2ecf20Sopenharmony_ci	/* Non aggregrate/ 11g sw retry threshold.0-disable */
39538c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
39548c2ecf20Sopenharmony_ci	/* aggregrate sw retry threshold. 0-disable*/
39558c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
39568c2ecf20Sopenharmony_ci	/* Station kickout threshold (non of consecutive failures).0-disable */
39578c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
39588c2ecf20Sopenharmony_ci	/* Aggerate size scaling configuration per AC */
39598c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
39608c2ecf20Sopenharmony_ci	/* LTR enable */
39618c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_ENABLE,
39628c2ecf20Sopenharmony_ci	/* LTR latency for BE, in us */
39638c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
39648c2ecf20Sopenharmony_ci	/* LTR latency for BK, in us */
39658c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
39668c2ecf20Sopenharmony_ci	/* LTR latency for VI, in us */
39678c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
39688c2ecf20Sopenharmony_ci	/* LTR latency for VO, in us  */
39698c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
39708c2ecf20Sopenharmony_ci	/* LTR AC latency timeout, in ms */
39718c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
39728c2ecf20Sopenharmony_ci	/* LTR platform latency override, in us */
39738c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
39748c2ecf20Sopenharmony_ci	/* LTR-RX override, in us */
39758c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
39768c2ecf20Sopenharmony_ci	/* Tx activity timeout for LTR, in us */
39778c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
39788c2ecf20Sopenharmony_ci	/* L1SS state machine enable */
39798c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_L1SS_ENABLE,
39808c2ecf20Sopenharmony_ci	/* Deep sleep state machine enable */
39818c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
39828c2ecf20Sopenharmony_ci	/* pdev level stats update period in ms */
39838c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
39848c2ecf20Sopenharmony_ci	/* vdev level stats update period in ms */
39858c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
39868c2ecf20Sopenharmony_ci	/* peer level stats update period in ms */
39878c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
39888c2ecf20Sopenharmony_ci	/* beacon filter status update period */
39898c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
39908c2ecf20Sopenharmony_ci	/* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
39918c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PMF_QOS,
39928c2ecf20Sopenharmony_ci	/* Access category on which ARP and DHCP frames are sent */
39938c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
39948c2ecf20Sopenharmony_ci	/* DCS configuration */
39958c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_DCS,
39968c2ecf20Sopenharmony_ci	/* Enable/Disable ANI on target */
39978c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANI_ENABLE,
39988c2ecf20Sopenharmony_ci	/* configure the ANI polling period */
39998c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
40008c2ecf20Sopenharmony_ci	/* configure the ANI listening period */
40018c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
40028c2ecf20Sopenharmony_ci	/* configure OFDM immunity level */
40038c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
40048c2ecf20Sopenharmony_ci	/* configure CCK immunity level */
40058c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
40068c2ecf20Sopenharmony_ci	/* Enable/Disable CDD for 1x1 STAs in rate control module */
40078c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_DYNTXCHAIN,
40088c2ecf20Sopenharmony_ci	/* Enable/Disable Fast channel reset*/
40098c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
40108c2ecf20Sopenharmony_ci	/* Set Bursting DUR */
40118c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_BURST_DUR,
40128c2ecf20Sopenharmony_ci	/* Set Bursting Enable*/
40138c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_BURST_ENABLE,
40148c2ecf20Sopenharmony_ci
40158c2ecf20Sopenharmony_ci	/* following are available as of firmware 10.2 */
40168c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
40178c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE,
40188c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_IGMPMLD_TID,
40198c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ANTENNA_GAIN,
40208c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_RX_DECAP_MODE,
40218c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_RX_FILTER,
40228c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID,
40238c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PROXY_STA_MODE,
40248c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE,
40258c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
40268c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
40278c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE,
40288c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_RTS_FIXED_RATE,
40298c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_CAL_PERIOD,
40308c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ATF_STRICT_SCH,
40318c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_ATF_SCHED_DURATION,
40328c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
40338c2ecf20Sopenharmony_ci	WMI_10X_PDEV_PARAM_PDEV_RESET
40348c2ecf20Sopenharmony_ci};
40358c2ecf20Sopenharmony_ci
40368c2ecf20Sopenharmony_cienum wmi_10_4_pdev_param {
40378c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
40388c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RX_CHAIN_MASK,
40398c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT2G,
40408c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT5G,
40418c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TXPOWER_SCALE,
40428c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BEACON_GEN_MODE,
40438c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BEACON_TX_MODE,
40448c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
40458c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PROTECTION_MODE,
40468c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_DYNAMIC_BW,
40478c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
40488c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_AGG_SW_RETRY_TH,
40498c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_STA_KICKOUT_TH,
40508c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_AC_AGGRSIZE_SCALING,
40518c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_ENABLE,
40528c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BE,
40538c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BK,
40548c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VI,
40558c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VO,
40568c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
40578c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
40588c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_RX_OVERRIDE,
40598c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
40608c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_L1SS_ENABLE,
40618c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_DSLEEP_ENABLE,
40628c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
40638c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
40648c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
40658c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
40668c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
40678c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
40688c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
40698c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
40708c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PMF_QOS,
40718c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ARP_AC_OVERRIDE,
40728c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_DCS,
40738c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANI_ENABLE,
40748c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANI_POLL_PERIOD,
40758c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANI_LISTEN_PERIOD,
40768c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANI_OFDM_LEVEL,
40778c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANI_CCK_LEVEL,
40788c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_DYNTXCHAIN,
40798c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PROXY_STA,
40808c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_IDLE_PS_CONFIG,
40818c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_POWER_GATING_SLEEP,
40828c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_AGGR_BURST,
40838c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RX_DECAP_MODE,
40848c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_FAST_CHANNEL_RESET,
40858c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BURST_DUR,
40868c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BURST_ENABLE,
40878c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
40888c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_IGMPMLD_OVERRIDE,
40898c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_IGMPMLD_TID,
40908c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANTENNA_GAIN,
40918c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RX_FILTER,
40928c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_SET_MCAST_TO_UCAST_TID,
40938c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PROXY_STA_MODE,
40948c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_MODE,
40958c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
40968c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
40978c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PEER_STA_PS_STATECHG_ENABLE,
40988c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
40998c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_BLOCK_INTERBSS,
41008c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
41018c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_MSDU_TTL_CMDID,
41028c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
41038c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
41048c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
41058c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_BURST_MODE_CMDID,
41068c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_EN_STATS,
41078c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_MU_GROUP_POLICY,
41088c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_NOISE_DETECTION,
41098c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_NOISE_THRESHOLD,
41108c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_DPD_ENABLE,
41118c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
41128c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_STRICT_SCH,
41138c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_SCHED_DURATION,
41148c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ANT_PLZN,
41158c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_MGMT_RETRY_LIMIT,
41168c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SENSITIVITY_LEVEL,
41178c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_2G,
41188c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_5G,
41198c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
41208c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
41218c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_CCA_THRESHOLD,
41228c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RTS_FIXED_RATE,
41238c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_CAL_PERIOD,
41248c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PDEV_RESET,
41258c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_WAPI_MBSSID_OFFSET,
41268c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ARP_SRCADDR,
41278c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ARP_DSTADDR,
41288c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_TXPOWER_DECR_DB,
41298c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_RX_BATCHMODE,
41308c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_PACKET_AGGR_DELAY,
41318c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_OBSS_NOISE_SCH,
41328c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_OBSS_NOISE_SCALING_FACTOR,
41338c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_CUST_TXPOWER_SCALE,
41348c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_DYNAMIC_ENABLE,
41358c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ATF_SSID_GROUP_POLICY,
41368c2ecf20Sopenharmony_ci	WMI_10_4_PDEV_PARAM_ENABLE_BTCOEX,
41378c2ecf20Sopenharmony_ci};
41388c2ecf20Sopenharmony_ci
41398c2ecf20Sopenharmony_cistruct wmi_pdev_set_param_cmd {
41408c2ecf20Sopenharmony_ci	__le32 param_id;
41418c2ecf20Sopenharmony_ci	__le32 param_value;
41428c2ecf20Sopenharmony_ci} __packed;
41438c2ecf20Sopenharmony_ci
41448c2ecf20Sopenharmony_cistruct wmi_pdev_set_base_macaddr_cmd {
41458c2ecf20Sopenharmony_ci	struct wmi_mac_addr mac_addr;
41468c2ecf20Sopenharmony_ci} __packed;
41478c2ecf20Sopenharmony_ci
41488c2ecf20Sopenharmony_ci/* valid period is 1 ~ 60000ms, unit in millisecond */
41498c2ecf20Sopenharmony_ci#define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
41508c2ecf20Sopenharmony_ci
41518c2ecf20Sopenharmony_cistruct wmi_pdev_get_tpc_config_cmd {
41528c2ecf20Sopenharmony_ci	/* parameter   */
41538c2ecf20Sopenharmony_ci	__le32 param;
41548c2ecf20Sopenharmony_ci} __packed;
41558c2ecf20Sopenharmony_ci
41568c2ecf20Sopenharmony_ci#define WMI_TPC_CONFIG_PARAM		1
41578c2ecf20Sopenharmony_ci#define WMI_TPC_FINAL_RATE_MAX		240
41588c2ecf20Sopenharmony_ci#define WMI_TPC_TX_N_CHAIN		4
41598c2ecf20Sopenharmony_ci#define WMI_TPC_RATE_MAX               (WMI_TPC_TX_N_CHAIN * 65)
41608c2ecf20Sopenharmony_ci#define WMI_TPC_PREAM_TABLE_MAX		10
41618c2ecf20Sopenharmony_ci#define WMI_TPC_FLAG			3
41628c2ecf20Sopenharmony_ci#define WMI_TPC_BUF_SIZE		10
41638c2ecf20Sopenharmony_ci#define WMI_TPC_BEAMFORMING		2
41648c2ecf20Sopenharmony_ci
41658c2ecf20Sopenharmony_cienum wmi_tpc_table_type {
41668c2ecf20Sopenharmony_ci	WMI_TPC_TABLE_TYPE_CDD = 0,
41678c2ecf20Sopenharmony_ci	WMI_TPC_TABLE_TYPE_STBC = 1,
41688c2ecf20Sopenharmony_ci	WMI_TPC_TABLE_TYPE_TXBF = 2,
41698c2ecf20Sopenharmony_ci};
41708c2ecf20Sopenharmony_ci
41718c2ecf20Sopenharmony_cienum wmi_tpc_config_event_flag {
41728c2ecf20Sopenharmony_ci	WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD	= 0x1,
41738c2ecf20Sopenharmony_ci	WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC	= 0x2,
41748c2ecf20Sopenharmony_ci	WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF	= 0x4,
41758c2ecf20Sopenharmony_ci};
41768c2ecf20Sopenharmony_ci
41778c2ecf20Sopenharmony_cistruct wmi_pdev_tpc_config_event {
41788c2ecf20Sopenharmony_ci	__le32 reg_domain;
41798c2ecf20Sopenharmony_ci	__le32 chan_freq;
41808c2ecf20Sopenharmony_ci	__le32 phy_mode;
41818c2ecf20Sopenharmony_ci	__le32 twice_antenna_reduction;
41828c2ecf20Sopenharmony_ci	__le32 twice_max_rd_power;
41838c2ecf20Sopenharmony_ci	a_sle32 twice_antenna_gain;
41848c2ecf20Sopenharmony_ci	__le32 power_limit;
41858c2ecf20Sopenharmony_ci	__le32 rate_max;
41868c2ecf20Sopenharmony_ci	__le32 num_tx_chain;
41878c2ecf20Sopenharmony_ci	__le32 ctl;
41888c2ecf20Sopenharmony_ci	__le32 flags;
41898c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
41908c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
41918c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
41928c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
41938c2ecf20Sopenharmony_ci	u8 rates_array[WMI_TPC_RATE_MAX];
41948c2ecf20Sopenharmony_ci} __packed;
41958c2ecf20Sopenharmony_ci
41968c2ecf20Sopenharmony_ci/* Transmit power scale factor. */
41978c2ecf20Sopenharmony_cienum wmi_tp_scale {
41988c2ecf20Sopenharmony_ci	WMI_TP_SCALE_MAX    = 0,	/* no scaling (default) */
41998c2ecf20Sopenharmony_ci	WMI_TP_SCALE_50     = 1,	/* 50% of max (-3 dBm) */
42008c2ecf20Sopenharmony_ci	WMI_TP_SCALE_25     = 2,	/* 25% of max (-6 dBm) */
42018c2ecf20Sopenharmony_ci	WMI_TP_SCALE_12     = 3,	/* 12% of max (-9 dBm) */
42028c2ecf20Sopenharmony_ci	WMI_TP_SCALE_MIN    = 4,	/* min, but still on   */
42038c2ecf20Sopenharmony_ci	WMI_TP_SCALE_SIZE   = 5,	/* max num of enum     */
42048c2ecf20Sopenharmony_ci};
42058c2ecf20Sopenharmony_ci
42068c2ecf20Sopenharmony_cistruct wmi_pdev_tpc_final_table_event {
42078c2ecf20Sopenharmony_ci	__le32 reg_domain;
42088c2ecf20Sopenharmony_ci	__le32 chan_freq;
42098c2ecf20Sopenharmony_ci	__le32 phy_mode;
42108c2ecf20Sopenharmony_ci	__le32 twice_antenna_reduction;
42118c2ecf20Sopenharmony_ci	__le32 twice_max_rd_power;
42128c2ecf20Sopenharmony_ci	a_sle32 twice_antenna_gain;
42138c2ecf20Sopenharmony_ci	__le32 power_limit;
42148c2ecf20Sopenharmony_ci	__le32 rate_max;
42158c2ecf20Sopenharmony_ci	__le32 num_tx_chain;
42168c2ecf20Sopenharmony_ci	__le32 ctl;
42178c2ecf20Sopenharmony_ci	__le32 flags;
42188c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
42198c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
42208c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
42218c2ecf20Sopenharmony_ci	s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
42228c2ecf20Sopenharmony_ci	u8 rates_array[WMI_TPC_FINAL_RATE_MAX];
42238c2ecf20Sopenharmony_ci	u8 ctl_power_table[WMI_TPC_BEAMFORMING][WMI_TPC_TX_N_CHAIN]
42248c2ecf20Sopenharmony_ci	   [WMI_TPC_TX_N_CHAIN];
42258c2ecf20Sopenharmony_ci} __packed;
42268c2ecf20Sopenharmony_ci
42278c2ecf20Sopenharmony_cistruct wmi_pdev_get_tpc_table_cmd {
42288c2ecf20Sopenharmony_ci	__le32 param;
42298c2ecf20Sopenharmony_ci} __packed;
42308c2ecf20Sopenharmony_ci
42318c2ecf20Sopenharmony_cienum wmi_tpc_pream_2ghz {
42328c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_CCK = 0,
42338c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_OFDM,
42348c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_HT20,
42358c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_HT40,
42368c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_VHT20,
42378c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_VHT40,
42388c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_2GHZ_VHT80,
42398c2ecf20Sopenharmony_ci};
42408c2ecf20Sopenharmony_ci
42418c2ecf20Sopenharmony_cienum wmi_tpc_pream_5ghz {
42428c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_OFDM = 1,
42438c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_HT20,
42448c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_HT40,
42458c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_VHT20,
42468c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_VHT40,
42478c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_VHT80,
42488c2ecf20Sopenharmony_ci	WMI_TPC_PREAM_5GHZ_HTCUP,
42498c2ecf20Sopenharmony_ci};
42508c2ecf20Sopenharmony_ci
42518c2ecf20Sopenharmony_ci#define	WMI_PEER_PS_STATE_DISABLED	2
42528c2ecf20Sopenharmony_ci
42538c2ecf20Sopenharmony_cistruct wmi_peer_sta_ps_state_chg_event {
42548c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
42558c2ecf20Sopenharmony_ci	__le32 peer_ps_state;
42568c2ecf20Sopenharmony_ci} __packed;
42578c2ecf20Sopenharmony_ci
42588c2ecf20Sopenharmony_cistruct wmi_pdev_chanlist_update_event {
42598c2ecf20Sopenharmony_ci	/* number of channels */
42608c2ecf20Sopenharmony_ci	__le32 num_chan;
42618c2ecf20Sopenharmony_ci	/* array of channels */
42628c2ecf20Sopenharmony_ci	struct wmi_channel channel_list[1];
42638c2ecf20Sopenharmony_ci} __packed;
42648c2ecf20Sopenharmony_ci
42658c2ecf20Sopenharmony_ci#define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
42668c2ecf20Sopenharmony_ci
42678c2ecf20Sopenharmony_cistruct wmi_debug_mesg_event {
42688c2ecf20Sopenharmony_ci	/* message buffer, NULL terminated */
42698c2ecf20Sopenharmony_ci	char bufp[WMI_MAX_DEBUG_MESG];
42708c2ecf20Sopenharmony_ci} __packed;
42718c2ecf20Sopenharmony_ci
42728c2ecf20Sopenharmony_cienum {
42738c2ecf20Sopenharmony_ci	/* P2P device */
42748c2ecf20Sopenharmony_ci	VDEV_SUBTYPE_P2PDEV = 0,
42758c2ecf20Sopenharmony_ci	/* P2P client */
42768c2ecf20Sopenharmony_ci	VDEV_SUBTYPE_P2PCLI,
42778c2ecf20Sopenharmony_ci	/* P2P GO */
42788c2ecf20Sopenharmony_ci	VDEV_SUBTYPE_P2PGO,
42798c2ecf20Sopenharmony_ci	/* BT3.0 HS */
42808c2ecf20Sopenharmony_ci	VDEV_SUBTYPE_BT,
42818c2ecf20Sopenharmony_ci};
42828c2ecf20Sopenharmony_ci
42838c2ecf20Sopenharmony_cistruct wmi_pdev_set_channel_cmd {
42848c2ecf20Sopenharmony_ci	/* idnore power , only use flags , mode and freq */
42858c2ecf20Sopenharmony_ci	struct wmi_channel chan;
42868c2ecf20Sopenharmony_ci} __packed;
42878c2ecf20Sopenharmony_ci
42888c2ecf20Sopenharmony_cistruct wmi_pdev_pktlog_enable_cmd {
42898c2ecf20Sopenharmony_ci	__le32 ev_bitmap;
42908c2ecf20Sopenharmony_ci} __packed;
42918c2ecf20Sopenharmony_ci
42928c2ecf20Sopenharmony_ci/* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
42938c2ecf20Sopenharmony_ci#define WMI_DSCP_MAP_MAX    (64)
42948c2ecf20Sopenharmony_cistruct wmi_pdev_set_dscp_tid_map_cmd {
42958c2ecf20Sopenharmony_ci	/* map indicating DSCP to TID conversion */
42968c2ecf20Sopenharmony_ci	__le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
42978c2ecf20Sopenharmony_ci} __packed;
42988c2ecf20Sopenharmony_ci
42998c2ecf20Sopenharmony_cienum mcast_bcast_rate_id {
43008c2ecf20Sopenharmony_ci	WMI_SET_MCAST_RATE,
43018c2ecf20Sopenharmony_ci	WMI_SET_BCAST_RATE
43028c2ecf20Sopenharmony_ci};
43038c2ecf20Sopenharmony_ci
43048c2ecf20Sopenharmony_cistruct mcast_bcast_rate {
43058c2ecf20Sopenharmony_ci	enum mcast_bcast_rate_id rate_id;
43068c2ecf20Sopenharmony_ci	__le32 rate;
43078c2ecf20Sopenharmony_ci} __packed;
43088c2ecf20Sopenharmony_ci
43098c2ecf20Sopenharmony_cistruct wmi_wmm_params {
43108c2ecf20Sopenharmony_ci	__le32 cwmin;
43118c2ecf20Sopenharmony_ci	__le32 cwmax;
43128c2ecf20Sopenharmony_ci	__le32 aifs;
43138c2ecf20Sopenharmony_ci	__le32 txop;
43148c2ecf20Sopenharmony_ci	__le32 acm;
43158c2ecf20Sopenharmony_ci	__le32 no_ack;
43168c2ecf20Sopenharmony_ci} __packed;
43178c2ecf20Sopenharmony_ci
43188c2ecf20Sopenharmony_cistruct wmi_pdev_set_wmm_params {
43198c2ecf20Sopenharmony_ci	struct wmi_wmm_params ac_be;
43208c2ecf20Sopenharmony_ci	struct wmi_wmm_params ac_bk;
43218c2ecf20Sopenharmony_ci	struct wmi_wmm_params ac_vi;
43228c2ecf20Sopenharmony_ci	struct wmi_wmm_params ac_vo;
43238c2ecf20Sopenharmony_ci} __packed;
43248c2ecf20Sopenharmony_ci
43258c2ecf20Sopenharmony_cistruct wmi_wmm_params_arg {
43268c2ecf20Sopenharmony_ci	u32 cwmin;
43278c2ecf20Sopenharmony_ci	u32 cwmax;
43288c2ecf20Sopenharmony_ci	u32 aifs;
43298c2ecf20Sopenharmony_ci	u32 txop;
43308c2ecf20Sopenharmony_ci	u32 acm;
43318c2ecf20Sopenharmony_ci	u32 no_ack;
43328c2ecf20Sopenharmony_ci};
43338c2ecf20Sopenharmony_ci
43348c2ecf20Sopenharmony_cistruct wmi_wmm_params_all_arg {
43358c2ecf20Sopenharmony_ci	struct wmi_wmm_params_arg ac_be;
43368c2ecf20Sopenharmony_ci	struct wmi_wmm_params_arg ac_bk;
43378c2ecf20Sopenharmony_ci	struct wmi_wmm_params_arg ac_vi;
43388c2ecf20Sopenharmony_ci	struct wmi_wmm_params_arg ac_vo;
43398c2ecf20Sopenharmony_ci};
43408c2ecf20Sopenharmony_ci
43418c2ecf20Sopenharmony_cistruct wmi_pdev_stats_tx {
43428c2ecf20Sopenharmony_ci	/* Num HTT cookies queued to dispatch list */
43438c2ecf20Sopenharmony_ci	__le32 comp_queued;
43448c2ecf20Sopenharmony_ci
43458c2ecf20Sopenharmony_ci	/* Num HTT cookies dispatched */
43468c2ecf20Sopenharmony_ci	__le32 comp_delivered;
43478c2ecf20Sopenharmony_ci
43488c2ecf20Sopenharmony_ci	/* Num MSDU queued to WAL */
43498c2ecf20Sopenharmony_ci	__le32 msdu_enqued;
43508c2ecf20Sopenharmony_ci
43518c2ecf20Sopenharmony_ci	/* Num MPDU queue to WAL */
43528c2ecf20Sopenharmony_ci	__le32 mpdu_enqued;
43538c2ecf20Sopenharmony_ci
43548c2ecf20Sopenharmony_ci	/* Num MSDUs dropped by WMM limit */
43558c2ecf20Sopenharmony_ci	__le32 wmm_drop;
43568c2ecf20Sopenharmony_ci
43578c2ecf20Sopenharmony_ci	/* Num Local frames queued */
43588c2ecf20Sopenharmony_ci	__le32 local_enqued;
43598c2ecf20Sopenharmony_ci
43608c2ecf20Sopenharmony_ci	/* Num Local frames done */
43618c2ecf20Sopenharmony_ci	__le32 local_freed;
43628c2ecf20Sopenharmony_ci
43638c2ecf20Sopenharmony_ci	/* Num queued to HW */
43648c2ecf20Sopenharmony_ci	__le32 hw_queued;
43658c2ecf20Sopenharmony_ci
43668c2ecf20Sopenharmony_ci	/* Num PPDU reaped from HW */
43678c2ecf20Sopenharmony_ci	__le32 hw_reaped;
43688c2ecf20Sopenharmony_ci
43698c2ecf20Sopenharmony_ci	/* Num underruns */
43708c2ecf20Sopenharmony_ci	__le32 underrun;
43718c2ecf20Sopenharmony_ci
43728c2ecf20Sopenharmony_ci	/* Num PPDUs cleaned up in TX abort */
43738c2ecf20Sopenharmony_ci	__le32 tx_abort;
43748c2ecf20Sopenharmony_ci
43758c2ecf20Sopenharmony_ci	/* Num MPDUs requed by SW */
43768c2ecf20Sopenharmony_ci	__le32 mpdus_requed;
43778c2ecf20Sopenharmony_ci
43788c2ecf20Sopenharmony_ci	/* excessive retries */
43798c2ecf20Sopenharmony_ci	__le32 tx_ko;
43808c2ecf20Sopenharmony_ci
43818c2ecf20Sopenharmony_ci	/* data hw rate code */
43828c2ecf20Sopenharmony_ci	__le32 data_rc;
43838c2ecf20Sopenharmony_ci
43848c2ecf20Sopenharmony_ci	/* Scheduler self triggers */
43858c2ecf20Sopenharmony_ci	__le32 self_triggers;
43868c2ecf20Sopenharmony_ci
43878c2ecf20Sopenharmony_ci	/* frames dropped due to excessive sw retries */
43888c2ecf20Sopenharmony_ci	__le32 sw_retry_failure;
43898c2ecf20Sopenharmony_ci
43908c2ecf20Sopenharmony_ci	/* illegal rate phy errors  */
43918c2ecf20Sopenharmony_ci	__le32 illgl_rate_phy_err;
43928c2ecf20Sopenharmony_ci
43938c2ecf20Sopenharmony_ci	/* wal pdev continuous xretry */
43948c2ecf20Sopenharmony_ci	__le32 pdev_cont_xretry;
43958c2ecf20Sopenharmony_ci
43968c2ecf20Sopenharmony_ci	/* wal pdev continous xretry */
43978c2ecf20Sopenharmony_ci	__le32 pdev_tx_timeout;
43988c2ecf20Sopenharmony_ci
43998c2ecf20Sopenharmony_ci	/* wal pdev resets  */
44008c2ecf20Sopenharmony_ci	__le32 pdev_resets;
44018c2ecf20Sopenharmony_ci
44028c2ecf20Sopenharmony_ci	/* frames dropped due to non-availability of stateless TIDs */
44038c2ecf20Sopenharmony_ci	__le32 stateless_tid_alloc_failure;
44048c2ecf20Sopenharmony_ci
44058c2ecf20Sopenharmony_ci	__le32 phy_underrun;
44068c2ecf20Sopenharmony_ci
44078c2ecf20Sopenharmony_ci	/* MPDU is more than txop limit */
44088c2ecf20Sopenharmony_ci	__le32 txop_ovf;
44098c2ecf20Sopenharmony_ci} __packed;
44108c2ecf20Sopenharmony_ci
44118c2ecf20Sopenharmony_cistruct wmi_10_4_pdev_stats_tx {
44128c2ecf20Sopenharmony_ci	/* Num HTT cookies queued to dispatch list */
44138c2ecf20Sopenharmony_ci	__le32 comp_queued;
44148c2ecf20Sopenharmony_ci
44158c2ecf20Sopenharmony_ci	/* Num HTT cookies dispatched */
44168c2ecf20Sopenharmony_ci	__le32 comp_delivered;
44178c2ecf20Sopenharmony_ci
44188c2ecf20Sopenharmony_ci	/* Num MSDU queued to WAL */
44198c2ecf20Sopenharmony_ci	__le32 msdu_enqued;
44208c2ecf20Sopenharmony_ci
44218c2ecf20Sopenharmony_ci	/* Num MPDU queue to WAL */
44228c2ecf20Sopenharmony_ci	__le32 mpdu_enqued;
44238c2ecf20Sopenharmony_ci
44248c2ecf20Sopenharmony_ci	/* Num MSDUs dropped by WMM limit */
44258c2ecf20Sopenharmony_ci	__le32 wmm_drop;
44268c2ecf20Sopenharmony_ci
44278c2ecf20Sopenharmony_ci	/* Num Local frames queued */
44288c2ecf20Sopenharmony_ci	__le32 local_enqued;
44298c2ecf20Sopenharmony_ci
44308c2ecf20Sopenharmony_ci	/* Num Local frames done */
44318c2ecf20Sopenharmony_ci	__le32 local_freed;
44328c2ecf20Sopenharmony_ci
44338c2ecf20Sopenharmony_ci	/* Num queued to HW */
44348c2ecf20Sopenharmony_ci	__le32 hw_queued;
44358c2ecf20Sopenharmony_ci
44368c2ecf20Sopenharmony_ci	/* Num PPDU reaped from HW */
44378c2ecf20Sopenharmony_ci	__le32 hw_reaped;
44388c2ecf20Sopenharmony_ci
44398c2ecf20Sopenharmony_ci	/* Num underruns */
44408c2ecf20Sopenharmony_ci	__le32 underrun;
44418c2ecf20Sopenharmony_ci
44428c2ecf20Sopenharmony_ci	/* HW Paused. */
44438c2ecf20Sopenharmony_ci	__le32  hw_paused;
44448c2ecf20Sopenharmony_ci
44458c2ecf20Sopenharmony_ci	/* Num PPDUs cleaned up in TX abort */
44468c2ecf20Sopenharmony_ci	__le32 tx_abort;
44478c2ecf20Sopenharmony_ci
44488c2ecf20Sopenharmony_ci	/* Num MPDUs requed by SW */
44498c2ecf20Sopenharmony_ci	__le32 mpdus_requed;
44508c2ecf20Sopenharmony_ci
44518c2ecf20Sopenharmony_ci	/* excessive retries */
44528c2ecf20Sopenharmony_ci	__le32 tx_ko;
44538c2ecf20Sopenharmony_ci
44548c2ecf20Sopenharmony_ci	/* data hw rate code */
44558c2ecf20Sopenharmony_ci	__le32 data_rc;
44568c2ecf20Sopenharmony_ci
44578c2ecf20Sopenharmony_ci	/* Scheduler self triggers */
44588c2ecf20Sopenharmony_ci	__le32 self_triggers;
44598c2ecf20Sopenharmony_ci
44608c2ecf20Sopenharmony_ci	/* frames dropped due to excessive sw retries */
44618c2ecf20Sopenharmony_ci	__le32 sw_retry_failure;
44628c2ecf20Sopenharmony_ci
44638c2ecf20Sopenharmony_ci	/* illegal rate phy errors  */
44648c2ecf20Sopenharmony_ci	__le32 illgl_rate_phy_err;
44658c2ecf20Sopenharmony_ci
44668c2ecf20Sopenharmony_ci	/* wal pdev continuous xretry */
44678c2ecf20Sopenharmony_ci	__le32 pdev_cont_xretry;
44688c2ecf20Sopenharmony_ci
44698c2ecf20Sopenharmony_ci	/* wal pdev tx timeouts */
44708c2ecf20Sopenharmony_ci	__le32 pdev_tx_timeout;
44718c2ecf20Sopenharmony_ci
44728c2ecf20Sopenharmony_ci	/* wal pdev resets  */
44738c2ecf20Sopenharmony_ci	__le32 pdev_resets;
44748c2ecf20Sopenharmony_ci
44758c2ecf20Sopenharmony_ci	/* frames dropped due to non-availability of stateless TIDs */
44768c2ecf20Sopenharmony_ci	__le32 stateless_tid_alloc_failure;
44778c2ecf20Sopenharmony_ci
44788c2ecf20Sopenharmony_ci	__le32 phy_underrun;
44798c2ecf20Sopenharmony_ci
44808c2ecf20Sopenharmony_ci	/* MPDU is more than txop limit */
44818c2ecf20Sopenharmony_ci	__le32 txop_ovf;
44828c2ecf20Sopenharmony_ci
44838c2ecf20Sopenharmony_ci	/* Number of Sequences posted */
44848c2ecf20Sopenharmony_ci	__le32 seq_posted;
44858c2ecf20Sopenharmony_ci
44868c2ecf20Sopenharmony_ci	/* Number of Sequences failed queueing */
44878c2ecf20Sopenharmony_ci	__le32 seq_failed_queueing;
44888c2ecf20Sopenharmony_ci
44898c2ecf20Sopenharmony_ci	/* Number of Sequences completed */
44908c2ecf20Sopenharmony_ci	__le32 seq_completed;
44918c2ecf20Sopenharmony_ci
44928c2ecf20Sopenharmony_ci	/* Number of Sequences restarted */
44938c2ecf20Sopenharmony_ci	__le32 seq_restarted;
44948c2ecf20Sopenharmony_ci
44958c2ecf20Sopenharmony_ci	/* Number of MU Sequences posted */
44968c2ecf20Sopenharmony_ci	__le32 mu_seq_posted;
44978c2ecf20Sopenharmony_ci
44988c2ecf20Sopenharmony_ci	/* Num MPDUs flushed by SW, HWPAUSED,SW TXABORT(Reset,channel change) */
44998c2ecf20Sopenharmony_ci	__le32 mpdus_sw_flush;
45008c2ecf20Sopenharmony_ci
45018c2ecf20Sopenharmony_ci	/* Num MPDUs filtered by HW, all filter condition (TTL expired) */
45028c2ecf20Sopenharmony_ci	__le32 mpdus_hw_filter;
45038c2ecf20Sopenharmony_ci
45048c2ecf20Sopenharmony_ci	/* Num MPDUs truncated by PDG
45058c2ecf20Sopenharmony_ci	 * (TXOP, TBTT, PPDU_duration based on rate, dyn_bw)
45068c2ecf20Sopenharmony_ci	 */
45078c2ecf20Sopenharmony_ci	__le32 mpdus_truncated;
45088c2ecf20Sopenharmony_ci
45098c2ecf20Sopenharmony_ci	/* Num MPDUs that was tried but didn't receive ACK or BA */
45108c2ecf20Sopenharmony_ci	__le32 mpdus_ack_failed;
45118c2ecf20Sopenharmony_ci
45128c2ecf20Sopenharmony_ci	/* Num MPDUs that was dropped due to expiry. */
45138c2ecf20Sopenharmony_ci	__le32 mpdus_expired;
45148c2ecf20Sopenharmony_ci} __packed;
45158c2ecf20Sopenharmony_ci
45168c2ecf20Sopenharmony_cistruct wmi_pdev_stats_rx {
45178c2ecf20Sopenharmony_ci	/* Cnts any change in ring routing mid-ppdu */
45188c2ecf20Sopenharmony_ci	__le32 mid_ppdu_route_change;
45198c2ecf20Sopenharmony_ci
45208c2ecf20Sopenharmony_ci	/* Total number of statuses processed */
45218c2ecf20Sopenharmony_ci	__le32 status_rcvd;
45228c2ecf20Sopenharmony_ci
45238c2ecf20Sopenharmony_ci	/* Extra frags on rings 0-3 */
45248c2ecf20Sopenharmony_ci	__le32 r0_frags;
45258c2ecf20Sopenharmony_ci	__le32 r1_frags;
45268c2ecf20Sopenharmony_ci	__le32 r2_frags;
45278c2ecf20Sopenharmony_ci	__le32 r3_frags;
45288c2ecf20Sopenharmony_ci
45298c2ecf20Sopenharmony_ci	/* MSDUs / MPDUs delivered to HTT */
45308c2ecf20Sopenharmony_ci	__le32 htt_msdus;
45318c2ecf20Sopenharmony_ci	__le32 htt_mpdus;
45328c2ecf20Sopenharmony_ci
45338c2ecf20Sopenharmony_ci	/* MSDUs / MPDUs delivered to local stack */
45348c2ecf20Sopenharmony_ci	__le32 loc_msdus;
45358c2ecf20Sopenharmony_ci	__le32 loc_mpdus;
45368c2ecf20Sopenharmony_ci
45378c2ecf20Sopenharmony_ci	/* AMSDUs that have more MSDUs than the status ring size */
45388c2ecf20Sopenharmony_ci	__le32 oversize_amsdu;
45398c2ecf20Sopenharmony_ci
45408c2ecf20Sopenharmony_ci	/* Number of PHY errors */
45418c2ecf20Sopenharmony_ci	__le32 phy_errs;
45428c2ecf20Sopenharmony_ci
45438c2ecf20Sopenharmony_ci	/* Number of PHY errors drops */
45448c2ecf20Sopenharmony_ci	__le32 phy_err_drop;
45458c2ecf20Sopenharmony_ci
45468c2ecf20Sopenharmony_ci	/* Number of mpdu errors - FCS, MIC, ENC etc. */
45478c2ecf20Sopenharmony_ci	__le32 mpdu_errs;
45488c2ecf20Sopenharmony_ci} __packed;
45498c2ecf20Sopenharmony_ci
45508c2ecf20Sopenharmony_cistruct wmi_pdev_stats_peer {
45518c2ecf20Sopenharmony_ci	/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
45528c2ecf20Sopenharmony_ci	__le32 dummy;
45538c2ecf20Sopenharmony_ci} __packed;
45548c2ecf20Sopenharmony_ci
45558c2ecf20Sopenharmony_cienum wmi_stats_id {
45568c2ecf20Sopenharmony_ci	WMI_STAT_PEER = BIT(0),
45578c2ecf20Sopenharmony_ci	WMI_STAT_AP = BIT(1),
45588c2ecf20Sopenharmony_ci	WMI_STAT_PDEV = BIT(2),
45598c2ecf20Sopenharmony_ci	WMI_STAT_VDEV = BIT(3),
45608c2ecf20Sopenharmony_ci	WMI_STAT_BCNFLT = BIT(4),
45618c2ecf20Sopenharmony_ci	WMI_STAT_VDEV_RATE = BIT(5),
45628c2ecf20Sopenharmony_ci};
45638c2ecf20Sopenharmony_ci
45648c2ecf20Sopenharmony_cienum wmi_10_4_stats_id {
45658c2ecf20Sopenharmony_ci	WMI_10_4_STAT_PEER		= BIT(0),
45668c2ecf20Sopenharmony_ci	WMI_10_4_STAT_AP		= BIT(1),
45678c2ecf20Sopenharmony_ci	WMI_10_4_STAT_INST		= BIT(2),
45688c2ecf20Sopenharmony_ci	WMI_10_4_STAT_PEER_EXTD		= BIT(3),
45698c2ecf20Sopenharmony_ci	WMI_10_4_STAT_VDEV_EXTD		= BIT(4),
45708c2ecf20Sopenharmony_ci};
45718c2ecf20Sopenharmony_ci
45728c2ecf20Sopenharmony_cienum wmi_tlv_stats_id {
45738c2ecf20Sopenharmony_ci	WMI_TLV_STAT_PEER	= BIT(0),
45748c2ecf20Sopenharmony_ci	WMI_TLV_STAT_AP		= BIT(1),
45758c2ecf20Sopenharmony_ci	WMI_TLV_STAT_PDEV	= BIT(2),
45768c2ecf20Sopenharmony_ci	WMI_TLV_STAT_VDEV	= BIT(3),
45778c2ecf20Sopenharmony_ci	WMI_TLV_STAT_PEER_EXTD  = BIT(10),
45788c2ecf20Sopenharmony_ci};
45798c2ecf20Sopenharmony_ci
45808c2ecf20Sopenharmony_cistruct wlan_inst_rssi_args {
45818c2ecf20Sopenharmony_ci	__le16 cfg_retry_count;
45828c2ecf20Sopenharmony_ci	__le16 retry_count;
45838c2ecf20Sopenharmony_ci};
45848c2ecf20Sopenharmony_ci
45858c2ecf20Sopenharmony_cistruct wmi_request_stats_cmd {
45868c2ecf20Sopenharmony_ci	__le32 stats_id;
45878c2ecf20Sopenharmony_ci
45888c2ecf20Sopenharmony_ci	__le32 vdev_id;
45898c2ecf20Sopenharmony_ci
45908c2ecf20Sopenharmony_ci	/* peer MAC address */
45918c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
45928c2ecf20Sopenharmony_ci
45938c2ecf20Sopenharmony_ci	/* Instantaneous RSSI arguments */
45948c2ecf20Sopenharmony_ci	struct wlan_inst_rssi_args inst_rssi_args;
45958c2ecf20Sopenharmony_ci} __packed;
45968c2ecf20Sopenharmony_ci
45978c2ecf20Sopenharmony_cienum wmi_peer_stats_info_request_type {
45988c2ecf20Sopenharmony_ci	/* request stats of one specified peer */
45998c2ecf20Sopenharmony_ci	WMI_REQUEST_ONE_PEER_STATS_INFO = 0x01,
46008c2ecf20Sopenharmony_ci	/* request stats of all peers belong to specified VDEV */
46018c2ecf20Sopenharmony_ci	WMI_REQUEST_VDEV_ALL_PEER_STATS_INFO = 0x02,
46028c2ecf20Sopenharmony_ci};
46038c2ecf20Sopenharmony_ci
46048c2ecf20Sopenharmony_ci/* Suspend option */
46058c2ecf20Sopenharmony_cienum {
46068c2ecf20Sopenharmony_ci	/* suspend */
46078c2ecf20Sopenharmony_ci	WMI_PDEV_SUSPEND,
46088c2ecf20Sopenharmony_ci
46098c2ecf20Sopenharmony_ci	/* suspend and disable all interrupts */
46108c2ecf20Sopenharmony_ci	WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
46118c2ecf20Sopenharmony_ci};
46128c2ecf20Sopenharmony_ci
46138c2ecf20Sopenharmony_cistruct wmi_pdev_suspend_cmd {
46148c2ecf20Sopenharmony_ci	/* suspend option sent to target */
46158c2ecf20Sopenharmony_ci	__le32 suspend_opt;
46168c2ecf20Sopenharmony_ci} __packed;
46178c2ecf20Sopenharmony_ci
46188c2ecf20Sopenharmony_cistruct wmi_stats_event {
46198c2ecf20Sopenharmony_ci	__le32 stats_id; /* WMI_STAT_ */
46208c2ecf20Sopenharmony_ci	/*
46218c2ecf20Sopenharmony_ci	 * number of pdev stats event structures
46228c2ecf20Sopenharmony_ci	 * (wmi_pdev_stats) 0 or 1
46238c2ecf20Sopenharmony_ci	 */
46248c2ecf20Sopenharmony_ci	__le32 num_pdev_stats;
46258c2ecf20Sopenharmony_ci	/*
46268c2ecf20Sopenharmony_ci	 * number of vdev stats event structures
46278c2ecf20Sopenharmony_ci	 * (wmi_vdev_stats) 0 or max vdevs
46288c2ecf20Sopenharmony_ci	 */
46298c2ecf20Sopenharmony_ci	__le32 num_vdev_stats;
46308c2ecf20Sopenharmony_ci	/*
46318c2ecf20Sopenharmony_ci	 * number of peer stats event structures
46328c2ecf20Sopenharmony_ci	 * (wmi_peer_stats) 0 or max peers
46338c2ecf20Sopenharmony_ci	 */
46348c2ecf20Sopenharmony_ci	__le32 num_peer_stats;
46358c2ecf20Sopenharmony_ci	__le32 num_bcnflt_stats;
46368c2ecf20Sopenharmony_ci	/*
46378c2ecf20Sopenharmony_ci	 * followed by
46388c2ecf20Sopenharmony_ci	 *   num_pdev_stats * size of(struct wmi_pdev_stats)
46398c2ecf20Sopenharmony_ci	 *   num_vdev_stats * size of(struct wmi_vdev_stats)
46408c2ecf20Sopenharmony_ci	 *   num_peer_stats * size of(struct wmi_peer_stats)
46418c2ecf20Sopenharmony_ci	 *
46428c2ecf20Sopenharmony_ci	 *  By having a zero sized array, the pointer to data area
46438c2ecf20Sopenharmony_ci	 *  becomes available without increasing the struct size
46448c2ecf20Sopenharmony_ci	 */
46458c2ecf20Sopenharmony_ci	u8 data[];
46468c2ecf20Sopenharmony_ci} __packed;
46478c2ecf20Sopenharmony_ci
46488c2ecf20Sopenharmony_cistruct wmi_10_2_stats_event {
46498c2ecf20Sopenharmony_ci	__le32 stats_id; /* %WMI_REQUEST_ */
46508c2ecf20Sopenharmony_ci	__le32 num_pdev_stats;
46518c2ecf20Sopenharmony_ci	__le32 num_pdev_ext_stats;
46528c2ecf20Sopenharmony_ci	__le32 num_vdev_stats;
46538c2ecf20Sopenharmony_ci	__le32 num_peer_stats;
46548c2ecf20Sopenharmony_ci	__le32 num_bcnflt_stats;
46558c2ecf20Sopenharmony_ci	u8 data[];
46568c2ecf20Sopenharmony_ci} __packed;
46578c2ecf20Sopenharmony_ci
46588c2ecf20Sopenharmony_ci/*
46598c2ecf20Sopenharmony_ci * PDEV statistics
46608c2ecf20Sopenharmony_ci * TODO: add all PDEV stats here
46618c2ecf20Sopenharmony_ci */
46628c2ecf20Sopenharmony_cistruct wmi_pdev_stats_base {
46638c2ecf20Sopenharmony_ci	__le32 chan_nf;
46648c2ecf20Sopenharmony_ci	__le32 tx_frame_count; /* Cycles spent transmitting frames */
46658c2ecf20Sopenharmony_ci	__le32 rx_frame_count; /* Cycles spent receiving frames */
46668c2ecf20Sopenharmony_ci	__le32 rx_clear_count; /* Total channel busy time, evidently */
46678c2ecf20Sopenharmony_ci	__le32 cycle_count; /* Total on-channel time */
46688c2ecf20Sopenharmony_ci	__le32 phy_err_count;
46698c2ecf20Sopenharmony_ci	__le32 chan_tx_pwr;
46708c2ecf20Sopenharmony_ci} __packed;
46718c2ecf20Sopenharmony_ci
46728c2ecf20Sopenharmony_cistruct wmi_pdev_stats {
46738c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_base base;
46748c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_tx tx;
46758c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_rx rx;
46768c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_peer peer;
46778c2ecf20Sopenharmony_ci} __packed;
46788c2ecf20Sopenharmony_ci
46798c2ecf20Sopenharmony_cistruct wmi_pdev_stats_extra {
46808c2ecf20Sopenharmony_ci	__le32 ack_rx_bad;
46818c2ecf20Sopenharmony_ci	__le32 rts_bad;
46828c2ecf20Sopenharmony_ci	__le32 rts_good;
46838c2ecf20Sopenharmony_ci	__le32 fcs_bad;
46848c2ecf20Sopenharmony_ci	__le32 no_beacons;
46858c2ecf20Sopenharmony_ci	__le32 mib_int_count;
46868c2ecf20Sopenharmony_ci} __packed;
46878c2ecf20Sopenharmony_ci
46888c2ecf20Sopenharmony_cistruct wmi_10x_pdev_stats {
46898c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_base base;
46908c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_tx tx;
46918c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_rx rx;
46928c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_peer peer;
46938c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_extra extra;
46948c2ecf20Sopenharmony_ci} __packed;
46958c2ecf20Sopenharmony_ci
46968c2ecf20Sopenharmony_cistruct wmi_pdev_stats_mem {
46978c2ecf20Sopenharmony_ci	__le32 dram_free;
46988c2ecf20Sopenharmony_ci	__le32 iram_free;
46998c2ecf20Sopenharmony_ci} __packed;
47008c2ecf20Sopenharmony_ci
47018c2ecf20Sopenharmony_cistruct wmi_10_2_pdev_stats {
47028c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_base base;
47038c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_tx tx;
47048c2ecf20Sopenharmony_ci	__le32 mc_drop;
47058c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_rx rx;
47068c2ecf20Sopenharmony_ci	__le32 pdev_rx_timeout;
47078c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_mem mem;
47088c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_peer peer;
47098c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_extra extra;
47108c2ecf20Sopenharmony_ci} __packed;
47118c2ecf20Sopenharmony_ci
47128c2ecf20Sopenharmony_cistruct wmi_10_4_pdev_stats {
47138c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_base base;
47148c2ecf20Sopenharmony_ci	struct wmi_10_4_pdev_stats_tx tx;
47158c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_rx rx;
47168c2ecf20Sopenharmony_ci	__le32 rx_ovfl_errs;
47178c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_mem mem;
47188c2ecf20Sopenharmony_ci	__le32 sram_free_size;
47198c2ecf20Sopenharmony_ci	struct wmi_pdev_stats_extra extra;
47208c2ecf20Sopenharmony_ci} __packed;
47218c2ecf20Sopenharmony_ci
47228c2ecf20Sopenharmony_ci/*
47238c2ecf20Sopenharmony_ci * VDEV statistics
47248c2ecf20Sopenharmony_ci */
47258c2ecf20Sopenharmony_ci
47268c2ecf20Sopenharmony_ci#define WMI_VDEV_STATS_FTM_COUNT_VALID	BIT(31)
47278c2ecf20Sopenharmony_ci#define WMI_VDEV_STATS_FTM_COUNT_LSB	0
47288c2ecf20Sopenharmony_ci#define WMI_VDEV_STATS_FTM_COUNT_MASK	0x7fffffff
47298c2ecf20Sopenharmony_ci
47308c2ecf20Sopenharmony_cistruct wmi_vdev_stats {
47318c2ecf20Sopenharmony_ci	__le32 vdev_id;
47328c2ecf20Sopenharmony_ci} __packed;
47338c2ecf20Sopenharmony_ci
47348c2ecf20Sopenharmony_cistruct wmi_vdev_stats_extd {
47358c2ecf20Sopenharmony_ci	__le32 vdev_id;
47368c2ecf20Sopenharmony_ci	__le32 ppdu_aggr_cnt;
47378c2ecf20Sopenharmony_ci	__le32 ppdu_noack;
47388c2ecf20Sopenharmony_ci	__le32 mpdu_queued;
47398c2ecf20Sopenharmony_ci	__le32 ppdu_nonaggr_cnt;
47408c2ecf20Sopenharmony_ci	__le32 mpdu_sw_requeued;
47418c2ecf20Sopenharmony_ci	__le32 mpdu_suc_retry;
47428c2ecf20Sopenharmony_ci	__le32 mpdu_suc_multitry;
47438c2ecf20Sopenharmony_ci	__le32 mpdu_fail_retry;
47448c2ecf20Sopenharmony_ci	__le32 tx_ftm_suc;
47458c2ecf20Sopenharmony_ci	__le32 tx_ftm_suc_retry;
47468c2ecf20Sopenharmony_ci	__le32 tx_ftm_fail;
47478c2ecf20Sopenharmony_ci	__le32 rx_ftmr_cnt;
47488c2ecf20Sopenharmony_ci	__le32 rx_ftmr_dup_cnt;
47498c2ecf20Sopenharmony_ci	__le32 rx_iftmr_cnt;
47508c2ecf20Sopenharmony_ci	__le32 rx_iftmr_dup_cnt;
47518c2ecf20Sopenharmony_ci	__le32 reserved[6];
47528c2ecf20Sopenharmony_ci} __packed;
47538c2ecf20Sopenharmony_ci
47548c2ecf20Sopenharmony_ci/*
47558c2ecf20Sopenharmony_ci * peer statistics.
47568c2ecf20Sopenharmony_ci * TODO: add more stats
47578c2ecf20Sopenharmony_ci */
47588c2ecf20Sopenharmony_cistruct wmi_peer_stats {
47598c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
47608c2ecf20Sopenharmony_ci	__le32 peer_rssi;
47618c2ecf20Sopenharmony_ci	__le32 peer_tx_rate;
47628c2ecf20Sopenharmony_ci} __packed;
47638c2ecf20Sopenharmony_ci
47648c2ecf20Sopenharmony_cistruct wmi_10x_peer_stats {
47658c2ecf20Sopenharmony_ci	struct wmi_peer_stats old;
47668c2ecf20Sopenharmony_ci	__le32 peer_rx_rate;
47678c2ecf20Sopenharmony_ci} __packed;
47688c2ecf20Sopenharmony_ci
47698c2ecf20Sopenharmony_cistruct wmi_10_2_peer_stats {
47708c2ecf20Sopenharmony_ci	struct wmi_peer_stats old;
47718c2ecf20Sopenharmony_ci	__le32 peer_rx_rate;
47728c2ecf20Sopenharmony_ci	__le32 current_per;
47738c2ecf20Sopenharmony_ci	__le32 retries;
47748c2ecf20Sopenharmony_ci	__le32 tx_rate_count;
47758c2ecf20Sopenharmony_ci	__le32 max_4ms_frame_len;
47768c2ecf20Sopenharmony_ci	__le32 total_sub_frames;
47778c2ecf20Sopenharmony_ci	__le32 tx_bytes;
47788c2ecf20Sopenharmony_ci	__le32 num_pkt_loss_overflow[4];
47798c2ecf20Sopenharmony_ci	__le32 num_pkt_loss_excess_retry[4];
47808c2ecf20Sopenharmony_ci} __packed;
47818c2ecf20Sopenharmony_ci
47828c2ecf20Sopenharmony_cistruct wmi_10_2_4_peer_stats {
47838c2ecf20Sopenharmony_ci	struct wmi_10_2_peer_stats common;
47848c2ecf20Sopenharmony_ci	__le32 peer_rssi_changed;
47858c2ecf20Sopenharmony_ci} __packed;
47868c2ecf20Sopenharmony_ci
47878c2ecf20Sopenharmony_cistruct wmi_10_2_4_ext_peer_stats {
47888c2ecf20Sopenharmony_ci	struct wmi_10_2_peer_stats common;
47898c2ecf20Sopenharmony_ci	__le32 peer_rssi_changed;
47908c2ecf20Sopenharmony_ci	__le32 rx_duration;
47918c2ecf20Sopenharmony_ci} __packed;
47928c2ecf20Sopenharmony_ci
47938c2ecf20Sopenharmony_cistruct wmi_10_4_peer_stats {
47948c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
47958c2ecf20Sopenharmony_ci	__le32 peer_rssi;
47968c2ecf20Sopenharmony_ci	__le32 peer_rssi_seq_num;
47978c2ecf20Sopenharmony_ci	__le32 peer_tx_rate;
47988c2ecf20Sopenharmony_ci	__le32 peer_rx_rate;
47998c2ecf20Sopenharmony_ci	__le32 current_per;
48008c2ecf20Sopenharmony_ci	__le32 retries;
48018c2ecf20Sopenharmony_ci	__le32 tx_rate_count;
48028c2ecf20Sopenharmony_ci	__le32 max_4ms_frame_len;
48038c2ecf20Sopenharmony_ci	__le32 total_sub_frames;
48048c2ecf20Sopenharmony_ci	__le32 tx_bytes;
48058c2ecf20Sopenharmony_ci	__le32 num_pkt_loss_overflow[4];
48068c2ecf20Sopenharmony_ci	__le32 num_pkt_loss_excess_retry[4];
48078c2ecf20Sopenharmony_ci	__le32 peer_rssi_changed;
48088c2ecf20Sopenharmony_ci} __packed;
48098c2ecf20Sopenharmony_ci
48108c2ecf20Sopenharmony_cistruct wmi_10_4_peer_extd_stats {
48118c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
48128c2ecf20Sopenharmony_ci	__le32 inactive_time;
48138c2ecf20Sopenharmony_ci	__le32 peer_chain_rssi;
48148c2ecf20Sopenharmony_ci	__le32 rx_duration;
48158c2ecf20Sopenharmony_ci	__le32 reserved[10];
48168c2ecf20Sopenharmony_ci} __packed;
48178c2ecf20Sopenharmony_ci
48188c2ecf20Sopenharmony_cistruct wmi_10_4_bss_bcn_stats {
48198c2ecf20Sopenharmony_ci	__le32 vdev_id;
48208c2ecf20Sopenharmony_ci	__le32 bss_bcns_dropped;
48218c2ecf20Sopenharmony_ci	__le32 bss_bcn_delivered;
48228c2ecf20Sopenharmony_ci} __packed;
48238c2ecf20Sopenharmony_ci
48248c2ecf20Sopenharmony_cistruct wmi_10_4_bss_bcn_filter_stats {
48258c2ecf20Sopenharmony_ci	__le32 bcns_dropped;
48268c2ecf20Sopenharmony_ci	__le32 bcns_delivered;
48278c2ecf20Sopenharmony_ci	__le32 active_filters;
48288c2ecf20Sopenharmony_ci	struct wmi_10_4_bss_bcn_stats bss_stats;
48298c2ecf20Sopenharmony_ci} __packed;
48308c2ecf20Sopenharmony_ci
48318c2ecf20Sopenharmony_cistruct wmi_10_2_pdev_ext_stats {
48328c2ecf20Sopenharmony_ci	__le32 rx_rssi_comb;
48338c2ecf20Sopenharmony_ci	__le32 rx_rssi[4];
48348c2ecf20Sopenharmony_ci	__le32 rx_mcs[10];
48358c2ecf20Sopenharmony_ci	__le32 tx_mcs[10];
48368c2ecf20Sopenharmony_ci	__le32 ack_rssi;
48378c2ecf20Sopenharmony_ci} __packed;
48388c2ecf20Sopenharmony_ci
48398c2ecf20Sopenharmony_cistruct wmi_vdev_create_cmd {
48408c2ecf20Sopenharmony_ci	__le32 vdev_id;
48418c2ecf20Sopenharmony_ci	__le32 vdev_type;
48428c2ecf20Sopenharmony_ci	__le32 vdev_subtype;
48438c2ecf20Sopenharmony_ci	struct wmi_mac_addr vdev_macaddr;
48448c2ecf20Sopenharmony_ci} __packed;
48458c2ecf20Sopenharmony_ci
48468c2ecf20Sopenharmony_cienum wmi_vdev_type {
48478c2ecf20Sopenharmony_ci	WMI_VDEV_TYPE_AP      = 1,
48488c2ecf20Sopenharmony_ci	WMI_VDEV_TYPE_STA     = 2,
48498c2ecf20Sopenharmony_ci	WMI_VDEV_TYPE_IBSS    = 3,
48508c2ecf20Sopenharmony_ci	WMI_VDEV_TYPE_MONITOR = 4,
48518c2ecf20Sopenharmony_ci};
48528c2ecf20Sopenharmony_ci
48538c2ecf20Sopenharmony_cienum wmi_vdev_subtype {
48548c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_NONE,
48558c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_P2P_DEVICE,
48568c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_P2P_CLIENT,
48578c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_P2P_GO,
48588c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_PROXY_STA,
48598c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_MESH_11S,
48608c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_MESH_NON_11S,
48618c2ecf20Sopenharmony_ci};
48628c2ecf20Sopenharmony_ci
48638c2ecf20Sopenharmony_cienum wmi_vdev_subtype_legacy {
48648c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_LEGACY_NONE      = 0,
48658c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_LEGACY_P2P_DEV   = 1,
48668c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_LEGACY_P2P_CLI   = 2,
48678c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_LEGACY_P2P_GO    = 3,
48688c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_LEGACY_PROXY_STA = 4,
48698c2ecf20Sopenharmony_ci};
48708c2ecf20Sopenharmony_ci
48718c2ecf20Sopenharmony_cienum wmi_vdev_subtype_10_2_4 {
48728c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_NONE      = 0,
48738c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_P2P_DEV   = 1,
48748c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_P2P_CLI   = 2,
48758c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_P2P_GO    = 3,
48768c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_PROXY_STA = 4,
48778c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_2_4_MESH_11S  = 5,
48788c2ecf20Sopenharmony_ci};
48798c2ecf20Sopenharmony_ci
48808c2ecf20Sopenharmony_cienum wmi_vdev_subtype_10_4 {
48818c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_NONE         = 0,
48828c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_P2P_DEV      = 1,
48838c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_P2P_CLI      = 2,
48848c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_P2P_GO       = 3,
48858c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_PROXY_STA    = 4,
48868c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_MESH_NON_11S = 5,
48878c2ecf20Sopenharmony_ci	WMI_VDEV_SUBTYPE_10_4_MESH_11S     = 6,
48888c2ecf20Sopenharmony_ci};
48898c2ecf20Sopenharmony_ci
48908c2ecf20Sopenharmony_ci/* values for vdev_subtype */
48918c2ecf20Sopenharmony_ci
48928c2ecf20Sopenharmony_ci/* values for vdev_start_request flags */
48938c2ecf20Sopenharmony_ci/*
48948c2ecf20Sopenharmony_ci * Indicates that AP VDEV uses hidden ssid. only valid for
48958c2ecf20Sopenharmony_ci *  AP/GO
48968c2ecf20Sopenharmony_ci */
48978c2ecf20Sopenharmony_ci#define WMI_VDEV_START_HIDDEN_SSID  (1 << 0)
48988c2ecf20Sopenharmony_ci/*
48998c2ecf20Sopenharmony_ci * Indicates if robust management frame/management frame
49008c2ecf20Sopenharmony_ci *  protection is enabled. For GO/AP vdevs, it indicates that
49018c2ecf20Sopenharmony_ci *  it may support station/client associations with RMF enabled.
49028c2ecf20Sopenharmony_ci *  For STA/client vdevs, it indicates that sta will
49038c2ecf20Sopenharmony_ci *  associate with AP with RMF enabled.
49048c2ecf20Sopenharmony_ci */
49058c2ecf20Sopenharmony_ci#define WMI_VDEV_START_PMF_ENABLED  (1 << 1)
49068c2ecf20Sopenharmony_ci
49078c2ecf20Sopenharmony_cistruct wmi_p2p_noa_descriptor {
49088c2ecf20Sopenharmony_ci	__le32 type_count; /* 255: continuous schedule, 0: reserved */
49098c2ecf20Sopenharmony_ci	__le32 duration;  /* Absent period duration in micro seconds */
49108c2ecf20Sopenharmony_ci	__le32 interval;   /* Absent period interval in micro seconds */
49118c2ecf20Sopenharmony_ci	__le32 start_time; /* 32 bit tsf time when in starts */
49128c2ecf20Sopenharmony_ci} __packed;
49138c2ecf20Sopenharmony_ci
49148c2ecf20Sopenharmony_cistruct wmi_vdev_start_request_cmd {
49158c2ecf20Sopenharmony_ci	/* WMI channel */
49168c2ecf20Sopenharmony_ci	struct wmi_channel chan;
49178c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
49188c2ecf20Sopenharmony_ci	__le32 vdev_id;
49198c2ecf20Sopenharmony_ci	/* requestor id identifying the caller module */
49208c2ecf20Sopenharmony_ci	__le32 requestor_id;
49218c2ecf20Sopenharmony_ci	/* beacon interval from received beacon */
49228c2ecf20Sopenharmony_ci	__le32 beacon_interval;
49238c2ecf20Sopenharmony_ci	/* DTIM Period from the received beacon */
49248c2ecf20Sopenharmony_ci	__le32 dtim_period;
49258c2ecf20Sopenharmony_ci	/* Flags */
49268c2ecf20Sopenharmony_ci	__le32 flags;
49278c2ecf20Sopenharmony_ci	/* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
49288c2ecf20Sopenharmony_ci	struct wmi_ssid ssid;
49298c2ecf20Sopenharmony_ci	/* beacon/probe response xmit rate. Applicable for SoftAP. */
49308c2ecf20Sopenharmony_ci	__le32 bcn_tx_rate;
49318c2ecf20Sopenharmony_ci	/* beacon/probe response xmit power. Applicable for SoftAP. */
49328c2ecf20Sopenharmony_ci	__le32 bcn_tx_power;
49338c2ecf20Sopenharmony_ci	/* number of p2p NOA descriptor(s) from scan entry */
49348c2ecf20Sopenharmony_ci	__le32 num_noa_descriptors;
49358c2ecf20Sopenharmony_ci	/*
49368c2ecf20Sopenharmony_ci	 * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
49378c2ecf20Sopenharmony_ci	 * During CAC, Our HW shouldn't ack ditected frames
49388c2ecf20Sopenharmony_ci	 */
49398c2ecf20Sopenharmony_ci	__le32 disable_hw_ack;
49408c2ecf20Sopenharmony_ci	/* actual p2p NOA descriptor from scan entry */
49418c2ecf20Sopenharmony_ci	struct wmi_p2p_noa_descriptor noa_descriptors[2];
49428c2ecf20Sopenharmony_ci} __packed;
49438c2ecf20Sopenharmony_ci
49448c2ecf20Sopenharmony_cistruct wmi_vdev_restart_request_cmd {
49458c2ecf20Sopenharmony_ci	struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
49468c2ecf20Sopenharmony_ci} __packed;
49478c2ecf20Sopenharmony_ci
49488c2ecf20Sopenharmony_cistruct wmi_vdev_start_request_arg {
49498c2ecf20Sopenharmony_ci	u32 vdev_id;
49508c2ecf20Sopenharmony_ci	struct wmi_channel_arg channel;
49518c2ecf20Sopenharmony_ci	u32 bcn_intval;
49528c2ecf20Sopenharmony_ci	u32 dtim_period;
49538c2ecf20Sopenharmony_ci	u8 *ssid;
49548c2ecf20Sopenharmony_ci	u32 ssid_len;
49558c2ecf20Sopenharmony_ci	u32 bcn_tx_rate;
49568c2ecf20Sopenharmony_ci	u32 bcn_tx_power;
49578c2ecf20Sopenharmony_ci	bool disable_hw_ack;
49588c2ecf20Sopenharmony_ci	bool hidden_ssid;
49598c2ecf20Sopenharmony_ci	bool pmf_enabled;
49608c2ecf20Sopenharmony_ci};
49618c2ecf20Sopenharmony_ci
49628c2ecf20Sopenharmony_cistruct wmi_vdev_delete_cmd {
49638c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
49648c2ecf20Sopenharmony_ci	__le32 vdev_id;
49658c2ecf20Sopenharmony_ci} __packed;
49668c2ecf20Sopenharmony_ci
49678c2ecf20Sopenharmony_cistruct wmi_vdev_up_cmd {
49688c2ecf20Sopenharmony_ci	__le32 vdev_id;
49698c2ecf20Sopenharmony_ci	__le32 vdev_assoc_id;
49708c2ecf20Sopenharmony_ci	struct wmi_mac_addr vdev_bssid;
49718c2ecf20Sopenharmony_ci} __packed;
49728c2ecf20Sopenharmony_ci
49738c2ecf20Sopenharmony_cistruct wmi_vdev_stop_cmd {
49748c2ecf20Sopenharmony_ci	__le32 vdev_id;
49758c2ecf20Sopenharmony_ci} __packed;
49768c2ecf20Sopenharmony_ci
49778c2ecf20Sopenharmony_cistruct wmi_vdev_down_cmd {
49788c2ecf20Sopenharmony_ci	__le32 vdev_id;
49798c2ecf20Sopenharmony_ci} __packed;
49808c2ecf20Sopenharmony_ci
49818c2ecf20Sopenharmony_cistruct wmi_vdev_standby_response_cmd {
49828c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
49838c2ecf20Sopenharmony_ci	__le32 vdev_id;
49848c2ecf20Sopenharmony_ci} __packed;
49858c2ecf20Sopenharmony_ci
49868c2ecf20Sopenharmony_cistruct wmi_vdev_resume_response_cmd {
49878c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
49888c2ecf20Sopenharmony_ci	__le32 vdev_id;
49898c2ecf20Sopenharmony_ci} __packed;
49908c2ecf20Sopenharmony_ci
49918c2ecf20Sopenharmony_cistruct wmi_vdev_set_param_cmd {
49928c2ecf20Sopenharmony_ci	__le32 vdev_id;
49938c2ecf20Sopenharmony_ci	__le32 param_id;
49948c2ecf20Sopenharmony_ci	__le32 param_value;
49958c2ecf20Sopenharmony_ci} __packed;
49968c2ecf20Sopenharmony_ci
49978c2ecf20Sopenharmony_ci#define WMI_MAX_KEY_INDEX   3
49988c2ecf20Sopenharmony_ci#define WMI_MAX_KEY_LEN     32
49998c2ecf20Sopenharmony_ci
50008c2ecf20Sopenharmony_ci#define WMI_KEY_PAIRWISE 0x00
50018c2ecf20Sopenharmony_ci#define WMI_KEY_GROUP    0x01
50028c2ecf20Sopenharmony_ci#define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
50038c2ecf20Sopenharmony_ci
50048c2ecf20Sopenharmony_cistruct wmi_key_seq_counter {
50058c2ecf20Sopenharmony_ci	__le32 key_seq_counter_l;
50068c2ecf20Sopenharmony_ci	__le32 key_seq_counter_h;
50078c2ecf20Sopenharmony_ci} __packed;
50088c2ecf20Sopenharmony_ci
50098c2ecf20Sopenharmony_cienum wmi_cipher_suites {
50108c2ecf20Sopenharmony_ci	WMI_CIPHER_NONE,
50118c2ecf20Sopenharmony_ci	WMI_CIPHER_WEP,
50128c2ecf20Sopenharmony_ci	WMI_CIPHER_TKIP,
50138c2ecf20Sopenharmony_ci	WMI_CIPHER_AES_OCB,
50148c2ecf20Sopenharmony_ci	WMI_CIPHER_AES_CCM,
50158c2ecf20Sopenharmony_ci	WMI_CIPHER_WAPI,
50168c2ecf20Sopenharmony_ci	WMI_CIPHER_CKIP,
50178c2ecf20Sopenharmony_ci	WMI_CIPHER_AES_CMAC,
50188c2ecf20Sopenharmony_ci	WMI_CIPHER_AES_GCM,
50198c2ecf20Sopenharmony_ci};
50208c2ecf20Sopenharmony_ci
50218c2ecf20Sopenharmony_cienum wmi_tlv_cipher_suites {
50228c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_NONE,
50238c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_WEP,
50248c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_TKIP,
50258c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_AES_OCB,
50268c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_AES_CCM,
50278c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_WAPI,
50288c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_CKIP,
50298c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_AES_CMAC,
50308c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_ANY,
50318c2ecf20Sopenharmony_ci	WMI_TLV_CIPHER_AES_GCM,
50328c2ecf20Sopenharmony_ci};
50338c2ecf20Sopenharmony_ci
50348c2ecf20Sopenharmony_cistruct wmi_vdev_install_key_cmd {
50358c2ecf20Sopenharmony_ci	__le32 vdev_id;
50368c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
50378c2ecf20Sopenharmony_ci	__le32 key_idx;
50388c2ecf20Sopenharmony_ci	__le32 key_flags;
50398c2ecf20Sopenharmony_ci	__le32 key_cipher; /* %WMI_CIPHER_ */
50408c2ecf20Sopenharmony_ci	struct wmi_key_seq_counter key_rsc_counter;
50418c2ecf20Sopenharmony_ci	struct wmi_key_seq_counter key_global_rsc_counter;
50428c2ecf20Sopenharmony_ci	struct wmi_key_seq_counter key_tsc_counter;
50438c2ecf20Sopenharmony_ci	u8 wpi_key_rsc_counter[16];
50448c2ecf20Sopenharmony_ci	u8 wpi_key_tsc_counter[16];
50458c2ecf20Sopenharmony_ci	__le32 key_len;
50468c2ecf20Sopenharmony_ci	__le32 key_txmic_len;
50478c2ecf20Sopenharmony_ci	__le32 key_rxmic_len;
50488c2ecf20Sopenharmony_ci
50498c2ecf20Sopenharmony_ci	/* contains key followed by tx mic followed by rx mic */
50508c2ecf20Sopenharmony_ci	u8 key_data[];
50518c2ecf20Sopenharmony_ci} __packed;
50528c2ecf20Sopenharmony_ci
50538c2ecf20Sopenharmony_cistruct wmi_vdev_install_key_arg {
50548c2ecf20Sopenharmony_ci	u32 vdev_id;
50558c2ecf20Sopenharmony_ci	const u8 *macaddr;
50568c2ecf20Sopenharmony_ci	u32 key_idx;
50578c2ecf20Sopenharmony_ci	u32 key_flags;
50588c2ecf20Sopenharmony_ci	u32 key_cipher;
50598c2ecf20Sopenharmony_ci	u32 key_len;
50608c2ecf20Sopenharmony_ci	u32 key_txmic_len;
50618c2ecf20Sopenharmony_ci	u32 key_rxmic_len;
50628c2ecf20Sopenharmony_ci	const void *key_data;
50638c2ecf20Sopenharmony_ci};
50648c2ecf20Sopenharmony_ci
50658c2ecf20Sopenharmony_ci/*
50668c2ecf20Sopenharmony_ci * vdev fixed rate format:
50678c2ecf20Sopenharmony_ci * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
50688c2ecf20Sopenharmony_ci * - nss      - b5:b4 - ss number (0 mean 1ss)
50698c2ecf20Sopenharmony_ci * - rate_mcs - b3:b0 - as below
50708c2ecf20Sopenharmony_ci *    CCK:  0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
50718c2ecf20Sopenharmony_ci *          4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
50728c2ecf20Sopenharmony_ci *    OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
50738c2ecf20Sopenharmony_ci *          4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
50748c2ecf20Sopenharmony_ci *    HT/VHT: MCS index
50758c2ecf20Sopenharmony_ci */
50768c2ecf20Sopenharmony_ci
50778c2ecf20Sopenharmony_ci/* Preamble types to be used with VDEV fixed rate configuration */
50788c2ecf20Sopenharmony_cienum wmi_rate_preamble {
50798c2ecf20Sopenharmony_ci	WMI_RATE_PREAMBLE_OFDM,
50808c2ecf20Sopenharmony_ci	WMI_RATE_PREAMBLE_CCK,
50818c2ecf20Sopenharmony_ci	WMI_RATE_PREAMBLE_HT,
50828c2ecf20Sopenharmony_ci	WMI_RATE_PREAMBLE_VHT,
50838c2ecf20Sopenharmony_ci};
50848c2ecf20Sopenharmony_ci
50858c2ecf20Sopenharmony_ci#define ATH10K_HW_NSS(rate)		(1 + (((rate) >> 4) & 0x3))
50868c2ecf20Sopenharmony_ci#define ATH10K_HW_PREAMBLE(rate)	(((rate) >> 6) & 0x3)
50878c2ecf20Sopenharmony_ci#define ATH10K_HW_MCS_RATE(rate)	((rate) & 0xf)
50888c2ecf20Sopenharmony_ci#define ATH10K_HW_LEGACY_RATE(rate)	((rate) & 0x3f)
50898c2ecf20Sopenharmony_ci#define ATH10K_HW_BW(flags)		(((flags) >> 3) & 0x3)
50908c2ecf20Sopenharmony_ci#define ATH10K_HW_GI(flags)		(((flags) >> 5) & 0x1)
50918c2ecf20Sopenharmony_ci#define ATH10K_HW_RATECODE(rate, nss, preamble) \
50928c2ecf20Sopenharmony_ci	(((preamble) << 6) | ((nss) << 4) | (rate))
50938c2ecf20Sopenharmony_ci#define ATH10K_HW_AMPDU(flags)		((flags) & 0x1)
50948c2ecf20Sopenharmony_ci#define ATH10K_HW_BA_FAIL(flags)	(((flags) >> 1) & 0x3)
50958c2ecf20Sopenharmony_ci#define ATH10K_FW_SKIPPED_RATE_CTRL(flags)	(((flags) >> 6) & 0x1)
50968c2ecf20Sopenharmony_ci
50978c2ecf20Sopenharmony_ci#define ATH10K_VHT_MCS_NUM	10
50988c2ecf20Sopenharmony_ci#define ATH10K_BW_NUM		6
50998c2ecf20Sopenharmony_ci#define ATH10K_NSS_NUM		4
51008c2ecf20Sopenharmony_ci#define ATH10K_LEGACY_NUM	12
51018c2ecf20Sopenharmony_ci#define ATH10K_GI_NUM		2
51028c2ecf20Sopenharmony_ci#define ATH10K_HT_MCS_NUM	32
51038c2ecf20Sopenharmony_ci#define ATH10K_RATE_TABLE_NUM	320
51048c2ecf20Sopenharmony_ci#define ATH10K_RATE_INFO_FLAGS_SGI_BIT	2
51058c2ecf20Sopenharmony_ci
51068c2ecf20Sopenharmony_ci/* Value to disable fixed rate setting */
51078c2ecf20Sopenharmony_ci#define WMI_FIXED_RATE_NONE    (0xff)
51088c2ecf20Sopenharmony_ci
51098c2ecf20Sopenharmony_cistruct wmi_peer_param_map {
51108c2ecf20Sopenharmony_ci	u32 smps_state;
51118c2ecf20Sopenharmony_ci	u32 ampdu;
51128c2ecf20Sopenharmony_ci	u32 authorize;
51138c2ecf20Sopenharmony_ci	u32 chan_width;
51148c2ecf20Sopenharmony_ci	u32 nss;
51158c2ecf20Sopenharmony_ci	u32 use_4addr;
51168c2ecf20Sopenharmony_ci	u32 membership;
51178c2ecf20Sopenharmony_ci	u32 use_fixed_power;
51188c2ecf20Sopenharmony_ci	u32 user_pos;
51198c2ecf20Sopenharmony_ci	u32 crit_proto_hint_enabled;
51208c2ecf20Sopenharmony_ci	u32 tx_fail_cnt_thr;
51218c2ecf20Sopenharmony_ci	u32 set_hw_retry_cts2s;
51228c2ecf20Sopenharmony_ci	u32 ibss_atim_win_len;
51238c2ecf20Sopenharmony_ci	u32 debug;
51248c2ecf20Sopenharmony_ci	u32 phymode;
51258c2ecf20Sopenharmony_ci	u32 dummy_var;
51268c2ecf20Sopenharmony_ci};
51278c2ecf20Sopenharmony_ci
51288c2ecf20Sopenharmony_cistruct wmi_vdev_param_map {
51298c2ecf20Sopenharmony_ci	u32 rts_threshold;
51308c2ecf20Sopenharmony_ci	u32 fragmentation_threshold;
51318c2ecf20Sopenharmony_ci	u32 beacon_interval;
51328c2ecf20Sopenharmony_ci	u32 listen_interval;
51338c2ecf20Sopenharmony_ci	u32 multicast_rate;
51348c2ecf20Sopenharmony_ci	u32 mgmt_tx_rate;
51358c2ecf20Sopenharmony_ci	u32 slot_time;
51368c2ecf20Sopenharmony_ci	u32 preamble;
51378c2ecf20Sopenharmony_ci	u32 swba_time;
51388c2ecf20Sopenharmony_ci	u32 wmi_vdev_stats_update_period;
51398c2ecf20Sopenharmony_ci	u32 wmi_vdev_pwrsave_ageout_time;
51408c2ecf20Sopenharmony_ci	u32 wmi_vdev_host_swba_interval;
51418c2ecf20Sopenharmony_ci	u32 dtim_period;
51428c2ecf20Sopenharmony_ci	u32 wmi_vdev_oc_scheduler_air_time_limit;
51438c2ecf20Sopenharmony_ci	u32 wds;
51448c2ecf20Sopenharmony_ci	u32 atim_window;
51458c2ecf20Sopenharmony_ci	u32 bmiss_count_max;
51468c2ecf20Sopenharmony_ci	u32 bmiss_first_bcnt;
51478c2ecf20Sopenharmony_ci	u32 bmiss_final_bcnt;
51488c2ecf20Sopenharmony_ci	u32 feature_wmm;
51498c2ecf20Sopenharmony_ci	u32 chwidth;
51508c2ecf20Sopenharmony_ci	u32 chextoffset;
51518c2ecf20Sopenharmony_ci	u32 disable_htprotection;
51528c2ecf20Sopenharmony_ci	u32 sta_quickkickout;
51538c2ecf20Sopenharmony_ci	u32 mgmt_rate;
51548c2ecf20Sopenharmony_ci	u32 protection_mode;
51558c2ecf20Sopenharmony_ci	u32 fixed_rate;
51568c2ecf20Sopenharmony_ci	u32 sgi;
51578c2ecf20Sopenharmony_ci	u32 ldpc;
51588c2ecf20Sopenharmony_ci	u32 tx_stbc;
51598c2ecf20Sopenharmony_ci	u32 rx_stbc;
51608c2ecf20Sopenharmony_ci	u32 intra_bss_fwd;
51618c2ecf20Sopenharmony_ci	u32 def_keyid;
51628c2ecf20Sopenharmony_ci	u32 nss;
51638c2ecf20Sopenharmony_ci	u32 bcast_data_rate;
51648c2ecf20Sopenharmony_ci	u32 mcast_data_rate;
51658c2ecf20Sopenharmony_ci	u32 mcast_indicate;
51668c2ecf20Sopenharmony_ci	u32 dhcp_indicate;
51678c2ecf20Sopenharmony_ci	u32 unknown_dest_indicate;
51688c2ecf20Sopenharmony_ci	u32 ap_keepalive_min_idle_inactive_time_secs;
51698c2ecf20Sopenharmony_ci	u32 ap_keepalive_max_idle_inactive_time_secs;
51708c2ecf20Sopenharmony_ci	u32 ap_keepalive_max_unresponsive_time_secs;
51718c2ecf20Sopenharmony_ci	u32 ap_enable_nawds;
51728c2ecf20Sopenharmony_ci	u32 mcast2ucast_set;
51738c2ecf20Sopenharmony_ci	u32 enable_rtscts;
51748c2ecf20Sopenharmony_ci	u32 txbf;
51758c2ecf20Sopenharmony_ci	u32 packet_powersave;
51768c2ecf20Sopenharmony_ci	u32 drop_unencry;
51778c2ecf20Sopenharmony_ci	u32 tx_encap_type;
51788c2ecf20Sopenharmony_ci	u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
51798c2ecf20Sopenharmony_ci	u32 rc_num_retries;
51808c2ecf20Sopenharmony_ci	u32 cabq_maxdur;
51818c2ecf20Sopenharmony_ci	u32 mfptest_set;
51828c2ecf20Sopenharmony_ci	u32 rts_fixed_rate;
51838c2ecf20Sopenharmony_ci	u32 vht_sgimask;
51848c2ecf20Sopenharmony_ci	u32 vht80_ratemask;
51858c2ecf20Sopenharmony_ci	u32 early_rx_adjust_enable;
51868c2ecf20Sopenharmony_ci	u32 early_rx_tgt_bmiss_num;
51878c2ecf20Sopenharmony_ci	u32 early_rx_bmiss_sample_cycle;
51888c2ecf20Sopenharmony_ci	u32 early_rx_slop_step;
51898c2ecf20Sopenharmony_ci	u32 early_rx_init_slop;
51908c2ecf20Sopenharmony_ci	u32 early_rx_adjust_pause;
51918c2ecf20Sopenharmony_ci	u32 proxy_sta;
51928c2ecf20Sopenharmony_ci	u32 meru_vc;
51938c2ecf20Sopenharmony_ci	u32 rx_decap_type;
51948c2ecf20Sopenharmony_ci	u32 bw_nss_ratemask;
51958c2ecf20Sopenharmony_ci	u32 inc_tsf;
51968c2ecf20Sopenharmony_ci	u32 dec_tsf;
51978c2ecf20Sopenharmony_ci	u32 disable_4addr_src_lrn;
51988c2ecf20Sopenharmony_ci	u32 rtt_responder_role;
51998c2ecf20Sopenharmony_ci};
52008c2ecf20Sopenharmony_ci
52018c2ecf20Sopenharmony_ci#define WMI_VDEV_PARAM_UNSUPPORTED 0
52028c2ecf20Sopenharmony_ci
52038c2ecf20Sopenharmony_ci/* the definition of different VDEV parameters */
52048c2ecf20Sopenharmony_cienum wmi_vdev_param {
52058c2ecf20Sopenharmony_ci	/* RTS Threshold */
52068c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
52078c2ecf20Sopenharmony_ci	/* Fragmentation threshold */
52088c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
52098c2ecf20Sopenharmony_ci	/* beacon interval in TUs */
52108c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_BEACON_INTERVAL,
52118c2ecf20Sopenharmony_ci	/* Listen interval in TUs */
52128c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_LISTEN_INTERVAL,
52138c2ecf20Sopenharmony_ci	/* multicast rate in Mbps */
52148c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_MULTICAST_RATE,
52158c2ecf20Sopenharmony_ci	/* management frame rate in Mbps */
52168c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_MGMT_TX_RATE,
52178c2ecf20Sopenharmony_ci	/* slot time (long vs short) */
52188c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_SLOT_TIME,
52198c2ecf20Sopenharmony_ci	/* preamble (long vs short) */
52208c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_PREAMBLE,
52218c2ecf20Sopenharmony_ci	/* SWBA time (time before tbtt in msec) */
52228c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_SWBA_TIME,
52238c2ecf20Sopenharmony_ci	/* time period for updating VDEV stats */
52248c2ecf20Sopenharmony_ci	WMI_VDEV_STATS_UPDATE_PERIOD,
52258c2ecf20Sopenharmony_ci	/* age out time in msec for frames queued for station in power save */
52268c2ecf20Sopenharmony_ci	WMI_VDEV_PWRSAVE_AGEOUT_TIME,
52278c2ecf20Sopenharmony_ci	/*
52288c2ecf20Sopenharmony_ci	 * Host SWBA interval (time in msec before tbtt for SWBA event
52298c2ecf20Sopenharmony_ci	 * generation).
52308c2ecf20Sopenharmony_ci	 */
52318c2ecf20Sopenharmony_ci	WMI_VDEV_HOST_SWBA_INTERVAL,
52328c2ecf20Sopenharmony_ci	/* DTIM period (specified in units of num beacon intervals) */
52338c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_DTIM_PERIOD,
52348c2ecf20Sopenharmony_ci	/*
52358c2ecf20Sopenharmony_ci	 * scheduler air time limit for this VDEV. used by off chan
52368c2ecf20Sopenharmony_ci	 * scheduler.
52378c2ecf20Sopenharmony_ci	 */
52388c2ecf20Sopenharmony_ci	WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
52398c2ecf20Sopenharmony_ci	/* enable/dsiable WDS for this VDEV  */
52408c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_WDS,
52418c2ecf20Sopenharmony_ci	/* ATIM Window */
52428c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_ATIM_WINDOW,
52438c2ecf20Sopenharmony_ci	/* BMISS max */
52448c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_BMISS_COUNT_MAX,
52458c2ecf20Sopenharmony_ci	/* BMISS first time */
52468c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
52478c2ecf20Sopenharmony_ci	/* BMISS final time */
52488c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
52498c2ecf20Sopenharmony_ci	/* WMM enables/disabled */
52508c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_FEATURE_WMM,
52518c2ecf20Sopenharmony_ci	/* Channel width */
52528c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_CHWIDTH,
52538c2ecf20Sopenharmony_ci	/* Channel Offset */
52548c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_CHEXTOFFSET,
52558c2ecf20Sopenharmony_ci	/* Disable HT Protection */
52568c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
52578c2ecf20Sopenharmony_ci	/* Quick STA Kickout */
52588c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_STA_QUICKKICKOUT,
52598c2ecf20Sopenharmony_ci	/* Rate to be used with Management frames */
52608c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_MGMT_RATE,
52618c2ecf20Sopenharmony_ci	/* Protection Mode */
52628c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_PROTECTION_MODE,
52638c2ecf20Sopenharmony_ci	/* Fixed rate setting */
52648c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_FIXED_RATE,
52658c2ecf20Sopenharmony_ci	/* Short GI Enable/Disable */
52668c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_SGI,
52678c2ecf20Sopenharmony_ci	/* Enable LDPC */
52688c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_LDPC,
52698c2ecf20Sopenharmony_ci	/* Enable Tx STBC */
52708c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_TX_STBC,
52718c2ecf20Sopenharmony_ci	/* Enable Rx STBC */
52728c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_RX_STBC,
52738c2ecf20Sopenharmony_ci	/* Intra BSS forwarding  */
52748c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_INTRA_BSS_FWD,
52758c2ecf20Sopenharmony_ci	/* Setting Default xmit key for Vdev */
52768c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_DEF_KEYID,
52778c2ecf20Sopenharmony_ci	/* NSS width */
52788c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_NSS,
52798c2ecf20Sopenharmony_ci	/* Set the custom rate for the broadcast data frames */
52808c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_BCAST_DATA_RATE,
52818c2ecf20Sopenharmony_ci	/* Set the custom rate (rate-code) for multicast data frames */
52828c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_MCAST_DATA_RATE,
52838c2ecf20Sopenharmony_ci	/* Tx multicast packet indicate Enable/Disable */
52848c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_MCAST_INDICATE,
52858c2ecf20Sopenharmony_ci	/* Tx DHCP packet indicate Enable/Disable */
52868c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_DHCP_INDICATE,
52878c2ecf20Sopenharmony_ci	/* Enable host inspection of Tx unicast packet to unknown destination */
52888c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
52898c2ecf20Sopenharmony_ci
52908c2ecf20Sopenharmony_ci	/* The minimum amount of time AP begins to consider STA inactive */
52918c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
52928c2ecf20Sopenharmony_ci
52938c2ecf20Sopenharmony_ci	/*
52948c2ecf20Sopenharmony_ci	 * An associated STA is considered inactive when there is no recent
52958c2ecf20Sopenharmony_ci	 * TX/RX activity and no downlink frames are buffered for it. Once a
52968c2ecf20Sopenharmony_ci	 * STA exceeds the maximum idle inactive time, the AP will send an
52978c2ecf20Sopenharmony_ci	 * 802.11 data-null as a keep alive to verify the STA is still
52988c2ecf20Sopenharmony_ci	 * associated. If the STA does ACK the data-null, or if the data-null
52998c2ecf20Sopenharmony_ci	 * is buffered and the STA does not retrieve it, the STA will be
53008c2ecf20Sopenharmony_ci	 * considered unresponsive
53018c2ecf20Sopenharmony_ci	 * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
53028c2ecf20Sopenharmony_ci	 */
53038c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
53048c2ecf20Sopenharmony_ci
53058c2ecf20Sopenharmony_ci	/*
53068c2ecf20Sopenharmony_ci	 * An associated STA is considered unresponsive if there is no recent
53078c2ecf20Sopenharmony_ci	 * TX/RX activity and downlink frames are buffered for it. Once a STA
53088c2ecf20Sopenharmony_ci	 * exceeds the maximum unresponsive time, the AP will send a
53098c2ecf20Sopenharmony_ci	 * WMI_STA_KICKOUT event to the host so the STA can be deleted.
53108c2ecf20Sopenharmony_ci	 */
53118c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
53128c2ecf20Sopenharmony_ci
53138c2ecf20Sopenharmony_ci	/* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
53148c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
53158c2ecf20Sopenharmony_ci	/* Enable/Disable RTS-CTS */
53168c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_ENABLE_RTSCTS,
53178c2ecf20Sopenharmony_ci	/* Enable TXBFee/er */
53188c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_TXBF,
53198c2ecf20Sopenharmony_ci
53208c2ecf20Sopenharmony_ci	/* Set packet power save */
53218c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_PACKET_POWERSAVE,
53228c2ecf20Sopenharmony_ci
53238c2ecf20Sopenharmony_ci	/*
53248c2ecf20Sopenharmony_ci	 * Drops un-encrypted packets if eceived in an encrypted connection
53258c2ecf20Sopenharmony_ci	 * otherwise forwards to host.
53268c2ecf20Sopenharmony_ci	 */
53278c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_DROP_UNENCRY,
53288c2ecf20Sopenharmony_ci
53298c2ecf20Sopenharmony_ci	/*
53308c2ecf20Sopenharmony_ci	 * Set the encapsulation type for frames.
53318c2ecf20Sopenharmony_ci	 */
53328c2ecf20Sopenharmony_ci	WMI_VDEV_PARAM_TX_ENCAP_TYPE,
53338c2ecf20Sopenharmony_ci};
53348c2ecf20Sopenharmony_ci
53358c2ecf20Sopenharmony_ci/* the definition of different VDEV parameters */
53368c2ecf20Sopenharmony_cienum wmi_10x_vdev_param {
53378c2ecf20Sopenharmony_ci	/* RTS Threshold */
53388c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
53398c2ecf20Sopenharmony_ci	/* Fragmentation threshold */
53408c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
53418c2ecf20Sopenharmony_ci	/* beacon interval in TUs */
53428c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
53438c2ecf20Sopenharmony_ci	/* Listen interval in TUs */
53448c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
53458c2ecf20Sopenharmony_ci	/* multicast rate in Mbps */
53468c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MULTICAST_RATE,
53478c2ecf20Sopenharmony_ci	/* management frame rate in Mbps */
53488c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
53498c2ecf20Sopenharmony_ci	/* slot time (long vs short) */
53508c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_SLOT_TIME,
53518c2ecf20Sopenharmony_ci	/* preamble (long vs short) */
53528c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_PREAMBLE,
53538c2ecf20Sopenharmony_ci	/* SWBA time (time before tbtt in msec) */
53548c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_SWBA_TIME,
53558c2ecf20Sopenharmony_ci	/* time period for updating VDEV stats */
53568c2ecf20Sopenharmony_ci	WMI_10X_VDEV_STATS_UPDATE_PERIOD,
53578c2ecf20Sopenharmony_ci	/* age out time in msec for frames queued for station in power save */
53588c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
53598c2ecf20Sopenharmony_ci	/*
53608c2ecf20Sopenharmony_ci	 * Host SWBA interval (time in msec before tbtt for SWBA event
53618c2ecf20Sopenharmony_ci	 * generation).
53628c2ecf20Sopenharmony_ci	 */
53638c2ecf20Sopenharmony_ci	WMI_10X_VDEV_HOST_SWBA_INTERVAL,
53648c2ecf20Sopenharmony_ci	/* DTIM period (specified in units of num beacon intervals) */
53658c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_DTIM_PERIOD,
53668c2ecf20Sopenharmony_ci	/*
53678c2ecf20Sopenharmony_ci	 * scheduler air time limit for this VDEV. used by off chan
53688c2ecf20Sopenharmony_ci	 * scheduler.
53698c2ecf20Sopenharmony_ci	 */
53708c2ecf20Sopenharmony_ci	WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
53718c2ecf20Sopenharmony_ci	/* enable/dsiable WDS for this VDEV  */
53728c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_WDS,
53738c2ecf20Sopenharmony_ci	/* ATIM Window */
53748c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_ATIM_WINDOW,
53758c2ecf20Sopenharmony_ci	/* BMISS max */
53768c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
53778c2ecf20Sopenharmony_ci	/* WMM enables/disabled */
53788c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_FEATURE_WMM,
53798c2ecf20Sopenharmony_ci	/* Channel width */
53808c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_CHWIDTH,
53818c2ecf20Sopenharmony_ci	/* Channel Offset */
53828c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_CHEXTOFFSET,
53838c2ecf20Sopenharmony_ci	/* Disable HT Protection */
53848c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
53858c2ecf20Sopenharmony_ci	/* Quick STA Kickout */
53868c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
53878c2ecf20Sopenharmony_ci	/* Rate to be used with Management frames */
53888c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MGMT_RATE,
53898c2ecf20Sopenharmony_ci	/* Protection Mode */
53908c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_PROTECTION_MODE,
53918c2ecf20Sopenharmony_ci	/* Fixed rate setting */
53928c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_FIXED_RATE,
53938c2ecf20Sopenharmony_ci	/* Short GI Enable/Disable */
53948c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_SGI,
53958c2ecf20Sopenharmony_ci	/* Enable LDPC */
53968c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_LDPC,
53978c2ecf20Sopenharmony_ci	/* Enable Tx STBC */
53988c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_TX_STBC,
53998c2ecf20Sopenharmony_ci	/* Enable Rx STBC */
54008c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_RX_STBC,
54018c2ecf20Sopenharmony_ci	/* Intra BSS forwarding  */
54028c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
54038c2ecf20Sopenharmony_ci	/* Setting Default xmit key for Vdev */
54048c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_DEF_KEYID,
54058c2ecf20Sopenharmony_ci	/* NSS width */
54068c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_NSS,
54078c2ecf20Sopenharmony_ci	/* Set the custom rate for the broadcast data frames */
54088c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
54098c2ecf20Sopenharmony_ci	/* Set the custom rate (rate-code) for multicast data frames */
54108c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
54118c2ecf20Sopenharmony_ci	/* Tx multicast packet indicate Enable/Disable */
54128c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MCAST_INDICATE,
54138c2ecf20Sopenharmony_ci	/* Tx DHCP packet indicate Enable/Disable */
54148c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_DHCP_INDICATE,
54158c2ecf20Sopenharmony_ci	/* Enable host inspection of Tx unicast packet to unknown destination */
54168c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
54178c2ecf20Sopenharmony_ci
54188c2ecf20Sopenharmony_ci	/* The minimum amount of time AP begins to consider STA inactive */
54198c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
54208c2ecf20Sopenharmony_ci
54218c2ecf20Sopenharmony_ci	/*
54228c2ecf20Sopenharmony_ci	 * An associated STA is considered inactive when there is no recent
54238c2ecf20Sopenharmony_ci	 * TX/RX activity and no downlink frames are buffered for it. Once a
54248c2ecf20Sopenharmony_ci	 * STA exceeds the maximum idle inactive time, the AP will send an
54258c2ecf20Sopenharmony_ci	 * 802.11 data-null as a keep alive to verify the STA is still
54268c2ecf20Sopenharmony_ci	 * associated. If the STA does ACK the data-null, or if the data-null
54278c2ecf20Sopenharmony_ci	 * is buffered and the STA does not retrieve it, the STA will be
54288c2ecf20Sopenharmony_ci	 * considered unresponsive
54298c2ecf20Sopenharmony_ci	 * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
54308c2ecf20Sopenharmony_ci	 */
54318c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
54328c2ecf20Sopenharmony_ci
54338c2ecf20Sopenharmony_ci	/*
54348c2ecf20Sopenharmony_ci	 * An associated STA is considered unresponsive if there is no recent
54358c2ecf20Sopenharmony_ci	 * TX/RX activity and downlink frames are buffered for it. Once a STA
54368c2ecf20Sopenharmony_ci	 * exceeds the maximum unresponsive time, the AP will send a
54378c2ecf20Sopenharmony_ci	 * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted.
54388c2ecf20Sopenharmony_ci	 */
54398c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
54408c2ecf20Sopenharmony_ci
54418c2ecf20Sopenharmony_ci	/* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
54428c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
54438c2ecf20Sopenharmony_ci
54448c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
54458c2ecf20Sopenharmony_ci	/* Enable/Disable RTS-CTS */
54468c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
54478c2ecf20Sopenharmony_ci
54488c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
54498c2ecf20Sopenharmony_ci
54508c2ecf20Sopenharmony_ci	/* following are available as of firmware 10.2 */
54518c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
54528c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
54538c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_MFPTEST_SET,
54548c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
54558c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_VHT_SGIMASK,
54568c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
54578c2ecf20Sopenharmony_ci	WMI_10X_VDEV_PARAM_TSF_INCREMENT,
54588c2ecf20Sopenharmony_ci};
54598c2ecf20Sopenharmony_ci
54608c2ecf20Sopenharmony_cienum wmi_10_4_vdev_param {
54618c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RTS_THRESHOLD = 0x1,
54628c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
54638c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BEACON_INTERVAL,
54648c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_LISTEN_INTERVAL,
54658c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MULTICAST_RATE,
54668c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MGMT_TX_RATE,
54678c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SLOT_TIME,
54688c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_PREAMBLE,
54698c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SWBA_TIME,
54708c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_STATS_UPDATE_PERIOD,
54718c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PWRSAVE_AGEOUT_TIME,
54728c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_HOST_SWBA_INTERVAL,
54738c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DTIM_PERIOD,
54748c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
54758c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_WDS,
54768c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_ATIM_WINDOW,
54778c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BMISS_COUNT_MAX,
54788c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BMISS_FIRST_BCNT,
54798c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BMISS_FINAL_BCNT,
54808c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_FEATURE_WMM,
54818c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_CHWIDTH,
54828c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_CHEXTOFFSET,
54838c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DISABLE_HTPROTECTION,
54848c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_STA_QUICKKICKOUT,
54858c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MGMT_RATE,
54868c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_PROTECTION_MODE,
54878c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_FIXED_RATE,
54888c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SGI,
54898c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_LDPC,
54908c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TX_STBC,
54918c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RX_STBC,
54928c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_INTRA_BSS_FWD,
54938c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DEF_KEYID,
54948c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_NSS,
54958c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BCAST_DATA_RATE,
54968c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MCAST_DATA_RATE,
54978c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MCAST_INDICATE,
54988c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DHCP_INDICATE,
54998c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
55008c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
55018c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
55028c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
55038c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AP_ENABLE_NAWDS,
55048c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MCAST2UCAST_SET,
55058c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_ENABLE_RTSCTS,
55068c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RC_NUM_RETRIES,
55078c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TXBF,
55088c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_PACKET_POWERSAVE,
55098c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DROP_UNENCRY,
55108c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TX_ENCAP_TYPE,
55118c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
55128c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_CABQ_MAXDUR,
55138c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MFPTEST_SET,
55148c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RTS_FIXED_RATE,
55158c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_VHT_SGIMASK,
55168c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_VHT80_RATEMASK,
55178c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
55188c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
55198c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
55208c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_SLOP_STEP,
55218c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_INIT_SLOP,
55228c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
55238c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_PROXY_STA,
55248c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MERU_VC,
55258c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE,
55268c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK,
55278c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SENSOR_AP,
55288c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_BEACON_RATE,
55298c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DTIM_ENABLE_CTS,
55308c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_STA_KICKOUT,
55318c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_CAPABILITIES,
55328c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TSF_INCREMENT,
55338c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_RX_FILTER,
55348c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_MGMT_TX_POWER,
55358c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_ATF_SSID_SCHED_POLICY,
55368c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DISABLE_DYN_BW_RTS,
55378c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TSF_DECREMENT,
55388c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SELFGEN_FIXED_RATE,
55398c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AMPDU_SUBFRAME_SIZE_PER_AC,
55408c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_NSS_VHT160,
55418c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_NSS_VHT80_80,
55428c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_AMSDU_SUBFRAME_SIZE_PER_AC,
55438c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DISABLE_CABQ,
55448c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_SIFS_TRIGGER_RATE,
55458c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_TX_POWER,
55468c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_ENABLE_DISABLE_RTT_RESPONDER_ROLE,
55478c2ecf20Sopenharmony_ci	WMI_10_4_VDEV_PARAM_DISABLE_4_ADDR_SRC_LRN,
55488c2ecf20Sopenharmony_ci};
55498c2ecf20Sopenharmony_ci
55508c2ecf20Sopenharmony_ci#define WMI_VDEV_DISABLE_4_ADDR_SRC_LRN 1
55518c2ecf20Sopenharmony_ci
55528c2ecf20Sopenharmony_ci#define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
55538c2ecf20Sopenharmony_ci#define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
55548c2ecf20Sopenharmony_ci#define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
55558c2ecf20Sopenharmony_ci#define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
55568c2ecf20Sopenharmony_ci
55578c2ecf20Sopenharmony_ci#define WMI_TXBF_STS_CAP_OFFSET_LSB	4
55588c2ecf20Sopenharmony_ci#define WMI_TXBF_STS_CAP_OFFSET_MASK	0x70
55598c2ecf20Sopenharmony_ci#define WMI_TXBF_CONF_IMPLICIT_BF       BIT(7)
55608c2ecf20Sopenharmony_ci#define WMI_BF_SOUND_DIM_OFFSET_LSB	8
55618c2ecf20Sopenharmony_ci#define WMI_BF_SOUND_DIM_OFFSET_MASK	0xf00
55628c2ecf20Sopenharmony_ci
55638c2ecf20Sopenharmony_ci/* slot time long */
55648c2ecf20Sopenharmony_ci#define WMI_VDEV_SLOT_TIME_LONG		0x1
55658c2ecf20Sopenharmony_ci/* slot time short */
55668c2ecf20Sopenharmony_ci#define WMI_VDEV_SLOT_TIME_SHORT	0x2
55678c2ecf20Sopenharmony_ci/* preablbe long */
55688c2ecf20Sopenharmony_ci#define WMI_VDEV_PREAMBLE_LONG		0x1
55698c2ecf20Sopenharmony_ci/* preablbe short */
55708c2ecf20Sopenharmony_ci#define WMI_VDEV_PREAMBLE_SHORT		0x2
55718c2ecf20Sopenharmony_ci
55728c2ecf20Sopenharmony_cienum wmi_start_event_param {
55738c2ecf20Sopenharmony_ci	WMI_VDEV_RESP_START_EVENT = 0,
55748c2ecf20Sopenharmony_ci	WMI_VDEV_RESP_RESTART_EVENT,
55758c2ecf20Sopenharmony_ci};
55768c2ecf20Sopenharmony_ci
55778c2ecf20Sopenharmony_cistruct wmi_vdev_start_response_event {
55788c2ecf20Sopenharmony_ci	__le32 vdev_id;
55798c2ecf20Sopenharmony_ci	__le32 req_id;
55808c2ecf20Sopenharmony_ci	__le32 resp_type; /* %WMI_VDEV_RESP_ */
55818c2ecf20Sopenharmony_ci	__le32 status;
55828c2ecf20Sopenharmony_ci} __packed;
55838c2ecf20Sopenharmony_ci
55848c2ecf20Sopenharmony_cistruct wmi_vdev_standby_req_event {
55858c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
55868c2ecf20Sopenharmony_ci	__le32 vdev_id;
55878c2ecf20Sopenharmony_ci} __packed;
55888c2ecf20Sopenharmony_ci
55898c2ecf20Sopenharmony_cistruct wmi_vdev_resume_req_event {
55908c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
55918c2ecf20Sopenharmony_ci	__le32 vdev_id;
55928c2ecf20Sopenharmony_ci} __packed;
55938c2ecf20Sopenharmony_ci
55948c2ecf20Sopenharmony_cistruct wmi_vdev_stopped_event {
55958c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
55968c2ecf20Sopenharmony_ci	__le32 vdev_id;
55978c2ecf20Sopenharmony_ci} __packed;
55988c2ecf20Sopenharmony_ci
55998c2ecf20Sopenharmony_ci/*
56008c2ecf20Sopenharmony_ci * common structure used for simple events
56018c2ecf20Sopenharmony_ci * (stopped, resume_req, standby response)
56028c2ecf20Sopenharmony_ci */
56038c2ecf20Sopenharmony_cistruct wmi_vdev_simple_event {
56048c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
56058c2ecf20Sopenharmony_ci	__le32 vdev_id;
56068c2ecf20Sopenharmony_ci} __packed;
56078c2ecf20Sopenharmony_ci
56088c2ecf20Sopenharmony_ci/* VDEV start response status codes */
56098c2ecf20Sopenharmony_ci/* VDEV successfully started */
56108c2ecf20Sopenharmony_ci#define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS	0x0
56118c2ecf20Sopenharmony_ci
56128c2ecf20Sopenharmony_ci/* requested VDEV not found */
56138c2ecf20Sopenharmony_ci#define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID	0x1
56148c2ecf20Sopenharmony_ci
56158c2ecf20Sopenharmony_ci/* unsupported VDEV combination */
56168c2ecf20Sopenharmony_ci#define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED	0x2
56178c2ecf20Sopenharmony_ci
56188c2ecf20Sopenharmony_ci/* TODO: please add more comments if you have in-depth information */
56198c2ecf20Sopenharmony_cistruct wmi_vdev_spectral_conf_cmd {
56208c2ecf20Sopenharmony_ci	__le32 vdev_id;
56218c2ecf20Sopenharmony_ci
56228c2ecf20Sopenharmony_ci	/* number of fft samples to send (0 for infinite) */
56238c2ecf20Sopenharmony_ci	__le32 scan_count;
56248c2ecf20Sopenharmony_ci	__le32 scan_period;
56258c2ecf20Sopenharmony_ci	__le32 scan_priority;
56268c2ecf20Sopenharmony_ci
56278c2ecf20Sopenharmony_ci	/* number of bins in the FFT: 2^(fft_size - bin_scale) */
56288c2ecf20Sopenharmony_ci	__le32 scan_fft_size;
56298c2ecf20Sopenharmony_ci	__le32 scan_gc_ena;
56308c2ecf20Sopenharmony_ci	__le32 scan_restart_ena;
56318c2ecf20Sopenharmony_ci	__le32 scan_noise_floor_ref;
56328c2ecf20Sopenharmony_ci	__le32 scan_init_delay;
56338c2ecf20Sopenharmony_ci	__le32 scan_nb_tone_thr;
56348c2ecf20Sopenharmony_ci	__le32 scan_str_bin_thr;
56358c2ecf20Sopenharmony_ci	__le32 scan_wb_rpt_mode;
56368c2ecf20Sopenharmony_ci	__le32 scan_rssi_rpt_mode;
56378c2ecf20Sopenharmony_ci	__le32 scan_rssi_thr;
56388c2ecf20Sopenharmony_ci	__le32 scan_pwr_format;
56398c2ecf20Sopenharmony_ci
56408c2ecf20Sopenharmony_ci	/* rpt_mode: Format of FFT report to software for spectral scan
56418c2ecf20Sopenharmony_ci	 * triggered FFTs:
56428c2ecf20Sopenharmony_ci	 *	0: No FFT report (only spectral scan summary report)
56438c2ecf20Sopenharmony_ci	 *	1: 2-dword summary of metrics for each completed FFT + spectral
56448c2ecf20Sopenharmony_ci	 *	   scan	summary report
56458c2ecf20Sopenharmony_ci	 *	2: 2-dword summary of metrics for each completed FFT +
56468c2ecf20Sopenharmony_ci	 *	   1x- oversampled bins(in-band) per FFT + spectral scan summary
56478c2ecf20Sopenharmony_ci	 *	   report
56488c2ecf20Sopenharmony_ci	 *	3: 2-dword summary of metrics for each completed FFT +
56498c2ecf20Sopenharmony_ci	 *	   2x- oversampled bins	(all) per FFT + spectral scan summary
56508c2ecf20Sopenharmony_ci	 */
56518c2ecf20Sopenharmony_ci	__le32 scan_rpt_mode;
56528c2ecf20Sopenharmony_ci	__le32 scan_bin_scale;
56538c2ecf20Sopenharmony_ci	__le32 scan_dbm_adj;
56548c2ecf20Sopenharmony_ci	__le32 scan_chn_mask;
56558c2ecf20Sopenharmony_ci} __packed;
56568c2ecf20Sopenharmony_ci
56578c2ecf20Sopenharmony_cistruct wmi_vdev_spectral_conf_arg {
56588c2ecf20Sopenharmony_ci	u32 vdev_id;
56598c2ecf20Sopenharmony_ci	u32 scan_count;
56608c2ecf20Sopenharmony_ci	u32 scan_period;
56618c2ecf20Sopenharmony_ci	u32 scan_priority;
56628c2ecf20Sopenharmony_ci	u32 scan_fft_size;
56638c2ecf20Sopenharmony_ci	u32 scan_gc_ena;
56648c2ecf20Sopenharmony_ci	u32 scan_restart_ena;
56658c2ecf20Sopenharmony_ci	u32 scan_noise_floor_ref;
56668c2ecf20Sopenharmony_ci	u32 scan_init_delay;
56678c2ecf20Sopenharmony_ci	u32 scan_nb_tone_thr;
56688c2ecf20Sopenharmony_ci	u32 scan_str_bin_thr;
56698c2ecf20Sopenharmony_ci	u32 scan_wb_rpt_mode;
56708c2ecf20Sopenharmony_ci	u32 scan_rssi_rpt_mode;
56718c2ecf20Sopenharmony_ci	u32 scan_rssi_thr;
56728c2ecf20Sopenharmony_ci	u32 scan_pwr_format;
56738c2ecf20Sopenharmony_ci	u32 scan_rpt_mode;
56748c2ecf20Sopenharmony_ci	u32 scan_bin_scale;
56758c2ecf20Sopenharmony_ci	u32 scan_dbm_adj;
56768c2ecf20Sopenharmony_ci	u32 scan_chn_mask;
56778c2ecf20Sopenharmony_ci};
56788c2ecf20Sopenharmony_ci
56798c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_ENABLE_DEFAULT              0
56808c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_COUNT_DEFAULT               0
56818c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_PERIOD_DEFAULT             35
56828c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_PRIORITY_DEFAULT            1
56838c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_FFT_SIZE_DEFAULT            7
56848c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_GC_ENA_DEFAULT              1
56858c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_RESTART_ENA_DEFAULT         0
56868c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT   -96
56878c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_INIT_DELAY_DEFAULT         80
56888c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_NB_TONE_THR_DEFAULT        12
56898c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_STR_BIN_THR_DEFAULT         8
56908c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT         0
56918c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT       0
56928c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_RSSI_THR_DEFAULT         0xf0
56938c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_PWR_FORMAT_DEFAULT          0
56948c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_RPT_MODE_DEFAULT            2
56958c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_BIN_SCALE_DEFAULT           1
56968c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_DBM_ADJ_DEFAULT             1
56978c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_CHN_MASK_DEFAULT            1
56988c2ecf20Sopenharmony_ci
56998c2ecf20Sopenharmony_cistruct wmi_vdev_spectral_enable_cmd {
57008c2ecf20Sopenharmony_ci	__le32 vdev_id;
57018c2ecf20Sopenharmony_ci	__le32 trigger_cmd;
57028c2ecf20Sopenharmony_ci	__le32 enable_cmd;
57038c2ecf20Sopenharmony_ci} __packed;
57048c2ecf20Sopenharmony_ci
57058c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER  1
57068c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_TRIGGER_CMD_CLEAR    2
57078c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_ENABLE_CMD_ENABLE    1
57088c2ecf20Sopenharmony_ci#define WMI_SPECTRAL_ENABLE_CMD_DISABLE   2
57098c2ecf20Sopenharmony_ci
57108c2ecf20Sopenharmony_ci/* Beacon processing related command and event structures */
57118c2ecf20Sopenharmony_cistruct wmi_bcn_tx_hdr {
57128c2ecf20Sopenharmony_ci	__le32 vdev_id;
57138c2ecf20Sopenharmony_ci	__le32 tx_rate;
57148c2ecf20Sopenharmony_ci	__le32 tx_power;
57158c2ecf20Sopenharmony_ci	__le32 bcn_len;
57168c2ecf20Sopenharmony_ci} __packed;
57178c2ecf20Sopenharmony_ci
57188c2ecf20Sopenharmony_cistruct wmi_bcn_tx_cmd {
57198c2ecf20Sopenharmony_ci	struct wmi_bcn_tx_hdr hdr;
57208c2ecf20Sopenharmony_ci	u8 *bcn[];
57218c2ecf20Sopenharmony_ci} __packed;
57228c2ecf20Sopenharmony_ci
57238c2ecf20Sopenharmony_cistruct wmi_bcn_tx_arg {
57248c2ecf20Sopenharmony_ci	u32 vdev_id;
57258c2ecf20Sopenharmony_ci	u32 tx_rate;
57268c2ecf20Sopenharmony_ci	u32 tx_power;
57278c2ecf20Sopenharmony_ci	u32 bcn_len;
57288c2ecf20Sopenharmony_ci	const void *bcn;
57298c2ecf20Sopenharmony_ci};
57308c2ecf20Sopenharmony_ci
57318c2ecf20Sopenharmony_cienum wmi_bcn_tx_ref_flags {
57328c2ecf20Sopenharmony_ci	WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1,
57338c2ecf20Sopenharmony_ci	WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2,
57348c2ecf20Sopenharmony_ci};
57358c2ecf20Sopenharmony_ci
57368c2ecf20Sopenharmony_ci/* TODO: It is unclear why "no antenna" works while any other seemingly valid
57378c2ecf20Sopenharmony_ci * chainmask yields no beacons on the air at all.
57388c2ecf20Sopenharmony_ci */
57398c2ecf20Sopenharmony_ci#define WMI_BCN_TX_REF_DEF_ANTENNA 0
57408c2ecf20Sopenharmony_ci
57418c2ecf20Sopenharmony_cistruct wmi_bcn_tx_ref_cmd {
57428c2ecf20Sopenharmony_ci	__le32 vdev_id;
57438c2ecf20Sopenharmony_ci	__le32 data_len;
57448c2ecf20Sopenharmony_ci	/* physical address of the frame - dma pointer */
57458c2ecf20Sopenharmony_ci	__le32 data_ptr;
57468c2ecf20Sopenharmony_ci	/* id for host to track */
57478c2ecf20Sopenharmony_ci	__le32 msdu_id;
57488c2ecf20Sopenharmony_ci	/* frame ctrl to setup PPDU desc */
57498c2ecf20Sopenharmony_ci	__le32 frame_control;
57508c2ecf20Sopenharmony_ci	/* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
57518c2ecf20Sopenharmony_ci	__le32 flags;
57528c2ecf20Sopenharmony_ci	/* introduced in 10.2 */
57538c2ecf20Sopenharmony_ci	__le32 antenna_mask;
57548c2ecf20Sopenharmony_ci} __packed;
57558c2ecf20Sopenharmony_ci
57568c2ecf20Sopenharmony_ci/* Beacon filter */
57578c2ecf20Sopenharmony_ci#define WMI_BCN_FILTER_ALL   0 /* Filter all beacons */
57588c2ecf20Sopenharmony_ci#define WMI_BCN_FILTER_NONE  1 /* Pass all beacons */
57598c2ecf20Sopenharmony_ci#define WMI_BCN_FILTER_RSSI  2 /* Pass Beacons RSSI >= RSSI threshold */
57608c2ecf20Sopenharmony_ci#define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
57618c2ecf20Sopenharmony_ci#define WMI_BCN_FILTER_SSID  4 /* Pass Beacons with matching SSID */
57628c2ecf20Sopenharmony_ci
57638c2ecf20Sopenharmony_cistruct wmi_bcn_filter_rx_cmd {
57648c2ecf20Sopenharmony_ci	/* Filter ID */
57658c2ecf20Sopenharmony_ci	__le32 bcn_filter_id;
57668c2ecf20Sopenharmony_ci	/* Filter type - wmi_bcn_filter */
57678c2ecf20Sopenharmony_ci	__le32 bcn_filter;
57688c2ecf20Sopenharmony_ci	/* Buffer len */
57698c2ecf20Sopenharmony_ci	__le32 bcn_filter_len;
57708c2ecf20Sopenharmony_ci	/* Filter info (threshold, BSSID, RSSI) */
57718c2ecf20Sopenharmony_ci	u8 *bcn_filter_buf;
57728c2ecf20Sopenharmony_ci} __packed;
57738c2ecf20Sopenharmony_ci
57748c2ecf20Sopenharmony_ci/* Capabilities and IEs to be passed to firmware */
57758c2ecf20Sopenharmony_cistruct wmi_bcn_prb_info {
57768c2ecf20Sopenharmony_ci	/* Capabilities */
57778c2ecf20Sopenharmony_ci	__le32 caps;
57788c2ecf20Sopenharmony_ci	/* ERP info */
57798c2ecf20Sopenharmony_ci	__le32 erp;
57808c2ecf20Sopenharmony_ci	/* Advanced capabilities */
57818c2ecf20Sopenharmony_ci	/* HT capabilities */
57828c2ecf20Sopenharmony_ci	/* HT Info */
57838c2ecf20Sopenharmony_ci	/* ibss_dfs */
57848c2ecf20Sopenharmony_ci	/* wpa Info */
57858c2ecf20Sopenharmony_ci	/* rsn Info */
57868c2ecf20Sopenharmony_ci	/* rrm info */
57878c2ecf20Sopenharmony_ci	/* ath_ext */
57888c2ecf20Sopenharmony_ci	/* app IE */
57898c2ecf20Sopenharmony_ci} __packed;
57908c2ecf20Sopenharmony_ci
57918c2ecf20Sopenharmony_cistruct wmi_bcn_tmpl_cmd {
57928c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
57938c2ecf20Sopenharmony_ci	__le32 vdev_id;
57948c2ecf20Sopenharmony_ci	/* TIM IE offset from the beginning of the template. */
57958c2ecf20Sopenharmony_ci	__le32 tim_ie_offset;
57968c2ecf20Sopenharmony_ci	/* beacon probe capabilities and IEs */
57978c2ecf20Sopenharmony_ci	struct wmi_bcn_prb_info bcn_prb_info;
57988c2ecf20Sopenharmony_ci	/* beacon buffer length */
57998c2ecf20Sopenharmony_ci	__le32 buf_len;
58008c2ecf20Sopenharmony_ci	/* variable length data */
58018c2ecf20Sopenharmony_ci	u8 data[1];
58028c2ecf20Sopenharmony_ci} __packed;
58038c2ecf20Sopenharmony_ci
58048c2ecf20Sopenharmony_cistruct wmi_prb_tmpl_cmd {
58058c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
58068c2ecf20Sopenharmony_ci	__le32 vdev_id;
58078c2ecf20Sopenharmony_ci	/* beacon probe capabilities and IEs */
58088c2ecf20Sopenharmony_ci	struct wmi_bcn_prb_info bcn_prb_info;
58098c2ecf20Sopenharmony_ci	/* beacon buffer length */
58108c2ecf20Sopenharmony_ci	__le32 buf_len;
58118c2ecf20Sopenharmony_ci	/* Variable length data */
58128c2ecf20Sopenharmony_ci	u8 data[1];
58138c2ecf20Sopenharmony_ci} __packed;
58148c2ecf20Sopenharmony_ci
58158c2ecf20Sopenharmony_cienum wmi_sta_ps_mode {
58168c2ecf20Sopenharmony_ci	/* enable power save for the given STA VDEV */
58178c2ecf20Sopenharmony_ci	WMI_STA_PS_MODE_DISABLED = 0,
58188c2ecf20Sopenharmony_ci	/* disable power save  for a given STA VDEV */
58198c2ecf20Sopenharmony_ci	WMI_STA_PS_MODE_ENABLED = 1,
58208c2ecf20Sopenharmony_ci};
58218c2ecf20Sopenharmony_ci
58228c2ecf20Sopenharmony_cistruct wmi_sta_powersave_mode_cmd {
58238c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
58248c2ecf20Sopenharmony_ci	__le32 vdev_id;
58258c2ecf20Sopenharmony_ci
58268c2ecf20Sopenharmony_ci	/*
58278c2ecf20Sopenharmony_ci	 * Power save mode
58288c2ecf20Sopenharmony_ci	 * (see enum wmi_sta_ps_mode)
58298c2ecf20Sopenharmony_ci	 */
58308c2ecf20Sopenharmony_ci	__le32 sta_ps_mode;
58318c2ecf20Sopenharmony_ci} __packed;
58328c2ecf20Sopenharmony_ci
58338c2ecf20Sopenharmony_cienum wmi_csa_offload_en {
58348c2ecf20Sopenharmony_ci	WMI_CSA_OFFLOAD_DISABLE = 0,
58358c2ecf20Sopenharmony_ci	WMI_CSA_OFFLOAD_ENABLE = 1,
58368c2ecf20Sopenharmony_ci};
58378c2ecf20Sopenharmony_ci
58388c2ecf20Sopenharmony_cistruct wmi_csa_offload_enable_cmd {
58398c2ecf20Sopenharmony_ci	__le32 vdev_id;
58408c2ecf20Sopenharmony_ci	__le32 csa_offload_enable;
58418c2ecf20Sopenharmony_ci} __packed;
58428c2ecf20Sopenharmony_ci
58438c2ecf20Sopenharmony_cistruct wmi_csa_offload_chanswitch_cmd {
58448c2ecf20Sopenharmony_ci	__le32 vdev_id;
58458c2ecf20Sopenharmony_ci	struct wmi_channel chan;
58468c2ecf20Sopenharmony_ci} __packed;
58478c2ecf20Sopenharmony_ci
58488c2ecf20Sopenharmony_ci/*
58498c2ecf20Sopenharmony_ci * This parameter controls the policy for retrieving frames from AP while the
58508c2ecf20Sopenharmony_ci * STA is in sleep state.
58518c2ecf20Sopenharmony_ci *
58528c2ecf20Sopenharmony_ci * Only takes affect if the sta_ps_mode is enabled
58538c2ecf20Sopenharmony_ci */
58548c2ecf20Sopenharmony_cienum wmi_sta_ps_param_rx_wake_policy {
58558c2ecf20Sopenharmony_ci	/*
58568c2ecf20Sopenharmony_ci	 * Wake up when ever there is an  RX activity on the VDEV. In this mode
58578c2ecf20Sopenharmony_ci	 * the Power save SM(state machine) will come out of sleep by either
58588c2ecf20Sopenharmony_ci	 * sending null frame (or) a data frame (with PS==0) in response to TIM
58598c2ecf20Sopenharmony_ci	 * bit set in the received beacon frame from AP.
58608c2ecf20Sopenharmony_ci	 */
58618c2ecf20Sopenharmony_ci	WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
58628c2ecf20Sopenharmony_ci
58638c2ecf20Sopenharmony_ci	/*
58648c2ecf20Sopenharmony_ci	 * Here the power save state machine will not wakeup in response to TIM
58658c2ecf20Sopenharmony_ci	 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
58668c2ecf20Sopenharmony_ci	 * configuration setup by WMISET_PS_SET_UAPSD  WMI command.  When all
58678c2ecf20Sopenharmony_ci	 * access categories are delivery-enabled, the station will send a
58688c2ecf20Sopenharmony_ci	 * UAPSD trigger frame, otherwise it will send a PS-Poll.
58698c2ecf20Sopenharmony_ci	 */
58708c2ecf20Sopenharmony_ci	WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
58718c2ecf20Sopenharmony_ci};
58728c2ecf20Sopenharmony_ci
58738c2ecf20Sopenharmony_ci/*
58748c2ecf20Sopenharmony_ci * Number of tx frames/beacon  that cause the power save SM to wake up.
58758c2ecf20Sopenharmony_ci *
58768c2ecf20Sopenharmony_ci * Value 1 causes the SM to wake up for every TX. Value 0 has a special
58778c2ecf20Sopenharmony_ci * meaning, It will cause the SM to never wake up. This is useful if you want
58788c2ecf20Sopenharmony_ci * to keep the system to sleep all the time for some kind of test mode . host
58798c2ecf20Sopenharmony_ci * can change this parameter any time.  It will affect at the next tx frame.
58808c2ecf20Sopenharmony_ci */
58818c2ecf20Sopenharmony_cienum wmi_sta_ps_param_tx_wake_threshold {
58828c2ecf20Sopenharmony_ci	WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
58838c2ecf20Sopenharmony_ci	WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
58848c2ecf20Sopenharmony_ci
58858c2ecf20Sopenharmony_ci	/*
58868c2ecf20Sopenharmony_ci	 * Values greater than one indicate that many TX attempts per beacon
58878c2ecf20Sopenharmony_ci	 * interval before the STA will wake up
58888c2ecf20Sopenharmony_ci	 */
58898c2ecf20Sopenharmony_ci};
58908c2ecf20Sopenharmony_ci
58918c2ecf20Sopenharmony_ci/*
58928c2ecf20Sopenharmony_ci * The maximum number of PS-Poll frames the FW will send in response to
58938c2ecf20Sopenharmony_ci * traffic advertised in TIM before waking up (by sending a null frame with PS
58948c2ecf20Sopenharmony_ci * = 0). Value 0 has a special meaning: there is no maximum count and the FW
58958c2ecf20Sopenharmony_ci * will send as many PS-Poll as are necessary to retrieve buffered BU. This
58968c2ecf20Sopenharmony_ci * parameter is used when the RX wake policy is
58978c2ecf20Sopenharmony_ci * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
58988c2ecf20Sopenharmony_ci * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
58998c2ecf20Sopenharmony_ci */
59008c2ecf20Sopenharmony_cienum wmi_sta_ps_param_pspoll_count {
59018c2ecf20Sopenharmony_ci	WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
59028c2ecf20Sopenharmony_ci	/*
59038c2ecf20Sopenharmony_ci	 * Values greater than 0 indicate the maximum numer of PS-Poll frames
59048c2ecf20Sopenharmony_ci	 * FW will send before waking up.
59058c2ecf20Sopenharmony_ci	 */
59068c2ecf20Sopenharmony_ci
59078c2ecf20Sopenharmony_ci	/* When u-APSD is enabled the firmware will be very reluctant to exit
59088c2ecf20Sopenharmony_ci	 * STA PS. This could result in very poor Rx performance with STA doing
59098c2ecf20Sopenharmony_ci	 * PS-Poll for each and every buffered frame. This value is a bit
59108c2ecf20Sopenharmony_ci	 * arbitrary.
59118c2ecf20Sopenharmony_ci	 */
59128c2ecf20Sopenharmony_ci	WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
59138c2ecf20Sopenharmony_ci};
59148c2ecf20Sopenharmony_ci
59158c2ecf20Sopenharmony_ci/*
59168c2ecf20Sopenharmony_ci * This will include the delivery and trigger enabled state for every AC.
59178c2ecf20Sopenharmony_ci * This is the negotiated state with AP. The host MLME needs to set this based
59188c2ecf20Sopenharmony_ci * on AP capability and the state Set in the association request by the
59198c2ecf20Sopenharmony_ci * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
59208c2ecf20Sopenharmony_ci */
59218c2ecf20Sopenharmony_ci#define WMI_UAPSD_AC_TYPE_DELI 0
59228c2ecf20Sopenharmony_ci#define WMI_UAPSD_AC_TYPE_TRIG 1
59238c2ecf20Sopenharmony_ci
59248c2ecf20Sopenharmony_ci#define WMI_UAPSD_AC_BIT_MASK(ac, type) \
59258c2ecf20Sopenharmony_ci	(type == WMI_UAPSD_AC_TYPE_DELI ? 1 << (ac << 1) : 1 << ((ac << 1) + 1))
59268c2ecf20Sopenharmony_ci
59278c2ecf20Sopenharmony_cienum wmi_sta_ps_param_uapsd {
59288c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
59298c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC0_TRIGGER_EN  = (1 << 1),
59308c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
59318c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC1_TRIGGER_EN  = (1 << 3),
59328c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
59338c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC2_TRIGGER_EN  = (1 << 5),
59348c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
59358c2ecf20Sopenharmony_ci	WMI_STA_PS_UAPSD_AC3_TRIGGER_EN  = (1 << 7),
59368c2ecf20Sopenharmony_ci};
59378c2ecf20Sopenharmony_ci
59388c2ecf20Sopenharmony_ci#define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX
59398c2ecf20Sopenharmony_ci
59408c2ecf20Sopenharmony_cistruct wmi_sta_uapsd_auto_trig_param {
59418c2ecf20Sopenharmony_ci	__le32 wmm_ac;
59428c2ecf20Sopenharmony_ci	__le32 user_priority;
59438c2ecf20Sopenharmony_ci	__le32 service_interval;
59448c2ecf20Sopenharmony_ci	__le32 suspend_interval;
59458c2ecf20Sopenharmony_ci	__le32 delay_interval;
59468c2ecf20Sopenharmony_ci};
59478c2ecf20Sopenharmony_ci
59488c2ecf20Sopenharmony_cistruct wmi_sta_uapsd_auto_trig_cmd_fixed_param {
59498c2ecf20Sopenharmony_ci	__le32 vdev_id;
59508c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
59518c2ecf20Sopenharmony_ci	__le32 num_ac;
59528c2ecf20Sopenharmony_ci};
59538c2ecf20Sopenharmony_ci
59548c2ecf20Sopenharmony_cistruct wmi_sta_uapsd_auto_trig_arg {
59558c2ecf20Sopenharmony_ci	u32 wmm_ac;
59568c2ecf20Sopenharmony_ci	u32 user_priority;
59578c2ecf20Sopenharmony_ci	u32 service_interval;
59588c2ecf20Sopenharmony_ci	u32 suspend_interval;
59598c2ecf20Sopenharmony_ci	u32 delay_interval;
59608c2ecf20Sopenharmony_ci};
59618c2ecf20Sopenharmony_ci
59628c2ecf20Sopenharmony_cienum wmi_sta_powersave_param {
59638c2ecf20Sopenharmony_ci	/*
59648c2ecf20Sopenharmony_ci	 * Controls how frames are retrievd from AP while STA is sleeping
59658c2ecf20Sopenharmony_ci	 *
59668c2ecf20Sopenharmony_ci	 * (see enum wmi_sta_ps_param_rx_wake_policy)
59678c2ecf20Sopenharmony_ci	 */
59688c2ecf20Sopenharmony_ci	WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
59698c2ecf20Sopenharmony_ci
59708c2ecf20Sopenharmony_ci	/*
59718c2ecf20Sopenharmony_ci	 * The STA will go active after this many TX
59728c2ecf20Sopenharmony_ci	 *
59738c2ecf20Sopenharmony_ci	 * (see enum wmi_sta_ps_param_tx_wake_threshold)
59748c2ecf20Sopenharmony_ci	 */
59758c2ecf20Sopenharmony_ci	WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
59768c2ecf20Sopenharmony_ci
59778c2ecf20Sopenharmony_ci	/*
59788c2ecf20Sopenharmony_ci	 * Number of PS-Poll to send before STA wakes up
59798c2ecf20Sopenharmony_ci	 *
59808c2ecf20Sopenharmony_ci	 * (see enum wmi_sta_ps_param_pspoll_count)
59818c2ecf20Sopenharmony_ci	 *
59828c2ecf20Sopenharmony_ci	 */
59838c2ecf20Sopenharmony_ci	WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
59848c2ecf20Sopenharmony_ci
59858c2ecf20Sopenharmony_ci	/*
59868c2ecf20Sopenharmony_ci	 * TX/RX inactivity time in msec before going to sleep.
59878c2ecf20Sopenharmony_ci	 *
59888c2ecf20Sopenharmony_ci	 * The power save SM will monitor tx/rx activity on the VDEV, if no
59898c2ecf20Sopenharmony_ci	 * activity for the specified msec of the parameter the Power save
59908c2ecf20Sopenharmony_ci	 * SM will go to sleep.
59918c2ecf20Sopenharmony_ci	 */
59928c2ecf20Sopenharmony_ci	WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
59938c2ecf20Sopenharmony_ci
59948c2ecf20Sopenharmony_ci	/*
59958c2ecf20Sopenharmony_ci	 * Set uapsd configuration.
59968c2ecf20Sopenharmony_ci	 *
59978c2ecf20Sopenharmony_ci	 * (see enum wmi_sta_ps_param_uapsd)
59988c2ecf20Sopenharmony_ci	 */
59998c2ecf20Sopenharmony_ci	WMI_STA_PS_PARAM_UAPSD = 4,
60008c2ecf20Sopenharmony_ci};
60018c2ecf20Sopenharmony_ci
60028c2ecf20Sopenharmony_cistruct wmi_sta_powersave_param_cmd {
60038c2ecf20Sopenharmony_ci	__le32 vdev_id;
60048c2ecf20Sopenharmony_ci	__le32 param_id; /* %WMI_STA_PS_PARAM_ */
60058c2ecf20Sopenharmony_ci	__le32 param_value;
60068c2ecf20Sopenharmony_ci} __packed;
60078c2ecf20Sopenharmony_ci
60088c2ecf20Sopenharmony_ci/* No MIMO power save */
60098c2ecf20Sopenharmony_ci#define WMI_STA_MIMO_PS_MODE_DISABLE
60108c2ecf20Sopenharmony_ci/* mimo powersave mode static*/
60118c2ecf20Sopenharmony_ci#define WMI_STA_MIMO_PS_MODE_STATIC
60128c2ecf20Sopenharmony_ci/* mimo powersave mode dynamic */
60138c2ecf20Sopenharmony_ci#define WMI_STA_MIMO_PS_MODE_DYNAMIC
60148c2ecf20Sopenharmony_ci
60158c2ecf20Sopenharmony_cistruct wmi_sta_mimo_ps_mode_cmd {
60168c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
60178c2ecf20Sopenharmony_ci	__le32 vdev_id;
60188c2ecf20Sopenharmony_ci	/* mimo powersave mode as defined above */
60198c2ecf20Sopenharmony_ci	__le32 mimo_pwrsave_mode;
60208c2ecf20Sopenharmony_ci} __packed;
60218c2ecf20Sopenharmony_ci
60228c2ecf20Sopenharmony_ci/* U-APSD configuration of peer station from (re)assoc request and TSPECs */
60238c2ecf20Sopenharmony_cienum wmi_ap_ps_param_uapsd {
60248c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
60258c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC0_TRIGGER_EN  = (1 << 1),
60268c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
60278c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC1_TRIGGER_EN  = (1 << 3),
60288c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
60298c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC2_TRIGGER_EN  = (1 << 5),
60308c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
60318c2ecf20Sopenharmony_ci	WMI_AP_PS_UAPSD_AC3_TRIGGER_EN  = (1 << 7),
60328c2ecf20Sopenharmony_ci};
60338c2ecf20Sopenharmony_ci
60348c2ecf20Sopenharmony_ci/* U-APSD maximum service period of peer station */
60358c2ecf20Sopenharmony_cienum wmi_ap_ps_peer_param_max_sp {
60368c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
60378c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
60388c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
60398c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
60408c2ecf20Sopenharmony_ci	MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
60418c2ecf20Sopenharmony_ci};
60428c2ecf20Sopenharmony_ci
60438c2ecf20Sopenharmony_ci/*
60448c2ecf20Sopenharmony_ci * AP power save parameter
60458c2ecf20Sopenharmony_ci * Set a power save specific parameter for a peer station
60468c2ecf20Sopenharmony_ci */
60478c2ecf20Sopenharmony_cienum wmi_ap_ps_peer_param {
60488c2ecf20Sopenharmony_ci	/* Set uapsd configuration for a given peer.
60498c2ecf20Sopenharmony_ci	 *
60508c2ecf20Sopenharmony_ci	 * Include the delivery and trigger enabled state for every AC.
60518c2ecf20Sopenharmony_ci	 * The host  MLME needs to set this based on AP capability and stations
60528c2ecf20Sopenharmony_ci	 * request Set in the association request  received from the station.
60538c2ecf20Sopenharmony_ci	 *
60548c2ecf20Sopenharmony_ci	 * Lower 8 bits of the value specify the UAPSD configuration.
60558c2ecf20Sopenharmony_ci	 *
60568c2ecf20Sopenharmony_ci	 * (see enum wmi_ap_ps_param_uapsd)
60578c2ecf20Sopenharmony_ci	 * The default value is 0.
60588c2ecf20Sopenharmony_ci	 */
60598c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_UAPSD = 0,
60608c2ecf20Sopenharmony_ci
60618c2ecf20Sopenharmony_ci	/*
60628c2ecf20Sopenharmony_ci	 * Set the service period for a UAPSD capable station
60638c2ecf20Sopenharmony_ci	 *
60648c2ecf20Sopenharmony_ci	 * The service period from wme ie in the (re)assoc request frame.
60658c2ecf20Sopenharmony_ci	 *
60668c2ecf20Sopenharmony_ci	 * (see enum wmi_ap_ps_peer_param_max_sp)
60678c2ecf20Sopenharmony_ci	 */
60688c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
60698c2ecf20Sopenharmony_ci
60708c2ecf20Sopenharmony_ci	/* Time in seconds for aging out buffered frames for STA in PS */
60718c2ecf20Sopenharmony_ci	WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
60728c2ecf20Sopenharmony_ci};
60738c2ecf20Sopenharmony_ci
60748c2ecf20Sopenharmony_cistruct wmi_ap_ps_peer_cmd {
60758c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
60768c2ecf20Sopenharmony_ci	__le32 vdev_id;
60778c2ecf20Sopenharmony_ci
60788c2ecf20Sopenharmony_ci	/* peer MAC address */
60798c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
60808c2ecf20Sopenharmony_ci
60818c2ecf20Sopenharmony_ci	/* AP powersave param (see enum wmi_ap_ps_peer_param) */
60828c2ecf20Sopenharmony_ci	__le32 param_id;
60838c2ecf20Sopenharmony_ci
60848c2ecf20Sopenharmony_ci	/* AP powersave param value */
60858c2ecf20Sopenharmony_ci	__le32 param_value;
60868c2ecf20Sopenharmony_ci} __packed;
60878c2ecf20Sopenharmony_ci
60888c2ecf20Sopenharmony_ci/* 128 clients = 4 words */
60898c2ecf20Sopenharmony_ci#define WMI_TIM_BITMAP_ARRAY_SIZE 4
60908c2ecf20Sopenharmony_ci
60918c2ecf20Sopenharmony_cistruct wmi_tim_info {
60928c2ecf20Sopenharmony_ci	__le32 tim_len;
60938c2ecf20Sopenharmony_ci	__le32 tim_mcast;
60948c2ecf20Sopenharmony_ci	__le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
60958c2ecf20Sopenharmony_ci	__le32 tim_changed;
60968c2ecf20Sopenharmony_ci	__le32 tim_num_ps_pending;
60978c2ecf20Sopenharmony_ci} __packed;
60988c2ecf20Sopenharmony_ci
60998c2ecf20Sopenharmony_cistruct wmi_tim_info_arg {
61008c2ecf20Sopenharmony_ci	__le32 tim_len;
61018c2ecf20Sopenharmony_ci	__le32 tim_mcast;
61028c2ecf20Sopenharmony_ci	const __le32 *tim_bitmap;
61038c2ecf20Sopenharmony_ci	__le32 tim_changed;
61048c2ecf20Sopenharmony_ci	__le32 tim_num_ps_pending;
61058c2ecf20Sopenharmony_ci} __packed;
61068c2ecf20Sopenharmony_ci
61078c2ecf20Sopenharmony_ci/* Maximum number of NOA Descriptors supported */
61088c2ecf20Sopenharmony_ci#define WMI_P2P_MAX_NOA_DESCRIPTORS 4
61098c2ecf20Sopenharmony_ci#define WMI_P2P_OPPPS_ENABLE_BIT	BIT(0)
61108c2ecf20Sopenharmony_ci#define WMI_P2P_OPPPS_CTWINDOW_OFFSET	1
61118c2ecf20Sopenharmony_ci#define WMI_P2P_NOA_CHANGED_BIT	BIT(0)
61128c2ecf20Sopenharmony_ci
61138c2ecf20Sopenharmony_cistruct wmi_p2p_noa_info {
61148c2ecf20Sopenharmony_ci	/* Bit 0 - Flag to indicate an update in NOA schedule
61158c2ecf20Sopenharmony_ci	 * Bits 7-1 - Reserved
61168c2ecf20Sopenharmony_ci	 */
61178c2ecf20Sopenharmony_ci	u8 changed;
61188c2ecf20Sopenharmony_ci	/* NOA index */
61198c2ecf20Sopenharmony_ci	u8 index;
61208c2ecf20Sopenharmony_ci	/* Bit 0 - Opp PS state of the AP
61218c2ecf20Sopenharmony_ci	 * Bits 1-7 - Ctwindow in TUs
61228c2ecf20Sopenharmony_ci	 */
61238c2ecf20Sopenharmony_ci	u8 ctwindow_oppps;
61248c2ecf20Sopenharmony_ci	/* Number of NOA descriptors */
61258c2ecf20Sopenharmony_ci	u8 num_descriptors;
61268c2ecf20Sopenharmony_ci
61278c2ecf20Sopenharmony_ci	struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
61288c2ecf20Sopenharmony_ci} __packed;
61298c2ecf20Sopenharmony_ci
61308c2ecf20Sopenharmony_cistruct wmi_bcn_info {
61318c2ecf20Sopenharmony_ci	struct wmi_tim_info tim_info;
61328c2ecf20Sopenharmony_ci	struct wmi_p2p_noa_info p2p_noa_info;
61338c2ecf20Sopenharmony_ci} __packed;
61348c2ecf20Sopenharmony_ci
61358c2ecf20Sopenharmony_cistruct wmi_host_swba_event {
61368c2ecf20Sopenharmony_ci	__le32 vdev_map;
61378c2ecf20Sopenharmony_ci	struct wmi_bcn_info bcn_info[];
61388c2ecf20Sopenharmony_ci} __packed;
61398c2ecf20Sopenharmony_ci
61408c2ecf20Sopenharmony_cistruct wmi_10_2_4_bcn_info {
61418c2ecf20Sopenharmony_ci	struct wmi_tim_info tim_info;
61428c2ecf20Sopenharmony_ci	/* The 10.2.4 FW doesn't have p2p NOA info */
61438c2ecf20Sopenharmony_ci} __packed;
61448c2ecf20Sopenharmony_ci
61458c2ecf20Sopenharmony_cistruct wmi_10_2_4_host_swba_event {
61468c2ecf20Sopenharmony_ci	__le32 vdev_map;
61478c2ecf20Sopenharmony_ci	struct wmi_10_2_4_bcn_info bcn_info[];
61488c2ecf20Sopenharmony_ci} __packed;
61498c2ecf20Sopenharmony_ci
61508c2ecf20Sopenharmony_ci/* 16 words = 512 client + 1 word = for guard */
61518c2ecf20Sopenharmony_ci#define WMI_10_4_TIM_BITMAP_ARRAY_SIZE 17
61528c2ecf20Sopenharmony_ci
61538c2ecf20Sopenharmony_cistruct wmi_10_4_tim_info {
61548c2ecf20Sopenharmony_ci	__le32 tim_len;
61558c2ecf20Sopenharmony_ci	__le32 tim_mcast;
61568c2ecf20Sopenharmony_ci	__le32 tim_bitmap[WMI_10_4_TIM_BITMAP_ARRAY_SIZE];
61578c2ecf20Sopenharmony_ci	__le32 tim_changed;
61588c2ecf20Sopenharmony_ci	__le32 tim_num_ps_pending;
61598c2ecf20Sopenharmony_ci} __packed;
61608c2ecf20Sopenharmony_ci
61618c2ecf20Sopenharmony_ci#define WMI_10_4_P2P_MAX_NOA_DESCRIPTORS 1
61628c2ecf20Sopenharmony_ci
61638c2ecf20Sopenharmony_cistruct wmi_10_4_p2p_noa_info {
61648c2ecf20Sopenharmony_ci	/* Bit 0 - Flag to indicate an update in NOA schedule
61658c2ecf20Sopenharmony_ci	 * Bits 7-1 - Reserved
61668c2ecf20Sopenharmony_ci	 */
61678c2ecf20Sopenharmony_ci	u8 changed;
61688c2ecf20Sopenharmony_ci	/* NOA index */
61698c2ecf20Sopenharmony_ci	u8 index;
61708c2ecf20Sopenharmony_ci	/* Bit 0 - Opp PS state of the AP
61718c2ecf20Sopenharmony_ci	 * Bits 1-7 - Ctwindow in TUs
61728c2ecf20Sopenharmony_ci	 */
61738c2ecf20Sopenharmony_ci	u8 ctwindow_oppps;
61748c2ecf20Sopenharmony_ci	/* Number of NOA descriptors */
61758c2ecf20Sopenharmony_ci	u8 num_descriptors;
61768c2ecf20Sopenharmony_ci
61778c2ecf20Sopenharmony_ci	struct wmi_p2p_noa_descriptor
61788c2ecf20Sopenharmony_ci		noa_descriptors[WMI_10_4_P2P_MAX_NOA_DESCRIPTORS];
61798c2ecf20Sopenharmony_ci} __packed;
61808c2ecf20Sopenharmony_ci
61818c2ecf20Sopenharmony_cistruct wmi_10_4_bcn_info {
61828c2ecf20Sopenharmony_ci	struct wmi_10_4_tim_info tim_info;
61838c2ecf20Sopenharmony_ci	struct wmi_10_4_p2p_noa_info p2p_noa_info;
61848c2ecf20Sopenharmony_ci} __packed;
61858c2ecf20Sopenharmony_ci
61868c2ecf20Sopenharmony_cistruct wmi_10_4_host_swba_event {
61878c2ecf20Sopenharmony_ci	__le32 vdev_map;
61888c2ecf20Sopenharmony_ci	struct wmi_10_4_bcn_info bcn_info[];
61898c2ecf20Sopenharmony_ci} __packed;
61908c2ecf20Sopenharmony_ci
61918c2ecf20Sopenharmony_ci#define WMI_MAX_AP_VDEV 16
61928c2ecf20Sopenharmony_ci
61938c2ecf20Sopenharmony_cistruct wmi_tbtt_offset_event {
61948c2ecf20Sopenharmony_ci	__le32 vdev_map;
61958c2ecf20Sopenharmony_ci	__le32 tbttoffset_list[WMI_MAX_AP_VDEV];
61968c2ecf20Sopenharmony_ci} __packed;
61978c2ecf20Sopenharmony_ci
61988c2ecf20Sopenharmony_cistruct wmi_peer_create_cmd {
61998c2ecf20Sopenharmony_ci	__le32 vdev_id;
62008c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62018c2ecf20Sopenharmony_ci	__le32 peer_type;
62028c2ecf20Sopenharmony_ci} __packed;
62038c2ecf20Sopenharmony_ci
62048c2ecf20Sopenharmony_cienum wmi_peer_type {
62058c2ecf20Sopenharmony_ci	WMI_PEER_TYPE_DEFAULT = 0,
62068c2ecf20Sopenharmony_ci	WMI_PEER_TYPE_BSS = 1,
62078c2ecf20Sopenharmony_ci	WMI_PEER_TYPE_TDLS = 2,
62088c2ecf20Sopenharmony_ci};
62098c2ecf20Sopenharmony_ci
62108c2ecf20Sopenharmony_cistruct wmi_peer_delete_cmd {
62118c2ecf20Sopenharmony_ci	__le32 vdev_id;
62128c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62138c2ecf20Sopenharmony_ci} __packed;
62148c2ecf20Sopenharmony_ci
62158c2ecf20Sopenharmony_cistruct wmi_peer_flush_tids_cmd {
62168c2ecf20Sopenharmony_ci	__le32 vdev_id;
62178c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62188c2ecf20Sopenharmony_ci	__le32 peer_tid_bitmap;
62198c2ecf20Sopenharmony_ci} __packed;
62208c2ecf20Sopenharmony_ci
62218c2ecf20Sopenharmony_cistruct wmi_fixed_rate {
62228c2ecf20Sopenharmony_ci	/*
62238c2ecf20Sopenharmony_ci	 * rate mode . 0: disable fixed rate (auto rate)
62248c2ecf20Sopenharmony_ci	 *   1: legacy (non 11n) rate  specified as ieee rate 2*Mbps
62258c2ecf20Sopenharmony_ci	 *   2: ht20 11n rate  specified as mcs index
62268c2ecf20Sopenharmony_ci	 *   3: ht40 11n rate  specified as mcs index
62278c2ecf20Sopenharmony_ci	 */
62288c2ecf20Sopenharmony_ci	__le32  rate_mode;
62298c2ecf20Sopenharmony_ci	/*
62308c2ecf20Sopenharmony_ci	 * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
62318c2ecf20Sopenharmony_ci	 * and series 3 is stored at byte 3 (MSB)
62328c2ecf20Sopenharmony_ci	 */
62338c2ecf20Sopenharmony_ci	__le32  rate_series;
62348c2ecf20Sopenharmony_ci	/*
62358c2ecf20Sopenharmony_ci	 * 4 retry counts for 4 rate series. retry count for rate 0 is stored
62368c2ecf20Sopenharmony_ci	 * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
62378c2ecf20Sopenharmony_ci	 * (MSB)
62388c2ecf20Sopenharmony_ci	 */
62398c2ecf20Sopenharmony_ci	__le32  rate_retries;
62408c2ecf20Sopenharmony_ci} __packed;
62418c2ecf20Sopenharmony_ci
62428c2ecf20Sopenharmony_cistruct wmi_peer_fixed_rate_cmd {
62438c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
62448c2ecf20Sopenharmony_ci	__le32 vdev_id;
62458c2ecf20Sopenharmony_ci	/* peer MAC address */
62468c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62478c2ecf20Sopenharmony_ci	/* fixed rate */
62488c2ecf20Sopenharmony_ci	struct wmi_fixed_rate peer_fixed_rate;
62498c2ecf20Sopenharmony_ci} __packed;
62508c2ecf20Sopenharmony_ci
62518c2ecf20Sopenharmony_ci#define WMI_MGMT_TID    17
62528c2ecf20Sopenharmony_ci
62538c2ecf20Sopenharmony_cistruct wmi_addba_clear_resp_cmd {
62548c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
62558c2ecf20Sopenharmony_ci	__le32 vdev_id;
62568c2ecf20Sopenharmony_ci	/* peer MAC address */
62578c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62588c2ecf20Sopenharmony_ci} __packed;
62598c2ecf20Sopenharmony_ci
62608c2ecf20Sopenharmony_cistruct wmi_addba_send_cmd {
62618c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
62628c2ecf20Sopenharmony_ci	__le32 vdev_id;
62638c2ecf20Sopenharmony_ci	/* peer MAC address */
62648c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62658c2ecf20Sopenharmony_ci	/* Tid number */
62668c2ecf20Sopenharmony_ci	__le32 tid;
62678c2ecf20Sopenharmony_ci	/* Buffer/Window size*/
62688c2ecf20Sopenharmony_ci	__le32 buffersize;
62698c2ecf20Sopenharmony_ci} __packed;
62708c2ecf20Sopenharmony_ci
62718c2ecf20Sopenharmony_cistruct wmi_delba_send_cmd {
62728c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
62738c2ecf20Sopenharmony_ci	__le32 vdev_id;
62748c2ecf20Sopenharmony_ci	/* peer MAC address */
62758c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62768c2ecf20Sopenharmony_ci	/* Tid number */
62778c2ecf20Sopenharmony_ci	__le32 tid;
62788c2ecf20Sopenharmony_ci	/* Is Initiator */
62798c2ecf20Sopenharmony_ci	__le32 initiator;
62808c2ecf20Sopenharmony_ci	/* Reason code */
62818c2ecf20Sopenharmony_ci	__le32 reasoncode;
62828c2ecf20Sopenharmony_ci} __packed;
62838c2ecf20Sopenharmony_ci
62848c2ecf20Sopenharmony_cistruct wmi_addba_setresponse_cmd {
62858c2ecf20Sopenharmony_ci	/* unique id identifying the vdev, generated by the caller */
62868c2ecf20Sopenharmony_ci	__le32 vdev_id;
62878c2ecf20Sopenharmony_ci	/* peer mac address */
62888c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
62898c2ecf20Sopenharmony_ci	/* Tid number */
62908c2ecf20Sopenharmony_ci	__le32 tid;
62918c2ecf20Sopenharmony_ci	/* status code */
62928c2ecf20Sopenharmony_ci	__le32 statuscode;
62938c2ecf20Sopenharmony_ci} __packed;
62948c2ecf20Sopenharmony_ci
62958c2ecf20Sopenharmony_cistruct wmi_send_singleamsdu_cmd {
62968c2ecf20Sopenharmony_ci	/* unique id identifying the vdev, generated by the caller */
62978c2ecf20Sopenharmony_ci	__le32 vdev_id;
62988c2ecf20Sopenharmony_ci	/* peer mac address */
62998c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
63008c2ecf20Sopenharmony_ci	/* Tid number */
63018c2ecf20Sopenharmony_ci	__le32 tid;
63028c2ecf20Sopenharmony_ci} __packed;
63038c2ecf20Sopenharmony_ci
63048c2ecf20Sopenharmony_cienum wmi_peer_smps_state {
63058c2ecf20Sopenharmony_ci	WMI_PEER_SMPS_PS_NONE = 0x0,
63068c2ecf20Sopenharmony_ci	WMI_PEER_SMPS_STATIC  = 0x1,
63078c2ecf20Sopenharmony_ci	WMI_PEER_SMPS_DYNAMIC = 0x2
63088c2ecf20Sopenharmony_ci};
63098c2ecf20Sopenharmony_ci
63108c2ecf20Sopenharmony_cienum wmi_peer_chwidth {
63118c2ecf20Sopenharmony_ci	WMI_PEER_CHWIDTH_20MHZ = 0,
63128c2ecf20Sopenharmony_ci	WMI_PEER_CHWIDTH_40MHZ = 1,
63138c2ecf20Sopenharmony_ci	WMI_PEER_CHWIDTH_80MHZ = 2,
63148c2ecf20Sopenharmony_ci	WMI_PEER_CHWIDTH_160MHZ = 3,
63158c2ecf20Sopenharmony_ci};
63168c2ecf20Sopenharmony_ci
63178c2ecf20Sopenharmony_cienum wmi_peer_param {
63188c2ecf20Sopenharmony_ci	WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
63198c2ecf20Sopenharmony_ci	WMI_PEER_AMPDU      = 0x2,
63208c2ecf20Sopenharmony_ci	WMI_PEER_AUTHORIZE  = 0x3,
63218c2ecf20Sopenharmony_ci	WMI_PEER_CHAN_WIDTH = 0x4,
63228c2ecf20Sopenharmony_ci	WMI_PEER_NSS        = 0x5,
63238c2ecf20Sopenharmony_ci	WMI_PEER_USE_4ADDR  = 0x6,
63248c2ecf20Sopenharmony_ci	WMI_PEER_USE_FIXED_PWR = 0x8,
63258c2ecf20Sopenharmony_ci	WMI_PEER_PARAM_FIXED_RATE = 0x9,
63268c2ecf20Sopenharmony_ci	WMI_PEER_DEBUG      = 0xa,
63278c2ecf20Sopenharmony_ci	WMI_PEER_PHYMODE    = 0xd,
63288c2ecf20Sopenharmony_ci	WMI_PEER_DUMMY_VAR  = 0xff, /* dummy parameter for STA PS workaround */
63298c2ecf20Sopenharmony_ci};
63308c2ecf20Sopenharmony_ci
63318c2ecf20Sopenharmony_cistruct wmi_peer_set_param_cmd {
63328c2ecf20Sopenharmony_ci	__le32 vdev_id;
63338c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
63348c2ecf20Sopenharmony_ci	__le32 param_id;
63358c2ecf20Sopenharmony_ci	__le32 param_value;
63368c2ecf20Sopenharmony_ci} __packed;
63378c2ecf20Sopenharmony_ci
63388c2ecf20Sopenharmony_ci#define MAX_SUPPORTED_RATES 128
63398c2ecf20Sopenharmony_ci
63408c2ecf20Sopenharmony_cistruct wmi_rate_set {
63418c2ecf20Sopenharmony_ci	/* total number of rates */
63428c2ecf20Sopenharmony_ci	__le32 num_rates;
63438c2ecf20Sopenharmony_ci	/*
63448c2ecf20Sopenharmony_ci	 * rates (each 8bit value) packed into a 32 bit word.
63458c2ecf20Sopenharmony_ci	 * the rates are filled from least significant byte to most
63468c2ecf20Sopenharmony_ci	 * significant byte.
63478c2ecf20Sopenharmony_ci	 */
63488c2ecf20Sopenharmony_ci	__le32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
63498c2ecf20Sopenharmony_ci} __packed;
63508c2ecf20Sopenharmony_ci
63518c2ecf20Sopenharmony_cistruct wmi_rate_set_arg {
63528c2ecf20Sopenharmony_ci	unsigned int num_rates;
63538c2ecf20Sopenharmony_ci	u8 rates[MAX_SUPPORTED_RATES];
63548c2ecf20Sopenharmony_ci};
63558c2ecf20Sopenharmony_ci
63568c2ecf20Sopenharmony_ci/*
63578c2ecf20Sopenharmony_ci * NOTE: It would bea good idea to represent the Tx MCS
63588c2ecf20Sopenharmony_ci * info in one word and Rx in another word. This is split
63598c2ecf20Sopenharmony_ci * into multiple words for convenience
63608c2ecf20Sopenharmony_ci */
63618c2ecf20Sopenharmony_cistruct wmi_vht_rate_set {
63628c2ecf20Sopenharmony_ci	__le32 rx_max_rate; /* Max Rx data rate */
63638c2ecf20Sopenharmony_ci	__le32 rx_mcs_set;  /* Negotiated RX VHT rates */
63648c2ecf20Sopenharmony_ci	__le32 tx_max_rate; /* Max Tx data rate */
63658c2ecf20Sopenharmony_ci	__le32 tx_mcs_set;  /* Negotiated TX VHT rates */
63668c2ecf20Sopenharmony_ci} __packed;
63678c2ecf20Sopenharmony_ci
63688c2ecf20Sopenharmony_cistruct wmi_vht_rate_set_arg {
63698c2ecf20Sopenharmony_ci	u32 rx_max_rate;
63708c2ecf20Sopenharmony_ci	u32 rx_mcs_set;
63718c2ecf20Sopenharmony_ci	u32 tx_max_rate;
63728c2ecf20Sopenharmony_ci	u32 tx_mcs_set;
63738c2ecf20Sopenharmony_ci};
63748c2ecf20Sopenharmony_ci
63758c2ecf20Sopenharmony_cistruct wmi_peer_set_rates_cmd {
63768c2ecf20Sopenharmony_ci	/* peer MAC address */
63778c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
63788c2ecf20Sopenharmony_ci	/* legacy rate set */
63798c2ecf20Sopenharmony_ci	struct wmi_rate_set peer_legacy_rates;
63808c2ecf20Sopenharmony_ci	/* ht rate set */
63818c2ecf20Sopenharmony_ci	struct wmi_rate_set peer_ht_rates;
63828c2ecf20Sopenharmony_ci} __packed;
63838c2ecf20Sopenharmony_ci
63848c2ecf20Sopenharmony_cistruct wmi_peer_set_q_empty_callback_cmd {
63858c2ecf20Sopenharmony_ci	/* unique id identifying the VDEV, generated by the caller */
63868c2ecf20Sopenharmony_ci	__le32 vdev_id;
63878c2ecf20Sopenharmony_ci	/* peer MAC address */
63888c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
63898c2ecf20Sopenharmony_ci	__le32 callback_enable;
63908c2ecf20Sopenharmony_ci} __packed;
63918c2ecf20Sopenharmony_ci
63928c2ecf20Sopenharmony_cistruct wmi_peer_flags_map {
63938c2ecf20Sopenharmony_ci	u32 auth;
63948c2ecf20Sopenharmony_ci	u32 qos;
63958c2ecf20Sopenharmony_ci	u32 need_ptk_4_way;
63968c2ecf20Sopenharmony_ci	u32 need_gtk_2_way;
63978c2ecf20Sopenharmony_ci	u32 apsd;
63988c2ecf20Sopenharmony_ci	u32 ht;
63998c2ecf20Sopenharmony_ci	u32 bw40;
64008c2ecf20Sopenharmony_ci	u32 stbc;
64018c2ecf20Sopenharmony_ci	u32 ldbc;
64028c2ecf20Sopenharmony_ci	u32 dyn_mimops;
64038c2ecf20Sopenharmony_ci	u32 static_mimops;
64048c2ecf20Sopenharmony_ci	u32 spatial_mux;
64058c2ecf20Sopenharmony_ci	u32 vht;
64068c2ecf20Sopenharmony_ci	u32 bw80;
64078c2ecf20Sopenharmony_ci	u32 vht_2g;
64088c2ecf20Sopenharmony_ci	u32 pmf;
64098c2ecf20Sopenharmony_ci	u32 bw160;
64108c2ecf20Sopenharmony_ci};
64118c2ecf20Sopenharmony_ci
64128c2ecf20Sopenharmony_cienum wmi_peer_flags {
64138c2ecf20Sopenharmony_ci	WMI_PEER_AUTH = 0x00000001,
64148c2ecf20Sopenharmony_ci	WMI_PEER_QOS = 0x00000002,
64158c2ecf20Sopenharmony_ci	WMI_PEER_NEED_PTK_4_WAY = 0x00000004,
64168c2ecf20Sopenharmony_ci	WMI_PEER_NEED_GTK_2_WAY = 0x00000010,
64178c2ecf20Sopenharmony_ci	WMI_PEER_APSD = 0x00000800,
64188c2ecf20Sopenharmony_ci	WMI_PEER_HT = 0x00001000,
64198c2ecf20Sopenharmony_ci	WMI_PEER_40MHZ = 0x00002000,
64208c2ecf20Sopenharmony_ci	WMI_PEER_STBC = 0x00008000,
64218c2ecf20Sopenharmony_ci	WMI_PEER_LDPC = 0x00010000,
64228c2ecf20Sopenharmony_ci	WMI_PEER_DYN_MIMOPS = 0x00020000,
64238c2ecf20Sopenharmony_ci	WMI_PEER_STATIC_MIMOPS = 0x00040000,
64248c2ecf20Sopenharmony_ci	WMI_PEER_SPATIAL_MUX = 0x00200000,
64258c2ecf20Sopenharmony_ci	WMI_PEER_VHT = 0x02000000,
64268c2ecf20Sopenharmony_ci	WMI_PEER_80MHZ = 0x04000000,
64278c2ecf20Sopenharmony_ci	WMI_PEER_VHT_2G = 0x08000000,
64288c2ecf20Sopenharmony_ci	WMI_PEER_PMF = 0x10000000,
64298c2ecf20Sopenharmony_ci	WMI_PEER_160MHZ = 0x20000000
64308c2ecf20Sopenharmony_ci};
64318c2ecf20Sopenharmony_ci
64328c2ecf20Sopenharmony_cienum wmi_10x_peer_flags {
64338c2ecf20Sopenharmony_ci	WMI_10X_PEER_AUTH = 0x00000001,
64348c2ecf20Sopenharmony_ci	WMI_10X_PEER_QOS = 0x00000002,
64358c2ecf20Sopenharmony_ci	WMI_10X_PEER_NEED_PTK_4_WAY = 0x00000004,
64368c2ecf20Sopenharmony_ci	WMI_10X_PEER_NEED_GTK_2_WAY = 0x00000010,
64378c2ecf20Sopenharmony_ci	WMI_10X_PEER_APSD = 0x00000800,
64388c2ecf20Sopenharmony_ci	WMI_10X_PEER_HT = 0x00001000,
64398c2ecf20Sopenharmony_ci	WMI_10X_PEER_40MHZ = 0x00002000,
64408c2ecf20Sopenharmony_ci	WMI_10X_PEER_STBC = 0x00008000,
64418c2ecf20Sopenharmony_ci	WMI_10X_PEER_LDPC = 0x00010000,
64428c2ecf20Sopenharmony_ci	WMI_10X_PEER_DYN_MIMOPS = 0x00020000,
64438c2ecf20Sopenharmony_ci	WMI_10X_PEER_STATIC_MIMOPS = 0x00040000,
64448c2ecf20Sopenharmony_ci	WMI_10X_PEER_SPATIAL_MUX = 0x00200000,
64458c2ecf20Sopenharmony_ci	WMI_10X_PEER_VHT = 0x02000000,
64468c2ecf20Sopenharmony_ci	WMI_10X_PEER_80MHZ = 0x04000000,
64478c2ecf20Sopenharmony_ci	WMI_10X_PEER_160MHZ = 0x20000000
64488c2ecf20Sopenharmony_ci};
64498c2ecf20Sopenharmony_ci
64508c2ecf20Sopenharmony_cienum wmi_10_2_peer_flags {
64518c2ecf20Sopenharmony_ci	WMI_10_2_PEER_AUTH = 0x00000001,
64528c2ecf20Sopenharmony_ci	WMI_10_2_PEER_QOS = 0x00000002,
64538c2ecf20Sopenharmony_ci	WMI_10_2_PEER_NEED_PTK_4_WAY = 0x00000004,
64548c2ecf20Sopenharmony_ci	WMI_10_2_PEER_NEED_GTK_2_WAY = 0x00000010,
64558c2ecf20Sopenharmony_ci	WMI_10_2_PEER_APSD = 0x00000800,
64568c2ecf20Sopenharmony_ci	WMI_10_2_PEER_HT = 0x00001000,
64578c2ecf20Sopenharmony_ci	WMI_10_2_PEER_40MHZ = 0x00002000,
64588c2ecf20Sopenharmony_ci	WMI_10_2_PEER_STBC = 0x00008000,
64598c2ecf20Sopenharmony_ci	WMI_10_2_PEER_LDPC = 0x00010000,
64608c2ecf20Sopenharmony_ci	WMI_10_2_PEER_DYN_MIMOPS = 0x00020000,
64618c2ecf20Sopenharmony_ci	WMI_10_2_PEER_STATIC_MIMOPS = 0x00040000,
64628c2ecf20Sopenharmony_ci	WMI_10_2_PEER_SPATIAL_MUX = 0x00200000,
64638c2ecf20Sopenharmony_ci	WMI_10_2_PEER_VHT = 0x02000000,
64648c2ecf20Sopenharmony_ci	WMI_10_2_PEER_80MHZ = 0x04000000,
64658c2ecf20Sopenharmony_ci	WMI_10_2_PEER_VHT_2G = 0x08000000,
64668c2ecf20Sopenharmony_ci	WMI_10_2_PEER_PMF = 0x10000000,
64678c2ecf20Sopenharmony_ci	WMI_10_2_PEER_160MHZ = 0x20000000
64688c2ecf20Sopenharmony_ci};
64698c2ecf20Sopenharmony_ci
64708c2ecf20Sopenharmony_ci/*
64718c2ecf20Sopenharmony_ci * Peer rate capabilities.
64728c2ecf20Sopenharmony_ci *
64738c2ecf20Sopenharmony_ci * This is of interest to the ratecontrol
64748c2ecf20Sopenharmony_ci * module which resides in the firmware. The bit definitions are
64758c2ecf20Sopenharmony_ci * consistent with that defined in if_athrate.c.
64768c2ecf20Sopenharmony_ci */
64778c2ecf20Sopenharmony_ci#define WMI_RC_DS_FLAG          0x01
64788c2ecf20Sopenharmony_ci#define WMI_RC_CW40_FLAG        0x02
64798c2ecf20Sopenharmony_ci#define WMI_RC_SGI_FLAG         0x04
64808c2ecf20Sopenharmony_ci#define WMI_RC_HT_FLAG          0x08
64818c2ecf20Sopenharmony_ci#define WMI_RC_RTSCTS_FLAG      0x10
64828c2ecf20Sopenharmony_ci#define WMI_RC_TX_STBC_FLAG     0x20
64838c2ecf20Sopenharmony_ci#define WMI_RC_RX_STBC_FLAG     0xC0
64848c2ecf20Sopenharmony_ci#define WMI_RC_RX_STBC_FLAG_S   6
64858c2ecf20Sopenharmony_ci#define WMI_RC_WEP_TKIP_FLAG    0x100
64868c2ecf20Sopenharmony_ci#define WMI_RC_TS_FLAG          0x200
64878c2ecf20Sopenharmony_ci#define WMI_RC_UAPSD_FLAG       0x400
64888c2ecf20Sopenharmony_ci
64898c2ecf20Sopenharmony_ci/* Maximum listen interval supported by hw in units of beacon interval */
64908c2ecf20Sopenharmony_ci#define ATH10K_MAX_HW_LISTEN_INTERVAL 5
64918c2ecf20Sopenharmony_ci
64928c2ecf20Sopenharmony_cistruct wmi_common_peer_assoc_complete_cmd {
64938c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
64948c2ecf20Sopenharmony_ci	__le32 vdev_id;
64958c2ecf20Sopenharmony_ci	__le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
64968c2ecf20Sopenharmony_ci	__le32 peer_associd; /* 16 LSBs */
64978c2ecf20Sopenharmony_ci	__le32 peer_flags;
64988c2ecf20Sopenharmony_ci	__le32 peer_caps; /* 16 LSBs */
64998c2ecf20Sopenharmony_ci	__le32 peer_listen_intval;
65008c2ecf20Sopenharmony_ci	__le32 peer_ht_caps;
65018c2ecf20Sopenharmony_ci	__le32 peer_max_mpdu;
65028c2ecf20Sopenharmony_ci	__le32 peer_mpdu_density; /* 0..16 */
65038c2ecf20Sopenharmony_ci	__le32 peer_rate_caps;
65048c2ecf20Sopenharmony_ci	struct wmi_rate_set peer_legacy_rates;
65058c2ecf20Sopenharmony_ci	struct wmi_rate_set peer_ht_rates;
65068c2ecf20Sopenharmony_ci	__le32 peer_nss; /* num of spatial streams */
65078c2ecf20Sopenharmony_ci	__le32 peer_vht_caps;
65088c2ecf20Sopenharmony_ci	__le32 peer_phymode;
65098c2ecf20Sopenharmony_ci	struct wmi_vht_rate_set peer_vht_rates;
65108c2ecf20Sopenharmony_ci};
65118c2ecf20Sopenharmony_ci
65128c2ecf20Sopenharmony_cistruct wmi_main_peer_assoc_complete_cmd {
65138c2ecf20Sopenharmony_ci	struct wmi_common_peer_assoc_complete_cmd cmd;
65148c2ecf20Sopenharmony_ci
65158c2ecf20Sopenharmony_ci	/* HT Operation Element of the peer. Five bytes packed in 2
65168c2ecf20Sopenharmony_ci	 *  INT32 array and filled from lsb to msb.
65178c2ecf20Sopenharmony_ci	 */
65188c2ecf20Sopenharmony_ci	__le32 peer_ht_info[2];
65198c2ecf20Sopenharmony_ci} __packed;
65208c2ecf20Sopenharmony_ci
65218c2ecf20Sopenharmony_cistruct wmi_10_1_peer_assoc_complete_cmd {
65228c2ecf20Sopenharmony_ci	struct wmi_common_peer_assoc_complete_cmd cmd;
65238c2ecf20Sopenharmony_ci} __packed;
65248c2ecf20Sopenharmony_ci
65258c2ecf20Sopenharmony_ci#define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0
65268c2ecf20Sopenharmony_ci#define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f
65278c2ecf20Sopenharmony_ci#define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4
65288c2ecf20Sopenharmony_ci#define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0
65298c2ecf20Sopenharmony_ci
65308c2ecf20Sopenharmony_cistruct wmi_10_2_peer_assoc_complete_cmd {
65318c2ecf20Sopenharmony_ci	struct wmi_common_peer_assoc_complete_cmd cmd;
65328c2ecf20Sopenharmony_ci	__le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
65338c2ecf20Sopenharmony_ci} __packed;
65348c2ecf20Sopenharmony_ci
65358c2ecf20Sopenharmony_ci/* NSS Mapping to FW */
65368c2ecf20Sopenharmony_ci#define WMI_PEER_NSS_MAP_ENABLE	BIT(31)
65378c2ecf20Sopenharmony_ci#define WMI_PEER_NSS_160MHZ_MASK	GENMASK(2, 0)
65388c2ecf20Sopenharmony_ci#define WMI_PEER_NSS_80_80MHZ_MASK	GENMASK(5, 3)
65398c2ecf20Sopenharmony_ci
65408c2ecf20Sopenharmony_cistruct wmi_10_4_peer_assoc_complete_cmd {
65418c2ecf20Sopenharmony_ci	struct wmi_10_2_peer_assoc_complete_cmd cmd;
65428c2ecf20Sopenharmony_ci	__le32 peer_bw_rxnss_override;
65438c2ecf20Sopenharmony_ci} __packed;
65448c2ecf20Sopenharmony_ci
65458c2ecf20Sopenharmony_cistruct wmi_peer_assoc_complete_arg {
65468c2ecf20Sopenharmony_ci	u8 addr[ETH_ALEN];
65478c2ecf20Sopenharmony_ci	u32 vdev_id;
65488c2ecf20Sopenharmony_ci	bool peer_reassoc;
65498c2ecf20Sopenharmony_ci	u16 peer_aid;
65508c2ecf20Sopenharmony_ci	u32 peer_flags; /* see %WMI_PEER_ */
65518c2ecf20Sopenharmony_ci	u16 peer_caps;
65528c2ecf20Sopenharmony_ci	u32 peer_listen_intval;
65538c2ecf20Sopenharmony_ci	u32 peer_ht_caps;
65548c2ecf20Sopenharmony_ci	u32 peer_max_mpdu;
65558c2ecf20Sopenharmony_ci	u32 peer_mpdu_density; /* 0..16 */
65568c2ecf20Sopenharmony_ci	u32 peer_rate_caps; /* see %WMI_RC_ */
65578c2ecf20Sopenharmony_ci	struct wmi_rate_set_arg peer_legacy_rates;
65588c2ecf20Sopenharmony_ci	struct wmi_rate_set_arg peer_ht_rates;
65598c2ecf20Sopenharmony_ci	u32 peer_num_spatial_streams;
65608c2ecf20Sopenharmony_ci	u32 peer_vht_caps;
65618c2ecf20Sopenharmony_ci	enum wmi_phy_mode peer_phymode;
65628c2ecf20Sopenharmony_ci	struct wmi_vht_rate_set_arg peer_vht_rates;
65638c2ecf20Sopenharmony_ci	u32 peer_bw_rxnss_override;
65648c2ecf20Sopenharmony_ci};
65658c2ecf20Sopenharmony_ci
65668c2ecf20Sopenharmony_cistruct wmi_peer_add_wds_entry_cmd {
65678c2ecf20Sopenharmony_ci	/* peer MAC address */
65688c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
65698c2ecf20Sopenharmony_ci	/* wds MAC addr */
65708c2ecf20Sopenharmony_ci	struct wmi_mac_addr wds_macaddr;
65718c2ecf20Sopenharmony_ci} __packed;
65728c2ecf20Sopenharmony_ci
65738c2ecf20Sopenharmony_cistruct wmi_peer_remove_wds_entry_cmd {
65748c2ecf20Sopenharmony_ci	/* wds MAC addr */
65758c2ecf20Sopenharmony_ci	struct wmi_mac_addr wds_macaddr;
65768c2ecf20Sopenharmony_ci} __packed;
65778c2ecf20Sopenharmony_ci
65788c2ecf20Sopenharmony_cistruct wmi_peer_q_empty_callback_event {
65798c2ecf20Sopenharmony_ci	/* peer MAC address */
65808c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
65818c2ecf20Sopenharmony_ci} __packed;
65828c2ecf20Sopenharmony_ci
65838c2ecf20Sopenharmony_ci/*
65848c2ecf20Sopenharmony_ci * Channel info WMI event
65858c2ecf20Sopenharmony_ci */
65868c2ecf20Sopenharmony_cistruct wmi_chan_info_event {
65878c2ecf20Sopenharmony_ci	__le32 err_code;
65888c2ecf20Sopenharmony_ci	__le32 freq;
65898c2ecf20Sopenharmony_ci	__le32 cmd_flags;
65908c2ecf20Sopenharmony_ci	__le32 noise_floor;
65918c2ecf20Sopenharmony_ci	__le32 rx_clear_count;
65928c2ecf20Sopenharmony_ci	__le32 cycle_count;
65938c2ecf20Sopenharmony_ci} __packed;
65948c2ecf20Sopenharmony_ci
65958c2ecf20Sopenharmony_cistruct wmi_10_4_chan_info_event {
65968c2ecf20Sopenharmony_ci	__le32 err_code;
65978c2ecf20Sopenharmony_ci	__le32 freq;
65988c2ecf20Sopenharmony_ci	__le32 cmd_flags;
65998c2ecf20Sopenharmony_ci	__le32 noise_floor;
66008c2ecf20Sopenharmony_ci	__le32 rx_clear_count;
66018c2ecf20Sopenharmony_ci	__le32 cycle_count;
66028c2ecf20Sopenharmony_ci	__le32 chan_tx_pwr_range;
66038c2ecf20Sopenharmony_ci	__le32 chan_tx_pwr_tp;
66048c2ecf20Sopenharmony_ci	__le32 rx_frame_count;
66058c2ecf20Sopenharmony_ci} __packed;
66068c2ecf20Sopenharmony_ci
66078c2ecf20Sopenharmony_cistruct wmi_peer_sta_kickout_event {
66088c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
66098c2ecf20Sopenharmony_ci} __packed;
66108c2ecf20Sopenharmony_ci
66118c2ecf20Sopenharmony_ci#define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
66128c2ecf20Sopenharmony_ci#define WMI_CHAN_INFO_FLAG_PRE_COMPLETE BIT(1)
66138c2ecf20Sopenharmony_ci
66148c2ecf20Sopenharmony_ci/* Beacon filter wmi command info */
66158c2ecf20Sopenharmony_ci#define BCN_FLT_MAX_SUPPORTED_IES	256
66168c2ecf20Sopenharmony_ci#define BCN_FLT_MAX_ELEMS_IE_LIST	(BCN_FLT_MAX_SUPPORTED_IES / 32)
66178c2ecf20Sopenharmony_ci
66188c2ecf20Sopenharmony_cistruct bss_bcn_stats {
66198c2ecf20Sopenharmony_ci	__le32 vdev_id;
66208c2ecf20Sopenharmony_ci	__le32 bss_bcnsdropped;
66218c2ecf20Sopenharmony_ci	__le32 bss_bcnsdelivered;
66228c2ecf20Sopenharmony_ci} __packed;
66238c2ecf20Sopenharmony_ci
66248c2ecf20Sopenharmony_cistruct bcn_filter_stats {
66258c2ecf20Sopenharmony_ci	__le32 bcns_dropped;
66268c2ecf20Sopenharmony_ci	__le32 bcns_delivered;
66278c2ecf20Sopenharmony_ci	__le32 activefilters;
66288c2ecf20Sopenharmony_ci	struct bss_bcn_stats bss_stats;
66298c2ecf20Sopenharmony_ci} __packed;
66308c2ecf20Sopenharmony_ci
66318c2ecf20Sopenharmony_cistruct wmi_add_bcn_filter_cmd {
66328c2ecf20Sopenharmony_ci	u32 vdev_id;
66338c2ecf20Sopenharmony_ci	u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
66348c2ecf20Sopenharmony_ci} __packed;
66358c2ecf20Sopenharmony_ci
66368c2ecf20Sopenharmony_cienum wmi_sta_keepalive_method {
66378c2ecf20Sopenharmony_ci	WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
66388c2ecf20Sopenharmony_ci	WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
66398c2ecf20Sopenharmony_ci};
66408c2ecf20Sopenharmony_ci
66418c2ecf20Sopenharmony_ci#define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
66428c2ecf20Sopenharmony_ci
66438c2ecf20Sopenharmony_ci/* Firmware crashes if keepalive interval exceeds this limit */
66448c2ecf20Sopenharmony_ci#define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff
66458c2ecf20Sopenharmony_ci
66468c2ecf20Sopenharmony_ci/* note: ip4 addresses are in network byte order, i.e. big endian */
66478c2ecf20Sopenharmony_cistruct wmi_sta_keepalive_arp_resp {
66488c2ecf20Sopenharmony_ci	__be32 src_ip4_addr;
66498c2ecf20Sopenharmony_ci	__be32 dest_ip4_addr;
66508c2ecf20Sopenharmony_ci	struct wmi_mac_addr dest_mac_addr;
66518c2ecf20Sopenharmony_ci} __packed;
66528c2ecf20Sopenharmony_ci
66538c2ecf20Sopenharmony_cistruct wmi_sta_keepalive_cmd {
66548c2ecf20Sopenharmony_ci	__le32 vdev_id;
66558c2ecf20Sopenharmony_ci	__le32 enabled;
66568c2ecf20Sopenharmony_ci	__le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
66578c2ecf20Sopenharmony_ci	__le32 interval; /* in seconds */
66588c2ecf20Sopenharmony_ci	struct wmi_sta_keepalive_arp_resp arp_resp;
66598c2ecf20Sopenharmony_ci} __packed;
66608c2ecf20Sopenharmony_ci
66618c2ecf20Sopenharmony_cistruct wmi_sta_keepalive_arg {
66628c2ecf20Sopenharmony_ci	u32 vdev_id;
66638c2ecf20Sopenharmony_ci	u32 enabled;
66648c2ecf20Sopenharmony_ci	u32 method;
66658c2ecf20Sopenharmony_ci	u32 interval;
66668c2ecf20Sopenharmony_ci	__be32 src_ip4_addr;
66678c2ecf20Sopenharmony_ci	__be32 dest_ip4_addr;
66688c2ecf20Sopenharmony_ci	const u8 dest_mac_addr[ETH_ALEN];
66698c2ecf20Sopenharmony_ci};
66708c2ecf20Sopenharmony_ci
66718c2ecf20Sopenharmony_cienum wmi_force_fw_hang_type {
66728c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_ASSERT = 1,
66738c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_NO_DETECT,
66748c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_CTRL_EP_FULL,
66758c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_EMPTY_POINT,
66768c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_STACK_OVERFLOW,
66778c2ecf20Sopenharmony_ci	WMI_FORCE_FW_HANG_INFINITE_LOOP,
66788c2ecf20Sopenharmony_ci};
66798c2ecf20Sopenharmony_ci
66808c2ecf20Sopenharmony_ci#define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
66818c2ecf20Sopenharmony_ci
66828c2ecf20Sopenharmony_cistruct wmi_force_fw_hang_cmd {
66838c2ecf20Sopenharmony_ci	__le32 type;
66848c2ecf20Sopenharmony_ci	__le32 delay_ms;
66858c2ecf20Sopenharmony_ci} __packed;
66868c2ecf20Sopenharmony_ci
66878c2ecf20Sopenharmony_cienum wmi_pdev_reset_mode_type {
66888c2ecf20Sopenharmony_ci	WMI_RST_MODE_TX_FLUSH = 1,
66898c2ecf20Sopenharmony_ci	WMI_RST_MODE_WARM_RESET,
66908c2ecf20Sopenharmony_ci	WMI_RST_MODE_COLD_RESET,
66918c2ecf20Sopenharmony_ci	WMI_RST_MODE_WARM_RESET_RESTORE_CAL,
66928c2ecf20Sopenharmony_ci	WMI_RST_MODE_COLD_RESET_RESTORE_CAL,
66938c2ecf20Sopenharmony_ci	WMI_RST_MODE_MAX,
66948c2ecf20Sopenharmony_ci};
66958c2ecf20Sopenharmony_ci
66968c2ecf20Sopenharmony_cienum ath10k_dbglog_level {
66978c2ecf20Sopenharmony_ci	ATH10K_DBGLOG_LEVEL_VERBOSE = 0,
66988c2ecf20Sopenharmony_ci	ATH10K_DBGLOG_LEVEL_INFO = 1,
66998c2ecf20Sopenharmony_ci	ATH10K_DBGLOG_LEVEL_WARN = 2,
67008c2ecf20Sopenharmony_ci	ATH10K_DBGLOG_LEVEL_ERR = 3,
67018c2ecf20Sopenharmony_ci};
67028c2ecf20Sopenharmony_ci
67038c2ecf20Sopenharmony_ci/* VAP ids to enable dbglog */
67048c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_VAP_LOG_LSB		0
67058c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_VAP_LOG_MASK		0x0000ffff
67068c2ecf20Sopenharmony_ci
67078c2ecf20Sopenharmony_ci/* to enable dbglog in the firmware */
67088c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB	16
67098c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK	0x00010000
67108c2ecf20Sopenharmony_ci
67118c2ecf20Sopenharmony_ci/* timestamp resolution */
67128c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_RESOLUTION_LSB	17
67138c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_RESOLUTION_MASK	0x000E0000
67148c2ecf20Sopenharmony_ci
67158c2ecf20Sopenharmony_ci/* number of queued messages before sending them to the host */
67168c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB	20
67178c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK	0x0ff00000
67188c2ecf20Sopenharmony_ci
67198c2ecf20Sopenharmony_ci/*
67208c2ecf20Sopenharmony_ci * Log levels to enable. This defines the minimum level to enable, this is
67218c2ecf20Sopenharmony_ci * not a bitmask. See enum ath10k_dbglog_level for the values.
67228c2ecf20Sopenharmony_ci */
67238c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_LOG_LVL_LSB		28
67248c2ecf20Sopenharmony_ci#define ATH10K_DBGLOG_CFG_LOG_LVL_MASK		0x70000000
67258c2ecf20Sopenharmony_ci
67268c2ecf20Sopenharmony_ci/*
67278c2ecf20Sopenharmony_ci * Note: this is a cleaned up version of a struct firmware uses. For
67288c2ecf20Sopenharmony_ci * example, config_valid was hidden inside an array.
67298c2ecf20Sopenharmony_ci */
67308c2ecf20Sopenharmony_cistruct wmi_dbglog_cfg_cmd {
67318c2ecf20Sopenharmony_ci	/* bitmask to hold mod id config*/
67328c2ecf20Sopenharmony_ci	__le32 module_enable;
67338c2ecf20Sopenharmony_ci
67348c2ecf20Sopenharmony_ci	/* see ATH10K_DBGLOG_CFG_ */
67358c2ecf20Sopenharmony_ci	__le32 config_enable;
67368c2ecf20Sopenharmony_ci
67378c2ecf20Sopenharmony_ci	/* mask of module id bits to be changed */
67388c2ecf20Sopenharmony_ci	__le32 module_valid;
67398c2ecf20Sopenharmony_ci
67408c2ecf20Sopenharmony_ci	/* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
67418c2ecf20Sopenharmony_ci	__le32 config_valid;
67428c2ecf20Sopenharmony_ci} __packed;
67438c2ecf20Sopenharmony_ci
67448c2ecf20Sopenharmony_cistruct wmi_10_4_dbglog_cfg_cmd {
67458c2ecf20Sopenharmony_ci	/* bitmask to hold mod id config*/
67468c2ecf20Sopenharmony_ci	__le64 module_enable;
67478c2ecf20Sopenharmony_ci
67488c2ecf20Sopenharmony_ci	/* see ATH10K_DBGLOG_CFG_ */
67498c2ecf20Sopenharmony_ci	__le32 config_enable;
67508c2ecf20Sopenharmony_ci
67518c2ecf20Sopenharmony_ci	/* mask of module id bits to be changed */
67528c2ecf20Sopenharmony_ci	__le64 module_valid;
67538c2ecf20Sopenharmony_ci
67548c2ecf20Sopenharmony_ci	/* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
67558c2ecf20Sopenharmony_ci	__le32 config_valid;
67568c2ecf20Sopenharmony_ci} __packed;
67578c2ecf20Sopenharmony_ci
67588c2ecf20Sopenharmony_cienum wmi_roam_reason {
67598c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_BETTER_AP = 1,
67608c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_BEACON_MISS = 2,
67618c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_LOW_RSSI = 3,
67628c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4,
67638c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_HO_FAILED = 5,
67648c2ecf20Sopenharmony_ci
67658c2ecf20Sopenharmony_ci	/* keep last */
67668c2ecf20Sopenharmony_ci	WMI_ROAM_REASON_MAX,
67678c2ecf20Sopenharmony_ci};
67688c2ecf20Sopenharmony_ci
67698c2ecf20Sopenharmony_cistruct wmi_roam_ev {
67708c2ecf20Sopenharmony_ci	__le32 vdev_id;
67718c2ecf20Sopenharmony_ci	__le32 reason;
67728c2ecf20Sopenharmony_ci} __packed;
67738c2ecf20Sopenharmony_ci
67748c2ecf20Sopenharmony_ci#define ATH10K_FRAGMT_THRESHOLD_MIN	540
67758c2ecf20Sopenharmony_ci#define ATH10K_FRAGMT_THRESHOLD_MAX	2346
67768c2ecf20Sopenharmony_ci
67778c2ecf20Sopenharmony_ci#define WMI_MAX_EVENT 0x1000
67788c2ecf20Sopenharmony_ci/* Maximum number of pending TXed WMI packets */
67798c2ecf20Sopenharmony_ci#define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
67808c2ecf20Sopenharmony_ci
67818c2ecf20Sopenharmony_ci/* By default disable power save for IBSS */
67828c2ecf20Sopenharmony_ci#define ATH10K_DEFAULT_ATIM 0
67838c2ecf20Sopenharmony_ci
67848c2ecf20Sopenharmony_ci#define WMI_MAX_MEM_REQS 16
67858c2ecf20Sopenharmony_ci
67868c2ecf20Sopenharmony_cistruct wmi_scan_ev_arg {
67878c2ecf20Sopenharmony_ci	__le32 event_type; /* %WMI_SCAN_EVENT_ */
67888c2ecf20Sopenharmony_ci	__le32 reason; /* %WMI_SCAN_REASON_ */
67898c2ecf20Sopenharmony_ci	__le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
67908c2ecf20Sopenharmony_ci	__le32 scan_req_id;
67918c2ecf20Sopenharmony_ci	__le32 scan_id;
67928c2ecf20Sopenharmony_ci	__le32 vdev_id;
67938c2ecf20Sopenharmony_ci};
67948c2ecf20Sopenharmony_ci
67958c2ecf20Sopenharmony_cistruct mgmt_tx_compl_params {
67968c2ecf20Sopenharmony_ci	u32 desc_id;
67978c2ecf20Sopenharmony_ci	u32 status;
67988c2ecf20Sopenharmony_ci	u32 ppdu_id;
67998c2ecf20Sopenharmony_ci	int ack_rssi;
68008c2ecf20Sopenharmony_ci};
68018c2ecf20Sopenharmony_ci
68028c2ecf20Sopenharmony_cistruct wmi_tlv_mgmt_tx_compl_ev_arg {
68038c2ecf20Sopenharmony_ci	__le32 desc_id;
68048c2ecf20Sopenharmony_ci	__le32 status;
68058c2ecf20Sopenharmony_ci	__le32 pdev_id;
68068c2ecf20Sopenharmony_ci	__le32 ppdu_id;
68078c2ecf20Sopenharmony_ci	__le32 ack_rssi;
68088c2ecf20Sopenharmony_ci};
68098c2ecf20Sopenharmony_ci
68108c2ecf20Sopenharmony_cistruct wmi_tlv_mgmt_tx_bundle_compl_ev_arg {
68118c2ecf20Sopenharmony_ci	__le32 num_reports;
68128c2ecf20Sopenharmony_ci	const __le32 *desc_ids;
68138c2ecf20Sopenharmony_ci	const __le32 *status;
68148c2ecf20Sopenharmony_ci	const __le32 *ppdu_ids;
68158c2ecf20Sopenharmony_ci	const __le32 *ack_rssi;
68168c2ecf20Sopenharmony_ci};
68178c2ecf20Sopenharmony_ci
68188c2ecf20Sopenharmony_cistruct wmi_peer_delete_resp_ev_arg {
68198c2ecf20Sopenharmony_ci	__le32 vdev_id;
68208c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_addr;
68218c2ecf20Sopenharmony_ci};
68228c2ecf20Sopenharmony_ci
68238c2ecf20Sopenharmony_ci#define WMI_MGMT_RX_NUM_RSSI 4
68248c2ecf20Sopenharmony_cistruct wmi_mgmt_rx_ev_arg {
68258c2ecf20Sopenharmony_ci	__le32 channel;
68268c2ecf20Sopenharmony_ci	__le32 snr;
68278c2ecf20Sopenharmony_ci	__le32 rate;
68288c2ecf20Sopenharmony_ci	__le32 phy_mode;
68298c2ecf20Sopenharmony_ci	__le32 buf_len;
68308c2ecf20Sopenharmony_ci	__le32 status; /* %WMI_RX_STATUS_ */
68318c2ecf20Sopenharmony_ci	struct wmi_mgmt_rx_ext_info ext_info;
68328c2ecf20Sopenharmony_ci	__le32 rssi[WMI_MGMT_RX_NUM_RSSI];
68338c2ecf20Sopenharmony_ci};
68348c2ecf20Sopenharmony_ci
68358c2ecf20Sopenharmony_cistruct wmi_ch_info_ev_arg {
68368c2ecf20Sopenharmony_ci	__le32 err_code;
68378c2ecf20Sopenharmony_ci	__le32 freq;
68388c2ecf20Sopenharmony_ci	__le32 cmd_flags;
68398c2ecf20Sopenharmony_ci	__le32 noise_floor;
68408c2ecf20Sopenharmony_ci	__le32 rx_clear_count;
68418c2ecf20Sopenharmony_ci	__le32 cycle_count;
68428c2ecf20Sopenharmony_ci	__le32 chan_tx_pwr_range;
68438c2ecf20Sopenharmony_ci	__le32 chan_tx_pwr_tp;
68448c2ecf20Sopenharmony_ci	__le32 rx_frame_count;
68458c2ecf20Sopenharmony_ci	__le32 my_bss_rx_cycle_count;
68468c2ecf20Sopenharmony_ci	__le32 rx_11b_mode_data_duration;
68478c2ecf20Sopenharmony_ci	__le32 tx_frame_cnt;
68488c2ecf20Sopenharmony_ci	__le32 mac_clk_mhz;
68498c2ecf20Sopenharmony_ci};
68508c2ecf20Sopenharmony_ci
68518c2ecf20Sopenharmony_ci/* From 10.4 firmware, not sure all have the same values. */
68528c2ecf20Sopenharmony_cienum wmi_vdev_start_status {
68538c2ecf20Sopenharmony_ci	WMI_VDEV_START_OK = 0,
68548c2ecf20Sopenharmony_ci	WMI_VDEV_START_CHAN_INVALID,
68558c2ecf20Sopenharmony_ci};
68568c2ecf20Sopenharmony_ci
68578c2ecf20Sopenharmony_cistruct wmi_vdev_start_ev_arg {
68588c2ecf20Sopenharmony_ci	__le32 vdev_id;
68598c2ecf20Sopenharmony_ci	__le32 req_id;
68608c2ecf20Sopenharmony_ci	__le32 resp_type; /* %WMI_VDEV_RESP_ */
68618c2ecf20Sopenharmony_ci	__le32 status; /* See wmi_vdev_start_status enum above */
68628c2ecf20Sopenharmony_ci};
68638c2ecf20Sopenharmony_ci
68648c2ecf20Sopenharmony_cistruct wmi_peer_kick_ev_arg {
68658c2ecf20Sopenharmony_ci	const u8 *mac_addr;
68668c2ecf20Sopenharmony_ci};
68678c2ecf20Sopenharmony_ci
68688c2ecf20Sopenharmony_cistruct wmi_swba_ev_arg {
68698c2ecf20Sopenharmony_ci	__le32 vdev_map;
68708c2ecf20Sopenharmony_ci	struct wmi_tim_info_arg tim_info[WMI_MAX_AP_VDEV];
68718c2ecf20Sopenharmony_ci	const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV];
68728c2ecf20Sopenharmony_ci};
68738c2ecf20Sopenharmony_ci
68748c2ecf20Sopenharmony_cistruct wmi_phyerr_ev_arg {
68758c2ecf20Sopenharmony_ci	u32 tsf_timestamp;
68768c2ecf20Sopenharmony_ci	u16 freq1;
68778c2ecf20Sopenharmony_ci	u16 freq2;
68788c2ecf20Sopenharmony_ci	u8 rssi_combined;
68798c2ecf20Sopenharmony_ci	u8 chan_width_mhz;
68808c2ecf20Sopenharmony_ci	u8 phy_err_code;
68818c2ecf20Sopenharmony_ci	u16 nf_chains[4];
68828c2ecf20Sopenharmony_ci	u32 buf_len;
68838c2ecf20Sopenharmony_ci	const u8 *buf;
68848c2ecf20Sopenharmony_ci	u8 hdr_len;
68858c2ecf20Sopenharmony_ci};
68868c2ecf20Sopenharmony_ci
68878c2ecf20Sopenharmony_cistruct wmi_phyerr_hdr_arg {
68888c2ecf20Sopenharmony_ci	u32 num_phyerrs;
68898c2ecf20Sopenharmony_ci	u32 tsf_l32;
68908c2ecf20Sopenharmony_ci	u32 tsf_u32;
68918c2ecf20Sopenharmony_ci	u32 buf_len;
68928c2ecf20Sopenharmony_ci	const void *phyerrs;
68938c2ecf20Sopenharmony_ci};
68948c2ecf20Sopenharmony_ci
68958c2ecf20Sopenharmony_cistruct wmi_dfs_status_ev_arg {
68968c2ecf20Sopenharmony_ci	u32 status;
68978c2ecf20Sopenharmony_ci};
68988c2ecf20Sopenharmony_ci
68998c2ecf20Sopenharmony_cistruct wmi_svc_rdy_ev_arg {
69008c2ecf20Sopenharmony_ci	__le32 min_tx_power;
69018c2ecf20Sopenharmony_ci	__le32 max_tx_power;
69028c2ecf20Sopenharmony_ci	__le32 ht_cap;
69038c2ecf20Sopenharmony_ci	__le32 vht_cap;
69048c2ecf20Sopenharmony_ci	__le32 vht_supp_mcs;
69058c2ecf20Sopenharmony_ci	__le32 sw_ver0;
69068c2ecf20Sopenharmony_ci	__le32 sw_ver1;
69078c2ecf20Sopenharmony_ci	__le32 fw_build;
69088c2ecf20Sopenharmony_ci	__le32 phy_capab;
69098c2ecf20Sopenharmony_ci	__le32 num_rf_chains;
69108c2ecf20Sopenharmony_ci	__le32 eeprom_rd;
69118c2ecf20Sopenharmony_ci	__le32 num_mem_reqs;
69128c2ecf20Sopenharmony_ci	__le32 low_2ghz_chan;
69138c2ecf20Sopenharmony_ci	__le32 high_2ghz_chan;
69148c2ecf20Sopenharmony_ci	__le32 low_5ghz_chan;
69158c2ecf20Sopenharmony_ci	__le32 high_5ghz_chan;
69168c2ecf20Sopenharmony_ci	__le32 sys_cap_info;
69178c2ecf20Sopenharmony_ci	const __le32 *service_map;
69188c2ecf20Sopenharmony_ci	size_t service_map_len;
69198c2ecf20Sopenharmony_ci	const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
69208c2ecf20Sopenharmony_ci};
69218c2ecf20Sopenharmony_ci
69228c2ecf20Sopenharmony_cistruct wmi_svc_avail_ev_arg {
69238c2ecf20Sopenharmony_ci	bool service_map_ext_valid;
69248c2ecf20Sopenharmony_ci	__le32 service_map_ext_len;
69258c2ecf20Sopenharmony_ci	const __le32 *service_map_ext;
69268c2ecf20Sopenharmony_ci};
69278c2ecf20Sopenharmony_ci
69288c2ecf20Sopenharmony_cistruct wmi_rdy_ev_arg {
69298c2ecf20Sopenharmony_ci	__le32 sw_version;
69308c2ecf20Sopenharmony_ci	__le32 abi_version;
69318c2ecf20Sopenharmony_ci	__le32 status;
69328c2ecf20Sopenharmony_ci	const u8 *mac_addr;
69338c2ecf20Sopenharmony_ci};
69348c2ecf20Sopenharmony_ci
69358c2ecf20Sopenharmony_cistruct wmi_roam_ev_arg {
69368c2ecf20Sopenharmony_ci	__le32 vdev_id;
69378c2ecf20Sopenharmony_ci	__le32 reason;
69388c2ecf20Sopenharmony_ci	__le32 rssi;
69398c2ecf20Sopenharmony_ci};
69408c2ecf20Sopenharmony_ci
69418c2ecf20Sopenharmony_cistruct wmi_echo_ev_arg {
69428c2ecf20Sopenharmony_ci	__le32 value;
69438c2ecf20Sopenharmony_ci};
69448c2ecf20Sopenharmony_ci
69458c2ecf20Sopenharmony_cistruct wmi_pdev_temperature_event {
69468c2ecf20Sopenharmony_ci	/* temperature value in Celcius degree */
69478c2ecf20Sopenharmony_ci	__le32 temperature;
69488c2ecf20Sopenharmony_ci} __packed;
69498c2ecf20Sopenharmony_ci
69508c2ecf20Sopenharmony_cistruct wmi_pdev_bss_chan_info_event {
69518c2ecf20Sopenharmony_ci	__le32 freq;
69528c2ecf20Sopenharmony_ci	__le32 noise_floor;
69538c2ecf20Sopenharmony_ci	__le64 cycle_busy;
69548c2ecf20Sopenharmony_ci	__le64 cycle_total;
69558c2ecf20Sopenharmony_ci	__le64 cycle_tx;
69568c2ecf20Sopenharmony_ci	__le64 cycle_rx;
69578c2ecf20Sopenharmony_ci	__le64 cycle_rx_bss;
69588c2ecf20Sopenharmony_ci	__le32 reserved;
69598c2ecf20Sopenharmony_ci} __packed;
69608c2ecf20Sopenharmony_ci
69618c2ecf20Sopenharmony_ci/* WOW structures */
69628c2ecf20Sopenharmony_cienum wmi_wow_wakeup_event {
69638c2ecf20Sopenharmony_ci	WOW_BMISS_EVENT = 0,
69648c2ecf20Sopenharmony_ci	WOW_BETTER_AP_EVENT,
69658c2ecf20Sopenharmony_ci	WOW_DEAUTH_RECVD_EVENT,
69668c2ecf20Sopenharmony_ci	WOW_MAGIC_PKT_RECVD_EVENT,
69678c2ecf20Sopenharmony_ci	WOW_GTK_ERR_EVENT,
69688c2ecf20Sopenharmony_ci	WOW_FOURWAY_HSHAKE_EVENT,
69698c2ecf20Sopenharmony_ci	WOW_EAPOL_RECVD_EVENT,
69708c2ecf20Sopenharmony_ci	WOW_NLO_DETECTED_EVENT,
69718c2ecf20Sopenharmony_ci	WOW_DISASSOC_RECVD_EVENT,
69728c2ecf20Sopenharmony_ci	WOW_PATTERN_MATCH_EVENT,
69738c2ecf20Sopenharmony_ci	WOW_CSA_IE_EVENT,
69748c2ecf20Sopenharmony_ci	WOW_PROBE_REQ_WPS_IE_EVENT,
69758c2ecf20Sopenharmony_ci	WOW_AUTH_REQ_EVENT,
69768c2ecf20Sopenharmony_ci	WOW_ASSOC_REQ_EVENT,
69778c2ecf20Sopenharmony_ci	WOW_HTT_EVENT,
69788c2ecf20Sopenharmony_ci	WOW_RA_MATCH_EVENT,
69798c2ecf20Sopenharmony_ci	WOW_HOST_AUTO_SHUTDOWN_EVENT,
69808c2ecf20Sopenharmony_ci	WOW_IOAC_MAGIC_EVENT,
69818c2ecf20Sopenharmony_ci	WOW_IOAC_SHORT_EVENT,
69828c2ecf20Sopenharmony_ci	WOW_IOAC_EXTEND_EVENT,
69838c2ecf20Sopenharmony_ci	WOW_IOAC_TIMER_EVENT,
69848c2ecf20Sopenharmony_ci	WOW_DFS_PHYERR_RADAR_EVENT,
69858c2ecf20Sopenharmony_ci	WOW_BEACON_EVENT,
69868c2ecf20Sopenharmony_ci	WOW_CLIENT_KICKOUT_EVENT,
69878c2ecf20Sopenharmony_ci	WOW_EVENT_MAX,
69888c2ecf20Sopenharmony_ci};
69898c2ecf20Sopenharmony_ci
69908c2ecf20Sopenharmony_ci#define C2S(x) case x: return #x
69918c2ecf20Sopenharmony_ci
69928c2ecf20Sopenharmony_cistatic inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
69938c2ecf20Sopenharmony_ci{
69948c2ecf20Sopenharmony_ci	switch (ev) {
69958c2ecf20Sopenharmony_ci	C2S(WOW_BMISS_EVENT);
69968c2ecf20Sopenharmony_ci	C2S(WOW_BETTER_AP_EVENT);
69978c2ecf20Sopenharmony_ci	C2S(WOW_DEAUTH_RECVD_EVENT);
69988c2ecf20Sopenharmony_ci	C2S(WOW_MAGIC_PKT_RECVD_EVENT);
69998c2ecf20Sopenharmony_ci	C2S(WOW_GTK_ERR_EVENT);
70008c2ecf20Sopenharmony_ci	C2S(WOW_FOURWAY_HSHAKE_EVENT);
70018c2ecf20Sopenharmony_ci	C2S(WOW_EAPOL_RECVD_EVENT);
70028c2ecf20Sopenharmony_ci	C2S(WOW_NLO_DETECTED_EVENT);
70038c2ecf20Sopenharmony_ci	C2S(WOW_DISASSOC_RECVD_EVENT);
70048c2ecf20Sopenharmony_ci	C2S(WOW_PATTERN_MATCH_EVENT);
70058c2ecf20Sopenharmony_ci	C2S(WOW_CSA_IE_EVENT);
70068c2ecf20Sopenharmony_ci	C2S(WOW_PROBE_REQ_WPS_IE_EVENT);
70078c2ecf20Sopenharmony_ci	C2S(WOW_AUTH_REQ_EVENT);
70088c2ecf20Sopenharmony_ci	C2S(WOW_ASSOC_REQ_EVENT);
70098c2ecf20Sopenharmony_ci	C2S(WOW_HTT_EVENT);
70108c2ecf20Sopenharmony_ci	C2S(WOW_RA_MATCH_EVENT);
70118c2ecf20Sopenharmony_ci	C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT);
70128c2ecf20Sopenharmony_ci	C2S(WOW_IOAC_MAGIC_EVENT);
70138c2ecf20Sopenharmony_ci	C2S(WOW_IOAC_SHORT_EVENT);
70148c2ecf20Sopenharmony_ci	C2S(WOW_IOAC_EXTEND_EVENT);
70158c2ecf20Sopenharmony_ci	C2S(WOW_IOAC_TIMER_EVENT);
70168c2ecf20Sopenharmony_ci	C2S(WOW_DFS_PHYERR_RADAR_EVENT);
70178c2ecf20Sopenharmony_ci	C2S(WOW_BEACON_EVENT);
70188c2ecf20Sopenharmony_ci	C2S(WOW_CLIENT_KICKOUT_EVENT);
70198c2ecf20Sopenharmony_ci	C2S(WOW_EVENT_MAX);
70208c2ecf20Sopenharmony_ci	default:
70218c2ecf20Sopenharmony_ci		return NULL;
70228c2ecf20Sopenharmony_ci	}
70238c2ecf20Sopenharmony_ci}
70248c2ecf20Sopenharmony_ci
70258c2ecf20Sopenharmony_cienum wmi_wow_wake_reason {
70268c2ecf20Sopenharmony_ci	WOW_REASON_UNSPECIFIED = -1,
70278c2ecf20Sopenharmony_ci	WOW_REASON_NLOD = 0,
70288c2ecf20Sopenharmony_ci	WOW_REASON_AP_ASSOC_LOST,
70298c2ecf20Sopenharmony_ci	WOW_REASON_LOW_RSSI,
70308c2ecf20Sopenharmony_ci	WOW_REASON_DEAUTH_RECVD,
70318c2ecf20Sopenharmony_ci	WOW_REASON_DISASSOC_RECVD,
70328c2ecf20Sopenharmony_ci	WOW_REASON_GTK_HS_ERR,
70338c2ecf20Sopenharmony_ci	WOW_REASON_EAP_REQ,
70348c2ecf20Sopenharmony_ci	WOW_REASON_FOURWAY_HS_RECV,
70358c2ecf20Sopenharmony_ci	WOW_REASON_TIMER_INTR_RECV,
70368c2ecf20Sopenharmony_ci	WOW_REASON_PATTERN_MATCH_FOUND,
70378c2ecf20Sopenharmony_ci	WOW_REASON_RECV_MAGIC_PATTERN,
70388c2ecf20Sopenharmony_ci	WOW_REASON_P2P_DISC,
70398c2ecf20Sopenharmony_ci	WOW_REASON_WLAN_HB,
70408c2ecf20Sopenharmony_ci	WOW_REASON_CSA_EVENT,
70418c2ecf20Sopenharmony_ci	WOW_REASON_PROBE_REQ_WPS_IE_RECV,
70428c2ecf20Sopenharmony_ci	WOW_REASON_AUTH_REQ_RECV,
70438c2ecf20Sopenharmony_ci	WOW_REASON_ASSOC_REQ_RECV,
70448c2ecf20Sopenharmony_ci	WOW_REASON_HTT_EVENT,
70458c2ecf20Sopenharmony_ci	WOW_REASON_RA_MATCH,
70468c2ecf20Sopenharmony_ci	WOW_REASON_HOST_AUTO_SHUTDOWN,
70478c2ecf20Sopenharmony_ci	WOW_REASON_IOAC_MAGIC_EVENT,
70488c2ecf20Sopenharmony_ci	WOW_REASON_IOAC_SHORT_EVENT,
70498c2ecf20Sopenharmony_ci	WOW_REASON_IOAC_EXTEND_EVENT,
70508c2ecf20Sopenharmony_ci	WOW_REASON_IOAC_TIMER_EVENT,
70518c2ecf20Sopenharmony_ci	WOW_REASON_ROAM_HO,
70528c2ecf20Sopenharmony_ci	WOW_REASON_DFS_PHYERR_RADADR_EVENT,
70538c2ecf20Sopenharmony_ci	WOW_REASON_BEACON_RECV,
70548c2ecf20Sopenharmony_ci	WOW_REASON_CLIENT_KICKOUT_EVENT,
70558c2ecf20Sopenharmony_ci	WOW_REASON_DEBUG_TEST = 0xFF,
70568c2ecf20Sopenharmony_ci};
70578c2ecf20Sopenharmony_ci
70588c2ecf20Sopenharmony_cistatic inline const char *wow_reason(enum wmi_wow_wake_reason reason)
70598c2ecf20Sopenharmony_ci{
70608c2ecf20Sopenharmony_ci	switch (reason) {
70618c2ecf20Sopenharmony_ci	C2S(WOW_REASON_UNSPECIFIED);
70628c2ecf20Sopenharmony_ci	C2S(WOW_REASON_NLOD);
70638c2ecf20Sopenharmony_ci	C2S(WOW_REASON_AP_ASSOC_LOST);
70648c2ecf20Sopenharmony_ci	C2S(WOW_REASON_LOW_RSSI);
70658c2ecf20Sopenharmony_ci	C2S(WOW_REASON_DEAUTH_RECVD);
70668c2ecf20Sopenharmony_ci	C2S(WOW_REASON_DISASSOC_RECVD);
70678c2ecf20Sopenharmony_ci	C2S(WOW_REASON_GTK_HS_ERR);
70688c2ecf20Sopenharmony_ci	C2S(WOW_REASON_EAP_REQ);
70698c2ecf20Sopenharmony_ci	C2S(WOW_REASON_FOURWAY_HS_RECV);
70708c2ecf20Sopenharmony_ci	C2S(WOW_REASON_TIMER_INTR_RECV);
70718c2ecf20Sopenharmony_ci	C2S(WOW_REASON_PATTERN_MATCH_FOUND);
70728c2ecf20Sopenharmony_ci	C2S(WOW_REASON_RECV_MAGIC_PATTERN);
70738c2ecf20Sopenharmony_ci	C2S(WOW_REASON_P2P_DISC);
70748c2ecf20Sopenharmony_ci	C2S(WOW_REASON_WLAN_HB);
70758c2ecf20Sopenharmony_ci	C2S(WOW_REASON_CSA_EVENT);
70768c2ecf20Sopenharmony_ci	C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV);
70778c2ecf20Sopenharmony_ci	C2S(WOW_REASON_AUTH_REQ_RECV);
70788c2ecf20Sopenharmony_ci	C2S(WOW_REASON_ASSOC_REQ_RECV);
70798c2ecf20Sopenharmony_ci	C2S(WOW_REASON_HTT_EVENT);
70808c2ecf20Sopenharmony_ci	C2S(WOW_REASON_RA_MATCH);
70818c2ecf20Sopenharmony_ci	C2S(WOW_REASON_HOST_AUTO_SHUTDOWN);
70828c2ecf20Sopenharmony_ci	C2S(WOW_REASON_IOAC_MAGIC_EVENT);
70838c2ecf20Sopenharmony_ci	C2S(WOW_REASON_IOAC_SHORT_EVENT);
70848c2ecf20Sopenharmony_ci	C2S(WOW_REASON_IOAC_EXTEND_EVENT);
70858c2ecf20Sopenharmony_ci	C2S(WOW_REASON_IOAC_TIMER_EVENT);
70868c2ecf20Sopenharmony_ci	C2S(WOW_REASON_ROAM_HO);
70878c2ecf20Sopenharmony_ci	C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT);
70888c2ecf20Sopenharmony_ci	C2S(WOW_REASON_BEACON_RECV);
70898c2ecf20Sopenharmony_ci	C2S(WOW_REASON_CLIENT_KICKOUT_EVENT);
70908c2ecf20Sopenharmony_ci	C2S(WOW_REASON_DEBUG_TEST);
70918c2ecf20Sopenharmony_ci	default:
70928c2ecf20Sopenharmony_ci		return NULL;
70938c2ecf20Sopenharmony_ci	}
70948c2ecf20Sopenharmony_ci}
70958c2ecf20Sopenharmony_ci
70968c2ecf20Sopenharmony_ci#undef C2S
70978c2ecf20Sopenharmony_ci
70988c2ecf20Sopenharmony_cistruct wmi_wow_ev_arg {
70998c2ecf20Sopenharmony_ci	u32 vdev_id;
71008c2ecf20Sopenharmony_ci	u32 flag;
71018c2ecf20Sopenharmony_ci	enum wmi_wow_wake_reason wake_reason;
71028c2ecf20Sopenharmony_ci	u32 data_len;
71038c2ecf20Sopenharmony_ci};
71048c2ecf20Sopenharmony_ci
71058c2ecf20Sopenharmony_ci#define WOW_MIN_PATTERN_SIZE	1
71068c2ecf20Sopenharmony_ci#define WOW_MAX_PATTERN_SIZE	148
71078c2ecf20Sopenharmony_ci#define WOW_MAX_PKT_OFFSET	128
71088c2ecf20Sopenharmony_ci#define WOW_HDR_LEN	(sizeof(struct ieee80211_hdr_3addr) + \
71098c2ecf20Sopenharmony_ci	sizeof(struct rfc1042_hdr))
71108c2ecf20Sopenharmony_ci#define WOW_MAX_REDUCE	(WOW_HDR_LEN - sizeof(struct ethhdr) - \
71118c2ecf20Sopenharmony_ci	offsetof(struct ieee80211_hdr_3addr, addr1))
71128c2ecf20Sopenharmony_ci
71138c2ecf20Sopenharmony_cienum wmi_tdls_state {
71148c2ecf20Sopenharmony_ci	WMI_TDLS_DISABLE,
71158c2ecf20Sopenharmony_ci	WMI_TDLS_ENABLE_PASSIVE,
71168c2ecf20Sopenharmony_ci	WMI_TDLS_ENABLE_ACTIVE,
71178c2ecf20Sopenharmony_ci	WMI_TDLS_ENABLE_ACTIVE_EXTERNAL_CONTROL,
71188c2ecf20Sopenharmony_ci};
71198c2ecf20Sopenharmony_ci
71208c2ecf20Sopenharmony_cienum wmi_tdls_peer_state {
71218c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_STATE_PEERING,
71228c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_STATE_CONNECTED,
71238c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_STATE_TEARDOWN,
71248c2ecf20Sopenharmony_ci};
71258c2ecf20Sopenharmony_ci
71268c2ecf20Sopenharmony_cistruct wmi_tdls_peer_update_cmd_arg {
71278c2ecf20Sopenharmony_ci	u32 vdev_id;
71288c2ecf20Sopenharmony_ci	enum wmi_tdls_peer_state peer_state;
71298c2ecf20Sopenharmony_ci	u8 addr[ETH_ALEN];
71308c2ecf20Sopenharmony_ci};
71318c2ecf20Sopenharmony_ci
71328c2ecf20Sopenharmony_ci#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
71338c2ecf20Sopenharmony_ci
71348c2ecf20Sopenharmony_ci#define WMI_TDLS_PEER_SP_MASK	0x60
71358c2ecf20Sopenharmony_ci#define WMI_TDLS_PEER_SP_LSB	5
71368c2ecf20Sopenharmony_ci
71378c2ecf20Sopenharmony_cienum wmi_tdls_options {
71388c2ecf20Sopenharmony_ci	WMI_TDLS_OFFCHAN_EN = BIT(0),
71398c2ecf20Sopenharmony_ci	WMI_TDLS_BUFFER_STA_EN = BIT(1),
71408c2ecf20Sopenharmony_ci	WMI_TDLS_SLEEP_STA_EN = BIT(2),
71418c2ecf20Sopenharmony_ci};
71428c2ecf20Sopenharmony_ci
71438c2ecf20Sopenharmony_cienum {
71448c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_QOS_AC_VO = BIT(0),
71458c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_QOS_AC_VI = BIT(1),
71468c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_QOS_AC_BK = BIT(2),
71478c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_QOS_AC_BE = BIT(3),
71488c2ecf20Sopenharmony_ci};
71498c2ecf20Sopenharmony_ci
71508c2ecf20Sopenharmony_cistruct wmi_tdls_peer_capab_arg {
71518c2ecf20Sopenharmony_ci	u8 peer_uapsd_queues;
71528c2ecf20Sopenharmony_ci	u8 peer_max_sp;
71538c2ecf20Sopenharmony_ci	u32 buff_sta_support;
71548c2ecf20Sopenharmony_ci	u32 off_chan_support;
71558c2ecf20Sopenharmony_ci	u32 peer_curr_operclass;
71568c2ecf20Sopenharmony_ci	u32 self_curr_operclass;
71578c2ecf20Sopenharmony_ci	u32 peer_chan_len;
71588c2ecf20Sopenharmony_ci	u32 peer_operclass_len;
71598c2ecf20Sopenharmony_ci	u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
71608c2ecf20Sopenharmony_ci	u32 is_peer_responder;
71618c2ecf20Sopenharmony_ci	u32 pref_offchan_num;
71628c2ecf20Sopenharmony_ci	u32 pref_offchan_bw;
71638c2ecf20Sopenharmony_ci};
71648c2ecf20Sopenharmony_ci
71658c2ecf20Sopenharmony_cistruct wmi_10_4_tdls_set_state_cmd {
71668c2ecf20Sopenharmony_ci	__le32 vdev_id;
71678c2ecf20Sopenharmony_ci	__le32 state;
71688c2ecf20Sopenharmony_ci	__le32 notification_interval_ms;
71698c2ecf20Sopenharmony_ci	__le32 tx_discovery_threshold;
71708c2ecf20Sopenharmony_ci	__le32 tx_teardown_threshold;
71718c2ecf20Sopenharmony_ci	__le32 rssi_teardown_threshold;
71728c2ecf20Sopenharmony_ci	__le32 rssi_delta;
71738c2ecf20Sopenharmony_ci	__le32 tdls_options;
71748c2ecf20Sopenharmony_ci	__le32 tdls_peer_traffic_ind_window;
71758c2ecf20Sopenharmony_ci	__le32 tdls_peer_traffic_response_timeout_ms;
71768c2ecf20Sopenharmony_ci	__le32 tdls_puapsd_mask;
71778c2ecf20Sopenharmony_ci	__le32 tdls_puapsd_inactivity_time_ms;
71788c2ecf20Sopenharmony_ci	__le32 tdls_puapsd_rx_frame_threshold;
71798c2ecf20Sopenharmony_ci	__le32 teardown_notification_ms;
71808c2ecf20Sopenharmony_ci	__le32 tdls_peer_kickout_threshold;
71818c2ecf20Sopenharmony_ci} __packed;
71828c2ecf20Sopenharmony_ci
71838c2ecf20Sopenharmony_cistruct wmi_tdls_peer_capabilities {
71848c2ecf20Sopenharmony_ci	__le32 peer_qos;
71858c2ecf20Sopenharmony_ci	__le32 buff_sta_support;
71868c2ecf20Sopenharmony_ci	__le32 off_chan_support;
71878c2ecf20Sopenharmony_ci	__le32 peer_curr_operclass;
71888c2ecf20Sopenharmony_ci	__le32 self_curr_operclass;
71898c2ecf20Sopenharmony_ci	__le32 peer_chan_len;
71908c2ecf20Sopenharmony_ci	__le32 peer_operclass_len;
71918c2ecf20Sopenharmony_ci	u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
71928c2ecf20Sopenharmony_ci	__le32 is_peer_responder;
71938c2ecf20Sopenharmony_ci	__le32 pref_offchan_num;
71948c2ecf20Sopenharmony_ci	__le32 pref_offchan_bw;
71958c2ecf20Sopenharmony_ci	struct wmi_channel peer_chan_list[1];
71968c2ecf20Sopenharmony_ci} __packed;
71978c2ecf20Sopenharmony_ci
71988c2ecf20Sopenharmony_cistruct wmi_10_4_tdls_peer_update_cmd {
71998c2ecf20Sopenharmony_ci	__le32 vdev_id;
72008c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
72018c2ecf20Sopenharmony_ci	__le32 peer_state;
72028c2ecf20Sopenharmony_ci	__le32 reserved[4];
72038c2ecf20Sopenharmony_ci	struct wmi_tdls_peer_capabilities peer_capab;
72048c2ecf20Sopenharmony_ci} __packed;
72058c2ecf20Sopenharmony_ci
72068c2ecf20Sopenharmony_cienum wmi_tdls_peer_reason {
72078c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_TX,
72088c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_RSSI,
72098c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_SCAN,
72108c2ecf20Sopenharmony_ci	WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
72118c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_PTR_TIMEOUT,
72128c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_BAD_PTR,
72138c2ecf20Sopenharmony_ci	WMI_TDLS_TEARDOWN_REASON_NO_RESPONSE,
72148c2ecf20Sopenharmony_ci	WMI_TDLS_ENTER_BUF_STA,
72158c2ecf20Sopenharmony_ci	WMI_TDLS_EXIT_BUF_STA,
72168c2ecf20Sopenharmony_ci	WMI_TDLS_ENTER_BT_BUSY_MODE,
72178c2ecf20Sopenharmony_ci	WMI_TDLS_EXIT_BT_BUSY_MODE,
72188c2ecf20Sopenharmony_ci	WMI_TDLS_SCAN_STARTED_EVENT,
72198c2ecf20Sopenharmony_ci	WMI_TDLS_SCAN_COMPLETED_EVENT,
72208c2ecf20Sopenharmony_ci};
72218c2ecf20Sopenharmony_ci
72228c2ecf20Sopenharmony_cienum wmi_tdls_peer_notification {
72238c2ecf20Sopenharmony_ci	WMI_TDLS_SHOULD_DISCOVER,
72248c2ecf20Sopenharmony_ci	WMI_TDLS_SHOULD_TEARDOWN,
72258c2ecf20Sopenharmony_ci	WMI_TDLS_PEER_DISCONNECTED,
72268c2ecf20Sopenharmony_ci	WMI_TDLS_CONNECTION_TRACKER_NOTIFICATION,
72278c2ecf20Sopenharmony_ci};
72288c2ecf20Sopenharmony_ci
72298c2ecf20Sopenharmony_cistruct wmi_tdls_peer_event {
72308c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
72318c2ecf20Sopenharmony_ci	/* see enum wmi_tdls_peer_notification*/
72328c2ecf20Sopenharmony_ci	__le32 peer_status;
72338c2ecf20Sopenharmony_ci	/* see enum wmi_tdls_peer_reason */
72348c2ecf20Sopenharmony_ci	__le32 peer_reason;
72358c2ecf20Sopenharmony_ci	__le32 vdev_id;
72368c2ecf20Sopenharmony_ci} __packed;
72378c2ecf20Sopenharmony_ci
72388c2ecf20Sopenharmony_cienum wmi_tid_aggr_control_conf {
72398c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_AGGR_CONTROL_IGNORE,
72408c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_AGGR_CONTROL_ENABLE,
72418c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_AGGR_CONTROL_DISABLE,
72428c2ecf20Sopenharmony_ci};
72438c2ecf20Sopenharmony_ci
72448c2ecf20Sopenharmony_cienum wmi_noack_tid_conf {
72458c2ecf20Sopenharmony_ci	WMI_NOACK_TID_CONFIG_IGNORE_ACK_POLICY,
72468c2ecf20Sopenharmony_ci	WMI_PEER_TID_CONFIG_ACK,
72478c2ecf20Sopenharmony_ci	WMI_PEER_TID_CONFIG_NOACK,
72488c2ecf20Sopenharmony_ci};
72498c2ecf20Sopenharmony_ci
72508c2ecf20Sopenharmony_cienum wmi_tid_rate_ctrl_conf {
72518c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RATE_CONTROL_IGNORE,
72528c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RATE_CONTROL_AUTO,
72538c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RATE_CONTROL_FIXED_RATE,
72548c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE,
72558c2ecf20Sopenharmony_ci	WMI_PEER_TID_CONFIG_RATE_UPPER_CAP,
72568c2ecf20Sopenharmony_ci};
72578c2ecf20Sopenharmony_ci
72588c2ecf20Sopenharmony_cienum wmi_tid_rtscts_control_conf {
72598c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RTSCTS_CONTROL_ENABLE,
72608c2ecf20Sopenharmony_ci	WMI_TID_CONFIG_RTSCTS_CONTROL_DISABLE,
72618c2ecf20Sopenharmony_ci};
72628c2ecf20Sopenharmony_ci
72638c2ecf20Sopenharmony_cienum wmi_ext_tid_config_map {
72648c2ecf20Sopenharmony_ci	WMI_EXT_TID_RTS_CTS_CONFIG = BIT(0),
72658c2ecf20Sopenharmony_ci};
72668c2ecf20Sopenharmony_ci
72678c2ecf20Sopenharmony_cistruct wmi_per_peer_per_tid_cfg_arg {
72688c2ecf20Sopenharmony_ci	u32 vdev_id;
72698c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
72708c2ecf20Sopenharmony_ci	u32 tid;
72718c2ecf20Sopenharmony_ci	enum wmi_noack_tid_conf ack_policy;
72728c2ecf20Sopenharmony_ci	enum wmi_tid_aggr_control_conf aggr_control;
72738c2ecf20Sopenharmony_ci	u8 rate_ctrl;
72748c2ecf20Sopenharmony_ci	u32 retry_count;
72758c2ecf20Sopenharmony_ci	u32 rcode_flags;
72768c2ecf20Sopenharmony_ci	u32 ext_tid_cfg_bitmap;
72778c2ecf20Sopenharmony_ci	u32 rtscts_ctrl;
72788c2ecf20Sopenharmony_ci};
72798c2ecf20Sopenharmony_ci
72808c2ecf20Sopenharmony_cistruct wmi_peer_per_tid_cfg_cmd {
72818c2ecf20Sopenharmony_ci	__le32 vdev_id;
72828c2ecf20Sopenharmony_ci	struct wmi_mac_addr peer_macaddr;
72838c2ecf20Sopenharmony_ci	__le32 tid;
72848c2ecf20Sopenharmony_ci
72858c2ecf20Sopenharmony_ci	/* see enum wmi_noack_tid_conf */
72868c2ecf20Sopenharmony_ci	__le32 ack_policy;
72878c2ecf20Sopenharmony_ci
72888c2ecf20Sopenharmony_ci	/* see enum wmi_tid_aggr_control_conf */
72898c2ecf20Sopenharmony_ci	__le32 aggr_control;
72908c2ecf20Sopenharmony_ci
72918c2ecf20Sopenharmony_ci	/* see enum wmi_tid_rate_ctrl_conf */
72928c2ecf20Sopenharmony_ci	__le32 rate_control;
72938c2ecf20Sopenharmony_ci	__le32 rcode_flags;
72948c2ecf20Sopenharmony_ci	__le32 retry_count;
72958c2ecf20Sopenharmony_ci
72968c2ecf20Sopenharmony_ci	/* See enum wmi_ext_tid_config_map */
72978c2ecf20Sopenharmony_ci	__le32 ext_tid_cfg_bitmap;
72988c2ecf20Sopenharmony_ci
72998c2ecf20Sopenharmony_ci	/* see enum wmi_tid_rtscts_control_conf */
73008c2ecf20Sopenharmony_ci	__le32 rtscts_ctrl;
73018c2ecf20Sopenharmony_ci} __packed;
73028c2ecf20Sopenharmony_ci
73038c2ecf20Sopenharmony_cienum wmi_txbf_conf {
73048c2ecf20Sopenharmony_ci	WMI_TXBF_CONF_UNSUPPORTED,
73058c2ecf20Sopenharmony_ci	WMI_TXBF_CONF_BEFORE_ASSOC,
73068c2ecf20Sopenharmony_ci	WMI_TXBF_CONF_AFTER_ASSOC,
73078c2ecf20Sopenharmony_ci};
73088c2ecf20Sopenharmony_ci
73098c2ecf20Sopenharmony_ci#define	WMI_CCA_DETECT_LEVEL_AUTO	0
73108c2ecf20Sopenharmony_ci#define	WMI_CCA_DETECT_MARGIN_AUTO	0
73118c2ecf20Sopenharmony_ci
73128c2ecf20Sopenharmony_cistruct wmi_pdev_set_adaptive_cca_params {
73138c2ecf20Sopenharmony_ci	__le32 enable;
73148c2ecf20Sopenharmony_ci	__le32 cca_detect_level;
73158c2ecf20Sopenharmony_ci	__le32 cca_detect_margin;
73168c2ecf20Sopenharmony_ci} __packed;
73178c2ecf20Sopenharmony_ci
73188c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_SCHED_SCAN_PLANS      2
73198c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_SCHED_SCAN_PLAN_INT   7200
73208c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_SCHED_SCAN_PLAN_ITRNS 100
73218c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_NETW_CHANNELS         26
73228c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_NETW_CHANNELS_EX      60
73238c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_SUPP_NETWORKS         WLAN_SCAN_PARAMS_MAX_SSID
73248c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_IE_LENGTH             WLAN_SCAN_PARAMS_MAX_IE_LEN
73258c2ecf20Sopenharmony_ci
73268c2ecf20Sopenharmony_ci/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
73278c2ecf20Sopenharmony_ci#define WMI_PNO_MAX_PB_REQ_SIZE    450
73288c2ecf20Sopenharmony_ci
73298c2ecf20Sopenharmony_ci#define WMI_PNO_24G_DEFAULT_CH     1
73308c2ecf20Sopenharmony_ci#define WMI_PNO_5G_DEFAULT_CH      36
73318c2ecf20Sopenharmony_ci
73328c2ecf20Sopenharmony_ci#define WMI_ACTIVE_MAX_CHANNEL_TIME 40
73338c2ecf20Sopenharmony_ci#define WMI_PASSIVE_MAX_CHANNEL_TIME   110
73348c2ecf20Sopenharmony_ci
73358c2ecf20Sopenharmony_ci/* SSID broadcast type */
73368c2ecf20Sopenharmony_cienum wmi_SSID_bcast_type {
73378c2ecf20Sopenharmony_ci	BCAST_UNKNOWN      = 0,
73388c2ecf20Sopenharmony_ci	BCAST_NORMAL       = 1,
73398c2ecf20Sopenharmony_ci	BCAST_HIDDEN       = 2,
73408c2ecf20Sopenharmony_ci};
73418c2ecf20Sopenharmony_ci
73428c2ecf20Sopenharmony_cistruct wmi_network_type {
73438c2ecf20Sopenharmony_ci	struct wmi_ssid ssid;
73448c2ecf20Sopenharmony_ci	u32 authentication;
73458c2ecf20Sopenharmony_ci	u32 encryption;
73468c2ecf20Sopenharmony_ci	u32 bcast_nw_type;
73478c2ecf20Sopenharmony_ci	u8 channel_count;
73488c2ecf20Sopenharmony_ci	u16 channels[WMI_PNO_MAX_NETW_CHANNELS_EX];
73498c2ecf20Sopenharmony_ci	s32 rssi_threshold;
73508c2ecf20Sopenharmony_ci} __packed;
73518c2ecf20Sopenharmony_ci
73528c2ecf20Sopenharmony_cistruct wmi_pno_scan_req {
73538c2ecf20Sopenharmony_ci	u8 enable;
73548c2ecf20Sopenharmony_ci	u8 vdev_id;
73558c2ecf20Sopenharmony_ci	u8 uc_networks_count;
73568c2ecf20Sopenharmony_ci	struct wmi_network_type a_networks[WMI_PNO_MAX_SUPP_NETWORKS];
73578c2ecf20Sopenharmony_ci	u32 fast_scan_period;
73588c2ecf20Sopenharmony_ci	u32 slow_scan_period;
73598c2ecf20Sopenharmony_ci	u8 fast_scan_max_cycles;
73608c2ecf20Sopenharmony_ci
73618c2ecf20Sopenharmony_ci	bool do_passive_scan;
73628c2ecf20Sopenharmony_ci
73638c2ecf20Sopenharmony_ci	u32 delay_start_time;
73648c2ecf20Sopenharmony_ci	u32 active_min_time;
73658c2ecf20Sopenharmony_ci	u32 active_max_time;
73668c2ecf20Sopenharmony_ci	u32 passive_min_time;
73678c2ecf20Sopenharmony_ci	u32 passive_max_time;
73688c2ecf20Sopenharmony_ci
73698c2ecf20Sopenharmony_ci	/* mac address randomization attributes */
73708c2ecf20Sopenharmony_ci	u32 enable_pno_scan_randomization;
73718c2ecf20Sopenharmony_ci	u8 mac_addr[ETH_ALEN];
73728c2ecf20Sopenharmony_ci	u8 mac_addr_mask[ETH_ALEN];
73738c2ecf20Sopenharmony_ci} __packed;
73748c2ecf20Sopenharmony_ci
73758c2ecf20Sopenharmony_cienum wmi_host_platform_type {
73768c2ecf20Sopenharmony_ci	WMI_HOST_PLATFORM_HIGH_PERF,
73778c2ecf20Sopenharmony_ci	WMI_HOST_PLATFORM_LOW_PERF,
73788c2ecf20Sopenharmony_ci};
73798c2ecf20Sopenharmony_ci
73808c2ecf20Sopenharmony_cienum wmi_bss_survey_req_type {
73818c2ecf20Sopenharmony_ci	WMI_BSS_SURVEY_REQ_TYPE_READ = 1,
73828c2ecf20Sopenharmony_ci	WMI_BSS_SURVEY_REQ_TYPE_READ_CLEAR,
73838c2ecf20Sopenharmony_ci};
73848c2ecf20Sopenharmony_ci
73858c2ecf20Sopenharmony_cistruct wmi_pdev_chan_info_req_cmd {
73868c2ecf20Sopenharmony_ci	__le32 type;
73878c2ecf20Sopenharmony_ci	__le32 reserved;
73888c2ecf20Sopenharmony_ci} __packed;
73898c2ecf20Sopenharmony_ci
73908c2ecf20Sopenharmony_ci/* bb timing register configurations */
73918c2ecf20Sopenharmony_cistruct wmi_bb_timing_cfg_arg {
73928c2ecf20Sopenharmony_ci	/* Tx_end to pa off timing */
73938c2ecf20Sopenharmony_ci	u32 bb_tx_timing;
73948c2ecf20Sopenharmony_ci
73958c2ecf20Sopenharmony_ci	/* Tx_end to external pa off timing */
73968c2ecf20Sopenharmony_ci	u32 bb_xpa_timing;
73978c2ecf20Sopenharmony_ci};
73988c2ecf20Sopenharmony_ci
73998c2ecf20Sopenharmony_cistruct wmi_pdev_bb_timing_cfg_cmd {
74008c2ecf20Sopenharmony_ci	/* Tx_end to pa off timing */
74018c2ecf20Sopenharmony_ci	__le32 bb_tx_timing;
74028c2ecf20Sopenharmony_ci
74038c2ecf20Sopenharmony_ci	/* Tx_end to external pa off timing */
74048c2ecf20Sopenharmony_ci	__le32 bb_xpa_timing;
74058c2ecf20Sopenharmony_ci} __packed;
74068c2ecf20Sopenharmony_ci
74078c2ecf20Sopenharmony_cistruct ath10k;
74088c2ecf20Sopenharmony_cistruct ath10k_vif;
74098c2ecf20Sopenharmony_cistruct ath10k_fw_stats_pdev;
74108c2ecf20Sopenharmony_cistruct ath10k_fw_stats_peer;
74118c2ecf20Sopenharmony_cistruct ath10k_fw_stats;
74128c2ecf20Sopenharmony_ci
74138c2ecf20Sopenharmony_ciint ath10k_wmi_attach(struct ath10k *ar);
74148c2ecf20Sopenharmony_civoid ath10k_wmi_detach(struct ath10k *ar);
74158c2ecf20Sopenharmony_civoid ath10k_wmi_free_host_mem(struct ath10k *ar);
74168c2ecf20Sopenharmony_ciint ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
74178c2ecf20Sopenharmony_ciint ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
74188c2ecf20Sopenharmony_ci
74198c2ecf20Sopenharmony_cistruct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
74208c2ecf20Sopenharmony_ciint ath10k_wmi_connect(struct ath10k *ar);
74218c2ecf20Sopenharmony_ci
74228c2ecf20Sopenharmony_cistruct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
74238c2ecf20Sopenharmony_ciint ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
74248c2ecf20Sopenharmony_ciint ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
74258c2ecf20Sopenharmony_ci			       u32 cmd_id);
74268c2ecf20Sopenharmony_civoid ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *arg);
74278c2ecf20Sopenharmony_ci
74288c2ecf20Sopenharmony_civoid ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
74298c2ecf20Sopenharmony_ci				     struct ath10k_fw_stats_pdev *dst);
74308c2ecf20Sopenharmony_civoid ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
74318c2ecf20Sopenharmony_ci				   struct ath10k_fw_stats_pdev *dst);
74328c2ecf20Sopenharmony_civoid ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
74338c2ecf20Sopenharmony_ci				   struct ath10k_fw_stats_pdev *dst);
74348c2ecf20Sopenharmony_civoid ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
74358c2ecf20Sopenharmony_ci				      struct ath10k_fw_stats_pdev *dst);
74368c2ecf20Sopenharmony_civoid ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
74378c2ecf20Sopenharmony_ci				struct ath10k_fw_stats_peer *dst);
74388c2ecf20Sopenharmony_civoid ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
74398c2ecf20Sopenharmony_ci				    struct wmi_host_mem_chunks *chunks);
74408c2ecf20Sopenharmony_civoid ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
74418c2ecf20Sopenharmony_ci				      const struct wmi_start_scan_arg *arg);
74428c2ecf20Sopenharmony_civoid ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
74438c2ecf20Sopenharmony_ci			      const struct wmi_wmm_params_arg *arg);
74448c2ecf20Sopenharmony_civoid ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
74458c2ecf20Sopenharmony_ci				const struct wmi_channel_arg *arg);
74468c2ecf20Sopenharmony_ciint ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
74478c2ecf20Sopenharmony_ci
74488c2ecf20Sopenharmony_ciint ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
74498c2ecf20Sopenharmony_ciint ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
74508c2ecf20Sopenharmony_ciint ath10k_wmi_event_mgmt_tx_compl(struct ath10k *ar, struct sk_buff *skb);
74518c2ecf20Sopenharmony_ciint ath10k_wmi_event_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb);
74528c2ecf20Sopenharmony_civoid ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
74538c2ecf20Sopenharmony_civoid ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
74548c2ecf20Sopenharmony_ciint ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
74558c2ecf20Sopenharmony_civoid ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
74568c2ecf20Sopenharmony_civoid ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
74578c2ecf20Sopenharmony_civoid ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
74588c2ecf20Sopenharmony_civoid ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
74598c2ecf20Sopenharmony_civoid ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
74608c2ecf20Sopenharmony_civoid ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
74618c2ecf20Sopenharmony_civoid ath10k_wmi_event_dfs(struct ath10k *ar,
74628c2ecf20Sopenharmony_ci			  struct wmi_phyerr_ev_arg *phyerr, u64 tsf);
74638c2ecf20Sopenharmony_civoid ath10k_wmi_event_spectral_scan(struct ath10k *ar,
74648c2ecf20Sopenharmony_ci				    struct wmi_phyerr_ev_arg *phyerr,
74658c2ecf20Sopenharmony_ci				    u64 tsf);
74668c2ecf20Sopenharmony_civoid ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
74678c2ecf20Sopenharmony_civoid ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
74688c2ecf20Sopenharmony_civoid ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
74698c2ecf20Sopenharmony_civoid ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
74708c2ecf20Sopenharmony_civoid ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
74718c2ecf20Sopenharmony_civoid ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
74728c2ecf20Sopenharmony_civoid ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
74738c2ecf20Sopenharmony_ci					     struct sk_buff *skb);
74748c2ecf20Sopenharmony_civoid ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
74758c2ecf20Sopenharmony_ci					     struct sk_buff *skb);
74768c2ecf20Sopenharmony_civoid ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
74778c2ecf20Sopenharmony_civoid ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
74788c2ecf20Sopenharmony_civoid ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
74798c2ecf20Sopenharmony_civoid ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
74808c2ecf20Sopenharmony_civoid ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
74818c2ecf20Sopenharmony_civoid ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
74828c2ecf20Sopenharmony_ci					 struct sk_buff *skb);
74838c2ecf20Sopenharmony_civoid ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
74848c2ecf20Sopenharmony_civoid ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
74858c2ecf20Sopenharmony_civoid ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
74868c2ecf20Sopenharmony_civoid ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
74878c2ecf20Sopenharmony_ci						struct sk_buff *skb);
74888c2ecf20Sopenharmony_civoid ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
74898c2ecf20Sopenharmony_civoid ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
74908c2ecf20Sopenharmony_civoid ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
74918c2ecf20Sopenharmony_civoid ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
74928c2ecf20Sopenharmony_ciint ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
74938c2ecf20Sopenharmony_civoid ath10k_wmi_event_service_available(struct ath10k *ar, struct sk_buff *skb);
74948c2ecf20Sopenharmony_ciint ath10k_wmi_op_pull_phyerr_ev(struct ath10k *ar, const void *phyerr_buf,
74958c2ecf20Sopenharmony_ci				 int left_len, struct wmi_phyerr_ev_arg *arg);
74968c2ecf20Sopenharmony_civoid ath10k_wmi_main_op_fw_stats_fill(struct ath10k *ar,
74978c2ecf20Sopenharmony_ci				      struct ath10k_fw_stats *fw_stats,
74988c2ecf20Sopenharmony_ci				      char *buf);
74998c2ecf20Sopenharmony_civoid ath10k_wmi_10x_op_fw_stats_fill(struct ath10k *ar,
75008c2ecf20Sopenharmony_ci				     struct ath10k_fw_stats *fw_stats,
75018c2ecf20Sopenharmony_ci				     char *buf);
75028c2ecf20Sopenharmony_cisize_t ath10k_wmi_fw_stats_num_peers(struct list_head *head);
75038c2ecf20Sopenharmony_cisize_t ath10k_wmi_fw_stats_num_vdevs(struct list_head *head);
75048c2ecf20Sopenharmony_civoid ath10k_wmi_10_4_op_fw_stats_fill(struct ath10k *ar,
75058c2ecf20Sopenharmony_ci				      struct ath10k_fw_stats *fw_stats,
75068c2ecf20Sopenharmony_ci				      char *buf);
75078c2ecf20Sopenharmony_ciint ath10k_wmi_op_get_vdev_subtype(struct ath10k *ar,
75088c2ecf20Sopenharmony_ci				   enum wmi_vdev_subtype subtype);
75098c2ecf20Sopenharmony_ciint ath10k_wmi_barrier(struct ath10k *ar);
75108c2ecf20Sopenharmony_civoid ath10k_wmi_tpc_config_get_rate_code(u8 *rate_code, u16 *pream_table,
75118c2ecf20Sopenharmony_ci					 u32 num_tx_chain);
75128c2ecf20Sopenharmony_civoid ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb);
75138c2ecf20Sopenharmony_ci
75148c2ecf20Sopenharmony_ci#endif /* _WMI_H_ */
7515