diff mbox series

[v3] wifi: ath11k: add support for htt stats rx_ext_stats (30) support

Message ID 20230418143032.4814-1-quic_karm@quicinc.com (mailing list archive)
State Rejected
Delegated to: Kalle Valo
Headers show
Series [v3] wifi: ath11k: add support for htt stats rx_ext_stats (30) support | expand

Commit Message

Karthik M April 18, 2023, 2:30 p.m. UTC
HTT stats, HTT_RX_PDEV_RATE_EXT_STATS has the rx stats info of
the extended 80MHz, mainly 80+80 and 160MHz modes.

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

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-01184-QCAHKSWPL_SILICONZ-1

Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
Signed-off-by: Karthik M <quic_karm@quicinc.com>
---
---
v2:
  - Integrated the patch already raised.
---
v3:
  - Addressed jeff's comments to remove unnecssary MACRO
  - Removed scnprintf check
  - Removed inline in function definition.
---
 drivers/net/wireless/ath/ath11k/debugfs.h     |  1 +
 .../wireless/ath/ath11k/debugfs_htt_stats.c   | 91 +++++++++++++++++++
 .../wireless/ath/ath11k/debugfs_htt_stats.h   | 40 ++++++++
 3 files changed, 132 insertions(+)

Comments

Karthik M April 19, 2023, 6:04 a.m. UTC | #1
Please ignore this patch.

Karthik M

On 18-Apr-23 8:00 PM, Karthik M wrote:
> HTT stats, HTT_RX_PDEV_RATE_EXT_STATS has the rx stats info of
> the extended 80MHz, mainly 80+80 and 160MHz modes.
> 
> Usage: echo 30 > /sys/kernel/debug/ieee80211/phyx/ath11k/htt_stats_type
>         cat /sys/kernel/debug/ieee80211/phyx/ath11k/htt_stats
> 
> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.9.0.1-01184-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
> Signed-off-by: Karthik M <quic_karm@quicinc.com>
> ---
> ---
> v2:
>    - Integrated the patch already raised.
> ---
> v3:
>    - Addressed jeff's comments to remove unnecssary MACRO
>    - Removed scnprintf check
>    - Removed inline in function definition.
> ---
>   drivers/net/wireless/ath/ath11k/debugfs.h     |  1 +
>   .../wireless/ath/ath11k/debugfs_htt_stats.c   | 91 +++++++++++++++++++
>   .../wireless/ath/ath11k/debugfs_htt_stats.h   | 40 ++++++++
>   3 files changed, 132 insertions(+)
> 
> diff --git a/drivers/net/wireless/ath/ath11k/debugfs.h b/drivers/net/wireless/ath/ath11k/debugfs.h
> index 3af0169f6cf2..00da0c06b4a0 100644
> --- a/drivers/net/wireless/ath/ath11k/debugfs.h
> +++ b/drivers/net/wireless/ath/ath11k/debugfs.h
> @@ -39,6 +39,7 @@ enum ath11k_dbg_htt_ext_stats_type {
>   	ATH11K_DBG_HTT_EXT_STATS_PDEV_OBSS_PD_STATS	    =  23,
>   	ATH11K_DBG_HTT_EXT_STATS_RING_BACKPRESSURE_STATS    =  24,
>   	ATH11K_DBG_HTT_EXT_STATS_PEER_CTRL_PATH_TXRX_STATS  =  29,
> +	ATH11K_DBG_HTT_EXT_STATS_PDEV_RX_RATE_EXT           =  30,
>   	ATH11K_DBG_HTT_EXT_STATS_PDEV_TX_RATE_TXBF_STATS    =  31,
>   	ATH11K_DBG_HTT_EXT_STATS_TXBF_OFDMA		    =  32,
>   	ATH11K_DBG_HTT_EXT_PHY_COUNTERS_AND_PHY_STATS	    =  37,
> diff --git a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
> index b3efca6bd7dd..ee094197c70e 100644
> --- a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
> +++ b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
> @@ -2879,6 +2879,94 @@ static inline void htt_print_tx_pdev_rate_stats_tlv(const void *tag_buf,
>   	stats_req->buf_len = len;
>   }
>   
> +static void htt_print_rx_pdev_rate_ext_stats_tlv(const void *tag_buf,
> +						 struct debug_htt_stats_req *stats_req)
> +{
> +	const struct htt_rx_pdev_rate_ext_stats_tlv *htt_stats_buf = tag_buf;
> +	u8 *buf = stats_req->buf;
> +	u32 len = stats_req->buf_len;
> +	u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
> +	u8 i, j;
> +
> +	len += scnprintf(buf + len, buf_len - len,
> +			 "HTT_RX_PDEV_RATE_EXT_STATS_TLV:\n");
> +	len += scnprintf(buf + len, buf_len - len, "rssi_mcast = %d\n",
> +			 htt_stats_buf->rssi_mcast);
> +	len += scnprintf(buf + len, buf_len - len, "rssi_mgmt = %d\n",
> +			 htt_stats_buf->rssi_mgmt);
> +
> +	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS; j++) {
> +		len += scnprintf(buf + len, buf_len - len,
> +				 "\nrssi_chain_ext[%u] = ", j);
> +		PRINT_ARRAY_TO_BUF(buf, len,
> +				   htt_stats_buf->rssi_chain_ext[j],
> +				   NULL,
> +				   HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS,
> +				   "\n");
> +	}
> +
> +	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS; j++) {
> +		len += scnprintf(buf + len, buf_len - len,
> +				 "\nrx_per_chain_rssi_ext_in_dbm[%u] = ", j);
> +		for (i = 0; i < HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS; i++)
> +			len += scnprintf(buf + len,
> +					 ATH11K_HTT_STATS_BUF_SIZE - len,
> +					 " %u:%d,",
> +					 i,
> +					 htt_stats_buf->rx_per_chain_rssi_ext_in_dbm[j][i]);
> +		len += scnprintf(buf + len,
> +				 ATH11K_HTT_STATS_BUF_SIZE - len,
> +				 "\n");
> +	}
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_mcs_ext,
> +			   "\nrx_mcs_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_stbc_ext,
> +			   "\nrx_stbc_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_GI_COUNTERS; j++) {
> +		len += scnprintf(buf + len, buf_len - len,
> +				 "\nrx_gi_ext[%u] = ", j);
> +		PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_gi_ext[j],
> +				   NULL,
> +				   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT,
> +				   "\n");
> +	}
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->ul_ofdma_rx_mcs_ext,
> +			   "\nul_ofdma_rx_mcs_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_GI_COUNTERS; j++) {
> +		len += scnprintf(buf + len, buf_len - len,
> +				 "\nul_ofdma_rx_gi_ext[%u] = ", j);
> +		PRINT_ARRAY_TO_BUF(buf, len,
> +				   htt_stats_buf->ul_ofdma_rx_gi_ext[j],
> +				   NULL,
> +				   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT,
> +				   "\n");
> +	}
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_su_txbf_mcs_ext,
> +			   "\nrx_11ax_su_txbf_mcs_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_mu_txbf_mcs_ext,
> +			   "\nrx_11ax_mu_txbf_mcs_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_dl_ofdma_mcs_ext,
> +			   "\nrx_11ax_dl_ofdma_mcs_ext",
> +			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
> +
> +	len += scnprintf(buf + len, buf_len - len, "\n");
> +
> +	stats_req->buf_len = len;
> +}
> +
>   static inline void htt_print_rx_pdev_rate_stats_tlv(const void *tag_buf,
>   						    struct debug_htt_stats_req *stats_req)
>   {
> @@ -4428,6 +4516,9 @@ static int ath11k_dbg_htt_ext_stats_parse(struct ath11k_base *ab,
>   	case HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG:
>   		htt_print_peer_ctrl_path_txrx_stats_tlv(tag_buf, stats_req);
>   		break;
> +	case HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG:
> +		htt_print_rx_pdev_rate_ext_stats_tlv(tag_buf, stats_req);
> +		break;
>   	default:
>   		break;
>   	}
> diff --git a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
> index 2b97cbbd28cb..ce692fb3f357 100644
> --- a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
> +++ b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
> @@ -104,6 +104,7 @@ enum htt_tlv_tag_t {
>   	HTT_STATS_HW_WAR_TAG				    = 89,
>   	HTT_STATS_RING_BACKPRESSURE_STATS_TAG		    = 90,
>   	HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG		    = 101,
> +	HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG                = 103,
>   	HTT_STATS_PDEV_TX_RATE_TXBF_STATS_TAG		    = 108,
>   	HTT_STATS_TXBF_OFDMA_NDPA_STATS_TAG		    = 113,
>   	HTT_STATS_TXBF_OFDMA_NDP_STATS_TAG		    = 114,
> @@ -442,6 +443,12 @@ enum htt_stats_param_type {
>   #define HTT_TX_PEER_STATS_NUM_MCS_COUNTERS        12
>   #define HTT_TX_PEER_STATS_NUM_GI_COUNTERS          4
>   #define HTT_TX_PEER_STATS_NUM_DCM_COUNTERS         5
> +/* HTT_TX_PEER_STATS_NUM_BW_COUNTERS:
> + * bw index 0: rssi_pri20_chain0
> + * bw index 1: rssi_ext20_chain0
> + * bw index 2: rssi_ext40_low20_chain0
> + * bw index 3: rssi_ext40_high20_chain0
> + */
>   #define HTT_TX_PEER_STATS_NUM_BW_COUNTERS          4
>   #define HTT_TX_PEER_STATS_NUM_SPATIAL_STREAMS      8
>   #define HTT_TX_PEER_STATS_NUM_PREAMBLE_TYPES       HTT_STATS_PREAM_COUNT
> @@ -1986,4 +1993,37 @@ static inline int ath11k_debugfs_htt_stats_req(struct ath11k *ar)
>   
>   #endif /* CONFIG_ATH11K_DEBUGFS */
>   
> +/* == PDEV RX RATE EXT STATS == */
> +#define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT 14
> +/* HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS:
> + * bw index 4 (bw ext index 0): rssi_ext80_low20_chain0
> + * bw index 5 (bw ext index 1): rssi_ext80_low_high20_chain0
> + * bw index 6 (bw ext index 2): rssi_ext80_high_low20_chain0
> + * bw index 7 (bw ext index 3): rssi_ext80_high20_chain0
> + */
> +#define HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS 4
> +#define HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS 4
> +
> +struct htt_rx_pdev_rate_ext_stats_tlv {
> +	u8 rssi_chain_ext[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]
> +			 [HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
> +	/* units = dB above noise floor */
> +	s8 rx_per_chain_rssi_ext_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]
> +				       [HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
> +	/* rx mcast signal strength value in dBm unit */
> +	s32 rssi_mcast;
> +	/* rx mgmt packet signal strength value in dBm unit */
> +	s32 rssi_mgmt;
> +	u32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 rx_stbc_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS]
> +		     [HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 ul_ofdma_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 ul_ofdma_rx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS]
> +			      [HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 rx_11ax_su_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 rx_11ax_mu_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +	u32 rx_11ax_dl_ofdma_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
> +};
> +
>   #endif
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/debugfs.h b/drivers/net/wireless/ath/ath11k/debugfs.h
index 3af0169f6cf2..00da0c06b4a0 100644
--- a/drivers/net/wireless/ath/ath11k/debugfs.h
+++ b/drivers/net/wireless/ath/ath11k/debugfs.h
@@ -39,6 +39,7 @@  enum ath11k_dbg_htt_ext_stats_type {
 	ATH11K_DBG_HTT_EXT_STATS_PDEV_OBSS_PD_STATS	    =  23,
 	ATH11K_DBG_HTT_EXT_STATS_RING_BACKPRESSURE_STATS    =  24,
 	ATH11K_DBG_HTT_EXT_STATS_PEER_CTRL_PATH_TXRX_STATS  =  29,
+	ATH11K_DBG_HTT_EXT_STATS_PDEV_RX_RATE_EXT           =  30,
 	ATH11K_DBG_HTT_EXT_STATS_PDEV_TX_RATE_TXBF_STATS    =  31,
 	ATH11K_DBG_HTT_EXT_STATS_TXBF_OFDMA		    =  32,
 	ATH11K_DBG_HTT_EXT_PHY_COUNTERS_AND_PHY_STATS	    =  37,
diff --git a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
index b3efca6bd7dd..ee094197c70e 100644
--- a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
+++ b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.c
@@ -2879,6 +2879,94 @@  static inline void htt_print_tx_pdev_rate_stats_tlv(const void *tag_buf,
 	stats_req->buf_len = len;
 }
 
+static void htt_print_rx_pdev_rate_ext_stats_tlv(const void *tag_buf,
+						 struct debug_htt_stats_req *stats_req)
+{
+	const struct htt_rx_pdev_rate_ext_stats_tlv *htt_stats_buf = tag_buf;
+	u8 *buf = stats_req->buf;
+	u32 len = stats_req->buf_len;
+	u32 buf_len = ATH11K_HTT_STATS_BUF_SIZE;
+	u8 i, j;
+
+	len += scnprintf(buf + len, buf_len - len,
+			 "HTT_RX_PDEV_RATE_EXT_STATS_TLV:\n");
+	len += scnprintf(buf + len, buf_len - len, "rssi_mcast = %d\n",
+			 htt_stats_buf->rssi_mcast);
+	len += scnprintf(buf + len, buf_len - len, "rssi_mgmt = %d\n",
+			 htt_stats_buf->rssi_mgmt);
+
+	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS; j++) {
+		len += scnprintf(buf + len, buf_len - len,
+				 "\nrssi_chain_ext[%u] = ", j);
+		PRINT_ARRAY_TO_BUF(buf, len,
+				   htt_stats_buf->rssi_chain_ext[j],
+				   NULL,
+				   HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS,
+				   "\n");
+	}
+
+	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS; j++) {
+		len += scnprintf(buf + len, buf_len - len,
+				 "\nrx_per_chain_rssi_ext_in_dbm[%u] = ", j);
+		for (i = 0; i < HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS; i++)
+			len += scnprintf(buf + len,
+					 ATH11K_HTT_STATS_BUF_SIZE - len,
+					 " %u:%d,",
+					 i,
+					 htt_stats_buf->rx_per_chain_rssi_ext_in_dbm[j][i]);
+		len += scnprintf(buf + len,
+				 ATH11K_HTT_STATS_BUF_SIZE - len,
+				 "\n");
+	}
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_mcs_ext,
+			   "\nrx_mcs_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_stbc_ext,
+			   "\nrx_stbc_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_GI_COUNTERS; j++) {
+		len += scnprintf(buf + len, buf_len - len,
+				 "\nrx_gi_ext[%u] = ", j);
+		PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_gi_ext[j],
+				   NULL,
+				   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT,
+				   "\n");
+	}
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->ul_ofdma_rx_mcs_ext,
+			   "\nul_ofdma_rx_mcs_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	for (j = 0; j < HTT_RX_PDEV_STATS_NUM_GI_COUNTERS; j++) {
+		len += scnprintf(buf + len, buf_len - len,
+				 "\nul_ofdma_rx_gi_ext[%u] = ", j);
+		PRINT_ARRAY_TO_BUF(buf, len,
+				   htt_stats_buf->ul_ofdma_rx_gi_ext[j],
+				   NULL,
+				   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT,
+				   "\n");
+	}
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_su_txbf_mcs_ext,
+			   "\nrx_11ax_su_txbf_mcs_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_mu_txbf_mcs_ext,
+			   "\nrx_11ax_mu_txbf_mcs_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	PRINT_ARRAY_TO_BUF(buf, len, htt_stats_buf->rx_11ax_dl_ofdma_mcs_ext,
+			   "\nrx_11ax_dl_ofdma_mcs_ext",
+			   HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT, "\n");
+
+	len += scnprintf(buf + len, buf_len - len, "\n");
+
+	stats_req->buf_len = len;
+}
+
 static inline void htt_print_rx_pdev_rate_stats_tlv(const void *tag_buf,
 						    struct debug_htt_stats_req *stats_req)
 {
@@ -4428,6 +4516,9 @@  static int ath11k_dbg_htt_ext_stats_parse(struct ath11k_base *ab,
 	case HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG:
 		htt_print_peer_ctrl_path_txrx_stats_tlv(tag_buf, stats_req);
 		break;
+	case HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG:
+		htt_print_rx_pdev_rate_ext_stats_tlv(tag_buf, stats_req);
+		break;
 	default:
 		break;
 	}
diff --git a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
index 2b97cbbd28cb..ce692fb3f357 100644
--- a/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
+++ b/drivers/net/wireless/ath/ath11k/debugfs_htt_stats.h
@@ -104,6 +104,7 @@  enum htt_tlv_tag_t {
 	HTT_STATS_HW_WAR_TAG				    = 89,
 	HTT_STATS_RING_BACKPRESSURE_STATS_TAG		    = 90,
 	HTT_STATS_PEER_CTRL_PATH_TXRX_STATS_TAG		    = 101,
+	HTT_STATS_RX_PDEV_RATE_EXT_STATS_TAG                = 103,
 	HTT_STATS_PDEV_TX_RATE_TXBF_STATS_TAG		    = 108,
 	HTT_STATS_TXBF_OFDMA_NDPA_STATS_TAG		    = 113,
 	HTT_STATS_TXBF_OFDMA_NDP_STATS_TAG		    = 114,
@@ -442,6 +443,12 @@  enum htt_stats_param_type {
 #define HTT_TX_PEER_STATS_NUM_MCS_COUNTERS        12
 #define HTT_TX_PEER_STATS_NUM_GI_COUNTERS          4
 #define HTT_TX_PEER_STATS_NUM_DCM_COUNTERS         5
+/* HTT_TX_PEER_STATS_NUM_BW_COUNTERS:
+ * bw index 0: rssi_pri20_chain0
+ * bw index 1: rssi_ext20_chain0
+ * bw index 2: rssi_ext40_low20_chain0
+ * bw index 3: rssi_ext40_high20_chain0
+ */
 #define HTT_TX_PEER_STATS_NUM_BW_COUNTERS          4
 #define HTT_TX_PEER_STATS_NUM_SPATIAL_STREAMS      8
 #define HTT_TX_PEER_STATS_NUM_PREAMBLE_TYPES       HTT_STATS_PREAM_COUNT
@@ -1986,4 +1993,37 @@  static inline int ath11k_debugfs_htt_stats_req(struct ath11k *ar)
 
 #endif /* CONFIG_ATH11K_DEBUGFS */
 
+/* == PDEV RX RATE EXT STATS == */
+#define HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT 14
+/* HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS:
+ * bw index 4 (bw ext index 0): rssi_ext80_low20_chain0
+ * bw index 5 (bw ext index 1): rssi_ext80_low_high20_chain0
+ * bw index 6 (bw ext index 2): rssi_ext80_high_low20_chain0
+ * bw index 7 (bw ext index 3): rssi_ext80_high20_chain0
+ */
+#define HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS 4
+#define HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS 4
+
+struct htt_rx_pdev_rate_ext_stats_tlv {
+	u8 rssi_chain_ext[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]
+			 [HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
+	/* units = dB above noise floor */
+	s8 rx_per_chain_rssi_ext_in_dbm[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]
+				       [HTT_RX_PDEV_STATS_NUM_BW_EXT_COUNTERS];
+	/* rx mcast signal strength value in dBm unit */
+	s32 rssi_mcast;
+	/* rx mgmt packet signal strength value in dBm unit */
+	s32 rssi_mgmt;
+	u32 rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 rx_stbc_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 rx_gi_ext[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS]
+		     [HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 ul_ofdma_rx_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 ul_ofdma_rx_gi_ext[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS]
+			      [HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 rx_11ax_su_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 rx_11ax_mu_txbf_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+	u32 rx_11ax_dl_ofdma_mcs_ext[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS_EXT];
+};
+
 #endif