• Dinesh Karthikeyan's avatar
    wifi: ath12k: Support pdev error stats · cf1187b3
    Dinesh Karthikeyan authored
    Add support to request pdev error stats from firmware through HTT stats
    type 5. This stats type gives information such as list of pdev errors,
    reasons for reset, logging information about recovery, drain and war
    stats. etc.
    
    Sample output:
    -------------
    echo 5 > /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats_type
    cat /sys/kernel/debug/ath12k/pci-0000\:06\:00.0/mac0/htt_stats
    
    HTT_HW_STATS_PDEV_ERRS_TLV:
    mac_id = 0
    tx_abort = 0
    tx_abort_fail_count = 0
    rx_abort = 53
    .....
    
    PDEV_PHY_WARM_RESET_REASONS:
    phy_warm_reset_reason_phy_m3 = 0
    phy_warm_reset_reason_tx_hw_stuck = 0
    phy_warm_reset_reason_num_cca_rx_frame_stuck = 0
    .....
    
    WAL_RX_RECOVERY_STATS:
    wal_rx_recovery_rst_mac_hang_count = 0
    wal_rx_recovery_rst_known_sig_count = 0
    wal_rx_recovery_rst_no_rx_count = 0
    .....
    
    HTT_RX_DEST_DRAIN_STATS:
    rx_dest_drain_rx_descs_leak_prevention_done = 0
    rx_dest_drain_rx_descs_saved_cnt = 0
    rx_dest_drain_rxdma2reo_leak_detected = 0
    .....
    
    HTT_HW_STATS_INTR_MISC_TLV:
    hw_intr_name = AMPI
    mask = 0
    count = 2
    
    HTT_HW_STATS_WHAL_TX_TLV:
    mac_id = 0
    last_unpause_ppdu_id = 0
    hwsch_unpause_wait_tqm_write = 0
    .....
    
    HTT_HW_WAR_STATS_TLV:
    mac_id = 0
    hw_war 0 = 0
    hw_war 1 = 0
    .....
    
    Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
    Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
    Signed-off-by: default avatarDinesh Karthikeyan <quic_dinek@quicinc.com>
    Signed-off-by: default avatarRoopni Devanathan <quic_rdevanat@quicinc.com>
    Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
    Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
    Link: https://patch.msgid.link/20240625042217.1303332-3-quic_rdevanat@quicinc.com
    cf1187b3
debugfs_htt_stats.c 45.9 KB