@@ -2576,6 +2576,98 @@ ath12k_htt_print_pdev_obss_pd_stats_tlv(const void *tag_buf, u16 tag_len,
2576
2576
stats_req -> buf_len = len ;
2577
2577
}
2578
2578
2579
+ static void
2580
+ ath12k_htt_print_pdev_tx_rate_txbf_stats_tlv (const void * tag_buf , u16 tag_len ,
2581
+ struct debug_htt_stats_req * stats_req )
2582
+ {
2583
+ const struct ath12k_htt_pdev_txrate_txbf_stats_tlv * htt_stats_buf = tag_buf ;
2584
+ u32 buf_len = ATH12K_HTT_STATS_BUF_SIZE ;
2585
+ u32 len = stats_req -> buf_len ;
2586
+ u8 * buf = stats_req -> buf ;
2587
+ u8 i ;
2588
+
2589
+ if (tag_len < sizeof (* htt_stats_buf ))
2590
+ return ;
2591
+
2592
+ len += scnprintf (buf + len , buf_len - len ,
2593
+ "HTT_STATS_PDEV_TX_RATE_TXBF_STATS:\n" );
2594
+ len += scnprintf (buf + len , buf_len - len , "Legacy OFDM Rates: 6 Mbps: %u, " ,
2595
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [0 ]));
2596
+ len += scnprintf (buf + len , buf_len - len , "9 Mbps: %u, 12 Mbps: %u, " ,
2597
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [1 ]),
2598
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [2 ]));
2599
+ len += scnprintf (buf + len , buf_len - len , "18 Mbps: %u\n" ,
2600
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [3 ]));
2601
+ len += scnprintf (buf + len , buf_len - len , "24 Mbps: %u, 36 Mbps: %u, " ,
2602
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [4 ]),
2603
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [5 ]));
2604
+ len += scnprintf (buf + len , buf_len - len , "48 Mbps: %u, 54 Mbps: %u\n" ,
2605
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [6 ]),
2606
+ le32_to_cpu (htt_stats_buf -> tx_legacy_ofdm_rate [7 ]));
2607
+
2608
+ len += print_array_to_buf (buf , len , "tx_ol_mcs" , htt_stats_buf -> tx_su_ol_mcs ,
2609
+ ATH12K_HTT_TX_BF_RATE_STATS_NUM_MCS_COUNTERS , "\n" );
2610
+ len += print_array_to_buf (buf , len , "tx_ibf_mcs" , htt_stats_buf -> tx_su_ibf_mcs ,
2611
+ ATH12K_HTT_TX_BF_RATE_STATS_NUM_MCS_COUNTERS , "\n" );
2612
+ len += print_array_to_buf (buf , len , "tx_txbf_mcs" , htt_stats_buf -> tx_su_txbf_mcs ,
2613
+ ATH12K_HTT_TX_BF_RATE_STATS_NUM_MCS_COUNTERS , "\n" );
2614
+ len += print_array_to_buf_index (buf , len , "tx_ol_nss" , 1 ,
2615
+ htt_stats_buf -> tx_su_ol_nss ,
2616
+ ATH12K_HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS ,
2617
+ "\n" );
2618
+ len += print_array_to_buf_index (buf , len , "tx_ibf_nss" , 1 ,
2619
+ htt_stats_buf -> tx_su_ibf_nss ,
2620
+ ATH12K_HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS ,
2621
+ "\n" );
2622
+ len += print_array_to_buf_index (buf , len , "tx_txbf_nss" , 1 ,
2623
+ htt_stats_buf -> tx_su_txbf_nss ,
2624
+ ATH12K_HTT_TX_PDEV_STATS_NUM_SPATIAL_STREAMS ,
2625
+ "\n" );
2626
+ len += print_array_to_buf (buf , len , "tx_ol_bw" , htt_stats_buf -> tx_su_ol_bw ,
2627
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS , "\n" );
2628
+ for (i = 0 ; i < ATH12K_HTT_TXBF_NUM_REDUCED_CHAN_TYPES ; i ++ )
2629
+ len += print_array_to_buf (buf , len , i ? "quarter_tx_ol_bw" :
2630
+ "half_tx_ol_bw" ,
2631
+ htt_stats_buf -> ol [i ],
2632
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS ,
2633
+ "\n" );
2634
+
2635
+ len += print_array_to_buf (buf , len , "tx_ibf_bw" , htt_stats_buf -> tx_su_ibf_bw ,
2636
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS , "\n" );
2637
+ for (i = 0 ; i < ATH12K_HTT_TXBF_NUM_REDUCED_CHAN_TYPES ; i ++ )
2638
+ len += print_array_to_buf (buf , len , i ? "quarter_tx_ibf_bw" :
2639
+ "half_tx_ibf_bw" ,
2640
+ htt_stats_buf -> ibf [i ],
2641
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS ,
2642
+ "\n" );
2643
+
2644
+ len += print_array_to_buf (buf , len , "tx_txbf_bw" , htt_stats_buf -> tx_su_txbf_bw ,
2645
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS , "\n" );
2646
+ for (i = 0 ; i < ATH12K_HTT_TXBF_NUM_REDUCED_CHAN_TYPES ; i ++ )
2647
+ len += print_array_to_buf (buf , len , i ? "quarter_tx_txbf_bw" :
2648
+ "half_tx_txbf_bw" ,
2649
+ htt_stats_buf -> txbf [i ],
2650
+ ATH12K_HTT_TXBF_NUM_BW_CNTRS ,
2651
+ "\n" );
2652
+ len += scnprintf (buf + len , buf_len - len , "\n" );
2653
+
2654
+ len += scnprintf (buf + len , buf_len - len ,
2655
+ "HTT_STATS_PDEV_TXBF_FLAG_RETURN_STATS:\n" );
2656
+ len += scnprintf (buf + len , buf_len - len , "TXBF_reason_code_stats: 0:%u, 1:%u," ,
2657
+ le32_to_cpu (htt_stats_buf -> txbf_flag_set_mu_mode ),
2658
+ le32_to_cpu (htt_stats_buf -> txbf_flag_set_final_status ));
2659
+ len += scnprintf (buf + len , buf_len - len , " 2:%u, 3:%u, 4:%u, 5:%u, " ,
2660
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_verified_txbf_mode ),
2661
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_disable_p2p_access ),
2662
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_max_nss_in_he160 ),
2663
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_disable_uldlofdma ));
2664
+ len += scnprintf (buf + len , buf_len - len , "6:%u, 7:%u\n\n" ,
2665
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_mcs_threshold_val ),
2666
+ le32_to_cpu (htt_stats_buf -> txbf_flag_not_set_final_status ));
2667
+
2668
+ stats_req -> buf_len = len ;
2669
+ }
2670
+
2579
2671
static void ath12k_htt_print_dlpager_entry (const struct ath12k_htt_pgs_info * pg_info ,
2580
2672
int idx , char * str_buf )
2581
2673
{
@@ -3508,6 +3600,9 @@ static int ath12k_dbg_htt_ext_stats_parse(struct ath12k_base *ab,
3508
3600
case HTT_STATS_PDEV_OBSS_PD_TAG :
3509
3601
ath12k_htt_print_pdev_obss_pd_stats_tlv (tag_buf , len , stats_req );
3510
3602
break ;
3603
+ case HTT_STATS_PDEV_TX_RATE_TXBF_STATS_TAG :
3604
+ ath12k_htt_print_pdev_tx_rate_txbf_stats_tlv (tag_buf , len , stats_req );
3605
+ break ;
3511
3606
case HTT_STATS_DLPAGER_STATS_TAG :
3512
3607
ath12k_htt_print_dlpager_stats_tlv (tag_buf , len , stats_req );
3513
3608
break ;
0 commit comments