qcacld-3.0: Update mc_bc rx pkt count in peer stats

Update multicast and broadcast rx packet count on
receiving wmi update stats event from firmware by
fetching the peer stats from DP layer.

Change-Id: I0befdbe952aa4e773bbe072affaf698819b3a80f
CRs-Fixed: 2709871
This commit is contained in:
Yeshwanth Sriram Guntuka
2020-06-15 11:20:14 +05:30
committed by nshrivas
parent 2a74a1d231
commit 0bfa34876f
2 changed files with 23 additions and 0 deletions

View File

@@ -34,6 +34,11 @@
#include <wlan_cp_stats_utils_api.h>
#include <wlan_cp_stats_mc_tgt_api.h>
#include "../../../umac/cmn_services/utils/inc/wlan_utility.h"
#include <cdp_txrx_cmn_struct.h>
#include <cdp_txrx_ops.h>
#include <cdp_txrx_stats_struct.h>
#include <cdp_txrx_host_stats.h>
#include <cds_api.h>
#ifdef WLAN_FEATURE_MIB_STATS
static void target_if_cp_stats_free_mib_stats(struct stats_event *ev)
@@ -110,6 +115,8 @@ static void target_if_cp_stats_extract_peer_extd_stats(
QDF_STATUS status;
uint32_t i;
wmi_host_peer_extd_stats peer_extd_stats;
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
struct cdp_peer_stats *peer_stats;
if (!stats_param->num_peer_extd_stats)
return;
@@ -134,6 +141,20 @@ static void target_if_cp_stats_extract_peer_extd_stats(
ev->peer_extended_stats[i].peer_macaddr);
ev->peer_extended_stats[i].rx_mc_bc_cnt =
peer_extd_stats.rx_mc_bc_cnt;
peer_stats = qdf_mem_malloc(sizeof(*peer_stats));
if (!peer_stats)
continue;
status = cdp_host_get_peer_stats(soc, VDEV_ALL,
ev->peer_extended_stats[i].peer_macaddr,
peer_stats);
if (status == QDF_STATUS_SUCCESS)
ev->peer_extended_stats[i].rx_mc_bc_cnt =
peer_stats->rx.multicast.num +
peer_stats->rx.bcast.num;
qdf_mem_free(peer_stats);
}
}