linux/drivers/net/wireless/ath/ath10k/wmi.h

/* SPDX-License-Identifier: ISC */
/*
 * Copyright (c) 2005-2011 Atheros Communications Inc.
 * Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#ifndef _WMI_H_
#define _WMI_H_

#include <linux/types.h>
#include <linux/ieee80211.h>

/*
 * This file specifies the WMI interface for the Unified Software
 * Architecture.
 *
 * It includes definitions of all the commands and events. Commands are
 * messages from the host to the target. Events and Replies are messages
 * from the target to the host.
 *
 * Ownership of correctness in regards to WMI commands belongs to the host
 * driver and the target is not required to validate parameters for value,
 * proper range, or any other checking.
 *
 * Guidelines for extending this interface are below.
 *
 * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
 *
 * 2. Use ONLY u32 type for defining member variables within WMI
 *    command/event structures. Do not use u8, u16, bool or
 *    enum types within these structures.
 *
 * 3. DO NOT define bit fields within structures. Implement bit fields
 *    using masks if necessary. Do not use the programming language's bit
 *    field definition.
 *
 * 4. Define macros for encode/decode of u8, u16 fields within
 *    the u32 variables. Use these macros for set/get of these fields.
 *    Try to use this to optimize the structure without bloating it with
 *    u32 variables for every lower sized field.
 *
 * 5. Do not use PACK/UNPACK attributes for the structures as each member
 *    variable is already 4-byte aligned by virtue of being a u32
 *    type.
 *
 * 6. Comment each parameter part of the WMI command/event structure by
 *    using the 2 stars at the beginning of C comment instead of one star to
 *    enable HTML document generation using Doxygen.
 *
 */

/* Control Path */
struct wmi_cmd_hdr {} __packed;

#define WMI_CMD_HDR_CMD_ID_MASK
#define WMI_CMD_HDR_CMD_ID_LSB
#define WMI_CMD_HDR_PLT_PRIV_MASK
#define WMI_CMD_HDR_PLT_PRIV_LSB

#define HTC_PROTOCOL_VERSION
#define WMI_PROTOCOL_VERSION

/*
 * There is no signed version of __le32, so for a temporary solution come
 * up with our own version. The idea is from fs/ntfs/endian.h.
 *
 * Use a_ prefix so that it doesn't conflict if we get proper support to
 * linux/types.h.
 */
a_sle32;

static inline a_sle32 a_cpu_to_sle32(s32 val)
{}

static inline s32 a_sle32_to_cpu(a_sle32 val)
{}

enum wmi_service {};

enum wmi_10x_service {};

enum wmi_main_service {};

enum wmi_10_4_service {};

static inline char *wmi_service_name(enum wmi_service service_id)
{}

#define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len)

/* This extension is required to accommodate new services, current limit
 * for wmi_services is 64 as target is using only 4-bits of each 32-bit
 * wmi_service word. Extending this to make use of remaining unused bits
 * for new services.
 */
#define WMI_EXT_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len)

#define SVCMAP

static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
				   size_t len)
{}

static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
				    size_t len)
{}

static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
				    size_t len)
{}

#undef SVCMAP

/* 2 word representation of MAC addr */
struct wmi_mac_addr {} __packed;

struct wmi_cmd_map {};

/*
 * wmi command groups.
 */
enum wmi_cmd_group {};

#define WMI_CMD_GRP(grp_id)
#define WMI_EVT_GRP_START_ID(grp_id)

#define WMI_CMD_UNSUPPORTED

/* Command IDs and command events for MAIN FW. */
enum wmi_cmd_id {};

enum wmi_event_id {};

/* Command IDs and command events for 10.X firmware */
enum wmi_10x_cmd_id {};

enum wmi_10x_event_id {};

enum wmi_10_2_cmd_id {};

enum wmi_10_2_event_id {};

enum wmi_10_4_cmd_id {};

enum wmi_10_4_event_id {};

enum wmi_phy_mode {};

static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
{}

#define WMI_CHAN_LIST_TAG
#define WMI_SSID_LIST_TAG
#define WMI_BSSID_LIST_TAG
#define WMI_IE_TAG

struct wmi_channel {} __packed;

struct wmi_channel_arg {};

enum wmi_channel_change_cause {};

#define WMI_CHAN_FLAG_HT40_PLUS
#define WMI_CHAN_FLAG_PASSIVE
#define WMI_CHAN_FLAG_ADHOC_ALLOWED
#define WMI_CHAN_FLAG_AP_DISABLED
#define WMI_CHAN_FLAG_DFS
#define WMI_CHAN_FLAG_ALLOW_HT
#define WMI_CHAN_FLAG_ALLOW_VHT

/* Indicate reason for channel switch */
#define WMI_CHANNEL_CHANGE_CAUSE_CSA
/* DFS required on channel for 2nd segment of VHT160 and VHT80+80*/
#define WMI_CHAN_FLAG_DFS_CFREQ2
#define WMI_MAX_SPATIAL_STREAM

/* HT Capabilities*/
#define WMI_HT_CAP_ENABLED
#define WMI_HT_CAP_HT20_SGI
#define WMI_HT_CAP_DYNAMIC_SMPS
#define WMI_HT_CAP_TX_STBC
#define WMI_HT_CAP_TX_STBC_MASK_SHIFT
#define WMI_HT_CAP_RX_STBC
#define WMI_HT_CAP_RX_STBC_MASK_SHIFT
#define WMI_HT_CAP_LDPC
#define WMI_HT_CAP_L_SIG_TXOP_PROT
#define WMI_HT_CAP_MPDU_DENSITY
#define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT
#define WMI_HT_CAP_HT40_SGI
#define WMI_HT_CAP_RX_LDPC
#define WMI_HT_CAP_TX_LDPC

#define WMI_HT_CAP_DEFAULT_ALL

/*
 * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
 * field. The fields not defined here are not supported, or reserved.
 * Do not change these masks and if you have to add new one follow the
 * bitmask as specified by 802.11ac draft.
 */

#define WMI_VHT_CAP_MAX_MPDU_LEN_MASK
#define WMI_VHT_CAP_RX_LDPC
#define WMI_VHT_CAP_SGI_80MHZ
#define WMI_VHT_CAP_SGI_160MHZ
#define WMI_VHT_CAP_TX_STBC
#define WMI_VHT_CAP_RX_STBC_MASK
#define WMI_VHT_CAP_RX_STBC_MASK_SHIFT
#define WMI_VHT_CAP_SU_BFER
#define WMI_VHT_CAP_SU_BFEE
#define WMI_VHT_CAP_MAX_CS_ANT_MASK
#define WMI_VHT_CAP_MAX_CS_ANT_MASK_SHIFT
#define WMI_VHT_CAP_MAX_SND_DIM_MASK
#define WMI_VHT_CAP_MAX_SND_DIM_MASK_SHIFT
#define WMI_VHT_CAP_MU_BFER
#define WMI_VHT_CAP_MU_BFEE
#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP
#define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT
#define WMI_VHT_CAP_RX_FIXED_ANT
#define WMI_VHT_CAP_TX_FIXED_ANT

/* The following also refer for max HT AMSDU */
#define WMI_VHT_CAP_MAX_MPDU_LEN_3839
#define WMI_VHT_CAP_MAX_MPDU_LEN_7935
#define WMI_VHT_CAP_MAX_MPDU_LEN_11454

#define WMI_VHT_CAP_DEFAULT_ALL

/*
 * Interested readers refer to Rx/Tx MCS Map definition as defined in
 * 802.11ac
 */
#define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss)
#define WMI_VHT_MAX_SUPP_RATE_MASK
#define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT

enum {};

#define REGDMN_CAP1_CHAN_HALF_RATE
#define REGDMN_CAP1_CHAN_QUARTER_RATE
#define REGDMN_CAP1_CHAN_HAL49GHZ

/* regulatory capabilities */
#define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND
#define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN
#define REGDMN_EEPROM_EEREGCAP_EN_KK_U2
#define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND
#define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD
#define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A

struct hal_reg_capabilities {} __packed;

enum wlan_mode_capability {};

/* structure used by FW for requesting host memory */
struct wlan_host_mem_req {} __packed;

/*
 * The following struct holds optional payload for
 * wmi_service_ready_event,e.g., 11ac pass some of the
 * device capability to the host.
 */
struct wmi_service_ready_event {} __packed;

/* This is the definition from 10.X firmware branch */
struct wmi_10x_service_ready_event {} __packed;

#define WMI_SERVICE_READY_TIMEOUT_HZ
#define WMI_UNIFIED_READY_TIMEOUT_HZ

struct wmi_ready_event {} __packed;

struct wmi_resource_config {} __packed;

struct wmi_resource_config_10x {} __packed;

enum wmi_10_2_feature_mask {};

struct wmi_resource_config_10_2 {} __packed;

#define NUM_UNITS_IS_NUM_VDEVS
#define NUM_UNITS_IS_NUM_PEERS
#define NUM_UNITS_IS_NUM_ACTIVE_PEERS

struct wmi_resource_config_10_4 {} __packed;

enum wmi_coex_version {};

/**
 * enum wmi_10_4_feature_mask - WMI 10.4 feature enable/disable flags
 * @WMI_10_4_LTEU_SUPPORT: LTEU config
 * @WMI_10_4_COEX_GPIO_SUPPORT: COEX GPIO config
 * @WMI_10_4_AUX_RADIO_SPECTRAL_INTF: AUX Radio Enhancement for spectral scan
 * @WMI_10_4_AUX_RADIO_CHAN_LOAD_INTF: AUX Radio Enhancement for chan load scan
 * @WMI_10_4_BSS_CHANNEL_INFO_64: BSS channel info stats
 * @WMI_10_4_PEER_STATS: Per station stats
 * @WMI_10_4_VDEV_STATS: Per vdev stats
 * @WMI_10_4_TDLS: Implicit TDLS support in firmware enable/disable
 * @WMI_10_4_TDLS_OFFCHAN: TDLS offchannel support enable/disable
 * @WMI_10_4_TDLS_UAPSD_BUFFER_STA: TDLS buffer sta support enable/disable
 * @WMI_10_4_TDLS_UAPSD_SLEEP_STA: TDLS sleep sta support enable/disable
 * @WMI_10_4_TDLS_CONN_TRACKER_IN_HOST_MODE: TDLS connection tracker in host
 *	enable/disable
 * @WMI_10_4_TDLS_EXPLICIT_MODE_ONLY: Explicit TDLS mode enable/disable
 * @WMI_10_4_TX_DATA_ACK_RSSI: Enable DATA ACK RSSI if firmware is capable
 * @WMI_10_4_EXT_PEER_TID_CONFIGS_SUPPORT:  Firmware supports Extended Peer
 *	TID configuration for QoS related settings
 * @WMI_10_4_REPORT_AIRTIME: Firmware supports transmit airtime reporting
 */
enum wmi_10_4_feature_mask {};

/* WMI_GPIO_CONFIG_CMDID */
enum {};

enum {};

/* WMI_GPIO_CONFIG_CMDID */
struct wmi_gpio_config_cmd {} __packed;

/* WMI_GPIO_OUTPUT_CMDID */
struct wmi_gpio_output_cmd {} __packed;

/* WMI_GPIO_INPUT_EVENTID */
struct wmi_gpio_input_event {} __packed;

struct wmi_ext_resource_config_10_4_cmd {};

/* structure describing host memory chunk. */
struct host_memory_chunk {} __packed;

#define WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID

struct wmi_host_mem_chunks {} __packed;

struct wmi_init_cmd {} __packed;

/* _10x structure is from 10.X FW API */
struct wmi_init_cmd_10x {} __packed;

struct wmi_init_cmd_10_2 {} __packed;

struct wmi_init_cmd_10_4 {} __packed;

struct wmi_chan_list_entry {} __packed;

/* TLV for channel list */
struct wmi_chan_list {} __packed;

struct wmi_bssid_list {} __packed;

struct wmi_ie_data {} __packed;

struct wmi_ssid {} __packed;

struct wmi_ssid_list {} __packed;

/* prefix used by scan requestor ids on the host */
#define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX

/* prefix used by scan request ids generated on the host */
/* host cycles through the lower 12 bits to generate ids */
#define WMI_HOST_SCAN_REQ_ID_PREFIX

#define WLAN_SCAN_PARAMS_MAX_SSID
#define WLAN_SCAN_PARAMS_MAX_BSSID
#define WLAN_SCAN_PARAMS_MAX_IE_LEN

/* Values lower than this may be refused by some firmware revisions with a scan
 * completion with a timedout reason.
 */
#define WMI_SCAN_CHAN_MIN_TIME_MSEC

/* Scan priority numbers must be sequential, starting with 0 */
enum wmi_scan_priority {};

struct wmi_start_scan_common {} __packed;

struct wmi_start_scan_cmd {} __packed;

/* This is the definition from 10.X firmware branch */
struct wmi_10x_start_scan_cmd {} __packed;

struct wmi_ssid_arg {};

struct wmi_bssid_arg {};

struct wmi_start_scan_arg {};

/* scan control flags */

/* passively scan all channels including active channels */
#define WMI_SCAN_FLAG_PASSIVE
/* add wild card ssid probe request even though ssid_list is specified. */
#define WMI_SCAN_ADD_BCAST_PROBE_REQ
/* add cck rates to rates/xrate ie for the generated probe request */
#define WMI_SCAN_ADD_CCK_RATES
/* add ofdm rates to rates/xrate ie for the generated probe request */
#define WMI_SCAN_ADD_OFDM_RATES
/* To enable indication of Chan load and Noise floor to host */
#define WMI_SCAN_CHAN_STAT_EVENT
/* Filter Probe request frames  */
#define WMI_SCAN_FILTER_PROBE_REQ
/* When set, DFS channels will not be scanned */
#define WMI_SCAN_BYPASS_DFS_CHN
/* Different FW scan engine may choose to bail out on errors.
 * Allow the driver to have influence over that.
 */
#define WMI_SCAN_CONTINUE_ON_ERROR

/* Use random MAC address for TA for Probe Request frame and add
 * OUI specified by WMI_SCAN_PROB_REQ_OUI_CMDID to the Probe Request frame.
 * if OUI is not set by WMI_SCAN_PROB_REQ_OUI_CMDID then the flag is ignored.
 */
#define WMI_SCAN_ADD_SPOOFED_MAC_IN_PROBE_REQ

/* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
#define WMI_SCAN_CLASS_MASK

enum wmi_stop_scan_type {};

struct wmi_stop_scan_cmd {} __packed;

struct wmi_stop_scan_arg {};

struct wmi_scan_chan_list_cmd {} __packed;

struct wmi_scan_chan_list_arg {};

enum wmi_bss_filter {};

enum wmi_scan_event_type {};

enum wmi_scan_completion_reason {};

struct wmi_scan_event {} __packed;

/*
 * This defines how much headroom is kept in the
 * receive frame between the descriptor and the
 * payload, in order for the WMI PHY error and
 * management handler to insert header contents.
 *
 * This is in bytes.
 */
#define WMI_MGMT_RX_HDR_HEADROOM

/*
 * This event will be used for sending scan results
 * as well as rx mgmt frames to the host. The rx buffer
 * will be sent as part of this WMI event. It would be a
 * good idea to pass all the fields in the RX status
 * descriptor up to the host.
 */
struct wmi_mgmt_rx_hdr_v1 {} __packed;

struct wmi_mgmt_rx_hdr_v2 {} __packed;

struct wmi_mgmt_rx_event_v1 {} __packed;

struct wmi_mgmt_rx_event_v2 {} __packed;

struct wmi_10_4_mgmt_rx_hdr {} __packed;

struct wmi_10_4_mgmt_rx_event {} __packed;

struct wmi_mgmt_rx_ext_info {} __packed __aligned();

#define WMI_RX_STATUS_OK
#define WMI_RX_STATUS_ERR_CRC
#define WMI_RX_STATUS_ERR_DECRYPT
#define WMI_RX_STATUS_ERR_MIC
#define WMI_RX_STATUS_ERR_KEY_CACHE_MISS
/* Extension data at the end of mgmt frame */
#define WMI_RX_STATUS_EXT_INFO

#define PHY_ERROR_GEN_SPECTRAL_SCAN
#define PHY_ERROR_GEN_FALSE_RADAR_EXT
#define PHY_ERROR_GEN_RADAR

#define PHY_ERROR_10_4_RADAR_MASK
#define PHY_ERROR_10_4_SPECTRAL_SCAN_MASK

enum phy_err_type {};

struct wmi_phyerr {} __packed;

struct wmi_phyerr_event {} __packed;

struct wmi_10_4_phyerr_event {} __packed;

struct wmi_radar_found_info {} __packed;

enum wmi_radar_confirmation_status {};

#define PHYERR_TLV_SIG
#define PHYERR_TLV_TAG_SEARCH_FFT_REPORT
#define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY
#define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT

struct phyerr_radar_report {} __packed;

#define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK
#define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB

#define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK
#define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB

#define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK
#define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB

#define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK
#define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB

#define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK
#define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB

#define RADAR_REPORT_REG0_PULSE_SIDX_MASK
#define RADAR_REPORT_REG0_PULSE_SIDX_LSB

#define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK
#define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB

#define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK
#define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB

#define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK
#define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB

#define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK
#define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB

#define RADAR_REPORT_REG1_PULSE_DUR_MASK
#define RADAR_REPORT_REG1_PULSE_DUR_LSB

struct phyerr_fft_report {} __packed;

#define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK
#define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB

#define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK
#define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB

#define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK
#define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB

#define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK
#define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB

#define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK
#define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB

#define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK
#define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB

#define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK
#define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB

#define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK
#define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB

struct phyerr_tlv {} __packed;

#define DFS_RSSI_POSSIBLY_FALSE
#define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE

struct wmi_mgmt_tx_hdr {} __packed;

struct wmi_mgmt_tx_cmd {} __packed;

struct wmi_echo_event {} __packed;

struct wmi_echo_cmd {} __packed;

struct wmi_pdev_set_regdomain_cmd {} __packed;

enum wmi_dfs_region {};

struct wmi_pdev_set_regdomain_cmd_10x {} __packed;

/* Command to set/unset chip in quiet mode */
struct wmi_pdev_set_quiet_cmd {} __packed;

/*
 * 802.11g protection mode.
 */
enum ath10k_protmode {};

enum wmi_rtscts_profile {};

#define WMI_RTSCTS_ENABLED
#define WMI_RTSCTS_SET_MASK
#define WMI_RTSCTS_SET_LSB

#define WMI_RTSCTS_PROFILE_MASK
#define WMI_RTSCTS_PROFILE_LSB

enum wmi_beacon_gen_mode {};

enum wmi_csa_event_ies_present_flag {};

/* wmi CSA receive event from beacon frame */
struct wmi_csa_event {} __packed;

/* the definition of different PDEV parameters */
#define PDEV_DEFAULT_STATS_UPDATE_PERIOD
#define VDEV_DEFAULT_STATS_UPDATE_PERIOD
#define PEER_DEFAULT_STATS_UPDATE_PERIOD

struct wmi_pdev_param_map {};

#define WMI_PDEV_PARAM_UNSUPPORTED

enum wmi_pdev_param {};

enum wmi_10x_pdev_param {};

enum wmi_10_4_pdev_param {};

struct wmi_pdev_set_param_cmd {} __packed;

struct wmi_pdev_set_base_macaddr_cmd {} __packed;

/* valid period is 1 ~ 60000ms, unit in millisecond */
#define WMI_PDEV_PARAM_CAL_PERIOD_MAX

struct wmi_pdev_get_tpc_config_cmd {} __packed;

#define WMI_TPC_CONFIG_PARAM
#define WMI_TPC_FINAL_RATE_MAX
#define WMI_TPC_TX_N_CHAIN
#define WMI_TPC_RATE_MAX
#define WMI_TPC_PREAM_TABLE_MAX
#define WMI_TPC_FLAG
#define WMI_TPC_BUF_SIZE
#define WMI_TPC_BEAMFORMING

enum wmi_tpc_table_type {};

enum wmi_tpc_config_event_flag {};

struct wmi_pdev_tpc_config_event {} __packed;

/* Transmit power scale factor. */
enum wmi_tp_scale {};

struct wmi_pdev_tpc_final_table_event {} __packed;

struct wmi_pdev_get_tpc_table_cmd {} __packed;

enum wmi_tpc_pream_2ghz {};

enum wmi_tpc_pream_5ghz {};

#define WMI_PEER_PS_STATE_DISABLED

struct wmi_peer_sta_ps_state_chg_event {} __packed;

#define WMI_MAX_DEBUG_MESG

struct wmi_debug_mesg_event {} __packed;

enum {};

struct wmi_pdev_set_channel_cmd {} __packed;

struct wmi_pdev_pktlog_enable_cmd {} __packed;

/* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
#define WMI_DSCP_MAP_MAX
struct wmi_pdev_set_dscp_tid_map_cmd {} __packed;

enum mcast_bcast_rate_id {};

struct mcast_bcast_rate {} __packed;

struct wmi_wmm_params {} __packed;

struct wmi_pdev_set_wmm_params {} __packed;

struct wmi_wmm_params_arg {};

struct wmi_wmm_params_all_arg {};

struct wmi_pdev_stats_tx {} __packed;

struct wmi_10_4_pdev_stats_tx {} __packed;

struct wmi_pdev_stats_rx {} __packed;

struct wmi_pdev_stats_peer {} __packed;

enum wmi_stats_id {};

enum wmi_10_4_stats_id {};

enum wmi_tlv_stats_id {};

struct wlan_inst_rssi_args {};

struct wmi_request_stats_cmd {} __packed;

enum wmi_peer_stats_info_request_type {};

/* Suspend option */
enum {};

struct wmi_pdev_suspend_cmd {} __packed;

struct wmi_stats_event {} __packed;

struct wmi_10_2_stats_event {} __packed;

/*
 * PDEV statistics
 * TODO: add all PDEV stats here
 */
struct wmi_pdev_stats_base {} __packed;

struct wmi_pdev_stats {} __packed;

struct wmi_pdev_stats_extra {} __packed;

struct wmi_10x_pdev_stats {} __packed;

struct wmi_pdev_stats_mem {} __packed;

struct wmi_10_2_pdev_stats {} __packed;

struct wmi_10_4_pdev_stats {} __packed;

/*
 * VDEV statistics
 */

#define WMI_VDEV_STATS_FTM_COUNT_VALID
#define WMI_VDEV_STATS_FTM_COUNT_LSB
#define WMI_VDEV_STATS_FTM_COUNT_MASK

struct wmi_vdev_stats {} __packed;

struct wmi_vdev_stats_extd {} __packed;

/*
 * peer statistics.
 * TODO: add more stats
 */
struct wmi_peer_stats {} __packed;

struct wmi_10x_peer_stats {} __packed;

struct wmi_10_2_peer_stats {} __packed;

struct wmi_10_2_4_peer_stats {} __packed;

struct wmi_10_2_4_ext_peer_stats {} __packed;

struct wmi_10_4_peer_stats {} __packed;

struct wmi_10_4_peer_extd_stats {} __packed;

struct wmi_10_4_bss_bcn_stats {} __packed;

struct wmi_10_4_bss_bcn_filter_stats {} __packed;

struct wmi_10_2_pdev_ext_stats {} __packed;

struct wmi_vdev_create_cmd {} __packed;

enum wmi_vdev_type {};

enum wmi_vdev_subtype {};

enum wmi_vdev_subtype_legacy {};

enum wmi_vdev_subtype_10_2_4 {};

enum wmi_vdev_subtype_10_4 {};

/* values for vdev_subtype */

/* values for vdev_start_request flags */
/*
 * Indicates that AP VDEV uses hidden ssid. only valid for
 *  AP/GO
 */
#define WMI_VDEV_START_HIDDEN_SSID
/*
 * Indicates if robust management frame/management frame
 *  protection is enabled. For GO/AP vdevs, it indicates that
 *  it may support station/client associations with RMF enabled.
 *  For STA/client vdevs, it indicates that sta will
 *  associate with AP with RMF enabled.
 */
#define WMI_VDEV_START_PMF_ENABLED

struct wmi_p2p_noa_descriptor {} __packed;

struct wmi_vdev_start_request_cmd {} __packed;

struct wmi_vdev_restart_request_cmd {} __packed;

struct wmi_vdev_start_request_arg {};

struct wmi_vdev_delete_cmd {} __packed;

struct wmi_vdev_up_cmd {} __packed;

struct wmi_vdev_stop_cmd {} __packed;

struct wmi_vdev_down_cmd {} __packed;

struct wmi_vdev_standby_response_cmd {} __packed;

struct wmi_vdev_resume_response_cmd {} __packed;

struct wmi_vdev_set_param_cmd {} __packed;

#define WMI_MAX_KEY_INDEX
#define WMI_MAX_KEY_LEN

#define WMI_KEY_PAIRWISE
#define WMI_KEY_GROUP
#define WMI_KEY_TX_USAGE

struct wmi_key_seq_counter {} __packed;

enum wmi_cipher_suites {};

enum wmi_tlv_cipher_suites {};

struct wmi_vdev_install_key_cmd {} __packed;

struct wmi_vdev_install_key_arg {};

/*
 * vdev fixed rate format:
 * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
 * - nss      - b5:b4 - ss number (0 mean 1ss)
 * - rate_mcs - b3:b0 - as below
 *    CCK:  0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
 *          4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
 *    OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
 *          4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
 *    HT/VHT: MCS index
 */

/* Preamble types to be used with VDEV fixed rate configuration */
enum wmi_rate_preamble {};

#define ATH10K_HW_NSS(rate)
#define ATH10K_HW_PREAMBLE(rate)
#define ATH10K_HW_MCS_RATE(rate)
#define ATH10K_HW_LEGACY_RATE(rate)
#define ATH10K_HW_BW(flags)
#define ATH10K_HW_GI(flags)
#define ATH10K_HW_RATECODE(rate, nss, preamble)
#define ATH10K_HW_AMPDU(flags)
#define ATH10K_HW_BA_FAIL(flags)
#define ATH10K_FW_SKIPPED_RATE_CTRL(flags)

#define ATH10K_VHT_MCS_NUM
#define ATH10K_BW_NUM
#define ATH10K_NSS_NUM
#define ATH10K_LEGACY_NUM
#define ATH10K_GI_NUM
#define ATH10K_HT_MCS_NUM
#define ATH10K_RATE_TABLE_NUM
#define ATH10K_RATE_INFO_FLAGS_SGI_BIT

/* Value to disable fixed rate setting */
#define WMI_FIXED_RATE_NONE

struct wmi_peer_param_map {};

struct wmi_vdev_param_map {};

#define WMI_VDEV_PARAM_UNSUPPORTED

/* the definition of different VDEV parameters */
enum wmi_vdev_param {};

/* the definition of different VDEV parameters */
enum wmi_10x_vdev_param {};

enum wmi_10_4_vdev_param {};

#define WMI_VDEV_DISABLE_4_ADDR_SRC_LRN

#define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE
#define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE
#define WMI_VDEV_PARAM_TXBF_SU_TX_BFER
#define WMI_VDEV_PARAM_TXBF_MU_TX_BFER

#define WMI_TXBF_STS_CAP_OFFSET_LSB
#define WMI_TXBF_STS_CAP_OFFSET_MASK
#define WMI_TXBF_CONF_IMPLICIT_BF
#define WMI_BF_SOUND_DIM_OFFSET_LSB
#define WMI_BF_SOUND_DIM_OFFSET_MASK

/* slot time long */
#define WMI_VDEV_SLOT_TIME_LONG
/* slot time short */
#define WMI_VDEV_SLOT_TIME_SHORT
/* preablbe long */
#define WMI_VDEV_PREAMBLE_LONG
/* preablbe short */
#define WMI_VDEV_PREAMBLE_SHORT

enum wmi_start_event_param {};

struct wmi_vdev_start_response_event {} __packed;

struct wmi_vdev_standby_req_event {} __packed;

struct wmi_vdev_resume_req_event {} __packed;

struct wmi_vdev_stopped_event {} __packed;

/*
 * common structure used for simple events
 * (stopped, resume_req, standby response)
 */
struct wmi_vdev_simple_event {} __packed;

/* VDEV start response status codes */
/* VDEV successfully started */
#define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS

/* requested VDEV not found */
#define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID

/* unsupported VDEV combination */
#define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED

/* TODO: please add more comments if you have in-depth information */
struct wmi_vdev_spectral_conf_cmd {} __packed;

struct wmi_vdev_spectral_conf_arg {};

#define WMI_SPECTRAL_ENABLE_DEFAULT
#define WMI_SPECTRAL_COUNT_DEFAULT
#define WMI_SPECTRAL_PERIOD_DEFAULT
#define WMI_SPECTRAL_PRIORITY_DEFAULT
#define WMI_SPECTRAL_FFT_SIZE_DEFAULT
#define WMI_SPECTRAL_GC_ENA_DEFAULT
#define WMI_SPECTRAL_RESTART_ENA_DEFAULT
#define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT
#define WMI_SPECTRAL_INIT_DELAY_DEFAULT
#define WMI_SPECTRAL_NB_TONE_THR_DEFAULT
#define WMI_SPECTRAL_STR_BIN_THR_DEFAULT
#define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT
#define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT
#define WMI_SPECTRAL_RSSI_THR_DEFAULT
#define WMI_SPECTRAL_PWR_FORMAT_DEFAULT
#define WMI_SPECTRAL_RPT_MODE_DEFAULT
#define WMI_SPECTRAL_BIN_SCALE_DEFAULT
#define WMI_SPECTRAL_DBM_ADJ_DEFAULT
#define WMI_SPECTRAL_CHN_MASK_DEFAULT

struct wmi_vdev_spectral_enable_cmd {} __packed;

#define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER
#define WMI_SPECTRAL_TRIGGER_CMD_CLEAR
#define WMI_SPECTRAL_ENABLE_CMD_ENABLE
#define WMI_SPECTRAL_ENABLE_CMD_DISABLE

/* Beacon processing related command and event structures */
struct wmi_bcn_tx_hdr {} __packed;

struct wmi_bcn_tx_cmd {} __packed;

struct wmi_bcn_tx_arg {};

enum wmi_bcn_tx_ref_flags {};

/* TODO: It is unclear why "no antenna" works while any other seemingly valid
 * chainmask yields no beacons on the air at all.
 */
#define WMI_BCN_TX_REF_DEF_ANTENNA

struct wmi_bcn_tx_ref_cmd {} __packed;

/* Beacon filter */
#define WMI_BCN_FILTER_ALL
#define WMI_BCN_FILTER_NONE
#define WMI_BCN_FILTER_RSSI
#define WMI_BCN_FILTER_BSSID
#define WMI_BCN_FILTER_SSID

struct wmi_bcn_filter_rx_cmd {} __packed;

/* Capabilities and IEs to be passed to firmware */
struct wmi_bcn_prb_info {} __packed;

enum wmi_sta_ps_mode {};

struct wmi_sta_powersave_mode_cmd {} __packed;

enum wmi_csa_offload_en {};

struct wmi_csa_offload_enable_cmd {} __packed;

struct wmi_csa_offload_chanswitch_cmd {} __packed;

/*
 * This parameter controls the policy for retrieving frames from AP while the
 * STA is in sleep state.
 *
 * Only takes affect if the sta_ps_mode is enabled
 */
enum wmi_sta_ps_param_rx_wake_policy {};

/*
 * Number of tx frames/beacon  that cause the power save SM to wake up.
 *
 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
 * meaning, It will cause the SM to never wake up. This is useful if you want
 * to keep the system to sleep all the time for some kind of test mode . host
 * can change this parameter any time.  It will affect at the next tx frame.
 */
enum wmi_sta_ps_param_tx_wake_threshold {};

/*
 * The maximum number of PS-Poll frames the FW will send in response to
 * traffic advertised in TIM before waking up (by sending a null frame with PS
 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
 * parameter is used when the RX wake policy is
 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
 */
enum wmi_sta_ps_param_pspoll_count {};

/*
 * This will include the delivery and trigger enabled state for every AC.
 * This is the negotiated state with AP. The host MLME needs to set this based
 * on AP capability and the state Set in the association request by the
 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
 */
#define WMI_UAPSD_AC_TYPE_DELI
#define WMI_UAPSD_AC_TYPE_TRIG

#define WMI_UAPSD_AC_BIT_MASK(ac, type)

enum wmi_sta_ps_param_uapsd {};

#define WMI_STA_UAPSD_MAX_INTERVAL_MSEC

struct wmi_sta_uapsd_auto_trig_param {};

struct wmi_sta_uapsd_auto_trig_cmd_fixed_param {};

struct wmi_sta_uapsd_auto_trig_arg {};

enum wmi_sta_powersave_param {};

struct wmi_sta_powersave_param_cmd {} __packed;

/* No MIMO power save */
#define WMI_STA_MIMO_PS_MODE_DISABLE
/* mimo powersave mode static*/
#define WMI_STA_MIMO_PS_MODE_STATIC
/* mimo powersave mode dynamic */
#define WMI_STA_MIMO_PS_MODE_DYNAMIC

struct wmi_sta_mimo_ps_mode_cmd {} __packed;

/* U-APSD configuration of peer station from (re)assoc request and TSPECs */
enum wmi_ap_ps_param_uapsd {};

/* U-APSD maximum service period of peer station */
enum wmi_ap_ps_peer_param_max_sp {};

/*
 * AP power save parameter
 * Set a power save specific parameter for a peer station
 */
enum wmi_ap_ps_peer_param {};

struct wmi_ap_ps_peer_cmd {} __packed;

/* 128 clients = 4 words */
#define WMI_TIM_BITMAP_ARRAY_SIZE

struct wmi_tim_info {} __packed;

struct wmi_tim_info_arg {} __packed;

/* Maximum number of NOA Descriptors supported */
#define WMI_P2P_MAX_NOA_DESCRIPTORS
#define WMI_P2P_OPPPS_ENABLE_BIT
#define WMI_P2P_OPPPS_CTWINDOW_OFFSET
#define WMI_P2P_NOA_CHANGED_BIT

struct wmi_p2p_noa_info {} __packed;

struct wmi_bcn_info {} __packed;

struct wmi_host_swba_event {} __packed;

struct wmi_10_2_4_bcn_info {} __packed;

struct wmi_10_2_4_host_swba_event {} __packed;

/* 16 words = 512 client + 1 word = for guard */
#define WMI_10_4_TIM_BITMAP_ARRAY_SIZE

struct wmi_10_4_tim_info {} __packed;

#define WMI_10_4_P2P_MAX_NOA_DESCRIPTORS

struct wmi_10_4_p2p_noa_info {} __packed;

struct wmi_10_4_bcn_info {} __packed;

struct wmi_10_4_host_swba_event {} __packed;

#define WMI_MAX_AP_VDEV

struct wmi_tbtt_offset_event {} __packed;

struct wmi_peer_create_cmd {} __packed;

enum wmi_peer_type {};

struct wmi_peer_delete_cmd {} __packed;

struct wmi_peer_flush_tids_cmd {} __packed;

struct wmi_fixed_rate {} __packed;

struct wmi_peer_fixed_rate_cmd {} __packed;

#define WMI_MGMT_TID

struct wmi_addba_clear_resp_cmd {} __packed;

struct wmi_addba_send_cmd {} __packed;

struct wmi_delba_send_cmd {} __packed;

struct wmi_addba_setresponse_cmd {} __packed;

struct wmi_send_singleamsdu_cmd {} __packed;

enum wmi_peer_smps_state {};

enum wmi_peer_chwidth {};

enum wmi_peer_param {};

struct wmi_peer_set_param_cmd {} __packed;

#define MAX_SUPPORTED_RATES

struct wmi_rate_set {} __packed;

struct wmi_rate_set_arg {};

/*
 * NOTE: It would bea good idea to represent the Tx MCS
 * info in one word and Rx in another word. This is split
 * into multiple words for convenience
 */
struct wmi_vht_rate_set {} __packed;

struct wmi_vht_rate_set_arg {};

struct wmi_peer_set_rates_cmd {} __packed;

struct wmi_peer_set_q_empty_callback_cmd {} __packed;

struct wmi_peer_flags_map {};

enum wmi_peer_flags {};

enum wmi_10x_peer_flags {};

enum wmi_10_2_peer_flags {};

/*
 * Peer rate capabilities.
 *
 * This is of interest to the ratecontrol
 * module which resides in the firmware. The bit definitions are
 * consistent with that defined in if_athrate.c.
 */
#define WMI_RC_DS_FLAG
#define WMI_RC_CW40_FLAG
#define WMI_RC_SGI_FLAG
#define WMI_RC_HT_FLAG
#define WMI_RC_RTSCTS_FLAG
#define WMI_RC_TX_STBC_FLAG
#define WMI_RC_RX_STBC_FLAG
#define WMI_RC_RX_STBC_FLAG_S
#define WMI_RC_WEP_TKIP_FLAG
#define WMI_RC_TS_FLAG
#define WMI_RC_UAPSD_FLAG

/* Maximum listen interval supported by hw in units of beacon interval */
#define ATH10K_MAX_HW_LISTEN_INTERVAL

struct wmi_common_peer_assoc_complete_cmd {};

struct wmi_main_peer_assoc_complete_cmd {} __packed;

struct wmi_10_1_peer_assoc_complete_cmd {} __packed;

#define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB
#define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK
#define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB
#define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK

struct wmi_10_2_peer_assoc_complete_cmd {} __packed;

/* NSS Mapping to FW */
#define WMI_PEER_NSS_MAP_ENABLE
#define WMI_PEER_NSS_160MHZ_MASK
#define WMI_PEER_NSS_80_80MHZ_MASK

struct wmi_10_4_peer_assoc_complete_cmd {} __packed;

struct wmi_peer_assoc_complete_arg {};

struct wmi_peer_add_wds_entry_cmd {} __packed;

struct wmi_peer_remove_wds_entry_cmd {} __packed;

struct wmi_peer_q_empty_callback_event {} __packed;

/*
 * Channel info WMI event
 */
struct wmi_chan_info_event {} __packed;

struct wmi_10_4_chan_info_event {} __packed;

struct wmi_peer_sta_kickout_event {} __packed;

#define WMI_CHAN_INFO_FLAG_COMPLETE
#define WMI_CHAN_INFO_FLAG_PRE_COMPLETE

/* Beacon filter wmi command info */
#define BCN_FLT_MAX_SUPPORTED_IES
#define BCN_FLT_MAX_ELEMS_IE_LIST

struct bss_bcn_stats {} __packed;

struct bcn_filter_stats {} __packed;

struct wmi_add_bcn_filter_cmd {} __packed;

enum wmi_sta_keepalive_method {};

#define WMI_STA_KEEPALIVE_INTERVAL_DISABLE

/* Firmware crashes if keepalive interval exceeds this limit */
#define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS

/* note: ip4 addresses are in network byte order, i.e. big endian */
struct wmi_sta_keepalive_arp_resp {} __packed;

struct wmi_sta_keepalive_cmd {} __packed;

struct wmi_sta_keepalive_arg {};

enum wmi_force_fw_hang_type {};

#define WMI_FORCE_FW_HANG_RANDOM_TIME

struct wmi_force_fw_hang_cmd {} __packed;

enum wmi_pdev_reset_mode_type {};

enum ath10k_dbglog_level {};

/* VAP ids to enable dbglog */
#define ATH10K_DBGLOG_CFG_VAP_LOG_LSB
#define ATH10K_DBGLOG_CFG_VAP_LOG_MASK

/* to enable dbglog in the firmware */
#define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB
#define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK

/* timestamp resolution */
#define ATH10K_DBGLOG_CFG_RESOLUTION_LSB
#define ATH10K_DBGLOG_CFG_RESOLUTION_MASK

/* number of queued messages before sending them to the host */
#define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB
#define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK

/*
 * Log levels to enable. This defines the minimum level to enable, this is
 * not a bitmask. See enum ath10k_dbglog_level for the values.
 */
#define ATH10K_DBGLOG_CFG_LOG_LVL_LSB
#define ATH10K_DBGLOG_CFG_LOG_LVL_MASK

/*
 * Note: this is a cleaned up version of a struct firmware uses. For
 * example, config_valid was hidden inside an array.
 */
struct wmi_dbglog_cfg_cmd {} __packed;

struct wmi_10_4_dbglog_cfg_cmd {} __packed;

enum wmi_roam_reason {};

struct wmi_roam_ev {} __packed;

#define ATH10K_FRAGMT_THRESHOLD_MIN
#define ATH10K_FRAGMT_THRESHOLD_MAX

#define WMI_MAX_EVENT
/* Maximum number of pending TXed WMI packets */
#define WMI_SKB_HEADROOM

/* By default disable power save for IBSS */
#define ATH10K_DEFAULT_ATIM

#define WMI_MAX_MEM_REQS

struct wmi_scan_ev_arg {};

struct mgmt_tx_compl_params {};

struct wmi_tlv_mgmt_tx_compl_ev_arg {};

struct wmi_tlv_mgmt_tx_bundle_compl_ev_arg {};

struct wmi_peer_delete_resp_ev_arg {};

#define WMI_MGMT_RX_NUM_RSSI
struct wmi_mgmt_rx_ev_arg {};

struct wmi_ch_info_ev_arg {};

/* From 10.4 firmware, not sure all have the same values. */
enum wmi_vdev_start_status {};

struct wmi_vdev_start_ev_arg {};

struct wmi_peer_kick_ev_arg {};

struct wmi_swba_ev_arg {};

struct wmi_phyerr_ev_arg {};

struct wmi_phyerr_hdr_arg {};

struct wmi_dfs_status_ev_arg {};

struct wmi_svc_rdy_ev_arg {};

struct wmi_svc_avail_ev_arg {};

struct wmi_rdy_ev_arg {};

struct wmi_roam_ev_arg {};

struct wmi_echo_ev_arg {};

struct wmi_pdev_temperature_event {} __packed;

struct wmi_pdev_bss_chan_info_event {} __packed;

/* WOW structures */
enum wmi_wow_wakeup_event {};

#define C2S

static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
{}

enum wmi_wow_wake_reason {};

static inline const char *wow_reason(enum wmi_wow_wake_reason reason)
{}

#undef C2S

struct wmi_wow_ev_arg {};

#define WOW_MIN_PATTERN_SIZE
#define WOW_MAX_PATTERN_SIZE
#define WOW_MAX_PKT_OFFSET
#define WOW_HDR_LEN
#define WOW_MAX_REDUCE

enum wmi_tdls_state {};

enum wmi_tdls_peer_state {};

struct wmi_tdls_peer_update_cmd_arg {};

#define WMI_TDLS_MAX_SUPP_OPER_CLASSES

#define WMI_TDLS_PEER_SP_MASK
#define WMI_TDLS_PEER_SP_LSB

enum wmi_tdls_options {};

enum {};

struct wmi_tdls_peer_capab_arg {};

struct wmi_10_4_tdls_set_state_cmd {} __packed;

struct wmi_tdls_peer_capabilities {} __packed;

struct wmi_10_4_tdls_peer_update_cmd {} __packed;

enum wmi_tdls_peer_reason {};

enum wmi_tdls_peer_notification {};

struct wmi_tdls_peer_event {} __packed;

enum wmi_tid_aggr_control_conf {};

enum wmi_noack_tid_conf {};

enum wmi_tid_rate_ctrl_conf {};

enum wmi_tid_rtscts_control_conf {};

enum wmi_ext_tid_config_map {};

struct wmi_per_peer_per_tid_cfg_arg {};

struct wmi_peer_per_tid_cfg_cmd {} __packed;

enum wmi_txbf_conf {};

#define WMI_CCA_DETECT_LEVEL_AUTO
#define WMI_CCA_DETECT_MARGIN_AUTO

struct wmi_pdev_set_adaptive_cca_params {} __packed;

#define WMI_PNO_MAX_SCHED_SCAN_PLANS
#define WMI_PNO_MAX_SCHED_SCAN_PLAN_INT
#define WMI_PNO_MAX_SCHED_SCAN_PLAN_ITRNS
#define WMI_PNO_MAX_NETW_CHANNELS
#define WMI_PNO_MAX_NETW_CHANNELS_EX
#define WMI_PNO_MAX_SUPP_NETWORKS
#define WMI_PNO_MAX_IE_LENGTH

/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
#define WMI_PNO_MAX_PB_REQ_SIZE

#define WMI_PNO_24G_DEFAULT_CH
#define WMI_PNO_5G_DEFAULT_CH

#define WMI_ACTIVE_MAX_CHANNEL_TIME
#define WMI_PASSIVE_MAX_CHANNEL_TIME

/* SSID broadcast type */
enum wmi_SSID_bcast_type {};

struct wmi_network_type {} __packed;

struct wmi_pno_scan_req {} __packed;

enum wmi_host_platform_type {};

enum wmi_bss_survey_req_type {};

struct wmi_pdev_chan_info_req_cmd {} __packed;

/* bb timing register configurations */
struct wmi_bb_timing_cfg_arg {};

struct wmi_pdev_bb_timing_cfg_cmd {} __packed;

struct ath10k;
struct ath10k_vif;
struct ath10k_fw_stats_pdev;
struct ath10k_fw_stats_peer;
struct ath10k_fw_stats;

int ath10k_wmi_attach(struct ath10k *ar);
void ath10k_wmi_detach(struct ath10k *ar);
void ath10k_wmi_free_host_mem(struct ath10k *ar);
int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);

struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
int ath10k_wmi_connect(struct ath10k *ar);

int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
			       u32 cmd_id);
void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *arg);

void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
				     struct ath10k_fw_stats_pdev *dst);
void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
				   struct ath10k_fw_stats_pdev *dst);
void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
				   struct ath10k_fw_stats_pdev *dst);
void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
				      struct ath10k_fw_stats_pdev *dst);
void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
				struct ath10k_fw_stats_peer *dst);
void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
				    struct wmi_host_mem_chunks *chunks);
void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
				      const struct wmi_start_scan_arg *arg);
void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
			      const struct wmi_wmm_params_arg *arg);
void ath10k_wmi_put_wmi_channel(struct ath10k *ar, struct wmi_channel *ch,
				const struct wmi_channel_arg *arg);
int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);

int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_event_mgmt_tx_compl(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_event_mgmt_tx_bundle_compl(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_dfs(struct ath10k *ar,
			  struct wmi_phyerr_ev_arg *phyerr, u64 tsf);
void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
				    struct wmi_phyerr_ev_arg *phyerr,
				    u64 tsf);
void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
					     struct sk_buff *skb);
void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
					     struct sk_buff *skb);
void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
					 struct sk_buff *skb);
void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
						struct sk_buff *skb);
void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
void ath10k_wmi_event_service_available(struct ath10k *ar, struct sk_buff *skb);
int ath10k_wmi_op_pull_phyerr_ev(struct ath10k *ar, const void *phyerr_buf,
				 int left_len, struct wmi_phyerr_ev_arg *arg);
void ath10k_wmi_main_op_fw_stats_fill(struct ath10k *ar,
				      struct ath10k_fw_stats *fw_stats,
				      char *buf);
void ath10k_wmi_10x_op_fw_stats_fill(struct ath10k *ar,
				     struct ath10k_fw_stats *fw_stats,
				     char *buf);
void ath10k_wmi_10_4_op_fw_stats_fill(struct ath10k *ar,
				      struct ath10k_fw_stats *fw_stats,
				      char *buf);
int ath10k_wmi_op_get_vdev_subtype(struct ath10k *ar,
				   enum wmi_vdev_subtype subtype);
int ath10k_wmi_barrier(struct ath10k *ar);
void ath10k_wmi_tpc_config_get_rate_code(u8 *rate_code, u16 *pream_table,
					 u32 num_tx_chain);
void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb);

#endif /* _WMI_H_ */