From 478d035baaeb2d458d85952aa7fdebdbdac4454f Mon Sep 17 00:00:00 2001 From: Naga Date: Tue, 16 Oct 2018 12:15:41 +0530 Subject: [PATCH] qcacmn: Enhance cp stats component Add new fields tx_tooshort, tx and rx discard control plane stats at vdev level CRs-Fixed: 2327398 Change-Id: I9f3ae1f4d043319fec8f08752d9112ab5e9f6ef9 --- umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_defs.h | 8 ++++++++ .../dispatcher/inc/wlan_cp_stats_ic_ucfg_api.h | 6 ++++++ .../dispatcher/inc/wlan_cp_stats_ic_utils_api.h | 12 ++++++++++++ 3 files changed, 26 insertions(+) diff --git a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_defs.h b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_defs.h index 4ea1f871c610..12a2f4554e82 100644 --- a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_defs.h +++ b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_defs.h @@ -97,6 +97,7 @@ struct pdev_hw_stats { * @cs_cycle_count: cycle count * @cs_phy_err_count: phy error count * @cs_chan_tx_pwr: channel tx power + * @cs_fcsbad: fcs error count */ struct pdev_80211_stats { uint64_t cs_tx_beacon; @@ -138,6 +139,7 @@ struct pdev_80211_stats { uint32_t cs_cycle_count; uint32_t cs_phy_err_count; uint32_t cs_chan_tx_pwr; + uint32_t cs_fcsbad; /* at places of copying required for scn-stats, copy till here only */ struct pdev_hw_stats hw_stats; @@ -233,6 +235,7 @@ struct pdev_ic_cp_stats { * @cs_tx_offchan_data: tx offchan data * @cs_tx_offchan_fail: tx offchan fail * @cs_rx_wrongbss: rx from wrong bssid + * @cs_rx_tooshort: rx packet length too short * @cs_rx_wrongdir: rx wrong direction * @cs_rx_not_assoc: rx discard cuz sta !assoc * @cs_rx_no_privacy: rx wep but privacy off @@ -295,6 +298,7 @@ struct pdev_ic_cp_stats { */ struct vdev_80211_stats { uint64_t cs_rx_wrongbss; + uint64_t cs_rx_tooshort; uint64_t cs_rx_wrongdir; uint64_t cs_rx_mcast_echo; uint64_t cs_rx_not_assoc; @@ -380,6 +384,8 @@ struct vdev_80211_stats { * @cs_rx_countermeasure: rx counter measures count * @cs_tx_mgmt: tx mgmt * @cs_rx_mgmt: rx mgmt + * @cs_tx_discard: tx dropped due to errors + * @cs_rx_mgmt: rx dropped due to errors */ struct vdev_80211_mac_stats { uint64_t cs_rx_badkeyid; @@ -396,6 +402,8 @@ struct vdev_80211_mac_stats { uint64_t cs_rx_countermeasure; uint64_t cs_tx_mgmt; uint64_t cs_rx_mgmt; + uint64_t cs_tx_discard; + uint64_t cs_rx_discard; }; /** diff --git a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_ucfg_api.h b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_ucfg_api.h index 9cce14246255..7b2729b7559b 100644 --- a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_ucfg_api.h +++ b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_ucfg_api.h @@ -136,6 +136,7 @@ UCFG_PDEV_CP_STATS_GET_FUNCS(wmi_tx_mgmt_completions); UCFG_PDEV_CP_STATS_GET_FUNCS(wmi_tx_mgmt_completion_err); UCFG_PDEV_CP_STATS_GET_FUNCS(tgt_asserts); UCFG_PDEV_CP_STATS_GET_FUNCS(rx_phy_err); +UCFG_PDEV_CP_STATS_GET_FUNCS(fcsbad); #define UCFG_PDEV_CHAN_STATS_GET_FUNCS(field) \ static inline uint32_t \ @@ -317,6 +318,7 @@ UCFG_PDEV_LMAC_CP_STATS_GET_FUNCS(ast_noise_floor); } UCFG_VDEV_CP_STATS_SET_FUNCS(rx_wrongbss); +UCFG_VDEV_CP_STATS_SET_FUNCS(rx_tooshort); UCFG_VDEV_CP_STATS_SET_FUNCS(rx_wrongdir); UCFG_VDEV_CP_STATS_SET_FUNCS(rx_not_assoc); UCFG_VDEV_CP_STATS_SET_FUNCS(rx_noprivacy); @@ -452,6 +454,8 @@ UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(rx_wpireplay); UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(rx_countermeasure); UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(rx_mgmt); UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(tx_mgmt); +UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(rx_discard); +UCFG_VDEV_UCAST_CP_STATS_SET_FUNCS(tx_discard); #define UCFG_VDEV_UCAST_CP_STATS_GET_FUNCS(field) \ static inline uint64_t \ @@ -530,6 +534,8 @@ UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(rx_wpireplay); UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(rx_countermeasure); UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(rx_mgmt); UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(tx_mgmt); +UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(rx_discard); +UCFG_VDEV_MCAST_CP_STATS_SET_FUNCS(tx_discard); #define UCFG_VDEV_MCAST_CP_STATS_GET_FUNCS(field) \ static inline uint64_t \ diff --git a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_utils_api.h b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_utils_api.h index 547949ef6f2d..ba2f8978e964 100644 --- a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_utils_api.h +++ b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_utils_api.h @@ -120,6 +120,8 @@ VDEV_UCAST_CP_STATS_SET_FUNCS(rx_wpireplay); VDEV_UCAST_CP_STATS_SET_FUNCS(rx_countermeasure); VDEV_UCAST_CP_STATS_SET_FUNCS(rx_mgmt); VDEV_UCAST_CP_STATS_SET_FUNCS(tx_mgmt); +VDEV_UCAST_CP_STATS_SET_FUNCS(rx_discard); +VDEV_UCAST_CP_STATS_SET_FUNCS(tx_discard); #define VDEV_UCAST_CP_STATS_GET_FUNCS(field) \ static inline uint64_t \ @@ -161,6 +163,8 @@ VDEV_MCAST_CP_STATS_SET_FUNCS(rx_wpireplay); VDEV_MCAST_CP_STATS_SET_FUNCS(rx_countermeasure); VDEV_MCAST_CP_STATS_SET_FUNCS(rx_mgmt); VDEV_MCAST_CP_STATS_SET_FUNCS(tx_mgmt); +VDEV_MCAST_CP_STATS_SET_FUNCS(rx_discard); +VDEV_MCAST_CP_STATS_SET_FUNCS(tx_discard); #define VDEV_MCAST_CP_STATS_GET_FUNCS(field) \ static inline uint64_t \ @@ -186,9 +190,16 @@ VDEV_MCAST_CP_STATS_GET_FUNCS(rx_ccmpreplay); uint64_t _val) \ { \ ucfg_vdev_cp_stats_##field##_update(_vdev, _val); \ + } \ + static inline void \ + vdev_cp_stats_##field##_dec(struct wlan_objmgr_vdev *_vdev, \ + uint64_t _val) \ + { \ + ucfg_vdev_cp_stats_##field##_dec(_vdev, _val); \ } VDEV_CP_STATS_SET_FUNCS(rx_wrongbss); +VDEV_CP_STATS_SET_FUNCS(rx_tooshort); VDEV_CP_STATS_SET_FUNCS(rx_wrongdir); VDEV_CP_STATS_SET_FUNCS(rx_not_assoc); VDEV_CP_STATS_SET_FUNCS(rx_noprivacy); @@ -360,6 +371,7 @@ PDEV_CP_STATS_GET_FUNCS(wmi_tx_mgmt_completions); PDEV_CP_STATS_GET_FUNCS(wmi_tx_mgmt_completion_err); PDEV_CP_STATS_GET_FUNCS(tgt_asserts); PDEV_CP_STATS_GET_FUNCS(rx_phy_err); +PDEV_CP_STATS_GET_FUNCS(fcsbad); static inline void pdev_cp_stats_reset(struct wlan_objmgr_pdev *pdev) {