/* * Custom OID/ioctl definitions for * * * Broadcom 802.11abg Networking Device Driver * * Definitions subject to change without notice. * * Copyright (C) 2022, Broadcom. * * Unless you and Broadcom execute a separate written software license * agreement governing use of this software, this software is licensed to you * under the terms of the GNU General Public License version 2 (the "GPL"), * available at http://www.broadcom.com/licenses/GPLv2.php, with the * following added to such license: * * As a special exception, the copyright holders of this software give you * permission to link this software with independent modules, and to copy and * distribute the resulting executable under terms of your choice, provided that * you also meet, for each linked independent module, the terms and conditions of * the license of that module. An independent module is a module which is not * derived from this software. The special exception does not apply to any * modifications of the software. * * * <> */ #ifndef _wlioctl_h_ #define _wlioctl_h_ #include #include #include #include #include #include #include #include <802.11.h> #include <802.11s.h> #include <802.1d.h> #include #ifdef WL11AX #include <802.11ax.h> #endif /* WL11AX */ #include #include #include #include #include #define SSSR_NEW_API /* Include bcmerror.h for error codes or aliases */ #ifdef BCMUTILS_ERR_CODES #include #endif /* BCMUTILS_ERR_CODES */ #include #ifndef USE_LEGACY_RSPEC_DEFS #include #endif #ifdef FTM #include #endif /* NOTE re: Module specific error codes. * * BCME_.. error codes are extended by various features - e.g. FTM, NAN, SAE etc. * The current process is to allocate a range of 1024 negative 32 bit integers to * each module that extends the error codes to indicate a module specific status. * * The next range to use is below. If that range is used for a new feature, please * update the range to be used by the next feature. * * The error codes -4096 ... -5119 are reserved for firmware signing. * * Next available (inclusive) range: [-8*1024 + 1, -7*1024] * * End Note */ /* 11ax trigger frame format - versioning info */ #define TRIG_FRAME_FORMAT_11AX_DRAFT_1P1 0 #define WL_NAN_REKEY WL_NAN_CMD_CFG_REKEY typedef struct { uint32 num; chanspec_t list[BCM_FLEX_ARRAY]; } chanspec_list_t; #define RSN_KCK_LENGTH 16 #define RSN_KEK_LENGTH 16 #define TPK_FTM_LEN 16 #ifndef INTF_NAME_SIZ #define INTF_NAME_SIZ 16 #endif #define WL_ASSOC_START_EVT_DATA_VERSION_1 1 typedef struct assoc_event_data { uint32 version; uint32 flags; chanspec_t join_chspec; uint16 PAD; } assoc_event_data_t; /**Used to send ioctls over the transport pipe */ typedef struct remote_ioctl { cdc_ioctl_t msg; uint32 data_len; char intf_name[INTF_NAME_SIZ]; } rem_ioctl_t; #define REMOTE_SIZE sizeof(rem_ioctl_t) #define BCM_IOV_XTLV_VERSION_0 0 #define MAX_NUM_D11CORES 2 /**DFS Forced param */ typedef struct wl_dfs_forced_params { chanspec_t chspec; uint16 version; chanspec_list_t chspec_list; } wl_dfs_forced_t; #define DFS_PREFCHANLIST_VER 0x01 #define WL_CHSPEC_LIST_FIXED_SIZE OFFSETOF(chanspec_list_t, list) /* size of dfs forced param size given n channels are in the list */ #define WL_DFS_FORCED_PARAMS_SIZE(n) \ (sizeof(wl_dfs_forced_t) + (((n) < 1) ? (0) : (((n) - 1)* sizeof(chanspec_t)))) #define WL_DFS_FORCED_PARAMS_FIXED_SIZE \ (WL_CHSPEC_LIST_FIXED_SIZE + OFFSETOF(wl_dfs_forced_t, chspec_list)) #define WL_DFS_FORCED_PARAMS_MAX_SIZE \ WL_DFS_FORCED_PARAMS_FIXED_SIZE + (WL_NUMCHANNELS * sizeof(chanspec_t)) /**association decision information */ typedef struct { uint8 assoc_approved; /**< (re)association approved */ uint8 PAD; uint16 reject_reason; /**< reason code for rejecting association */ struct ether_addr da; uint8 PAD[6]; #if defined(NDIS) && (NDISVER >= 0x0620) LARGE_INTEGER sys_time; /**< current system time */ #else int64 sys_time; /**< current system time */ #endif } assoc_decision_t; #define DFS_SCAN_S_IDLE -1 #define DFS_SCAN_S_RADAR_FREE 0 #define DFS_SCAN_S_RADAR_FOUND 1 #define DFS_SCAN_S_INPROGESS 2 #define DFS_SCAN_S_SCAN_ABORTED 3 #define DFS_SCAN_S_SCAN_MODESW_INPROGRESS 4 #define DFS_SCAN_S_MAX 5 #define ACTION_FRAME_SIZE 1800 #define WL_RAND_GAS_MAC (0x01 << 0u) typedef struct wl_action_frame_v1 { struct ether_addr da; uint16 len; uint32 packetId; uint8 data[ACTION_FRAME_SIZE]; } wl_action_frame_v1_t; typedef struct wl_action_frame_v2 { uint16 version; uint16 len_total; uint16 data_offset; struct ether_addr da; uint32 packetId; struct ether_addr rand_mac_addr; struct ether_addr rand_mac_mask; uint16 flags; uint16 len_data; uint8 data[]; } wl_action_frame_v2_t; typedef struct ssid_info { uint8 ssid_len; /**< the length of SSID */ uint8 ssid[32]; /**< SSID string */ } ssid_info_t; typedef struct wl_af_params_v1 { uint32 channel; int32 dwell_time; struct ether_addr BSSID; uint8 PAD[2]; wl_action_frame_v1_t action_frame; } wl_af_params_v1_t; #define WL_WIFI_ACTION_FRAME_SIZE_V1 sizeof(wl_action_frame_v1_t) #define WL_WIFI_AF_PARAMS_SIZE_V1 sizeof(wl_af_params_v1_t) typedef struct wl_af_params_v2 { uint16 version; uint16 length; uint32 channel; int32 dwell_time; struct ether_addr BSSID; uint8 PAD[2]; wl_action_frame_v2_t action_frame; } wl_af_params_v2_t; #define WL_WIFI_ACTION_FRAME_SIZE_V2 sizeof(wl_action_frame_v2_t) #define WL_WIFI_AF_PARAMS_SIZE_V2 sizeof(wl_af_params_v2_t) /* version of actframe iovar to be returned as part of wl_actframe_version structure */ #define WL_ACTFRAME_VERSION_MAJOR_2 2u /**< current version of actframe_version structure */ #define WL_ACTFRAME_VERSION_V1 1u /** actframe interface version */ typedef struct wl_actframe_version_v1 { uint16 version; /**< version of the structure */ uint16 length; /**< length of the entire structure */ /* actframe interface version numbers */ uint16 actframe_ver_major; /**< actframe interface major version number */ } wl_actframe_version_v1_t; #define MFP_TEST_FLAG_NORMAL 0 #define MFP_TEST_FLAG_ANY_KEY 1 typedef struct wl_sa_query { uint32 flag; uint8 action; uint8 PAD; uint16 id; struct ether_addr da; uint16 PAD; } wl_sa_query_t; /* EXT_STA */ /**association information */ typedef struct { uint32 assoc_req; /**< offset to association request frame */ uint32 assoc_req_len; /**< association request frame length */ uint32 assoc_rsp; /**< offset to association response frame */ uint32 assoc_rsp_len; /**< association response frame length */ uint32 bcn; /**< offset to AP beacon */ uint32 bcn_len; /**< AP beacon length */ uint32 wsec; /**< ucast security algo */ uint32 wpaie; /**< offset to WPA ie */ uint8 auth_alg; /**< 802.11 authentication mode */ uint8 WPA_auth; /**< WPA: authenticated key management */ uint8 ewc_cap; /**< EWC (MIMO) capable */ uint8 ofdm; /**< OFDM */ } assoc_info_t; /* defined(EXT_STA) */ /* Flags for OBSS IOVAR Parameters */ #define WL_OBSS_DYN_BWSW_FLAG_ACTIVITY_PERIOD (0x01) #define WL_OBSS_DYN_BWSW_FLAG_NOACTIVITY_PERIOD (0x02) #define WL_OBSS_DYN_BWSW_FLAG_NOACTIVITY_INCR_PERIOD (0x04) #define WL_OBSS_DYN_BWSW_FLAG_PSEUDO_SENSE_PERIOD (0x08) #define WL_OBSS_DYN_BWSW_FLAG_RX_CRS_PERIOD (0x10) #define WL_OBSS_DYN_BWSW_FLAG_DUR_THRESHOLD (0x20) #define WL_OBSS_DYN_BWSW_FLAG_TXOP_PERIOD (0x40) /* OBSS IOVAR Version information */ #define WL_PROT_OBSS_CONFIG_PARAMS_VERSION_1 1 #include typedef BWL_PRE_PACKED_STRUCT struct { uint8 obss_bwsw_activity_cfm_count_cfg; /**< configurable count in * seconds before we confirm that OBSS is present and * dynamically activate dynamic bwswitch. */ uint8 obss_bwsw_no_activity_cfm_count_cfg; /**< configurable count in * seconds before we confirm that OBSS is GONE and * dynamically start pseudo upgrade. If in pseudo sense time, we * will see OBSS, [means that, we false detected that OBSS-is-gone * in watchdog] this count will be incremented in steps of * obss_bwsw_no_activity_cfm_count_incr_cfg for confirming OBSS * detection again. Note that, at present, max 30seconds is * allowed like this. [OBSS_BWSW_NO_ACTIVITY_MAX_INCR_DEFAULT] */ uint8 obss_bwsw_no_activity_cfm_count_incr_cfg; /* see above */ uint16 obss_bwsw_pseudo_sense_count_cfg; /**< number of msecs/cnt to be in * pseudo state. This is used to sense/measure the stats from lq. */ uint8 obss_bwsw_rx_crs_threshold_cfg; /**< RX CRS default threshold */ uint8 obss_bwsw_dur_thres; /**< OBSS dyn bwsw trigger/RX CRS Sec */ uint8 obss_bwsw_txop_threshold_cfg; /**< TXOP default threshold */ } BWL_POST_PACKED_STRUCT wlc_obss_dynbwsw_config_t; #include #include typedef BWL_PRE_PACKED_STRUCT struct { uint32 version; /**< version field */ uint32 config_mask; uint32 reset_mask; wlc_obss_dynbwsw_config_t config_params; } BWL_POST_PACKED_STRUCT obss_config_params_t; #include /**bsscfg type */ typedef enum bsscfg_type { BSSCFG_TYPE_GENERIC = 0, /**< Generic AP/STA/IBSS BSS */ BSSCFG_TYPE_P2P = 1, /**< P2P BSS */ /* index 2 earlier used for BTAMP */ BSSCFG_TYPE_PSTA = 3, BSSCFG_TYPE_TDLS = 4, BSSCFG_TYPE_SLOTTED_BSS = 5, BSSCFG_TYPE_PROXD = 6, BSSCFG_TYPE_NAN = 7, BSSCFG_TYPE_MESH = 8, BSSCFG_TYPE_AIBSS = 9 } bsscfg_type_t; /* bsscfg subtype */ typedef enum bsscfg_subtype { BSSCFG_SUBTYPE_NONE = 0, BSSCFG_GENERIC_STA = 1, /* GENERIC */ BSSCFG_GENERIC_AP = 2, BSSCFG_GENERIC_IBSS = 6, BSSCFG_P2P_GC = 3, /* P2P */ BSSCFG_P2P_GO = 4, BSSCFG_P2P_DISC = 5, /* Index 7 & 8 earlier used for BTAMP */ BSSCFG_SUBTYPE_AWDL = 9, /* SLOTTED_BSS_TYPE */ BSSCFG_SUBTYPE_NAN_MGMT = 10, BSSCFG_SUBTYPE_NAN_DATA = 11, BSSCFG_SUBTYPE_NAN_MGMT_DATA = 12 } bsscfg_subtype_t; typedef struct wlc_bsscfg_info { uint32 type; uint32 subtype; } wlc_bsscfg_info_t; /* ULP SHM Offsets info */ typedef struct ulp_shm_info { uint32 m_ulp_ctrl_sdio; uint32 m_ulp_wakeevt_ind; uint32 m_ulp_wakeind; } ulp_shm_info_t; /* Note: Due to unpredictable size, bool type should not be used in any ioctl argument structure * Cf PR53622 */ #define WL_BSS_INFO_VER_109 109 #define WL_BSS_INFO_VER_114 114 /** * BSS info structure * Applications MUST CHECK ie_offset field and length field to access IEs and * next bss_info structure in a vector (in wl_scan_results_t) */ typedef struct wl_bss_info { uint32 version; /**< version field */ uint32 length; /**< byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /**< units are Kusec */ uint16 capability; /**< Capability information */ uint8 SSID_len; uint8 SSID[32]; uint8 bcnflags; /* additional flags w.r.t. beacon */ struct { uint32 count; /**< # rates in this set */ uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ } rateset; /**< supported rates */ chanspec_t chanspec; /**< chanspec for bss */ uint16 atim_window; /**< units are Kusec */ uint8 dtim_period; /**< DTIM period */ uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ int16 RSSI; /**< receive signal strength (in dBm) */ int8 phy_noise; /**< noise (in dBm) */ uint8 n_cap; /**< BSS is 802.11N Capable */ uint8 freespace1; /* make implicit padding explicit */ uint8 load; /**< BSS Load (channel utilization of BSSLoad IE) */ uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ uint8 ctl_ch; /**< 802.11N BSS control channel number */ uint8 PAD[3]; /**< explicit struct alignment padding */ uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint8 flags; /**< flags */ uint8 vht_cap; /**< BSS is vht capable */ uint8 flags2; /**< extended flags */ uint8 reserved; /**< Reserved for expansion of BSS properties */ uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ uint16 ie_offset; /**< offset at which IEs start, from beginning */ uint16 freespace2; /* making implicit padding explicit */ uint32 ie_length; /**< byte length of Information Elements */ int16 SNR; /**< average SNR of during frame reception */ uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ } wl_bss_info_v109_t; /** * BSS info structure * Applications MUST CHECK ie_offset field and length field to access IEs and * next bss_info structure in a vector (in wl_scan_results_t) */ typedef struct wl_bss_info_v109_1 { uint32 version; /**< version field */ uint32 length; /**< byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /**< units are Kusec */ uint16 capability; /**< Capability information */ uint8 SSID_len; uint8 SSID[32]; uint8 bcnflags; /* additional flags w.r.t. beacon */ struct { uint32 count; /**< # rates in this set */ uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ } rateset; /**< supported rates */ chanspec_t chanspec; /**< chanspec for bss */ uint16 atim_window; /**< units are Kusec */ uint8 dtim_period; /**< DTIM period */ uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ int16 RSSI; /**< receive signal strength (in dBm) */ int8 phy_noise; /**< noise (in dBm) */ uint8 n_cap; /**< BSS is 802.11N Capable */ uint8 he_cap; /**< BSS is he capable */ uint8 load; /**< BSS Load (channel utilization of BSSLoad IE) */ uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ uint8 ctl_ch; /**< 802.11N BSS control channel number */ uint8 PAD[3]; /**< explicit struct alignment padding */ uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint8 flags; /**< flags */ uint8 vht_cap; /**< BSS is vht capable */ uint8 flags2; /**< extended flags */ uint8 reserved; /**< Reserved for expansion of BSS properties */ uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ uint16 ie_offset; /**< offset at which IEs start, from beginning */ uint16 freespace2; /* making implicit padding explicit */ uint32 ie_length; /**< byte length of Information Elements */ int16 SNR; /**< average SNR of during frame reception */ uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ uint32 he_mcsmap; /**< STA's Associated hemcsmap */ uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ } wl_bss_info_v109_1_t; /** * BSS info structure * Applications MUST CHECK ie_offset field and length field to access IEs and * next bss_info structure in a vector (in wl_scan_results_t) */ typedef struct wl_bss_info_v109_2 { uint32 version; /**< version field */ uint32 length; /**< byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /**< units are Kusec */ uint16 capability; /**< Capability information */ uint8 SSID_len; uint8 SSID[32]; uint8 bcnflags; /* additional flags w.r.t. beacon */ struct { uint32 count; /**< # rates in this set */ uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ } rateset; /**< supported rates */ chanspec_t chanspec; /**< chanspec for bss */ uint16 atim_window; /**< units are Kusec */ uint8 dtim_period; /**< DTIM period */ uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ int16 RSSI; /**< receive signal strength (in dBm) */ int8 phy_noise; /**< noise (in dBm) */ uint8 n_cap; /**< BSS is 802.11N Capable */ uint8 he_cap; /**< BSS is he capable */ uint8 load; /**< BSS Load (channel utilization of BSSLoad IE) */ uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ uint8 ctl_ch; /**< 802.11N BSS control channel number */ uint8 RSVD1[3]; uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint8 flags; /**< flags */ uint8 vht_cap; /**< BSS is vht capable */ uint8 flags2; /**< extended flags */ uint8 RSVD2; uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ uint16 ie_offset; /**< offset at which IEs start, from beginning */ uint16 freespace2; /* making implicit padding explicit */ uint32 ie_length; /**< byte length of Information Elements */ int16 SNR; /**< average SNR of during frame reception */ uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ uint32 he_mcsmap; /**< STA's Associated hemcsmap */ uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ uint32 timestamp[2]; /* Beacon Timestamp for FAKEAP req */ } wl_bss_info_v109_2_t; /** * BSS info structure * Applications MUST CHECK ie_offset field and length field to access IEs and * next bss_info structure in a vector (in wl_scan_results_t) */ typedef struct wl_bss_info_v112 { uint32 version; /**< version field */ uint32 length; /**< byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /**< units are Kusec */ uint16 capability; /**< Capability information */ uint8 SSID_len; uint8 SSID[32]; /* values can be short ssid or ssid indicates * in flags2 WL_BSS3_FLAGS_SHORT_SSID */ uint8 bcnflags; /* additional flags w.r.t. beacon */ struct { uint32 count; /**< # rates in this set */ uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ } rateset; /**< supported rates */ chanspec_t chanspec; /**< chanspec for bss */ uint16 atim_window; /**< units are Kusec */ uint8 dtim_period; /**< DTIM period */ uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ int16 RSSI; /**< receive signal strength (in dBm) */ int8 phy_noise; /**< noise (in dBm) */ uint8 n_cap; /**< BSS is 802.11N Capable */ uint8 he_cap; /**< BSS is he capable */ uint8 load; /**< BSS Load (channel utilization of BSSLoad IE) */ uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ uint8 ctl_ch; /**< 802.11N BSS control channel number */ uint8 RSVD1[3]; uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac IE, VHT_CAP_MCS_MAP_*) */ uint8 flags; /**< flags */ uint8 vht_cap; /**< BSS is vht capable */ uint8 flags2; /**< extended flags */ uint8 RSVD2; uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ uint16 ie_offset; /**< offset at which IEs start, from beginning */ uint16 freespace2; /* making implicit padding explicit */ uint32 ie_length; /**< byte length of Information Elements */ int16 SNR; /**< average SNR of during frame reception */ uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ uint32 he_mcsmap; /**< STA's Associated hemcsmap */ uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax IE, HE_CAP_MCS_MAP_*) */ uint32 timestamp[2]; /* Beacon Timestamp for FAKEAP req */ uint8 pad1[20]; } wl_bss_info_v112_t; /* EHT-MCS Map for the current operating channel width. * * The map consists of two parts: * * 1. EHT-MCS Map subfield defined in IEEE P802.11be D1.2 EHT-MCS Map (20MHz-Only Non-AP STA) * for mcs 0 - 13 * 2. EHT-MCS Bitmap defined in this file for mcs 14 & 15 (See WL_EHT_MCS_BMP_MCS_x_POS) */ typedef struct wl_eht_mcsmap { uint8 mcs_0_13[4]; /* mcs 0 - 13 mcsmap */ uint8 mcs_14_15[1]; /* mcs 14 & 15 bitmap */ } wl_eht_mcsmap_t; /* EHT mcs 14 & 15 bit positions */ #define WL_EHT_MCS_BMP_MCS_14_POS 0u #define WL_EHT_MCS_BMP_MCS_15_POS 1u /* EHT mcs 14 & 15 field width */ #define WL_EHT_MCS_BMP_MCS_SZ 1u /* 1 bit per mcs */ /** * BSS info structure * Applications MUST CHECK ie_offset field and length field to access IEs and * next bss_info structure in a vector (in wl_scan_results_t) */ typedef struct wl_bss_info_v114 { uint32 version; /**< version field */ uint32 length; /**< byte length of data in this record, * starting at version and including IEs */ struct ether_addr BSSID; uint16 beacon_period; /**< units are Kusec */ uint16 capability; /**< Capability information */ uint8 SSID_len; uint8 SSID[32]; /* values can be short ssid or ssid indicates * in flags2 WL_BSS3_FLAGS_SHORT_SSID */ uint8 bcnflags; /* additional flags w.r.t. beacon */ struct { uint32 count; /**< # rates in this set */ uint8 rates[16]; /**< rates in 500kbps units w/hi bit set if basic */ } rateset; /**< supported rates */ chanspec_t chanspec; /**< chanspec for bss */ uint16 atim_window; /**< units are Kusec */ uint8 dtim_period; /**< DTIM period */ uint8 accessnet; /* from beacon interwork IE (if bcnflags) */ int16 RSSI; /**< receive signal strength (in dBm) */ int8 phy_noise; /**< noise (in dBm) */ uint8 n_cap; /**< BSS is 802.11N Capable */ uint8 he_cap; /**< BSS is he capable */ uint8 load; /**< BSS Load (channel utilization of BSSLoad IE) */ uint32 nbss_cap; /**< 802.11N+AC BSS Capabilities */ uint8 ctl_ch; /**< 802.11N BSS control channel number */ uint8 RSVD1[3]; uint16 vht_rxmcsmap; /**< VHT rx mcs map (802.11ac) */ uint16 vht_txmcsmap; /**< VHT tx mcs map (802.11ac) */ uint8 flags; /**< flags */ uint8 vht_cap; /**< BSS is vht capable */ uint8 flags2; /**< extended flags */ uint8 RSVD2[1]; uint8 basic_mcs[MCSSET_LEN]; /**< 802.11N BSS required MCS set */ uint16 ie_offset; /**< offset at which IEs start, from beginning */ uint8 RSVD3[2]; /* making implicit padding explicit */ uint32 ie_length; /**< byte length of Information Elements */ int16 SNR; /**< average SNR of during frame reception */ uint16 vht_mcsmap; /**< STA's Associated vhtmcsmap */ uint16 vht_mcsmap_prop; /**< STA's Associated prop vhtmcsmap */ uint16 vht_txmcsmap_prop; /**< prop VHT tx mcs prop */ uint32 he_mcsmap; /**< STA's Associated hemcsmap */ uint32 he_rxmcsmap; /**< HE rx mcs map (802.11ax) */ uint32 he_txmcsmap; /**< HE tx mcs map (802.11ax) */ uint32 timestamp[2]; /* Beacon Timestamp for FAKEAP req */ uint8 eht_cap; /* BSS is EHT capable */ uint8 RSVD4[1]; wl_eht_mcsmap_t eht_mcsmap_sta; /* EHT-MCS Map for the STA in associated state */ wl_eht_mcsmap_t eht_mcsmap; /* EHT-MCS Map for the BSS operating chan width */ } wl_bss_info_v114_t; #define WL_GSCAN_FULL_RESULT_VERSION 2 /* current version of wl_gscan_result_t struct */ typedef struct wl_gscan_bss_info_v2 { uint32 timestamp[2]; wl_bss_info_v109_t info; /* Do not add any more members below, fixed */ /* and variable length Information Elements to follow */ } wl_gscan_bss_info_v2_t; typedef struct wl_gscan_bss_info_v3 { uint32 timestamp[2]; uint8 info[]; /* var length wl_bss_info_X structures */ /* Do not add any more members below, fixed */ /* and variable length Information Elements to follow */ } wl_gscan_bss_info_v3_t; typedef struct wl_bsscfg { uint32 bsscfg_idx; uint32 wsec; uint32 WPA_auth; uint32 wsec_index; uint32 associated; uint32 BSS; uint32 phytest_on; struct ether_addr prev_BSSID; struct ether_addr BSSID; uint32 targetbss_wpa2_flags; uint32 assoc_type; uint32 assoc_state; } wl_bsscfg_t; typedef struct wl_if_add { uint32 bsscfg_flags; uint32 if_flags; uint32 ap; struct ether_addr mac_addr; uint16 PAD; uint32 wlc_index; } wl_if_add_t; typedef struct wl_bss_config { uint32 atim_window; uint32 beacon_period; uint32 chanspec; } wl_bss_config_t; /* Number of Bsscolor supported per core */ #ifndef HE_MAX_BSSCOLOR_RES #define HE_MAX_BSSCOLOR_RES 2 #endif #ifndef HE_MAX_STAID_PER_BSSCOLOR #define HE_MAX_STAID_PER_BSSCOLOR 4 #endif /* BSSColor indices */ #define BSSCOLOR0_IDX 0 #define BSSCOLOR1_IDX 1 #define HE_BSSCOLOR0 0 #define HE_BSSCOLOR_MAX_VAL 63 /* STAID indices */ #define STAID0_IDX 0 #define STAID1_IDX 1 #define STAID2_IDX 2 #define STAID3_IDX 3 #define HE_STAID_MAX_VAL 0x07FF typedef struct wl_bsscolor_info { uint16 version; /**< structure version */ uint16 length; /**< length of the bsscolor info */ uint8 bsscolor_index; /**< bsscolor index 0-1 */ uint8 bsscolor; /**c0, B[9:5]=>c1, B[14:10]=>c2, B[19:15]=>c[3-7] * B[24:20]=>c[8-9], B[29:25]=>c[10-11] */ uint32 bfgain_2x1[NUM_BFGAIN_ARRAY_1RX]; /* exp 1ss, imp 1ss */ uint32 bfgain_2x2[NUM_BFGAIN_ARRAY_2RX]; /* exp [1-2]ss, imp 1ss */ uint32 bfgain_3x1[NUM_BFGAIN_ARRAY_1RX]; uint32 bfgain_3x2[NUM_BFGAIN_ARRAY_2RX]; uint32 bfgain_3x3[NUM_BFGAIN_ARRAY_3RX]; /* exp [1-3]ss, imp 1ss */ uint32 bfgain_4x1[NUM_BFGAIN_ARRAY_1RX]; uint32 bfgain_4x2[NUM_BFGAIN_ARRAY_2RX]; uint32 bfgain_4x3[NUM_BFGAIN_ARRAY_3RX]; uint32 bfgain_4x4[NUM_BFGAIN_ARRAY_4RX]; /* exp [1-4]ss, imp 1ss */ } wl_txbf_expgainset_t; #define OFDM_RATE_MASK 0x0000007f typedef uint8 ofdm_rates_t; typedef struct wl_rates_info { wl_rateset_t rs_tgt; uint32 phy_type; int32 bandtype; uint8 cck_only; uint8 rate_mask; uint8 mcsallow; uint8 bw; uint8 txstreams; uint8 PAD[3]; } wl_rates_info_t; /**uint32 list */ typedef struct wl_uint32_list { /** in - # of elements, out - # of entries */ uint32 count; /** variable length uint32 list */ uint32 element[BCM_FLEX_ARRAY]; } wl_uint32_list_t; /* Size in bytes for wl_uint32_list_t with 'count' elements */ #define WL_UINT32_LIST_SIZE(count) (((count) + 1) * sizeof(uint32)) #define CHAN_INFO_LIST_ALL_V1 1 typedef struct wl_chanspec_attr_s_v1 { uint32 chaninfo; uint32 chanspec; } wl_chanspec_attr_v1_t; /**chanspecs list */ typedef struct wl_chanspec_list_s_v1 { uint16 version; /** in - # of chanspecs, out - # of entries */ uint16 count; /** variable length chanspecs list */ wl_chanspec_attr_v1_t chspecs[BCM_FLEX_ARRAY]; } wl_chanspec_list_v1_t; /* WLC_SET_ALLOW_MODE values */ #define ALLOW_MODE_ANY_BSSID 0 #define ALLOW_MODE_ONLY_DESIRED_BSSID 1 #define ALLOW_MODE_NO_BSSID 2 /** used for association with a specific BSSID and chanspec list */ typedef struct wl_assoc_params { struct ether_addr bssid; /**< 00:00:00:00:00:00: broadcast scan */ uint16 bssid_cnt; /**< 0: use chanspec_num, and the single bssid, * otherwise count of chanspecs in chanspec_list * AND paired bssids following chanspec_list * also, chanspec_num has to be set to zero * for bssid list to be used */ int32 chanspec_num; /**< 0: all available channels, * otherwise count of chanspecs in chanspec_list */ chanspec_t chanspec_list[BCM_FLEX_ARRAY]; /**< list of chanspecs */ } wl_assoc_params_t; typedef struct wl_assoc_params_v1 { uint16 version; uint16 flags; struct ether_addr bssid; /**< 00:00:00:00:00:00: broadcast scan */ uint16 bssid_cnt; /**< 0: use chanspec_num, and the single bssid, * otherwise count of chanspecs in chanspec_list * AND paired bssids following chanspec_list * also, chanspec_num has to be set to zero * for bssid list to be used */ int32 chanspec_num; /**< 0: all available channels, * otherwise count of chanspecs in chanspec_list */ chanspec_t chanspec_list[BCM_FLEX_ARRAY]; /**< list of chanspecs */ } wl_assoc_params_v1_t; /** Assoc params flags */ #define ASSOC_HINT_BSSID_PRESENT 0x0001u /* FW to delete PMKSA of bssid listed in assoc params */ #define WL_ASSOC_PARAM_FLAG_DEL_PMKSA 0x0002u #define WL_ASSOC_PARAM_FLAG_ACTIVE6G 0x0004u #define WL_ASSOC_PARAMS_FIXED_SIZE OFFSETOF(wl_assoc_params_t, chanspec_list) #define WL_ASSOC_PARAMS_FIXED_SIZE_V1 OFFSETOF(wl_assoc_params_v1_t, chanspec_list) /** used for reassociation/roam to a specific BSSID and channel */ typedef wl_assoc_params_t wl_reassoc_params_t; typedef wl_assoc_params_v1_t wl_reassoc_params_v1_t; #define WL_REASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE #define WL_REASSOC_PARAMS_FIXED_SIZE_V1 WL_ASSOC_PARAMS_FIXED_SIZE_V1 #define WL_EXT_REASSOC_VER 1 #define WL_EXT_REASSOC_VER_1 2 typedef struct wl_ext_reassoc_params { uint16 version; uint16 length; uint32 flags; wl_reassoc_params_t params; } wl_ext_reassoc_params_t; /* Flags field defined above in wl_ext_reassoc_params * The below flag bit is used to specify the type * of scan to be used for reassoc */ #define WL_SCAN_MODE_HIGH_ACC 0u /**< use high accuracy scans for roam */ #define WL_SCAN_MODE_LOW_SPAN 1u /**< use low span scans for roam */ #define WL_SCAN_MODE_LOW_POWER 2u /**< use low power scans for roam */ #define WL_SCAN_MODE_NO_6GHZ_FOLLOWUP 4u /* 6G active scan not done due to RNR or FILS */ #define WL_EXTREASSOC_PARAMS_FIXED_SIZE (OFFSETOF(wl_ext_reassoc_params_t, params) + \ WL_REASSOC_PARAMS_FIXED_SIZE) typedef struct wl_ext_reassoc_params_v1 { uint16 version; uint16 length; uint32 flags; wl_reassoc_params_v1_t params; } wl_ext_reassoc_params_v1_t; #define WL_EXTREASSOC_PARAMS_FIXED_SIZE_V1 (OFFSETOF(wl_ext_reassoc_params_v1_t, params) + \ WL_REASSOC_PARAMS_FIXED_SIZE_V1) /** used for association to a specific BSSID and channel */ typedef wl_assoc_params_t wl_join_assoc_params_t; typedef wl_assoc_params_v1_t wl_join_assoc_params_v1_t; #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE WL_ASSOC_PARAMS_FIXED_SIZE #define WL_JOIN_ASSOC_PARAMS_FIXED_SIZE_V1 WL_ASSOC_PARAMS_FIXED_SIZE_V1 /** used for join with or without a specific bssid and channel list */ typedef struct wl_join_params { wlc_ssid_t ssid; wl_assoc_params_t params; /**< optional field, but it must include the fixed portion * of the wl_assoc_params_t struct when it does present. */ } wl_join_params_t; /** used for join with or without a specific bssid and channel list */ typedef struct wl_join_params_v1 { wlc_ssid_t ssid; wl_assoc_params_v1_t params; /**< optional field, but it must include the fixed portion * of the wl_assoc_params_t struct when it does present. */ } wl_join_params_v1_t; #define WL_JOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_join_params_t, params) + \ WL_ASSOC_PARAMS_FIXED_SIZE) #define WL_JOIN_PARAMS_FIXED_SIZE_V1 (OFFSETOF(wl_join_params_v1_t, params) + \ WL_ASSOC_PARAMS_FIXED_SIZE_V1) typedef struct wlc_roam_exp_params { int8 a_band_boost_threshold; int8 a_band_penalty_threshold; int8 a_band_boost_factor; int8 a_band_penalty_factor; int8 cur_bssid_boost; int8 alert_roam_trigger_threshold; int16 a_band_max_boost; } wlc_roam_exp_params_t; #define ROAM_EXP_CFG_VERSION_1 1 #define ROAM_EXP_ENABLE_FLAG (1 << 0) #define ROAM_EXP_CFG_PRESENT (1 << 1) typedef struct wl_roam_exp_cfg { uint16 version; uint16 flags; wlc_roam_exp_params_t params; } wl_roam_exp_cfg_t; typedef struct wl_bssid_pref_list { struct ether_addr bssid; /* Add this to modify rssi */ int8 rssi_factor; int8 flags; } wl_bssid_pref_list_t; #define BSSID_PREF_LIST_VERSION_1 1 #define ROAM_EXP_CLEAR_BSSID_PREF (1 << 0) typedef struct wl_bssid_pref_cfg { uint16 version; uint16 flags; uint16 count; uint16 reserved; wl_bssid_pref_list_t bssids[]; } wl_bssid_pref_cfg_t; #define SSID_WHITELIST_VERSION_1 1 #define ROAM_EXP_CLEAR_SSID_WHITELIST (1 << 0) /* Roam SSID whitelist, ssids in this list are ok to */ /* be considered as targets to join when considering a roam */ typedef struct wl_ssid_whitelist { uint16 version; uint16 flags; uint8 ssid_count; uint8 reserved[3]; wlc_ssid_t ssids[]; } wl_ssid_whitelist_t; #define ROAM_EXP_EVENT_VERSION_1 1 typedef struct wl_roam_exp_event { uint16 version; uint16 flags; wlc_ssid_t cur_ssid; } wl_roam_exp_event_t; /** scan params for extended join */ typedef struct wl_join_scan_params { uint8 scan_type; /**< 0 use default, active or passive scan */ uint8 PAD[3]; int32 nprobes; /**< -1 use default, number of probes per channel */ int32 active_time; /**< -1 use default, dwell time per channel for * active scanning */ int32 passive_time; /**< -1 use default, dwell time per channel * for passive scanning */ int32 home_time; /**< -1 use default, dwell time for the home channel * between channel scans */ } wl_join_scan_params_t; #define wl_join_assoc_params_t wl_assoc_params_t #define wl_join_assoc_params_v1_t wl_assoc_params_v1_t /** extended join params */ typedef struct wl_extjoin_params { wlc_ssid_t ssid; /**< {0, ""}: wildcard scan */ wl_join_scan_params_t scan; wl_join_assoc_params_t assoc; /**< optional field, but it must include the fixed portion * of the wl_join_assoc_params_t struct when it does * present. */ } wl_extjoin_params_t; typedef struct wl_extjoin_params_v1 { uint16 version; uint16 PAD; wlc_ssid_t ssid; /**< {0, ""}: wildcard scan */ wl_join_scan_params_t scan; wl_join_assoc_params_v1_t assoc; /**< optional field, but it must include the fixed portion * of the wl_join_assoc_params_t struct when it does * present. */ } wl_extjoin_params_v1_t; #define WL_EXTJOIN_PARAMS_FIXED_SIZE (OFFSETOF(wl_extjoin_params_t, assoc) + \ WL_JOIN_ASSOC_PARAMS_FIXED_SIZE) #define WL_EXTJOIN_PARAMS_FIXED_SIZE_V1 (OFFSETOF(wl_extjoin_params_v1_t, assoc) + \ WL_JOIN_ASSOC_PARAMS_FIXED_SIZE_V1) #define ANT_SELCFG_MAX 4 /**< max number of antenna configurations */ #define MAX_STREAMS_SUPPORTED 4 /**< max number of streams supported */ typedef struct { uint8 ant_config[ANT_SELCFG_MAX]; /**< antenna configuration */ uint8 num_antcfg; /**< number of available antenna configurations */ } wlc_antselcfg_t; #define WIFI_RADIO_STAT_VERSION_1 (1u) #define WIFI_RADIO_STAT_VERSION_2 (2u) typedef enum wl_radiostats_slice_index { WL_RADIOSTAT_SLICE_INDEX_MAIN = 0u, WL_RADIOSTAT_SLICE_INDEX_AUX = 1u, WL_RADIOSTAT_SLICE_INDEX_SCAN = 2u, WL_RADIOSTAT_SLICE_INDEX_MAX = 3u } wl_radiostats_slice_index_t; #define WIFI_RADIO_STAT_FIXED_LEN OFFSETOF(wifi_radio_stat, channels) typedef struct wifi_radio_stat_v1 { uint16 version; uint16 length; uint32 radio; uint32 on_time; uint32 tx_time; uint32 rx_time; uint32 on_time_scan; uint32 on_time_nbd; uint32 on_time_gscan; uint32 on_time_roam_scan; uint32 on_time_pno_scan; uint32 on_time_hs20; uint32 num_channels; uint8 channels[]; } wifi_radio_stat_v1_t; typedef struct wifi_radio_stat_v2 { uint16 version; uint16 length; uint32 radio; uint32 on_time; uint32 tx_time; uint32 rx_time; uint32 on_time_scan; uint32 on_time_nbd; uint32 on_time_gscan; uint32 on_time_roam_scan; uint32 on_time_pno_scan; uint32 on_time_hs20; uint32 myrx_time; uint32 num_channels; uint8 channels[]; } wifi_radio_stat_v2_t; /* This is obsolete.Pls add new fields by extending versioned structure. * cca_congest_ext_vX_t [X is latest version] */ typedef struct cca_congest { uint32 duration; /**< millisecs spent sampling this channel */ union { uint32 congest_ibss; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_me; /**< millisecs in my own traffic */ }; union { uint32 congest_obss; /**< traffic not in our bss */ uint32 congest_notme; /**< traffic not from/to me (including bc/mc) */ }; uint32 interference; /**< millisecs detecting a non 802.11 interferer. */ uint32 timestamp; /**< second timestamp */ } cca_congest_t; /* This is obsolete.Pls add new fields by extending versioned structure. * cca_congest_ext_channel_req_vX_t [X is latest version] */ typedef struct cca_congest_channel_req { chanspec_t chanspec; /**< Which channel? */ uint16 num_secs; /**< How many secs worth of data */ cca_congest_t secs[BCM_FLEX_ARRAY]; /**< Data */ } cca_congest_channel_req_t; typedef struct cca_congest_ext { uint32 timestamp; /**< second timestamp */ /* Base structure of cca_congest_t: CCA statistics all inclusive */ uint32 duration; /**< millisecs spent sampling this channel */ uint32 congest_meonly; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss; /**< traffic not in our bss */ uint32 interference; /**< millisecs detecting a non 802.11 interferer. */ /* CCA statistics for non PM only */ uint32 duration_nopm; /**< millisecs spent sampling this channel */ uint32 congest_meonly_nopm; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss_nopm; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss_nopm; /**< traffic not in our bss */ uint32 interference_nopm; /**< millisecs detecting a non 802.11 interferer. */ /* CCA statistics for during PM only */ uint32 duration_pm; /**< millisecs spent sampling this channel */ uint32 congest_meonly_pm; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss_pm; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss_pm; /**< traffic not in our bss */ uint32 interference_pm; /**< millisecs detecting a non 802.11 interferer. */ } cca_congest_ext_t; typedef struct cca_congest_ext_v2 { uint32 timestamp; /**< second timestamp */ /* Base structure of cca_congest_t: CCA statistics all inclusive */ uint32 duration; /**< millisecs spent sampling this channel */ uint32 congest_meonly; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss; /**< traffic not in our bss */ uint32 interference; /**< millisecs detecting a non 802.11 interferer. */ /* CCA statistics for non PM only */ uint32 duration_nopm; /**< millisecs spent sampling this channel */ uint32 congest_meonly_nopm; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss_nopm; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss_nopm; /**< traffic not in our bss */ uint32 interference_nopm; /**< millisecs detecting a non 802.11 interferer. */ /* CCA statistics for during PM only */ uint32 duration_pm; /**< millisecs spent sampling this channel */ uint32 congest_meonly_pm; /**< millisecs in my own traffic (TX + RX) */ uint32 congest_ibss_pm; /**< millisecs in our bss (presumably this traffic will */ /**< move if cur bss moves channels) */ uint32 congest_obss_pm; /**< traffic not in our bss */ uint32 interference_pm; /**< millisecs detecting a non 802.11 interferer. */ uint32 radio_on_time; /* Awake time on this channel */ uint32 cca_busy_time; /* CCA is held busy on this channel */ } cca_congest_ext_v2_t; #define WL_CCA_EXT_REQ_VER 0u #define WL_CCA_EXT_REQ_VER_V2 2u #define WL_CCA_EXT_REQ_VER_V3 3u typedef struct cca_congest_ext_channel_req { uint16 ver; /**< version of this struct */ uint16 len; /**< len of this structure */ chanspec_t chanspec; /**< Which channel? */ uint16 num_secs; /**< How many secs worth of data */ struct cca_congest_ext secs[BCM_FLEX_ARRAY]; /**< Data - 3 sets for ALL - non-PM - PM */ } cca_congest_ext_channel_req_t; typedef struct cca_congest_ext_channel_req_v2 { uint16 ver; /**< version of this struct */ uint16 len; /**< len of this structure */ chanspec_t chanspec; /**< Which channel? */ uint16 num_secs; /* How many secs worth of data */ cca_congest_ext_v2_t secs[1]; /* Data - 3 sets for ALL - non-PM - PM */ } cca_congest_ext_channel_req_v2_t; /* Struct holding all channels cca statistics */ typedef struct cca_congest_ext_channel_req_v3 { uint16 ver; uint16 len; uint8 PAD[2]; uint16 num_of_entries; cca_congest_ext_channel_req_v2_t per_chan_stats[BCM_FLEX_ARRAY]; } cca_congest_ext_channel_req_v3_t; typedef struct { uint32 duration; /**< millisecs spent sampling this channel */ uint32 congest; /**< millisecs detecting busy CCA */ uint32 timestamp; /**< second timestamp */ } cca_congest_simple_t; // ED: Energy Detection Thresholds #define PHY_EDTHRESH_MAX_COUNT 2u /* WLC_API_VERSION_MAJOR >= 17u */ // Desense Reasons #define BPHY_DESENSE_ACI_MASK (1 << 0u) // Desense due to GBD #define OFDM_DESENSE_ACI_MASK (1 << 1u) #define BPHY_DESENSE_BTC_MASK (1 << 2u) // Desense due to BT Coex operation #define OFDM_DESENSE_BTC_MASK (1 << 3u) #define BPHY_DESENSE_LTE_MASK (1 << 4u) // Desense due to LTE Coex operation #define OFDM_DESENSE_LTE_MASK (1 << 5u) #define DESENSE_ON_LTE_MASK (1 << 6u) // Desense due to InitGain or CRS desense #define DESENSE_ON_BTC_MASK (1 << 7u) typedef struct { int32 ofdm_desense; int32 bphy_desense; uint32 reason; /**< bit flags for desense reasons */ } wl_phy_rxdesense_t; /* The following two structure must have same first 4 fields. * The cca_chan_qual_event_t is used to report CCA in older formats and NF. * The cca_only_chan_qual_event_t is used to report CCA only with newer format. */ typedef struct { uint16 status; /**< misc status */ uint16 id; /**< sub-event ID */ chanspec_t chanspec; /**< Which channel? */ uint16 len; /**< number of bytes to follow */ union { cca_congest_simple_t cca_busy; /**< CCA busy */ cca_congest_t cca_busy_ext; /**< Extended CCA report */ int32 noise; /**< noise floor */ }; } cca_chan_qual_event_t; typedef struct { uint16 status; /**< misc status */ uint16 id; /**< sub-event ID */ chanspec_t chanspec; /**< Which channel? */ uint16 len; /**< number of bytes to follow */ union { cca_congest_simple_t cca_busy; /**< CCA busy */ struct { cca_congest_t cca_busy_ext; /**< Extended CCA report */ cca_congest_t cca_busy_nopm; /**< Extedned CCA report (PM awake time) */ cca_congest_t cca_busy_pm; /**< Extedned CCA report (PM sleep time) */ }; }; } cca_only_chan_qual_event_t; typedef struct { uint16 status; /**< misc status */ uint16 id; /**< sub-event ID */ /* id is used to indicate the number of bytes to read */ chanspec_t chanspec; /**< Which channel? */ uint16 len; /**< number of bytes to follow */ union { cca_congest_simple_t cca_busy; /**< CCA busy */ struct { cca_congest_t cca_busy_ext; /**< Extended CCA report */ cca_congest_t cca_busy_nopm; /**< Extedned CCA report (PM awake time) */ cca_congest_t cca_busy_pm; /**< Extedned CCA report (PM sleep time) */ }; }; int32 ofdm_desense; } cca_only_chan_qual_event_v2_t; typedef struct { uint16 status; /**< misc status */ uint16 id; /**< sub-event ID */ chanspec_t chanspec; /**< Which channel? */ uint16 len; /**< number of bytes to follow */ cca_congest_t cca_busy_ext; /**< Extended CCA report */ cca_congest_t cca_busy_nopm; /**< Extedned CCA report (PM awake time) */ cca_congest_t cca_busy_pm; /**< Extedned CCA report (PM sleep time) */ wl_phy_rxdesense_t desense; /**< PHY RX desense states & reasons */ } cca_only_chan_qual_event_v3_t; typedef struct { uint32 msrmnt_time; /**< Time for Measurement (msec) */ uint32 msrmnt_done; /**< flag set when measurement complete */ char buf[]; } cca_stats_n_flags; typedef struct { uint32 msrmnt_query; /* host to driver query for measurement done */ uint32 time_req; /* time required for measurement */ uint8 report_opt; /* option to print different stats in report */ uint8 PAD[3]; } cca_msrmnt_query; /* interference sources */ enum interference_source { ITFR_NONE = 0, /**< interference */ ITFR_PHONE, /**< wireless phone */ ITFR_VIDEO_CAMERA, /**< wireless video camera */ ITFR_MICROWAVE_OVEN, /**< microwave oven */ ITFR_BABY_MONITOR, /**< wireless baby monitor */ ITFR_BLUETOOTH, /**< bluetooth */ ITFR_VIDEO_CAMERA_OR_BABY_MONITOR, /**< wireless camera or baby monitor */ ITFR_BLUETOOTH_OR_BABY_MONITOR, /**< bluetooth or baby monitor */ ITFR_VIDEO_CAMERA_OR_PHONE, /**< video camera or phone */ ITFR_UNIDENTIFIED /**< interference from unidentified source */ }; /** structure for interference source report */ typedef struct { uint32 flags; /**< flags. bit definitions below */ uint32 source; /**< last detected interference source */ uint32 timestamp; /**< second timestamp on interferenced flag change */ } interference_source_rep_t; #define WLC_CNTRY_BUF_SZ 4 /**< Country string is 3 bytes + NUL */ typedef struct wl_country { char country_abbrev[WLC_CNTRY_BUF_SZ]; /**< nul-terminated country code used in * the Country IE */ int32 rev; /**< revision specifier for ccode * on set, -1 indicates unspecified. * on get, rev >= 0 */ char ccode[WLC_CNTRY_BUF_SZ]; /**< nul-terminated built-in country code. * variable length, but fixed size in * struct allows simple allocation for * expected country strings <= 3 chars. */ } wl_country_t; #define CCODE_INFO_VERSION_1 1 typedef enum wl_ccode_role { WLC_CCODE_ROLE_ACTIVE = 0, WLC_CCODE_ROLE_HOST, WLC_CCODE_ROLE_80211D_ASSOC, WLC_CCODE_ROLE_80211D_SCAN, WLC_CCODE_ROLE_DEFAULT, WLC_CCODE_ROLE_DEFAULT_SROM_BKUP, WLC_CCODE_LAST } wl_ccode_role_t; #define WLC_NUM_CCODE_INFO WLC_CCODE_LAST typedef struct wl_ccode_entry { uint16 reserved; uint8 band; uint8 role; char ccode[WLC_CNTRY_BUF_SZ]; } wl_ccode_entry_t; typedef struct wl_ccode_info { uint16 version; uint16 count; /**< Number of ccodes entries in the set */ wl_ccode_entry_t ccodelist[BCM_FLEX_ARRAY]; } wl_ccode_info_t; #define WL_CCODE_INFO_FIXED_LEN OFFSETOF(wl_ccode_info_t, ccodelist) typedef struct wl_channels_in_country { uint32 buflen; uint32 band; char country_abbrev[WLC_CNTRY_BUF_SZ]; uint32 count; uint32 channel[BCM_FLEX_ARRAY]; } wl_channels_in_country_t; typedef struct wl_country_list { uint32 buflen; uint32 band_set; uint32 band; uint32 count; char country_abbrev[BCM_FLEX_ARRAY]; } wl_country_list_t; typedef struct wl_rm_req_elt { int8 type; int8 flags; chanspec_t chanspec; uint32 token; /**< token for this measurement */ uint32 tsf_h; /**< TSF high 32-bits of Measurement start time */ uint32 tsf_l; /**< TSF low 32-bits */ uint32 dur; /**< TUs */ } wl_rm_req_elt_t; typedef struct wl_rm_req { uint32 token; /**< overall measurement set token */ uint32 count; /**< number of measurement requests */ void *cb; /**< completion callback function: may be NULL */ void *cb_arg; /**< arg to completion callback function */ wl_rm_req_elt_t req[BCM_FLEX_ARRAY]; /**< variable length block of requests */ } wl_rm_req_t; #define WL_RM_REQ_FIXED_LEN OFFSETOF(wl_rm_req_t, req) typedef struct wl_rm_rep_elt { int8 type; int8 flags; chanspec_t chanspec; uint32 token; /**< token for this measurement */ uint32 tsf_h; /**< TSF high 32-bits of Measurement start time */ uint32 tsf_l; /**< TSF low 32-bits */ uint32 dur; /**< TUs */ uint32 len; /**< byte length of data block */ uint8 data[1]; /**< variable length data block */ } wl_rm_rep_elt_t; #define WL_RM_REP_ELT_FIXED_LEN 24 /**< length excluding data block */ #define WL_RPI_REP_BIN_NUM 8 typedef struct wl_rm_rpi_rep { uint8 rpi[WL_RPI_REP_BIN_NUM]; int8 rpi_max[WL_RPI_REP_BIN_NUM]; } wl_rm_rpi_rep_t; typedef struct wl_rm_rep { uint32 token; /**< overall measurement set token */ uint32 len; /**< length of measurement report block */ wl_rm_rep_elt_t rep[BCM_FLEX_ARRAY]; } wl_rm_rep_t; #define WL_RM_REP_FIXED_LEN 8 #ifdef BCMCCX #define LEAP_USER_MAX 32 #define LEAP_DOMAIN_MAX 32 #define LEAP_PASSWORD_MAX 32 typedef struct wl_leap_info { wlc_ssid_t ssid; uint8 user_len; uint8 user[LEAP_USER_MAX]; uint8 password_len; uint8 password[LEAP_PASSWORD_MAX]; uint8 domain_len; uint8 domain[LEAP_DOMAIN_MAX]; uint8 PAD; } wl_leap_info_t; typedef struct wl_leap_list { uint32 buflen; uint32 version; uint32 count; wl_leap_info_t leap_info[BCM_FLEX_ARRAY]; } wl_leap_list_t; #endif /* BCMCCX */ #define WL_SUP_IOV_VERSION_1 0x0001u enum { WL_SUP_CMD_NONE = 0, /* Get SUP IOVAR bersion */ WL_SUP_CMD_GET_VERSION = 1u, /* IOVAR to send GTK rekey request */ WL_SUP_CMD_SEND_GTK_REQ = 2u, /* Set/Get skip GTK M1 processing state */ WL_SUP_CMD_IGNORE_GTK_M1 = 3u }; typedef uint16 wl_sup_cmd_t; typedef struct wl_sup_iov_v1 { uint16 version; /* structure version will be incremented * when header is changed. */ uint16 len; /* data field lenth. */ wl_sup_cmd_t cmd; /* sub-command id. */ uint8 data[]; /* variable */ } wl_sup_iov_v1_t; typedef enum sup_auth_status { /* Basic supplicant authentication states */ WLC_SUP_DISCONNECTED = 0, WLC_SUP_CONNECTING, WLC_SUP_IDREQUIRED, WLC_SUP_AUTHENTICATING, WLC_SUP_AUTHENTICATED, WLC_SUP_KEYXCHANGE, WLC_SUP_KEYED, WLC_SUP_TIMEOUT, WLC_SUP_LAST_BASIC_STATE, /* Extended supplicant authentication states */ /** Waiting to receive handshake msg M1 */ WLC_SUP_KEYXCHANGE_WAIT_M1 = WLC_SUP_AUTHENTICATED, /** Preparing to send handshake msg M2 */ WLC_SUP_KEYXCHANGE_PREP_M2 = WLC_SUP_KEYXCHANGE, /* Waiting to receive handshake msg M3 */ WLC_SUP_KEYXCHANGE_WAIT_M3 = WLC_SUP_LAST_BASIC_STATE, WLC_SUP_KEYXCHANGE_PREP_M4, /**< Preparing to send handshake msg M4 */ WLC_SUP_KEYXCHANGE_WAIT_G1, /**< Waiting to receive handshake msg G1 */ WLC_SUP_KEYXCHANGE_PREP_G2 /**< Preparing to send handshake msg G2 */ } sup_auth_status_t; #define WLC_SUP_TD_POLICY_XTLV_ID 0x1u #define WLC_SUP_TD_POLICY_XTLV_ELEM_SIZE 0x4u /* 4B aligned */ #define WLC_SUP_TD_POLICY_XTLV_SIZE (BCM_XTLV_HDR_SIZE + WLC_SUP_TD_POLICY_XTLV_ELEM_SIZE) typedef struct wl_wsec_key { uint32 index; /**< key index */ uint32 len; /**< key length */ uint8 data[DOT11_MAX_KEY_SIZE]; /**< key data */ uint32 PAD[18]; uint32 algo; /**< CRYPTO_ALGO_AES_CCM, CRYPTO_ALGO_WEP128, etc */ uint32 flags; /**< misc flags */ uint32 PAD[2]; int32 PAD; int32 iv_initialized; /**< has IV been initialized already? */ int32 PAD; /* Rx IV */ struct { uint32 hi; /**< upper 32 bits of IV */ uint16 lo; /**< lower 16 bits of IV */ uint16 PAD; } rxiv; uint32 PAD[2]; struct ether_addr ea; /**< per station */ uint16 PAD; } wl_wsec_key_t; /* Min length for PSK passphrase */ #define WSEC_MIN_PSK_LEN 8 /* Max length of supported passphrases for PSK */ #define WSEC_MAX_PSK_LEN 64 /* Max length of supported passphrases for SAE */ #define WSEC_MAX_PASSPHRASE_LEN 256u /* Max length of SAE password ID */ #define WSEC_MAX_SAE_PASSWORD_ID 255u /* Flag for key material needing passhash'ing */ #define WSEC_PASSPHRASE 1u /* Flag indicating an SAE passphrase */ #define WSEC_SAE_PASSPHRASE 2u /**receptacle for WLC_SET_WSEC_PMK parameter */ typedef struct wsec_pmk { uint16 key_len; /* octets in key material */ uint16 flags; /* key handling qualification */ uint8 key[WSEC_MAX_PASSPHRASE_LEN]; /* PMK material */ uint16 opt_len; /* optional field length */ uint8 opt_tlvs[BCM_FLEX_ARRAY]; /* optional filed in bcm_xtlv_t format */ } wsec_pmk_t; typedef enum { WL_PMK_TLV_PASSWORD_ID = 1, WL_PMK_TLV_SSID = 2, WL_PMK_TLV_BSSID = 3 } wl_pmk_tlv_types_t; #define WL_AUTH_EVENT_DATA_V1 0x1 #define WL_AUTH_EVENT_DATA_V2 0x2 /* tlv ids for auth event */ #define WL_AUTH_PMK_TLV_ID 1u #define WL_AUTH_PMKID_TLV_ID 2u #define WL_AUTH_PMKID_TYPE_TLV_ID 3u #define WL_AUTH_SSID_TLV_ID 4u #define WL_AUTH_PMKID_TYPE_BSSID 1u #define WL_AUTH_PMKID_TYPE_SSID 2u /* AUTH event data * pmk and pmkid in case of SAE auth * xtlvs will be 32 bit alligned */ typedef struct wl_auth_event { uint16 version; uint16 length; uint8 xtlvs[]; } wl_auth_event_t; #define WL_AUTH_EVENT_FIXED_LEN_V1 OFFSETOF(wl_auth_event_t, xtlvs) #define WL_AUTH_EVENT_FIXED_LEN_V2 OFFSETOF(wl_auth_event_t, xtlvs) #define WL_PMKSA_EVENT_DATA_V1 1u /* tlv ids for PMKSA event */ #define WL_PMK_TLV_ID 1u #define WL_PMKID_TLV_ID 2u #define WL_PEER_ADDR_TLV_ID 3u /* PMKSA event data structure */ typedef struct wl_pmksa_event { uint16 version; uint16 length; uint8 xtlvs[]; } wl_pmksa_event_t; #define WL_PMKSA_EVENT_FIXED_LEN_V1 OFFSETOF(wl_pmksa_event_t, xtlvs) #define FILS_CACHE_ID_LEN 2u #define PMK_LEN_MAX 48u typedef struct _pmkid_v1 { struct ether_addr BSSID; uint8 PMKID[WPA2_PMKID_LEN]; } pmkid_v1_t; #define PMKID_ELEM_V2_LENGTH (sizeof(struct ether_addr) + WPA2_PMKID_LEN + PMK_LEN_MAX + \ sizeof(ssid_info_t) + FILS_CACHE_ID_LEN) typedef struct _pmkid_v2 { uint16 length; /* Should match PMKID_ELEM_VX_LENGTH */ struct ether_addr BSSID; uint8 PMKID[WPA2_PMKID_LEN]; uint8 pmk[PMK_LEN_MAX]; /* for FILS key deriviation */ uint16 pmk_len; ssid_info_t ssid; uint8 fils_cache_id[FILS_CACHE_ID_LEN]; uint8 PAD; } pmkid_v2_t; #define PMKID_LIST_VER_2 2 typedef struct _pmkid_v3 { struct ether_addr bssid; uint8 pmkid[WPA2_PMKID_LEN]; uint8 pmkid_len; uint8 pmk[PMK_LEN_MAX]; uint8 pmk_len; uint16 fils_cache_id; /* 2-byte length */ uint8 akm; uint8 ssid_len; uint8 ssid[DOT11_MAX_SSID_LEN]; /* For FILS, to save ESSID */ /* one pmkid used in whole ESS */ uint32 time_left; /* remaining time until expirary in sec. */ /* 0 means expired, all 0xFF means never expire */ } pmkid_v3_t; #define PMKID_LIST_VER_3 3 typedef struct _pmkid_list_v1 { uint32 npmkid; pmkid_v1_t pmkid[BCM_FLEX_ARRAY]; } pmkid_list_v1_t; typedef struct _pmkid_list_v2 { uint16 version; uint16 length; pmkid_v2_t pmkid[BCM_FLEX_ARRAY]; } pmkid_list_v2_t; #define PMKDB_SET_IOVAR 0x0001u #define PMKDB_GET_IOVAR 0x0002u #define PMKDB_CLEAR_IOVAR 0x0004u #define PMKDB_ALL_CFGS 0x0008u /* option for PMKDB_GET_IOVAR */ typedef struct _pmkid_list_v3 { uint16 version; uint16 length; uint16 count; uint16 flag; pmkid_v3_t pmkid[]; } pmkid_list_v3_t; typedef struct _pmkid_cand { struct ether_addr BSSID; uint8 preauth; } pmkid_cand_t; typedef struct _pmkid_cand_list { uint32 npmkid_cand; pmkid_cand_t pmkid_cand[BCM_FLEX_ARRAY]; } pmkid_cand_list_t; #define WL_STA_ANT_MAX 4 /**< max possible rx antennas */ typedef struct wl_assoc_info { uint32 req_len; uint32 resp_len; uint32 flags; struct dot11_assoc_req req; struct ether_addr reassoc_bssid; /**< used in reassoc's */ struct dot11_assoc_resp resp; uint32 state; } wl_assoc_info_t; /** srom read/write struct passed through ioctl */ typedef struct { uint32 byteoff; /**< byte offset */ uint32 nbytes; /**< number of bytes */ uint16 buf[]; } srom_rw_t; #define CISH_FLAG_PCIECIS (1 << 15) /**< write CIS format bit for PCIe CIS */ /** similar cis (srom or otp) struct [iovar: may not be aligned] */ typedef struct { uint16 source; /**< cis source */ uint16 flags; /**< flags */ uint32 byteoff; /**< byte offset */ uint32 nbytes; /**< number of bytes */ /* data follows here */ } cis_rw_t; /** R_REG and W_REG struct passed through ioctl */ typedef struct { uint32 byteoff; /**< byte offset of the field in d11regs_t */ uint32 val; /**< read/write value of the field */ uint32 size; /**< sizeof the field */ uint32 band; /**< band (optional) */ } rw_reg_t; /** * Structure used by GET/SET_ATTEN ioctls - it controls power in b/g-band * PCL - Power Control Loop */ typedef struct { uint16 auto_ctrl; /**< WL_ATTEN_XX */ uint16 bb; /**< Baseband attenuation */ uint16 radio; /**< Radio attenuation */ uint16 txctl1; /**< Radio TX_CTL1 value */ } atten_t; /** Per-AC retry parameters */ struct wme_tx_params_s { uint8 short_retry; uint8 short_fallback; uint8 long_retry; uint8 long_fallback; uint16 max_rate; /**< In units of 512 Kbps */ }; typedef struct wme_tx_params_s wme_tx_params_t; #define WL_WME_TX_PARAMS_IO_BYTES (sizeof(wme_tx_params_t) * AC_COUNT) /**Used to get specific link/ac parameters */ typedef struct { int32 ac; uint8 val; struct ether_addr ea; uint8 PAD; } link_val_t; #define WL_PM_MUTE_TX_VER 1 typedef struct wl_pm_mute_tx { uint16 version; /**< version */ uint16 len; /**< length */ uint16 deadline; /**< deadline timer (in milliseconds) */ uint8 enable; /**< set to 1 to enable mode; set to 0 to disable it */ uint8 PAD; } wl_pm_mute_tx_t; /* * Pay attention to version if structure changes. */ /* sta_info_t version 4 */ typedef struct { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint16 cap; /**< sta's advertised capabilities */ uint16 PAD; uint32 flags; /**< flags defined below */ uint32 idle; /**< time since data pkt rx'd from sta */ struct ether_addr ea; /**< Station address */ uint16 PAD; wl_rateset_t rateset; /**< rateset in use */ uint32 in; /**< seconds elapsed since associated */ uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ uint32 tx_failures; /**< # of user packets failed */ uint32 rx_ucast_pkts; /**< # of unicast packets received */ uint32 rx_mcast_pkts; /**< # of multicast packets received */ uint32 tx_rate; /**< Rate used by last tx frame */ uint32 rx_rate; /**< Rate of last successful rx frame */ uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna * of data frames */ int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ uint16 aid; /**< association ID */ uint16 ht_capabilities; /**< advertised ht caps */ uint16 vht_flags; /**< converted vht flags */ uint16 PAD; uint32 tx_pkts_retried; /**< # of frames where a retry was * necessary */ uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry * was exhausted */ int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last * received data frame. */ /* TX WLAN retry/failure statistics: * Separated for host requested frames and WLAN locally generated frames. * Include unicast frame only where the retries/failures can be counted. */ uint32 tx_pkts_total; /**< # user frames sent successfully */ uint32 tx_pkts_retries; /**< # user frames retries */ uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry * was exhausted */ uint32 rx_pkts_retried; /**< # rx with retry bit set */ uint32 tx_rate_fallback; /**< lowest fallback TX rate */ /* Fields above this line are common to sta_info_t versions 4 and 5 */ uint32 rx_dur_total; /* total user RX duration (estimated) */ chanspec_t chanspec; /** chanspec this sta is on */ uint16 PAD; wl_rateset_args_v1_t rateset_adv; /* rateset along with mcs index bitmap */ uint32 PAD; } sta_info_v4_t; /* Note: Version 4 is the latest version of sta_info_t. Version 5 is abandoned. * Please add new fields to version 4, not version 5. */ /* sta_info_t version 5 */ typedef struct { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint16 cap; /**< sta's advertised capabilities */ uint16 PAD; uint32 flags; /**< flags defined below */ uint32 idle; /**< time since data pkt rx'd from sta */ struct ether_addr ea; /**< Station address */ uint16 PAD; wl_rateset_t rateset; /**< rateset in use */ uint32 in; /**< seconds elapsed since associated */ uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ uint32 tx_failures; /**< # of user packets failed */ uint32 rx_ucast_pkts; /**< # of unicast packets received */ uint32 rx_mcast_pkts; /**< # of multicast packets received */ uint32 tx_rate; /**< Rate used by last tx frame */ uint32 rx_rate; /**< Rate of last successful rx frame */ uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna * of data frames */ int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ uint16 aid; /**< association ID */ uint16 ht_capabilities; /**< advertised ht caps */ uint16 vht_flags; /**< converted vht flags */ uint16 PAD; uint32 tx_pkts_retried; /**< # of frames where a retry was * necessary */ uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry * was exhausted */ int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last * received data frame. */ /* TX WLAN retry/failure statistics: * Separated for host requested frames and WLAN locally generated frames. * Include unicast frame only where the retries/failures can be counted. */ uint32 tx_pkts_total; /**< # user frames sent successfully */ uint32 tx_pkts_retries; /**< # user frames retries */ uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry * was exhausted */ uint32 rx_pkts_retried; /**< # rx with retry bit set */ uint32 tx_rate_fallback; /**< lowest fallback TX rate */ /* Fields above this line are common to sta_info_t versions 4 and 5 */ chanspec_t chanspec; /** chanspec this sta is on */ uint16 PAD; wl_rateset_args_v1_t rateset_adv; /* rateset along with mcs index bitmap */ } sta_info_v5_t; /* * Pay attention to version if structure changes. */ /* sta_info_t version 6 changes to wl_rateset_args_t is leading to update this struct version as well. */ typedef struct sta_info_v6 { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint16 cap; /**< sta's advertised capabilities */ uint16 PAD; uint32 flags; /**< flags defined below */ uint32 idle; /**< time since data pkt rx'd from sta */ struct ether_addr ea; /**< Station address */ uint16 PAD; wl_rateset_t rateset; /**< rateset in use */ uint32 in; /**< seconds elapsed since associated */ uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ uint32 tx_failures; /**< # of user packets failed */ uint32 rx_ucast_pkts; /**< # of unicast packets received */ uint32 rx_mcast_pkts; /**< # of multicast packets received */ uint32 tx_rate; /**< Rate used by last tx frame */ uint32 rx_rate; /**< Rate of last successful rx frame */ uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna * of data frames */ int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ uint16 aid; /**< association ID */ uint16 ht_capabilities; /**< advertised ht caps */ uint16 vht_flags; /**< converted vht flags */ uint16 PAD; uint32 tx_pkts_retried; /**< # of frames where a retry was * necessary */ uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry * was exhausted */ int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last * received data frame. */ /* TX WLAN retry/failure statistics: * Separated for host requested frames and WLAN locally generated frames. * Include unicast frame only where the retries/failures can be counted. */ uint32 tx_pkts_total; /**< # user frames sent successfully */ uint32 tx_pkts_retries; /**< # user frames retries */ uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry * was exhausted */ uint32 rx_pkts_retried; /**< # rx with retry bit set */ uint32 tx_rate_fallback; /**< lowest fallback TX rate */ /* Fields above this line are common to sta_info_t versions 4 and 5 */ uint32 rx_dur_total; /* total user RX duration (estimated) */ chanspec_t chanspec; /** chanspec this sta is on */ uint16 PAD; wl_rateset_args_v2_t rateset_adv; /* rateset along with mcs index bitmap */ } sta_info_v6_t; /* * Pay attention to version if structure changes. */ /* sta_info_t version 7 changes to wl_rateset_args_t is leading to update this struct version as well. */ typedef struct sta_info_v7 { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint16 cap; /**< sta's advertised capabilities */ uint16 PAD; uint32 flags; /**< flags defined below */ uint32 idle; /**< time since data pkt rx'd from sta */ struct ether_addr ea; /**< Station address */ uint16 PAD; wl_rateset_t rateset; /**< rateset in use */ uint32 in; /**< seconds elapsed since associated */ uint32 listen_interval_inms; /**< Min Listen interval in ms for this STA */ uint32 tx_pkts; /**< # of user packets transmitted (unicast) */ uint32 tx_failures; /**< # of user packets failed */ uint32 rx_ucast_pkts; /**< # of unicast packets received */ uint32 rx_mcast_pkts; /**< # of multicast packets received */ uint32 tx_rate; /**< Rate used by last tx frame */ uint32 rx_rate; /**< Rate of last successful rx frame */ uint32 rx_decrypt_succeeds; /**< # of packet decrypted successfully */ uint32 rx_decrypt_failures; /**< # of packet decrypted unsuccessfully */ uint32 tx_tot_pkts; /**< # of user tx pkts (ucast + mcast) */ uint32 rx_tot_pkts; /**< # of data packets recvd (uni + mcast) */ uint32 tx_mcast_pkts; /**< # of mcast pkts txed */ uint64 tx_tot_bytes; /**< data bytes txed (ucast + mcast) */ uint64 rx_tot_bytes; /**< data bytes recvd (ucast + mcast) */ uint64 tx_ucast_bytes; /**< data bytes txed (ucast) */ uint64 tx_mcast_bytes; /**< # data bytes txed (mcast) */ uint64 rx_ucast_bytes; /**< data bytes recvd (ucast) */ uint64 rx_mcast_bytes; /**< data bytes recvd (mcast) */ int8 rssi[WL_STA_ANT_MAX]; /**< average rssi per antenna * of data frames */ int8 nf[WL_STA_ANT_MAX]; /**< per antenna noise floor */ uint16 aid; /**< association ID */ uint16 ht_capabilities; /**< advertised ht caps */ uint16 vht_flags; /**< converted vht flags */ uint16 PAD; uint32 tx_pkts_retried; /**< # of frames where a retry was * necessary */ uint32 tx_pkts_retry_exhausted; /**< # of user frames where a retry * was exhausted */ int8 rx_lastpkt_rssi[WL_STA_ANT_MAX]; /**< Per antenna RSSI of last * received data frame. */ /* TX WLAN retry/failure statistics: * Separated for host requested frames and WLAN locally generated frames. * Include unicast frame only where the retries/failures can be counted. */ uint32 tx_pkts_total; /**< # user frames sent successfully */ uint32 tx_pkts_retries; /**< # user frames retries */ uint32 tx_pkts_fw_total; /**< # FW generated sent successfully */ uint32 tx_pkts_fw_retries; /**< # retries for FW generated frames */ uint32 tx_pkts_fw_retry_exhausted; /**< # FW generated where a retry * was exhausted */ uint32 rx_pkts_retried; /**< # rx with retry bit set */ uint32 tx_rate_fallback; /**< lowest fallback TX rate */ /* Fields above this line are common to sta_info_t versions 4 and 5 */ uint32 rx_dur_total; /* total user RX duration (estimated) */ chanspec_t chanspec; /** chanspec this sta is on */ uint16 PAD; wl_rateset_args_v3_t rateset_adv; /* rateset along with mcs index bitmap */ } sta_info_v7_t; /* define to help support one version older sta_info_t from user level * applications. */ #define WL_OLD_STAINFO_SIZE OFFSETOF(sta_info_t, tx_tot_pkts) #define WL_STA_VER_4 4u #define WL_STA_VER_5 5u #define WL_STA_VER_6 6u #define WL_STA_VER_7 7u #define SWDIV_STATS_VERSION_1 1u #define SWDIV_STATS_VERSION_2 2u struct wlc_swdiv_stats_v1 { uint32 auto_en; uint32 active_ant; uint32 rxcount; int32 avg_snr_per_ant0; int32 avg_snr_per_ant1; int32 avg_snr_per_ant2; uint32 swap_ge_rxcount0; uint32 swap_ge_rxcount1; uint32 swap_ge_snrthresh0; uint32 swap_ge_snrthresh1; uint32 swap_txfail0; uint32 swap_txfail1; uint32 swap_timer0; uint32 swap_timer1; uint32 swap_alivecheck0; uint32 swap_alivecheck1; uint32 rxcount_per_ant0; uint32 rxcount_per_ant1; uint32 acc_rxcount; uint32 acc_rxcount_per_ant0; uint32 acc_rxcount_per_ant1; uint32 tx_auto_en; uint32 tx_active_ant; uint32 rx_policy; uint32 tx_policy; uint32 cell_policy; uint32 swap_snrdrop0; uint32 swap_snrdrop1; uint32 mws_antsel_ovr_tx; uint32 mws_antsel_ovr_rx; uint8 swap_trig_event_id; }; struct wlc_swdiv_stats_v2 { uint16 version; /* version of the structure * as defined by SWDIV_STATS_CURRENT_VERSION */ uint16 length; /* length of the entire structure */ uint32 auto_en; uint32 active_ant; uint32 rxcount; int32 avg_snr_per_ant0; int32 avg_snr_per_ant1; int32 avg_snr_per_ant2; uint32 swap_ge_rxcount0; uint32 swap_ge_rxcount1; uint32 swap_ge_snrthresh0; uint32 swap_ge_snrthresh1; uint32 swap_txfail0; uint32 swap_txfail1; uint32 swap_timer0; uint32 swap_timer1; uint32 swap_alivecheck0; uint32 swap_alivecheck1; uint32 rxcount_per_ant0; uint32 rxcount_per_ant1; uint32 acc_rxcount; uint32 acc_rxcount_per_ant0; uint32 acc_rxcount_per_ant1; uint32 tx_auto_en; uint32 tx_active_ant; uint32 rx_policy; uint32 tx_policy; uint32 cell_policy; uint32 swap_snrdrop0; uint32 swap_snrdrop1; uint32 mws_antsel_ovr_tx; uint32 mws_antsel_ovr_rx; uint32 swap_trig_event_id; }; #define WLC_NUMRATES 16 /**< max # of rates in a rateset */ /**Used to get specific STA parameters */ typedef struct { uint32 val; struct ether_addr ea; uint16 PAD; } scb_val_t; /**Used by iovar versions of some ioctls, i.e. WLC_SCB_AUTHORIZE et al */ typedef struct { uint32 code; scb_val_t ioctl_args; } authops_t; /** channel encoding */ typedef struct channel_info { int32 hw_channel; int32 target_channel; int32 scan_channel; } channel_info_t; /** For ioctls that take a list of MAC addresses */ typedef struct maclist { uint32 count; /**< number of MAC addresses */ struct ether_addr ea[BCM_FLEX_ARRAY]; /**< variable length array of MAC addresses */ } maclist_t; typedef struct wds_client_info { char ifname[INTF_NAME_SIZ]; /* WDS ifname */ struct ether_addr ea; /* WDS client MAC address */ } wds_client_info_t; #define WDS_MACLIST_MAGIC 0xFFFFFFFF #define WDS_MACLIST_VERSION 1 /* For wds MAC list ioctls */ typedef struct wds_maclist { uint32 count; /* Number of WDS clients */ uint32 magic; /* Magic number */ uint32 version; /* Version number */ struct wds_client_info client_list[BCM_FLEX_ARRAY]; /* Var len array of WDS clients */ } wds_maclist_t; /**get pkt count struct passed through ioctl */ typedef struct get_pktcnt { uint32 rx_good_pkt; uint32 rx_bad_pkt; uint32 tx_good_pkt; uint32 tx_bad_pkt; uint32 rx_ocast_good_pkt; /**< unicast packets destined for others */ } get_pktcnt_t; /* NINTENDO2 */ #define LQ_IDX_MIN 0 #define LQ_IDX_MAX 1 #define LQ_IDX_AVG 2 #define LQ_IDX_SUM 2 #define LQ_IDX_LAST 3 #define LQ_STOP_MONITOR 0 #define LQ_START_MONITOR 1 /** Get averages RSSI, Rx PHY rate and SNR values */ /* Link Quality */ typedef struct { int32 rssi[LQ_IDX_LAST]; /**< Array to keep min, max, avg rssi */ int32 snr[LQ_IDX_LAST]; /**< Array to keep min, max, avg snr */ int32 isvalid; /**< Flag indicating whether above data is valid */ } wl_lq_t; typedef enum wl_wakeup_reason_type { LCD_ON = 1, LCD_OFF, DRC1_WAKE, DRC2_WAKE, REASON_LAST } wl_wr_type_t; typedef struct { /** Unique filter id */ uint32 id; /** stores the reason for the last wake up */ uint8 reason; uint8 PAD[3]; } wl_wr_t; /** Get MAC specific rate histogram command */ typedef struct { struct ether_addr ea; /**< MAC Address */ uint8 ac_cat; /**< Access Category */ uint8 num_pkts; /**< Number of packet entries to be averaged */ } wl_mac_ratehisto_cmd_t; /** Get MAC rate histogram response */ /* deprecated after JAGUAR branch */ typedef struct { uint32 rate[DOT11_RATE_MAX + 1]; /**< Rates */ uint32 mcs[WL_RATESET_SZ_HT_IOCTL * WL_TX_CHAINS_MAX]; /**< MCS counts */ uint32 vht[WL_RATESET_SZ_VHT_MCS][WL_TX_CHAINS_MAX]; /**< VHT counts */ uint32 tsf_timer[2][2]; /**< Start and End time for 8bytes value */ uint32 prop11n_mcs[WLC_11N_LAST_PROP_MCS - WLC_11N_FIRST_PROP_MCS + 1]; /** MCS counts */ } wl_mac_ratehisto_res_t; /* sta_info ecounters */ typedef struct { struct ether_addr ea; /* Station MAC addr */ struct ether_addr BSSID; /* BSSID of the BSS */ uint32 tx_pkts_fw_total; /* # FW generated sent successfully */ uint32 tx_pkts_fw_retries; /* # retries for FW generated frames */ uint32 tx_pkts_fw_retry_exhausted; /* # FW generated which * failed after retry */ } sta_info_ecounters_t; #define STAMON_MODULE_VER 1 /**Linux network driver ioctl encoding */ typedef struct wl_ioctl { uint32 cmd; /**< common ioctl definition */ void *buf; /**< pointer to user buffer */ uint32 len; /**< length of user buffer */ uint8 set; /**< 1=set IOCTL; 0=query IOCTL */ uint8 PAD[3]; uint32 used; /**< bytes read or written (optional) */ uint32 needed; /**< bytes needed (optional) */ } wl_ioctl_t; #ifdef CONFIG_COMPAT typedef struct compat_wl_ioctl { uint32 cmd; /**< common ioctl definition */ uint32 buf; /**< pointer to user buffer */ uint32 len; /**< length of user buffer */ uint8 set; /**< 1=set IOCTL; 0=query IOCTL */ uint8 PAD[3]; uint32 used; /**< bytes read or written (optional) */ uint32 needed; /**< bytes needed (optional) */ } compat_wl_ioctl_t; #endif /* CONFIG_COMPAT */ #define WL_NUM_RATES_CCK 4 /**< 1, 2, 5.5, 11 Mbps */ #define WL_NUM_RATES_OFDM 8 /**< 6, 9, 12, 18, 24, 36, 48, 54 Mbps SISO/CDD */ #define WL_NUM_RATES_MCS_1STREAM 8 /**< MCS 0-7 1-stream rates - SISO/CDD/STBC/MCS */ #define WL_NUM_RATES_EXTRA_VHT 2 /**< Additional VHT 11AC rates */ #define WL_NUM_RATES_VHT 10 #define WL_NUM_RATES_VHT_ALL (WL_NUM_RATES_VHT + WL_NUM_RATES_EXTRA_VHT) #define WL_NUM_RATES_HE 12 #define WL_NUM_RATES_EHT 16u #define WL_NUM_RATES_MCS32 1 #define UC_PATH_LEN 128u /**< uCode path length */ /* * Structure for passing hardware and software * revision info up from the driver. */ typedef struct wlc_rev_info { uint32 vendorid; /**< PCI vendor id */ uint32 deviceid; /**< device id of chip */ uint32 radiorev; /**< radio revision */ uint32 chiprev; /**< chip revision */ uint32 corerev; /**< core revision */ uint32 boardid; /**< board identifier (usu. PCI sub-device id) */ uint32 boardvendor; /**< board vendor (usu. PCI sub-vendor id) */ uint32 boardrev; /**< board revision */ uint32 driverrev; /**< driver version */ uint32 ucoderev; /**< uCode version */ uint32 bus; /**< bus type */ uint32 chipnum; /**< chip number */ uint32 phytype; /**< phy type */ uint32 phyrev; /**< phy revision */ uint32 anarev; /**< anacore rev */ uint32 chippkg; /**< chip package info */ uint32 nvramrev; /**< nvram revision number */ uint32 phyminorrev; /**< phy minor rev */ uint32 coreminorrev; /**< core minor rev */ uint32 drvrev_major; /**< driver version: major */ uint32 drvrev_minor; /**< driver version: minor */ uint32 drvrev_rc; /**< driver version: rc */ uint32 drvrev_rc_inc; /**< driver version: rc incremental */ uint16 ucodeprebuilt; /**< uCode prebuilt flag */ uint16 ucodediffct; /**< uCode diff count */ uchar ucodeurl[128u]; /* obsolete, kept for ROM compatiblity */ uchar ucodepath[UC_PATH_LEN]; /**< uCode URL or path */ } wlc_rev_info_t; #define WL_REV_INFO_LEGACY_LENGTH 48 #define WL_BRAND_MAX 10 typedef struct wl_instance_info { uint32 instance; int8 brand[WL_BRAND_MAX]; int8 PAD[4-(WL_BRAND_MAX%4)]; } wl_instance_info_t; /** structure to change size of tx fifo */ typedef struct wl_txfifo_sz { uint16 magic; uint16 fifo; uint16 size; } wl_txfifo_sz_t; /* Transfer info about an IOVar from the driver */ /**Max supported IOV name size in bytes, + 1 for nul termination */ #define WLC_IOV_NAME_LEN (32 + 1) typedef struct wlc_iov_trx_s { uint8 module; uint8 type; char name[WLC_IOV_NAME_LEN]; } wlc_iov_trx_t; /** bump this number if you change the ioctl interface */ #define WLC_IOCTL_VERSION 2 #define WLC_IOCTL_VERSION_LEGACY_IOTYPES 1 /* ifdef EXT_STA */ typedef struct _wl_assoc_result { ulong associated; ulong NDIS_auth; ulong NDIS_infra; } wl_assoc_result_t; /* EXT_STA */ #define WL_PHY_PAVARS_LEN 64 /**< Phytype, Bandrange, chain, a[0], b[0], c[0], d[0] .. */ #define WL_PHY_PAVAR_VER 1 /**< pavars version */ #define WL_PHY_PAVARS2_NUM 3 /**< a1, b0, b1 */ typedef struct wl_pavars2 { uint16 ver; /**< version of this struct */ uint16 len; /**< len of this structure */ uint16 inuse; /**< driver return 1 for a1,b0,b1 in current band range */ uint16 phy_type; /**< phy type */ uint16 bandrange; uint16 chain; uint16 inpa[WL_PHY_PAVARS2_NUM]; /**< phy pavars for one band range */ } wl_pavars2_t; typedef struct wl_po { uint16 phy_type; /**< Phy type */ uint16 band; uint16 cckpo; uint16 PAD; uint32 ofdmpo; uint16 mcspo[8]; } wl_po_t; #define WL_NUM_RPCALVARS 5 /**< number of rpcal vars */ typedef struct wl_rpcal { uint16 value; uint16 update; } wl_rpcal_t; #define WL_NUM_RPCALPHASEVARS 5 /* number of rpcal phase vars */ typedef struct wl_rpcal_phase { uint16 value; uint16 update; } wl_rpcal_phase_t; typedef struct wl_aci_args { int32 enter_aci_thresh; /* Trigger level to start detecting ACI */ int32 exit_aci_thresh; /* Trigger level to exit ACI mode */ int32 usec_spin; /* microsecs to delay between rssi samples */ int32 glitch_delay; /* interval between ACI scans when glitch count is consistently high */ uint16 nphy_adcpwr_enter_thresh; /**< ADC power to enter ACI mitigation mode */ uint16 nphy_adcpwr_exit_thresh; /**< ADC power to exit ACI mitigation mode */ uint16 nphy_repeat_ctr; /**< Number of tries per channel to compute power */ uint16 nphy_num_samples; /**< Number of samples to compute power on one channel */ uint16 nphy_undetect_window_sz; /**< num of undetects to exit ACI Mitigation mode */ uint16 nphy_b_energy_lo_aci; /**< low ACI power energy threshold for bphy */ uint16 nphy_b_energy_md_aci; /**< mid ACI power energy threshold for bphy */ uint16 nphy_b_energy_hi_aci; /**< high ACI power energy threshold for bphy */ uint16 nphy_noise_noassoc_glitch_th_up; /**< wl interference 4 */ uint16 nphy_noise_noassoc_glitch_th_dn; uint16 nphy_noise_assoc_glitch_th_up; uint16 nphy_noise_assoc_glitch_th_dn; uint16 nphy_noise_assoc_aci_glitch_th_up; uint16 nphy_noise_assoc_aci_glitch_th_dn; uint16 nphy_noise_assoc_enter_th; uint16 nphy_noise_noassoc_enter_th; uint16 nphy_noise_assoc_rx_glitch_badplcp_enter_th; uint16 nphy_noise_noassoc_crsidx_incr; uint16 nphy_noise_assoc_crsidx_incr; uint16 nphy_noise_crsidx_decr; } wl_aci_args_t; #define WL_ACI_ARGS_LEGACY_LENGTH 16 /**< bytes of pre NPHY aci args */ #define WL_MACFIFO_PLAY_ARGS_T_VERSION 1u /* version of wl_macfifo_play_args_t struct */ enum wl_macfifo_play_flags { WL_MACFIFO_PLAY_STOP = 0x00u, /* stop playing samples */ WL_MACFIFO_PLAY_START = 0x01u, /* start playing samples */ WL_MACFIFO_PLAY_LOAD = 0x02u, /* for set: load samples for get: samples are loaded */ WL_MACFIFO_PLAY_CAL = 0x08u, /* macfifo play for calibration */ WL_MACFIFO_PLAY_GET_MAX_SIZE = 0x10u, /* get the macfifo buffer size */ WL_MACFIFO_PLAY_GET_STATUS = 0x20u, /* get macfifo play status */ }; typedef struct wl_macfifo_play_args { uint16 version; /* structure version */ uint16 len; /* size of structure */ uint16 flags; uint8 PAD[2]; uint32 data_len; /* data length */ } wl_macfifo_play_args_t; #define WL_MACFIFO_PLAY_DATA_T_VERSION 1u /* version of wl_macfifo_play_data_t struct */ typedef struct wl_macfifo_play_data { uint16 version; /* structure version */ uint16 len; /* size of structure */ uint32 data_len; /* data length */ } wl_macfifo_play_data_t; #define WL_SAMPLECOLLECT_T_VERSION 2 /**< version of wl_samplecollect_args_t struct */ typedef struct wl_samplecollect_args { /* version 0 fields */ uint8 coll_us; uint8 PAD[3]; int32 cores; /* add'l version 1 fields */ uint16 version; /**< see definition of WL_SAMPLECOLLECT_T_VERSION */ uint16 length; /**< length of entire structure */ int8 trigger; uint8 PAD; uint16 timeout; uint16 mode; uint16 PAD; uint32 pre_dur; uint32 post_dur; uint8 gpio_sel; uint8 downsamp; uint8 be_deaf; uint8 agc; /**< loop from init gain and going down */ uint8 filter; /**< override high pass corners to lowest */ /* add'l version 2 fields */ uint8 trigger_state; uint8 module_sel1; uint8 module_sel2; uint16 nsamps; uint16 PAD; int32 bitStart; uint32 gpioCapMask; uint8 gpio_collection; uint8 PAD[3]; } wl_samplecollect_args_t; #define WL_SAMPLEDATA_T_VERSION 1 /**< version of wl_samplecollect_args_t struct */ /* version for unpacked sample data, int16 {(I,Q),Core(0..N)} */ #define WL_SAMPLEDATA_T_VERSION_SPEC_AN 2 typedef struct wl_sampledata { uint16 version; /**< structure version */ uint16 size; /**< size of structure */ uint16 tag; /**< Header/Data */ uint16 length; /**< data length */ uint32 flag; /**< bit def */ } wl_sampledata_t; /* WL_OTA START */ /* OTA Test Status */ enum { WL_OTA_TEST_IDLE = 0, /**< Default Idle state */ WL_OTA_TEST_ACTIVE = 1, /**< Test Running */ WL_OTA_TEST_SUCCESS = 2, /**< Successfully Finished Test */ WL_OTA_TEST_FAIL = 3 /**< Test Failed in the Middle */ }; /* OTA SYNC Status */ enum { WL_OTA_SYNC_IDLE = 0, /**< Idle state */ WL_OTA_SYNC_ACTIVE = 1, /**< Waiting for Sync */ WL_OTA_SYNC_FAIL = 2 /**< Sync pkt not recieved */ }; /* Various error states dut can get stuck during test */ enum { WL_OTA_SKIP_TEST_CAL_FAIL = 1, /**< Phy calibration failed */ WL_OTA_SKIP_TEST_SYNCH_FAIL = 2, /**< Sync Packet not recieved */ WL_OTA_SKIP_TEST_FILE_DWNLD_FAIL = 3, /**< Cmd flow file download failed */ WL_OTA_SKIP_TEST_NO_TEST_FOUND = 4, /**< No test found in Flow file */ WL_OTA_SKIP_TEST_WL_NOT_UP = 5, /**< WL UP failed */ WL_OTA_SKIP_TEST_UNKNOWN_CALL /**< Unintentional scheduling on ota test */ }; /* Differentiator for ota_tx and ota_rx */ enum { WL_OTA_TEST_TX = 0, /**< ota_tx */ WL_OTA_TEST_RX = 1, /**< ota_rx */ }; /* Catch 3 modes of operation: 20Mhz, 40Mhz, 20 in 40 Mhz */ enum { WL_OTA_TEST_BW_20_IN_40MHZ = 0, /**< 20 in 40 operation */ WL_OTA_TEST_BW_20MHZ = 1, /**< 20 Mhz operation */ WL_OTA_TEST_BW_40MHZ = 2, /**< full 40Mhz operation */ WL_OTA_TEST_BW_80MHZ = 3 /* full 80Mhz operation */ }; #define HT_MCS_INUSE 0x00000080 /* HT MCS in use,indicates b0-6 holds an mcs */ #define VHT_MCS_INUSE 0x00000100 /* VHT MCS in use,indicates b0-6 holds an mcs */ #define OTA_RATE_MASK 0x0000007f /* rate/mcs value */ #define OTA_STF_SISO 0 #define OTA_STF_CDD 1 #define OTA_STF_STBC 2 #define OTA_STF_SDM 3 typedef struct ota_rate_info { uint8 rate_cnt; /**< Total number of rates */ uint8 PAD; uint16 rate_val_mbps[WL_OTA_TEST_MAX_NUM_RATE]; /**< array of rates from 1mbps to 130mbps */ /**< for legacy rates : ratein mbps * 2 */ /**< for HT rates : mcs index */ } ota_rate_info_t; typedef struct ota_power_info { int8 pwr_ctrl_on; /**< power control on/off */ int8 start_pwr; /**< starting power/index */ int8 delta_pwr; /**< delta power/index */ int8 end_pwr; /**< end power/index */ } ota_power_info_t; typedef struct ota_packetengine { uint16 delay; /**< Inter-packet delay */ /**< for ota_tx, delay is tx ifs in micro seconds */ /* for ota_rx, delay is wait time in milliseconds */ uint16 nframes; /**< Number of frames */ uint16 length; /**< Packet length */ } ota_packetengine_t; /* * OTA txant/rxant parameter * bit7-4: 4 bits swdiv_tx/rx_policy bitmask, specify antenna-policy for SW diversity * bit3-0: 4 bits TxCore bitmask, specify cores used for transmit frames * (maximum spatial expansion) */ #define WL_OTA_TEST_ANT_MASK 0xF0 #define WL_OTA_TEST_CORE_MASK 0x0F /* OTA txant/rxant 'ant_mask' field; map to Tx/Rx antenna policy for SW diversity */ enum { WL_OTA_TEST_FORCE_ANT0 = 0x10, /* force antenna to Ant 0 */ WL_OTA_TEST_FORCE_ANT1 = 0x20, /* force antenna to Ant 1 */ }; /* antenna/core fields access */ #define WL_OTA_TEST_GET_ANT(_txant) ((_txant) & WL_OTA_TEST_ANT_MASK) #define WL_OTA_TEST_GET_CORE(_txant) ((_txant) & WL_OTA_TEST_CORE_MASK) /** Test info vector */ typedef struct wl_ota_test_args { uint8 cur_test; /**< test phase */ uint8 chan; /**< channel */ uint8 bw; /**< bandwidth */ uint8 control_band; /**< control band */ uint8 stf_mode; /**< stf mode */ uint8 PAD; ota_rate_info_t rt_info; /**< Rate info */ ota_packetengine_t pkteng; /**< packeteng info */ uint8 txant; /**< tx antenna */ uint8 rxant; /**< rx antenna */ ota_power_info_t pwr_info; /**< power sweep info */ uint8 wait_for_sync; /**< wait for sync or not */ uint8 ldpc; uint8 sgi; uint8 PAD; /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */ } wl_ota_test_args_t; #define WL_OTA_TESTVEC_T_VERSION 1 /* version of wl_ota_test_vector_t struct */ typedef struct wl_ota_test_vector { uint16 version; wl_ota_test_args_t test_arg[WL_OTA_TEST_MAX_NUM_SEQ]; /**< Test argument struct */ uint16 test_cnt; /**< Total no of test */ uint8 file_dwnld_valid; /**< File successfully downloaded */ uint8 sync_timeout; /**< sync packet timeout */ int8 sync_fail_action; /**< sync fail action */ struct ether_addr sync_mac; /**< macaddress for sync pkt */ struct ether_addr tx_mac; /**< macaddress for tx */ struct ether_addr rx_mac; /**< macaddress for rx */ int8 loop_test; /**< dbg feature to loop the test */ uint16 test_rxcnt; /* Update WL_OTA_TESTVEC_T_VERSION for adding new members to this structure */ } wl_ota_test_vector_t; /** struct copied back form dongle to host to query the status */ typedef struct wl_ota_test_status { int16 cur_test_cnt; /**< test phase */ int8 skip_test_reason; /**< skip test reasoin */ uint8 PAD; wl_ota_test_args_t test_arg; /**< cur test arg details */ uint16 test_cnt; /**< total no of test downloaded */ uint8 file_dwnld_valid; /**< file successfully downloaded ? */ uint8 sync_timeout; /**< sync timeout */ int8 sync_fail_action; /**< sync fail action */ struct ether_addr sync_mac; /**< macaddress for sync pkt */ struct ether_addr tx_mac; /**< tx mac address */ struct ether_addr rx_mac; /**< rx mac address */ uint8 test_stage; /**< check the test status */ int8 loop_test; /**< Debug feature to puts test enfine in a loop */ uint8 sync_status; /**< sync status */ } wl_ota_test_status_t; /* FOR ioctl that take the sta monitor information */ typedef struct stamon_data { struct ether_addr ea; uint8 PAD[2]; int32 rssi; } stamon_data_t; typedef struct stamon_info { int32 version; uint32 count; stamon_data_t sta_data[BCM_FLEX_ARRAY]; } stamon_info_t; typedef struct wl_ota_rx_rssi { uint16 pktcnt; /* Pkt count used for this rx test */ chanspec_t chanspec; /* Channel info on which the packets are received */ int16 rssi; /* Average RSSI of the first 50% packets received */ } wl_ota_rx_rssi_t; #define WL_OTARSSI_T_VERSION 1 /* version of wl_ota_test_rssi_t struct */ #define WL_OTA_TEST_RSSI_FIXED_SIZE OFFSETOF(wl_ota_test_rssi_t, rx_rssi) typedef struct wl_ota_test_rssi { uint8 version; uint8 testcnt; /* total RSSI values, valid on o/p only */ wl_ota_rx_rssi_t rx_rssi[BCM_FLEX_ARRAY]; /* Variable len array */ } wl_ota_test_rssi_t; /* WL_OTA END */ /**wl_radar_args_t */ typedef struct { int32 npulses; /**< required number of pulses at n * t_int */ int32 ncontig; /**< required number of pulses at t_int */ int32 min_pw; /**< minimum pulse width (20 MHz clocks) */ int32 max_pw; /**< maximum pulse width (20 MHz clocks) */ uint16 thresh0; /**< Radar detection, thresh 0 */ uint16 thresh1; /**< Radar detection, thresh 1 */ uint16 blank; /**< Radar detection, blank control */ uint16 fmdemodcfg; /**< Radar detection, fmdemod config */ int32 npulses_lp; /**< Radar detection, minimum long pulses */ int32 min_pw_lp; /**< Minimum pulsewidth for long pulses */ int32 max_pw_lp; /**< Maximum pulsewidth for long pulses */ int32 min_fm_lp; /**< Minimum fm for long pulses */ int32 max_span_lp; /**< Maximum deltat for long pulses */ int32 min_deltat; /**< Minimum spacing between pulses */ int32 max_deltat; /**< Maximum spacing between pulses */ uint16 autocorr; /**< Radar detection, autocorr on or off */ uint16 st_level_time; /**< Radar detection, start_timing level */ uint16 t2_min; /**< minimum clocks needed to remain in state 2 */ uint8 PAD[2]; uint32 version; /**< version */ uint32 fra_pulse_err; /**< sample error margin for detecting French radar pulsed */ int32 npulses_fra; /**< Radar detection, minimum French pulses set */ int32 npulses_stg2; /**< Radar detection, minimum staggered-2 pulses set */ int32 npulses_stg3; /**< Radar detection, minimum staggered-3 pulses set */ uint16 percal_mask; /**< defines which period cal is masked from radar detection */ uint8 PAD[2]; int32 quant; /**< quantization resolution to pulse positions */ uint32 min_burst_intv_lp; /**< minimum burst to burst interval for bin3 radar */ uint32 max_burst_intv_lp; /**< maximum burst to burst interval for bin3 radar */ int32 nskip_rst_lp; /**< number of skipped pulses before resetting lp buffer */ int32 max_pw_tol; /* maximum tolerance allowd in detected pulse width for radar detection */ uint16 feature_mask; /**< 16-bit mask to specify enabled features */ uint16 thresh0_sc; /**< Radar detection, thresh 0 */ uint16 thresh1_sc; /**< Radar detection, thresh 1 */ uint8 PAD[2]; } wl_radar_args_t; #define WL_RADAR_ARGS_VERSION_2 2 typedef struct { uint32 version; /**< version */ uint16 thresh0_20_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 20MHz */ uint16 thresh1_20_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 20MHz */ uint16 thresh0_40_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 40MHz */ uint16 thresh1_40_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 40MHz */ uint16 thresh0_80_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 80MHz */ uint16 thresh1_80_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 80MHz */ uint16 thresh0_20_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 20MHz */ uint16 thresh1_20_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 20MHz */ uint16 thresh0_40_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 40MHz */ uint16 thresh1_40_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 40MHz */ uint16 thresh0_80_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 80MHz */ uint16 thresh1_80_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 80MHz */ uint16 thresh0_160_lo; /**< Radar detection, thresh 0 (range 5250-5350MHz) for BW 160MHz */ uint16 thresh1_160_lo; /**< Radar detection, thresh 1 (range 5250-5350MHz) for BW 160MHz */ uint16 thresh0_160_hi; /**< Radar detection, thresh 0 (range 5470-5725MHz) for BW 160MHz */ uint16 thresh1_160_hi; /**< Radar detection, thresh 1 (range 5470-5725MHz) for BW 160MHz */ } wl_radar_thr_t; typedef struct { uint32 version; /* version */ uint16 thresh0_sc_20_lo; uint16 thresh1_sc_20_lo; uint16 thresh0_sc_40_lo; uint16 thresh1_sc_40_lo; uint16 thresh0_sc_80_lo; uint16 thresh1_sc_80_lo; uint16 thresh0_sc_20_hi; uint16 thresh1_sc_20_hi; uint16 thresh0_sc_40_hi; uint16 thresh1_sc_40_hi; uint16 thresh0_sc_80_hi; uint16 thresh1_sc_80_hi; uint16 fc_varth_sb; uint16 fc_varth_bin5_sb; uint16 notradar_enb; uint16 max_notradar_lp; uint16 max_notradar; uint16 max_notradar_lp_sc; uint16 max_notradar_sc; uint16 highpow_war_enb; uint16 highpow_sp_ratio; //unit is 0.5 } wl_radar_thr2_t; #define WL_RADAR_THR_VERSION 2 typedef struct { uint32 ver; uint32 len; int32 rssi_th[3]; uint8 rssi_gain_80[4]; uint8 rssi_gain_160[4]; } wl_dyn_switch_th_t; #define WL_PHY_DYN_SWITCH_TH_VERSION 1 /** RSSI per antenna */ typedef struct { uint32 version; /**< version field */ uint32 count; /**< number of valid antenna rssi */ int8 rssi_ant[WL_RSSI_ANT_MAX]; /**< rssi per antenna */ int8 rssi_sum; /**< summed rssi across all antennas */ int8 PAD[3]; } wl_rssi_ant_t; /* SNR per antenna */ typedef struct { uint32 version; /* version field */ uint32 count; /* number of valid antenna snr */ int8 snr_ant[WL_RSSI_ANT_MAX]; /* snr per antenna */ } wl_snr_ant_t; /* Noise per antenna */ typedef struct { uint32 version; /* version field */ uint32 count; /* number of valid antenna NF */ int8 noise_ant[WL_RSSI_ANT_MAX]; /* NF per antenna */ } wl_noise_ant_t; /* Weighted average support */ #define WL_WA_VER 0 /* Initial version - Basic WA algorithm only */ #define WL_WA_ALGO_BASIC 0 /* Basic weighted average algorithm (all 4 metrics) */ #define WL_WA_TYPE_RSSI 0 #define WL_WA_TYPE_SNR 1 #define WL_WA_TYPE_TXRATE 2 #define WL_WA_TYPE_RXRATE 3 #define WL_WA_TYPE_MAX 4 typedef struct { /* payload of subcmd in xtlv */ uint8 id; uint8 n_total; /* Total number of samples (n_total >= n_recent) */ uint8 n_recent; /* Number of samples denoted as recent */ uint8 w_recent; /* Total weight for the recent samples (as percentage) */ } wl_wa_basic_params_t; typedef struct { uint16 ver; uint16 len; uint8 subcmd[]; /* sub-cmd in bcm_xtlv_t */ } wl_wa_cmd_t; /** data structure used in 'dfs_status' wl interface, which is used to query dfs status */ typedef struct { uint32 state; /**< noted by WL_DFS_CACSTATE_XX. */ uint32 duration; /**< time spent in ms in state. */ /** * as dfs enters ISM state, it removes the operational channel from quiet channel * list and notes the channel in channel_cleared. set to 0 if no channel is cleared */ chanspec_t chanspec_cleared; /** chanspec cleared used to be a uint32, add another to uint16 to maintain size */ uint16 PAD; } wl_dfs_status_t; typedef struct { uint32 state; /* noted by WL_DFS_CACSTATE_XX */ uint32 duration; /* time spent in ms in state */ chanspec_t chanspec; /* chanspec of this core */ chanspec_t chanspec_last_cleared; /* chanspec last cleared for operation by scanning */ uint16 sub_type; /* currently just the index of the core or the respective PLL */ uint16 PAD; } wl_dfs_sub_status_t; #define WL_DFS_STATUS_ALL_VERSION (1) typedef struct { uint16 version; /* version field; current max version 1 */ uint16 num_sub_status; wl_dfs_sub_status_t dfs_sub_status[BCM_FLEX_ARRAY]; /* Array of len num_sub_status */ } wl_dfs_status_all_t; #define WL_DFS_AP_MOVE_VERSION (1) struct wl_dfs_ap_move_status_v1 { int16 dfs_status; /* DFS scan status */ chanspec_t chanspec; /* New AP Chanspec */ wl_dfs_status_t cac_status; /* CAC status */ }; typedef struct wl_dfs_ap_move_status_v2 { int8 version; /* version field; current max version 1 */ int8 move_status; /* DFS move status */ chanspec_t chanspec; /* New AP Chanspec */ wl_dfs_status_all_t scan_status; /* status; see dfs_status_all for wl_dfs_status_all_t */ } wl_dfs_ap_move_status_v2_t; #define WL_DFS_AP_MOVE_ABORT -1 /* Abort any dfs_ap_move in progress immediately */ #define WL_DFS_AP_MOVE_STUNT -2 /* Stunt move but continue background CSA if in progress */ /** data structure used in 'radar_status' wl interface, which is use to query radar det status */ typedef struct { uint8 detected; uint8 PAD[3]; int32 count; uint8 pretended; uint8 PAD[3]; uint32 radartype; uint32 timenow; uint32 timefromL; int32 lp_csect_single; int32 detected_pulse_index; int32 nconsecq_pulses; chanspec_t ch; uint8 PAD[2]; int32 pw[10]; int32 intv[10]; int32 fm[10]; } wl_radar_status_t; #define NUM_PWRCTRL_RATES 12 typedef struct { uint8 txpwr_band_max[NUM_PWRCTRL_RATES]; /**< User set target */ uint8 txpwr_limit[NUM_PWRCTRL_RATES]; /**< reg and local power limit */ uint8 txpwr_local_max; /**< local max according to the AP */ uint8 txpwr_local_constraint; /**< local constraint according to the AP */ uint8 txpwr_chan_reg_max; /**< Regulatory max for this channel */ uint8 txpwr_target[2][NUM_PWRCTRL_RATES]; /**< Latest target for 2.4 and 5 Ghz */ uint8 txpwr_est_Pout[2]; /**< Latest estimate for 2.4 and 5 Ghz */ uint8 txpwr_opo[NUM_PWRCTRL_RATES]; /**< On G phy, OFDM power offset */ uint8 txpwr_bphy_cck_max[NUM_PWRCTRL_RATES]; /**< Max CCK power for this band (SROM) */ uint8 txpwr_bphy_ofdm_max; /**< Max OFDM power for this band (SROM) */ uint8 txpwr_aphy_max[NUM_PWRCTRL_RATES]; /**< Max power for A band (SROM) */ int8 txpwr_antgain[2]; /**< Ant gain for each band - from SROM */ uint8 txpwr_est_Pout_gofdm; /**< Pwr estimate for 2.4 OFDM */ } tx_power_legacy_t; #define WL_TX_POWER_RATES_LEGACY 45 #define WL_TX_POWER_MCS20_FIRST 12 #define WL_TX_POWER_MCS20_NUM 16 #define WL_TX_POWER_MCS40_FIRST 28 #define WL_TX_POWER_MCS40_NUM 17 typedef struct { uint32 flags; chanspec_t chanspec; /**< txpwr report for this channel */ chanspec_t local_chanspec; /**< channel on which we are associated */ uint8 local_max; /**< local max according to the AP */ uint8 local_constraint; /**< local constraint according to the AP */ int8 antgain[2]; /**< Ant gain for each band - from SROM */ uint8 rf_cores; /**< count of RF Cores being reported */ uint8 est_Pout[4]; /**< Latest tx power out estimate per RF * chain without adjustment */ uint8 est_Pout_cck; /**< Latest CCK tx power out estimate */ uint8 user_limit[WL_TX_POWER_RATES_LEGACY]; /**< User limit */ uint8 reg_limit[WL_TX_POWER_RATES_LEGACY]; /**< Regulatory power limit */ uint8 board_limit[WL_TX_POWER_RATES_LEGACY]; /**< Max power board can support (SROM) */ uint8 target[WL_TX_POWER_RATES_LEGACY]; /**< Latest target power */ uint8 PAD[2]; } tx_power_legacy2_t; #define WL_NUM_2x2_ELEMENTS 4 #define WL_NUM_3x3_ELEMENTS 6 #define WL_NUM_4x4_ELEMENTS 10 typedef struct { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint32 flags; chanspec_t chanspec; /**< txpwr report for this channel */ chanspec_t local_chanspec; /**< channel on which we are associated */ uint32 buflen; /**< ppr buffer length */ uint8 pprbuf[BCM_FLEX_ARRAY]; /**< Latest target power buffer */ } wl_txppr_t; #define WL_TXPPR_VERSION 1 #define WL_TXPPR_LENGTH (sizeof(wl_txppr_t)) #define TX_POWER_T_VERSION 45 #define TX_POWER_T_VERSION_V2 46 #define TX_POWER_T_VERSION_V3 47 /* curpower ppr types */ enum { PPRTYPE_TARGETPOWER = 1u, PPRTYPE_BOARDLIMITS = 2u, PPRTYPE_REGLIMITS = 3u, PPRTYPE_RU_REGLIMITS = 4u, PPRTYPE_RU_BOARDLIMITS = 5u, PPRTYPE_RU_TARGETPOWER = 6u, PPRTYPE_DYNAMIC_INFO = 7u, PPRTYPE_TGT_PWR_PSU = 8u, PPRTYPE_BOARDLIMITS_PSU = 9u, PPRTYPE_REGLIMITS_PSU = 10u, PPRTYPE_TGT_PWR_MRU = 11u, PPRTYPE_BOARDLIMITS_MRU = 12u, PPRTYPE_REGLIMITS_MRU = 13u, PPRTYPE_LAST }; /** number of ppr serialization buffers, it should be reg, board and target */ #define WL_TXPPR_SER_BUF_NUM (PPRTYPE_LAST - 1) typedef struct chanspec_txpwr_max { chanspec_t chanspec; /**< chanspec */ int8 txpwr_max; /**< max txpwr in all the rates */ uint8 txpwr_cat; /**< txpwr category for 6g */ } chanspec_txpwr_max_t; typedef struct wl_chanspec_txpwr_max { uint16 ver; /**< version of this struct */ uint16 len; /**< length in bytes of this structure */ uint32 count; /**< number of (chanspec, txpwr_max) pair */ chanspec_txpwr_max_t txpwr[BCM_FLEX_ARRAY]; /**< array of (chanspec, max_txpwr) pair */ } wl_chanspec_txpwr_max_t; #define WL_CHANSPEC_TXPWR_MAX_VER 1 #define WL_CHANSPEC_TXPWR_MAX_LEN (sizeof(wl_chanspec_txpwr_max_t)) typedef struct tx_inst_power { uint8 txpwr_est_Pout[2]; /**< Latest estimate for 2.4 and 5 Ghz */ uint8 txpwr_est_Pout_gofdm; /**< Pwr estimate for 2.4 OFDM */ } tx_inst_power_t; #define WL_NUM_TXCHAIN_MAX 4 typedef struct wl_txchain_pwr_offsets { int8 offset[WL_NUM_TXCHAIN_MAX]; /**< quarter dBm signed offset for each chain */ } wl_txchain_pwr_offsets_t; /** maximum channels returned by the get valid channels iovar */ #define WL_NUMCHANNELS 64 #define WL_NUMCHANNELS_MANY_CHAN 10 #define WL_ITER_LIMIT_MANY_CHAN 5 #define WL_MIMO_PS_CFG_VERSION_1 1 typedef struct wl_mimops_cfg { uint8 version; /* active_chains: 0 for all, 1 for 1 chain. */ uint8 active_chains; /* static (0) or dynamic (1).or disabled (3) Mode applies only when active_chains = 0. */ uint8 mode; /* bandwidth = Full (0), 20M (1), 40M (2), 80M (3). */ uint8 bandwidth; uint8 applychangesafterlearning; uint8 PAD[3]; } wl_mimops_cfg_t; /* This event is for tracing MIMO PS metrics snapshot calls. * It is helpful to debug out-of-sync issue between * ucode SHM values and FW snapshot calculation. * It is part of the EVENT_LOG_TAG_MIMO_PS_TRACE. */ #define WL_MIMO_PS_METRICS_SNAPSHOT_TRACE_TYPE 0 typedef struct wl_mimo_ps_metrics_snapshot_trace { /* type field for this TLV: */ uint16 type; /* length field for this TLV */ uint16 len; uint32 idle_slotcnt_mimo; /* MIMO idle slotcnt raw SHM value */ uint32 last_idle_slotcnt_mimo; /* stored value snapshot */ uint32 idle_slotcnt_siso; /* SISO idle slotcnt raw SHM value */ uint32 last_idle_slotcnt_siso; /* stored value snapshot */ uint32 rx_time_mimo; /* Rx MIMO raw SHM value */ uint32 last_rx_time_mimo; /* stored value snapshot */ uint32 rx_time_siso; /* RX SISO raw SHM value */ uint32 last_rx_time_siso; /* stored value snapshot */ uint32 tx_time_1chain; /* Tx 1-chain raw SHM value */ uint32 last_tx_time_1chain; /* stored value snapshot */ uint32 tx_time_2chain; /* Tx 2-chain raw SHM value */ uint32 last_tx_time_2chain; /* stored value snapshot */ uint32 tx_time_3chain; /* Tx 3-chain raw SHM value */ uint32 last_tx_time_3chain; /* stored value snapshot */ uint16 reason; /* reason for snapshot call, see below */ /* Does the call reset last values after delta calculation */ uint16 reset_last; } wl_mimo_ps_metrics_snapshot_trace_t; /* reason codes for mimo ps metrics snapshot function calls */ #define WL_MIMOPS_METRICS_SNAPSHOT_REPORT 1 #define WL_MIMOPS_METRICS_SNAPSHOT_RXCHAIN_SET 2 #define WL_MIMOPS_METRICS_SNAPSHOT_ARBI 3 #define WL_MIMOPS_METRICS_SNAPSHOT_SLOTUPD 4 #define WL_MIMOPS_METRICS_SNAPSHOT_PMBCNRX 5 #define WL_MIMOPS_METRICS_SNAPSHOT_BMACINIT 6 #define WL_MIMOPS_METRICS_SNAPSHOT_HT_COMPLETE 7 #define WL_MIMOPS_METRICS_SNAPSHOT_OCL 8 #define WL_MIMO_PS_STATUS_VERSION_2 2 typedef struct wl_mimo_ps_status { uint8 version; uint8 ap_cap; /* The associated AP's capability (BW, MIMO/SISO). */ uint8 association_status; /* How we are associated to the AP (MIMO/SISO). */ uint8 mimo_ps_state; /* mimo_ps_cfg states: [0-5]. See below for values */ uint8 mrc_state; /* MRC state: NONE (0), ACTIVE(1) */ uint8 bss_rxchain; /* bss rxchain bitmask */ uint8 bss_txchain; /* bss txchain bitmask */ uint8 bss_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ uint16 hw_state; /* bitmask of hw state. See below for values */ uint8 hw_rxchain; /* actual HW rxchain bitmask */ uint8 hw_txchain; /* actual HW txchain bitmask */ uint8 hw_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ uint8 pm_bcnrx_state; /* actual state of ucode flag */ uint8 basic_rates_present; /* internal flag to trigger siso bcmc rx */ uint8 siso_bcmc_rx_state; /* actual state of ucode flag */ } wl_mimo_ps_status_t; #define WL_MIMO_PS_STATUS_VERSION_1 1 typedef struct wl_mimo_ps_status_v1 { uint8 version; uint8 ap_cap; /* The associated AP's capability (BW, MIMO/SISO). */ uint8 association_status; /* How we are associated to the AP (MIMO/SISO). */ uint8 mimo_ps_state; /* mimo_ps_cfg states: [0-5]. See below for values */ uint8 mrc_state; /* MRC state: NONE (0), ACTIVE(1) */ uint8 bss_rxchain; /* bss rxchain bitmask */ uint8 bss_txchain; /* bss txchain bitmask */ uint8 bss_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ uint16 hw_state; /* bitmask of hw state. See below for values */ uint8 hw_rxchain; /* actual HW rxchain bitmask */ uint8 hw_txchain; /* actual HW txchain bitmask */ uint8 hw_bw; /* bandwidth: Full (0), 20M (1), 40M (2), 80M (3), etc */ uint8 PAD[3]; } wl_mimo_ps_status_v1_t; #define WL_MIMO_PS_STATUS_AP_CAP(ap_cap) (ap_cap & 0x0F) #define WL_MIMO_PS_STATUS_AP_CAP_BW(ap_cap) (ap_cap >> 4) #define WL_MIMO_PS_STATUS_ASSOC_BW_SHIFT 4 /* version 3: assoc status: low nibble is status enum, high other flags */ #define WL_MIMO_PS_STATUS_VERSION_3 3 #define WL_MIMO_PS_STATUS_ASSOC_STATUS_MASK 0x0F #define WL_MIMO_PS_STATUS_ASSOC_STATUS_VHT_WITHOUT_OMN 0x80 /* mimo_ps_status: ap_cap/association status */ enum { WL_MIMO_PS_STATUS_ASSOC_NONE = 0, WL_MIMO_PS_STATUS_ASSOC_SISO = 1, WL_MIMO_PS_STATUS_ASSOC_MIMO = 2, WL_MIMO_PS_STATUS_ASSOC_LEGACY = 3 }; /* mimo_ps_status: mimo_ps_cfg states */ enum { WL_MIMO_PS_CFG_STATE_NONE = 0, WL_MIMO_PS_CFG_STATE_INFORM_AP_INPROGRESS = 1, WL_MIMO_PS_CFG_STATE_INFORM_AP_DONE = 2, WL_MIMO_PS_CFG_STATE_LEARNING = 3, WL_MIMO_PS_CFG_STATE_HW_CONFIGURE = 4, WL_MIMO_PS_CFG_STATE_INFORM_AP_PENDING = 5 }; /* mimo_ps_status: hw_state values */ #define WL_MIMO_PS_STATUS_HW_STATE_NONE 0 #define WL_MIMO_PS_STATUS_HW_STATE_LTECOEX (0x1 << 0) #define WL_MIMO_PS_STATUS_HW_STATE_MIMOPS_BSS (0x1 << 1) #define WL_MIMO_PS_STATUS_HW_STATE_SCAN (0x1 << 3) #define WL_MIMO_PS_STATUS_HW_STATE_TXPPR (0x1 << 4) #define WL_MIMO_PS_STATUS_HW_STATE_PWRTHOTTLE (0x1 << 5) #define WL_MIMO_PS_STATUS_HW_STATE_TMPSENSE (0x1 << 6) #define WL_MIMO_PS_STATUS_HW_STATE_IOVAR (0x1 << 7) #define WL_MIMO_PS_STATUS_HW_STATE_AP_BSS (0x1 << 8) /* mimo_ps_status: mrc states */ #define WL_MIMO_PS_STATUS_MRC_NONE 0 #define WL_MIMO_PS_STATUS_MRC_ACTIVE 1 /* mimo_ps_status: core flag states for single-core beacon and siso-bcmc rx */ #define WL_MIMO_PS_STATUS_MHF_FLAG_NONE 0 #define WL_MIMO_PS_STATUS_MHF_FLAG_ACTIVE 1 #define WL_MIMO_PS_STATUS_MHF_FLAG_COREDOWN 2 #define WL_MIMO_PS_STATUS_MHF_FLAG_INVALID 3 /* Type values for the REASON */ #define WL_MIMO_PS_PS_LEARNING_ABORTED (1 << 0) #define WL_MIMO_PS_PS_LEARNING_COMPLETED (1 << 1) #define WL_MIMO_PS_PS_LEARNING_ONGOING (1 << 2) typedef struct wl_mimo_ps_learning_event_data { uint32 startTimeStamp; uint32 endTimeStamp; uint16 reason; struct ether_addr BSSID; uint32 totalSISO_below_rssi_threshold; uint32 totalMIMO_below_rssi_threshold; uint32 totalSISO_above_rssi_threshold; uint32 totalMIMO_above_rssi_threshold; } wl_mimo_ps_learning_event_data_t; #define WL_MIMO_PS_PS_LEARNING_CFG_ABORT (1 << 0) #define WL_MIMO_PS_PS_LEARNING_CFG_STATUS (1 << 1) #define WL_MIMO_PS_PS_LEARNING_CFG_CONFIG (1 << 2) #define WL_MIMO_PS_PS_LEARNING_CFG_MASK (0x7) #define WL_MIMO_PS_PS_LEARNING_CFG_V1 1 typedef struct wl_mimops_learning_cfg { /* flag: bit 0 for abort */ /* flag: bit 1 for status */ /* flag: bit 2 for configuring no of packets and rssi */ uint8 flag; /* mimo ps learning version, compatible version is 0 */ uint8 version; /* if version is 0 or rssi is 0, ignored */ int8 learning_rssi_threshold; uint8 reserved; uint32 no_of_packets_for_learning; wl_mimo_ps_learning_event_data_t mimops_learning_data; } wl_mimops_learning_cfg_t; /* ocl status is reported per slice */ #define WL_OCL_STATUS_VERSION_1 1 typedef struct ocl_status_info { uint8 version; uint8 len; uint16 fw_status; /* Bits representing FW disable reasons */ uint8 hw_status; /* Bits for actual HW config and SISO/MIMO coremask */ uint8 coremask; /* The ocl core mask (indicating listening core) */ } ocl_status_info_t; #define WL_OCL_STATUS_VERSION_2 2 /* v2 supports disable stats */ typedef struct ocl_status_info_v2 { uint8 version; uint8 len; uint8 hw_status; /* Bits for actual HW config and SISO/MIMO coremask */ uint8 coremask; /* The ocl core mask (indicating listening core) */ uint32 fw_status; /* Bits representing FW disable reasons */ uint32 disable_start_req; /* disable reason which triggered the ocl state change * from enable to disable, afterwards there could be more * disable reason(s) active before ocl state is enabled * again. All current disable reason(s) are * indicated in fw_status and at snapshot maynot include * the disable reason which actually triggered ocl disable * as reasons become active/inactive independently. */ uint32 enable_start_req; /* disable reason which triggered the ocl state change * from disable to enable. This is the reason which very * recently turned off which caused the ocl to enable. */ uint32 cur_ts; /* current timestamp (ms) */ uint32 disable_start_ts; /* disable_start_req timestamp (ms) */ uint32 enable_start_ts; /* enable_start_req timestamp (ms) */ uint32 disable_count_as; /* total effective-disable (i.e., ocl state changing * from enable-to-disable) count since last assoc */ uint32 disable_reqs_count_as; /* total disable requests since last assoc */ uint32 disable_dur_as; /* total disable duration (ms) since last assoc */ uint32 disable_count; /* total effective-disable count */ uint32 disable_reqs_count; /* total disable requests */ uint32 disable_dur; /* total disable duration (ms) */ } ocl_status_info_v2_t; /* v3 shows per-chanspec OCL status, active link type * on that chanspec, and user's ocl configuration */ #define WL_OCL_STATUS_VERSION_3 3 typedef struct ocl_status_info_v3 { uint8 version; uint8 len; uint8 hw_status; /* Bits for actual HW config and SISO/MIMO coremask */ uint8 coremask; /* The ocl core mask (indicating listening core) */ uint32 fw_status; /* Bits representing FW disable reasons */ uint32 disable_start_req; /* disable reason which triggered the ocl state change * from enable to disable, afterwards there could be more * disable reason(s) active before ocl state is enabled * again. All current disable reason(s) are * indicated in fw_status and at snapshot maynot include * the disable reason which actually triggered ocl disable * as reasons become active/inactive independently. */ uint32 enable_start_req; /* disable reason which triggered the ocl state change * from disable to enable. This is the reason which very * recently turned off which caused the ocl to enable. */ uint32 cur_ts; /* current timestamp (ms) */ uint32 disable_start_ts; /* disable_start_req timestamp (ms) */ uint32 enable_start_ts; /* enable_start_req timestamp (ms) */ uint32 disable_count_as; /* total effective-disable (i.e., ocl state changing * from enable-to-disable) count since last assoc */ uint32 disable_reqs_count_as; /* total disable requests since last assoc */ uint32 disable_dur_as; /* total disable duration (ms) since last assoc */ uint32 disable_count; /* total effective-disable count */ uint32 disable_reqs_count; /* total disable requests */ uint32 disable_dur; /* total disable duration (ms) */ uint16 chanspec; /* chanspec on which ocl_status is reported */ uint8 active_link; /* Bits showing which link is active */ uint8 ocl_en; /* user's configuation */ } ocl_status_info_v3_t; #define OCL_SET_INFRA (1u << 0u) /* host OCL enable/disable for INFRA */ #define OCL_SET_NAN (1u << 1u) /* host OCL enable/disable for NAN */ #define OCL_SET_AWDL (1u << 2u) /* host OCL enable/disable for AWDL */ /* MWS OCL map */ #define WL_MWS_OCL_OVERRIDE_VERSION_1 1 typedef struct wl_mws_ocl_override { uint16 version; /* Structure version */ uint16 bitmap_2g; /* bitmap for 2.4G channels bits 1-13 */ uint16 bitmap_5g_lo; /* bitmap for 5G low channels by 2: * 34-48, 52-56, 60-64, 100-102 */ uint16 bitmap_5g_mid; /* bitmap for 5G mid channels by 2: * 104, 108-112, 116-120, 124-128, * 132-136, 140, 149-151 */ uint16 bitmap_5g_high; /* bitmap for 5G high channels by 2 * 153, 157-161, 165 */ } wl_mws_ocl_override_t; /* Bits for fw_status and disable/enable start request */ #define OCL_DISABLED_HOST (1u << 0u) /* Disabled by host through ocl_enable */ #define OCL_DISABLED_RSSI (1u << 1u) /* Disabled because of ocl_rssi_threshold */ #define OCL_DISABLED_LTEC (1u << 2u) /* Disabled due to LTE Coex activity */ #define OCL_DISABLED_SISO (1u << 3u) /* Disabled while in SISO mode */ #define OCL_DISABLED_CAL (1u << 4u) /* Disabled during active calibration */ #define OCL_DISABLED_CHANSWITCH (1u << 5u) /* Disabled during channel switch */ #define OCL_DISABLED_ASPEND (1u << 6u) /* Disabled due to assoc pending */ #define OCL_DISABLED_SEQ_RANGE (1u << 7u) /* Disabled during SEQ Ranging */ #define OCL_DISABLED_RXIQ_EST_BTLOWAR (1u << 8u) /* Disabled if the bt-lo-war is active */ #define OCL_DISABLED_IDLE_TSSICAL (1u << 9u) /* Disabled if TSSI Cal in progress */ #define OCL_DISABLED_TONE (1u << 10u) /* Disabled if the tone is active */ #define OCL_DISABLED_NOISECAL (1u << 11u) /* Disabled if the noise cal is active */ #define OCL_DISABLED_INIT (1u << 12u) /* Disabled during phy init */ #define OCL_DISABLED_AZ (1u << 13u) /* Disabled during 802.11az ranging */ #define OCL_DISABLED_PHYTS (1u << 14u) /* Disabled during PHYTS */ #define OCL_DISABLED_SCPEND (1u << 15u) /* Disabled due to scan pending */ #define OCL_DISABLED_EMLSR (1u << 16u) /* Disabled due to EMLSR enabled */ #define OCL_DISABLED_BTBPHYWAR (1u << 17u) /* Disabled during BT eSCO traffic */ /* Bits for hw_status */ #define OCL_HWCFG 0x01u /* State of OCL config bit in phy HW */ #define OCL_HWMIMO 0x02u /* Set if current coremask is > 1 bit */ #define OCL_COREDOWN 0x80u /* Set if core is currently down */ #define WL_OPS_CFG_VERSION_1 1 /* Common IOVAR struct */ typedef struct wl_ops_cfg_v1 { uint16 version; uint16 len; /* total length includes fixed fields and variable data[] */ uint16 subcmd_id; /* subcommand id */ uint16 padding; /* reserved / padding for 4 byte align */ uint8 data[]; /* subcommand data; could be empty */ } wl_ops_cfg_v1_t; /* subcommands ids */ enum { WL_OPS_CFG_SUBCMD_ENABLE = 0, /* OPS enable/disable mybss and obss * for nav and plcp options */ WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR = 1, /* Max sleep duration used for OPS */ WL_OPS_CFG_SUBCMD_RESET_STATS = 2 /* Reset stats part of ops_status * on both slices */ }; #define WL_OPS_CFG_MASK 0xffff #define WL_OPS_CFG_CAP_MASK 0xffff0000 #define WL_OPS_CFG_CAP_SHIFT 16 /* Shift bits to locate the OPS CAP */ #define WL_OPS_MAX_SLEEP_DUR 12500 /* max ops duration in us */ #define WL_OPS_MINOF_MAX_SLEEP_DUR 512 /* minof max ops duration in us */ #define WL_OPS_SUPPORTED_CFG (WL_OPS_MYBSS_PLCP_DUR | WL_OPS_MYBSS_NAV_DUR \ | WL_OPS_OBSS_PLCP_DUR | WL_OPS_OBSS_NAV_DUR) #define WL_OPS_DEFAULT_CFG WL_OPS_SUPPORTED_CFG /* WL_OPS_CFG_SUBCMD_ENABLE */ typedef struct wl_ops_cfg_enable { uint32 bits; /* selectively enable ops for mybss and obss */ } wl_ops_cfg_enable_t; /* Bits for WL_OPS_CFG_SUBCMD_ENABLE Parameter */ #define WL_OPS_MYBSS_PLCP_DUR 0x1 /* OPS based on mybss 11b & 11n mixed HT frames * PLCP header duration */ #define WL_OPS_MYBSS_NAV_DUR 0x2 /* OPS based on mybss RTS-CTS duration */ #define WL_OPS_OBSS_PLCP_DUR 0x4 /* OPS based on obss 11b & 11n mixed HT frames * PLCP header duration */ #define WL_OPS_OBSS_NAV_DUR 0x8 /* OPS based on obss RTS-CTS duration */ /* WL_OPS_CFG_SUBCMD_MAX_SLEEP_DUR */ typedef struct wl_ops_cfg_max_sleep_dur { uint32 val; /* maximum sleep duration (us) used for OPS */ } wl_ops_cfg_max_sleep_dur_t; /* WL_OPS_CFG_SUBCMD_RESET_STATS */ typedef struct wl_ops_cfg_reset_stats { uint32 val; /* bitmap of slices, 0 means all slices */ } wl_ops_cfg_reset_stats_t; #define WL_OPS_STATUS_VERSION_1 1 #define OPS_DUR_HIST_BINS 5 /* number of bins used, 0-1, 1-2, 2-4, 4-8, >8 msec */ typedef struct wl_ops_status_v1 { uint16 version; uint16 len; /* Total length including all fixed fields */ uint8 slice_index; /* Slice for which status is reported */ uint8 disable_obss; /* indicate if obss cfg is disabled */ uint8 pad[2]; /* 4-byte alignment */ uint32 disable_reasons; /* FW disable reasons */ uint32 disable_duration; /* ops disable time(ms) due to disable reasons */ uint32 applied_ops_config; /* currently applied ops config */ uint32 partial_ops_dur; /* Total time (in usec) of partial ops duration */ uint32 full_ops_dur; /* Total time (in usec) of full ops duration */ uint32 count_dur_hist[OPS_DUR_HIST_BINS]; /* ops occurrence histogram */ uint32 nav_cnt; /* number of times ops triggered based NAV duration */ uint32 plcp_cnt; /* number of times ops triggered based PLCP duration */ uint32 mybss_cnt; /* number of times mybss ops trigger */ uint32 obss_cnt; /* number of times obss ops trigger */ uint32 miss_dur_cnt; /* number of times ops couldn't happen * due to insufficient duration */ uint32 miss_premt_cnt; /* number of times ops couldn't happen due * to not meeting Phy preemption thresh */ uint32 max_dur_cnt; /* number of times ops did not trigger due to * frames exceeding max sleep duration */ uint32 wake_cnt; /* number of ops miss due to wake reason */ uint32 bcn_wait_cnt; /* number of ops miss due to waiting for bcn */ } wl_ops_status_v1_t; /* Bits for disable_reasons */ #define OPS_DISABLED_HOST 0x01 /* Host has disabled through ops_cfg */ #define OPS_DISABLED_UNASSOC 0x02 /* Disabled because the slice is in unassociated state */ #define OPS_DISABLED_SCAN 0x04 /* Disabled because the slice is in scan state */ #define OPS_DISABLED_BCN_MISS 0x08 /* Disabled because beacon missed for a duration */ #define OPS_DISABLED_OBSS_MMT 0x10 /* Disabled because of OBSS measurement */ #define WL_PSBW_CFG_VERSION_1 1 /* Common IOVAR struct */ typedef struct wl_psbw_cfg_v1 { uint16 version; uint16 len; /* total length includes fixed fields and variable data[] */ uint16 subcmd_id; /* subcommand id */ uint16 pad; /* reserved / padding for 4 byte align */ uint8 data[]; /* subcommand data */ } wl_psbw_cfg_v1_t; /* subcommands ids */ enum { /* PSBW enable/disable */ WL_PSBW_CFG_SUBCMD_ENABLE = 0, /* override psbw disable requests */ WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK = 1, /* Reset stats part of psbw status */ WL_PSBW_CFG_SUBCMD_RESET_STATS = 2 }; #define WL_PSBW_OVERRIDE_DISA_CFG_MASK 0x0000ffff #define WL_PSBW_OVERRIDE_DISA_CAP_MASK 0xffff0000 #define WL_PSBW_OVERRIDE_DISA_CAP_SHIFT 16 /* shift bits for cap */ /* WL_PSBW_CFG_SUBCMD_ENABLE */ typedef struct wl_psbw_cfg_enable { bool enable; /* enable or disable */ } wl_psbw_cfg_enable_t; /* WL_PSBW_CFG_SUBCMD_OVERRIDE_DISABLE_MASK */ typedef struct wl_psbw_cfg_override_disable_mask { uint32 mask; /* disable requests to override, cap and current cfg */ } wl_psbw_cfg_override_disable_mask_t; /* WL_PSBW_CFG_SUBCMD_RESET_STATS */ typedef struct wl_psbw_cfg_reset_stats { uint32 val; /* infra interface index, 0 */ } wl_psbw_cfg_reset_stats_t; #define WL_PSBW_STATUS_VERSION_1 1 typedef struct wl_psbw_status_v1 { uint16 version; uint16 len; /* total length including all fixed fields */ uint8 curr_slice_index; /* current slice index of the interface */ uint8 associated; /* interface associatd */ chanspec_t chspec; /* radio chspec */ uint32 state; /* psbw state */ uint32 disable_reasons; /* FW disable reasons */ uint32 slice_enable_dur; /* time(ms) psbw remains enabled on this slice */ uint32 total_enable_dur; /* time(ms) psbw remains enabled total */ uint32 enter_cnt; /* total cnt entering PSBW active */ uint32 exit_cnt; /* total cnt exiting PSBW active */ uint32 exit_imd_cnt; /* total cnt imd exit when waited N tbtts */ uint32 enter_skip_cnt; /* total cnt entering PSBW active skipped */ } wl_psbw_status_v1_t; /* Bit for state */ #define PSBW_ACTIVE 0x1 /* active 20MHz */ #define PSBW_TTTT_PEND 0x2 /* waiting for TTTT intr */ #define PSBW_WAIT_ENTER 0x4 /* in wait period before entering */ #define PSBW_CAL_DONE 0x8 /* 20M channel cal done */ /* Bits for disable_reasons */ #define WL_PSBW_DISA_HOST 0x00000001 /* Host has disabled through psbw_cfg */ #define WL_PSBW_DISA_AP20M 0x00000002 /* AP is operating on 20 MHz */ #define WL_PSBW_DISA_SLOTTED_BSS 0x00000004 /* slot_bss active */ #define WL_PSBW_DISA_NOT_PMFAST 0x00000008 /* Not PM_FAST */ #define WL_PSBW_DISA_BASICRATESET 0x00000010 /* BasicRateSet is empty */ #define WL_PSBW_DISA_NOT_D3 0x00000020 /* PCIe not in D3 */ #define WL_PSBW_DISA_CSA 0x00000040 /* CSA IE is present */ #define WL_PSBW_DISA_ASSOC 0x00000080 /* assoc state is active/or unassoc */ #define WL_PSBW_DISA_SCAN 0x00000100 /* scan state is active */ #define WL_PSBW_DISA_CAL 0x00000200 /* cal pending or active */ #define WL_PSBW_DISA_BCN_OFFLOAD 0x00000400 /* PSBW disabled due to scan * core beacon offload */ #define WL_PSBW_DISA_DISASSOC 0x00000800 /* STA is disassociated */ /* following are not part of disable reasons */ #define WL_PSBW_EXIT_PM 0x00001000 /* Out of PM */ #define WL_PSBW_EXIT_TIM 0x00002000 /* unicast TIM bit present */ #define WL_PSBW_EXIT_DATA 0x00004000 /* Data for transmission */ #define WL_PSBW_EXIT_MGMTDATA 0x00008000 /* management frame for transmission */ #define WL_PSBW_EXIT_BW_UPD 0x00010000 /* BW being updated */ #define WL_PSBW_DISA_NONE 0x80000000 /* reserved for internal use only */ /* DVFS */ #define DVFS_CMND_VERSION_1 1 /* Common IOVAR struct */ typedef struct dvfs_cmnd_v1 { uint16 ver; /* version of this structure */ uint16 len; /* includes both fixed and variable data[] fields */ uint32 subcmd; /* subcommand id */ uint8 data[]; /* subcommand data */ } dvfs_cmnd_v1_t; /* subcommand ids */ enum { DVFS_SUBCMD_ENABLE = 0, /* DVFS enable/disable, 1-byte data * DVFS enable:1, disable:0 */ DVFS_SUBCMD_LDV = 1, /* DVFS force arm state to LDV, 1-byte data * DVFS force LDV ON 1, LDV OFF 0 */ DVFS_SUBCMD_STATUS = 2, /* DVFS status, data[] contains dvfs_status */ DVFS_SUBCMD_HIST = 3, /* DVFS history, data[] contains * history of dvfs state change */ DVFS_SUBCMD_LAST }; /* DVFS Status */ /* current DVFS state request for ARM */ #define DVFS_STATE_BIT_MASK 0x0Fu #define DVFS_STATE_BIT_SHIFT 0u /* Bit value for DVFS state request */ #define DVFS_STATE_LDV 0u #define DVFS_STATE_NDV 1u /* current DVFS status */ #define DVFS_STATUS_BIT_MASK 0xF0u #define DVFS_STATUS_BIT_SHIFT 4u /* Bit value for DVFS status */ #define DVFS_STATUS_LDV 0u #define DVFS_STATUS_NDV 1u #define DVFS_STATUS_HDV 3u /* DVFS bits are for status, raw request and active request */ /* 4387b0 supports only status bits for aux, main, and bt */ /* 4387c0 supports all eight status and request bits */ #define DVFS_BIT_AUX_MASK 0x0001u #define DVFS_BIT_AUX_SHIFT 0u #define DVFS_BIT_AUX_VAL(_val) (((_val) & DVFS_BIT_AUX_MASK) \ >> DVFS_BIT_AUX_SHIFT) #define DVFS_BIT_MAIN_MASK 0x0002u #define DVFS_BIT_MAIN_SHIFT 1u #define DVFS_BIT_MAIN_VAL(_val) (((_val) & DVFS_BIT_MAIN_MASK) \ >> DVFS_BIT_MAIN_SHIFT) #define DVFS_BIT_BT_MASK 0x0004u #define DVFS_BIT_BT_SHIFT 2u #define DVFS_BIT_BT_VAL(_val) (((_val) & DVFS_BIT_BT_MASK) \ >> DVFS_BIT_BT_SHIFT) #define DVFS_BIT_CHIPC_MASK 0x0008u #define DVFS_BIT_CHIPC_SHIFT 3u #define DVFS_BIT_CHIPC_VAL(_val) (((_val) & DVFS_BIT_CHIPC_MASK) \ >> DVFS_BIT_CHIPC_SHIFT) #define DVFS_BIT_PCIE_MASK 0x0010u #define DVFS_BIT_PCIE_SHIFT 4u #define DVFS_BIT_PCIE_VAL(_val) (((_val) & DVFS_BIT_PCIE_MASK) \ >> DVFS_BIT_PCIE_SHIFT) #define DVFS_BIT_ARM_MASK 0x0020u #define DVFS_BIT_ARM_SHIFT 5u #define DVFS_BIT_ARM_VAL(_val) (((_val) & DVFS_BIT_ARM_MASK) \ >> DVFS_BIT_ARM_SHIFT) #define DVFS_BIT_SCAN_MASK 0x0040u #define DVFS_BIT_SCAN_SHIFT 6u #define DVFS_BIT_SCAN_VAL(_val) (((_val) & DVFS_BIT_SCAN_MASK) \ >> DVFS_BIT_SCAN_SHIFT) #define DVFS_BIT_BTSCAN_MASK 0x0080u #define DVFS_BIT_BTSCAN_SHIFT 7u #define DVFS_BIT_BTSCAN_VAL(_val) (((_val) & DVFS_BIT_BTSCAN_MASK) \ >> DVFS_BIT_BTSCAN_SHIFT) #define DVFS_BIT_HWA_MASK 0x0100u #define DVFS_BIT_HWA_SHIFT 8u #define DVFS_BIT_HWA_VAL(_val) (((_val) & DVFS_BIT_HWA_MASK) \ >> DVFS_BIT_HWA_SHIFT) #define DVFS_BIT_SYSMEM_MASK 0x0200u #define DVFS_BIT_SYSMEM_SHIFT 9u #define DVFS_BIT_SYSMEM_VAL(_val) (((_val) & DVFS_BIT_SYSMEM_MASK) \ >> DVFS_BIT_SYSMEM_SHIFT) #define DVFS_BIT_SAQM_SHIFT 10u /* to convert voltage to volt from multiple of 10mVolt */ #define DVFS_CONVERT_TO_VOLT 100u /* status version for 4387b0 */ #define DVFS_STATUS_VERSION_1 1 typedef struct dvfs_status_v1 { uint16 version; /* version of dvfs_status */ uint16 len; /* total length including all fixed fields */ uint8 info; /* current dvfs state request and status */ uint8 voltage; /* voltage (multiple of 10mV) */ uint16 freq; /* arm clock frequency (in MHz) */ uint32 state_change_count; /* total state (LDV/NDV) transition count */ uint32 ldv_duration; /* total time (ms) in LDV */ uint32 ndv_duration; /* total time (ms) in NDV */ uint16 status; /* status bits */ uint16 PAD; /* word aligned for size */ } dvfs_status_v1_t; #define DVFS_STATUS_VER_1_LEN (sizeof(dvfs_status_v1_t)) /* status version for 4387c0 */ #define DVFS_STATUS_VERSION_2 2 #define DVFS_STATUS_VERSION_3 3 typedef struct dvfs_status_v2 { uint16 version; /* version of dvfs_status */ uint16 len; /* total length including all fixed fields */ uint8 info; /* current dvfs state request and status */ uint8 voltage; /* voltage (multiple of 10mV) */ uint16 freq; /* arm clock frequency (in MHz) */ uint32 state_change_count; /* total state (LDV/NDV) transition count */ uint32 ldv_duration; /* total time (ms) in LDV */ uint32 ndv_duration; /* total time (ms) in NDV */ uint16 status; /* status bits */ uint16 raw_request; /* raw request bits */ uint16 active_request; /* active request bits */ /* DVFS_STATUS_VERSION_3 for pmurev >= 40 */ uint16 valid_cores; /* bitmap to indicate valid cores status */ } dvfs_status_v2_t; #define DVFS_STATUS_V2_VALID_CORES (0xFFu) #define DVFS_STATUS_VER_3_LEN (sizeof(dvfs_status_v2_t)) #define DVFS_STATUS_VER_2_LEN (DVFS_STATUS_VER_3_LEN - (sizeof(uint16))) #define DVFS_STATUS_VERSION_4 4 typedef struct dvfs_status_v4 { uint16 version; /* version of dvfs_status */ uint16 len; /* total length including all fixed fields */ uint8 info; /* current dvfs state request and status */ uint8 voltage; /* voltage (multiple of 10mV) */ uint16 freq; /* arm clock frequency (in MHz) */ uint32 state_change_count; /* total state (LDV/NDV) transition count */ uint32 ldv_duration; /* total time (ms) in LDV */ uint32 ndv_duration; /* total time (ms) in NDV */ uint16 status; /* status bits */ uint16 raw_request; /* raw request bits */ uint16 active_request; /* active request bits */ /* DVFS_STATUS_VERSION_3 for pmurev >= 40 */ uint16 valid_cores; /* bitmap to indicate valid cores status */ /* DVFS_STATUS_VERSION_4 for pmurev >= 43 */ uint32 state_change_count_hw_ldv; /* total state (LDV/NDV) transition count by HW */ uint32 state_change_count_hw_ndv; /* total state (LDV/NDV) transition count by HW */ uint32 ldv_duration_hw; /* total time (ms) in LDV reported by HW */ uint32 ndv_duration_hw; /* total time (ms) in NDV reported by HW */ } dvfs_status_v4_t; #define DVFS_STATUS_VER_4_LEN (sizeof(dvfs_status_v4_t)) typedef struct dvfs_supply_stats_v5 { uint16 version; uint16 len; uint16 supply_num; /* Supply num that has this dvfs supply stats. */ uint8 dvfs_status; /* current dvfs status LDV/NDV/HDV */ uint8 voltage; /* voltage (multiple of 10mV) */ uint32 state_change_count; /* total state (LDV/NDV) transition count */ uint32 fw_ldv_duration; /* total time (ms) in LDV */ uint32 hw_ldv_duration; /* total time (ms) in LDV reported by HW */ uint32 state_change_count_hw_ldv; /* HDV transition count by HW */ uint32 fw_ndv_duration; /* total time (ms) in LDV */ uint32 hw_ndv_duration; /* total time (ms) in LDV reported by HW */ uint32 state_change_count_hw_ndv; /* HDV transition count by HW */ uint32 fw_hdv_duration; /* total time (ms) in LDV */ uint32 hw_hdv_duration; /* total time (ms) in LDV reported by HW */ uint32 state_change_count_hw_hdv; /* HDV transition count by HW */ } dvfs_supply_stats_v5_t; #define DVFS_STATUS_CORE_NAME_MASK 0x3Fu #define DVFS_STATUS_CORE_NAME_SHIFT 0u #define DVFS_STATUS_CORE_STATUS_MASK 0x3u #define DVFS_STATUS_CORE_STATUS_SHIFT 0x6u #define DVFS_STATUS_CORE_ACTIVE_REQ_MASK 0x3u #define DVFS_STATUS_CORE_ACTIVE_REQ_SHIFT 8u #define DVFS_STATUS_CORE_RAW_REQ_MASK 0x3u #define DVFS_STATUS_CORE_RAW_REQ_SHIFT 10u #define DVFS_STATUS_CORE_SUPPLY_NUM_MASK 0x3u #define DVFS_STATUS_CORE_SUPPLY_NUM_SHIFT 12u typedef struct dvfs_core_info_v5 { uint16 version; uint16 len; uint8 num_cores; uint8 PAD; uint16 powercontrol; /* PowerControl from chipcommon */ uint16 dvfs_core_stats[]; /* Per core statistics, * BITs 5:0 dvfs_core_name * BITs 7:6 DVFS Status * BITs 9:8 Active Request * BITs 11:10 RAW Request * BITs 13:12 Supply Num * BIT 14:14 if set CoreReady rsrc is active * BITs 15 reserved */ } dvfs_core_info_v5_t; typedef struct dvfs_freq_info_v5 { uint16 version; uint16 len; uint32 freq_common_bp; uint32 freq_wlan_bp; uint32 freq_main_mac; uint32 freq_aux_mac; uint32 freq_scan_mac; uint32 freq_saqm; } dvfs_freq_info_v5_t; typedef enum dvfs_tlv_id { DVFS_SUPPLY_STATS_ID = 0u, DVFS_CORE_STATUS_ID = 1u, DVFS_FREQ_STATS_ID = 2u, DVFS_XTLV_MAX = 3u } dvfs_tlv_id_s; #define DVFS_STATUS_CORE_INFO_VER 0 #define DVFS_STATUS_FREQ_INFO_VER 0 #define DVFS_STATUS_VERSION_5 5 typedef struct dvfs_status_v5 { uint16 version; /* version of dvfs_status */ uint16 len; /* total length including all fixed fields */ uint16 armfreq; /* arm clock frequency (in MHz) */ uint16 num_dvfs_supplies; /* Total number of supplies */ uint8 tlv_params[]; /* xtlvs for variable ext params, id dvfs_tlv_id_s */ } dvfs_status_v5_t; #define DVFS_STATUS_VER_5_LEN (sizeof(dvfs_status_v5_t)) /* DVFS_SUBCMD_HIST */ #define DVFS_HIST_CMD_VERSION_1 1 typedef struct dvfs_hist_cmd_v1 { uint16 version; /* version of this structure */ uint16 len; /* includes both fixed and variable data[] fields */ uint8 data[]; /* subcommand data : array of dvfs_hist_v1_t */ } dvfs_hist_cmd_v1_t; /* DVFS_SUBCMD_HIST data[] payload */ typedef struct dvfs_hist_v1 { uint8 old_state; /* old state */ uint8 new_state; /* new state */ uint16 reason; /* reason for state change */ uint32 timestamp; /* timestamp of state change */ } dvfs_hist_v1_t; /* Bits for DVFS state change reason */ #define WL_DVFS_REASON_NOTPM 0x0001u /* Not PM */ #define WL_DVFS_REASON_MPC 0x0002u /* MPC */ #define WL_DVFS_REASON_TX_ACTIVE 0x0004u /* TX Active */ #define WL_DVFS_REASON_DBGST_ACTIVE 0x0008u /* Power state active */ #define WL_DVFS_REASON_DBGST_ASLEEP 0x0010u /* Power state asleep */ #define WL_DVFS_REASON_LTR_ACTIVE 0x0020u /* LTR Active */ #define WL_DVFS_REASON_HOST 0x0040u /* Host disabled */ #define WL_DVFS_REASON_SCAN 0x0080u /* Scan */ #define WL_DVFS_REASON_SLOTTED_BSS 0x0100u /* Slotted BSS */ #define WL_DVFS_REASON_CHAN 0x0200u /* Channel Change */ #define WL_DVFS_REASON_CAL 0x0400u /* CAL */ #define WL_DVFS_REASON_ASSOC 0x0800u /* ASSOC */ #define WL_DVFS_REASON_WD 0x1000u /* WD */ #define WL_DVFS_REASON_SOFTAP 0x2000u /* SoftAP */ #define WL_DVFS_REASON_PHYBW 0x4000u /* Channel BW Change */ /* * Join preference iovar value is an array of tuples. Each tuple has a one-byte type, * a one-byte length, and a variable length value. RSSI type tuple must be present * in the array. * * Types are defined in "join preference types" section. * * Length is the value size in octets. It is reserved for WL_JOIN_PREF_WPA type tuple * and must be set to zero. * * Values are defined below. * * 1. RSSI - 2 octets * offset 0: reserved * offset 1: reserved * * 2. WPA - 2 + 12 * n octets (n is # tuples defined below) * offset 0: reserved * offset 1: # of tuples * offset 2: tuple 1 * offset 14: tuple 2 * ... * offset 2 + 12 * (n - 1) octets: tuple n * * struct wpa_cfg_tuple { * uint8 akm[DOT11_OUI_LEN+1]; akm suite * uint8 ucipher[DOT11_OUI_LEN+1]; unicast cipher suite * uint8 mcipher[DOT11_OUI_LEN+1]; multicast cipher suite * }; * * multicast cipher suite can be specified as a specific cipher suite or WL_WPA_ACP_MCS_ANY. * * 3. BAND - 2 octets * offset 0: reserved * offset 1: see "band preference" and "band types" * * 4. BAND RSSI - 2 octets * offset 0: band types * offset 1: +ve RSSI boost value in dB */ struct tsinfo_arg { uint8 octets[3]; }; #define RATE_CCK_1MBPS 0 #define RATE_CCK_2MBPS 1 #define RATE_CCK_5_5MBPS 2 #define RATE_CCK_11MBPS 3 #define RATE_LEGACY_OFDM_6MBPS 0 #define RATE_LEGACY_OFDM_9MBPS 1 #define RATE_LEGACY_OFDM_12MBPS 2 #define RATE_LEGACY_OFDM_18MBPS 3 #define RATE_LEGACY_OFDM_24MBPS 4 #define RATE_LEGACY_OFDM_36MBPS 5 #define RATE_LEGACY_OFDM_48MBPS 6 #define RATE_LEGACY_OFDM_54MBPS 7 #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V1 1 #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V2 2 #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V3 3 #define WL_BSSTRANS_RSSI_RATE_MAP_VERSION_V4 4 #define WL_BSSTRANS_RSSI_VERSION_V1 1u #ifdef WL_BAND6G #define MAXBANDS 3 /**< Maximum # of bands */ #else #define MAXBANDS 2 /**< Maximum # of bands */ #endif /* WL_BAND6G */ typedef struct wl_bsstrans_rssi_v1 { int8 rssi[MAXBANDS]; /**< RSSI in dbm */ } wl_bsstrans_rssi_v1_t; typedef struct wl_bsstrans_rssi { int8 rssi_2g; /**< RSSI in dbm for 2.4 G */ int8 rssi_5g; /**< RSSI in dbm for 5G, unused for cck */ } wl_bsstrans_rssi_t; #define RSSI_RATE_MAP_MAX_STREAMS 4 /**< max streams supported */ /** RSSI to rate mapping, all 20Mhz, no SGI */ typedef struct wl_bsstrans_rssi_rate_map_v4 { uint16 ver; uint16 len; /**< length of entire structure */ wl_bsstrans_rssi_v1_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ wl_bsstrans_rssi_v1_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ wl_bsstrans_rssi_v1_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS7 */ wl_bsstrans_rssi_v1_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT_ALL]; /* MCS0-11 */ wl_bsstrans_rssi_v1_t phy_ax[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_HE]; /* MCS0-11 */ wl_bsstrans_rssi_v1_t phy_be[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_EHT]; /* MCS0-15 */ } wl_bsstrans_rssi_rate_map_v4_t; /** RSSI to rate mapping, all 20Mhz, no SGI */ typedef struct wl_bsstrans_rssi_rate_map_v3 { uint16 ver; uint16 len; /**< length of entire structure */ wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT_ALL]; /* MCS0-11 */ wl_bsstrans_rssi_t phy_ax[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_HE]; /* MCS0-11 */ wl_bsstrans_rssi_t phy_be[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_EHT]; /* MCS0-15 */ } wl_bsstrans_rssi_rate_map_v3_t; /** RSSI to rate mapping, all 20Mhz, no SGI */ typedef struct wl_bsstrans_rssi_rate_map_v2 { uint16 ver; uint16 len; /**< length of entire structure */ wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT_ALL]; /**< MCS0-11 */ wl_bsstrans_rssi_t phy_ax[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_HE]; /**< MCS0-11 */ } wl_bsstrans_rssi_rate_map_v2_t; /** RSSI to rate mapping, all 20Mhz, no SGI */ typedef struct wl_bsstrans_rssi_rate_map_v1 { uint16 ver; uint16 len; /**< length of entire structure */ wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT]; /**< MCS0-9 */ } wl_bsstrans_rssi_rate_map_v1_t; /** RSSI to rate mapping, all 20Mhz, no SGI */ typedef struct wl_bsstrans_rssi_rate_map { uint16 ver; uint16 len; /**< length of entire structure */ wl_bsstrans_rssi_t cck[WL_NUM_RATES_CCK]; /**< 2.4G only */ wl_bsstrans_rssi_t ofdm[WL_NUM_RATES_OFDM]; /**< 6 to 54mbps */ wl_bsstrans_rssi_t phy_n[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_MCS_1STREAM]; /* MCS0-7 */ wl_bsstrans_rssi_t phy_ac[RSSI_RATE_MAP_MAX_STREAMS][WL_NUM_RATES_VHT]; /**< MCS0-9 */ } wl_bsstrans_rssi_rate_map_t; #define WL_CCA_CHAN_LOAD_VERSION_1 1 #define CCA_LOAD_MAP_MAX_TABLE_ENTRY 16u typedef struct wl_cca_chnl_load { uint8 cca; /* CCA value */ uint8 chnl_load; /* Channel load percent */ } wl_cca_chnl_load_t; /* CCA to Channel Load mapping */ typedef struct wl_cca_chnl_load_map { uint16 ver; uint16 len; /**< No of cca load levels */ wl_cca_chnl_load_t cca_load[CCA_LOAD_MAP_MAX_TABLE_ENTRY]; } wl_cca_chnl_load_map_t; #define WL_BSSTRANS_ROAMTHROTTLE_VERSION_1 1 /** Configure number of scans allowed per throttle period */ typedef struct wl_bsstrans_roamthrottle { uint16 ver; uint16 period; uint16 scans_allowed; } wl_bsstrans_roamthrottle_t; #define NFIFO 6 /**< # tx/rx fifopairs */ #ifndef NFIFO_EXT #if defined(BCM_AQM_DMA_DESC) && !defined(BCM_AQM_DMA_DESC_DISABLED) #if defined(LLW) && !defined(SWLLW) #define NFIFO_EXT 11 /* 4EDCA + 4 TWT + 1 Mcast/Bcast + 1 Spare + 1 LLQ */ #else #define NFIFO_EXT 10 /* 4EDCA + 4 TWT + 1 Mcast/Bcast + 1 Spare */ #endif #elif defined(WL11AX_TRIGGERQ) && !defined(WL11AX_TRIGGERQ_DISABLED) #define NFIFO_EXT 10 #else #define NFIFO_EXT NFIFO #endif /* BCM_AQM_DMA_DESC && !BCM_AQM_DMA_DESC_DISABLED */ #endif /* NFIFO_EXT */ /* When new reason codes are added to list, Please update wl_reinit_names also */ /* Reinit reason codes */ enum { WL_REINIT_RC_NONE = 0, WL_REINIT_RC_PS_SYNC = 1, WL_REINIT_RC_PSM_WD = 2, WL_REINIT_RC_MAC_WAKE = 3, WL_REINIT_RC_MAC_SUSPEND = 4, WL_REINIT_RC_MAC_SPIN_WAIT = 5, WL_REINIT_RC_AXI_BUS_ERROR = 6, WL_REINIT_RC_DEVICE_REMOVED = 7, WL_REINIT_RC_PCIE_FATAL_ERROR = 8, WL_REINIT_RC_OL_FW_TRAP = 9, WL_REINIT_RC_FIFO_ERR = 10, WL_REINIT_RC_INV_TX_STATUS = 11, WL_REINIT_RC_MQ_ERROR = 12, WL_REINIT_RC_PHYTXERR_THRESH = 13, WL_REINIT_RC_USER_FORCED = 14, WL_REINIT_RC_FULL_RESET = 15, WL_REINIT_RC_AP_BEACON = 16, WL_REINIT_RC_PM_EXCESSED = 17, WL_REINIT_RC_NO_CLK = 18, WL_REINIT_RC_SW_ASSERT = 19, WL_REINIT_RC_PSM_JMP0 = 20, WL_REINIT_RC_PSM_RUN = 21, WL_REINIT_RC_ENABLE_MAC = 22, WL_REINIT_RC_SCAN_TIMEOUT = 23, WL_REINIT_RC_JOIN_TIMEOUT = 24, /* Below error codes are generated during D3 exit validation */ WL_REINIT_RC_LINK_NOT_ACTIVE = 25, WL_REINIT_RC_PCI_CFG_RD_FAIL = 26, WL_REINIT_RC_INV_VEN_ID = 27, WL_REINIT_RC_INV_DEV_ID = 28, WL_REINIT_RC_INV_BAR0 = 29, WL_REINIT_RC_INV_BAR2 = 30, WL_REINIT_RC_AER_UC_FATAL = 31, WL_REINIT_RC_AER_UC_NON_FATAL = 32, WL_REINIT_RC_AER_CORR = 33, WL_REINIT_RC_AER_DEV_STS = 34, WL_REINIT_RC_PCIe_STS = 35, WL_REINIT_RC_MMIO_RD_FAIL = 36, WL_REINIT_RC_MMIO_RD_INVAL = 37, WL_REINIT_RC_MMIO_ARM_MEM_RD_FAIL = 38, WL_REINIT_RC_MMIO_ARM_MEM_INVAL = 39, WL_REINIT_RC_SROM_LOAD_FAILED = 40, WL_REINIT_RC_PHY_CRASH = 41, WL_REINIT_TX_STALL = 42, WL_REINIT_RC_TX_FLOW_CONTROL_BLOCKED = 43, WL_REINIT_RC_RX_HC_FAIL = 44, WL_REINIT_RC_RX_DMA_STALL = 45, WL_REINIT_UTRACE_BUF_OVERLAP_SR = 46, WL_REINIT_UTRACE_TPL_OUT_BOUNDS = 47, WL_REINIT_UTRACE_TPL_OSET_STRT0 = 48, WL_REINIT_RC_PHYTXERR = 49, WL_REINIT_RC_PSM_FATAL_SUSP = 50, WL_REINIT_RC_TX_FIFO_SUSP = 51, WL_REINIT_RC_MAC_ENABLE = 52, WL_REINIT_RC_SCAN_STALLED = 53, WL_REINIT_RC_PHY_HC = 54, WL_REINIT_RC_LAST, /* DONOT use this any more, kept for legacy reasons */ WL_REINIT_RC_RADIO_CRASH = 55, WL_REINIT_RC_SUPPORTED_LAST /* Use for app ONLY, DONOT use this in wlc code. * For wlc, use WL_REINIT_RC_VERSIONED_LAST */ }; #define WL_REINIT_RC_V2 (2u) #define WL_REINIT_RC_LAST_V2 (WL_REINIT_RC_RADIO_CRASH) #define WL_REINIT_RC_INVALID 255 #define NREINITREASONCOUNT 8 /* NREINITREASONCOUNT is 8 in other branches. * Any change to this will break wl tool compatibility with other branches * #define NREINITREASONCOUNT WL_REINIT_RC_LAST */ /* REINITRSNIDX is kept for legacy reasons. Use REINIT_RSN_IDX for new versioned structure */ #define REINITRSNIDX(_x) (((_x) < WL_REINIT_RC_LAST) ? (_x) : 0) #define REINIT_RSN_IDX(_x) (((_x) < WL_REINIT_RC_SUPPORTED_LAST) ? (_x) : 0) /* TBD: move * this to src */ #define REINIT_RSN_IDX_V2(_x) (((_x) <= WL_REINIT_RC_LAST_V2) ? (_x) : 0) #define WL_CNT_VERSION_6 6 #define WL_CNT_VERSION_7 7 #define WL_CNT_VERSION_11 11 #define WL_CNT_VERSION_XTLV 30 #define WL_COUNTERS_IOV_VERSION_1 1 #define WL_SUBCNTR_IOV_VER WL_COUNTERS_IOV_VERSION_1 /* First two uint16 are version and length fields. So offset of the first counter will be 4 */ #define FIRST_COUNTER_OFFSET 0x04 /* need for now due to src/wl/ndis automerged to other branches. e.g. BISON */ #define WLC_WITH_XTLV_CNT /* Number of xtlv info as required to calculate subcounter offsets */ #define WL_CNT_XTLV_ID_NUM 12 #define WL_TLV_IOV_VERSION_1 1u #define WL_TLV_IOV_VERSION_2 2u #define WL_TLV_DATASET_V2_LEN 2u /* First 32 bit - TLV type * Second 32 bit - TLV Len */ /** * tlv IDs uniquely identifies counter component * packed into wl_cmd_t container */ enum wl_cnt_xtlv_id { WL_CNT_XTLV_SLICE_IDX = 0x1, /**< Slice index */ WL_CNT_XTLV_WLC = 0x100, /**< WLC layer counters */ WL_CNT_XTLV_WLC_RINIT_RSN = 0x101, /**< WLC layer reinitreason extension: LEGACY */ WL_CNT_XTLV_WLC_HE = 0x102, /* he counters */ WL_CNT_XTLV_WLC_SECVLN = 0x103, /* security vulnerabilities counters */ WL_CNT_XTLV_WLC_HE_OMI = 0x104, /* he omi counters */ WL_CNT_XTLV_WLC_RINIT_RSN_V2 = 0x105, /**< WLC layer reinitreason extension */ WL_CNT_XTLV_WLC_MESH_PKT_V1 = 0x106, /**< WLC layer Mesh pkt counters */ WL_CNT_XTLV_CNTV_LE10_UCODE = 0x200, /**< wl counter ver < 11 UCODE MACSTAT */ WL_CNT_XTLV_LT40_UCODE_V1 = 0x300, /**< corerev < 40 UCODE MACSTAT */ WL_CNT_XTLV_GE40_UCODE_V1 = 0x400, /**< corerev >= 40 UCODE MACSTAT */ WL_CNT_XTLV_GE64_UCODEX_V1 = 0x800, /* corerev >= 64 UCODEX MACSTAT */ WL_CNT_XTLV_GE80_UCODE_V1 = 0x900, /* corerev >= 80 UCODEX MACSTAT */ WL_CNT_XTLV_GE80_RXERR_UCODE_V1 = 0x901, /* corerev >= 80 UCODE RXERR mac stat */ WL_CNT_XTLV_GE80_TXFUNFL_UCODE_V1 = 0x1000, /* corerev >= 80 UCODEX MACSTAT */ WL_CNT_XTLV_GE88_UCODE_TX_V1 = 0x1001, /* corerev >= 88 ucode macstats V1 - tx */ WL_CNT_XTLV_GE88_UCODE_RX_V1 = 0x1002, /* corerev >= 88 ucode macstats V1 - rx */ WL_CNT_XTLV_GE88_UCODE_TX_V2 = 0x1003, /* corerev >= 88 ucode macstats V2 - tx */ WL_CNT_XTLV_GE88_UCODE_RX_V2 = 0x1004, /* corerev >= 88 ucode macstats V2 - rx */ WL_CNT_XTLV_GE88_UCODE_TX_U32_V1 = 0x1005, /* corerev >= 88 ucode macstats V1 - tx */ WL_CNT_XTLV_GE88_UCODE_RX_U32_V1 = 0x1006, /* corerev >= 88 ucode macstats V1 - rx */ }; /* tlv IDs uniquely identifies periodic state component */ enum wl_periodic_slice_state_xtlv_id { WL_STATE_COMPACT_COUNTERS = 0x1, WL_STATE_TXBF_COUNTERS = 0x2, WL_STATE_COMPACT_HE_COUNTERS = 0x3 }; /* Sub tlvs for chan_counters */ enum wl_periodic_chan_xtlv_id { WL_CHAN_GENERIC_COUNTERS = 0x1, WL_CHAN_PERIODIC_COUNTERS = 0x2 }; #ifdef WLC_CHAN_ECNTR_TEST #define WL_CHAN_PERIODIC_CNTRS_VER_1 1 typedef struct wlc_chan_periodic_cntr { uint16 version; uint16 PAD; uint32 rxstrt; } wlc_chan_periodic_cntr_t; #endif /* WLC_CHAN_ECNTR_TEST */ #define WL_CHANCNTR_HDR_VER_1 1 typedef struct wlc_chan_cntr_hdr_v1 { uint16 version; uint16 PAD; chanspec_t chanspec; /* Dont add any fields above this */ uint16 PAD; uint32 total_time; uint32 chan_entry_cnt; } wlc_chan_cntr_hdr_v1_t; /* tlv IDs uniquely identifies periodic state component */ enum wl_periodic_if_state_xtlv_id { WL_STATE_IF_COMPACT_STATE = 0x1, WL_STATE_IF_ADPS_STATE = 0x02, WL_STATE_IF_ADPS_ENERGY_GAIN = 0x03 }; enum wl_periodic_tdls_if_state_xtlv_id { WL_STATE_IF_TDLS_STATE = 0x1 }; #define TDMTX_CNT_VERSION_V1 1 #define TDMTX_CNT_VERSION_V2 2 /* structure holding tdm counters that interface to iovar */ typedef struct tdmtx_cnt_v1 { uint16 ver; uint16 length; /* length of this structure */ uint16 wlc_idx; /* index for wlc */ uint16 enabled; /* tdmtx is enabled on slice */ uint32 tdmtx_txa_on; /* TXA on requests */ uint32 tdmtx_txa_tmcnt; /* Total number of TXA timeout */ uint32 tdmtx_por_on; /* TXA POR requests */ uint32 tdmtx_txpuen; /* Path enable requests */ uint32 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ uint32 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ uint32 tdmtx_txdefer; /* Total number of times Tx was deferred on the slice */ uint32 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ uint32 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ uint32 tdmtx_txa_dur; /* Total time txa on */ uint32 tdmtx_txpri_dur; /* Total time TXPri */ uint32 tdmtx_txdefer_dur; /* Total time txdefer */ /* TDMTX input fields */ uint32 tdmtx_txpri; uint32 tdmtx_defer; uint32 tdmtx_threshold; uint32 tdmtx_rssi_threshold; uint32 tdmtx_txpwrboff; uint32 tdmtx_txpwrboff_dt; } tdmtx_cnt_v1_t; typedef struct { uint16 ver; uint16 length; /* length of the data portion */ uint16 cnt; uint16 PAD; /* pad to align to 32 bit */ uint8 data[]; /* array of tdmtx_cnt_v1_t */ } tdmtx_status_t; /* structure holding counters that match exactly shm field sizes */ typedef struct tdmtx_cnt_shm_v1 { uint16 tdmtx_txa_on; /* TXA on requests */ uint16 tdmtx_tmcnt; /* TXA on requests */ uint16 tdmtx_por_on; /* TXA POR requests */ uint16 tdmtx_txpuen; /* Path enable requests */ uint16 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ uint16 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ uint16 tdmtx_txdefer; /* Total number of times Tx was defered by the slice */ uint16 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ uint16 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ uint16 tdmtx_txa_dur_l; /* Total time (low 16 bits) txa on */ uint16 tdmtx_txa_dur_h; /* Total time (low 16 bits) txa on */ uint16 tdmtx_txpri_dur_l; /* Total time (low 16 bits) TXPri */ uint16 tdmtx_txpri_dur_h; /* Total time (high 16 bits) TXPri */ uint16 tdmtx_txdefer_dur_l; /* Total time (low 16 bits) txdefer */ uint16 tdmtx_txdefer_dur_h; /* Total time (high 16 bits) txdefer */ } tdmtx_cnt_shm_v1_t; /* structure holding tdm counters that interface to iovar for version 2 */ typedef struct tdmtx_cnt_v2 { uint16 ver; uint16 length; /* length of this structure */ uint16 wlc_idx; /* index for wlc */ uint16 enabled; /* tdmtx is enabled on slice */ uint32 tdmtx_txa_on; /* TXA on requests */ uint32 tdmtx_txa_tmcnt; /* Total number of TXA timeout */ uint32 tdmtx_porhi_on; /* TXA PORHI requests */ uint32 tdmtx_porlo_on; /* TXA PORLO requests */ uint32 tdmtx_txpuen; /* Path enable requests */ uint32 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ uint32 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ uint32 tdmtx_txdefer; /* Total number of times Tx was deferred on the slice */ uint32 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ uint32 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ uint32 tdmtx_txa_dur; /* Total time txa on */ uint32 tdmtx_txpri_dur; /* Total time TXPri */ uint32 tdmtx_txdefer_dur; /* Total time txdefer */ /* TDMTX input fields */ uint32 tdmtx_txpri; uint32 tdmtx_defer; uint32 tdmtx_threshold; uint32 tdmtx_rssi_threshold; uint32 tdmtx_txpwrboff; uint32 tdmtx_txpwrboff_dt; } tdmtx_cnt_v2_t; /* structure holding counters that match exactly shm field sizes */ typedef struct tdmtx_cnt_shm_v2 { uint16 tdmtx_txa_on; /* TXA on requests */ uint16 tdmtx_tmcnt; /* TXA on requests */ uint16 tdmtx_porhi_on; /* TXA PORHI requests */ uint16 tdmtx_porlo_on; /* TXA PORLO requests */ uint16 tdmtx_txpuen; /* Path enable requests */ uint16 tdmtx_txpudis; /* Total number of times Tx path is muted on the slice */ uint16 tdmtx_txpri_on; /* Total number of times Tx priority was obtained by the slice */ uint16 tdmtx_txdefer; /* Total number of times Tx was defered by the slice */ uint16 tdmtx_txmute; /* Total number of times active Tx muted on the slice */ uint16 tdmtx_actpwrboff; /* Total number of times TX power is backed off by the slice */ uint16 tdmtx_txa_dur_l; /* Total time (low 16 bits) txa on */ uint16 tdmtx_txa_dur_h; /* Total time (low 16 bits) txa on */ uint16 tdmtx_txpri_dur_l; /* Total time (low 16 bits) TXPri */ uint16 tdmtx_txpri_dur_h; /* Total time (high 16 bits) TXPri */ uint16 tdmtx_txdefer_dur_l; /* Total time (low 16 bits) txdefer */ uint16 tdmtx_txdefer_dur_h; /* Total time (high 16 bits) txdefer */ } tdmtx_cnt_shm_v2_t; typedef struct wl_tdmtx_ioc { uint16 id; /* ID of the sub-command */ uint16 len; /* total length of all data[] */ uint8 data[]; /* var len payload */ } wl_tdmtx_ioc_t; /* * iovar subcommand ids */ enum { IOV_TDMTX_ENB = 1, IOV_TDMTX_STATUS = 2, IOV_TDMTX_TXPRI = 3, IOV_TDMTX_DEFER = 4, IOV_TDMTX_TXA = 5, IOV_TDMTX_CFG = 6, IOV_TDMTX_LAST }; /* iovar structure for beacon simulator */ typedef struct wl_bcnsim_ioc { uint16 id; /* ID of the sub-command */ uint16 len; /* total length of all data[] */ uint8 data[]; /* var len payload */ } wl_bcnsim_ioc_t; /* iovar subcmd ids */ enum { IOV_BCNSIM_ENB = 1, IOV_BCNSIM_ERRMAX = 2, IOV_BCNSIM_ERRDSTRB = 3, IOV_BCNSIM_DRIFT = 4, IOV_BCNSIM_RNDLYMAX = 5, IOV_BCNSIM_RNDDLY_DSTRB = 6, IOV_BCNSIM_CONSDLY = 7, IOV_BCNSIM_OMT_PROB = 8, IOV_BCNSIM_OMT_MIN_N = 9, IOV_BCNSIM_OMT_MAX_N = 10, IOV_BCNSIM_OMT_DSTRB = 11, IOV_BCNSIM_TSF_JUMP = 12, IOV_BCNSIM_PATTERN = 13, IOV_BCNSIM_STATUS = 14, IOV_BCNSIM_AUTH = 15, IOV_BCNSIM_RNDDLY_PROB = 16, IOV_BCNSIM_LAST }; /* tlv id for beacon simulator */ enum wl_bcnsim_xtlv_id { WL_BCNSIM_XTLV_ENABLE = 0x1, WL_BCNSIM_XTLV_ERRMAX = 0x2, WL_BCNSIM_XTLV_ERRDSTRB = 0x3, WL_BCNSIM_XTLV_DRIFT = 0x4, WL_BCNSIM_XTLV_RNDLYMAX = 0x5, WL_BCNSIM_XTLV_RNDDLY_DSTRB = 0x6, WL_BCNSIM_XTLV_CONSDLY = 0x7, WL_BCNSIM_XTLV_OMT_PROB = 0x8, WL_BCNSIM_XTLV_OMT_MIN_N = 0x9, WL_BCNSIM_XTLV_OMT_MAX_N = 0xa, WL_BCNSIM_XTLV_OMT_DSTRB = 0xb, WL_BCNSIM_XTLV_TSF_JUMP = 0xc, WL_BCNSIM_XTLV_PATTERN = 0xd, WL_BCNSIM_XTLV_STATUS = 0xe, WL_BCNSIM_XTLV_AUTH = 0xf, WL_BCNSIM_XTLV_RNDDLY_PROB = 0x10 }; /* structure to store different pattern params */ typedef struct wlc_bcnsim_bcn_diff_v1 { uint16 version; uint16 dtim_cnt; uint32 tx_delta; uint32 ts_delta; } wlc_bcnsim_bcn_diff_v1_t; /* structure to store/pass pattern */ typedef struct wlc_bcnsim_pattern_info_v1 { uint16 version; uint16 pattern_count; uint16 current_pos; uint16 PAD; wlc_bcnsim_bcn_diff_v1_t bcnsim_bcn_diff[]; } wlc_bcnsim_pattern_info_v1_t; /* struct to store bcn sim status */ typedef struct bcnsim_status_v1 { uint16 ver; uint16 length; /* length of this structure */ uint32 rnd_delay_max; /* random delay */ int32 const_delay; /* cons delay */ int32 tsf_jump; /* change tsf */ int16 drift; /* add drift */ uint16 error_max; /* max error */ uint8 error_dstrb; /* error dstrb */ uint8 rnd_delay_dstrb; /* rnd delay distr */ uint8 rnd_delay_prob; /* random delay prob */ uint8 omit_prob; /* control omit prob */ uint8 omit_min_n; /* min omit */ uint8 omit_max_n; /* max omit */ uint8 omit_dstrb; /* omit dstrb % */ uint8 PAD; } bcnsim_status_v1_t; /* SFLASH iovar sub commands */ #define WL_SFLASH_IOV_VERSION_V1 1u enum wl_sflash_subcmd_id { WL_SFLASH_SUBCMD_CALWRITE = 0, WL_SFLASH_SUBCMD_CALERASE = 1u, WL_SFLASH_SUBCMD_WRITE = 2u, WL_SFLASH_SUBCMD_ERASE = 3u, WL_SFLASH_SUBCMD_DUMP = 4u, WL_SFLASH_SUBCMD_DATASIZE = 5u, WL_SFLASH_SUBCMD_SIZE = 6u, WL_SFLASH_SUBCMD_READ = 7u }; /** * The number of variables in wl macstat cnt struct. * (wl_cnt_ge40mcst_v1_t, wl_cnt_lt40mcst_v1_t, wl_cnt_v_le10_mcst_t) */ #define WL_CNT_MCST_VAR_NUM 64 /* sizeof(wl_cnt_ge40mcst_v1_t), sizeof(wl_cnt_lt40mcst_v1_t), and sizeof(wl_cnt_v_le10_mcst_t) */ #define WL_CNT_MCST_STRUCT_SZ ((uint32)sizeof(uint32) * WL_CNT_MCST_VAR_NUM) #define WL_CNT_REV80_MCST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge80mcst_v1_t)) #define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ \ ((uint32)OFFSETOF(wl_cnt_ge80_txfunfl_v1_t, txfunfl)) #define WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(fcnt) \ (WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_FIXED_SZ + (fcnt * sizeof(uint32))) #define WL_CNT_REV80_MCST_TXFUNFlW_STRUCT_SZ (WL_CNT_REV80_MCST_TXFUNFl_STRUCT_SZ(NFIFO_EXT)) #define WL_CNT_REV80_RXERR_MCST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge80_rxerr_mcst_v1_t)) #define WL_CNT_MCXST_STRUCT_SZ ((uint32)sizeof(wl_cnt_ge64mcxst_v1_t)) #define WL_CNT_HE_STRUCT_V5_SZ ((uint32)sizeof(wl_he_cnt_wlc_v5_t)) #define WL_CNT_SECVLN_STRUCT_SZ ((uint32)sizeof(wl_secvln_cnt_t)) #define WL_CNT_HE_OMI_STRUCT_SZ ((uint32)sizeof(wl_he_omi_cnt_wlc_v1_t)) #define INVALID_CNT_VAL (uint32)(-1) #define WL_XTLV_CNTBUF_MAX_SIZE ((uint32)(OFFSETOF(wl_cnt_info_t, data)) + \ (uint32)BCM_XTLV_HDR_SIZE + (uint32)sizeof(wl_cnt_wlc_t) + \ (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCST_STRUCT_SZ + \ (uint32)BCM_XTLV_HDR_SIZE + WL_CNT_MCXST_STRUCT_SZ) #define WL_CNTBUF_MAX_SIZE MAX(WL_XTLV_CNTBUF_MAX_SIZE, (uint32)sizeof(wl_cnt_ver_11_t)) /** Top structure of counters IOVar buffer */ typedef struct { uint16 version; /**< see definition of WL_CNT_T_VERSION */ uint16 datalen; /**< length of data including all paddings. */ uint8 data []; /**< variable length payload: * 1 or more bcm_xtlv_t type of tuples. * each tuple is padded to multiple of 4 bytes. * 'datalen' field of this structure includes all paddings. */ } wl_cnt_info_t; /* Top structure of subcounters IOVar buffer * Whenever we make any change in this structure * WL_SUBCNTR_IOV_VER should be updated accordingly * The structure definition should remain consistant b/w * FW and wl/WLM app. */ typedef struct { uint16 version; /* Version of IOVAR structure. Used for backward * compatibility in future. Whenever we make any * changes to this structure then value of WL_SUBCNTR_IOV_VER * needs to be updated properly. */ uint16 length; /* length in bytes of this structure */ uint16 counters_version; /* see definition of WL_CNT_T_VERSION * wl app will send the version of counters * which is used to calculate the offset of counters. * It must match the version of counters FW is using * else FW will return error with his version of counters * set in this field. */ uint16 num_subcounters; /* Number of counter offset passed by wl app to FW. */ uint32 data[BCM_FLEX_ARRAY]; /* variable length payload: * Offsets to the counters will be passed to FW * throught this data field. FW will return the value of counters * at the offsets passed by wl app in this fiels itself. */ } wl_subcnt_info_t; /* Top structure of counters TLV version IOVar buffer * The structure definition should remain consistant b/w * FW and wl/WLM app. */ typedef struct { uint16 version; /* Version of IOVAR structure. Added for backward * compatibility feature. If any changes are done, * WL_TLV_IOV_VER need to be updated. */ uint16 length; /* total len in bytes of this structure + payload */ uint16 counters_version; /* See definition of WL_CNT_VERSION_XTLV * wl app will update counter tlv version to be used * so to calculate offset of supported TLVs. * If there is a mismatch in the version, FW will update an error */ uint16 num_tlv; /* Max number of TLV info passed by FW to WL app. * and vice-versa */ uint32 data[]; /* variable length payload: * This stores the tlv as supported by F/W to the wl app. * This table is required to compute subcounter offsets at WLapp end. */ } wl_cntr_tlv_info_t; /** wlc layer counters */ typedef struct { /* transmit stat counters */ uint32 txframe; /**< tx data frames */ uint32 txbyte; /**< tx data bytes */ uint32 txretrans; /**< tx mac retransmits */ uint32 txerror; /**< tx data errors (derived: sum of others) */ uint32 txctl; /**< tx management frames */ uint32 txprshort; /**< tx short preamble frames */ uint32 txserr; /**< tx status errors */ uint32 txnobuf; /**< tx out of buffers errors */ uint32 txnoassoc; /**< tx discard because we're not associated */ uint32 txrunt; /**< tx runt frames */ uint32 txchit; /**< tx header cache hit (fastpath) */ uint32 txcmiss; /**< tx header cache miss (slowpath) */ /* transmit chip error counters */ uint32 txuflo; /**< tx fifo underflows */ uint32 txphyerr; /**< tx phy errors (indicated in tx status) */ uint32 txphycrs; /**< PR8861/8963 counter */ /* receive stat counters */ uint32 rxframe; /**< rx data frames */ uint32 rxbyte; /**< rx data bytes */ uint32 rxerror; /**< rx data errors (derived: sum of others) */ uint32 rxctl; /**< rx management frames */ uint32 rxnobuf; /**< rx out of buffers errors */ uint32 rxnondata; /**< rx non data frames in the data channel errors */ uint32 rxbadds; /**< rx bad DS errors */ uint32 rxbadcm; /**< rx bad control or management frames */ uint32 rxfragerr; /**< rx fragmentation errors */ uint32 rxrunt; /**< rx runt frames */ uint32 rxgiant; /**< rx giant frames */ uint32 rxnoscb; /**< rx no scb error */ uint32 rxbadproto; /**< rx invalid frames */ uint32 rxbadsrcmac; /**< rx frames with Invalid Src Mac */ uint32 rxbadda; /**< rx frames tossed for invalid da */ uint32 rxfilter; /**< rx frames filtered out */ /* receive chip error counters */ uint32 rxoflo; /**< rx fifo overflow errors */ uint32 rxuflo[NFIFO]; /**< rx dma descriptor underflow errors */ uint32 d11cnt_txrts_off; /**< d11cnt txrts value when reset d11cnt */ uint32 d11cnt_rxcrc_off; /**< d11cnt rxcrc value when reset d11cnt */ uint32 d11cnt_txnocts_off; /**< d11cnt txnocts value when reset d11cnt */ /* misc counters */ uint32 dmade; /**< tx/rx dma descriptor errors */ uint32 dmada; /**< tx/rx dma data errors */ uint32 dmape; /**< tx/rx dma descriptor protocol errors */ uint32 reset; /**< reset count */ uint32 tbtt; /**< cnts the TBTT int's */ uint32 txdmawar; /**< # occurrences of PR15420 workaround */ uint32 pkt_callback_reg_fail; /**< callbacks register failure */ /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ uint32 txfrag; /**< dot11TransmittedFragmentCount */ uint32 txmulti; /**< dot11MulticastTransmittedFrameCount */ uint32 txfail; /**< dot11FailedCount */ uint32 txretry; /**< dot11RetryCount */ uint32 txretrie; /**< dot11MultipleRetryCount */ uint32 rxdup; /**< dot11FrameduplicateCount */ uint32 txrts; /**< dot11RTSSuccessCount */ uint32 txnocts; /**< dot11RTSFailureCount */ uint32 txnoack; /**< dot11ACKFailureCount */ uint32 rxfrag; /**< dot11ReceivedFragmentCount */ uint32 rxmulti; /**< dot11MulticastReceivedFrameCount */ uint32 rxcrc; /**< dot11FCSErrorCount */ uint32 txfrmsnt; /**< dot11TransmittedFrameCount (bogus MIB?) */ uint32 rxundec; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay; /**< TKIPReplays */ uint32 ccmpfmterr; /**< CCMPFormatErrors */ uint32 ccmpreplay; /**< CCMPReplays */ uint32 ccmpundec; /**< CCMPDecryptErrors */ uint32 fourwayfail; /**< FourWayHandshakeFailures */ uint32 wepundec; /**< dot11WEPUndecryptableCount */ uint32 wepicverr; /**< dot11WEPICVErrorCount */ uint32 decsuccess; /**< DecryptSuccessCount */ uint32 tkipicverr; /**< TKIPICVErrorCount */ uint32 wepexcluded; /**< dot11WEPExcludedCount */ uint32 txchanrej; /**< Tx frames suppressed due to channel rejection */ uint32 psmwds; /**< Count PSM watchdogs */ uint32 phywatchdog; /**< Count Phy watchdogs (triggered by ucode) */ /* MBSS counters, AP only */ uint32 prq_entries_handled; /**< PRQ entries read in */ uint32 prq_undirected_entries; /**< which were bcast bss & ssid */ uint32 prq_bad_entries; /**< which could not be translated to info */ uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ /* per-rate receive stat counters */ uint32 rx1mbps; /**< packets rx at 1Mbps */ uint32 rx2mbps; /**< packets rx at 2Mbps */ uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ uint32 rx6mbps; /**< packets rx at 6Mbps */ uint32 rx9mbps; /**< packets rx at 9Mbps */ uint32 rx11mbps; /**< packets rx at 11Mbps */ uint32 rx12mbps; /**< packets rx at 12Mbps */ uint32 rx18mbps; /**< packets rx at 18Mbps */ uint32 rx24mbps; /**< packets rx at 24Mbps */ uint32 rx36mbps; /**< packets rx at 36Mbps */ uint32 rx48mbps; /**< packets rx at 48Mbps */ uint32 rx54mbps; /**< packets rx at 54Mbps */ uint32 rx108mbps; /**< packets rx at 108mbps */ uint32 rx162mbps; /**< packets rx at 162mbps */ uint32 rx216mbps; /**< packets rx at 216 mbps */ uint32 rx270mbps; /**< packets rx at 270 mbps */ uint32 rx324mbps; /**< packets rx at 324 mbps */ uint32 rx378mbps; /**< packets rx at 378 mbps */ uint32 rx432mbps; /**< packets rx at 432 mbps */ uint32 rx486mbps; /**< packets rx at 486 mbps */ uint32 rx540mbps; /**< packets rx at 540 mbps */ uint32 rfdisable; /**< count of radio disables */ uint32 txexptime; /**< Tx frames suppressed due to timer expiration */ uint32 txmpdu_sgi; /**< count for sgi transmit */ uint32 rxmpdu_sgi; /**< count for sgi received */ uint32 txmpdu_stbc; /**< count for stbc transmit */ uint32 rxmpdu_stbc; /**< count for stbc received */ uint32 rxundec_mcst; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill_mcst; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr_mcst; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay_mcst; /**< TKIPReplays */ uint32 ccmpfmterr_mcst; /**< CCMPFormatErrors */ uint32 ccmpreplay_mcst; /**< CCMPReplays */ uint32 ccmpundec_mcst; /**< CCMPDecryptErrors */ uint32 fourwayfail_mcst; /**< FourWayHandshakeFailures */ uint32 wepundec_mcst; /**< dot11WEPUndecryptableCount */ uint32 wepicverr_mcst; /**< dot11WEPICVErrorCount */ uint32 decsuccess_mcst; /**< DecryptSuccessCount */ uint32 tkipicverr_mcst; /**< TKIPICVErrorCount */ uint32 wepexcluded_mcst; /**< dot11WEPExcludedCount */ uint32 dma_hang; /**< count for dma hang */ uint32 reinit; /**< count for reinit */ uint32 pstatxucast; /**< count of ucast frames xmitted on all psta assoc */ uint32 pstatxnoassoc; /**< count of txnoassoc frames xmitted on all psta assoc */ uint32 pstarxucast; /**< count of ucast frames received on all psta assoc */ uint32 pstarxbcmc; /**< count of bcmc frames received on all psta */ uint32 pstatxbcmc; /**< count of bcmc frames transmitted on all psta */ uint32 cso_passthrough; /**< hw cso required but passthrough */ uint32 cso_normal; /**< hw cso hdr for normal process */ uint32 chained; /**< number of frames chained */ uint32 chainedsz1; /**< number of chain size 1 frames */ uint32 unchained; /**< number of frames not chained */ uint32 maxchainsz; /**< max chain size so far */ uint32 currchainsz; /**< current chain size */ uint32 pciereset; /**< Secondary Bus Reset issued by driver */ uint32 cfgrestore; /**< configspace restore by driver */ uint32 reinitreason[NREINITREASONCOUNT]; /**< reinitreason counters; 0: Unknown reason */ uint32 rxrtry; uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ /* detailed control/management frames */ uint32 txbar; /**< Number of TX BAR */ uint32 rxbar; /**< Number of RX BAR */ uint32 txpspoll; /**< Number of TX PS-poll */ uint32 rxpspoll; /**< Number of RX PS-poll */ uint32 txnull; /**< Number of TX NULL_DATA */ uint32 rxnull; /**< Number of RX NULL_DATA */ uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ uint32 txassocreq; /**< Number of TX ASSOC request */ uint32 rxassocreq; /**< Number of RX ASSOC request */ uint32 txreassocreq; /**< Number of TX REASSOC request */ uint32 rxreassocreq; /**< Number of RX REASSOC request */ uint32 txdisassoc; /**< Number of TX DISASSOC */ uint32 rxdisassoc; /**< Number of RX DISASSOC */ uint32 txassocrsp; /**< Number of TX ASSOC response */ uint32 rxassocrsp; /**< Number of RX ASSOC response */ uint32 txreassocrsp; /**< Number of TX REASSOC response */ uint32 rxreassocrsp; /**< Number of RX REASSOC response */ uint32 txauth; /**< Number of TX AUTH */ uint32 rxauth; /**< Number of RX AUTH */ uint32 txdeauth; /**< Number of TX DEAUTH */ uint32 rxdeauth; /**< Number of RX DEAUTH */ uint32 txprobereq; /**< Number of TX probe request */ uint32 rxprobereq; /**< Number of RX probe request */ uint32 txprobersp; /**< Number of TX probe response */ uint32 rxprobersp; /**< Number of RX probe response */ uint32 txaction; /**< Number of TX action frame */ uint32 rxaction; /**< Number of RX action frame */ uint32 ampdu_wds; /**< Number of AMPDU watchdogs */ uint32 txlost; /**< Number of lost packets reported in txs */ uint32 txdatamcast; /**< Number of TX multicast data packets */ uint32 txdatabcast; /**< Number of TX broadcast data packets */ uint32 psmxwds; /**< Number of PSMx watchdogs */ uint32 rxback; uint32 txback; uint32 p2p_tbtt; /**< Number of P2P TBTT Events */ uint32 p2p_tbtt_miss; /**< Number of P2P TBTT Events Miss */ uint32 txqueue_start; uint32 txqueue_end; uint32 txbcast; /* Broadcast TransmittedFrameCount */ uint32 txdropped; /* tx dropped pkts */ uint32 rxbcast; /* BroadcastReceivedFrameCount */ uint32 rxdropped; /* rx dropped pkts (derived: sum of others) */ uint32 txq_end_assoccb; /* forced txqueue_end callback fired in assoc */ uint32 tx_toss_cnt; /* number of tx packets tossed */ uint32 rx_toss_cnt; /* number of rx packets tossed */ uint32 last_tx_toss_rsn; /* reason because of which last tx pkt tossed */ uint32 last_rx_toss_rsn; /* reason because of which last rx pkt tossed */ uint32 pmk_badlen_cnt; /* number of invalid pmk len */ uint32 txbar_notx; /* number of TX BAR not sent (maybe supressed or muted) */ uint32 txbar_noack; /* number of TX BAR sent, but not acknowledged by peer */ uint32 rxfrag_agedout; /**< # of aged out rx fragmentation */ uint32 pmkid_mismatch_cnt; /* number of EAPOL msg1 PMKID mismatch */ uint32 txaction_vndr_attempt; /* Number of VS AFs scheduled successfully for Tx */ uint32 txaction_vndr_fail; /* Number of VS AFs not sent or not acked */ uint32 rxnofrag; /* # of nobuf failure due to no pkt availability */ uint32 rxnocmplid; /* # of nobuf failure due to rxcmplid non-availability */ uint32 rxnohaddr; /* # of nobuf failure due to host address non-availability */ uint32 txnull_pm; /**< Number of TX NULL_DATA total */ uint32 txnull_pm_succ; /**< Number of TX NULL_DATA successes */ uint32 ccmpreplay_qosdata_nobapol_rxretry; /**< Retried QOS data MPDUs RX without * BA policy and tossed by key mgmt as * replays */ uint32 txnoalfdatabuf; /**< out of alfrag data buffers errors */ uint32 txalfdatabuf; /**< number of tx alfrag data buffers attepted for transmission */ uint32 txalfrag; /**< number of txalfrags attepted for transmission */ uint32 txlfrag; /**< number of txlfrags attepted for transmission */ uint32 rxunsolicitedproberesp; /**< number of "unsoliocited" probe responses RXed */ /* Do not remove or rename in the middle of this struct. * All counter variables have to be of uint32. */ } wl_cnt_wlc_t; /* he counters Version 1 */ #define HE_COUNTERS_V1 (1) typedef struct wl_he_cnt_wlc_v1 { uint32 he_rxtrig_myaid; uint32 he_rxtrig_rand; uint32 he_colormiss_cnt; uint32 he_txmampdu; uint32 he_txmtid_back; uint32 he_rxmtid_back; uint32 he_rxmsta_back; uint32 he_txfrag; uint32 he_rxdefrag; uint32 he_txtrig; uint32 he_rxtrig_basic; uint32 he_rxtrig_murts; uint32 he_rxtrig_bsrp; uint32 he_rxdlmu; uint32 he_physu_rx; uint32 he_phyru_rx; uint32 he_txtbppdu; } wl_he_cnt_wlc_v1_t; /* he counters Version 2 */ #define HE_COUNTERS_V2 (2) typedef struct wl_he_cnt_wlc_v2 { uint16 version; uint16 len; uint32 he_rxtrig_myaid; /**< rxed valid trigger frame with myaid */ uint32 he_rxtrig_rand; /**< rxed valid trigger frame with random aid */ uint32 he_colormiss_cnt; /**< for bss color mismatch cases */ uint32 he_txmampdu; /**< for multi-TID AMPDU transmission */ uint32 he_txmtid_back; /**< for multi-TID BACK transmission */ uint32 he_rxmtid_back; /**< reception of multi-TID BACK */ uint32 he_rxmsta_back; /**< reception of multi-STA BACK */ uint32 he_txfrag; /**< transmission of Dynamic fragmented packets */ uint32 he_rxdefrag; /**< reception of dynamic fragmented packets */ uint32 he_txtrig; /**< transmission of trigger frames */ uint32 he_rxtrig_basic; /**< reception of basic trigger frame */ uint32 he_rxtrig_murts; /**< reception of MU-RTS trigger frame */ uint32 he_rxtrig_bsrp; /**< reception of BSR poll trigger frame */ uint32 he_rxdlmu; /**< reception of DL MU PPDU */ uint32 he_physu_rx; /**< reception of SU frame */ uint32 he_phyru_rx; /**< reception of RU frame */ uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ uint32 he_null_tbppdu; /**< null TB PPDU's sent as a response to basic trigger frame */ } wl_he_cnt_wlc_v2_t; /* he counters Version 3 */ #define WL_RU_TYPE_MAX 6 #define HE_COUNTERS_V3 (3) typedef struct wl_he_cnt_wlc_v3 { uint16 version; uint16 len; uint32 he_rxtrig_myaid; /**< rxed valid trigger frame with myaid */ uint32 he_rxtrig_rand; /**< rxed valid trigger frame with random aid */ uint32 he_colormiss_cnt; /**< for bss color mismatch cases */ uint32 he_txmampdu; /**< for multi-TID AMPDU transmission */ uint32 he_txmtid_back; /**< for multi-TID BACK transmission */ uint32 he_rxmtid_back; /**< reception of multi-TID BACK */ uint32 he_rxmsta_back; /**< reception of multi-STA BACK */ uint32 he_txfrag; /**< transmission of Dynamic fragmented packets */ uint32 he_rxdefrag; /**< reception of dynamic fragmented packets */ uint32 he_txtrig; /**< transmission of trigger frames */ uint32 he_rxtrig_basic; /**< reception of basic trigger frame */ uint32 he_rxtrig_murts; /**< reception of MU-RTS trigger frame */ uint32 he_rxtrig_bsrp; /**< reception of BSR poll trigger frame */ uint32 he_rxhemuppdu_cnt; /**< rxing HE MU PPDU */ uint32 he_physu_rx; /**< reception of SU frame */ uint32 he_phyru_rx; /**< reception of RU frame */ uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ uint32 he_null_tbppdu; /**< null TB PPDU's sent as a response to basic trigger frame */ uint32 he_rxhesuppdu_cnt; /**< rxing SU PPDU */ uint32 he_rxhesureppdu_cnt; /**< rxing Range Extension(RE) SU PPDU */ uint32 he_null_zero_agg; /**< null AMPDU's transmitted in response to basic trigger * because of zero aggregation */ uint32 he_null_bsrp_rsp; /**< null AMPDU's txed in response to BSR poll */ uint32 he_null_fifo_empty; /**< null AMPDU's in response to basic trigger * because of no frames in fifo's */ uint32 he_myAID_cnt; uint32 he_rxtrig_bfm_cnt; uint32 he_rxtrig_mubar; uint32 rxheru[WL_RU_TYPE_MAX]; /**< HE of rx pkts */ uint32 txheru[WL_RU_TYPE_MAX]; uint32 he_mgmt_tbppdu; uint32 he_cs_req_tx_cancel; uint32 he_wrong_nss; uint32 he_trig_unsupp_rate; uint32 he_rxtrig_nfrp; uint32 he_rxtrig_bqrp; uint32 he_rxtrig_gcrmubar; uint32 he_txtbppdu_cnt[AC_COUNT]; } wl_he_cnt_wlc_v3_t; /* he counters Version 4 */ #define HE_COUNTERS_V4 (4) typedef struct wl_he_cnt_wlc_v4 { uint16 version; uint16 len; uint32 he_rxtrig_myaid; /**< rxed valid trigger frame with myaid */ uint32 he_rxtrig_rand; /**< rxed valid trigger frame with random aid */ uint32 he_colormiss_cnt; /**< for bss color mismatch cases */ uint32 he_txmampdu; /**< for multi-TID AMPDU transmission */ uint32 he_txmtid_back; /**< for multi-TID BACK transmission */ uint32 he_rxmtid_back; /**< reception of multi-TID BACK */ uint32 he_rxmsta_back; /**< reception of multi-STA BACK */ uint32 he_txfrag; /**< transmission of Dynamic fragmented packets */ uint32 he_rxdefrag; /**< reception of dynamic fragmented packets */ uint32 he_txtrig; /**< transmission of trigger frames */ uint32 he_rxtrig_basic; /**< reception of basic trigger frame */ uint32 he_rxtrig_murts; /**< reception of MU-RTS trigger frame */ uint32 he_rxtrig_bsrp; /**< reception of BSR poll trigger frame */ uint32 he_rxtsrt_hemuppdu_cnt; /**< rxing HE MU PPDU */ uint32 he_physu_rx; /**< reception of SU frame */ uint32 he_phyru_rx; /**< reception of RU frame */ uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ uint32 he_null_tbppdu; /**< null TB PPDU's sent as a response to basic trigger frame */ uint32 he_rxstrt_hesuppdu_cnt; /**< rxing SU PPDU */ uint32 he_rxstrt_hesureppdu_cnt; /**< rxing Range Extension(RE) SU PPDU */ uint32 he_null_zero_agg; /**< null AMPDU's transmitted in response to basic trigger * because of zero aggregation */ uint32 he_null_bsrp_rsp; /**< null AMPDU's txed in response to BSR poll */ uint32 he_null_fifo_empty; /**< null AMPDU's in response to basic trigger * because of no frames in fifo's */ uint32 he_myAID_cnt; uint32 he_rxtrig_bfm_cnt; uint32 he_rxtrig_mubar; uint32 rxheru[WL_RU_TYPE_MAX]; /**< HE of rx pkts */ uint32 txheru[WL_RU_TYPE_MAX]; uint32 he_mgmt_tbppdu; uint32 he_cs_req_tx_cancel; uint32 he_wrong_nss; uint32 he_trig_unsupp_rate; uint32 he_rxtrig_nfrp; uint32 he_rxtrig_bqrp; uint32 he_rxtrig_gcrmubar; uint32 he_rxtrig_basic_htpack; /**< triggers received with HTP ack policy */ uint32 he_rxtrig_ed_cncl; /**< count of cancelled packets * because of cs_req in trigger frame */ uint32 he_rxtrig_suppr_null_tbppdu; /**< count of null frame sent because of * suppression scenarios */ uint32 he_ulmu_disable; /**< number of UL MU disable scenario's handled in ucode */ uint32 he_ulmu_data_disable; /**= 64) */ typedef struct { uint32 macxsusp; uint32 m2vmsg; uint32 v2mmsg; uint32 mboxout; uint32 musnd; uint32 sfb2v; } wl_cnt_ge64mcxst_v1_t; /** MACSTAT counters for ucode (corerev >= 40) */ typedef struct { /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txfunfl[6]; /**< per-fifo tx underflows */ uint32 txampdu; /**< number of AMPDUs transmitted */ uint32 txmpdu; /**< number of MPDUs transmitted */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ uint32 rxmgucastmbss; /**< number of received mgmt frames with good FCS and matching RA */ uint32 rxctlucast; /**< number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdtocast; /**< number of received DATA frames (good FCS and not matching RA) */ uint32 rxmgocast; /**< number of received MGMT frames (good FCS and not matching RA) */ uint32 rxctlocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmgmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxctlmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ uint32 rxf1ovfl; /**< number of receive fifo 1 overflows */ uint32 rxhlovfl; /**< number of length / header fifo overflows */ uint32 missbcn_dbg; /**< number of beacon missed to receive */ uint32 pmqovfl; /**< number of PMQ overflows */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ uint32 txinrtstxop; /**< number of data frame transmissions during rts txop */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 rxtoolate; /**< receive too late */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ /* All counter variables have to be of uint32. */ } wl_cnt_ge40mcst_v1_t; /** MACSTAT counters for ucode (corerev < 40) */ typedef struct { /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txfunfl[6]; /**< per-fifo tx underflows */ uint32 txampdu; /**< number of AMPDUs transmitted */ uint32 txmpdu; /**< number of MPDUs transmitted */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ uint32 rxmgucastmbss; /**< number of received mgmt frames with good FCS and matching RA */ uint32 rxctlucast; /**< number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdtocast; /**< number of received DATA frames (good FCS and not matching RA) */ uint32 rxmgocast; /**< number of received MGMT frames (good FCS and not matching RA) */ uint32 rxctlocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmgmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxctlmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ uint32 dbgoff46; /**< BTCX protection failure count, * getting RX antenna in PHY DEBUG, * PR84273 timeout count */ uint32 dbgoff47; /**< BTCX preemption failure count, * getting RX antenna in PHY DEBUG, * PR84273 reset CCA count, * RATEENGDBG */ uint32 dbgoff48; /**< Used for counting txstatus queue overflow (corerev <= 4) */ uint32 pmqovfl; /**< number of PMQ overflows */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ uint32 txinrtstxop; /**< number of data frame transmissions during rts txop */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 phywatch; /**< number of phywatchdog to kill any pending transmissions. * (PR 38187 corerev == 11) */ uint32 rxtoolate; /**< receive too late */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ /* All counter variables have to be of uint32. */ } wl_cnt_lt40mcst_v1_t; /* ==== REV GE88 Counter Structs === */ /* Rev Ge88 TX specific macstats - version 1 */ typedef struct { uint32 txallfrm; /**< num of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txback; /**< blockack txcnt */ uint32 he_txmtid_back; /**< number of mtid BAs */ uint32 txdnlfrm; /**< number of Null-Data tx from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txndpa; /**< Number of TX NDPAs */ uint32 txndp; /**< Number of TX NDPs */ uint32 txbfm; /**< Number of TX Bfm cnt */ uint32 txcwrts; /**< Number of tx cw rts */ uint32 txcwcts; /**< Number of tx cw cts */ uint32 txbfpoll; /**< Number of tx bfpolls */ uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ uint32 txampdu; /**< number of AMPDUs transmitted */ uint32 he_txmampdu; /**< Number of tx m-ampdus */ uint32 txmpdu; /**< number of MPDUs transmitted */ uint32 txucast; /**< # of ucast tx expecting resp (not cts/cwcts) */ uint32 he_txfrag; /**< Number of tx frags */ uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ uint32 he_txtbppdu_ack; /**< Number of tx HE TBPPDU acks */ uint32 txinrtstxop; /**< number of data frame tx during rts txop */ uint32 null_txsts_empty; /**< Number empty null-txstatus' */ uint32 he_ulmu_disable; /**< # of ULMU disables handled in ucode */ uint32 he_ulmu_data_disable; /**< number of UL MU data disable scenarios * handled in ucode */ uint32 he_rxtrig_suppr_null_tbppdu; /**< count of null frame sent because of * suppression scenarios */ uint32 he_null_zero_agg; /**< nullAMPDU's transmitted in response to * basic trigger because of zero aggregation */ uint32 he_null_tbppdu; /**< null TBPPDU's sent as a response to * basic trigger frame */ uint32 he_null_bsrp_rsp; /**< null AMPDU's txed in response to BSR poll */ uint32 he_null_fifo_empty; /**< null AMPDU's in response to basic trigger * because of no frames in fifo's */ uint32 txrtsfail; /**< # of rts TX fails that reach retry limit */ uint32 txcgprsfail; /**< Tx Probe Response Fail. * AP sent probe response but did not get ACK. */ uint32 bcntxcancl; /**< TX bcns canceled due to rx of beacon (IBSS) */ uint32 txtplunfl; /**< Template unfl * (mac too slow to tx ACK/CTS or BCN) */ uint32 txphyerror; /**< TX phyerr - reported in txs for * driver queued frames */ uint32 ctmode_ufc_cnt; /**< Number of UFCs with CT mode enabled */ uint32 txshmunfl_cnt; /**< TX SHM unfl cnt */ uint32 txfunfl[11]; /**< per-fifo tx underflows */ uint32 txfmlunfl[9]; /**< ML fifos underflow cnts */ uint32 bferpt_inv_cfg; /**< Invalid bfe report cfg */ uint32 bferpt_drop_cnt1; /**< bfe rpt drop cnt 1 */ uint32 bferpt_drop_cnt2; /**< bfe rpt drop cnt 2 */ uint32 bferot_txcrs_high; /**< bfe rpt tx crs high */ uint32 txbfm_errcnt; /**< TX bfm error cnt */ uint32 PAD[23]; /**< PAD GAP */ uint32 btcx_rfact_ctr_l; /**< btcx rxfact counter low */ uint32 btcx_rfact_ctr_h; /**< btcx rxfact counter high */ uint32 btcx_txconf_ctr_l; /**< btcx txconf counter low */ uint32 btcx_txconf_ctr_h; /**< btcx txconf counter high */ uint32 btcx_txconf_dur_ctr_l; /**< btcx txconf duration counter low */ uint32 btcx_txconf_dur_ctr_h; /**< btcx txconf duration counter high */ uint32 txcgprssuc; /**< Tx Probe Response succ cnt */ uint32 txsf; /**< # of Tx'd SF */ uint32 macsusp_cnt; /**< # of macsuspends */ uint32 prs_timeout; /**< # of pre wds */ uint32 emlsr_tx_nosrt; /**< # of no TX starts for eMLSR */ } wl_cnt_ge88mcst_tx_v1_t; /* Rev Ge88 RX specific macstats - version 1 */ typedef struct { uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rx20s_cnt; /**< Increments if RXFrame does not include primary 20 */ uint32 C_SECRSSI0; /**< SEC RSSI0 info */ uint32 C_SECRSSI1; /**< SEC RSSI1 info */ uint32 C_SECRSSI2; /**< SEC RSSI2 info */ uint32 C_CCA_RXPRI_LO; /**< SEC RXPRI Low */ uint32 C_CCA_RXPRI_HI; /**< SEC RXPRI High */ uint32 C_CCA_RXSEC20_LO; /**< SEC CCA RX 20mhz low */ uint32 C_CCA_RXSEC20_HI; /**< SEC CCA RX 20mhz high */ uint32 C_CCA_RXSEC40_LO; /**< SEC CCA RX 40mhz low */ uint32 C_CCA_RXSEC40_HI; /**< SEC CCA RX 40mhz high */ uint32 C_CCA_RXSEC80_LO; /**< SEC CCA RX 80mhz low */ uint32 C_CCA_RXSEC80_HI; /**< SEC CCA RX 80mhz high */ uint32 rxctlmcast; /**< # of RX ctrl mcast frames */ uint32 rxmgmcast; /**< # of rx'd Management mcast frames */ uint32 rxdtmcast; /**< # of rx'd Data mcast frames */ uint32 rxbeaconmbss; /**< beacons rx'd from member of BSS */ uint32 rxndpa_m; /**< number of RX NDPA Multicast */ uint32 rxrtsucast; /**< # of ucast RTS (good FCS) */ uint32 rxctsucast; /**< # of ucast CTS (good FCS) */ uint32 rxctlucast; /**< # of rx'd CNTRL frames (good FCS & matching RA) */ uint32 rxmgucastmbss; /**< # of rx'd mgmt frames (good FCS & matching RA) */ uint32 rxdtucastmbss; /**< # of rx'd DATA frames (good FCS & matching RA) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxndpa_u; /**< number of unicast RX NDPAs */ uint32 rxsf; /**< number of rxsfucast */ uint32 rxcwrts; /**< number of rx'd cw ucast rts */ uint32 rxcwcts; /**< number of rx'd cw ucast cts */ uint32 rxbfpoll; /**< number of rx'd BF ucast poll */ uint32 pktengrxducast; /**< number of rx'd good fcs ucast frames */ uint32 pktengrxdmcast; /**< number of rx'd good fcs ocast frames */ uint32 rxdtocast; /**< # of rx'd DATA frames (good FCS & not matching RA) */ uint32 rxmgocast; /**< # of rx'd MGMT frames (good FCS & not matching RA) */ uint32 rxctlocast; /**< # of rx'd CNTRL frame (good FCS & not matching RA) */ uint32 rxrtsocast; /**< # of rx'd RTS not addressed */ uint32 rxctsocast; /**< # of rx'd CTS not addressed */ uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /* beacons rx'd from other BSS */ uint32 he_rx_ppdu_cnt; /**< rx'd HE PPDU cnt */ uint32 he_rxstrt_hesuppdu_cnt; /**< rx'd HE su PPDU cnt */ uint32 he_rxstrt_hesureppdu_cnt; /**< rx'd HE SU RE PPDU cnt */ uint32 he_rxtsrt_hemuppdu_cnt; /**< rx'd HE MU PPDU cnt */ uint32 rxbar; /**< number of rx'd BARs */ uint32 rxback; /**< number of rx'd BARs */ uint32 he_rxmtid_back; /**< number of rx'd HE RX MultiTID BAs */ uint32 he_rxmsta_back; /**< number of rx'd HE RX MultiSTA BAs */ uint32 bferpt; /**< number of rx'd BFE report ready cnts */ uint32 goodfcs; /**< number of rx'd goodfcs cnts */ uint32 he_colormiss_cnt; /**< HE BSS color mismatch counts cnts */ uint32 he_rxdefrag; /**< number of rx'd HE dynamic fragmented pkts */ uint32 he_rxdlmu; /**< number of rx'd DL MU frames */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rx_fp_shm_corrupt_cnt; /**< SHM corrupt count */ uint32 PAD[11]; /**< PAD Gap */ uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ uint32 rxbadfcs; /**< # of frames with CRC check failed */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY able to correlate the plcp but not the hdr */ uint32 rxfrmtoolong; /**< rx'd frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< rx'd frame not enough bytes for ft */ uint32 rxnodelim; /**< # of not valid delim -> ampdu parser */ uint32 rxbad_ampdu; /**< number of rx'd bad ampdus */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 rxtoolate; /**< receive too late */ uint32 m_pfifo_drop; /**< # of pfifo dropped frames */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ uint32 phyovfl; /**< number of phy overflows */ uint32 rxf0ovfl; /**< number of rx fifo 0 overflows */ uint32 rxf1ovfl; /**< number of rx fifo 1 overflows */ uint32 lenfovfl; /**< number of length overflows */ uint32 badplcp; /**< parity check of the PLCP header failed */ uint32 rxerr_stat; /**< rx error statistics */ uint32 stsfifofull; /**< status fifo full */ uint32 stsfifoerr; /**< status fifo error */ uint32 ctx_fifo_full; /**< fw not draining frames fast enough */ uint32 ctx_fifo2_full; /**< fw not draining frames fast enough */ uint32 missbcn_dbg; /**< number of beacon missed to receive */ uint32 rxrsptmout; /**< number of response timeouts for tx'd frames */ uint32 laterx_cnt; /**< ucode sees frame 30us late */ uint32 bcn_drop_cnt; /**< number of BCNs dropped in ucode */ uint32 bfr_timeout; /**< number of bfr timeouts */ uint32 rxgaininfo_ant0; /**< ANT-0 phy RX gain info - main? */ uint32 rxauxgaininfo_ant0; /**< ANT-0 phy RX gain info - aux */ uint32 he_rxtrig_myaid; /**< number of rx'd valid trigger frame with myaid */ uint32 he_rxtrig_rand; /**< number of rx'd valid trigger frame with random aid */ uint32 he_rxtrig_basic; /**< number of rx'd of basic trigger frame */ uint32 he_rxtrig_bfm_cnt; /**< number of rx'd trigger frame with bfm */ uint32 he_rxtrig_mubar; /**< number of rx'd MUBAR trigger frame variant */ uint32 he_rxtrig_murts; /**< number of rx'd MU-RTS trigger frame variant */ uint32 he_rxtrig_bsrp; /**< number of rx'd of BSR poll trigger frame variant */ uint32 he_rxtrig_gcrmubar; /**< number of rx'd gcr mu bar trigger frame variant? */ uint32 he_rxtrig_bqrp; /**< number of rx'd bqrp trigger frame variant? */ uint32 he_rxtrig_nfrp; /**< Todo: check on functionality */ uint32 he_rxtrig_basic_htpack; /**< triggers received with HTP ack policy */ uint32 he_cs_req_tx_cancel; /**< tx cancelled due to trigger rx or ch sw? */ uint32 he_rxtrig_rngpoll; /**< todo: check functionality */ uint32 he_rxtrig_rngsnd; /**< todo: check functionality */ uint32 he_rxtrig_rngssnd; /**< todo: check functionality */ uint32 he_rxtrig_rngrpt; /**< todo: check functionality */ uint32 he_rxtrig_rngpasv; /**< todo: check functionality */ uint32 he_rxtrig_ru_2x996T; /**< Rx'd trigger frame with STA RU index 160mhz */ uint32 he_rxtrig_invalid_ru; /**< Rx'd trigger frame with invalid STA20 RU index */ uint32 he_rxtrig_inv_ru_cnt; /**< # of Rx'd trigger frames with invalid RU cnt */ uint32 he_rxtrig_drop_cnt; /**< # of trigger frames dropped */ uint32 ndp_fail_cnt; /**< # of NDP fails */ uint32 rxfrmtoolong2_cnt; /**< # of Rx'd too long pkts */ uint32 hwaci_status; /**< HW ACI status */ uint32 pmqovfl; /**< number of PMQ overflows */ } wl_cnt_ge88mcst_rx_v1_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_rx_ge88mcst { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link RX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_rx_v1_t cnt[]; } wl_macst_rx_ge88mcst_v1_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_tx_ge88mcst { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link TX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_tx_v1_t cnt[]; } wl_macst_tx_ge88mcst_v1_t; /* Rev Ge88 TX specific macstats - version 2 */ typedef struct { uint32 txallfrm; /**< num of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txback; /**< blockack txcnt */ uint32 he_txmtid_back; /**< number of mtid BAs */ uint32 txdnlfrm; /**< number of Null-Data tx from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txndpa; /**< Number of TX NDPAs */ uint32 txndp; /**< Number of TX NDPs */ uint32 txbfm; /**< Number of TX Bfm cnt */ uint32 txcwrts; /**< Number of tx cw rts */ uint32 txcwcts; /**< Number of tx cw cts */ uint32 txbfpoll; /**< Number of tx bfpolls */ uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ uint32 txampdu; /**< number of AMPDUs transmitted */ uint32 he_txmampdu; /**< Number of tx m-ampdus */ uint32 txucast; /**< # of ucast tx expecting resp (not cts/cwcts) */ uint32 he_txfrag; /**< Number of tx frags */ uint32 he_txtbppdu; /**< increments on transmission of every TB PPDU */ uint32 he_txtbppdu_ack; /**< Number of tx HE TBPPDU acks */ uint32 txinrtstxop; /**< number of data frame tx during rts txop */ uint32 null_txsts_empty; /**< Number empty null-txstatus' */ uint32 he_ulmu_disable; /**< # of ULMU disables handled in ucode */ uint32 he_ulmu_data_disable; /**< number of UL MU data disable scenarios * handled in ucode */ uint32 he_rxtrig_suppr_null_tbppdu; /**< count of null frame sent because of * suppression scenarios */ uint32 he_null_zero_agg; /**< nullAMPDU's transmitted in response to * basic trigger because of zero aggregation */ uint32 he_null_tbppdu; /**< null TBPPDU's sent as a response to * basic trigger frame */ uint32 he_null_bsrp_rsp; /**< null AMPDU's txed in response to BSR poll */ uint32 he_null_fifo_empty; /**< null AMPDU's in response to basic trigger * because of no frames in fifo's */ uint32 txrtsfail; /**< # of rts TX fails that reach retry limit */ uint32 txcgprsfail; /**< Tx Probe Response Fail. * AP sent probe response but did not get ACK. */ uint32 bcntxcancl; /**< TX bcns canceled due to rx of beacon (IBSS) */ uint32 txtplunfl; /**< Template unfl * (mac too slow to tx ACK/CTS or BCN) */ uint32 txphyerror; /**< TX phyerr - reported in txs for * driver queued frames */ uint32 txshmunfl_cnt; /**< TX SHM unfl cnt */ uint32 txfunfl[11]; /**< per-fifo tx underflows */ uint32 txfmlunfl[9]; /**< ML fifos underflow cnts */ uint32 bferpt_inv_cfg; /**< Invalid bfe report cfg */ uint32 bferpt_drop_cnt1; /**< bfe rpt drop cnt 1 */ uint32 bferpt_drop_cnt2; /**< bfe rpt drop cnt 2 */ uint32 bferot_txcrs_high; /**< bfe rpt tx crs high */ uint32 txbfm_errcnt; /**< TX bfm error cnt */ uint32 tx_murts_cnt; /**< Tx MURTS Count */ uint32 tx_noavail_cnt; /**< Tx Not avail Count */ uint32 tx_null_link_pref; /**< Null Link Pref */ uint32 btcx_rfact_ctr_l; /**< btcx rxfact counter low */ uint32 btcx_rfact_ctr_h; /**< btcx rxfact counter high */ uint32 btcx_txconf_ctr_l; /**< btcx txconf counter low */ uint32 btcx_txconf_ctr_h; /**< btcx txconf counter high */ uint32 btcx_txconf_dur_ctr_l; /**< btcx txconf duration counter low */ uint32 btcx_txconf_dur_ctr_h; /**< btcx txconf duration counter high */ uint32 txcgprssuc; /**< Tx Probe Response succ cnt */ uint32 txsf; /**< # of Tx'd SF */ uint32 macsusp_cnt; /**< # of macsuspends */ uint32 prs_timeout; /**< # of pre wds */ uint32 emlsr_tx_nosrt; /**< # of no TX starts for eMLSR */ uint32 rts_to_self_cnt; /**< # of RTS to self */ uint32 saqm_sendfrm_agg_cnt; /**< # SAQM Send frame aggregation */ } wl_cnt_ge88mcst_tx_v2_t; /* Rev Ge88 RX specific macstats - version 2 */ typedef struct { uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rx20s_cnt; /**< Increments if RXFrame does not include primary 20 */ uint32 C_SECRSSI0; /**< SEC RSSI0 info */ uint32 C_SECRSSI1; /**< SEC RSSI1 info */ uint32 C_SECRSSI2; /**< SEC RSSI2 info */ uint32 C_CCA_RXPRI_LO; /**< SEC RXPRI Low */ uint32 C_CCA_RXPRI_HI; /**< SEC RXPRI High */ uint32 C_CCA_RXSEC20_LO; /**< SEC CCA RX 20mhz low */ uint32 C_CCA_RXSEC20_HI; /**< SEC CCA RX 20mhz high */ uint32 C_CCA_RXSEC40_LO; /**< SEC CCA RX 40mhz low */ uint32 C_CCA_RXSEC40_HI; /**< SEC CCA RX 40mhz high */ uint32 C_CCA_RXSEC80_LO; /**< SEC CCA RX 80mhz low */ uint32 C_CCA_RXSEC80_HI; /**< SEC CCA RX 80mhz high */ uint32 rxctlmcast; /**< # of RX ctrl mcast frames */ uint32 rxmgmcast; /**< # of rx'd Management mcast frames */ uint32 rxbeaconmbss; /**< beacons rx'd from member of BSS */ uint32 rxndpa_m; /**< number of RX NDPA Multicast */ uint32 rxrtsucast; /**< # of ucast RTS (good FCS) */ uint32 rxctsucast; /**< # of ucast CTS (good FCS) */ uint32 rxctlucast; /**< # of rx'd CNTRL frames (good FCS & matching RA) */ uint32 rxmgucastmbss; /**< # of rx'd mgmt frames (good FCS & matching RA) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxndpa_u; /**< number of unicast RX NDPAs */ uint32 rxsf; /**< number of rxsfucast */ uint32 rxcwrts; /**< number of rx'd cw ucast rts */ uint32 rxcwcts; /**< number of rx'd cw ucast cts */ uint32 rxbfpoll; /**< number of rx'd BF ucast poll */ uint32 rxmgocast; /**< # of rx'd MGMT frames (good FCS & not matching RA) */ uint32 rxctlocast; /**< # of rx'd CNTRL frame (good FCS & not matching RA) */ uint32 rxrtsocast; /**< # of rx'd RTS not addressed */ uint32 rxctsocast; /**< # of rx'd CTS not addressed */ uint32 rxbeaconobss; /* beacons rx'd from other BSS */ uint32 he_rx_ppdu_cnt; /**< rx'd HE PPDU cnt */ uint32 he_rxstrt_hesuppdu_cnt; /**< rx'd HE su PPDU cnt */ uint32 he_rxstrt_hesureppdu_cnt; /**< rx'd HE SU RE PPDU cnt */ uint32 he_rxtsrt_hemuppdu_cnt; /**< rx'd HE MU PPDU cnt */ uint32 rxbar; /**< number of rx'd BARs */ uint32 rxback; /**< number of rx'd BARs */ uint32 he_rxmtid_back; /**< number of rx'd HE RX MultiTID BAs */ uint32 he_rxmsta_back; /**< number of rx'd HE RX MultiSTA BAs */ uint32 bferpt; /**< number of rx'd BFE report ready cnts */ uint32 he_colormiss_cnt; /**< HE BSS color mismatch counts cnts */ uint32 he_rxdefrag; /**< number of rx'd HE dynamic fragmented pkts */ uint32 he_rxdlmu; /**< number of rx'd DL MU frames */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rx_fp_shm_corrupt_cnt; /**< SHM corrupt count */ uint32 PAD[18]; /**< PAD Gap */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY able to correlate the plcp but not the hdr */ uint32 rxfrmtoolong; /**< rx'd frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< rx'd frame not enough bytes for ft */ uint32 rxnodelim; /**< # of not valid delim -> ampdu parser */ uint32 rxbad_ampdu; /**< number of rx'd bad ampdus */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 rxtoolate; /**< receive too late */ uint32 m_pfifo_drop; /**< # of pfifo dropped frames */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ uint32 phyovfl; /**< number of phy overflows */ uint32 rxf0ovfl; /**< number of rx fifo 0 overflows */ uint32 rxf1ovfl; /**< number of rx fifo 1 overflows */ uint32 lenfovfl; /**< number of length overflows */ uint32 weppeof; /**< number of weppeof */ uint32 badplcp; /**< parity check of the PLCP header failed */ uint32 stsfifofull; /**< status fifo full */ uint32 stsfifoerr; /**< status fifo error */ uint32 ctx_fifo_full; /**< fw not draining frames fast enough */ uint32 ctx_fifo2_full; /**< fw not draining frames fast enough */ uint32 missbcn_dbg; /**< number of beacon missed to receive */ uint32 rxrsptmout; /**< number of response timeouts for tx'd frames */ uint32 laterx_cnt; /**< ucode sees frame 30us late */ uint32 bcn_drop_cnt; /**< number of BCNs dropped in ucode */ uint32 bfr_timeout; /**< number of bfr timeouts */ uint32 rxgaininfo_ant0; /**< ANT-0 phy RX gain info - main? */ uint32 rxauxgaininfo_ant0; /**< ANT-0 phy RX gain info - aux */ uint32 he_rxtrig_myaid; /**< number of rx'd valid trigger frame with myaid */ uint32 he_rxtrig_rand; /**< number of rx'd valid trigger frame with random aid */ uint32 he_rxtrig_basic; /**< number of rx'd of basic trigger frame */ uint32 he_rxtrig_bfm_cnt; /**< number of rx'd trigger frame with bfm */ uint32 he_rxtrig_mubar; /**< number of rx'd MUBAR trigger frame variant */ uint32 he_rxtrig_murts; /**< number of rx'd MU-RTS trigger frame variant */ uint32 he_rxtrig_bsrp; /**< number of rx'd of BSR poll trigger frame variant */ uint32 he_rxtrig_gcrmubar; /**< number of rx'd gcr mu bar trigger frame variant? */ uint32 he_rxtrig_bqrp; /**< number of rx'd bqrp trigger frame variant? */ uint32 he_rxtrig_nfrp; /**< Todo: check on functionality */ uint32 he_rxtrig_basic_htpack; /**< triggers received with HTP ack policy */ uint32 he_cs_req_tx_cancel; /**< tx cancelled due to trigger rx or ch sw? */ uint32 he_rxtrig_rngpoll; /**< todo: check functionality */ uint32 he_rxtrig_rngsnd; /**< todo: check functionality */ uint32 he_rxtrig_rngssnd; /**< todo: check functionality */ uint32 he_rxtrig_rngrpt; /**< todo: check functionality */ uint32 he_rxtrig_rngpasv; /**< todo: check functionality */ uint32 he_rxtrig_ru_2x996T; /**< Rx'd trigger frame with STA RU index 160mhz */ uint32 he_rxtrig_invalid_ru; /**< Rx'd trigger frame with invalid STA20 RU index */ uint32 he_rxtrig_inv_ru_cnt; /**< # of Rx'd trigger frames with invalid RU cnt */ uint32 he_rxtrig_drop_cnt; /**< # of trigger frames dropped */ uint32 ndp_fail_cnt; /**< # of NDP fails */ uint32 rxfrmtoolong2_cnt; /**< # of Rx'd too long pkts */ uint32 hwaci_status; /**< HW ACI status */ uint32 pmqovfl; /**< number of PMQ overflows */ uint32 sctrg_rxcrs_drop_cnt; /**< Number of scan trigger dropped due to rxcrs */ uint32 inv_punc_usig_cnt; /**< Number of invalid punctured USIG */ uint32 sctrg_drop_cnt; /**< Number of scan trigger drop */ } wl_cnt_ge88mcst_rx_v2_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_rx_ge88mcst_v2 { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link RX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_rx_v2_t cnt[]; } wl_macst_rx_ge88mcst_v2_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_tx_ge88mcst_v2 { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link TX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_tx_v2_t cnt[]; } wl_macst_tx_ge88mcst_v2_t; /* Rev Ge88 TX 32 specific macstats - version 1 */ typedef struct { uint32 txmpdu; /**< number of MPDUs transmitted */ uint32 ctmode_ufc_cnt; /**< Number of UFCs with CT mode enabled */ } wl_cnt_ge88mcst_tx_u32_v1_t; /* Rev Ge88 RX 32 specific macstats - version 1 */ typedef struct { uint32 rxdtucastmbss; /**< # of rx'd DATA frames (good FCS & matching RA) */ uint32 pktengrxducast; /**< number of rx'd good fcs ucast frames */ uint32 pktengrxdmcast; /**< number of rx'd good fcs mcast frames */ uint32 rxdtocast; /**< # of rx'd DATA frames (good FCS & not matching RA) */ uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 goodfcs; /**< number of rx'd goodfcs cnts */ uint32 rxdtmcast; /**< # of rx'd Data mcast frames */ uint32 rxanyerr; /**< Any RX error that is not counted by other counters */ uint32 rxbadfcs; /**< # of frames with CRC check failed */ } wl_cnt_ge88mcst_rx_u32_v1_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_rx_ge88mcst_u32 { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link RX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_rx_u32_v1_t cnt[]; } wl_macst_rx_ge88mcst_u32_v1_t; /* Rev GE88 per ML link supportive wl counters (macstats) - version 1 */ typedef struct wl_macst_tx_ge88mcst_u32 { uint8 num_links; /* Number of per-link stats supported on slice */ uint8 pad[3]; /* Per ML Link TX macstats (esp. eMLSR) */ wl_cnt_ge88mcst_tx_u32_v1_t cnt[]; } wl_macst_tx_ge88mcst_u32_v1_t; /** MACSTAT counters for ucode (corerev >= 80) */ typedef struct { /* MAC counters: 32-bit version of d11.h's macstat_t */ /* Start of PSM2HOST stats(72) block */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txampdu; /**< number of AMPDUs transmitted */ uint32 txmpdu; /**< number of MPDUs transmitted */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxanyerr; /**< Any RX error that is not counted by other counters. */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdtucastmbss; /**< number of received DATA frames with good FCS and matching RA */ uint32 rxmgucastmbss; /**< number of received mgmt frames with good FCS and matching RA */ uint32 rxctlucast; /**< number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdtocast; /**< number of received DATA frames (good FCS and not matching RA) */ uint32 rxmgocast; /**< number of received MGMT frames (good FCS and not matching RA) */ uint32 rxctlocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdtmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmgmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxctlmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdtucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxnodelim; /**< number of no valid delimiter detected by ampdu parser */ uint32 missbcn_dbg; /**< number of beacon missed to receive */ uint32 pmqovfl; /**< number of PMQ overflows */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 txrtsfail; /**< number of rts transmission failure that reach retry limit */ uint32 txucast; /**< number of unicast tx expecting response other than cts/cwcts */ uint32 txinrtstxop; /**< number of data frame transmissions during rts txop */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 rxtoolate; /**< receive too late */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ uint32 rxtrig_myaid; /* New counters added in corerev 80 */ uint32 rxtrig_rand; uint32 goodfcs; uint32 colormiss; uint32 txmampdu; uint32 rxmtidback; uint32 rxmstaback; uint32 txfrag; /* start of rxerror overflow counter(24) block which are modified/added in corerev 80 */ uint32 phyovfl; uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ uint32 rxf1ovfl; /**< number of receive fifo 1 overflows */ uint32 lenfovfl; uint32 weppeof; uint32 badplcp; uint32 msduthresh; uint32 strmeof; uint32 stsfifofull; uint32 stsfifoerr; uint32 PAD[6]; uint32 rxerr_stat; uint32 ctx_fifo_full; /* Firmware not draining frames fast enough */ uint32 PAD[9]; uint32 ctmode_ufc_cnt; uint32 PAD[26]; /* PAD added for counter elements to be added soon */ uint32 ctx_fifo2_full; /* Firmware not draining frames fast enough */ uint32 PAD; /* PAD to match to the struct size before ctx_fifo2_full count was * introduced. Can be repurposed to a different counter */ } wl_cnt_ge80mcst_v1_t; /* RX error related counters in addition to RX counters in MAC stats above. * Counters collected from noncontiguous SHM locations. */ typedef struct { uint32 rx20s_cnt; /* Increments if RXFrame does not include primary 20 */ uint32 m_pfifo_drop; /* ucode is late processing RX frame */ uint32 new_rxin_plcp_wait_cnt; /* invalid reception/ ucode late in processing rx/ something * wrong over MACPHY interface */ uint32 laterx_cnt; /* ucode sees frame 30us late */ uint32 rxlegacyfrminvalid; /* Invalid BPHY or L-OFDM reception */ uint32 txsifserr; /* Frame arrived in SIF when about to TX (B)ACK */ uint32 ooseq_macsusp; /* ucode out of seq in processing reception due to mac * suspend */ } wl_cnt_ge80_rxerr_mcst_v1_t; typedef struct { uint32 fifocount; uint32 txfunfl[]; } wl_cnt_ge80_txfunfl_v1_t; /** MACSTAT counters for "wl counter" version <= 10 */ /* With ucode before its macstat cnts cleaned up */ typedef struct { /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< number of Null-Data transmission generated from template */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txfunfl[6]; /**< per-fifo tx underflows */ uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ uint32 PAD; /**< number of MPDUs transmitted */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxinvmachdr; /**< Either the protocol version != 0 or frame type not * data/control/management */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdfrmucastmbss; /* number of received DATA frames with good FCS and matching RA */ uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ uint32 rxcfrmucast; /**< number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdfrmocast; /**< number of received DATA frames (good FCS and not matching RA) */ uint32 rxmfrmocast; /**< number of received MGMT frames (good FCS and not matching RA) */ uint32 rxcfrmocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdfrmmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmfrmmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxcfrmmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdfrmucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 PAD; uint32 rxf0ovfl; /**< number of receive fifo 0 overflows */ uint32 rxf1ovfl; /**< Number of receive fifo 1 overflows (obsolete) */ uint32 rxf2ovfl; /**< Number of receive fifo 2 overflows (obsolete) */ uint32 txsfovfl; /**< Number of transmit status fifo overflows (obsolete) */ uint32 pmqovfl; /**< number of PMQ overflows */ uint32 rxcgprqfrm; /**< number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 rxnack; /**< obsolete */ uint32 frmscons; /**< obsolete */ uint32 txnack; /**< obsolete */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 rxtoolate; /**< receive too late */ uint32 bphy_badplcp; /**< number of bad PLCP reception on BPHY rate */ /* All counter variables have to be of uint32. */ } wl_cnt_v_le10_mcst_t; #define MAX_RX_FIFO 3 #define WL_RXFIFO_CNT_VERSION_1 1 /* current version of wl_rxfifo_cnt_t */ typedef struct { /* Counters for frames received from rx fifos */ uint16 version; uint16 length; /* length of entire structure */ uint32 rxf_data[MAX_RX_FIFO]; /* data frames from rx fifo */ uint32 rxf_mgmtctl[MAX_RX_FIFO]; /* mgmt/ctl frames from rx fifo */ } wl_rxfifo_cnt_t; typedef struct { uint16 version; /**< see definition of WL_CNT_T_VERSION */ uint16 length; /**< length of entire structure */ /* transmit stat counters */ uint32 txframe; /**< tx data frames */ uint32 txbyte; /**< tx data bytes */ uint32 txretrans; /**< tx mac retransmits */ uint32 txerror; /**< tx data errors (derived: sum of others) */ uint32 txctl; /**< tx management frames */ uint32 txprshort; /**< tx short preamble frames */ uint32 txserr; /**< tx status errors */ uint32 txnobuf; /**< tx out of buffers errors */ uint32 txnoassoc; /**< tx discard because we're not associated */ uint32 txrunt; /**< tx runt frames */ uint32 txchit; /**< tx header cache hit (fastpath) */ uint32 txcmiss; /**< tx header cache miss (slowpath) */ /* transmit chip error counters */ uint32 txuflo; /**< tx fifo underflows */ uint32 txphyerr; /**< tx phy errors (indicated in tx status) */ uint32 txphycrs; /**< PR8861/8963 counter */ /* receive stat counters */ uint32 rxframe; /**< rx data frames */ uint32 rxbyte; /**< rx data bytes */ uint32 rxerror; /**< rx data errors (derived: sum of others) */ uint32 rxctl; /**< rx management frames */ uint32 rxnobuf; /**< rx out of buffers errors */ uint32 rxnondata; /**< rx non data frames in the data channel errors */ uint32 rxbadds; /**< rx bad DS errors */ uint32 rxbadcm; /**< rx bad control or management frames */ uint32 rxfragerr; /**< rx fragmentation errors */ uint32 rxrunt; /**< rx runt frames */ uint32 rxgiant; /**< rx giant frames */ uint32 rxnoscb; /**< rx no scb error */ uint32 rxbadproto; /**< rx invalid frames */ uint32 rxbadsrcmac; /**< rx frames with Invalid Src Mac */ uint32 rxbadda; /**< rx frames tossed for invalid da */ uint32 rxfilter; /**< rx frames filtered out */ /* receive chip error counters */ uint32 rxoflo; /**< rx fifo overflow errors */ uint32 rxuflo[NFIFO]; /**< rx dma descriptor underflow errors */ uint32 d11cnt_txrts_off; /**< d11cnt txrts value when reset d11cnt */ uint32 d11cnt_rxcrc_off; /**< d11cnt rxcrc value when reset d11cnt */ uint32 d11cnt_txnocts_off; /**< d11cnt txnocts value when reset d11cnt */ /* misc counters */ uint32 dmade; /**< tx/rx dma descriptor errors */ uint32 dmada; /**< tx/rx dma data errors */ uint32 dmape; /**< tx/rx dma descriptor protocol errors */ uint32 reset; /**< reset count */ uint32 tbtt; /**< cnts the TBTT int's */ uint32 txdmawar; /**< # occurrences of PR15420 workaround */ uint32 pkt_callback_reg_fail; /**< callbacks register failure */ /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< Not used */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txfunfl[6]; /**< per-fifo tx underflows */ uint32 rxtoolate; /**< receive too late */ uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxinvmachdr; /**< Either the protocol version != 0 or frame type not * data/control/management */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ uint32 rxcfrmucast; /**< number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdfrmocast; /**< number of received DATA frames (good FCS and not matching RA) */ uint32 rxmfrmocast; /**< number of received MGMT frames (good FCS and not matching RA) */ uint32 rxcfrmocast; /**< number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdfrmmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmfrmmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxcfrmmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdfrmucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< Number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxf0ovfl; /**< Number of receive fifo 0 overflows */ uint32 rxf1ovfl; /**< Number of receive fifo 1 overflows (obsolete) */ uint32 rxf2ovfl; /**< Number of receive fifo 2 overflows (obsolete) */ uint32 txsfovfl; /**< Number of transmit status fifo overflows (obsolete) */ uint32 pmqovfl; /**< Number of PMQ overflows */ uint32 rxcgprqfrm; /**< Number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< Number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 rxnack; /**< obsolete */ uint32 frmscons; /**< obsolete */ uint32 txnack; /**< obsolete */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ uint32 txfrag; /**< dot11TransmittedFragmentCount */ uint32 txmulti; /**< dot11MulticastTransmittedFrameCount */ uint32 txfail; /**< dot11FailedCount */ uint32 txretry; /**< dot11RetryCount */ uint32 txretrie; /**< dot11MultipleRetryCount */ uint32 rxdup; /**< dot11FrameduplicateCount */ uint32 txrts; /**< dot11RTSSuccessCount */ uint32 txnocts; /**< dot11RTSFailureCount */ uint32 txnoack; /**< dot11ACKFailureCount */ uint32 rxfrag; /**< dot11ReceivedFragmentCount */ uint32 rxmulti; /**< dot11MulticastReceivedFrameCount */ uint32 rxcrc; /**< dot11FCSErrorCount */ uint32 txfrmsnt; /**< dot11TransmittedFrameCount (bogus MIB?) */ uint32 rxundec; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay; /**< TKIPReplays */ uint32 ccmpfmterr; /**< CCMPFormatErrors */ uint32 ccmpreplay; /**< CCMPReplays */ uint32 ccmpundec; /**< CCMPDecryptErrors */ uint32 fourwayfail; /**< FourWayHandshakeFailures */ uint32 wepundec; /**< dot11WEPUndecryptableCount */ uint32 wepicverr; /**< dot11WEPICVErrorCount */ uint32 decsuccess; /**< DecryptSuccessCount */ uint32 tkipicverr; /**< TKIPICVErrorCount */ uint32 wepexcluded; /**< dot11WEPExcludedCount */ uint32 txchanrej; /**< Tx frames suppressed due to channel rejection */ uint32 psmwds; /**< Count PSM watchdogs */ uint32 phywatchdog; /**< Count Phy watchdogs (triggered by ucode) */ /* MBSS counters, AP only */ uint32 prq_entries_handled; /**< PRQ entries read in */ uint32 prq_undirected_entries; /**< which were bcast bss & ssid */ uint32 prq_bad_entries; /**< which could not be translated to info */ uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ /* per-rate receive stat counters */ uint32 rx1mbps; /**< packets rx at 1Mbps */ uint32 rx2mbps; /**< packets rx at 2Mbps */ uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ uint32 rx6mbps; /**< packets rx at 6Mbps */ uint32 rx9mbps; /**< packets rx at 9Mbps */ uint32 rx11mbps; /**< packets rx at 11Mbps */ uint32 rx12mbps; /**< packets rx at 12Mbps */ uint32 rx18mbps; /**< packets rx at 18Mbps */ uint32 rx24mbps; /**< packets rx at 24Mbps */ uint32 rx36mbps; /**< packets rx at 36Mbps */ uint32 rx48mbps; /**< packets rx at 48Mbps */ uint32 rx54mbps; /**< packets rx at 54Mbps */ uint32 rx108mbps; /**< packets rx at 108mbps */ uint32 rx162mbps; /**< packets rx at 162mbps */ uint32 rx216mbps; /**< packets rx at 216 mbps */ uint32 rx270mbps; /**< packets rx at 270 mbps */ uint32 rx324mbps; /**< packets rx at 324 mbps */ uint32 rx378mbps; /**< packets rx at 378 mbps */ uint32 rx432mbps; /**< packets rx at 432 mbps */ uint32 rx486mbps; /**< packets rx at 486 mbps */ uint32 rx540mbps; /**< packets rx at 540 mbps */ /* pkteng rx frame stats */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rfdisable; /**< count of radio disables */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 bphy_badplcp; uint32 txexptime; /**< Tx frames suppressed due to timer expiration */ uint32 txmpdu_sgi; /**< count for sgi transmit */ uint32 rxmpdu_sgi; /**< count for sgi received */ uint32 txmpdu_stbc; /**< count for stbc transmit */ uint32 rxmpdu_stbc; /**< count for stbc received */ uint32 rxundec_mcst; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill_mcst; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr_mcst; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay_mcst; /**< TKIPReplays */ uint32 ccmpfmterr_mcst; /**< CCMPFormatErrors */ uint32 ccmpreplay_mcst; /**< CCMPReplays */ uint32 ccmpundec_mcst; /**< CCMPDecryptErrors */ uint32 fourwayfail_mcst; /**< FourWayHandshakeFailures */ uint32 wepundec_mcst; /**< dot11WEPUndecryptableCount */ uint32 wepicverr_mcst; /**< dot11WEPICVErrorCount */ uint32 decsuccess_mcst; /**< DecryptSuccessCount */ uint32 tkipicverr_mcst; /**< TKIPICVErrorCount */ uint32 wepexcluded_mcst; /**< dot11WEPExcludedCount */ uint32 dma_hang; /**< count for dma hang */ uint32 reinit; /**< count for reinit */ uint32 pstatxucast; /**< count of ucast frames xmitted on all psta assoc */ uint32 pstatxnoassoc; /**< count of txnoassoc frames xmitted on all psta assoc */ uint32 pstarxucast; /**< count of ucast frames received on all psta assoc */ uint32 pstarxbcmc; /**< count of bcmc frames received on all psta */ uint32 pstatxbcmc; /**< count of bcmc frames transmitted on all psta */ uint32 cso_passthrough; /**< hw cso required but passthrough */ uint32 cso_normal; /**< hw cso hdr for normal process */ uint32 chained; /**< number of frames chained */ uint32 chainedsz1; /**< number of chain size 1 frames */ uint32 unchained; /**< number of frames not chained */ uint32 maxchainsz; /**< max chain size so far */ uint32 currchainsz; /**< current chain size */ uint32 rxdrop20s; /**< drop secondary cnt */ uint32 pciereset; /**< Secondary Bus Reset issued by driver */ uint32 cfgrestore; /**< configspace restore by driver */ uint32 reinitreason[NREINITREASONCOUNT]; /**< reinitreason counters; 0: Unknown reason */ uint32 rxrtry; /**< num of received packets with retry bit on */ uint32 txmpdu; /**< macstat cnt only valid in ver 11. number of MPDUs txed. */ uint32 rxnodelim; /**< macstat cnt only valid in ver 11. * number of occasions that no valid delimiter is detected * by ampdu parser. */ uint32 rxmpdu_mu; /**< Number of MU MPDUs received */ /* detailed control/management frames */ uint32 txbar; /**< Number of TX BAR */ uint32 rxbar; /**< Number of RX BAR */ uint32 txpspoll; /**< Number of TX PS-poll */ uint32 rxpspoll; /**< Number of RX PS-poll */ uint32 txnull; /**< Number of TX NULL_DATA */ uint32 rxnull; /**< Number of RX NULL_DATA */ uint32 txqosnull; /**< Number of TX NULL_QoSDATA */ uint32 rxqosnull; /**< Number of RX NULL_QoSDATA */ uint32 txassocreq; /**< Number of TX ASSOC request */ uint32 rxassocreq; /**< Number of RX ASSOC request */ uint32 txreassocreq; /**< Number of TX REASSOC request */ uint32 rxreassocreq; /**< Number of RX REASSOC request */ uint32 txdisassoc; /**< Number of TX DISASSOC */ uint32 rxdisassoc; /**< Number of RX DISASSOC */ uint32 txassocrsp; /**< Number of TX ASSOC response */ uint32 rxassocrsp; /**< Number of RX ASSOC response */ uint32 txreassocrsp; /**< Number of TX REASSOC response */ uint32 rxreassocrsp; /**< Number of RX REASSOC response */ uint32 txauth; /**< Number of TX AUTH */ uint32 rxauth; /**< Number of RX AUTH */ uint32 txdeauth; /**< Number of TX DEAUTH */ uint32 rxdeauth; /**< Number of RX DEAUTH */ uint32 txprobereq; /**< Number of TX probe request */ uint32 rxprobereq; /**< Number of RX probe request */ uint32 txprobersp; /**< Number of TX probe response */ uint32 rxprobersp; /**< Number of RX probe response */ uint32 txaction; /**< Number of TX action frame */ uint32 rxaction; /**< Number of RX action frame */ uint32 ampdu_wds; /**< Number of AMPDU watchdogs */ uint32 txlost; /**< Number of lost packets reported in txs */ uint32 txdatamcast; /**< Number of TX multicast data packets */ uint32 txdatabcast; /**< Number of TX broadcast data packets */ uint32 txbcast; /* Broadcast TransmittedFrameCount */ uint32 txdropped; /* tx dropped pkts */ uint32 rxbcast; /* BroadcastReceivedFrameCount */ uint32 rxdropped; /* rx dropped pkts (derived: sum of others) */ /* This structure is deprecated and used only for ver <= 11. * All counter variables have to be of uint32. */ } wl_cnt_ver_11_t; typedef struct { uint16 version; /* see definition of WL_CNT_T_VERSION */ uint16 length; /* length of entire structure */ /* transmit stat counters */ uint32 txframe; /* tx data frames */ uint32 txbyte; /* tx data bytes */ uint32 txretrans; /* tx mac retransmits */ uint32 txerror; /* tx data errors (derived: sum of others) */ uint32 txctl; /* tx management frames */ uint32 txprshort; /* tx short preamble frames */ uint32 txserr; /* tx status errors */ uint32 txnobuf; /* tx out of buffers errors */ uint32 txnoassoc; /* tx discard because we're not associated */ uint32 txrunt; /* tx runt frames */ uint32 txchit; /* tx header cache hit (fastpath) */ uint32 txcmiss; /* tx header cache miss (slowpath) */ /* transmit chip error counters */ uint32 txuflo; /* tx fifo underflows */ uint32 txphyerr; /* tx phy errors (indicated in tx status) */ uint32 txphycrs; /* PR8861/8963 counter */ /* receive stat counters */ uint32 rxframe; /* rx data frames */ uint32 rxbyte; /* rx data bytes */ uint32 rxerror; /* rx data errors (derived: sum of others) */ uint32 rxctl; /* rx management frames */ uint32 rxnobuf; /* rx out of buffers errors */ uint32 rxnondata; /* rx non data frames in the data channel errors */ uint32 rxbadds; /* rx bad DS errors */ uint32 rxbadcm; /* rx bad control or management frames */ uint32 rxfragerr; /* rx fragmentation errors */ uint32 rxrunt; /* rx runt frames */ uint32 rxgiant; /* rx giant frames */ uint32 rxnoscb; /* rx no scb error */ uint32 rxbadproto; /* rx invalid frames */ uint32 rxbadsrcmac; /* rx frames with Invalid Src Mac */ uint32 rxbadda; /* rx frames tossed for invalid da */ uint32 rxfilter; /* rx frames filtered out */ /* receive chip error counters */ uint32 rxoflo; /* rx fifo overflow errors */ uint32 rxuflo[NFIFO]; /* rx dma descriptor underflow errors */ uint32 d11cnt_txrts_off; /* d11cnt txrts value when reset d11cnt */ uint32 d11cnt_rxcrc_off; /* d11cnt rxcrc value when reset d11cnt */ uint32 d11cnt_txnocts_off; /* d11cnt txnocts value when reset d11cnt */ /* misc counters */ uint32 dmade; /* tx/rx dma descriptor errors */ uint32 dmada; /* tx/rx dma data errors */ uint32 dmape; /* tx/rx dma descriptor protocol errors */ uint32 reset; /* reset count */ uint32 tbtt; /* cnts the TBTT int's */ uint32 txdmawar; /* # occurrences of PR15420 workaround */ uint32 pkt_callback_reg_fail; /* callbacks register failure */ /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /* total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /* number of RTS sent out by the MAC */ uint32 txctsfrm; /* number of CTS sent out by the MAC */ uint32 txackfrm; /* number of ACK frames sent out */ uint32 txdnlfrm; /* Not used */ uint32 txbcnfrm; /* beacons transmitted */ uint32 txfunfl[8]; /* per-fifo tx underflows */ uint32 txtplunfl; /* Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /* Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 rxfrmtoolong; /* Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /* Received frame did not contain enough bytes for its frame type */ uint32 rxinvmachdr; /* Either the protocol version != 0 or frame type not * data/control/management */ uint32 rxbadfcs; /* number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /* parity check of the PLCP header failed */ uint32 rxcrsglitch; /* PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /* Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdfrmucastmbss; /* Number of received DATA frames with good FCS and matching RA */ uint32 rxmfrmucastmbss; /* number of received mgmt frames with good FCS and matching RA */ uint32 rxcfrmucast; /* number of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /* number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /* number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /* number of ucast ACKS received (good FCS) */ uint32 rxdfrmocast; /* number of received DATA frames (good FCS and not matching RA) */ uint32 rxmfrmocast; /* number of received MGMT frames (good FCS and not matching RA) */ uint32 rxcfrmocast; /* number of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /* number of received RTS not addressed to the MAC */ uint32 rxctsocast; /* number of received CTS not addressed to the MAC */ uint32 rxdfrmmcast; /* number of RX Data multicast frames received by the MAC */ uint32 rxmfrmmcast; /* number of RX Management multicast frames received by the MAC */ uint32 rxcfrmmcast; /* number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /* beacons received from member of BSS */ uint32 rxdfrmucastobss; /* number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /* beacons received from other BSS */ uint32 rxrsptmout; /* Number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /* transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxf0ovfl; /* Number of receive fifo 0 overflows */ uint32 rxf1ovfl; /* Number of receive fifo 1 overflows (obsolete) */ uint32 rxf2ovfl; /* Number of receive fifo 2 overflows (obsolete) */ uint32 txsfovfl; /* Number of transmit status fifo overflows (obsolete) */ uint32 pmqovfl; /* Number of PMQ overflows */ uint32 rxcgprqfrm; /* Number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /* Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /* Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /* Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /* Number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 rxnack; /* obsolete */ uint32 frmscons; /* obsolete */ uint32 txnack; /* obsolete */ uint32 txglitch_nack; /* obsolete */ uint32 txburst; /* obsolete */ /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ uint32 txfrag; /* dot11TransmittedFragmentCount */ uint32 txmulti; /* dot11MulticastTransmittedFrameCount */ uint32 txfail; /* dot11FailedCount */ uint32 txretry; /* dot11RetryCount */ uint32 txretrie; /* dot11MultipleRetryCount */ uint32 rxdup; /* dot11FrameduplicateCount */ uint32 txrts; /* dot11RTSSuccessCount */ uint32 txnocts; /* dot11RTSFailureCount */ uint32 txnoack; /* dot11ACKFailureCount */ uint32 rxfrag; /* dot11ReceivedFragmentCount */ uint32 rxmulti; /* dot11MulticastReceivedFrameCount */ uint32 rxcrc; /* dot11FCSErrorCount */ uint32 txfrmsnt; /* dot11TransmittedFrameCount (bogus MIB?) */ uint32 rxundec; /* dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill; /* TKIPLocalMICFailures */ uint32 tkipcntrmsr; /* TKIPCounterMeasuresInvoked */ uint32 tkipreplay; /* TKIPReplays */ uint32 ccmpfmterr; /* CCMPFormatErrors */ uint32 ccmpreplay; /* CCMPReplays */ uint32 ccmpundec; /* CCMPDecryptErrors */ uint32 fourwayfail; /* FourWayHandshakeFailures */ uint32 wepundec; /* dot11WEPUndecryptableCount */ uint32 wepicverr; /* dot11WEPICVErrorCount */ uint32 decsuccess; /* DecryptSuccessCount */ uint32 tkipicverr; /* TKIPICVErrorCount */ uint32 wepexcluded; /* dot11WEPExcludedCount */ uint32 txchanrej; /* Tx frames suppressed due to channel rejection */ uint32 psmwds; /* Count PSM watchdogs */ uint32 phywatchdog; /* Count Phy watchdogs (triggered by ucode) */ /* MBSS counters, AP only */ uint32 prq_entries_handled; /* PRQ entries read in */ uint32 prq_undirected_entries; /* which were bcast bss & ssid */ uint32 prq_bad_entries; /* which could not be translated to info */ uint32 atim_suppress_count; /* TX suppressions on ATIM fifo */ uint32 bcn_template_not_ready; /* Template marked in use on send bcn ... */ uint32 bcn_template_not_ready_done; /* ...but "DMA done" interrupt rcvd */ uint32 late_tbtt_dpc; /* TBTT DPC did not happen in time */ /* per-rate receive stat counters */ uint32 rx1mbps; /* packets rx at 1Mbps */ uint32 rx2mbps; /* packets rx at 2Mbps */ uint32 rx5mbps5; /* packets rx at 5.5Mbps */ uint32 rx6mbps; /* packets rx at 6Mbps */ uint32 rx9mbps; /* packets rx at 9Mbps */ uint32 rx11mbps; /* packets rx at 11Mbps */ uint32 rx12mbps; /* packets rx at 12Mbps */ uint32 rx18mbps; /* packets rx at 18Mbps */ uint32 rx24mbps; /* packets rx at 24Mbps */ uint32 rx36mbps; /* packets rx at 36Mbps */ uint32 rx48mbps; /* packets rx at 48Mbps */ uint32 rx54mbps; /* packets rx at 54Mbps */ uint32 rx108mbps; /* packets rx at 108mbps */ uint32 rx162mbps; /* packets rx at 162mbps */ uint32 rx216mbps; /* packets rx at 216 mbps */ uint32 rx270mbps; /* packets rx at 270 mbps */ uint32 rx324mbps; /* packets rx at 324 mbps */ uint32 rx378mbps; /* packets rx at 378 mbps */ uint32 rx432mbps; /* packets rx at 432 mbps */ uint32 rx486mbps; /* packets rx at 486 mbps */ uint32 rx540mbps; /* packets rx at 540 mbps */ /* pkteng rx frame stats */ uint32 pktengrxducast; /* unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /* multicast frames rxed by the pkteng code */ uint32 rfdisable; /* count of radio disables */ uint32 bphy_rxcrsglitch; /* PHY count of bphy glitches */ uint32 txexptime; /* Tx frames suppressed due to timer expiration */ uint32 txmpdu_sgi; /* count for sgi transmit */ uint32 rxmpdu_sgi; /* count for sgi received */ uint32 txmpdu_stbc; /* count for stbc transmit */ uint32 rxmpdu_stbc; /* count for stbc received */ uint32 rxundec_mcst; /* dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill_mcst; /* TKIPLocalMICFailures */ uint32 tkipcntrmsr_mcst; /* TKIPCounterMeasuresInvoked */ uint32 tkipreplay_mcst; /* TKIPReplays */ uint32 ccmpfmterr_mcst; /* CCMPFormatErrors */ uint32 ccmpreplay_mcst; /* CCMPReplays */ uint32 ccmpundec_mcst; /* CCMPDecryptErrors */ uint32 fourwayfail_mcst; /* FourWayHandshakeFailures */ uint32 wepundec_mcst; /* dot11WEPUndecryptableCount */ uint32 wepicverr_mcst; /* dot11WEPICVErrorCount */ uint32 decsuccess_mcst; /* DecryptSuccessCount */ uint32 tkipicverr_mcst; /* TKIPICVErrorCount */ uint32 wepexcluded_mcst; /* dot11WEPExcludedCount */ uint32 dma_hang; /* count for stbc received */ uint32 rxrtry; /* number of packets with retry bit set to 1 */ } wl_cnt_ver_7_t; typedef struct { uint16 version; /**< see definition of WL_CNT_T_VERSION */ uint16 length; /**< length of entire structure */ /* transmit stat counters */ uint32 txframe; /**< tx data frames */ uint32 txbyte; /**< tx data bytes */ uint32 txretrans; /**< tx mac retransmits */ uint32 txerror; /**< tx data errors (derived: sum of others) */ uint32 txctl; /**< tx management frames */ uint32 txprshort; /**< tx short preamble frames */ uint32 txserr; /**< tx status errors */ uint32 txnobuf; /**< tx out of buffers errors */ uint32 txnoassoc; /**< tx discard because we're not associated */ uint32 txrunt; /**< tx runt frames */ uint32 txchit; /**< tx header cache hit (fastpath) */ uint32 txcmiss; /**< tx header cache miss (slowpath) */ /* transmit chip error counters */ uint32 txuflo; /**< tx fifo underflows */ uint32 txphyerr; /**< tx phy errors (indicated in tx status) */ uint32 txphycrs; /**< PR8861/8963 counter */ /* receive stat counters */ uint32 rxframe; /**< rx data frames */ uint32 rxbyte; /**< rx data bytes */ uint32 rxerror; /**< rx data errors (derived: sum of others) */ uint32 rxctl; /**< rx management frames */ uint32 rxnobuf; /**< rx out of buffers errors */ uint32 rxnondata; /**< rx non data frames in the data channel errors */ uint32 rxbadds; /**< rx bad DS errors */ uint32 rxbadcm; /**< rx bad control or management frames */ uint32 rxfragerr; /**< rx fragmentation errors */ uint32 rxrunt; /**< rx runt frames */ uint32 rxgiant; /**< rx giant frames */ uint32 rxnoscb; /**< rx no scb error */ uint32 rxbadproto; /**< rx invalid frames */ uint32 rxbadsrcmac; /**< rx frames with Invalid Src Mac */ uint32 rxbadda; /**< rx frames tossed for invalid da */ uint32 rxfilter; /**< rx frames filtered out */ /* receive chip error counters */ uint32 rxoflo; /**< rx fifo overflow errors */ uint32 rxuflo[NFIFO]; /**< rx dma descriptor underflow errors */ uint32 d11cnt_txrts_off; /**< d11cnt txrts value when reset d11cnt */ uint32 d11cnt_rxcrc_off; /**< d11cnt rxcrc value when reset d11cnt */ uint32 d11cnt_txnocts_off; /**< d11cnt txnocts value when reset d11cnt */ /* misc counters */ uint32 dmade; /**< tx/rx dma descriptor errors */ uint32 dmada; /**< tx/rx dma data errors */ uint32 dmape; /**< tx/rx dma descriptor protocol errors */ uint32 reset; /**< reset count */ uint32 tbtt; /**< cnts the TBTT int's */ uint32 txdmawar; /**< # occurrences of PR15420 workaround */ uint32 pkt_callback_reg_fail; /**< callbacks register failure */ /* MAC counters: 32-bit version of d11.h's macstat_t */ uint32 txallfrm; /**< total number of frames sent, incl. Data, ACK, RTS, CTS, * Control Management (includes retransmissions) */ uint32 txrtsfrm; /**< number of RTS sent out by the MAC */ uint32 txctsfrm; /**< number of CTS sent out by the MAC */ uint32 txackfrm; /**< number of ACK frames sent out */ uint32 txdnlfrm; /**< Not used */ uint32 txbcnfrm; /**< beacons transmitted */ uint32 txfunfl[6]; /**< per-fifo tx underflows */ uint32 rxtoolate; /**< receive too late */ uint32 txfbw; /**< transmit at fallback bw (dynamic bw) */ uint32 txtplunfl; /**< Template underflows (mac was too slow to transmit ACK/CTS * or BCN) */ uint32 txphyerror; /**< Transmit phy error, type of error is reported in tx-status for * driver enqueued frames */ uint32 rxfrmtoolong; /**< Received frame longer than legal limit (2346 bytes) */ uint32 rxfrmtooshrt; /**< Received frame did not contain enough bytes for its frame type */ uint32 rxinvmachdr; /**< Either the protocol version != 0 or frame type not * data/control/management */ uint32 rxbadfcs; /**< number of frames for which the CRC check failed in the MAC */ uint32 rxbadplcp; /**< parity check of the PLCP header failed */ uint32 rxcrsglitch; /**< PHY was able to correlate the preamble but not the header */ uint32 rxstrt; /**< Number of received frames with a good PLCP * (i.e. passing parity check) */ uint32 rxdfrmucastmbss; /**< # of received DATA frames with good FCS and matching RA */ uint32 rxmfrmucastmbss; /**< # of received mgmt frames with good FCS and matching RA */ uint32 rxcfrmucast; /**< # of received CNTRL frames with good FCS and matching RA */ uint32 rxrtsucast; /**< number of unicast RTS addressed to the MAC (good FCS) */ uint32 rxctsucast; /**< number of unicast CTS addressed to the MAC (good FCS) */ uint32 rxackucast; /**< number of ucast ACKS received (good FCS) */ uint32 rxdfrmocast; /**< # of received DATA frames (good FCS and not matching RA) */ uint32 rxmfrmocast; /**< # of received MGMT frames (good FCS and not matching RA) */ uint32 rxcfrmocast; /**< # of received CNTRL frame (good FCS and not matching RA) */ uint32 rxrtsocast; /**< number of received RTS not addressed to the MAC */ uint32 rxctsocast; /**< number of received CTS not addressed to the MAC */ uint32 rxdfrmmcast; /**< number of RX Data multicast frames received by the MAC */ uint32 rxmfrmmcast; /**< number of RX Management multicast frames received by the MAC */ uint32 rxcfrmmcast; /**< number of RX Control multicast frames received by the MAC * (unlikely to see these) */ uint32 rxbeaconmbss; /**< beacons received from member of BSS */ uint32 rxdfrmucastobss; /**< number of unicast frames addressed to the MAC from * other BSS (WDS FRAME) */ uint32 rxbeaconobss; /**< beacons received from other BSS */ uint32 rxrsptmout; /**< Number of response timeouts for transmitted frames * expecting a response */ uint32 bcntxcancl; /**< transmit beacons canceled due to receipt of beacon (IBSS) */ uint32 rxf0ovfl; /**< Number of receive fifo 0 overflows */ uint32 rxf1ovfl; /**< Number of receive fifo 1 overflows (obsolete) */ uint32 rxf2ovfl; /**< Number of receive fifo 2 overflows (obsolete) */ uint32 txsfovfl; /**< Number of transmit status fifo overflows (obsolete) */ uint32 pmqovfl; /**< Number of PMQ overflows */ uint32 rxcgprqfrm; /**< Number of received Probe requests that made it into * the PRQ fifo */ uint32 rxcgprsqovfl; /**< Rx Probe Request Que overflow in the AP */ uint32 txcgprsfail; /**< Tx Probe Response Fail. AP sent probe response but did * not get ACK */ uint32 txcgprssuc; /**< Tx Probe Response Success (ACK was received) */ uint32 prs_timeout; /**< Number of probe requests that were dropped from the PRQ * fifo because a probe response could not be sent out within * the time limit defined in M_PRS_MAXTIME */ uint32 rxnack; /**< Number of NACKS received (Afterburner) */ uint32 frmscons; /**< Number of frames completed without transmission because of an * Afterburner re-queue */ uint32 txnack; /**< obsolete */ uint32 rxback; /**< blockack rxcnt */ uint32 txback; /**< blockack txcnt */ /* 802.11 MIB counters, pp. 614 of 802.11 reaff doc. */ uint32 txfrag; /**< dot11TransmittedFragmentCount */ uint32 txmulti; /**< dot11MulticastTransmittedFrameCount */ uint32 txfail; /**< dot11FailedCount */ uint32 txretry; /**< dot11RetryCount */ uint32 txretrie; /**< dot11MultipleRetryCount */ uint32 rxdup; /**< dot11FrameduplicateCount */ uint32 txrts; /**< dot11RTSSuccessCount */ uint32 txnocts; /**< dot11RTSFailureCount */ uint32 txnoack; /**< dot11ACKFailureCount */ uint32 rxfrag; /**< dot11ReceivedFragmentCount */ uint32 rxmulti; /**< dot11MulticastReceivedFrameCount */ uint32 rxcrc; /**< dot11FCSErrorCount */ uint32 txfrmsnt; /**< dot11TransmittedFrameCount (bogus MIB?) */ uint32 rxundec; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay; /**< TKIPReplays */ uint32 ccmpfmterr; /**< CCMPFormatErrors */ uint32 ccmpreplay; /**< CCMPReplays */ uint32 ccmpundec; /**< CCMPDecryptErrors */ uint32 fourwayfail; /**< FourWayHandshakeFailures */ uint32 wepundec; /**< dot11WEPUndecryptableCount */ uint32 wepicverr; /**< dot11WEPICVErrorCount */ uint32 decsuccess; /**< DecryptSuccessCount */ uint32 tkipicverr; /**< TKIPICVErrorCount */ uint32 wepexcluded; /**< dot11WEPExcludedCount */ uint32 rxundec_mcst; /**< dot11WEPUndecryptableCount */ /* WPA2 counters (see rxundec for DecryptFailureCount) */ uint32 tkipmicfaill_mcst; /**< TKIPLocalMICFailures */ uint32 tkipcntrmsr_mcst; /**< TKIPCounterMeasuresInvoked */ uint32 tkipreplay_mcst; /**< TKIPReplays */ uint32 ccmpfmterr_mcst; /**< CCMPFormatErrors */ uint32 ccmpreplay_mcst; /**< CCMPReplays */ uint32 ccmpundec_mcst; /**< CCMPDecryptErrors */ uint32 fourwayfail_mcst; /**< FourWayHandshakeFailures */ uint32 wepundec_mcst; /**< dot11WEPUndecryptableCount */ uint32 wepicverr_mcst; /**< dot11WEPICVErrorCount */ uint32 decsuccess_mcst; /**< DecryptSuccessCount */ uint32 tkipicverr_mcst; /**< TKIPICVErrorCount */ uint32 wepexcluded_mcst; /**< dot11WEPExcludedCount */ uint32 txchanrej; /**< Tx frames suppressed due to channel rejection */ uint32 txexptime; /**< Tx frames suppressed due to timer expiration */ uint32 psmwds; /**< Count PSM watchdogs */ uint32 phywatchdog; /**< Count Phy watchdogs (triggered by ucode) */ /* MBSS counters, AP only */ uint32 prq_entries_handled; /**< PRQ entries read in */ uint32 prq_undirected_entries; /**< which were bcast bss & ssid */ uint32 prq_bad_entries; /**< which could not be translated to info */ uint32 atim_suppress_count; /**< TX suppressions on ATIM fifo */ uint32 bcn_template_not_ready; /**< Template marked in use on send bcn ... */ uint32 bcn_template_not_ready_done; /**< ...but "DMA done" interrupt rcvd */ uint32 late_tbtt_dpc; /**< TBTT DPC did not happen in time */ /* per-rate receive stat counters */ uint32 rx1mbps; /**< packets rx at 1Mbps */ uint32 rx2mbps; /**< packets rx at 2Mbps */ uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ uint32 rx6mbps; /**< packets rx at 6Mbps */ uint32 rx9mbps; /**< packets rx at 9Mbps */ uint32 rx11mbps; /**< packets rx at 11Mbps */ uint32 rx12mbps; /**< packets rx at 12Mbps */ uint32 rx18mbps; /**< packets rx at 18Mbps */ uint32 rx24mbps; /**< packets rx at 24Mbps */ uint32 rx36mbps; /**< packets rx at 36Mbps */ uint32 rx48mbps; /**< packets rx at 48Mbps */ uint32 rx54mbps; /**< packets rx at 54Mbps */ uint32 rx108mbps; /**< packets rx at 108mbps */ uint32 rx162mbps; /**< packets rx at 162mbps */ uint32 rx216mbps; /**< packets rx at 216 mbps */ uint32 rx270mbps; /**< packets rx at 270 mbps */ uint32 rx324mbps; /**< packets rx at 324 mbps */ uint32 rx378mbps; /**< packets rx at 378 mbps */ uint32 rx432mbps; /**< packets rx at 432 mbps */ uint32 rx486mbps; /**< packets rx at 486 mbps */ uint32 rx540mbps; /**< packets rx at 540 mbps */ /* pkteng rx frame stats */ uint32 pktengrxducast; /**< unicast frames rxed by the pkteng code */ uint32 pktengrxdmcast; /**< multicast frames rxed by the pkteng code */ uint32 rfdisable; /**< count of radio disables */ uint32 bphy_rxcrsglitch; /**< PHY count of bphy glitches */ uint32 bphy_badplcp; uint32 txmpdu_sgi; /**< count for sgi transmit */ uint32 rxmpdu_sgi; /**< count for sgi received */ uint32 txmpdu_stbc; /**< count for stbc transmit */ uint32 rxmpdu_stbc; /**< count for stbc received */ uint32 rxdrop20s; /**< drop secondary cnt */ /* All counter variables have to be of uint32. */ } wl_cnt_ver_6_t; #define WL_DELTA_STATS_T_VERSION 2 /**< current version of wl_delta_stats_t struct */ typedef struct { uint16 version; /**< see definition of WL_DELTA_STATS_T_VERSION */ uint16 length; /**< length of entire structure */ /* transmit stat counters */ uint32 txframe; /**< tx data frames */ uint32 txbyte; /**< tx data bytes */ uint32 txretrans; /**< tx mac retransmits */ uint32 txfail; /**< tx failures */ /* receive stat counters */ uint32 rxframe; /**< rx data frames */ uint32 rxbyte; /**< rx data bytes */ /* per-rate receive stat counters */ uint32 rx1mbps; /**< packets rx at 1Mbps */ uint32 rx2mbps; /**< packets rx at 2Mbps */ uint32 rx5mbps5; /**< packets rx at 5.5Mbps */ uint32 rx6mbps; /**< packets rx at 6Mbps */ uint32 rx9mbps; /**< packets rx at 9Mbps */ uint32 rx11mbps; /**< packets rx at 11Mbps */ uint32 rx12mbps; /**< packets rx at 12Mbps */ uint32 rx18mbps; /**< packets rx at 18Mbps */ uint32 rx24mbps; /**< packets rx at 24Mbps */ uint32 rx36mbps; /**< packets rx at 36Mbps */ uint32 rx48mbps; /**< packets rx at 48Mbps */ uint32 rx54mbps; /**< packets rx at 54Mbps */ uint32 rx108mbps; /**< packets rx at 108mbps */ uint32 rx162mbps; /**< packets rx at 162mbps */ uint32 rx216mbps; /**< packets rx at 216 mbps */ uint32 rx270mbps; /**< packets rx at 270 mbps */ uint32 rx324mbps; /**< packets rx at 324 mbps */ uint32 rx378mbps; /**< packets rx at 378 mbps */ uint32 rx432mbps; /**< packets rx at 432 mbps */ uint32 rx486mbps; /**< packets rx at 486 mbps */ uint32 rx540mbps; /**< packets rx at 540 mbps */ /* phy stats */ uint32 rxbadplcp; uint32 rxcrsglitch; uint32 bphy_rxcrsglitch; uint32 bphy_badplcp; uint32 slice_index; /**< Slice for which stats are reported */ } wl_delta_stats_t; /* Partial statistics counter report */ #define WL_CNT_CTL_MGT_FRAMES 0 typedef struct { uint16 type; uint16 len; /* detailed control/management frames */ uint32 txnull; uint32 rxnull; uint32 txqosnull; uint32 rxqosnull; uint32 txassocreq; uint32 rxassocreq; uint32 txreassocreq; uint32 rxreassocreq; uint32 txdisassoc; uint32 rxdisassoc; uint32 txassocrsp; uint32 rxassocrsp; uint32 txreassocrsp; uint32 rxreassocrsp; uint32 txauth; uint32 rxauth; uint32 txdeauth; uint32 rxdeauth; uint32 txprobereq; uint32 rxprobereq; uint32 txprobersp; uint32 rxprobersp; uint32 txaction; uint32 rxaction; uint32 txrts; uint32 rxrts; uint32 txcts; uint32 rxcts; uint32 txack; uint32 rxack; uint32 txbar; uint32 rxbar; uint32 txback; uint32 rxback; uint32 txpspoll; uint32 rxpspoll; } wl_ctl_mgt_cnt_t; typedef struct { uint32 packets; uint32 bytes; } wl_traffic_stats_t; typedef struct { uint16 version; /**< see definition of WL_WME_CNT_VERSION */ uint16 length; /**< length of entire structure */ wl_traffic_stats_t tx[AC_COUNT]; /**< Packets transmitted */ wl_traffic_stats_t tx_failed[AC_COUNT]; /**< Packets dropped or failed to transmit */ wl_traffic_stats_t rx[AC_COUNT]; /**< Packets received */ wl_traffic_stats_t rx_failed[AC_COUNT]; /**< Packets failed to receive */ wl_traffic_stats_t forward[AC_COUNT]; /**< Packets forwarded by AP */ wl_traffic_stats_t tx_expired[AC_COUNT]; /**< packets dropped due to lifetime expiry */ } wl_wme_cnt_t; struct wl_msglevel2 { uint32 low; uint32 high; }; /* A versioned structure for setting and retrieving debug message levels. */ #define WL_MSGLEVEL_STRUCT_VERSION_1 1 typedef struct wl_msglevel_v1 { uint16 version; uint16 length; uint32 msglevel1; uint32 msglevel2; uint32 msglevel3; /* add another uint32 when full */ } wl_msglevel_v1_t; #define WL_ICMP_IPV6_CFG_VERSION_1 1u #define WL_ICMP_IPV6_CLEAR_ALL (1u << 0u) typedef struct wl_icmp_ipv6_cfg { uint16 version; uint16 length; uint16 fixed_length; uint16 flags; uint32 num_ipv6; /* num_ipv6 to follow */ struct ipv6_addr host_ipv6[]; } wl_icmp_ipv6_cfg_t; #define WL_ICMP_CFG_IPV6_FIXED_LEN OFFSETOF(wl_icmp_ipv6_cfg_t, host_ipv6) #define WL_ICMP_CFG_IPV6_LEN(count) (WL_ICMP_CFG_IPV6_FIXED_LEN + \ ((count) * sizeof(struct ipv6_addr))) typedef struct wl_mkeep_alive_pkt_v1 { uint16 version; /* Version for mkeep_alive */ uint16 length; /* length of fixed parameters in the structure */ uint32 period_msec; /* high bit on means immediate send */ uint16 len_bytes; uint8 keep_alive_id; /* 0 - 3 for N = 4 */ uint8 data[BCM_FLEX_ARRAY]; } wl_mkeep_alive_pkt_v1_t; #define WL_MKEEP_ALIVE_VERSION_1 1u #define WL_MKEEP_ALIVE_VERSION_2 2u /* 1/2 second precision since idle time is a seconds counter anyway */ #define WL_MKEEP_ALIVE_PRECISION 500 #define WL_MKEEP_ALIVE_PERIOD_MASK 0x7FFFFFFF #define WL_MKEEP_ALIVE_IMMEDIATE 0x80000000 #define WL_MKEEP_ALIVE_FIXED_LEN OFFSETOF(wl_mkeep_alive_pkt_v1_t, data) typedef struct wl_mkeep_alive_pkt_v2 { uint16 version; /* Version for mkeep_alive */ uint16 length; /* length of fixed parameters in the structure */ uint32 period_msec; /* high bit on means immediate send */ uint16 len_bytes; uint16 retry_cnt; /* keep alive alive pkt retry count */ uint8 PAD[2]; uint8 keep_alive_id; /* 0 - 3 for N = 4 */ uint8 data[BCM_FLEX_ARRAY]; } wl_mkeep_alive_pkt_v2_t; typedef struct wl_mkeep_alive_hist_info_v1 { uint32 first_pktsend_ts; /**< timestamp(ms): packet was sent */ uint32 first_txs_ts; /**< timestamp(ms): received the first txstatus */ uint32 last_retry_txs_ts; /**< timestamp(ms): received the last txstatus */ uint32 first_retry_ts; /**< timestamp(ms): resent the packet first time */ uint32 last_retry_ts; /**< timestamp(ms): resent the packet last time */ uint32 first_txs; /**< txstatus when dongle received first time */ uint32 last_retry_txs; /**< txstatus when dongle received last time */ uint32 retry_cnt; /**< number of retries for the packet */ } wl_mkeep_alive_hist_info_v1_t; typedef struct wl_mkeep_alive_hist_req_v1 { uint16 version; /**< version of structure */ uint16 length; /**< length of this structure */ uint16 flags; /**< mkeepalive idx, operation codes */ uint16 count; /**< number of results */ uint16 max; /**< maximum number of history */ uint16 PAD; wl_mkeep_alive_hist_info_v1_t info[]; /**< struct array of length count */ } wl_mkeep_alive_hist_req_v1_t; /* version of the mkeep_alive_hist IOVAR */ #define WL_MKEEP_ALIVE_HIST_REQ_VER_1 1u /* Fixed length of wl_mkeep_alive_hist_req_v1_t */ #define WL_MKEEP_ALIVE_HIST_REQ_FIXED_LEN_VER_1 OFFSETOF(wl_mkeep_alive_hist_req_v1_t, info) /* Keepalive ID */ #define WL_MKEEP_ALIVE_HIST_ID_MASK 0xFF00u /**< ID mask */ #define WL_MKEEP_ALIVE_HIST_ID_SHIFT 8u /**< Offset of keepalive ID */ /* OP Codes */ #define WL_MKEEP_ALIVE_HIST_OP_MASK 0x00FFu /**< OP code mask */ #define WL_MKEEP_ALIVE_HIST_RESET (0x1u << 0u) /**< Clear history of specified ID */ #define WL_MKEEP_ALIVE_HIST_RESET_ALL (0x1u << 1u) /**< Clear all history */ /** TCP Keep-Alive conn struct */ typedef struct wl_mtcpkeep_alive_conn_pkt { struct ether_addr saddr; /**< src mac address */ struct ether_addr daddr; /**< dst mac address */ struct ipv4_addr sipaddr; /**< source IP addr */ struct ipv4_addr dipaddr; /**< dest IP addr */ uint16 sport; /**< src port */ uint16 dport; /**< dest port */ uint32 seq; /**< seq number */ uint32 ack; /**< ACK number */ uint16 tcpwin; /**< TCP window */ uint16 PAD; } wl_mtcpkeep_alive_conn_pkt_t; /** TCP Keep-Alive interval struct */ typedef struct wl_mtcpkeep_alive_timers_pkt { uint16 interval; /**< interval timer */ uint16 retry_interval; /**< retry_interval timer */ uint16 retry_count; /**< retry_count */ } wl_mtcpkeep_alive_timers_pkt_t; typedef struct wake_info { uint32 wake_reason; uint32 wake_info_len; /**< size of packet */ uint8 packet[]; } wake_info_t; typedef struct wake_pkt { uint32 wake_pkt_len; /**< size of packet */ uint8 packet[]; } wake_pkt_t; #define WL_MTCPKEEP_ALIVE_VERSION 1 /* #ifdef WLBA */ #define WLC_BA_CNT_VERSION_1 1 /**< current version of wlc_ba_cnt_t */ /** block ack related stats */ typedef struct wlc_ba_cnt { uint16 version; /**< WLC_BA_CNT_VERSION */ uint16 length; /**< length of entire structure */ /* transmit stat counters */ uint32 txpdu; /**< pdus sent */ uint32 txsdu; /**< sdus sent */ uint32 txfc; /**< tx side flow controlled packets */ uint32 txfci; /**< tx side flow control initiated */ uint32 txretrans; /**< retransmitted pdus */ uint32 txbatimer; /**< ba resend due to timer */ uint32 txdrop; /**< dropped packets */ uint32 txaddbareq; /**< addba req sent */ uint32 txaddbaresp; /**< addba resp sent */ uint32 txdelba; /**< delba sent */ uint32 txba; /**< ba sent */ uint32 txbar; /**< bar sent */ uint32 txpad[4]; /**< future */ /* receive side counters */ uint32 rxpdu; /**< pdus recd */ uint32 rxqed; /**< pdus buffered before sending up */ uint32 rxdup; /**< duplicate pdus */ uint32 rxnobuf; /**< pdus discarded due to no buf */ uint32 rxaddbareq; /**< addba req recd */ uint32 rxaddbaresp; /**< addba resp recd */ uint32 rxdelba; /**< delba recd */ uint32 rxba; /**< ba recd */ uint32 rxbar; /**< bar recd */ uint32 rxinvba; /**< invalid ba recd */ uint32 rxbaholes; /**< ba recd with holes */ uint32 rxunexp; /**< unexpected packets */ uint32 rxpad[4]; /**< future */ } wlc_ba_cnt_t; /* #endif WLBA */ /** structure for per-tid ampdu control */ struct ampdu_tid_control { uint8 tid; /* tid */ uint8 enable; /* enable/disable */ }; /** Support for ampdu_tx_ba_window_cfg */ #define WL_AMPDU_TX_BA_WINDOW_CFG_VER_1 1u /* 16 bits Config (5 bits reserved) and Status (2 bits reserved) */ #define WL_AMPDU_TX_BA_WINDOW_CFG_BA_WSIZE_IDX 0u #define WL_AMPDU_TX_BA_WINDOW_CFG_BA_WSIZE_FSZ 9u #define WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_IDX 9u #define WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_FSZ 2u #define WL_AMPDU_TX_BA_WINDOW_CFG_STATE_IDX 11u #define WL_AMPDU_TX_BA_WINDOW_CFG_STATE_FSZ 3u #define WL_AMPDU_TX_BA_WINDOW_CFG_BA_WSIZE_MASK \ (MAXBITVAL(WL_AMPDU_TX_BA_WINDOW_CFG_BA_WSIZE_FSZ) << \ WL_AMPDU_TX_BA_WINDOW_CFG_BA_WSIZE_IDX) #define WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_MASK \ (MAXBITVAL(WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_FSZ) << \ WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_IDX) #define WL_AMPDU_TX_BA_WINDOW_CFG_STATE_MASK \ (MAXBITVAL(WL_AMPDU_TX_BA_WINDOW_CFG_STATE_FSZ) << \ WL_AMPDU_TX_BA_WINDOW_CFG_STATE_IDX) /* code for config assoc_type */ enum { WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_AX = 0, WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_UNIVERSAL = 1, WL_AMPDU_TX_BA_WINDOW_CFG_ASSOC_TYPE_MAX = 2 }; /* ampdu_tx_ba_window_cfg states */ enum { WL_AMPDU_TX_BA_WINDOW_CFG_STATE_OFF = 0, WL_AMPDU_TX_BA_WINDOW_CFG_STATE_NEGOTIATING = 1, WL_AMPDU_TX_BA_WINDOW_CFG_STATE_NEGOTIATED = 2, WL_AMPDU_TX_BA_WINDOW_CFG_STATE_MAX = 3 }; /** structure for per tid ampdu BA window configuration */ typedef struct wl_ampdu_tx_ba_window_cfg_v1 { uint16 version; uint16 length; /* length of the entire structure ver+len+payload. */ /* tid bitmap: * input (SET): select tid to configure. * output (GET): TID that is currently configured. */ uint8 tidbmp; uint8 flag; /* currently not used. Reserved. 32-bit alignment. */ uint16 PAD; /* Per-tid configuration tuple (tx_ba_wsize, assoctype). Used for GET and SET. * bit0 - bit8: User configured TX BA window size. Range {0, max. FW supported}. * bit9 - bit10: User configured association type. 0: 11ax association, 1: universal. * bit11 - bit15: Reserved. */ uint16 config[NUMPRIO]; /* Status of the per-tid configuration: GET only * bit0 - bit8: Resulted TX BA window size. * bit9 - bit10: Reserved. * bit11 - bit13: TX BA configuration state. * bit14 - bit15: Reserved. */ uint16 status[NUMPRIO]; } wl_ampdu_tx_ba_window_cfg_v1_t; /** Support for ampdu_rx_ba_window_cfg */ #define WL_AMPDU_RX_BA_WINDOW_CFG_VER_1 1u /** structure for per tid ampdu BA window configuration */ typedef struct wl_ampdu_rx_ba_window_cfg_v1 { uint16 version; uint16 length; /* length of the entire structurer+len+payload. */ /* tid bitmap:0-7 bit 0 is zero TID and follow on. * input (SET): select tid to configure. */ uint8 tidbmp; uint8 PAD[3]; /* Per-tid configuration. Used for GET and SET. * * User configured RX BA window size. Range {0, max. FW supported}. */ uint16 ba_wsize[NUMPRIO]; } wl_ampdu_rx_ba_window_cfg_v1_t; /** struct for ampdu tx/rx aggregation control */ struct ampdu_aggr { int8 aggr_override; /**< aggr overrided by dongle. Not to be set by host. */ uint16 conf_TID_bmap; /**< bitmap of TIDs to configure */ uint16 enab_TID_bmap; /**< enable/disable per TID */ }; /** structure for identifying ea/tid for sending addba/delba */ struct ampdu_ea_tid { struct ether_addr ea; /**< Station address */ uint8 tid; /**< tid */ uint8 initiator; /**< 0 is recipient, 1 is originator */ }; /** structure for identifying retry/tid for retry_limit_tid/rr_retry_limit_tid */ struct ampdu_retry_tid { uint8 tid; /**< tid */ uint8 retry; /**< retry value */ }; struct ampdu_timeout_tid { uint8 timeout[NUMPRIO]; /* Timeout per TID */ uint8 bitmap; /* Bitmap for each TID */ }; #define BDD_FNAME_LEN 32 /**< Max length of friendly name */ typedef struct bdd_fname { uint8 len; /**< length of friendly name */ uchar name[BDD_FNAME_LEN]; /**< friendly name */ } bdd_fname_t; /* structure for addts arguments */ /** For ioctls that take a list of TSPEC */ struct tslist { int32 count; /**< number of tspecs */ struct tsinfo_arg tsinfo[]; /**< variable length array of tsinfo */ }; /* WLTDLS */ /**structure for tdls iovars */ typedef struct tdls_iovar { struct ether_addr ea; /**< Station address */ uint8 mode; /**< mode: depends on iovar */ uint8 PAD; chanspec_t chanspec; uint8 PAD[6]; } tdls_iovar_t; #define TDLS_WFD_IE_SIZE 512 /**structure for tdls wfd ie */ typedef struct tdls_wfd_ie_iovar { struct ether_addr ea; /**< Station address */ uint8 mode; uint8 PAD; uint16 length; uint8 data[TDLS_WFD_IE_SIZE]; } tdls_wfd_ie_iovar_t; /* #endif WLTDLS */ /** structure for addts/delts arguments */ typedef struct tspec_arg { uint16 version; /**< see definition of TSPEC_ARG_VERSION */ uint16 length; /**< length of entire structure */ uint32 flag; /**< bit field */ /* TSPEC Arguments */ struct tsinfo_arg tsinfo; /**< TS Info bit field */ uint8 PAD; uint16 nom_msdu_size; /**< (Nominal or fixed) MSDU Size (bytes) */ uint16 max_msdu_size; /**< Maximum MSDU Size (bytes) */ uint32 min_srv_interval; /**< Minimum Service Interval (us) */ uint32 max_srv_interval; /**< Maximum Service Interval (us) */ uint32 inactivity_interval; /**< Inactivity Interval (us) */ uint32 suspension_interval; /**< Suspension Interval (us) */ uint32 srv_start_time; /**< Service Start Time (us) */ uint32 min_data_rate; /**< Minimum Data Rate (bps) */ uint32 mean_data_rate; /**< Mean Data Rate (bps) */ uint32 peak_data_rate; /**< Peak Data Rate (bps) */ uint32 max_burst_size; /**< Maximum Burst Size (bytes) */ uint32 delay_bound; /**< Delay Bound (us) */ uint32 min_phy_rate; /**< Minimum PHY Rate (bps) */ uint16 surplus_bw; /**< Surplus Bandwidth Allowance (range 1.0 to 8.0) */ uint16 medium_time; /**< Medium Time (32 us/s periods) */ uint8 dialog_token; /**< dialog token */ uint8 PAD[3]; } tspec_arg_t; /** tspec arg for desired station */ typedef struct tspec_per_sta_arg { struct ether_addr ea; uint8 PAD[2]; struct tspec_arg ts; } tspec_per_sta_arg_t; /** structure for max bandwidth for each access category */ typedef struct wme_max_bandwidth { uint32 ac[AC_COUNT]; /**< max bandwidth for each access category */ } wme_max_bandwidth_t; #define WL_WME_MBW_PARAMS_IO_BYTES (sizeof(wme_max_bandwidth_t)) /* current version of wl_tspec_arg_t struct */ #define TSPEC_ARG_VERSION 2 /**< current version of wl_tspec_arg_t struct */ #define TSPEC_ARG_LENGTH 55 /**< argument length from tsinfo to medium_time */ #define TSPEC_DEFAULT_DIALOG_TOKEN 42 /**< default dialog token */ #define TSPEC_DEFAULT_SBW_FACTOR 0x3000 /**< default surplus bw */ #define WL_WOWL_KEEPALIVE_MAX_PACKET_SIZE 80 #define WLC_WOWL_MAX_KEEPALIVE 2 /** Packet lifetime configuration per ac */ typedef struct wl_lifetime { uint32 ac; /**< access class */ uint32 lifetime; /**< Packet lifetime value in ms */ } wl_lifetime_t; /** Management time configuration */ typedef struct wl_lifetime_mg { uint32 mgmt_bitmap; /**< Mgmt subtype */ uint32 lifetime; /**< Packet lifetime value in us */ } wl_lifetime_mg_t; /* MAC Sample Capture related */ #define WL_MACCAPTR_DEFSTART_PTR 0xA00 #define WL_MACCAPTR_DEFSTOP_PTR 0xA3F #define WL_MACCAPTR_DEFSZ 0x3F #define WL_MACCAPTR_DEF_MASK 0xFFFFFFFF typedef enum { WL_MACCAPT_TRIG = 0, WL_MACCAPT_STORE = 1, WL_MACCAPT_TRANS = 2, WL_MACCAPT_MATCH = 3 } maccaptr_optn; typedef enum { WL_MACCAPT_STRT = 1, WL_MACCAPT_STOP = 2, WL_MACCAPT_RST = 3 } maccaptr_cmd_t; /* MAC Sample Capture Set-up Paramters */ typedef struct wl_maccapture_params { uint8 gpio_sel; uint8 la_mode; /* TRUE: GPIO Out Enabled */ uint8 PAD[2]; uint32 start_ptr; /* Start address to store */ uint32 stop_ptr; /* Stop address to store */ uint8 optn_bmp; /* Options */ uint8 PAD[3]; /* Don't change the order after this nor * add anything in betw. Code uses offsets to populate * registers */ uint32 tr_mask; /* Trigger Mask */ uint32 tr_val; /* Trigger Value */ uint32 s_mask; /* Store Mode Mask */ uint32 x_mask; /* Trans. Mode Mask */ uint32 m_mask; /* Match Mode Mask */ uint32 m_val; /* Match Value */ maccaptr_cmd_t cmd; /* Start / Stop */ } wl_maccapture_params_t; /** Channel Switch Announcement param */ typedef struct wl_chan_switch { uint8 mode; /**< value 0 or 1 */ uint8 count; /**< count # of beacons before switching */ chanspec_t chspec; /**< chanspec */ uint8 reg; /**< regulatory class */ uint8 frame_type; /**< csa frame type, unicast or broadcast */ } wl_chan_switch_t; enum { PFN_LIST_ORDER, PFN_RSSI }; enum { DISABLE, ENABLE }; enum { OFF_ADAPT, SMART_ADAPT, STRICT_ADAPT, SLOW_ADAPT }; #define SORT_CRITERIA_BIT 0 #define AUTO_NET_SWITCH_BIT 1 #define ENABLE_BKGRD_SCAN_BIT 2 #define IMMEDIATE_SCAN_BIT 3 #define AUTO_CONNECT_BIT 4 #define ENABLE_BD_SCAN_BIT 5 #define ENABLE_ADAPTSCAN_BIT 6 #define IMMEDIATE_EVENT_BIT 8 #define SUPPRESS_SSID_BIT 9 #define ENABLE_NET_OFFLOAD_BIT 10 /** report found/lost events for SSID and BSSID networks seperately */ #define REPORT_SEPERATELY_BIT 11 #define PFN_FULL_SCAN_RESULT_BIT 12 #define SORT_CRITERIA_MASK 0x0001 #define AUTO_NET_SWITCH_MASK 0x0002 #define ENABLE_BKGRD_SCAN_MASK 0x0004 #define IMMEDIATE_SCAN_MASK 0x0008 #define AUTO_CONNECT_MASK 0x0010 #define ENABLE_BD_SCAN_MASK 0x0020 #define ENABLE_ADAPTSCAN_MASK 0x00c0 #define IMMEDIATE_EVENT_MASK 0x0100 #define SUPPRESS_SSID_MASK 0x0200 #define ENABLE_NET_OFFLOAD_MASK 0x0400 /** report found/lost events for SSID and BSSID networks seperately */ #define REPORT_SEPERATELY_MASK 0x0800 #define PFNFULLSCAN_RESULT_MASK 0x1000 #define PFN_COMPLETE 1 #define PFN_INCOMPLETE 0 #define DEFAULT_BESTN 2 #define DEFAULT_MSCAN 0 #define DEFAULT_REPEAT 10 #define DEFAULT_EXP 2 #define PFN_PARTIAL_SCAN_BIT 0 #define PFN_PARTIAL_SCAN_MASK 1 #define PFN_SWC_RSSI_WINDOW_MAX 8 #define PFN_SWC_MAX_NUM_APS 16 #define PFN_HOTLIST_MAX_NUM_APS 64 #define MAX_EPNO_HIDDEN_SSID 8 #define MAX_WHITELIST_SSID 2 #define WL_PFN_SHORTSSID_LEN 4u #define WL_PFN_SUBNET_FLAGS_IS_SHORT_SSID 0x01u /* subnet flags bit 0 */ #define WL_PFN_SUBNET_FLAGS_MATCH_SHORT_SSID 0x02u /* subnet flags bit 1 */ /* Version 1 and 2 for various scan results structures defined below */ #define PFN_SCANRESULTS_VERSION_V1 1u #define PFN_SCANRESULTS_VERSION_V2 2u #define PFN_SCANRESULTS_VERSION_V3 3u #define PFN_SCANRESULTS_VERSION_V4 4u #define PFN_SCANRESULTS_VERSION_V5 5u /** PFN network info structure */ typedef struct wl_pfn_subnet_info_v1 { struct ether_addr BSSID; uint8 channel; /**< channel number only */ uint8 SSID_len; uint8 SSID[32]; } wl_pfn_subnet_info_v1_t; typedef struct wl_pfn_subnet_info_v2 { struct ether_addr BSSID; uint8 channel; /**< channel number only */ uint8 SSID_len; union { uint8 SSID[32]; uint16 index; } u; } wl_pfn_subnet_info_v2_t; typedef struct wl_pfn_subnet_info_v3 { struct ether_addr BSSID; chanspec_t chanspec; /**< with 6G chanspec only */ uint8 SSID_len; uint8 PAD; uint16 flags; union { uint8 SSID[32]; uint16 index; } u; } wl_pfn_subnet_info_v3_t; typedef struct wl_pfn_net_info_v1 { wl_pfn_subnet_info_v1_t pfnsubnet; int16 RSSI; /**< receive signal strength (in dBm) */ uint16 timestamp; /**< age in seconds */ } wl_pfn_net_info_v1_t; typedef struct wl_pfn_net_info_v2 { wl_pfn_subnet_info_v2_t pfnsubnet; int16 RSSI; /**< receive signal strength (in dBm) */ uint16 timestamp; /**< age in seconds */ } wl_pfn_net_info_v2_t; typedef struct wl_pfn_net_info_v3 { wl_pfn_subnet_info_v3_t pfnsubnet; int16 RSSI; /**< receive signal strength (in dBm) */ uint16 timestamp; /**< age in seconds */ } wl_pfn_net_info_v3_t; /* Version 1 and 2 for various lbest scan results structures below */ #define PFN_LBEST_SCAN_RESULT_VERSION_V1 1 #define PFN_LBEST_SCAN_RESULT_VERSION_V2 2 #define PFN_LBEST_SCAN_RESULT_VERSION_V3 3 #define MAX_CHBKT_PER_RESULT 4 typedef struct wl_pfn_lnet_info_v1 { wl_pfn_subnet_info_v1_t pfnsubnet; /**< BSSID + channel + SSID len + SSID */ uint16 flags; /**< partial scan, etc */ int16 RSSI; /**< receive signal strength (in dBm) */ uint32 timestamp; /**< age in miliseconds */ uint16 rtt0; /**< estimated distance to this AP in centimeters */ uint16 rtt1; /**< standard deviation of the distance to this AP in centimeters */ } wl_pfn_lnet_info_v1_t; typedef struct wl_pfn_lnet_info_v2 { wl_pfn_subnet_info_v2_t pfnsubnet; /**< BSSID + channel + SSID len + SSID */ uint16 flags; /**< partial scan, etc */ int16 RSSI; /**< receive signal strength (in dBm) */ uint32 timestamp; /**< age in miliseconds */ uint16 rtt0; /**< estimated distance to this AP in centimeters */ uint16 rtt1; /**< standard deviation of the distance to this AP in centimeters */ } wl_pfn_lnet_info_v2_t; typedef struct wl_pfn_lnet_info_v3 { wl_pfn_subnet_info_v3_t pfnsubnet; /**< BSSID + channel + SSID len + SSID */ uint16 flags; /**< partial scan, etc */ int16 RSSI; /**< receive signal strength (in dBm) */ uint32 timestamp; /**< age in miliseconds */ uint16 rtt0; /**< estimated distance to this AP in centimeters */ uint16 rtt1; /**< standard deviation of the distance to this AP in centimeters */ } wl_pfn_lnet_info_v3_t; typedef struct wl_pfn_lscanresults_v1 { uint32 version; uint32 status; uint32 count; wl_pfn_lnet_info_v1_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_lscanresults_v1_t; typedef struct wl_pfn_lscanresults_v2 { uint32 version; uint16 status; uint16 count; uint32 scan_ch_buckets[MAX_CHBKT_PER_RESULT]; wl_pfn_lnet_info_v2_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_lscanresults_v2_t; typedef struct wl_pfn_lscanresults_v3 { uint32 version; uint16 status; uint16 count; uint32 scan_ch_buckets[MAX_CHBKT_PER_RESULT]; wl_pfn_lnet_info_v3_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_lscanresults_v3_t; /**this is used to report on 1-* pfn scan results */ typedef struct wl_pfn_scanresults_v1 { uint32 version; uint32 status; uint32 count; wl_pfn_net_info_v1_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanresults_v1_t; typedef struct wl_pfn_scanresults_v2 { uint32 version; uint32 status; uint32 count; uint32 scan_ch_bucket; wl_pfn_net_info_v2_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanresults_v2_t; typedef struct wl_pfn_scanresults_v3 { uint32 version; uint32 status; uint32 count; uint32 scan_ch_bucket; wl_pfn_net_info_v3_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanresults_v3_t; #define WL_PFN_SCANRESULTS_SCAN_TYPE_HA 0u #define WL_PFN_SCANRESULTS_SCAN_TYPE_LP 1u /* In version 4, the status field is split between status and flags from version 2. * This does not include changes from version 3. */ typedef struct wl_pfn_scanresults_v4 { uint32 version; uint16 status; uint16 flags; uint32 count; uint32 scan_ch_bucket; wl_pfn_net_info_v2_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanresults_v4_t; typedef struct wl_pfn_scanresults_v5 { uint16 version; uint16 length; uint16 status; uint16 flags; uint32 count; uint32 scan_ch_bucket; wl_pfn_net_info_v3_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanresults_v5_t; typedef struct wl_pfn_significant_net { uint16 flags; uint16 channel; struct ether_addr BSSID; int8 rssi[PFN_SWC_RSSI_WINDOW_MAX]; } wl_pfn_significant_net_t; #define PFN_SWC_SCANRESULT_VERSION_1 1 typedef struct wl_pfn_swc_results { uint32 version; uint32 pkt_count; /**< No. of results in current frame */ uint32 total_count; /**< Total expected results */ wl_pfn_significant_net_t list[]; } wl_pfn_swc_results_t; typedef struct wl_pfn_net_info_bssid_v1 { struct ether_addr BSSID; uint8 channel; /**< channel number only */ int8 RSSI; /**< receive signal strength (in dBm) */ uint16 flags; /**< (e.g. partial scan, off channel) */ uint16 timestamp; /**< age in seconds */ } wl_pfn_net_info_bssid_v1_t; typedef struct wl_pfn_scanhist_bssid_v1 { uint32 version; uint32 status; uint32 count; wl_pfn_net_info_bssid_v1_t netinfo[BCM_FLEX_ARRAY]; } wl_pfn_scanhist_bssid_v1_t; /* v2 for this struct is skiped to match with other struct v3 version */ typedef struct wl_pfn_net_info_bssid_v3 { struct ether_addr BSSID; chanspec_t chanspec; /**