diff --git a/components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h b/components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h index 1279ca895e..b0fd778a93 100644 --- a/components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h +++ b/components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h @@ -36,6 +36,8 @@ #define IS_MSB_SET(__num) ((__num) & BIT(31)) #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 * request map diff --git a/components/target_if/cp_stats/src/target_if_mc_cp_stats.c b/components/target_if/cp_stats/src/target_if_mc_cp_stats.c index 39b8390852..df77875133 100644 --- a/components/target_if/cp_stats/src/target_if_mc_cp_stats.c +++ b/components/target_if/cp_stats/src/target_if_mc_cp_stats.c @@ -34,6 +34,11 @@ #include #include #include "../../../umac/cmn_services/utils/inc/wlan_utility.h" +#include +#include +#include +#include +#include #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); } }