From e85b72a4ae9fadce051ac10f87f8a6cc81fd9d67 Mon Sep 17 00:00:00 2001 From: Naga Date: Wed, 4 Apr 2018 11:54:25 +0530 Subject: [PATCH] qcacmn: Add support for Extended BSS IE Add implementation to enhance structure corresponding to WMI_DCS_INTERFERENCE_EVENT_ID handler in cp stats component which hold secondary 40 and 80MHz utilization which are required parameters of Extended BSS IE Change-Id: I1c471608394d5c395632742098d2c92fc02ec238 CRs-Fixed: 2298073 --- .../inc/wlan_cp_stats_ic_dcs_defs.h | 16 ++--- .../inc/wlan_cp_stats_ic_ucfg_api.h | 58 ++----------------- .../inc/wlan_cp_stats_ic_utils_api.h | 34 ++--------- wmi/inc/wmi_unified_param.h | 7 +++ 4 files changed, 25 insertions(+), 90 deletions(-) diff --git a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_dcs_defs.h b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_dcs_defs.h index 56e490dd1637..2e1a7526c5f2 100644 --- a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_dcs_defs.h +++ b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_ic_dcs_defs.h @@ -43,14 +43,14 @@ * @dcs_sec_80_util: secondary 80MHz util */ struct pdev_dcs_chan_stats { - uint32_t dcs_total_util; - uint32_t dcs_ap_tx_util; - uint32_t dcs_ap_rx_util; - uint32_t dcs_self_bss_util; - uint32_t dcs_obss_util; - uint32_t dcs_obss_rx_util; - uint32_t dcs_free_medium; - uint32_t dcs_non_wifi_util; + uint8_t dcs_total_util; + uint8_t dcs_ap_tx_util; + uint8_t dcs_ap_rx_util; + uint8_t dcs_self_bss_util; + uint8_t dcs_obss_util; + uint8_t dcs_obss_rx_util; + uint8_t dcs_free_medium; + uint8_t dcs_non_wifi_util; uint32_t dcs_ss_under_util; uint32_t dcs_sec_20_util; uint32_t dcs_sec_40_util; 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 5161a453870e..9cce14246255 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 @@ -137,60 +137,8 @@ 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); -#define UCFG_PDEV_CHAN_STATS_SET_FUNCS(field) \ - static inline void \ - ucfg_pdev_chan_stats_##field##_inc(struct wlan_objmgr_pdev *_pdev, \ - uint64_t _val) \ - { \ - struct pdev_cp_stats *_pdev_cs = \ - wlan_cp_stats_get_pdev_stats_obj(_pdev); \ - if (_pdev_cs) { \ - struct pdev_ic_cp_stats *_pdev_ic = \ - _pdev_cs->pdev_stats; \ - if (_pdev_ic) { \ - _pdev_ic->stats.chan_stats.dcs_##field += _val;\ - } \ - } \ - } \ - static inline void \ - ucfg_pdev_chan_stats_##field##_dec(struct wlan_objmgr_pdev *_pdev, \ - uint64_t _val) \ - { \ - struct pdev_cp_stats *_pdev_cs = \ - wlan_cp_stats_get_pdev_stats_obj(_pdev); \ - if (_pdev_cs) { \ - struct pdev_ic_cp_stats *_pdev_ic = \ - _pdev_cs->pdev_stats; \ - if (_pdev_ic) { \ - _pdev_ic->stats.chan_stats.dcs_##field -= _val;\ - } \ - } \ - } \ - static inline void \ - ucfg_pdev_chan_stats_##field##_update(struct wlan_objmgr_pdev *_pdev, \ - uint64_t _val) \ - { \ - struct pdev_cp_stats *_pdev_cs = \ - wlan_cp_stats_get_pdev_stats_obj(_pdev); \ - if (_pdev_cs) { \ - struct pdev_ic_cp_stats *_pdev_ic = \ - _pdev_cs->pdev_stats; \ - if (_pdev_ic) { \ - _pdev_ic->stats.chan_stats.dcs_##field = _val;\ - } \ - } \ - } - -UCFG_PDEV_CHAN_STATS_SET_FUNCS(self_bss_util); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(obss_util); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(obss_rx_util); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(ap_rx_util); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(ap_tx_util); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(free_medium); -UCFG_PDEV_CHAN_STATS_SET_FUNCS(non_wifi_util); - #define UCFG_PDEV_CHAN_STATS_GET_FUNCS(field) \ - static inline uint8_t \ + static inline uint32_t \ ucfg_pdev_chan_stats_##field##_get(struct wlan_objmgr_pdev *_pdev) \ { \ struct pdev_cp_stats *_pdev_cs = \ @@ -210,6 +158,10 @@ UCFG_PDEV_CHAN_STATS_GET_FUNCS(ap_rx_util); UCFG_PDEV_CHAN_STATS_GET_FUNCS(ap_tx_util); UCFG_PDEV_CHAN_STATS_GET_FUNCS(free_medium); UCFG_PDEV_CHAN_STATS_GET_FUNCS(non_wifi_util); +UCFG_PDEV_CHAN_STATS_GET_FUNCS(ss_under_util); +UCFG_PDEV_CHAN_STATS_GET_FUNCS(sec_20_util); +UCFG_PDEV_CHAN_STATS_GET_FUNCS(sec_40_util); +UCFG_PDEV_CHAN_STATS_GET_FUNCS(sec_80_util); static inline void ucfg_pdev_cp_stats_reset(struct wlan_objmgr_pdev *_pdev) { 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 6cf2cba50f6c..547949ef6f2d 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 @@ -326,36 +326,8 @@ PDEV_CP_STATS_SET_FUNCS(cycle_count); PDEV_CP_STATS_SET_FUNCS(phy_err_count); PDEV_CP_STATS_SET_FUNCS(chan_tx_pwr); -#define PDEV_CHAN_STATS_SET_FUNCS(field) \ - static inline void \ - pdev_chan_stats_##field##_inc(struct wlan_objmgr_pdev *_pdev, \ - uint8_t _val) \ - { \ - ucfg_pdev_chan_stats_##field##_inc(_pdev, _val); \ - } \ - static inline void \ - pdev_chan_stats_##field##_dec(struct wlan_objmgr_pdev *_pdev, \ - uint8_t _val) \ - { \ - ucfg_pdev_chan_stats_##field##_dec(_pdev, _val); \ - } \ - static inline void \ - pdev_chan_stats_##field##_update(struct wlan_objmgr_pdev *_pdev, \ - uint8_t _val) \ - { \ - ucfg_pdev_chan_stats_##field##_update(_pdev, _val); \ - } - -PDEV_CHAN_STATS_SET_FUNCS(self_bss_util); -PDEV_CHAN_STATS_SET_FUNCS(obss_util); -PDEV_CHAN_STATS_SET_FUNCS(obss_rx_util); -PDEV_CHAN_STATS_SET_FUNCS(ap_rx_util); -PDEV_CHAN_STATS_SET_FUNCS(ap_tx_util); -PDEV_CHAN_STATS_SET_FUNCS(free_medium); -PDEV_CHAN_STATS_SET_FUNCS(non_wifi_util); - #define PDEV_CHAN_STATS_GET_FUNCS(field) \ - static inline uint8_t \ + static inline uint32_t \ pdev_chan_stats_##field##_get(struct wlan_objmgr_pdev *_pdev) \ { \ return ucfg_pdev_chan_stats_##field##_get(_pdev); \ @@ -368,6 +340,10 @@ PDEV_CHAN_STATS_GET_FUNCS(ap_rx_util); PDEV_CHAN_STATS_GET_FUNCS(ap_tx_util); PDEV_CHAN_STATS_GET_FUNCS(free_medium); PDEV_CHAN_STATS_GET_FUNCS(non_wifi_util); +PDEV_CHAN_STATS_GET_FUNCS(ss_under_util); +PDEV_CHAN_STATS_GET_FUNCS(sec_20_util); +PDEV_CHAN_STATS_GET_FUNCS(sec_40_util); +PDEV_CHAN_STATS_GET_FUNCS(sec_80_util); #define PDEV_CP_STATS_GET_FUNCS(field) \ static inline uint64_t \ diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 94b9546cb3b4..8443b0230614 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -7137,6 +7137,8 @@ typedef struct _hp_dcs_mib_stats { * in mib structure * @chan_nf: Channel noise floor (Units are in dBm) * @my_bss_rx_cycle_count: BSS rx cycle count + * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count + * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count */ typedef struct _wmi_host_dcs_im_tgt_stats { uint32_t reg_tsf32; @@ -7147,6 +7149,11 @@ typedef struct _wmi_host_dcs_im_tgt_stats { wmi_host_dcs_mib_stats_t mib_stats; uint32_t chan_nf; uint32_t my_bss_rx_cycle_count; + /* these fields are added here for backward compatibility instead of + * wmi_host_dcs_mib_stats_t + */ + uint32_t reg_rxclr_ext40_cnt; + uint32_t reg_rxclr_ext80_cnt; } wmi_host_dcs_im_tgt_stats_t; /**