qcacmn: Log Tx/Rx MCS stats as part of Tx/Rx path stats

Log Tx/Rx MCS stats as part of Tx/Rx path stats.

Change-Id: Idd2caf5fe5343a56440e7b501f22fe10c16e8010
CRs-Fixed: 3492558
This commit is contained in:
Srinivas Girigowda
2023-05-01 18:41:15 -07:00
committed by Rahul Choudhary
parent 7c8eccb50f
commit 4f720afb5e

View File

@@ -7238,6 +7238,42 @@ void dp_print_per_ring_stats(struct dp_soc *soc)
}
}
static void dp_pdev_print_tx_rx_rates(struct dp_pdev *pdev)
{
struct dp_vdev *vdev;
struct dp_vdev **vdev_array = NULL;
int index = 0, num_vdev = 0;
if (!pdev) {
dp_err("pdev is NULL");
return;
}
vdev_array =
qdf_mem_malloc(sizeof(struct dp_vdev *) * WLAN_PDEV_MAX_VDEVS);
if (!vdev_array)
return;
qdf_spin_lock_bh(&pdev->vdev_list_lock);
DP_PDEV_ITERATE_VDEV_LIST(pdev, vdev) {
if (dp_vdev_get_ref(pdev->soc, vdev, DP_MOD_ID_GENERIC_STATS))
continue;
vdev_array[index] = vdev;
index = index + 1;
}
qdf_spin_unlock_bh(&pdev->vdev_list_lock);
num_vdev = index;
for (index = 0; index < num_vdev; index++) {
vdev = vdev_array[index];
dp_print_rx_rates(vdev);
dp_print_tx_rates(vdev);
dp_vdev_unref_delete(pdev->soc, vdev, DP_MOD_ID_GENERIC_STATS);
}
qdf_mem_free(vdev_array);
}
void dp_txrx_path_stats(struct dp_soc *soc)
{
uint8_t error_code;
@@ -7483,6 +7519,7 @@ void dp_txrx_path_stats(struct dp_soc *soc)
pdev->soc->wlan_cfg_ctx
->tx_flow_start_queue_offset);
#endif
dp_pdev_print_tx_rx_rates(pdev);
}
}