qcacmn: Add EHT debug counter on PPDU
Add debug count to count PPDU based on UL/DL and type compression mode Change-Id: I2b320e6562d309cc0a178a137162ab0499c81e58 CRs-Fixed: 3326278
This commit is contained in:

committed by
Madan Koyyalamudi

parent
21ba9eb74b
commit
9cb6199f70
@@ -71,10 +71,10 @@ enum cdp_lite_mon_direction {
|
||||
CDP_LITE_MON_DIRECTION_TX = 2,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* MU max user to sniff */
|
||||
#define CDP_MU_SNIF_USER_MAX 4
|
||||
|
||||
/* EHT max type and compression mode */
|
||||
#define CDP_EHT_TYPE_MODE_MAX 3
|
||||
/* Same as MAX_20MHZ_SEGMENTS */
|
||||
#define CDP_MAX_20MHZ_SEGS 16
|
||||
/* Same as MAX_ANTENNA_EIGHT */
|
||||
@@ -376,6 +376,7 @@ enum cdp_mon_phyrx_abort_reason_code {
|
||||
* @status_ppdu_end_mis: status ring missing end TLV count on PPDU
|
||||
* @mpdu_cnt_fcs_ok: MPDU ok count per pkt and reception type DL-UL and user
|
||||
* @mpdu_cnt_fcs_err: MPDU err count per pkt and reception type DL-UL and user
|
||||
* @ppdu_eht_type_mode: PPDU count per type compression mode and DL-UL
|
||||
* @end_user_stats_cnt: PPDU end user TLV count
|
||||
* @start_user_info_cnt: PPDU start user info TLV count
|
||||
* @status_ppdu_done: status ring PPDU done TLV count
|
||||
@@ -426,6 +427,7 @@ struct cdp_pdev_mon_stats {
|
||||
[CDP_MU_TYPE_MAX][CDP_MU_SNIF_USER_MAX];
|
||||
uint32_t mpdu_cnt_fcs_err[CDP_PKT_TYPE_MAX][CDP_RX_TYPE_MAX]
|
||||
[CDP_MU_TYPE_MAX][CDP_MU_SNIF_USER_MAX];
|
||||
uint32_t ppdu_eht_type_mode[CDP_EHT_TYPE_MODE_MAX][CDP_MU_TYPE_MAX];
|
||||
uint32_t end_user_stats_cnt;
|
||||
uint32_t start_user_info_cnt;
|
||||
uint32_t status_ppdu_done;
|
||||
|
@@ -1579,6 +1579,33 @@ dp_rx_mu_stats_update(
|
||||
+= rx_user_status->mpdu_cnt_fcs_err;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_rx_he_ppdu_stats_update(
|
||||
struct cdp_pdev_mon_stats *stats,
|
||||
struct hal_rx_u_sig_info *u_sig
|
||||
)
|
||||
{
|
||||
stats->ppdu_eht_type_mode[u_sig->ppdu_type_comp_mode][u_sig->ul_dl]++;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_rx_he_ppdu_stats(struct dp_pdev *pdev, struct hal_rx_ppdu_info *ppdu_info)
|
||||
{
|
||||
struct dp_mon_pdev *mon_pdev;
|
||||
struct cdp_pdev_mon_stats *rx_mon_stats;
|
||||
|
||||
mon_pdev = pdev->monitor_pdev;
|
||||
rx_mon_stats = &mon_pdev->rx_mon_stats;
|
||||
|
||||
if (ppdu_info->u_sig_info.ppdu_type_comp_mode < CDP_EHT_TYPE_MODE_MAX &&
|
||||
ppdu_info->u_sig_info.ul_dl < CDP_MU_TYPE_MAX)
|
||||
dp_rx_he_ppdu_stats_update(
|
||||
rx_mon_stats,
|
||||
&ppdu_info->u_sig_info);
|
||||
else
|
||||
qdf_assert(0);
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_rx_mu_stats(struct dp_pdev *pdev, struct hal_rx_ppdu_info *ppdu_info)
|
||||
{
|
||||
@@ -1608,6 +1635,9 @@ dp_rx_mu_stats(struct dp_pdev *pdev, struct hal_rx_ppdu_info *ppdu_info)
|
||||
dp_rx_mu_stats_update(ppdu_info, rx_mon_stats, preamble_type,
|
||||
reception_type, mu_dl_ul, i);
|
||||
}
|
||||
|
||||
if (rx_status->eht_flags)
|
||||
dp_rx_he_ppdu_stats(pdev, ppdu_info);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
|
@@ -926,6 +926,49 @@ dp_print_pdev_mpdu_pkt_type(struct cdp_pdev_mon_stats *rx_mon_sts)
|
||||
dp_print_pdev_mpdu_rx_type(rx_mon_sts, pkt_t);
|
||||
}
|
||||
|
||||
static inline void
|
||||
print_ppdu_eht_type_mode(
|
||||
struct cdp_pdev_mon_stats *rx_mon_stats,
|
||||
uint32_t ppdu_type_mode,
|
||||
uint32_t dl_ul)
|
||||
{
|
||||
DP_PRINT_STATS("type_mode=%d, dl_ul=%d, cnt=%d",
|
||||
ppdu_type_mode,
|
||||
dl_ul,
|
||||
rx_mon_stats->ppdu_eht_type_mode[ppdu_type_mode][dl_ul]);
|
||||
}
|
||||
|
||||
static inline void
|
||||
print_ppdu_eth_type_mode_dl_ul(
|
||||
struct cdp_pdev_mon_stats *rx_mon_stats,
|
||||
uint32_t ppdu_type_mode
|
||||
)
|
||||
{
|
||||
uint32_t dl_ul;
|
||||
|
||||
for (dl_ul = 0; dl_ul < CDP_MU_TYPE_MAX; dl_ul++) {
|
||||
if (rx_mon_stats->ppdu_eht_type_mode[ppdu_type_mode][dl_ul])
|
||||
print_ppdu_eht_type_mode(rx_mon_stats,
|
||||
ppdu_type_mode, dl_ul);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_print_pdev_eht_ppdu_cnt(struct dp_pdev *pdev)
|
||||
{
|
||||
struct cdp_pdev_mon_stats *rx_mon_stats;
|
||||
struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev;
|
||||
uint32_t ppdu_type_mode;
|
||||
|
||||
rx_mon_stats = &mon_pdev->rx_mon_stats;
|
||||
DP_PRINT_STATS("Monitor EHT PPDU Count");
|
||||
for (ppdu_type_mode = 0; ppdu_type_mode < CDP_EHT_TYPE_MODE_MAX;
|
||||
ppdu_type_mode++) {
|
||||
print_ppdu_eth_type_mode_dl_ul(rx_mon_stats,
|
||||
ppdu_type_mode);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
dp_print_pdev_mpdu_stats(struct dp_pdev *pdev)
|
||||
{
|
||||
@@ -1033,6 +1076,7 @@ dp_print_pdev_rx_mon_stats(struct dp_pdev *pdev)
|
||||
dp_mon_rx_print_advanced_stats(pdev->soc, pdev);
|
||||
|
||||
dp_print_pdev_mpdu_stats(pdev);
|
||||
dp_print_pdev_eht_ppdu_cnt(pdev);
|
||||
|
||||
}
|
||||
|
||||
|
@@ -1389,8 +1389,8 @@ static inline bool hal_rx_is_non_ofdma(struct hal_soc *hal_soc,
|
||||
static inline bool hal_rx_is_mu_mimo_user(struct hal_soc *hal_soc,
|
||||
struct hal_rx_ppdu_info *ppdu_info)
|
||||
{
|
||||
if (ppdu_info->u_sig_info.ppdu_type_comp_mode == 0 &&
|
||||
ppdu_info->u_sig_info.ul_dl == 2)
|
||||
if (ppdu_info->u_sig_info.ppdu_type_comp_mode == 2 &&
|
||||
ppdu_info->u_sig_info.ul_dl == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user