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:

committed by
nshrivas

parent
2a74a1d231
commit
0bfa34876f
@@ -36,6 +36,8 @@
|
|||||||
#define IS_MSB_SET(__num) ((__num) & BIT(31))
|
#define IS_MSB_SET(__num) ((__num) & BIT(31))
|
||||||
#define IS_LSB_SET(__num) ((__num) & BIT(0))
|
#define IS_LSB_SET(__num) ((__num) & BIT(0))
|
||||||
|
|
||||||
|
#define VDEV_ALL 0xFF
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum stats_req_type - enum indicating bit position of various stats type in
|
* enum stats_req_type - enum indicating bit position of various stats type in
|
||||||
* request map
|
* request map
|
||||||
|
@@ -34,6 +34,11 @@
|
|||||||
#include <wlan_cp_stats_utils_api.h>
|
#include <wlan_cp_stats_utils_api.h>
|
||||||
#include <wlan_cp_stats_mc_tgt_api.h>
|
#include <wlan_cp_stats_mc_tgt_api.h>
|
||||||
#include "../../../umac/cmn_services/utils/inc/wlan_utility.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
|
#ifdef WLAN_FEATURE_MIB_STATS
|
||||||
static void target_if_cp_stats_free_mib_stats(struct stats_event *ev)
|
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;
|
QDF_STATUS status;
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
wmi_host_peer_extd_stats peer_extd_stats;
|
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)
|
if (!stats_param->num_peer_extd_stats)
|
||||||
return;
|
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].peer_macaddr);
|
||||||
ev->peer_extended_stats[i].rx_mc_bc_cnt =
|
ev->peer_extended_stats[i].rx_mc_bc_cnt =
|
||||||
peer_extd_stats.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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user