wifi: ath11k: Add HTT stats for PHY reset case
authorNidhi Jain <quic_nidhjain@quicinc.com>
Fri, 26 May 2023 09:41:07 +0000 (12:41 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 1 Jun 2023 10:31:33 +0000 (13:31 +0300)
commit2d4f9093e2d8531ad0a2bb98fe5b36dc8addf2a2
tree6265b791fc82b13b92c15cb57d4d99af511b77ca
parent8aeba427296bff6a6051686f1d139c89a0b00e4c
wifi: ath11k: Add HTT stats for PHY reset case

New HTT stats are added with stats type 37 to
provide PHY reset stats and PHY reset counter stats.

PHY reset stats are used to display the current
PHY-related operation information such as band, CCA
threshold, current operating channel etc.,

PHY reset counter stats are used to display the
PHY reset counter values like calibration counts,
temperature based recalibration counts etc.,

Usage:
echo 37 > /sys/kernel/debug/ieee80211/phyX/ath11k/htt_stats_type
cat /sys/kernel/debug/ieee80211/phyx/ath11k/htt_stats

Output:

HTT_PHY_RESET_STATS_TLV:
pdev_id = 0
chan_mhz = 5180
chan_band_center_freq1 = 5210
chan_band_center_freq2 = 0
chan_phy_mode = 18
chan_flags = 0x8
chan_num = 36
reset_cause = 0x50000
prev_reset_cause = 0x50000
phy_warm_reset_src = 0x0
rx_gain_tbl_mode = 0
xbar_val = 0xfac688
force_calibration = 0
phyrf_mode = 0
phy_homechan = 0
phy_tx_ch_mask = 0x3
phy_rx_ch_mask = 0x3
phybb_ini_mask = 0x5
phyrf_ini_mask = 0x0
phy_dfs_en_mask = 0x0
phy_sscan_en_mask = 0x0
phy_synth_sel_mask = 0x0
phy_adfs_freq = 0
cck_fir_settings = 0x0
phy_dyn_pri_chan = 6
cca_thresh = 0x26232020
dyn_cca_status = 0
rxdesense_thresh_hw = 0xcfe0afe
rxdesense_thresh_sw = 0xcfe0afe

HTT_PHY_RESET_COUNTERS_TLV:
pdev_id = 0
cf_active_low_fail_cnt = 0
cf_active_low_pass_cnt = 0
phy_off_through_vreg_cnt = 0
force_calibration_cnt = 0
rf_mode_switch_phy_off_cnt = 0

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1

Signed-off-by: Nidhi Jain <quic_nidhjain@quicinc.com>
Signed-off-by: Maharaja Kennadyrajan <quic_mkenna@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230517141242.2754293-1-quic_mkenna@quicinc.com
drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h