/* * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _HAL_H_ #define _HAL_H_
/*--------------------------------------------------------------------------- API VERSIONING INFORMATION
The RIVA API is versioned as MAJOR.MINOR.VERSION.REVISION The MAJOR is incremented for major product/architecture changes (and then MINOR/VERSION/REVISION are zeroed) The MINOR is incremented for minor product/architecture changes (and then VERSION/REVISION are zeroed) The VERSION is incremented if a significant API change occurs (and then REVISION is zeroed) The REVISION is incremented if an insignificant API change occurs or if a new API is added All values are in the range 0..255 (ie they are 8-bit values)
---------------------------------------------------------------------------*/ #define WCN36XX_HAL_VER_MAJOR 1 #define WCN36XX_HAL_VER_MINOR 4 #define WCN36XX_HAL_VER_VERSION 1 #define WCN36XX_HAL_VER_REVISION 2
/* This is to force compiler to use the maximum of an int ( 4 bytes ) */ #define WCN36XX_HAL_MAX_ENUM_SIZE 0x7FFFFFFF #define WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE 0x7FFF
/* Max no. of transmit categories */ #define STACFG_MAX_TC 8
/* The maximum value of access category */ #define WCN36XX_HAL_MAX_AC 4
/* each station added has a rate mode which specifies the sta attributes */ enum sta_rate_mode {
STA_TAURUS = 0,
STA_TITAN,
STA_POLARIS,
STA_11b,
STA_11bg,
STA_11a,
STA_11n,
STA_11ac,
STA_INVALID_RATE_MODE = WCN36XX_HAL_MAX_ENUM_SIZE
};
/* MAX key length when ULA is used */ #define WCN36XX_HAL_MAC_MAX_KEY_LENGTH 32 #define WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS 4
/* * Enum to specify whether key is used for TX only, RX only or both.
*/ enum ani_key_direction {
WCN36XX_HAL_TX_ONLY,
WCN36XX_HAL_RX_ONLY,
WCN36XX_HAL_TX_RX,
WCN36XX_HAL_TX_DEFAULT,
WCN36XX_HAL_DONOT_USE_KEY_DIRECTION = WCN36XX_HAL_MAX_ENUM_SIZE
};
/* Specify the starting bitrate, 11B and 11A/G rates can be specified in * multiples of 0.5 So for 5.5 mbps => 11. for MCS 0 - 7 rates, Bit 7 should * set to 1 and Bit 0-6 represent the MCS index. so for MCS2 => 130. * Any invalid non-zero value or unsupported rate will set the start rate * to 6 mbps.
*/ #define WCN36XX_HAL_CFG_ENABLE_DYNAMIC_RA_START_RATE 210
/* Message definitons - All the messages below need to be packed */
/* Definition for HAL API Version. */ struct wcnss_wlan_version {
u8 revision;
u8 version;
u8 minor;
u8 major;
} __packed;
/* * set_sta_key_params Moving here since it is shared by * configbss/setstakey msgs
*/ struct wcn36xx_hal_set_sta_key_params { /* STA Index */
u16 sta_index;
/* Encryption Type used with peer */ enum ani_ed_type enc_type;
/* STATIC/DYNAMIC - valid only for WEP */ enum ani_wep_type wep_type;
/* Default WEP key, valid only for static WEP, must between 0 and 3. */
u8 def_wep_idx;
/* valid only for non-static WEP encyrptions */ struct wcn36xx_hal_keys key[WCN36XX_HAL_MAC_MAX_NUM_OF_DEFAULT_KEYS];
/* * Control for Replay Count, 1= Single TID based replay count on Tx * 0 = Per TID based replay count on TX
*/
u8 single_tid_rc;
} __packed;
/* 4-byte control message header used by HAL*/ struct wcn36xx_hal_msg_header { enum wcn36xx_hal_host_msg_type msg_type:16; enum wcn36xx_hal_host_msg_version msg_version:16;
u32 len;
} __packed;
/* Config format required by HAL for each CFG item*/ struct wcn36xx_hal_cfg { /* Cfg Id. The Id required by HAL is exported by HAL
* in shared header file between UMAC and HAL.*/
u16 id;
/* Length of the Cfg. This parameter is used to go to next cfg
* in the TLV format.*/
u16 len;
/* Padding bytes for unaligned address's */
u16 pad_bytes;
/* Reserve bytes for making cfgVal to align address */
u16 reserve;
/* Following the uCfgLen field there should be a 'uCfgLen' bytes
* containing the uCfgValue ; u8 uCfgValue[uCfgLen] */
} __packed;
struct wcn36xx_hal_mac_start_parameters { /* Drive Type - Production or FTM etc */ enum driver_type type;
/* Length of the config buffer */
u32 len;
/* Following this there is a TLV formatted buffer of length * "len" bytes containing all config values. * The TLV is expected to be formatted like this: * 0 15 31 31+CFG_LEN-1 length-1 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
*/
} __packed;
struct wcn36xx_hal_mac_start_req_msg { /* config buffer must start in TLV format just here */ struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_mac_start_parameters params;
} __packed;
struct wcn36xx_hal_mac_start_rsp_params { /* success or failure */
u16 status;
/* Max number of STA supported by the device */
u8 stations;
/* Max number of BSS supported by the device */
u8 bssids;
/* API Version */ struct wcnss_wlan_version version;
/* CRM build information */
u8 crm_version[WCN36XX_HAL_VERSION_LENGTH];
/* hardware/chipset/misc version information */
u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH];
struct wcn36xx_hal_update_cfg_req_msg { /* * Note: The length specified in tHalUpdateCfgReqMsg messages should be * header.msgLen = sizeof(tHalUpdateCfgReqMsg) + uConfigBufferLen
*/ struct wcn36xx_hal_msg_header header;
/* Length of the config buffer. Allows UMAC to update multiple CFGs */
u32 len;
/* * Following this there is a TLV formatted buffer of length * "uConfigBufferLen" bytes containing all config values. * The TLV is expected to be formatted like this: * 0 15 31 31+CFG_LEN-1 length-1 * | CFG_ID | CFG_LEN | CFG_BODY | CFG_ID |......|
*/
/* LEARN - AP Role
SCAN - STA Role */ enum wcn36xx_hal_sys_mode mode;
/* BSSID of the BSS */
u8 bssid[ETH_ALEN];
/* Whether BSS needs to be notified */
u8 notify;
/* Kind of frame to be used for notifying the BSS (Data Null, QoS
* Null, or CTS to Self). Must always be a valid frame type. */
u8 frame_type;
/* UMAC has the option of passing the MAC frame to be used for * notifying the BSS. If non-zero, HAL will use the MAC frame * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
* appropriate MAC frame based on frameType. */
u8 frame_len;
/* Following the framelength there is a MAC frame buffer if
* frameLength is non-zero. */ struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
/* Entry to hold number of active BSS idx's */ struct wcn36xx_hal_scan_entry scan_entry;
};
/* LEARN - AP Role
SCAN - STA Role */ enum wcn36xx_hal_sys_mode mode;
/* BSSID of the BSS */
u8 bssid[ETH_ALEN];
/* Whether BSS needs to be notified */
u8 notify;
/* Kind of frame to be used for notifying the BSS (Data Null, QoS
* Null, or CTS to Self). Must always be a valid frame type. */
u8 frame_type;
/* UMAC has the option of passing the MAC frame to be used for * notifying the BSS. If non-zero, HAL will use the MAC frame * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
* appropriate MAC frame based on frameType. */
u8 frame_length;
/* Following the framelength there is a MAC frame buffer if
* frameLength is non-zero. */ struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
/* Entry to hold number of active BSS idx's */ struct wcn36xx_hal_scan_entry scan_entry;
/* Single NoA usage in Scanning */
u8 use_noa;
/* Indicates the scan duration (in ms) */
u16 scan_duration;
/* Indicates the channel to stop scanning. Not used really. But * retained for symmetry with "start Scan" message. It can also
* help in error check if needed. */
u8 scan_channel;
} __packed;
/* Identifies the operational state of the AP/STA
* LEARN - AP Role SCAN - STA Role */ enum wcn36xx_hal_sys_mode mode;
/* Operating channel to tune to. */
u8 oper_channel;
/* Channel Bonding state If 20/40 MHz is operational, this will * indicate the 40 MHz extension channel in combination with the
* control channel */ enum phy_chan_bond_state cb_state;
/* BSSID of the BSS */
u8 bssid[ETH_ALEN];
/* Whether BSS needs to be notified */
u8 notify;
/* Kind of frame to be used for notifying the BSS (Data Null, QoS
* Null, or CTS to Self). Must always be a valid frame type. */
u8 frame_type;
/* UMAC has the option of passing the MAC frame to be used for * notifying the BSS. If non-zero, HAL will use the MAC frame * buffer pointed to by macMgmtHdr. If zero, HAL will generate the
* appropriate MAC frame based on frameType. */
u8 frame_length;
/* Following the framelength there is a MAC frame buffer if
* frameLength is non-zero. */ struct wcn36xx_hal_mac_mgmt_hdr mac_mgmt_hdr;
/* Entry to hold number of active BSS idx's */ struct wcn36xx_hal_scan_entry scan_entry;
struct wcn36xx_hal_supported_rates { /* * For Self STA Entry: this represents Self Mode. * For Peer Stations, this represents the mode of the peer. * On Station: * * --this mode is updated when PE adds the Self Entry. * * -- OR when PE sends 'ADD_BSS' message and station context in BSS * is used to indicate the mode of the AP. * * ON AP: * * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry * for that BSS is used to indicate the self mode of the AP. * * -- OR when a station is associated, PE sends 'ADD_STA' message * with this mode updated.
*/
enum sta_rate_mode op_rate_mode;
/* 11b, 11a and aniLegacyRates are IE rates which gives rate in
* unit of 500Kbps */
u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
u16 reserved;
/* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be * supported) First 26 bits are reserved for those Titan rates and * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are
* reserved. */ /* Titan and Taurus Rates */
u32 enhanced_rate_bitmap;
/* * 0-76 bits used, remaining reserved * bits 0-15 and 32 should be set.
*/
u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
/* * RX Highest Supported Data Rate defines the highest data * rate that the STA is able to receive, in unites of 1Mbps. * This value is derived from "Supported MCS Set field" inside * the HT capability element.
*/
u16 rx_highest_data_rate;
} __packed;
struct wcn36xx_hal_config_sta_params { /* BSSID of STA */
u8 bssid[ETH_ALEN];
/* Short GI support for 40Mhz packets */
u8 sgi_40mhz;
/* Short GI support for 20Mhz packets */
u8 sgi_20Mhz;
/* TODO move this parameter to the end for 3680 */ /* These rates are the intersection of peer and self capabilities. */ struct wcn36xx_hal_supported_rates supported_rates;
/* The unicast encryption type in the association */
u32 encrypt_type;
/* HAL should update the existing STA entry, if this flag is set. UMAC will set this flag in case of RE-ASSOC, where we want to reuse the
old STA ID. 0 = Add, 1 = Update */
u8 action;
/* U-APSD Flags: 1b per AC. Encoded as follows: b7 b6 b5 b4 b3 b2 b1 b0 =
X X X X BE BK VI VO */
u8 uapsd;
/* Max SP Length */
u8 max_sp_len;
/* 11n Green Field preamble support
0 - Not supported, 1 - Supported */
u8 green_field_capable;
/* MIMO Power Save mode */ enum wcn36xx_hal_ht_mimo_state mimo_ps;
/* Delayed BA Support */
u8 delayed_ba_support;
/* Max AMPDU duration in 32us */
u8 max_ampdu_duration;
/* HT STA should set it to 1 if it is enabled in BSS. HT STA should * set it to 0 if AP does not support it. This indication is sent * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
* rates. */
u8 dsss_cck_mode_40mhz;
/* Valid STA Idx when action=Update. Set to 0xFF when invalid!
* Retained for backward compalibity with existing HAL code */
u8 sta_index;
/* BSSID of BSS to which station is associated. Set to 0xFF when * invalid. Retained for backward compalibity with existing HAL
* code */
u8 bssid_index;
u8 p2p;
/* TODO add this parameter for 3680. */ /* Reserved to align next field on a dword boundary */ /* u8 reserved; */
} __packed;
struct wcn36xx_hal_supported_rates_v1 { /* For Self STA Entry: this represents Self Mode. * For Peer Stations, this represents the mode of the peer. * On Station: * * --this mode is updated when PE adds the Self Entry. * * -- OR when PE sends 'ADD_BSS' message and station context in BSS * is used to indicate the mode of the AP. * * ON AP: * * -- this mode is updated when PE sends 'ADD_BSS' and Sta entry * for that BSS is used to indicate the self mode of the AP. * * -- OR when a station is associated, PE sends 'ADD_STA' message * with this mode updated.
*/
enum sta_rate_mode op_rate_mode;
/* 11b, 11a and aniLegacyRates are IE rates which gives rate in * unit of 500Kbps
*/
u16 dsss_rates[WCN36XX_HAL_NUM_DSSS_RATES];
u16 ofdm_rates[WCN36XX_HAL_NUM_OFDM_RATES];
u16 legacy_rates[WCN36XX_HAL_NUM_POLARIS_RATES];
u16 reserved;
/* Taurus only supports 26 Titan Rates(no ESF/concat Rates will be * supported) First 26 bits are reserved for those Titan rates and * the last 4 bits(bit28-31) for Taurus, 2(bit26-27) bits are * reserved * Titan and Taurus Rates
*/
u32 enhanced_rate_bitmap;
/* 0-76 bits used, remaining reserved * bits 0-15 and 32 should be set.
*/
u8 supported_mcs_set[WCN36XX_HAL_MAC_MAX_SUPPORTED_MCS_SET];
/* RX Highest Supported Data Rate defines the highest data * rate that the STA is able to receive, in unites of 1Mbps. * This value is derived from "Supported MCS Set field" inside * the HT capability element.
*/
u16 rx_highest_data_rate;
/* Indicates the Maximum MCS that can be received for each spatial * stream.
*/
u16 vht_rx_mcs_map;
/* Indicates the highest VHT data rate that the STA is able to * receive.
*/
u16 vht_rx_highest_data_rate;
/* Indicates the Maximum MCS that can be transmitted for each spatial * stream.
*/
u16 vht_tx_mcs_map;
/* Indicates the highest VHT data rate that the STA is able to * transmit.
*/
u16 vht_tx_highest_data_rate;
} __packed;
struct wcn36xx_hal_config_sta_params_v1 { /* BSSID of STA */
u8 bssid[ETH_ALEN];
/* The unicast encryption type in the association */
u32 encrypt_type;
/* HAL should update the existing STA entry, if this flag is set. UMAC will set this flag in case of RE-ASSOC, where we want to reuse the
old STA ID. 0 = Add, 1 = Update */
u8 action;
/* U-APSD Flags: 1b per AC. Encoded as follows: b7 b6 b5 b4 b3 b2 b1 b0 =
X X X X BE BK VI VO */
u8 uapsd;
/* Max SP Length */
u8 max_sp_len;
/* 11n Green Field preamble support
0 - Not supported, 1 - Supported */
u8 green_field_capable;
/* MIMO Power Save mode */ enum wcn36xx_hal_ht_mimo_state mimo_ps;
/* Delayed BA Support */
u8 delayed_ba_support;
/* Max AMPDU duration in 32us */
u8 max_ampdu_duration;
/* HT STA should set it to 1 if it is enabled in BSS. HT STA should * set it to 0 if AP does not support it. This indication is sent * to HAL and HAL uses this flag to pickup up appropriate 40Mhz
* rates. */
u8 dsss_cck_mode_40mhz;
/* Valid STA Idx when action=Update. Set to 0xFF when invalid!
* Retained for backward compalibity with existing HAL code */
u8 sta_index;
/* BSSID of BSS to which station is associated. Set to 0xFF when * invalid. Retained for backward compalibity with existing HAL
* code */
u8 bssid_index;
u8 p2p;
/* Reserved to align next field on a dword boundary */
u8 ht_ldpc_enabled:1;
u8 vht_ldpc_enabled:1;
u8 vht_tx_bf_enabled:1;
u8 vht_tx_mu_beamformee_capable:1;
u8 reserved:4;
/* These rates are the intersection of peer and self capabilities. */ struct wcn36xx_hal_supported_rates_v1 supported_rates;
/* 12 Bytes long because this structure can be used to represent rate and
* extended rate set IEs. The parser assume this to be at least 12 */ struct wcn36xx_hal_rate_set {
u8 num_rates;
u8 rate[WCN36XX_HAL_MAC_RATESET_EID_MAX];
} __packed;
/* Concurrency role. These are generic IDs that identify the various roles
* in the software system. */ enum wcn36xx_hal_con_mode {
WCN36XX_HAL_STA_MODE = 0,
/* to support softAp mode . This is misleading.
It means AP MODE only. */
WCN36XX_HAL_STA_SAP_MODE = 1,
/* This is a bit pattern to be set for each mode * bit 0 - sta mode * bit 1 - ap mode * bit 2 - p2p client mode
* bit 3 - p2p go mode */ enum wcn36xx_hal_concurrency_mode {
HAL_STA = 1,
HAL_SAP = 2,
/* to support sta, softAp mode . This means STA+AP mode */
HAL_STA_SAP = 3,
/* Extension channel for channel bonding */
u8 ext_channel;
/* Reserved to align next field on a dword boundary */
u8 reserved;
/* TODO move sta to the end for 3680 */ /* Context of the station being added in HW * Add a STA entry for "itself" - * * On AP - Add the AP itself in an "STA context" * * On STA - Add the AP to which this STA is joining in an * "STA context"
*/ struct wcn36xx_hal_config_sta_params sta; /* SSID of the BSS */ struct wcn36xx_hal_mac_ssid ssid;
/* HAL should update the existing BSS entry, if this flag is set. * UMAC will set this flag in case of reassoc, where we want to * resue the old BSSID and still return success 0 = Add, 1 =
* Update */
u8 action;
/* MAC Rate Set */ struct wcn36xx_hal_rate_set rateset;
/* Enable/Disable HT capabilities of the BSS */
u8 ht;
/* Boolean to indicate if EDCA params are valid. UMAC might not * have valid EDCA params or might not desire to apply EDCA params * during config BSS. 0 implies Not Valid ; Non-Zero implies
* valid */
u8 edca_params_valid;
/* EDCA Parameters for Best Effort Access Category */ struct wcn36xx_hal_edca_param_record acbe;
/* Extension channel for channel bonding */
u8 ext_channel;
/* Reserved to align next field on a dword boundary */
u8 reserved;
/* SSID of the BSS */ struct wcn36xx_hal_mac_ssid ssid;
/* HAL should update the existing BSS entry, if this flag is set. * UMAC will set this flag in case of reassoc, where we want to * resue the old BSSID and still return success 0 = Add, 1 =
* Update */
u8 action;
/* MAC Rate Set */ struct wcn36xx_hal_rate_set rateset;
/* Enable/Disable HT capabilities of the BSS */
u8 ht;
/* Boolean to indicate if EDCA params are valid. UMAC might not * have valid EDCA params or might not desire to apply EDCA params * during config BSS. 0 implies Not Valid ; Non-Zero implies
* valid */
u8 edca_params_valid;
/* EDCA Parameters for Best Effort Access Category */ struct wcn36xx_hal_edca_param_record acbe;
/* Ext Bss Config Msg if set */
u8 ext_set_sta_key_param_valid;
/* SetStaKeyParams for ext bss msg */ struct wcn36xx_hal_set_sta_key_params ext_set_sta_key_param;
/* Persona for the BSS can be STA,AP,GO,CLIENT value same as enum
* wcn36xx_hal_con_mode */
u8 wcn36xx_hal_persona;
u8 spectrum_mgt_enable;
/* HAL fills in the tx power used for mgmt frames in txMgmtPower */
s8 tx_mgmt_power;
/* maxTxPower has max power to be used after applying the power
* constraint if any */
s8 max_tx_power;
/* Context of the station being added in HW * Add a STA entry for "itself" - * * On AP - Add the AP itself in an "STA context" * * On STA - Add the AP to which this STA is joining in an * "STA context"
*/ struct wcn36xx_hal_config_sta_params_v1 sta;
/* * This is used configure the key information on a given station. * When the sec_type is WEP40 or WEP104, the def_wep_idx is used to locate * a preconfigured key from a BSS the station associated with; otherwise * a new key descriptor is created based on the key field.
*/ struct wcn36xx_hal_set_sta_key_req_msg { struct wcn36xx_hal_msg_header header; struct wcn36xx_hal_set_sta_key_params set_sta_key_params;
} __packed;
/* * This is used by PE to Remove the key information on a given station.
*/ struct wcn36xx_hal_remove_sta_key_req_msg { struct wcn36xx_hal_msg_header header;
/* STA Index */
u16 sta_idx;
/* Encryption Type used with peer */ enum ani_ed_type enc_type;
/* Key Id */
u8 key_id;
/* Whether to invalidate the Broadcast key or Unicast key. In case
* of WEP, the same key is used for both broadcast and unicast. */
u8 unicast;
/* HAL fills in the tx power used for mgmt frames in this field. */
u8 tx_mgmt_power;
/* Max TX power */
u8 max_tx_power;
/* Self STA MAC */
u8 self_sta_mac_addr[ETH_ALEN];
/* VO WIFI comment: BSSID needed to identify session. As the * request has power constraints, this should be applied only to * that session Since MTU timing and EDCA are sessionized, this * struct needs to be sessionized and bssid needs to be out of the * VOWifi feature flag V IMP: Keep bssId field at the end of this * msg. It is used to mantain backward compatbility by way of * ignoring if using new host/old FW or old host/new FW since it is * at the end of this struct
*/
u8 bssid[ETH_ALEN];
} __packed;
/* Valid STA Idx for per STA stats request */
u32 sta_id;
/* Categories of stats requested as specified in eHalStatsMask */
u32 stats_mask;
};
struct ani_summary_stats_info { /* Total number of packets(per AC) that were successfully
* transmitted with retries */
u32 retry_cnt[4];
/* The number of MSDU packets and MMPDU frames per AC that the * 802.11 station successfully transmitted after more than one
* retransmission attempt */
u32 multiple_retry_cnt[4];
/* Total number of packets(per AC) that were successfully * transmitted (with and without retries, including multi-cast,
* broadcast) */
u32 tx_frm_cnt[4];
/* Total number of packets that were successfully received (after
* appropriate filter rules including multi-cast, broadcast) */
u32 rx_frm_cnt;
/* Total number of duplicate frames received successfully */
u32 frm_dup_cnt;
/* Total number packets(per AC) failed to transmit */
u32 fail_cnt[4];
/* Total number of RTS/CTS sequence failures for transmission of a
* packet */
u32 rts_fail_cnt;
/* Total number packets failed transmit because of no ACK from the
* remote entity */
u32 ack_fail_cnt;
/* Total number of RTS/CTS sequence success for transmission of a
* packet */
u32 rts_succ_cnt;
/* The sum of the receive error count and dropped-receive-buffer * error count. HAL will provide this as a sum of (FCS error) +
* (Fail get BD/PDU in HW) */
u32 rx_discard_cnt;
/* * The receive error count. HAL will provide the RxP FCS error
* global counter. */
u32 rx_error_cnt;
/* The sum of the transmit-directed byte count, transmit-multicast * byte count and transmit-broadcast byte count. HAL will sum TPE
* UC/MC/BCAST global counters to provide this. */
u32 tx_byte_cnt;
};
struct ani_global_class_a_stats_info { /* The number of MPDU frames received by the 802.11 station for
* MSDU packets or MMPDU frames */
u32 rx_frag_cnt;
/* The number of MPDU frames received by the 802.11 station for * MSDU packets or MMPDU frames when a promiscuous packet filter
* was enabled */
u32 promiscuous_rx_frag_cnt;
/* The receiver input sensitivity referenced to a FER of 8% at an * MPDU length of 1024 bytes at the antenna connector. Each element * of the array shall correspond to a supported rate and the order
* shall be the same as the supporteRates parameter. */
u32 rx_input_sensitivity;
/* The maximum transmit power in dBm upto one decimal. for eg: if
* it is 10.5dBm, the value would be 105 */
u32 max_pwr;
/* Number of times the receiver failed to synchronize with the * incoming signal after detecting the sync in the preamble of the
* transmitted PLCP protocol data unit. */
u32 sync_fail_cnt;
/* Legacy transmit rate, in units of 500 kbit/sec, for the most
* recently transmitted frame */
u32 tx_rate;
/* mcs index for HT20 and HT40 rates */
u32 mcs_index;
/* to differentiate between HT20 and HT40 rates; short and long
* guard interval */
u32 tx_rate_flags;
};
struct ani_global_security_stats { /* The number of unencrypted received MPDU frames that the MAC * layer discarded when the IEEE 802.11 dot11ExcludeUnencrypted
* management information base (MIB) object is enabled */
u32 rx_wep_unencrypted_frm_cnt;
/* The number of received MSDU packets that the 802.11 station
* discarded because of MIC failures */
u32 rx_mic_fail_cnt;
/* The number of encrypted MPDU frames that the 802.11 station
* failed to decrypt because of a TKIP ICV error */
u32 tkip_icv_err;
/* The number of received MPDU frames that the 802.11 discarded
* because of an invalid AES-CCMP format */
u32 aes_ccmp_format_err;
/* The number of received MPDU frames that the 802.11 station
* discarded because of the AES-CCMP replay protection procedure */
u32 aes_ccmp_replay_cnt;
/* The number of received MPDU frames that the 802.11 station * discarded because of errors detected by the AES-CCMP decryption
* algorithm */
u32 aes_ccmp_decrpt_err;
/* The number of encrypted MPDU frames received for which a WEP
* decryption key was not available on the 802.11 station */
u32 wep_undecryptable_cnt;
/* The number of encrypted MPDU frames that the 802.11 station
* failed to decrypt because of a WEP ICV error */
u32 wep_icv_err;
/* The number of received encrypted packets that the 802.11 station
* successfully decrypted */
u32 rx_decrypt_succ_cnt;
/* The number of encrypted packets that the 802.11 station failed
* to decrypt */
u32 rx_decrypt_fail_cnt;
};
struct ani_global_class_c_stats_info { /* This counter shall be incremented for a received A-MSDU frame * with the stations MAC address in the address 1 field or an
* A-MSDU frame with a group address in the address 1 field */
u32 rx_amsdu_cnt;
/* This counter shall be incremented when the MAC receives an AMPDU
* from the PHY */
u32 rx_ampdu_cnt;
/* This counter shall be incremented when a Frame is transmitted
* only on the primary channel */
u32 tx_20_frm_cnt;
/* This counter shall be incremented when a Frame is received only
* on the primary channel */
u32 rx_20_frm_cnt;
/* This counter shall be incremented by the number of MPDUs
* received in the A-MPDU when an A-MPDU is received */
u32 rx_mpdu_in_ampdu_cnt;
/* This counter shall be incremented when an MPDU delimiter has a * CRC error when this is the first CRC error in the received AMPDU
* or when the previous delimiter has been decoded correctly */
u32 ampdu_delimiter_crc_err;
};
struct ani_per_sta_stats_info { /* The number of MPDU frames that the 802.11 station transmitted
* and acknowledged through a received 802.11 ACK frame */
u32 tx_frag_cnt[4];
/* This counter shall be incremented when an A-MPDU is transmitted */
u32 tx_ampdu_cnt;
/* This counter shall increment by the number of MPDUs in the AMPDU
* when an A-MPDU is transmitted */
u32 tx_mpdu_in_ampdu_cnt;
};
/* ADDBA Action Frame dialog token
HAL will not interpret this object */
u8 dialog_token;
/* TID for which the BA is being setup
This identifies the TC or TS of interest */
u8 tid;
/* 0 - Delayed BA (Not supported)
1 - Immediate BA */
u8 policy;
/* Indicates the number of buffers for this TID (baTID) NOTE - This is the requested buffer size. When this is processed by HAL and subsequently by HDD, it is possible that HDD may change this buffer size. Any change in the buffer size should be noted by PE and
advertized appropriately in the ADDBA response */
u16 buffer_size;
/* BA timeout in TU's 0 means no timeout will occur */
u16 timeout;
/* b0..b3 - Fragment Number - Always set to 0 b4..b15 - Starting Sequence Number of first MSDU
for which this BA is setup */
u16 ssn;
struct wcn36xx_hal_nv_img_download_req_msg { /* Note: The length specified in wcn36xx_hal_nv_img_download_req_msg * messages should be * header.len = sizeof(wcn36xx_hal_nv_img_download_req_msg) +
* nv_img_buffer_size */ struct wcn36xx_hal_msg_header header;
/* Fragment sequence number of the NV Image. Note that NV Image * might not fit into one message due to size limitation of the SMD * channel FIFO. UMAC can hence choose to chop the NV blob into * multiple fragments starting with seqeunce number 0, 1, 2 etc. * The last fragment MUST be indicated by marking the * isLastFragment field to 1. Note that all the NV blobs would be * concatenated together by HAL without any padding bytes in
* between.*/
u16 frag_number;
/* Is this the last fragment? When set to 1 it indicates that no * more fragments will be sent by UMAC and HAL can concatenate all * the NV blobs rcvd & proceed with the parsing. HAL would generate * a WCN36XX_HAL_DOWNLOAD_NV_RSP to the WCN36XX_HAL_DOWNLOAD_NV_REQ
* after it receives each fragment */
u16 last_fragment;
/* NV Image size (number of bytes) */
u32 nv_img_buffer_size;
/* Following the 'nv_img_buffer_size', there should be * nv_img_buffer_size bytes of NV Image i.e.
* u8[nv_img_buffer_size] */
} __packed;
/* Success or Failure. HAL would generate a
* WCN36XX_HAL_DOWNLOAD_NV_RSP after each fragment */
u32 status;
} __packed;
struct wcn36xx_hal_nv_store_ind { /* Note: The length specified in tHalNvStoreInd messages should be
* header.msgLen = sizeof(tHalNvStoreInd) + nvBlobSize */ struct wcn36xx_hal_msg_header header;
/* NV Item */
u32 table_id;
/* Size of NV Blob */
u32 nv_blob_size;
/* Following the 'nvBlobSize', there should be nvBlobSize bytes of
* NV blob i.e. u8[nvBlobSize] */
};
/* End of Block Ack Related Parameters */
#define WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE 6
/* Definition for MIC failure indication MAC reports this each time a MIC * failure occures on Rx TKIP packet
*/ struct mic_failure_ind_msg { struct wcn36xx_hal_msg_header header;
u8 bssid[ETH_ALEN];
/* address used to compute MIC */
u8 src_addr[ETH_ALEN];
/* transmitter address */
u8 ta_addr[ETH_ALEN];
u8 dst_addr[ETH_ALEN];
u8 multicast;
/* first byte of IV */
u8 iv1;
/* second byte of IV */
u8 key_id;
/* sequence number */
u8 tsc[WCN36XX_HAL_CIPHER_SEQ_CTR_SIZE];
/* Only support 2 possible Network Advertisement IPv6 address */
u8 target_ipv6_addr1[WCN36XX_HAL_IPV6_ADDR_LEN];
u8 target_ipv6_addr2[WCN36XX_HAL_IPV6_ADDR_LEN];
/* Enables/disables packet pattern filtering in firmware. Enabling * this flag enables broadcast pattern matching in Firmware. If * unicast pattern matching is also desired, * ucUcastPatternFilteringEnable flag must be set tot true as well
*/
u8 pattern_filtering_enable;
/* Enables/disables unicast packet pattern filtering. This flag * specifies whether we want to do pattern match on unicast packets * as well and not just broadcast packets. This flag has no effect * if the ucPatternFilteringEnable (main controlling flag) is set * to false
*/
u8 ucast_pattern_filtering_enable;
/* This configuration is valid only when magicPktEnable=1. It * requests hardware to wake up when it receives the Channel Switch * Action Frame.
*/
u8 wow_channel_switch_receive;
/* This configuration is valid only when magicPktEnable=1. It * requests hardware to wake up when it receives the * Deauthentication Frame.
*/
u8 wow_deauth_receive;
/* This configuration is valid only when magicPktEnable=1. It * requests hardware to wake up when it receives the Disassociation * Frame.
*/
u8 wow_disassoc_receive;
/* This configuration is valid only when magicPktEnable=1. It * requests hardware to wake up when it has missed consecutive * beacons. This is a hardware register configuration (NOT a * firmware configuration).
*/
u8 wow_max_missed_beacons;
/* This configuration is valid only when magicPktEnable=1. This is * a timeout value in units of microsec. It requests hardware to * unconditionally wake up after it has stayed in WoWLAN mode for * some time. Set 0 to disable this feature.
*/
u8 wow_max_sleep;
/* This configuration directs the WoW packet filtering to look for * EAP-ID requests embedded in EAPOL frames and use this as a wake * source.
*/
u8 wow_eap_id_request_enable;
/* This configuration directs the WoW packet filtering to look for * EAPOL-4WAY requests and use this as a wake source.
*/
u8 wow_eapol_4way_enable;
/* This configuration allows a host wakeup on an network scan * offload match.
*/
u8 wow_net_scan_offload_match;
/* This configuration allows a host wakeup on any GTK rekeying * error.
*/
u8 wow_gtk_rekey_error;
/* This configuration allows a host wakeup on BSS connection loss.
*/
u8 wow_bss_connection_loss;
/* BSSID is needed to identify which session issued this request. * As the request has power constraints, this should be applied
* only to that session */
u8 bssid[ETH_ALEN];
u8 self_addr[ETH_ALEN];
/* In request, power == MaxTx power to be used. */
u8 power;
};
/* TSPEC handler uniquely identifying a TSPEC for a STA in a BSS. * This will carry the bitmap with the bit positions representing
* different AC.s */
u16 tspec_index;
/* Tspec info per AC To program TPE with required parameters */ struct wcn36xx_hal_tspec_ie tspec[WCN36XX_HAL_MAX_AC];
/* U-APSD Flags: 1b per AC. Encoded as follows: b7 b6 b5 b4 b3 b2 b1 b0 =
X X X X BE BK VI VO */
u8 uapsd;
/* These parameters are for all the access categories */
/* Service Interval */
u32 service_interval[WCN36XX_HAL_MAX_AC];
/* Max number of channels that a network can be found on */ #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS 26
/* Max number of channels that a network can be found on */ #define WCN36XX_HAL_PNO_MAX_NETW_CHANNELS_EX 60
/* Maximum numbers of networks supported by PNO */ #define WCN36XX_HAL_PNO_MAX_SUPP_NETWORKS 16
/* The number of scan time intervals that can be programmed into PNO */ #define WCN36XX_HAL_PNO_MAX_SCAN_TIMERS 10
/* Maximum size of the probe template */ #define WCN36XX_HAL_PNO_MAX_PROBE_SIZE 450
/* Type of PNO enabling: * * Immediate - scanning will start immediately and PNO procedure will be * repeated based on timer * * Suspend - scanning will start at suspend * * Resume - scanning will start on system resume
*/ enum pno_mode {
PNO_MODE_IMMEDIATE,
PNO_MODE_ON_SUSPEND,
PNO_MODE_ON_RESUME,
PNO_MODE_MAX = WCN36XX_HAL_MAX_ENUM_SIZE
};
/* The network description for which PNO will have to look for */ struct network_type { /* SSID of the BSS */ struct wcn36xx_hal_mac_ssid ssid;
/* Authentication type for the network */ enum auth_type authentication;
/* Encryption type for the network */ enum ed_type encryption;
/* Indicate the channel on which the Network can be found 0 - if
* all channels */
u8 channel_count;
u8 channels[WCN36XX_HAL_PNO_MAX_NETW_CHANNELS];
/* Indicates the RSSI threshold for the network to be considered */
u8 rssi_threshold;
};
struct scan_timer { /* How much it should wait */
u32 value;
/* How many times it should repeat that wait value 0 - keep using
* this timer until PNO is disabled */
u32 repeat;
/* e.g: 2 3 4 0 - it will wait 2s between consecutive scans for 3 * times - after that it will wait 4s between consecutive scans
* until disabled */
};
/* The network parameters to be sent to the PNO algorithm */ struct scan_timers_type { /* set to 0 if you wish for PNO to use its default telescopic timer */
u8 count;
/* A set value represents the amount of time that PNO will wait * between two consecutive scan procedures If the desired is for a * uniform timer that fires always at the exact same interval - one * single value is to be set If there is a desire for a more * complex - telescopic like timer multiple values can be set - * once PNO reaches the end of the array it will continue scanning
* at intervals presented by the last value */ struct scan_timer values[WCN36XX_HAL_PNO_MAX_SCAN_TIMERS];
};
/* argument specific to the reason type */
u32 reason_arg;
/* length of optional data stored in this message, in case HAL * truncates the data (i.e. data packets) this length will be less
* than the actual length */
u32 stored_data_len;
/* actual length of data */
u32 actual_data_len;
/* variable length start of data (length == storedDataLen) see
* specific wake type */
u8 data_start[1];
/* Per STA Class B Statistics. Class B statistics are STA TX/RX stats
* provided to FW from Host via periodic messages */ struct stats_class_b_ind { struct wcn36xx_hal_msg_header header;
/* Duration over which this stats was collected */
u32 duration;
¤ 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.84Bemerkung:
(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.