/* 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.
*/
/* * 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. *
*/
/* * 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.
*/ typedef __s32 __bitwise a_sle32;
/* 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) \
((svc_id) >= (len) && \
__le32_to_cpu((wmi_svc_bmap)[((svc_id) - (len)) / 28]) & \
BIT(((((svc_id) - (len)) % 28) & 0x1f) + 4))
#define SVCMAP(x, y, len) \ do { \ if ((WMI_SERVICE_IS_ENABLED((in), (x), (len))) || \
(WMI_EXT_SERVICE_IS_ENABLED((in), (x), (len)))) \
__set_bit(y, out); \
} while (0)
/* commands to directly control BA negotiation directly from host. */
WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
WMI_ADDBA_SEND_CMDID,
WMI_ADDBA_STATUS_CMDID,
WMI_DELBA_SEND_CMDID,
WMI_ADDBA_SET_RESP_CMDID,
WMI_SEND_SINGLEAMSDU_CMDID,
/* Station power save specific config */
WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
WMI_STA_POWERSAVE_PARAM_CMDID,
WMI_STA_MIMO_PS_MODE_CMDID,
/* addba specific commands */
WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
WMI_PEER_TID_DELBA_CMDID,
/* set station mimo powersave method */
WMI_STA_DTIM_PS_METHOD_CMDID, /* Configure the Station UAPSD AC Auto Trigger Parameters */
WMI_STA_UAPSD_AUTO_TRIG_CMDID,
/* commands to directly control ba negotiation directly from host. */
WMI_10X_ADDBA_CLEAR_RESP_CMDID,
WMI_10X_ADDBA_SEND_CMDID,
WMI_10X_ADDBA_STATUS_CMDID,
WMI_10X_DELBA_SEND_CMDID,
WMI_10X_ADDBA_SET_RESP_CMDID,
WMI_10X_SEND_SINGLEAMSDU_CMDID,
/* Station power save specific config */
WMI_10X_STA_POWERSAVE_MODE_CMDID,
WMI_10X_STA_POWERSAVE_PARAM_CMDID,
WMI_10X_STA_MIMO_PS_MODE_CMDID,
/* set debug log config */
WMI_10X_DBGLOG_CFG_CMDID,
/* PHY Error specific WMI event */
WMI_10X_PHYERR_EVENTID,
/* Roam event to trigger roaming on host */
WMI_10X_ROAM_EVENTID,
/* matching AP found from list of profiles */
WMI_10X_PROFILE_MATCH,
/* debug print message used for tracing FW code while debugging */
WMI_10X_DEBUG_PRINT_EVENTID, /* VI spoecific event */
WMI_10X_PDEV_QVIT_EVENTID, /* FW code profile data in response to profile request */
WMI_10X_WLAN_PROFILE_DATA_EVENTID,
/*RTT related event ID*/
WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
WMI_10X_RTT_ERROR_REPORT_EVENTID,
staticinlineconstchar *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
{ switch (mode) { case MODE_11A: return"11a"; case MODE_11G: return"11g"; case MODE_11B: return"11b"; case MODE_11GONLY: return"11gonly"; case MODE_11NA_HT20: return"11na-ht20"; case MODE_11NG_HT20: return"11ng-ht20"; case MODE_11NA_HT40: return"11na-ht40"; case MODE_11NG_HT40: return"11ng-ht40"; case MODE_11AC_VHT20: return"11ac-vht20"; case MODE_11AC_VHT40: return"11ac-vht40"; case MODE_11AC_VHT80: return"11ac-vht80"; case MODE_11AC_VHT160: return"11ac-vht160"; case MODE_11AC_VHT80_80: return"11ac-vht80+80"; case MODE_11AC_VHT20_2G: return"11ac-vht20-2g"; case MODE_11AC_VHT40_2G: return"11ac-vht40-2g"; case MODE_11AC_VHT80_2G: return"11ac-vht80-2g"; case MODE_UNKNOWN: /* skip */ break;
/* no default handler to allow compiler to check that the * enum is fully handled
*/
}
/* * 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.
*/
/* The following also refer for max HT AMSDU */ #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
/* structure used by FW for requesting host memory */ struct wlan_host_mem_req { /* ID of the request */
__le32 req_id; /* size of the of each unit */
__le32 unit_size; /* flags to indicate that * the number units is dependent * on number of resources(num vdevs num peers .. etc)
*/
__le32 num_unit_info; /* * actual number of units to allocate . if flags in the num_unit_info * indicate that number of units is tied to number of a particular * resource to allocate then num_units filed is set to 0 and host * will derive the number units from number of the resources it is * requesting.
*/
__le32 num_units;
} __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 {
__le32 sw_version;
__le32 sw_version_1;
__le32 abi_version; /* WMI_PHY_CAPABILITY */
__le32 phy_capability; /* Maximum number of frag table entries that SW will populate less 1 */
__le32 max_frag_entry;
__le32 wmi_service_bitmap[16];
__le32 num_rf_chains; /* * The following field is only valid for service type * WMI_SERVICE_11AC
*/
__le32 ht_cap_info; /* WMI HT Capability */
__le32 vht_cap_info; /* VHT capability info field of 802.11ac */
__le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
__le32 hw_min_tx_power;
__le32 hw_max_tx_power; struct hal_reg_capabilities hal_reg_capabilities;
__le32 sys_cap_info;
__le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */ /* * Max beacon and Probe Response IE offload size * (includes optional P2P IEs)
*/
__le32 max_bcn_ie_size; /* * request to host to allocate a chuck of memory and pss it down to FW * via WM_INIT. FW uses this as FW extesnsion memory for saving its * data structures. Only valid for low latency interfaces like PCIE * where FW can access this memory directly (or) by DMA.
*/
__le32 num_mem_reqs; struct wlan_host_mem_req mem_reqs[];
} __packed;
/* This is the definition from 10.X firmware branch */ struct wmi_10x_service_ready_event {
__le32 sw_version;
__le32 abi_version;
/* WMI_PHY_CAPABILITY */
__le32 phy_capability;
/* Maximum number of frag table entries that SW will populate less 1 */
__le32 max_frag_entry;
__le32 wmi_service_bitmap[16];
__le32 num_rf_chains;
/* * The following field is only valid for service type * WMI_SERVICE_11AC
*/
__le32 ht_cap_info; /* WMI HT Capability */
__le32 vht_cap_info; /* VHT capability info field of 802.11ac */
__le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
__le32 hw_min_tx_power;
__le32 hw_max_tx_power;
/* * request to host to allocate a chuck of memory and pss it down to FW * via WM_INIT. FW uses this as FW extesnsion memory for saving its * data structures. Only valid for low latency interfaces like PCIE * where FW can access this memory directly (or) by DMA.
*/
__le32 num_mem_reqs;
struct wmi_resource_config { /* number of virtual devices (VAPs) to support */
__le32 num_vdevs;
/* number of peer nodes to support */
__le32 num_peers;
/* * In offload mode target supports features like WOW, chatter and * other protocol offloads. In order to support them some * functionalities like reorder buffering, PN checking need to be * done in target. This determines maximum number of peers supported * by target in offload mode
*/
__le32 num_offload_peers;
/* For target-based RX reordering */
__le32 num_offload_reorder_bufs;
/* number of keys per peer */
__le32 num_peer_keys;
/* total number of TX/RX data TIDs */
__le32 num_tids;
/* * max skid for resolving hash collisions * * The address search table is sparse, so that if two MAC addresses * result in the same hash value, the second of these conflicting * entries can slide to the next index in the address search table, * and use it, if it is unoccupied. This ast_skid_limit parameter * specifies the upper bound on how many subsequent indices to search * over to find an unoccupied space.
*/
__le32 ast_skid_limit;
/* * the nominal chain mask for transmit * * The chain mask may be modified dynamically, e.g. to operate AP * tx with a reduced number of chains if no clients are associated. * This configuration parameter specifies the nominal chain-mask that * should be used when not operating with a reduced set of tx chains.
*/
__le32 tx_chain_mask;
/* * the nominal chain mask for receive * * The chain mask may be modified dynamically, e.g. for a client * to use a reduced number of chains for receive if the traffic to * the client is low enough that it doesn't require downlink MIMO * or antenna diversity. * This configuration parameter specifies the nominal chain-mask that * should be used when not operating with a reduced set of rx chains.
*/
__le32 rx_chain_mask;
/* * what rx reorder timeout (ms) to use for the AC * * Each WMM access class (voice, video, best-effort, background) will * have its own timeout value to dictate how long to wait for missing * rx MPDUs to arrive before flushing subsequent MPDUs that have * already been received. * This parameter specifies the timeout in milliseconds for each * class.
*/
__le32 rx_timeout_pri_vi;
__le32 rx_timeout_pri_vo;
__le32 rx_timeout_pri_be;
__le32 rx_timeout_pri_bk;
/* * what mode the rx should decap packets to * * MAC can decap to RAW (no decap), native wifi or Ethernet types * THis setting also determines the default TX behavior, however TX * behavior can be modified on a per VAP basis during VAP init
*/
__le32 rx_decap_mode;
/* what is the maximum number of scan requests that can be queued */
__le32 scan_max_pending_reqs;
/* maximum VDEV that could use BMISS offload */
__le32 bmiss_offload_max_vdev;
/* maximum VDEV that could use offload roaming */
__le32 roam_offload_max_vdev;
/* maximum AP profiles that would push to offload roaming */
__le32 roam_offload_max_ap_profiles;
/* * how many groups to use for mcast->ucast conversion * * The target's WAL maintains a table to hold information regarding * which peers belong to a given multicast group, so that if * multicast->unicast conversion is enabled, the target can convert * multicast tx frames to a series of unicast tx frames, to each * peer within the multicast group. This num_mcast_groups configuration parameter tells the target how * many multicast groups to provide storage for within its multicast * group membership table.
*/
__le32 num_mcast_groups;
/* * size to alloc for the mcast membership table * * This num_mcast_table_elems configuration parameter tells the * target how many peer elements it needs to provide storage for in * its multicast group membership table. * These multicast group membership table elements are shared by the * multicast groups stored within the table.
*/
__le32 num_mcast_table_elems;
/* * whether/how to do multicast->unicast conversion * * This configuration parameter specifies whether the target should * perform multicast --> unicast conversion on transmit, and if so, * what to do if it finds no entries in its multicast group * membership table for the multicast IP address in the tx frame. * Configuration value: * 0 -> Do not perform multicast to unicast conversion. * 1 -> Convert multicast frames to unicast, if the IP multicast * address from the tx frame is found in the multicast group * membership table. If the IP multicast address is not found, * drop the frame. * 2 -> Convert multicast frames to unicast, if the IP multicast * address from the tx frame is found in the multicast group * membership table. If the IP multicast address is not found, * transmit the frame as multicast.
*/
__le32 mcast2ucast_mode;
/* * how much memory to allocate for a tx PPDU dbg log * * This parameter controls how much memory the target will allocate * to store a log of tx PPDU meta-information (how large the PPDU * was, when it was sent, whether it was successful, etc.)
*/
__le32 tx_dbg_log_size;
/* how many AST entries to be allocated for WDS */
__le32 num_wds_entries;
/* * MAC DMA burst size, e.g., For target PCI limit can be * 0 -default, 1 256B
*/
__le32 dma_burst_size;
/* * Fixed delimiters to be inserted after every MPDU to * account for interface latency to avoid underrun.
*/
__le32 mac_aggr_delim;
/* * determine whether target is responsible for detecting duplicate * non-aggregate MPDU and timing out stale fragments. * * A-MPDU reordering is always performed on the target. * * 0: target responsible for frag timeout and dup checking * 1: host responsible for frag timeout and dup checking
*/
__le32 rx_skip_defrag_timeout_dup_detection_check;
/* * Configuration for VoW : * No of Video Nodes to be supported * and Max no of descriptors for each Video link (node).
*/
__le32 vow_config;
/* maximum VDEV that could use GTK offload */
__le32 gtk_offload_max_vdev;
/* Number of msdu descriptors target should use */
__le32 num_msdu_desc;
/* * Max. number of Tx fragments per MSDU * This parameter controls the max number of Tx fragments per MSDU. * This is sent by the target as part of the WMI_SERVICE_READY event * and is overridden by the OS shim as required.
*/
__le32 max_frag_entries;
} __packed;
struct wmi_resource_config_10x { /* number of virtual devices (VAPs) to support */
__le32 num_vdevs;
/* number of peer nodes to support */
__le32 num_peers;
/* number of keys per peer */
__le32 num_peer_keys;
/* total number of TX/RX data TIDs */
__le32 num_tids;
/* * max skid for resolving hash collisions * * The address search table is sparse, so that if two MAC addresses * result in the same hash value, the second of these conflicting * entries can slide to the next index in the address search table, * and use it, if it is unoccupied. This ast_skid_limit parameter * specifies the upper bound on how many subsequent indices to search * over to find an unoccupied space.
*/
__le32 ast_skid_limit;
/* * the nominal chain mask for transmit * * The chain mask may be modified dynamically, e.g. to operate AP * tx with a reduced number of chains if no clients are associated. * This configuration parameter specifies the nominal chain-mask that * should be used when not operating with a reduced set of tx chains.
*/
__le32 tx_chain_mask;
/* * the nominal chain mask for receive * * The chain mask may be modified dynamically, e.g. for a client * to use a reduced number of chains for receive if the traffic to * the client is low enough that it doesn't require downlink MIMO * or antenna diversity. * This configuration parameter specifies the nominal chain-mask that * should be used when not operating with a reduced set of rx chains.
*/
__le32 rx_chain_mask;
/* * what rx reorder timeout (ms) to use for the AC * * Each WMM access class (voice, video, best-effort, background) will * have its own timeout value to dictate how long to wait for missing * rx MPDUs to arrive before flushing subsequent MPDUs that have * already been received. * This parameter specifies the timeout in milliseconds for each * class.
*/
__le32 rx_timeout_pri_vi;
__le32 rx_timeout_pri_vo;
__le32 rx_timeout_pri_be;
__le32 rx_timeout_pri_bk;
/* * what mode the rx should decap packets to * * MAC can decap to RAW (no decap), native wifi or Ethernet types * THis setting also determines the default TX behavior, however TX * behavior can be modified on a per VAP basis during VAP init
*/
__le32 rx_decap_mode;
/* what is the maximum number of scan requests that can be queued */
__le32 scan_max_pending_reqs;
/* maximum VDEV that could use BMISS offload */
__le32 bmiss_offload_max_vdev;
/* maximum VDEV that could use offload roaming */
__le32 roam_offload_max_vdev;
/* maximum AP profiles that would push to offload roaming */
__le32 roam_offload_max_ap_profiles;
/* * how many groups to use for mcast->ucast conversion * * The target's WAL maintains a table to hold information regarding * which peers belong to a given multicast group, so that if * multicast->unicast conversion is enabled, the target can convert * multicast tx frames to a series of unicast tx frames, to each * peer within the multicast group. This num_mcast_groups configuration parameter tells the target how * many multicast groups to provide storage for within its multicast * group membership table.
*/
__le32 num_mcast_groups;
/* * size to alloc for the mcast membership table * * This num_mcast_table_elems configuration parameter tells the * target how many peer elements it needs to provide storage for in * its multicast group membership table. * These multicast group membership table elements are shared by the * multicast groups stored within the table.
*/
__le32 num_mcast_table_elems;
/* * whether/how to do multicast->unicast conversion * * This configuration parameter specifies whether the target should * perform multicast --> unicast conversion on transmit, and if so, * what to do if it finds no entries in its multicast group * membership table for the multicast IP address in the tx frame. * Configuration value: * 0 -> Do not perform multicast to unicast conversion. * 1 -> Convert multicast frames to unicast, if the IP multicast * address from the tx frame is found in the multicast group * membership table. If the IP multicast address is not found, * drop the frame. * 2 -> Convert multicast frames to unicast, if the IP multicast * address from the tx frame is found in the multicast group * membership table. If the IP multicast address is not found, * transmit the frame as multicast.
*/
__le32 mcast2ucast_mode;
/* * how much memory to allocate for a tx PPDU dbg log * * This parameter controls how much memory the target will allocate * to store a log of tx PPDU meta-information (how large the PPDU * was, when it was sent, whether it was successful, etc.)
*/
__le32 tx_dbg_log_size;
/* how many AST entries to be allocated for WDS */
__le32 num_wds_entries;
/* * MAC DMA burst size, e.g., For target PCI limit can be * 0 -default, 1 256B
*/
__le32 dma_burst_size;
/* * Fixed delimiters to be inserted after every MPDU to * account for interface latency to avoid underrun.
*/
__le32 mac_aggr_delim;
/* * determine whether target is responsible for detecting duplicate * non-aggregate MPDU and timing out stale fragments. * * A-MPDU reordering is always performed on the target. * * 0: target responsible for frag timeout and dup checking * 1: host responsible for frag timeout and dup checking
*/
__le32 rx_skip_defrag_timeout_dup_detection_check;
/* * Configuration for VoW : * No of Video Nodes to be supported * and Max no of descriptors for each Video link (node).
*/
__le32 vow_config;
/* Number of msdu descriptors target should use */
__le32 num_msdu_desc;
/* * Max. number of Tx fragments per MSDU * This parameter controls the max number of Tx fragments per MSDU. * This is sent by the target as part of the WMI_SERVICE_READY event * and is overridden by the OS shim as required.
*/
__le32 max_frag_entries;
} __packed;
struct wmi_resource_config_10_4 { /* Number of virtual devices (VAPs) to support */
__le32 num_vdevs;
/* Number of peer nodes to support */
__le32 num_peers;
/* Number of active peer nodes to support */
__le32 num_active_peers;
/* In offload mode, target supports features like WOW, chatter and other * protocol offloads. In order to support them some functionalities like * reorder buffering, PN checking need to be done in target. * This determines maximum number of peers supported by target in * offload mode.
*/
__le32 num_offload_peers;
/* Number of reorder buffers available for doing target based reorder * Rx reorder buffering
*/
__le32 num_offload_reorder_buffs;
/* Number of keys per peer */
__le32 num_peer_keys;
/* Total number of TX/RX data TIDs */
__le32 num_tids;
/* Max skid for resolving hash collisions. * The address search table is sparse, so that if two MAC addresses * result in the same hash value, the second of these conflicting * entries can slide to the next index in the address search table, * and use it, if it is unoccupied. This ast_skid_limit parameter * specifies the upper bound on how many subsequent indices to search * over to find an unoccupied space.
*/
__le32 ast_skid_limit;
/* The nominal chain mask for transmit. * The chain mask may be modified dynamically, e.g. to operate AP tx * with a reduced number of chains if no clients are associated. * This configuration parameter specifies the nominal chain-mask that * should be used when not operating with a reduced set of tx chains.
*/
__le32 tx_chain_mask;
/* The nominal chain mask for receive. * The chain mask may be modified dynamically, e.g. for a client to use * a reduced number of chains for receive if the traffic to the client * is low enough that it doesn't require downlink MIMO or antenna * diversity. This configuration parameter specifies the nominal * chain-mask that should be used when not operating with a reduced * set of rx chains.
*/
__le32 rx_chain_mask;
/* What rx reorder timeout (ms) to use for the AC. * Each WMM access class (voice, video, best-effort, background) will * have its own timeout value to dictate how long to wait for missing * rx MPDUs to arrive before flushing subsequent MPDUs that have already * been received. This parameter specifies the timeout in milliseconds * for each class.
*/
__le32 rx_timeout_pri[4];
/* What mode the rx should decap packets to. * MAC can decap to RAW (no decap), native wifi or Ethernet types. * This setting also determines the default TX behavior, however TX * behavior can be modified on a per VAP basis during VAP init
*/
__le32 rx_decap_mode;
__le32 scan_max_pending_req;
__le32 bmiss_offload_max_vdev;
__le32 roam_offload_max_vdev;
__le32 roam_offload_max_ap_profiles;
/* How many groups to use for mcast->ucast conversion. * The target's WAL maintains a table to hold information regarding * which peers belong to a given multicast group, so that if * multicast->unicast conversion is enabled, the target can convert * multicast tx frames to a series of unicast tx frames, to each peer * within the multicast group. This num_mcast_groups configuration * parameter tells the target how many multicast groups to provide * storage for within its multicast group membership table.
*/
__le32 num_mcast_groups;
/* Size to alloc for the mcast membership table. * This num_mcast_table_elems configuration parameter tells the target * how many peer elements it needs to provide storage for in its * multicast group membership table. These multicast group membership * table elements are shared by the multicast groups stored within * the table.
*/
__le32 num_mcast_table_elems;
/* Whether/how to do multicast->unicast conversion. * This configuration parameter specifies whether the target should * perform multicast --> unicast conversion on transmit, and if so, * what to do if it finds no entries in its multicast group membership * table for the multicast IP address in the tx frame. * Configuration value: * 0 -> Do not perform multicast to unicast conversion. * 1 -> Convert multicast frames to unicast, if the IP multicast address * from the tx frame is found in the multicast group membership * table. If the IP multicast address is not found, drop the frame * 2 -> Convert multicast frames to unicast, if the IP multicast address * from the tx frame is found in the multicast group membership * table. If the IP multicast address is not found, transmit the * frame as multicast.
*/
__le32 mcast2ucast_mode;
/* How much memory to allocate for a tx PPDU dbg log. * This parameter controls how much memory the target will allocate to * store a log of tx PPDU meta-information (how large the PPDU was, * when it was sent, whether it was successful, etc.)
*/
__le32 tx_dbg_log_size;
/* How many AST entries to be allocated for WDS */
__le32 num_wds_entries;
/* Fixed delimiters to be inserted after every MPDU to account for * interface latency to avoid underrun.
*/
__le32 mac_aggr_delim;
/* Determine whether target is responsible for detecting duplicate * non-aggregate MPDU and timing out stale fragments. A-MPDU reordering * is always performed on the target. * * 0: target responsible for frag timeout and dup checking * 1: host responsible for frag timeout and dup checking
*/
__le32 rx_skip_defrag_timeout_dup_detection_check;
/* Configuration for VoW : No of Video nodes to be supported and max * no of descriptors for each video link (node).
*/
__le32 vow_config;
/* Maximum vdev that could use gtk offload */
__le32 gtk_offload_max_vdev;
/* Number of msdu descriptors target should use */
__le32 num_msdu_desc;
/* Max number of tx fragments per MSDU. * This parameter controls the max number of tx fragments per MSDU. * This will passed by target as part of the WMI_SERVICE_READY event * and is overridden by the OS shim as required.
*/
__le32 max_frag_entries;
/* Max number of extended peer stats. * This parameter controls the max number of peers for which extended * statistics are supported by target
*/
__le32 max_peer_ext_stats;
/* Smart antenna capabilities information. * 1 - Smart antenna is enabled * 0 - Smart antenna is disabled * In future this can contain smart antenna specific capabilities.
*/
__le32 smart_ant_cap;
/* User can configure the buffers allocated for each AC (BE, BK, VI, VO) * during init.
*/
__le32 bk_minfree;
__le32 be_minfree;
__le32 vi_minfree;
__le32 vo_minfree;
/* qwrap configuration (bits 15-0) * 1 - This is qwrap configuration * 0 - This is not qwrap * * Bits 31-16 is alloc_frag_desc_for_data_pkt (1 enables, 0 disables) * In order to get ack-RSSI reporting and to specify the tx-rate for * individual frames, this option must be enabled. This uses an extra * 4 bytes per tx-msdu descriptor, so don't enable it unless you need it.
*/
__le32 qwrap_config;
} __packed;
/* WMI_GPIO_CONFIG_CMDID */ struct wmi_gpio_config_cmd {
__le32 gpio_num; /* GPIO number to be setup */
__le32 input; /* 0 - Output/ 1 - Input */
__le32 pull_type; /* Pull type defined above */
__le32 intr_mode; /* Interrupt mode defined above (Input) */
} __packed;
/* WMI_GPIO_OUTPUT_CMDID */ struct wmi_gpio_output_cmd {
__le32 gpio_num; /* GPIO number to be setup */
__le32 set; /* Set the GPIO pin*/
} __packed;
/* WMI_GPIO_INPUT_EVENTID */ struct wmi_gpio_input_event {
__le32 gpio_num; /* GPIO number which changed state */
} __packed;
struct wmi_ext_resource_config_10_4_cmd { /* contains enum wmi_host_platform_type */
__le32 host_platform_config; /* see enum wmi_10_4_feature_mask */
__le32 fw_feature_bitmap; /* WLAN priority GPIO number */
__le32 wlan_gpio_priority; /* see enum wmi_coex_version */
__le32 coex_version; /* COEX GPIO config */
__le32 coex_gpio_pin1;
__le32 coex_gpio_pin2;
__le32 coex_gpio_pin3; /* number of vdevs allowed to perform tdls */
__le32 num_tdls_vdevs; /* number of peers to track per TDLS vdev */
__le32 num_tdls_conn_table_entries; /* number of tdls sleep sta supported */
__le32 max_tdls_concurrent_sleep_sta; /* number of tdls buffer sta supported */
__le32 max_tdls_concurrent_buffer_sta;
};
/* structure describing host memory chunk. */ struct host_memory_chunk { /* id of the request that is passed up in service ready */
__le32 req_id; /* the physical address the memory chunk */
__le32 ptr; /* size of the chunk */
__le32 size;
} __packed;
#define WMI_IRAM_RECOVERY_HOST_MEM_REQ_ID 8
struct wmi_host_mem_chunks {
__le32 count; /* some fw revisions require at least 1 chunk regardless of count */ union { struct host_memory_chunk item;
DECLARE_FLEX_ARRAY(struct host_memory_chunk, items);
};
} __packed;
/* prefix used by scan requestor ids on the host */ #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
/* 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 0xA000
/* 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 40
/* Scan priority numbers must be sequential, starting with 0 */ enum wmi_scan_priority {
WMI_SCAN_PRIORITY_VERY_LOW = 0,
WMI_SCAN_PRIORITY_LOW,
WMI_SCAN_PRIORITY_MEDIUM,
WMI_SCAN_PRIORITY_HIGH,
WMI_SCAN_PRIORITY_VERY_HIGH,
WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
};
struct wmi_start_scan_common { /* Scan ID */
__le32 scan_id; /* Scan requestor ID */
__le32 scan_req_id; /* VDEV id(interface) that is requesting scan */
__le32 vdev_id; /* Scan Priority, input to scan scheduler */
__le32 scan_priority; /* Scan events subscription */
__le32 notify_scan_events; /* dwell time in msec on active channels */
__le32 dwell_time_active; /* dwell time in msec on passive channels */
__le32 dwell_time_passive; /* * min time in msec on the BSS channel,only valid if at least one * VDEV is active
*/
__le32 min_rest_time; /* * max rest time in msec on the BSS channel,only valid if at least * one VDEV is active
*/ /* * the scanner will rest on the bss channel at least min_rest_time * after min_rest_time the scanner will start checking for tx/rx * activity on all VDEVs. if there is no activity the scanner will * switch to off channel. if there is activity the scanner will let * the radio on the bss channel until max_rest_time expires.at * max_rest_time scanner will switch to off channel irrespective of * activity. activity is determined by the idle_time parameter.
*/
__le32 max_rest_time; /* * time before sending next set of probe requests. * The scanner keeps repeating probe requests transmission with * period specified by repeat_probe_time. * The number of probe requests specified depends on the ssid_list * and bssid_list
*/
__le32 repeat_probe_time; /* time in msec between 2 consecutive probe requests with in a set. */
__le32 probe_spacing_time; /* * data inactivity time in msec on bss channel that will be used by * scanner for measuring the inactivity.
*/
__le32 idle_time; /* maximum time in msec allowed for scan */
__le32 max_scan_time; /* * delay in msec before sending first probe request after switching * to a channel
*/
__le32 probe_delay; /* Scan control flags */
__le32 scan_ctrl_flags;
} __packed;
/* passively scan all channels including active channels */ #define WMI_SCAN_FLAG_PASSIVE 0x1 /* add wild card ssid probe request even though ssid_list is specified. */ #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2 /* add cck rates to rates/xrate ie for the generated probe request */ #define WMI_SCAN_ADD_CCK_RATES 0x4 /* add ofdm rates to rates/xrate ie for the generated probe request */ #define WMI_SCAN_ADD_OFDM_RATES 0x8 /* To enable indication of Chan load and Noise floor to host */ #define WMI_SCAN_CHAN_STAT_EVENT 0x10 /* Filter Probe request frames */ #define WMI_SCAN_FILTER_PROBE_REQ 0x20 /* When set, DFS channels will not be scanned */ #define WMI_SCAN_BYPASS_DFS_CHN 0x40 /* 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 0x80
/* 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 0x1000
/* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */ #define WMI_SCAN_CLASS_MASK 0xFF000000
enum wmi_stop_scan_type {
WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
};
/* * 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 52
/* * 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 {
__le32 channel;
__le32 snr;
__le32 rate;
__le32 phy_mode;
__le32 buf_len;
__le32 status; /* %WMI_RX_STATUS_ */
} __packed;
/* Transmit power scale factor. */ enum wmi_tp_scale {
WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
WMI_TP_SCALE_MIN = 4, /* min, but still on */
WMI_TP_SCALE_SIZE = 5, /* max num of enum */
};
/* Customize the DSCP (bit) to TID (0-7) mapping for QOS */ #define WMI_DSCP_MAP_MAX (64) struct wmi_pdev_set_dscp_tid_map_cmd { /* map indicating DSCP to TID conversion */
__le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
} __packed;
/* suspend and disable all interrupts */
WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
};
struct wmi_pdev_suspend_cmd { /* suspend option sent to target */
__le32 suspend_opt;
} __packed;
struct wmi_stats_event {
__le32 stats_id; /* WMI_STAT_ */ /* * number of pdev stats event structures * (wmi_pdev_stats) 0 or 1
*/
__le32 num_pdev_stats; /* * number of vdev stats event structures * (wmi_vdev_stats) 0 or max vdevs
*/
__le32 num_vdev_stats; /* * number of peer stats event structures * (wmi_peer_stats) 0 or max peers
*/
__le32 num_peer_stats;
__le32 num_bcnflt_stats; /* * followed by * num_pdev_stats * size of(struct wmi_pdev_stats) * num_vdev_stats * size of(struct wmi_vdev_stats) * num_peer_stats * size of(struct wmi_peer_stats) * * By having a zero sized array, the pointer to data area * becomes available without increasing the struct size
*/
u8 data[];
} __packed;
/* values for vdev_start_request flags */ /* * Indicates that AP VDEV uses hidden ssid. only valid for * AP/GO
*/ #define WMI_VDEV_START_HIDDEN_SSID (1 << 0) /* * 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 (1 << 1)
struct wmi_p2p_noa_descriptor {
__le32 type_count; /* 255: continuous schedule, 0: reserved */
__le32 duration; /* Absent period duration in micro seconds */
__le32 interval; /* Absent period interval in micro seconds */
__le32 start_time; /* 32 bit tsf time when in starts */
} __packed;
struct wmi_vdev_start_request_cmd { /* WMI channel */ struct wmi_channel chan; /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* requestor id identifying the caller module */
__le32 requestor_id; /* beacon interval from received beacon */
__le32 beacon_interval; /* DTIM Period from the received beacon */
__le32 dtim_period; /* Flags */
__le32 flags; /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */ struct wmi_ssid ssid; /* beacon/probe response xmit rate. Applicable for SoftAP. */
__le32 bcn_tx_rate; /* beacon/probe response xmit power. Applicable for SoftAP. */
__le32 bcn_tx_power; /* number of p2p NOA descriptor(s) from scan entry */
__le32 num_noa_descriptors; /* * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID. * During CAC, Our HW shouldn't ack ditected frames
*/
__le32 disable_hw_ack; /* actual p2p NOA descriptor from scan entry */ struct wmi_p2p_noa_descriptor noa_descriptors[2];
} __packed;
/* Preamble types to be used with VDEV fixed rate configuration */ enum wmi_rate_preamble {
WMI_RATE_PREAMBLE_OFDM,
WMI_RATE_PREAMBLE_CCK,
WMI_RATE_PREAMBLE_HT,
WMI_RATE_PREAMBLE_VHT,
};
/* the definition of different VDEV parameters */ enum wmi_vdev_param { /* RTS Threshold */
WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1, /* Fragmentation threshold */
WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* beacon interval in TUs */
WMI_VDEV_PARAM_BEACON_INTERVAL, /* Listen interval in TUs */
WMI_VDEV_PARAM_LISTEN_INTERVAL, /* multicast rate in Mbps */
WMI_VDEV_PARAM_MULTICAST_RATE, /* management frame rate in Mbps */
WMI_VDEV_PARAM_MGMT_TX_RATE, /* slot time (long vs short) */
WMI_VDEV_PARAM_SLOT_TIME, /* preamble (long vs short) */
WMI_VDEV_PARAM_PREAMBLE, /* SWBA time (time before tbtt in msec) */
WMI_VDEV_PARAM_SWBA_TIME, /* time period for updating VDEV stats */
WMI_VDEV_STATS_UPDATE_PERIOD, /* age out time in msec for frames queued for station in power save */
WMI_VDEV_PWRSAVE_AGEOUT_TIME, /* * Host SWBA interval (time in msec before tbtt for SWBA event * generation).
*/
WMI_VDEV_HOST_SWBA_INTERVAL, /* DTIM period (specified in units of num beacon intervals) */
WMI_VDEV_PARAM_DTIM_PERIOD, /* * scheduler air time limit for this VDEV. used by off chan * scheduler.
*/
WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* enable/disable WDS for this VDEV */
WMI_VDEV_PARAM_WDS, /* ATIM Window */
WMI_VDEV_PARAM_ATIM_WINDOW, /* BMISS max */
WMI_VDEV_PARAM_BMISS_COUNT_MAX, /* BMISS first time */
WMI_VDEV_PARAM_BMISS_FIRST_BCNT, /* BMISS final time */
WMI_VDEV_PARAM_BMISS_FINAL_BCNT, /* WMM enables/disabled */
WMI_VDEV_PARAM_FEATURE_WMM, /* Channel width */
WMI_VDEV_PARAM_CHWIDTH, /* Channel Offset */
WMI_VDEV_PARAM_CHEXTOFFSET, /* Disable HT Protection */
WMI_VDEV_PARAM_DISABLE_HTPROTECTION, /* Quick STA Kickout */
WMI_VDEV_PARAM_STA_QUICKKICKOUT, /* Rate to be used with Management frames */
WMI_VDEV_PARAM_MGMT_RATE, /* Protection Mode */
WMI_VDEV_PARAM_PROTECTION_MODE, /* Fixed rate setting */
WMI_VDEV_PARAM_FIXED_RATE, /* Short GI Enable/Disable */
WMI_VDEV_PARAM_SGI, /* Enable LDPC */
WMI_VDEV_PARAM_LDPC, /* Enable Tx STBC */
WMI_VDEV_PARAM_TX_STBC, /* Enable Rx STBC */
WMI_VDEV_PARAM_RX_STBC, /* Intra BSS forwarding */
WMI_VDEV_PARAM_INTRA_BSS_FWD, /* Setting Default xmit key for Vdev */
WMI_VDEV_PARAM_DEF_KEYID, /* NSS width */
WMI_VDEV_PARAM_NSS, /* Set the custom rate for the broadcast data frames */
WMI_VDEV_PARAM_BCAST_DATA_RATE, /* Set the custom rate (rate-code) for multicast data frames */
WMI_VDEV_PARAM_MCAST_DATA_RATE, /* Tx multicast packet indicate Enable/Disable */
WMI_VDEV_PARAM_MCAST_INDICATE, /* Tx DHCP packet indicate Enable/Disable */
WMI_VDEV_PARAM_DHCP_INDICATE, /* Enable host inspection of Tx unicast packet to unknown destination */
WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
/* The minimum amount of time AP begins to consider STA inactive */
WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
/* * An associated STA is considered inactive when there is no recent * TX/RX activity and no downlink frames are buffered for it. Once a * STA exceeds the maximum idle inactive time, the AP will send an * 802.11 data-null as a keep alive to verify the STA is still * associated. If the STA does ACK the data-null, or if the data-null * is buffered and the STA does not retrieve it, the STA will be * considered unresponsive * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
*/
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
/* * An associated STA is considered unresponsive if there is no recent * TX/RX activity and downlink frames are buffered for it. Once a STA * exceeds the maximum unresponsive time, the AP will send a * WMI_STA_KICKOUT event to the host so the STA can be deleted.
*/
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
/* Set packet power save */
WMI_VDEV_PARAM_PACKET_POWERSAVE,
/* * Drops un-encrypted packets if eceived in an encrypted connection * otherwise forwards to host.
*/
WMI_VDEV_PARAM_DROP_UNENCRY,
/* * Set the encapsulation type for frames.
*/
WMI_VDEV_PARAM_TX_ENCAP_TYPE,
};
/* the definition of different VDEV parameters */ enum wmi_10x_vdev_param { /* RTS Threshold */
WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1, /* Fragmentation threshold */
WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD, /* beacon interval in TUs */
WMI_10X_VDEV_PARAM_BEACON_INTERVAL, /* Listen interval in TUs */
WMI_10X_VDEV_PARAM_LISTEN_INTERVAL, /* multicast rate in Mbps */
WMI_10X_VDEV_PARAM_MULTICAST_RATE, /* management frame rate in Mbps */
WMI_10X_VDEV_PARAM_MGMT_TX_RATE, /* slot time (long vs short) */
WMI_10X_VDEV_PARAM_SLOT_TIME, /* preamble (long vs short) */
WMI_10X_VDEV_PARAM_PREAMBLE, /* SWBA time (time before tbtt in msec) */
WMI_10X_VDEV_PARAM_SWBA_TIME, /* time period for updating VDEV stats */
WMI_10X_VDEV_STATS_UPDATE_PERIOD, /* age out time in msec for frames queued for station in power save */
WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME, /* * Host SWBA interval (time in msec before tbtt for SWBA event * generation).
*/
WMI_10X_VDEV_HOST_SWBA_INTERVAL, /* DTIM period (specified in units of num beacon intervals) */
WMI_10X_VDEV_PARAM_DTIM_PERIOD, /* * scheduler air time limit for this VDEV. used by off chan * scheduler.
*/
WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT, /* enable/disable WDS for this VDEV */
WMI_10X_VDEV_PARAM_WDS, /* ATIM Window */
WMI_10X_VDEV_PARAM_ATIM_WINDOW, /* BMISS max */
WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX, /* WMM enables/disabled */
WMI_10X_VDEV_PARAM_FEATURE_WMM, /* Channel width */
WMI_10X_VDEV_PARAM_CHWIDTH, /* Channel Offset */
WMI_10X_VDEV_PARAM_CHEXTOFFSET, /* Disable HT Protection */
WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION, /* Quick STA Kickout */
WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT, /* Rate to be used with Management frames */
WMI_10X_VDEV_PARAM_MGMT_RATE, /* Protection Mode */
WMI_10X_VDEV_PARAM_PROTECTION_MODE, /* Fixed rate setting */
WMI_10X_VDEV_PARAM_FIXED_RATE, /* Short GI Enable/Disable */
WMI_10X_VDEV_PARAM_SGI, /* Enable LDPC */
WMI_10X_VDEV_PARAM_LDPC, /* Enable Tx STBC */
WMI_10X_VDEV_PARAM_TX_STBC, /* Enable Rx STBC */
WMI_10X_VDEV_PARAM_RX_STBC, /* Intra BSS forwarding */
WMI_10X_VDEV_PARAM_INTRA_BSS_FWD, /* Setting Default xmit key for Vdev */
WMI_10X_VDEV_PARAM_DEF_KEYID, /* NSS width */
WMI_10X_VDEV_PARAM_NSS, /* Set the custom rate for the broadcast data frames */
WMI_10X_VDEV_PARAM_BCAST_DATA_RATE, /* Set the custom rate (rate-code) for multicast data frames */
WMI_10X_VDEV_PARAM_MCAST_DATA_RATE, /* Tx multicast packet indicate Enable/Disable */
WMI_10X_VDEV_PARAM_MCAST_INDICATE, /* Tx DHCP packet indicate Enable/Disable */
WMI_10X_VDEV_PARAM_DHCP_INDICATE, /* Enable host inspection of Tx unicast packet to unknown destination */
WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
/* The minimum amount of time AP begins to consider STA inactive */
WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
/* * An associated STA is considered inactive when there is no recent * TX/RX activity and no downlink frames are buffered for it. Once a * STA exceeds the maximum idle inactive time, the AP will send an * 802.11 data-null as a keep alive to verify the STA is still * associated. If the STA does ACK the data-null, or if the data-null * is buffered and the STA does not retrieve it, the STA will be * considered unresponsive * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
*/
WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
/* * An associated STA is considered unresponsive if there is no recent * TX/RX activity and downlink frames are buffered for it. Once a STA * exceeds the maximum unresponsive time, the AP will send a * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted.
*/
WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
/* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
/* following are available as of firmware 10.2 */
WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
WMI_10X_VDEV_PARAM_MFPTEST_SET,
WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
WMI_10X_VDEV_PARAM_VHT_SGIMASK,
WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
WMI_10X_VDEV_PARAM_TSF_INCREMENT,
};
/* slot time long */ #define WMI_VDEV_SLOT_TIME_LONG 0x1 /* slot time short */ #define WMI_VDEV_SLOT_TIME_SHORT 0x2 /* preablbe long */ #define WMI_VDEV_PREAMBLE_LONG 0x1 /* preablbe short */ #define WMI_VDEV_PREAMBLE_SHORT 0x2
struct wmi_vdev_standby_req_event { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
} __packed;
struct wmi_vdev_resume_req_event { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
} __packed;
struct wmi_vdev_stopped_event { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
} __packed;
/* * common structure used for simple events * (stopped, resume_req, standby response)
*/ struct wmi_vdev_simple_event { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
} __packed;
/* VDEV start response status codes */ /* VDEV successfully started */ #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
/* requested VDEV not found */ #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
/* 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 0
struct wmi_bcn_tx_ref_cmd {
__le32 vdev_id;
__le32 data_len; /* physical address of the frame - dma pointer */
__le32 data_ptr; /* id for host to track */
__le32 msdu_id; /* frame ctrl to setup PPDU desc */
__le32 frame_control; /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
__le32 flags; /* introduced in 10.2 */
__le32 antenna_mask;
} __packed;
struct wmi_bcn_filter_rx_cmd { /* Filter ID */
__le32 bcn_filter_id; /* Filter type - wmi_bcn_filter */
__le32 bcn_filter; /* Buffer len */
__le32 bcn_filter_len; /* Filter info (threshold, BSSID, RSSI) */
u8 *bcn_filter_buf;
} __packed;
/* Capabilities and IEs to be passed to firmware */ struct wmi_bcn_prb_info { /* Capabilities */
__le32 caps; /* ERP info */
__le32 erp; /* Advanced capabilities */ /* HT capabilities */ /* HT Info */ /* ibss_dfs */ /* wpa Info */ /* rsn Info */ /* rrm info */ /* ath_ext */ /* app IE */
} __packed;
enum wmi_sta_ps_mode { /* enable power save for the given STA VDEV */
WMI_STA_PS_MODE_DISABLED = 0, /* disable power save for a given STA VDEV */
WMI_STA_PS_MODE_ENABLED = 1,
};
struct wmi_sta_powersave_mode_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
/* * Power save mode * (see enum wmi_sta_ps_mode)
*/
__le32 sta_ps_mode;
} __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 { /* * Wake up when ever there is an RX activity on the VDEV. In this mode * the Power save SM(state machine) will come out of sleep by either * sending null frame (or) a data frame (with PS==0) in response to TIM * bit set in the received beacon frame from AP.
*/
WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
/* * Here the power save state machine will not wakeup in response to TIM * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all * access categories are delivery-enabled, the station will send a * UAPSD trigger frame, otherwise it will send a PS-Poll.
*/
WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
};
/* * 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 {
WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
/* * Values greater than one indicate that many TX attempts per beacon * interval before the STA will wake up
*/
};
/* * 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 {
WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0, /* * Values greater than 0 indicate the maximum number of PS-Poll frames * FW will send before waking up.
*/
/* When u-APSD is enabled the firmware will be very reluctant to exit * STA PS. This could result in very poor Rx performance with STA doing * PS-Poll for each and every buffered frame. This value is a bit * arbitrary.
*/
WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
};
/* * 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 0 #define WMI_UAPSD_AC_TYPE_TRIG 1
enum wmi_sta_powersave_param { /* * Controls how frames are retrievd from AP while STA is sleeping * * (see enum wmi_sta_ps_param_rx_wake_policy)
*/
WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
/* * The STA will go active after this many TX * * (see enum wmi_sta_ps_param_tx_wake_threshold)
*/
WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
/* * Number of PS-Poll to send before STA wakes up * * (see enum wmi_sta_ps_param_pspoll_count) *
*/
WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
/* * TX/RX inactivity time in msec before going to sleep. * * The power save SM will monitor tx/rx activity on the VDEV, if no * activity for the specified msec of the parameter the Power save * SM will go to sleep.
*/
WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
/* * Set uapsd configuration. * * (see enum wmi_sta_ps_param_uapsd)
*/
WMI_STA_PS_PARAM_UAPSD = 4,
};
/* 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 { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* mimo powersave mode as defined above */
__le32 mimo_pwrsave_mode;
} __packed;
/* U-APSD maximum service period of peer station */ enum wmi_ap_ps_peer_param_max_sp {
WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
MAX_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 { /* Set uapsd configuration for a given peer. * * Include the delivery and trigger enabled state for every AC. * The host MLME needs to set this based on AP capability and stations * request Set in the association request received from the station. * * Lower 8 bits of the value specify the UAPSD configuration. * * (see enum wmi_ap_ps_param_uapsd) * The default value is 0.
*/
WMI_AP_PS_PEER_PARAM_UAPSD = 0,
/* * Set the service period for a UAPSD capable station * * The service period from wme ie in the (re)assoc request frame. * * (see enum wmi_ap_ps_peer_param_max_sp)
*/
WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
/* Time in seconds for aging out buffered frames for STA in PS */
WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
};
struct wmi_ap_ps_peer_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
/* peer MAC address */ struct wmi_mac_addr peer_macaddr;
/* AP powersave param (see enum wmi_ap_ps_peer_param) */
__le32 param_id;
/* AP powersave param value */
__le32 param_value;
} __packed;
/* 128 clients = 4 words */ #define WMI_TIM_BITMAP_ARRAY_SIZE 4
/* Maximum number of NOA Descriptors supported */ #define WMI_P2P_MAX_NOA_DESCRIPTORS 4 #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0) #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1 #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
struct wmi_p2p_noa_info { /* Bit 0 - Flag to indicate an update in NOA schedule * Bits 7-1 - Reserved
*/
u8 changed; /* NOA index */
u8 index; /* Bit 0 - Opp PS state of the AP * Bits 1-7 - Ctwindow in TUs
*/
u8 ctwindow_oppps; /* Number of NOA descriptors */
u8 num_descriptors;
struct wmi_10_4_p2p_noa_info { /* Bit 0 - Flag to indicate an update in NOA schedule * Bits 7-1 - Reserved
*/
u8 changed; /* NOA index */
u8 index; /* Bit 0 - Opp PS state of the AP * Bits 1-7 - Ctwindow in TUs
*/
u8 ctwindow_oppps; /* Number of NOA descriptors */
u8 num_descriptors;
struct wmi_fixed_rate { /* * rate mode . 0: disable fixed rate (auto rate) * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps * 2: ht20 11n rate specified as mcs index * 3: ht40 11n rate specified as mcs index
*/
__le32 rate_mode; /* * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB) * and series 3 is stored at byte 3 (MSB)
*/
__le32 rate_series; /* * 4 retry counts for 4 rate series. retry count for rate 0 is stored * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3 * (MSB)
*/
__le32 rate_retries;
} __packed;
struct wmi_peer_fixed_rate_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* peer MAC address */ struct wmi_mac_addr peer_macaddr; /* fixed rate */ struct wmi_fixed_rate peer_fixed_rate;
} __packed;
#define WMI_MGMT_TID 17
struct wmi_addba_clear_resp_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* peer MAC address */ struct wmi_mac_addr peer_macaddr;
} __packed;
struct wmi_addba_send_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* peer MAC address */ struct wmi_mac_addr peer_macaddr; /* Tid number */
__le32 tid; /* Buffer/Window size*/
__le32 buffersize;
} __packed;
struct wmi_delba_send_cmd { /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id; /* peer MAC address */ struct wmi_mac_addr peer_macaddr; /* Tid number */
__le32 tid; /* Is Initiator */
__le32 initiator; /* Reason code */
__le32 reasoncode;
} __packed;
struct wmi_addba_setresponse_cmd { /* unique id identifying the vdev, generated by the caller */
__le32 vdev_id; /* peer mac address */ struct wmi_mac_addr peer_macaddr; /* Tid number */
__le32 tid; /* status code */
__le32 statuscode;
} __packed;
struct wmi_send_singleamsdu_cmd { /* unique id identifying the vdev, generated by the caller */
__le32 vdev_id; /* peer mac address */ struct wmi_mac_addr peer_macaddr; /* Tid number */
__le32 tid;
} __packed;
struct wmi_rate_set { /* total number of rates */
__le32 num_rates; /* * rates (each 8bit value) packed into a 32 bit word. * the rates are filled from least significant byte to most * significant byte.
*/
__le32 rates[(MAX_SUPPORTED_RATES / 4) + 1];
} __packed;
/* * 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 {
__le32 rx_max_rate; /* Max Rx data rate */
__le32 rx_mcs_set; /* Negotiated RX VHT rates */
__le32 tx_max_rate; /* Max Tx data rate */
__le32 tx_mcs_set; /* Negotiated TX VHT rates */
} __packed;
/* * 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 0x01 #define WMI_RC_CW40_FLAG 0x02 #define WMI_RC_SGI_FLAG 0x04 #define WMI_RC_HT_FLAG 0x08 #define WMI_RC_RTSCTS_FLAG 0x10 #define WMI_RC_TX_STBC_FLAG 0x20 #define WMI_RC_RX_STBC_FLAG 0xC0 #define WMI_RC_RX_STBC_FLAG_S 6 #define WMI_RC_WEP_TKIP_FLAG 0x100 #define WMI_RC_TS_FLAG 0x200 #define WMI_RC_UAPSD_FLAG 0x400
/* Maximum listen interval supported by hw in units of beacon interval */ #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
/* number of queued messages before sending them to the host */ #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000
/* * 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 28 #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000
/* * 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 { /* bitmask to hold mod id config*/
__le32 module_enable;
/* see ATH10K_DBGLOG_CFG_ */
__le32 config_enable;
/* mask of module id bits to be changed */
__le32 module_valid;
/* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
__le32 config_valid;
} __packed;
struct wmi_10_4_dbglog_cfg_cmd { /* bitmask to hold mod id config*/
__le64 module_enable;
/* see ATH10K_DBGLOG_CFG_ */
__le32 config_enable;
/* mask of module id bits to be changed */
__le64 module_valid;
/* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
__le32 config_valid;
} __packed;
struct wmi_tdls_peer_capabilities {
__le32 peer_qos;
__le32 buff_sta_support;
__le32 off_chan_support;
__le32 peer_curr_operclass;
__le32 self_curr_operclass;
__le32 peer_chan_len;
__le32 peer_operclass_len;
u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
__le32 is_peer_responder;
__le32 pref_offchan_num;
__le32 pref_offchan_bw; union { /* to match legacy implementation allocate room for * at least one record even if peer_chan_len is 0
*/ struct wmi_channel peer_chan_min_allocation;
DECLARE_FLEX_ARRAY(struct wmi_channel, peer_chan_list);
};
} __packed;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.122Bemerkung:
(vorverarbeitet am 2026-04-26)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.