Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/stats.h
48425 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018, 2020-2021, 2023-2025 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_stats_h__7#define __iwl_fw_api_stats_h__8#include "mac.h"9#include "mac-cfg.h"1011struct mvm_statistics_dbg {12__le32 burst_check;13__le32 burst_count;14__le32 wait_for_silence_timeout_cnt;15u8 reserved[12];16} __packed; /* STATISTICS_DEBUG_API_S_VER_2 */1718struct mvm_statistics_div {19__le32 tx_on_a;20__le32 tx_on_b;21__le32 exec_time;22__le32 probe_time;23__le32 rssi_ant;24__le32 reserved2;25} __packed; /* STATISTICS_SLOW_DIV_API_S_VER_2 */2627/**28* struct mvm_statistics_rx_non_phy29* @bogus_cts: CTS received when not expecting CTS30* @bogus_ack: ACK received when not expecting ACK31* @non_channel_beacons: beacons with our bss id but not on our serving channel32* @channel_beacons: beacons with our bss id and in our serving channel33* @num_missed_bcon: number of missed beacons34* @adc_rx_saturation_time: count in 0.8us units the time the ADC was in35* saturation36* @ina_detection_search_time: total time (in 0.8us) searched for INA37* @beacon_silence_rssi_a: RSSI silence after beacon frame38* @beacon_silence_rssi_b: RSSI silence after beacon frame39* @beacon_silence_rssi_c: RSSI silence after beacon frame40* @interference_data_flag: flag for interference data availability. 1 when data41* is available.42* @channel_load: counts RX Enable time in uSec43* @beacon_rssi_a: beacon RSSI on antenna A44* @beacon_rssi_b: beacon RSSI on antenna B45* @beacon_rssi_c: beacon RSSI on antenna C46* @beacon_energy_a: beacon energy on antenna A47* @beacon_energy_b: beacon energy on antenna B48* @beacon_energy_c: beacon energy on antenna C49* @num_bt_kills: number of BT "kills" (frame TX aborts)50* @mac_id: mac ID51*/52struct mvm_statistics_rx_non_phy {53__le32 bogus_cts;54__le32 bogus_ack;55__le32 non_channel_beacons;56__le32 channel_beacons;57__le32 num_missed_bcon;58__le32 adc_rx_saturation_time;59__le32 ina_detection_search_time;60__le32 beacon_silence_rssi_a;61__le32 beacon_silence_rssi_b;62__le32 beacon_silence_rssi_c;63__le32 interference_data_flag;64__le32 channel_load;65__le32 beacon_rssi_a;66__le32 beacon_rssi_b;67__le32 beacon_rssi_c;68__le32 beacon_energy_a;69__le32 beacon_energy_b;70__le32 beacon_energy_c;71__le32 num_bt_kills;72__le32 mac_id;73} __packed; /* STATISTICS_RX_NON_PHY_API_S_VER_4 */7475struct mvm_statistics_rx_non_phy_v3 {76__le32 bogus_cts; /* CTS received when not expecting CTS */77__le32 bogus_ack; /* ACK received when not expecting ACK */78__le32 non_bssid_frames; /* number of frames with BSSID that79* doesn't belong to the STA BSSID */80__le32 filtered_frames; /* count frames that were dumped in the81* filtering process */82__le32 non_channel_beacons; /* beacons with our bss id but not on83* our serving channel */84__le32 channel_beacons; /* beacons with our bss id and in our85* serving channel */86__le32 num_missed_bcon; /* number of missed beacons */87__le32 adc_rx_saturation_time; /* count in 0.8us units the time the88* ADC was in saturation */89__le32 ina_detection_search_time;/* total time (in 0.8us) searched90* for INA */91__le32 beacon_silence_rssi_a; /* RSSI silence after beacon frame */92__le32 beacon_silence_rssi_b; /* RSSI silence after beacon frame */93__le32 beacon_silence_rssi_c; /* RSSI silence after beacon frame */94__le32 interference_data_flag; /* flag for interference data95* availability. 1 when data is96* available. */97__le32 channel_load; /* counts RX Enable time in uSec */98__le32 dsp_false_alarms; /* DSP false alarm (both OFDM99* and CCK) counter */100__le32 beacon_rssi_a;101__le32 beacon_rssi_b;102__le32 beacon_rssi_c;103__le32 beacon_energy_a;104__le32 beacon_energy_b;105__le32 beacon_energy_c;106__le32 num_bt_kills;107__le32 mac_id;108__le32 directed_data_mpdu;109} __packed; /* STATISTICS_RX_NON_PHY_API_S_VER_3 */110111struct mvm_statistics_rx_phy {112__le32 unresponded_rts;113__le32 rxe_frame_lmt_overrun;114__le32 sent_ba_rsp_cnt;115__le32 dsp_self_kill;116__le32 reserved;117} __packed; /* STATISTICS_RX_PHY_API_S_VER_3 */118119struct mvm_statistics_rx_phy_v2 {120__le32 ina_cnt;121__le32 fina_cnt;122__le32 plcp_err;123__le32 crc32_err;124__le32 overrun_err;125__le32 early_overrun_err;126__le32 crc32_good;127__le32 false_alarm_cnt;128__le32 fina_sync_err_cnt;129__le32 sfd_timeout;130__le32 fina_timeout;131__le32 unresponded_rts;132__le32 rxe_frame_lmt_overrun;133__le32 sent_ack_cnt;134__le32 sent_cts_cnt;135__le32 sent_ba_rsp_cnt;136__le32 dsp_self_kill;137__le32 mh_format_err;138__le32 re_acq_main_rssi_sum;139__le32 reserved;140} __packed; /* STATISTICS_RX_PHY_API_S_VER_2 */141142struct mvm_statistics_rx_ht_phy_v1 {143__le32 plcp_err;144__le32 overrun_err;145__le32 early_overrun_err;146__le32 crc32_good;147__le32 crc32_err;148__le32 mh_format_err;149__le32 agg_crc32_good;150__le32 agg_mpdu_cnt;151__le32 agg_cnt;152__le32 unsupport_mcs;153} __packed; /* STATISTICS_HT_RX_PHY_API_S_VER_1 */154155struct mvm_statistics_rx_ht_phy {156__le32 mh_format_err;157__le32 agg_mpdu_cnt;158__le32 agg_cnt;159__le32 unsupport_mcs;160} __packed; /* STATISTICS_HT_RX_PHY_API_S_VER_2 */161162struct mvm_statistics_tx_non_phy_v3 {163__le32 preamble_cnt;164__le32 rx_detected_cnt;165__le32 bt_prio_defer_cnt;166__le32 bt_prio_kill_cnt;167__le32 few_bytes_cnt;168__le32 cts_timeout;169__le32 ack_timeout;170__le32 expected_ack_cnt;171__le32 actual_ack_cnt;172__le32 dump_msdu_cnt;173__le32 burst_abort_next_frame_mismatch_cnt;174__le32 burst_abort_missing_next_frame_cnt;175__le32 cts_timeout_collision;176__le32 ack_or_ba_timeout_collision;177} __packed; /* STATISTICS_TX_NON_PHY_API_S_VER_3 */178179struct mvm_statistics_tx_non_phy {180__le32 bt_prio_defer_cnt;181__le32 bt_prio_kill_cnt;182__le32 few_bytes_cnt;183__le32 cts_timeout;184__le32 ack_timeout;185__le32 dump_msdu_cnt;186__le32 burst_abort_next_frame_mismatch_cnt;187__le32 burst_abort_missing_next_frame_cnt;188__le32 cts_timeout_collision;189__le32 ack_or_ba_timeout_collision;190} __packed; /* STATISTICS_TX_NON_PHY_API_S_VER_4 */191192#define MAX_CHAINS 3193194struct mvm_statistics_tx_non_phy_agg {195__le32 ba_timeout;196__le32 ba_reschedule_frames;197__le32 scd_query_agg_frame_cnt;198__le32 scd_query_no_agg;199__le32 scd_query_agg;200__le32 scd_query_mismatch;201__le32 frame_not_ready;202__le32 underrun;203__le32 bt_prio_kill;204__le32 rx_ba_rsp_cnt;205__s8 txpower[MAX_CHAINS];206__s8 reserved;207__le32 reserved2;208} __packed; /* STATISTICS_TX_NON_PHY_AGG_API_S_VER_1 */209210struct mvm_statistics_tx_channel_width {211__le32 ext_cca_narrow_ch20[1];212__le32 ext_cca_narrow_ch40[2];213__le32 ext_cca_narrow_ch80[3];214__le32 ext_cca_narrow_ch160[4];215__le32 last_tx_ch_width_indx;216__le32 rx_detected_per_ch_width[4];217__le32 success_per_ch_width[4];218__le32 fail_per_ch_width[4];219}; /* STATISTICS_TX_CHANNEL_WIDTH_API_S_VER_1 */220221struct mvm_statistics_tx_v4 {222struct mvm_statistics_tx_non_phy_v3 general;223struct mvm_statistics_tx_non_phy_agg agg;224struct mvm_statistics_tx_channel_width channel_width;225} __packed; /* STATISTICS_TX_API_S_VER_4 */226227struct mvm_statistics_tx {228struct mvm_statistics_tx_non_phy general;229struct mvm_statistics_tx_non_phy_agg agg;230struct mvm_statistics_tx_channel_width channel_width;231} __packed; /* STATISTICS_TX_API_S_VER_5 */232233234struct mvm_statistics_bt_activity {235__le32 hi_priority_tx_req_cnt;236__le32 hi_priority_tx_denied_cnt;237__le32 lo_priority_tx_req_cnt;238__le32 lo_priority_tx_denied_cnt;239__le32 hi_priority_rx_req_cnt;240__le32 hi_priority_rx_denied_cnt;241__le32 lo_priority_rx_req_cnt;242__le32 lo_priority_rx_denied_cnt;243} __packed; /* STATISTICS_BT_ACTIVITY_API_S_VER_1 */244245struct mvm_statistics_general_common_v19 {246__le32 radio_temperature;247__le32 radio_voltage;248struct mvm_statistics_dbg dbg;249__le32 sleep_time;250__le32 slots_out;251__le32 slots_idle;252__le32 ttl_timestamp;253struct mvm_statistics_div slow_div;254__le32 rx_enable_counter;255/*256* num_of_sos_states:257* count the number of times we have to re-tune258* in order to get out of bad PHY status259*/260__le32 num_of_sos_states;261__le32 beacon_filtered;262__le32 missed_beacons;263u8 beacon_filter_average_energy;264u8 beacon_filter_reason;265u8 beacon_filter_current_energy;266u8 beacon_filter_reserved;267__le32 beacon_filter_delta_time;268struct mvm_statistics_bt_activity bt_activity;269__le64 rx_time;270__le64 on_time_rf;271__le64 on_time_scan;272__le64 tx_time;273} __packed;274275struct mvm_statistics_general_common {276__le32 radio_temperature;277struct mvm_statistics_dbg dbg;278__le32 sleep_time;279__le32 slots_out;280__le32 slots_idle;281__le32 ttl_timestamp;282struct mvm_statistics_div slow_div;283__le32 rx_enable_counter;284/*285* num_of_sos_states:286* count the number of times we have to re-tune287* in order to get out of bad PHY status288*/289__le32 num_of_sos_states;290__le32 beacon_filtered;291__le32 missed_beacons;292u8 beacon_filter_average_energy;293u8 beacon_filter_reason;294u8 beacon_filter_current_energy;295u8 beacon_filter_reserved;296__le32 beacon_filter_delta_time;297struct mvm_statistics_bt_activity bt_activity;298__le64 rx_time;299__le64 on_time_rf;300__le64 on_time_scan;301__le64 tx_time;302} __packed; /* STATISTICS_GENERAL_API_S_VER_10 */303304struct mvm_statistics_general_v8 {305struct mvm_statistics_general_common_v19 common;306__le32 beacon_counter[NUM_MAC_INDEX];307u8 beacon_average_energy[NUM_MAC_INDEX];308u8 reserved[4 - (NUM_MAC_INDEX % 4)];309} __packed; /* STATISTICS_GENERAL_API_S_VER_8 */310311struct mvm_statistics_general {312struct mvm_statistics_general_common common;313__le32 beacon_counter[MAC_INDEX_AUX];314u8 beacon_average_energy[MAC_INDEX_AUX];315u8 reserved[8 - MAC_INDEX_AUX];316} __packed; /* STATISTICS_GENERAL_API_S_VER_10 */317318/**319* struct mvm_statistics_load - RX statistics for multi-queue devices320* @air_time: accumulated air time, per mac321* @byte_count: accumulated byte count, per mac322* @pkt_count: accumulated packet count, per mac323* @avg_energy: average RSSI, per station324*/325struct mvm_statistics_load {326__le32 air_time[MAC_INDEX_AUX];327__le32 byte_count[MAC_INDEX_AUX];328__le32 pkt_count[MAC_INDEX_AUX];329u8 avg_energy[IWL_STATION_COUNT_MAX];330} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_3 */331332struct mvm_statistics_load_v1 {333__le32 air_time[NUM_MAC_INDEX];334__le32 byte_count[NUM_MAC_INDEX];335__le32 pkt_count[NUM_MAC_INDEX];336u8 avg_energy[IWL_STATION_COUNT_MAX];337} __packed; /* STATISTICS_RX_MAC_STATION_S_VER_1 */338339struct mvm_statistics_rx {340struct mvm_statistics_rx_phy ofdm;341struct mvm_statistics_rx_phy cck;342struct mvm_statistics_rx_non_phy general;343struct mvm_statistics_rx_ht_phy ofdm_ht;344} __packed; /* STATISTICS_RX_API_S_VER_4 */345346struct mvm_statistics_rx_v3 {347struct mvm_statistics_rx_phy_v2 ofdm;348struct mvm_statistics_rx_phy_v2 cck;349struct mvm_statistics_rx_non_phy_v3 general;350struct mvm_statistics_rx_ht_phy_v1 ofdm_ht;351} __packed; /* STATISTICS_RX_API_S_VER_3 */352353/*354* STATISTICS_NOTIFICATION = 0x9d (notification only, not a command)355*356* By default, uCode issues this notification after receiving a beacon357* while associated. To disable this behavior, set DISABLE_NOTIF flag in the358* STATISTICS_CMD (0x9c), below.359*/360361struct iwl_notif_statistics_v10 {362__le32 flag;363struct mvm_statistics_rx_v3 rx;364struct mvm_statistics_tx_v4 tx;365struct mvm_statistics_general_v8 general;366} __packed; /* STATISTICS_NTFY_API_S_VER_10 */367368struct iwl_notif_statistics_v11 {369__le32 flag;370struct mvm_statistics_rx_v3 rx;371struct mvm_statistics_tx_v4 tx;372struct mvm_statistics_general_v8 general;373struct mvm_statistics_load_v1 load_stats;374} __packed; /* STATISTICS_NTFY_API_S_VER_11 */375376struct iwl_notif_statistics {377__le32 flag;378struct mvm_statistics_rx rx;379struct mvm_statistics_tx tx;380struct mvm_statistics_general general;381struct mvm_statistics_load load_stats;382} __packed; /* STATISTICS_NTFY_API_S_VER_13 */383384/**385* enum iwl_statistics_notif_flags - flags used in statistics notification386* @IWL_STATISTICS_REPLY_FLG_CLEAR: statistics were cleared after this report387*/388enum iwl_statistics_notif_flags {389IWL_STATISTICS_REPLY_FLG_CLEAR = 0x1,390};391392/**393* enum iwl_statistics_cmd_flags - flags used in statistics command394* @IWL_STATISTICS_FLG_CLEAR: request to clear statistics after the report395* that's sent after this command396* @IWL_STATISTICS_FLG_DISABLE_NOTIF: disable unilateral statistics397* notifications398*/399enum iwl_statistics_cmd_flags {400IWL_STATISTICS_FLG_CLEAR = 0x1,401IWL_STATISTICS_FLG_DISABLE_NOTIF = 0x2,402};403404/**405* struct iwl_statistics_cmd - statistics config command406* @flags: flags from &enum iwl_statistics_cmd_flags407*/408struct iwl_statistics_cmd {409__le32 flags;410} __packed; /* STATISTICS_CMD_API_S_VER_1 */411412#define MAX_BCAST_FILTER_NUM 8413414/**415* enum iwl_statistics_notify_type_id - type_id used in system statistics416* command417* @IWL_STATS_NTFY_TYPE_ID_OPER: request legacy statistics418* @IWL_STATS_NTFY_TYPE_ID_OPER_PART1: request operational part1 statistics419* @IWL_STATS_NTFY_TYPE_ID_OPER_PART2: request operational part2 statistics420* @IWL_STATS_NTFY_TYPE_ID_OPER_PART3: request operational part3 statistics421* @IWL_STATS_NTFY_TYPE_ID_OPER_PART4: request operational part4 statistics422*/423enum iwl_statistics_notify_type_id {424IWL_STATS_NTFY_TYPE_ID_OPER = BIT(0),425IWL_STATS_NTFY_TYPE_ID_OPER_PART1 = BIT(1),426IWL_STATS_NTFY_TYPE_ID_OPER_PART2 = BIT(2),427IWL_STATS_NTFY_TYPE_ID_OPER_PART3 = BIT(3),428IWL_STATS_NTFY_TYPE_ID_OPER_PART4 = BIT(4),429};430431/**432* enum iwl_statistics_cfg_flags - cfg_mask used in system statistics command433* @IWL_STATS_CFG_FLG_DISABLE_NTFY_MSK: 0 for enable, 1 for disable434* @IWL_STATS_CFG_FLG_ON_DEMAND_NTFY_MSK: 0 for periodic, 1 for on-demand435* @IWL_STATS_CFG_FLG_RESET_MSK: 0 for reset statistics after436* sending the notification, 1 for do not reset statistics after sending437* the notification438*/439enum iwl_statistics_cfg_flags {440IWL_STATS_CFG_FLG_DISABLE_NTFY_MSK = BIT(0),441IWL_STATS_CFG_FLG_ON_DEMAND_NTFY_MSK = BIT(1),442IWL_STATS_CFG_FLG_RESET_MSK = BIT(2),443};444445/**446* struct iwl_system_statistics_cmd - system statistics command447* @cfg_mask: configuration mask, &enum iwl_statistics_cfg_flags448* @config_time_sec: time in sec for periodic notification449* @type_id_mask: type_id masks, &enum iwl_statistics_notify_type_id450*/451struct iwl_system_statistics_cmd {452__le32 cfg_mask;453__le32 config_time_sec;454__le32 type_id_mask;455} __packed; /* STATISTICS_FW_CMD_API_S_VER_1 */456457/**458* enum iwl_fw_statistics_type459*460* @FW_STATISTICS_OPERATIONAL: operational statistics461* @FW_STATISTICS_PHY: phy statistics462* @FW_STATISTICS_MAC: mac statistics463* @FW_STATISTICS_RX: rx statistics464* @FW_STATISTICS_TX: tx statistics465* @FW_STATISTICS_DURATION: duration statistics466* @FW_STATISTICS_HE: he statistics467*/468enum iwl_fw_statistics_type {469FW_STATISTICS_OPERATIONAL,470FW_STATISTICS_PHY,471FW_STATISTICS_MAC,472FW_STATISTICS_RX,473FW_STATISTICS_TX,474FW_STATISTICS_DURATION,475FW_STATISTICS_HE,476}; /* FW_STATISTICS_TYPE_API_E_VER_1 */477478#define IWL_STATISTICS_TYPE_MSK 0x7f479/**480* struct iwl_statistics_ntfy_hdr481*482* @type: struct type483* @version: version of the struct484* @size: size in bytes485*/486struct iwl_statistics_ntfy_hdr {487u8 type;488u8 version;489__le16 size;490}; /* STATISTICS_NTFY_HDR_API_S_VER_1 */491492/**493* struct iwl_stats_ntfy_per_link494*495* @beacon_filter_average_energy: Average energy [-dBm] of the 2496* antennas.497* @air_time: air time498* @beacon_counter: all beacons (both filtered and not filtered)499* @beacon_average_energy: Average energy [-dBm] of all beacons500* (both filtered and not filtered)501* @beacon_rssi_a: beacon RSSI on antenna A502* @beacon_rssi_b: beacon RSSI on antenna B503* @rx_bytes: RX byte count504*/505struct iwl_stats_ntfy_per_link {506__le32 beacon_filter_average_energy;507__le32 air_time;508__le32 beacon_counter;509__le32 beacon_average_energy;510__le32 beacon_rssi_a;511__le32 beacon_rssi_b;512__le32 rx_bytes;513} __packed; /* STATISTICS_NTFY_PER_LINK_API_S_VER_1 */514515/**516* struct iwl_stats_ntfy_part1_per_link517*518* @rx_time: rx time519* @tx_time: tx time520* @rx_action: action frames handled by FW521* @tx_action: action frames generated and transmitted by FW522* @cca_defers: cca defer count523* @beacon_filtered: filtered out beacons524*/525struct iwl_stats_ntfy_part1_per_link {526__le64 rx_time;527__le64 tx_time;528__le32 rx_action;529__le32 tx_action;530__le32 cca_defers;531__le32 beacon_filtered;532} __packed; /* STATISTICS_FW_NTFY_OPERATIONAL_PART1_PER_LINK_API_S_VER_1 */533534/**535* struct iwl_stats_ntfy_per_mac536*537* @beacon_filter_average_energy: Average energy [-dBm] of the 2538* antennas.539* @air_time: air time540* @beacon_counter: all beacons (both filtered and not filtered)541* @beacon_average_energy: all beacons (both filtered and not542* filtered)543* @beacon_rssi_a: beacon RSSI on antenna A544* @beacon_rssi_b: beacon RSSI on antenna B545* @rx_bytes: RX byte count546*/547struct iwl_stats_ntfy_per_mac {548__le32 beacon_filter_average_energy;549__le32 air_time;550__le32 beacon_counter;551__le32 beacon_average_energy;552__le32 beacon_rssi_a;553__le32 beacon_rssi_b;554__le32 rx_bytes;555} __packed; /* STATISTICS_NTFY_PER_MAC_API_S_VER_1 */556557#define IWL_STATS_MAX_BW_INDEX 5558/** struct iwl_stats_ntfy_per_phy559* @channel_load: channel load560* @channel_load_by_us: device contribution to MCLM561* @channel_load_not_by_us: other devices' contribution to MCLM562* @clt: CLT HW timer (TIM_CH_LOAD2)563* @act: active accumulator SW564* @elp: elapsed time accumulator SW565* @rx_detected_per_ch_width: number of deferred TX per channel width,566* 0 - 20, 1/2/3 - 40/80/160567* @success_per_ch_width: number of frames that got ACK/BACK/CTS568* per channel BW. note, BACK counted as 1569* @fail_per_ch_width: number of frames that didn't get ACK/BACK/CTS570* per channel BW. note BACK counted as 1571* @last_tx_ch_width_indx: last txed frame channel width index572*/573struct iwl_stats_ntfy_per_phy {574__le32 channel_load;575__le32 channel_load_by_us;576__le32 channel_load_not_by_us;577__le32 clt;578__le32 act;579__le32 elp;580__le32 rx_detected_per_ch_width[IWL_STATS_MAX_BW_INDEX];581__le32 success_per_ch_width[IWL_STATS_MAX_BW_INDEX];582__le32 fail_per_ch_width[IWL_STATS_MAX_BW_INDEX];583__le32 last_tx_ch_width_indx;584} __packed; /* STATISTICS_NTFY_PER_PHY_API_S_VER_1 */585586/* unknown channel load (due to not being active on channel) */587#define IWL_STATS_UNKNOWN_CHANNEL_LOAD 0xffffffff588589/**590* struct iwl_stats_ntfy_per_sta591*592* @average_energy: in fact it is minus the energy..593*/594struct iwl_stats_ntfy_per_sta {595__le32 average_energy;596} __packed; /* STATISTICS_NTFY_PER_STA_API_S_VER_1 */597598#define IWL_STATS_MAX_PHY_OPERATIONAL 3599#define IWL_STATS_MAX_FW_LINKS (IWL_FW_MAX_LINK_ID + 1)600601/**602* struct iwl_system_statistics_notif_oper603*604* @time_stamp: time when the notification is sent from firmware605* @per_link: per link statistics, &struct iwl_stats_ntfy_per_link606* @per_phy: per phy statistics, &struct iwl_stats_ntfy_per_phy607* @per_sta: per sta statistics, &struct iwl_stats_ntfy_per_sta608*/609struct iwl_system_statistics_notif_oper {610__le32 time_stamp;611struct iwl_stats_ntfy_per_link per_link[IWL_STATS_MAX_FW_LINKS];612struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];613struct iwl_stats_ntfy_per_sta per_sta[IWL_STATION_COUNT_MAX];614} __packed; /* STATISTICS_FW_NTFY_OPERATIONAL_API_S_VER_3 */615616/**617* struct iwl_system_statistics_part1_notif_oper618*619* @time_stamp: time when the notification is sent from firmware620* @per_link: per link statistics &struct iwl_stats_ntfy_part1_per_link621* @per_phy_crc_error_stats: per phy crc error statistics622*/623struct iwl_system_statistics_part1_notif_oper {624__le32 time_stamp;625struct iwl_stats_ntfy_part1_per_link per_link[IWL_STATS_MAX_FW_LINKS];626__le32 per_phy_crc_error_stats[IWL_STATS_MAX_PHY_OPERATIONAL];627} __packed; /* STATISTICS_FW_NTFY_OPERATIONAL_PART1_API_S_VER_4 */628629/**630* struct iwl_system_statistics_end_notif631*632* @time_stamp: time when the notification is sent from firmware633*/634struct iwl_system_statistics_end_notif {635__le32 time_stamp;636} __packed; /* STATISTICS_FW_NTFY_END_API_S_VER_1 */637638/**639* struct iwl_statistics_operational_ntfy640*641* @hdr: general statistics header642* @flags: bitmap of possible notification structures643* @per_mac: per mac statistics, &struct iwl_stats_ntfy_per_mac644* @per_phy: per phy statistics, &struct iwl_stats_ntfy_per_phy645* @per_sta: per sta statistics, &struct iwl_stats_ntfy_per_sta646* @rx_time: rx time647* @tx_time: usec the radio is transmitting.648* @on_time_rf: The total time in usec the RF is awake.649* @on_time_scan: usec the radio is awake due to scan.650*/651struct iwl_statistics_operational_ntfy {652struct iwl_statistics_ntfy_hdr hdr;653__le32 flags;654struct iwl_stats_ntfy_per_mac per_mac[MAC_INDEX_AUX];655struct iwl_stats_ntfy_per_phy per_phy[IWL_STATS_MAX_PHY_OPERATIONAL];656struct iwl_stats_ntfy_per_sta per_sta[IWL_STATION_COUNT_MAX];657__le64 rx_time;658__le64 tx_time;659__le64 on_time_rf;660__le64 on_time_scan;661} __packed; /* STATISTICS_OPERATIONAL_NTFY_API_S_VER_15 */662663/**664* struct iwl_statistics_operational_ntfy_ver_14665*666* @hdr: general statistics header667* @flags: bitmap of possible notification structures668* @mac_id: mac on which the beacon was received669* @beacon_filter_average_energy: Average energy [-dBm] of the 2670* antennas.671* @beacon_filter_reason: beacon filter reason672* @radio_temperature: radio temperature673* @air_time: air time674* @beacon_counter: all beacons (both filtered and not filtered)675* @beacon_average_energy: all beacons (both filtered and not676* filtered)677* @beacon_rssi_a: beacon RSSI on antenna A678* @beacon_rssi_b: beacon RSSI on antenna B679* @rx_bytes: per MAC RX byte count680* @rx_time: rx time681* @tx_time: usec the radio is transmitting.682* @on_time_rf: The total time in usec the RF is awake.683* @on_time_scan: usec the radio is awake due to scan.684* @average_energy: in fact it is minus the energy..685* @reserved: reserved686*/687struct iwl_statistics_operational_ntfy_ver_14 {688struct iwl_statistics_ntfy_hdr hdr;689__le32 flags;690__le32 mac_id;691__le32 beacon_filter_average_energy;692__le32 beacon_filter_reason;693__le32 radio_temperature;694__le32 air_time[MAC_INDEX_AUX];695__le32 beacon_counter[MAC_INDEX_AUX];696__le32 beacon_average_energy[MAC_INDEX_AUX];697__le32 beacon_rssi_a;698__le32 beacon_rssi_b;699__le32 rx_bytes[MAC_INDEX_AUX];700__le64 rx_time;701__le64 tx_time;702__le64 on_time_rf;703__le64 on_time_scan;704__le32 average_energy[IWL_STATION_COUNT_MAX];705__le32 reserved;706} __packed; /* STATISTICS_OPERATIONAL_NTFY_API_S_VER_14 */707708/**709* struct iwl_statistics_phy_ntfy710*711* @hdr: general statistics header712* RX PHY related statistics713* @energy_and_config: ???714* @rssi_band: @31:24 rssiAllBand_B, 23:16 rssiInBand_B, 15:8715* rssiAllBand_A, 7:0 rssiInBand_A716* @agc_word: @31:16 agcWord_B, 15:0 agcWord_A717* @agc_gain: @19:10 agcGain_B, 9:0 agcGain_A718* @dfe_gain: @19:10 dfeGain_B, 9:0 dfeGain_A719* @snr_calc_main: @18:0 snrCalcMain720* @energy_calc_main: @18:0 energyCalcMain721* @snr_calc_aux: @18:0 snrCalcAux722* @dsp_dc_estim_a: @27:14 dspDcEstimQA, 13:0 dspDcEstimIA723* @dsp_dc_estim_b: @27:14 dspDcEstimQB, 13:0 dspDcEstimIB724* @ina_detec_type_and_ofdm_corr_comb: @31:31 inaDetectCckMrc,725* 30:27 inaDetectType, 26:0 ofdmCorrComb726* @cw_corr_comb: @26:0 cwCorrComb727* @rssi_comb: @25:0 rssiComb728* @auto_corr_cck: @23:12 autoCck, 11:00 crossCck729* @ofdm_fine_freq_and_pina_freq_err: @18:7 ofdmFineFreq, 6:0730* ofdmPinaFreqErr731* @snrm_evm_main: @31:0 snrmEvmMain732* @snrm_evm_aux: @31:0 snrmEvmAux733* @rx_rate: @31:0 rate734* TX PHY related statistics735* @per_chain_enums_and_dsp_atten_a: @perChainEnumsAndDspAtten736* (per version)737* @target_power_and_power_meas_a: @31:16 targetPower_A, 15:0738* powerMeasuredCalc_A739* @tx_config_as_i_and_ac_a: @31:16 txConfigAsI_A, 15:0740* txConfigAc_A741* @predist_dcq_and_dci_a: @31:16 predist_dci_A, 15:0742* predist_dcq_A743* @per_chain_enums_and_dsp_atten_b: @perChainEnumsAndDspAtten744* (per version)745* @target_power_and_power_meas_b: @31:16 targetPower_B, 15:0746* powerMeasuredCalc_B747* @tx_config_as_i_and_ac_b: @31:16 txConfigAsI_B, 15:0748* txConfigAc_B749* @predist_dcq_and_dci_b: @31:16 predist_dci_B, 15:0750* predist_dcq_B751* @tx_rate: @31:0 rate752* @tlc_backoff: @31:0 tlcBackoff753* @mpapd_calib_mode_mpapd_calib_type_a: @31:16754* mpapdCalibMode_A, 15:0 mpapdCalibType_A755* @psat_and_phy_power_limit_a: @31:16 psat_A, 15:0756* phyPowerLimit_A757* @sar_and_regulatory_power_limit_a: @31:16 sarPowerLimit_A,758* 15:0 regulatoryPowerLimit_A759* @mpapd_calib_mode_mpapd_calib_type_b: @31:16760* mpapdCalibMode_B, 15:0 mpapdCalibType_B761* @psat_and_phy_power_limit_b: @31:16 psat_B, 15:0762* phyPowerLimit_B763* @sar_and_regulatory_power_limit_b: @31:16 sarPowerLimit_B,764* 15:0 regulatoryPowerLimit_B765* @srd_and_driver_power_limits: @31:16 srdPowerLimit, 15:0766* driverPowerLimit767* @reserved: reserved768*/769struct iwl_statistics_phy_ntfy {770struct iwl_statistics_ntfy_hdr hdr;771__le32 energy_and_config;772__le32 rssi_band;773__le32 agc_word;774__le32 agc_gain;775__le32 dfe_gain;776__le32 snr_calc_main;777__le32 energy_calc_main;778__le32 snr_calc_aux;779__le32 dsp_dc_estim_a;780__le32 dsp_dc_estim_b;781__le32 ina_detec_type_and_ofdm_corr_comb;782__le32 cw_corr_comb;783__le32 rssi_comb;784__le32 auto_corr_cck;785__le32 ofdm_fine_freq_and_pina_freq_err;786__le32 snrm_evm_main;787__le32 snrm_evm_aux;788__le32 rx_rate;789__le32 per_chain_enums_and_dsp_atten_a;790__le32 target_power_and_power_meas_a;791__le32 tx_config_as_i_and_ac_a;792__le32 predist_dcq_and_dci_a;793__le32 per_chain_enums_and_dsp_atten_b;794__le32 target_power_and_power_meas_b;795__le32 tx_config_as_i_and_ac_b;796__le32 predist_dcq_and_dci_b;797__le32 tx_rate;798__le32 tlc_backoff;799__le32 mpapd_calib_mode_mpapd_calib_type_a;800__le32 psat_and_phy_power_limit_a;801__le32 sar_and_regulatory_power_limit_a;802__le32 mpapd_calib_mode_mpapd_calib_type_b;803__le32 psat_and_phy_power_limit_b;804__le32 sar_and_regulatory_power_limit_b;805__le32 srd_and_driver_power_limits;806__le32 reserved;807} __packed; /* STATISTICS_PHY_NTFY_API_S_VER_1 */808809/**810* struct iwl_statistics_mac_ntfy811*812* @hdr: general statistics header813* @bcast_filter_passed_per_mac: bcast filter passed per mac814* @bcast_filter_dropped_per_mac: bcast filter dropped per mac815* @bcast_filter_passed_per_filter: bcast filter passed per filter816* @bcast_filter_dropped_per_filter: bcast filter dropped per filter817* @reserved: reserved818*/819struct iwl_statistics_mac_ntfy {820struct iwl_statistics_ntfy_hdr hdr;821__le32 bcast_filter_passed_per_mac[NUM_MAC_INDEX_CDB];822__le32 bcast_filter_dropped_per_mac[NUM_MAC_INDEX_CDB];823__le32 bcast_filter_passed_per_filter[MAX_BCAST_FILTER_NUM];824__le32 bcast_filter_dropped_per_filter[MAX_BCAST_FILTER_NUM];825__le32 reserved;826} __packed; /* STATISTICS_MAC_NTFY_API_S_VER_1 */827828/**829* struct iwl_statistics_rx_ntfy830*831* @hdr: general statistics header832* @rx_agg_mpdu_cnt: aggregation frame count (number of833* delimiters)834* @rx_agg_cnt: number of RX Aggregations835* @unsupported_mcs: number of PLCP headers that have rate which836* is unsupported by DSP837* @bogus_cts: CTS received when not expecting CTS838* @bogus_ack: ACK received when not expecting ACK839* @rx_byte_count: ???840* @rx_packet_count: ???841* @missed_beacons: ???842* @unresponded_rts: un-responded RTS, due to NAV not zero843* @rxe_frame_limit_overrun: RXE got frame limit overrun844* @sent_ba_rsp_cnt: BA response TX count845* @late_rx_handle: count the number of times the RX path was846* aborted due to late entry847* @num_bt_kills: ???848* @reserved: reserved849*/850struct iwl_statistics_rx_ntfy {851struct iwl_statistics_ntfy_hdr hdr;852__le32 rx_agg_mpdu_cnt;853__le32 rx_agg_cnt;854__le32 unsupported_mcs;855__le32 bogus_cts;856__le32 bogus_ack;857__le32 rx_byte_count[MAC_INDEX_AUX];858__le32 rx_packet_count[MAC_INDEX_AUX];859__le32 missed_beacons;860__le32 unresponded_rts;861__le32 rxe_frame_limit_overrun;862__le32 sent_ba_rsp_cnt;863__le32 late_rx_handle;864__le32 num_bt_kills;865__le32 reserved;866} __packed; /* STATISTICS_RX_NTFY_API_S_VER_1 */867868/**869* struct iwl_statistics_tx_ntfy870*871* @hdr: general statistics header872* @cts_timeout: timeout when waiting for CTS873* @ack_timeout: timeout when waiting for ACK874* @dump_msdu_cnt: number of MSDUs that were dumped due to any875* reason876* @burst_abort_missing_next_frame_cnt: number of times a burst877* was aborted due to missing next frame bytes in txfifo878* number of times got timeout when waiting for CTS/ACK/BA and energy was879* detected just after sending the RTS/DATA. this statistics may help getting880* interesting indicators, like the likelihood of collision (so the benefit of881* protection may be estimated Vs. its cost). Or how many of the failures are882* due to collision and how many due to SNR.883* For Link-quality the CTS collision indication is more reliable then the ACK884* collision indication as the RTS frame is short and has more chance that the885* frame/s which caused the collision continue after the RTS was sent.886* @cts_timeout_collision: ???887* ACK/BA failed and energy as detected after DATA888* Note: to get the collision ratio need to:889* ackOrBaTimeoutCollision / (ack_timeout + ba_timeout)890* @ack_or_ba_timeout_collision: ???891* @ba_timeout: timeout when waiting for immediate BA response892* @ba_reschedule_frames: failed to get BA response and893* rescheduled all the non-ACKed frames894* gives the avarage number of frames inside aggregation895* @scd_query_agg_frame_cnt: ???896* @scd_query_no_agg: scheduler query prevented aggregation897* @scd_query_agg: scheduler query allowed aggregation898* @scd_query_mismatch: scheduler query inaccurate, either too899* short or too long900* @agg_terminated_underrun: aggregation was terminated due to901* underrun902* @agg_terminated_bt_prio_kill: aggregation was terminated due903* to BT904* @tx_kill_on_long_retry: count the tx frames dropped due to905* long retry limit (DATA frame failed)906* @tx_kill_on_short_retry: count the tx frames dropped due to907* short retry limit (RTS frame failed)908* TX deffer on energy. This counter is reset on each successful transmit.909* When timer exceed TX deffer limit than will be uCode assert.910* @tx_deffer_counter: ???911* @tx_deffer_base_time: Keep the time of the last successful912* transmit913* @tx_underrun: TX killed due to underrun914* @bt_defer: TX deferred due to BT priority, so probably TX was915* not started.916* @tx_kill_on_dsp_timeout: TX killed on DSP problem detected917* @tx_kill_on_immediate_quiet: TX killed due to immediate quiet918* @kill_ba_cnt: number of times sending BA failed919* @kill_ack_cnt: number of times sending ACK failed920* @kill_cts_cnt: number of times sending CTS failed921* @burst_terminated: Count burst or fragmentation termination922* occurrence923* @late_tx_vec_wr_cnt: ???924* TX is not sent because ucode failed to notify the TRM in SIFS-delta from925* ON_AIR deassertion.926* @late_rx2_tx_cnt: ???927* @scd_query_cnt: count the times SCD query was done to check928* for TX AGG929* @tx_frames_acked_in_agg: count the number of frames930* transmitted inside AGG and were successful931* @last_tx_ch_width_indx: ???932* number of deferred TX per channel width, 0 - 20, 1/2/3 - 40/80/160933* @rx_detected_per_ch_width: ???934* @success_per_ch_width: ???935* @fail_per_ch_width: ???936* @reserved: reserved937*/938struct iwl_statistics_tx_ntfy {939struct iwl_statistics_ntfy_hdr hdr;940__le32 cts_timeout;941__le32 ack_timeout;942__le32 dump_msdu_cnt;943__le32 burst_abort_missing_next_frame_cnt;944__le32 cts_timeout_collision;945__le32 ack_or_ba_timeout_collision;946__le32 ba_timeout;947__le32 ba_reschedule_frames;948__le32 scd_query_agg_frame_cnt;949__le32 scd_query_no_agg;950__le32 scd_query_agg;951__le32 scd_query_mismatch;952__le32 agg_terminated_underrun;953__le32 agg_terminated_bt_prio_kill;954__le32 tx_kill_on_long_retry;955__le32 tx_kill_on_short_retry;956__le32 tx_deffer_counter;957__le32 tx_deffer_base_time;958__le32 tx_underrun;959__le32 bt_defer;960__le32 tx_kill_on_dsp_timeout;961__le32 tx_kill_on_immediate_quiet;962__le32 kill_ba_cnt;963__le32 kill_ack_cnt;964__le32 kill_cts_cnt;965__le32 burst_terminated;966__le32 late_tx_vec_wr_cnt;967__le32 late_rx2_tx_cnt;968__le32 scd_query_cnt;969__le32 tx_frames_acked_in_agg;970__le32 last_tx_ch_width_indx;971__le32 rx_detected_per_ch_width[4];972__le32 success_per_ch_width[4];973__le32 fail_per_ch_width[4];974__le32 reserved;975} __packed; /* STATISTICS_TX_NTFY_API_S_VER_1 */976977/**978* struct iwl_statistics_duration_ntfy979*980* @hdr: general statistics header981* @cont_burst_chk_cnt: number of times continuation or982* fragmentation or bursting was checked983* @cont_burst_cnt: number of times continuation or fragmentation984* or bursting was successful985* @wait_for_silence_timeout_cnt: ???986* @reserved: reserved987*/988struct iwl_statistics_duration_ntfy {989struct iwl_statistics_ntfy_hdr hdr;990__le32 cont_burst_chk_cnt;991__le32 cont_burst_cnt;992__le32 wait_for_silence_timeout_cnt;993__le32 reserved;994} __packed; /* STATISTICS_DURATION_NTFY_API_S_VER_1 */995996/**997* struct iwl_statistics_he_ntfy998*999* @hdr: general statistics header1000* received HE frames1001* @rx_siga_valid_cnt: rx HE SIG-A valid1002* @rx_siga_invalid_cnt: rx HE SIG-A invalid1003* received HE frames w/ valid Sig-A1004* @rx_trig_based_frame_cnt: rx HE-TB (trig-based)1005* @rx_su_frame_cnt: rx HE-SU1006* @rx_sigb_invalid_cnt: rx (suspected) HE-MU w/ bad SIG-B1007* @rx_our_bss_color_cnt: rx valid HE SIG-A w/ our BSS color1008* @rx_other_bss_color_cnt: rx valid HE SIG-A w/ other BSS color1009* @rx_zero_bss_color_cnt: ???1010* received HE-MU frames w/ good Sig-B1011* @rx_mu_for_us_cnt: match AID1012* @rx_mu_not_for_us_cnt: no matched AID1013* received HE-MU frames for us (w/ our AID)1014* @rx_mu_nss_ar: 0 - SISO, 1 - MIMO21015* @rx_mu_mimo_cnt: full BW RU, compressed SIG-B1016* @rx_mu_ru_bw_ar: MU alloc, MHz: 0 - 2, 1 - 5, 2 - 10, 3 - 20,1017* 4 - 40, 5 - 80, 6 - 1601018* received trigger frames1019* @rx_trig_for_us_cnt: ???1020* @rx_trig_not_for_us_cnt: ???1021* trigger for us1022* @rx_trig_with_cs_req_cnt: ???1023* @rx_trig_type_ar: ???1024* @rx_trig_in_agg_cnt: ???1025* basic trigger for us allocations1026* @rx_basic_trig_alloc_nss_ar: ???1027* @rx_basic_trig_alloc_mu_mimo_cnt: ???1028* @rx_basic_trig_alloc_ru_bw_ar: ???1029* @rx_basic_trig_total_byte_cnt: ???1030* trig-based TX1031* @tx_trig_based_cs_req_fail_cnt: ???1032* @tx_trig_based_sifs_ok_cnt: ???1033* @tx_trig_based_sifs_fail_cnt: ???1034* @tx_trig_based_byte_cnt: ???1035* @tx_trig_based_pad_byte_cnt: ???1036* @tx_trig_based_frame_cnt: ???1037* @tx_trig_based_acked_frame_cnt: ???1038* @tx_trig_based_ack_timeout_cnt: ???1039* HE-SU TX1040* @tx_su_frame_cnt: ???1041* EDCA <--> MU-EDCA transitions1042* @tx_edca_to_mu_edca_cnt: ???1043* @tx_mu_edca_to_edca_by_timeout_cnt: ???1044* @tx_mu_edca_to_edca_by_ack_fail_cnt: ???1045* @tx_mu_edca_to_edca_by_small_alloc_cnt: ???1046* @reserved: reserved1047*/1048struct iwl_statistics_he_ntfy {1049struct iwl_statistics_ntfy_hdr hdr;1050__le32 rx_siga_valid_cnt;1051__le32 rx_siga_invalid_cnt;1052__le32 rx_trig_based_frame_cnt;1053__le32 rx_su_frame_cnt;1054__le32 rx_sigb_invalid_cnt;1055__le32 rx_our_bss_color_cnt;1056__le32 rx_other_bss_color_cnt;1057__le32 rx_zero_bss_color_cnt;1058__le32 rx_mu_for_us_cnt;1059__le32 rx_mu_not_for_us_cnt;1060__le32 rx_mu_nss_ar[2];1061__le32 rx_mu_mimo_cnt;1062__le32 rx_mu_ru_bw_ar[7];1063__le32 rx_trig_for_us_cnt;1064__le32 rx_trig_not_for_us_cnt;1065__le32 rx_trig_with_cs_req_cnt;1066__le32 rx_trig_type_ar[8 + 1];1067__le32 rx_trig_in_agg_cnt;1068__le32 rx_basic_trig_alloc_nss_ar[2];1069__le32 rx_basic_trig_alloc_mu_mimo_cnt;1070__le32 rx_basic_trig_alloc_ru_bw_ar[7];1071__le32 rx_basic_trig_total_byte_cnt;1072__le32 tx_trig_based_cs_req_fail_cnt;1073__le32 tx_trig_based_sifs_ok_cnt;1074__le32 tx_trig_based_sifs_fail_cnt;1075__le32 tx_trig_based_byte_cnt;1076__le32 tx_trig_based_pad_byte_cnt;1077__le32 tx_trig_based_frame_cnt;1078__le32 tx_trig_based_acked_frame_cnt;1079__le32 tx_trig_based_ack_timeout_cnt;1080__le32 tx_su_frame_cnt;1081__le32 tx_edca_to_mu_edca_cnt;1082__le32 tx_mu_edca_to_edca_by_timeout_cnt;1083__le32 tx_mu_edca_to_edca_by_ack_fail_cnt;1084__le32 tx_mu_edca_to_edca_by_small_alloc_cnt;1085__le32 reserved;1086} __packed; /* STATISTICS_HE_NTFY_API_S_VER_1 */10871088#endif /* __iwl_fw_api_stats_h__ */108910901091