qcacmn: API to get channel utilization values

Add API to get channel utilization values from DCS , which can be used by
other components, like EasyMesh.

Change-Id: If0fa2b98a6c3deb80deea814d941614d1c41f01e
CRs-Fixed: 3054014
This commit is contained in:
bings
2021-07-29 09:46:55 +05:30
committato da Madan Koyyalamudi
parent a4128d5887
commit bc39c95d69
7 ha cambiato i file con 136 aggiunte e 13 eliminazioni

Vedi File

@@ -292,6 +292,27 @@
0, 0xFFFFFFFF, 30,\
CFG_VALUE_OR_DEFAULT, "dcs restart delay")
/*
* <ini>
* dcs_disable_algorithm - Some feature like SON only need dcs stats,
* then disable dcs algorithm for SON.
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to disable dcs algorithm
*
*
* Related: None
*
* Usage: External
*
* </ini>
*/
#define CFG_DCS_DISABLE_ALGORITHM CFG_INI_BOOL(\
"dcs_disable_algorithm", false,\
"dcs disable algorithm")
#define CFG_DCS_ALL \
CFG(CFG_DCS_ENABLE) \
CFG(CFG_DCS_DEBUG) \
@@ -304,6 +325,7 @@
CFG(CFG_DCS_INTFR_DETECTION_THRESHOLD) \
CFG(CFG_DCS_INTFR_DETECTION_WINDOW) \
CFG(CFG_DCS_DISABLE_THRESHOLD_PER_5MINS) \
CFG(CFG_DCS_RESTART_DELAY)
CFG(CFG_DCS_RESTART_DELAY) \
CFG(CFG_DCS_DISABLE_ALGORITHM)
#endif /* __CONFIG_DCS_H */

Vedi File

@@ -97,6 +97,22 @@ struct wlan_host_dcs_im_tgt_stats {
uint32_t reg_rxclr_ext80_cnt;
};
/**
* struct wlan_host_dcs_ch_util_stats - DCS IM chan utilization stats
* @rx_cu: rx channel utilization
* @tx_cu: tx channel utilization
* @rx_obss_cu: obss rx channel utilization
* @total_cu: total channel utilization
* @chan_nf: Channel noise floor (units are in dBm)
*/
struct wlan_host_dcs_ch_util_stats {
uint32_t rx_cu;
uint32_t tx_cu;
uint32_t obss_rx_cu;
uint32_t total_cu;
uint32_t chan_nf;
};
/**
* struct wlan_host_dcs_im_user_stats - DCS IM stats requested by userspace
* @max_rssi: max rssi of the bss traffic

Vedi File

@@ -189,6 +189,18 @@ void ucfg_dcs_reset_user_stats(struct wlan_objmgr_psoc *psoc, uint8_t mac_id);
*/
void ucfg_dcs_set_user_request(struct wlan_objmgr_psoc *psoc, uint8_t mac_id,
uint32_t user_request_count);
/**
* ucfg_dcs_get_ch_util() - API to get channel interference values
* @psoc: pointer to psoc object
* @mac_id: mac id
* @dcs_stats: pointer to wlan_host_dcs_ch_util_stats
*
* Return: Integer
*/
QDF_STATUS ucfg_dcs_get_ch_util(struct wlan_objmgr_psoc *psoc, uint8_t mac_id,
struct wlan_host_dcs_ch_util_stats *dcs_stats);
#else
static inline void
ucfg_dcs_register_cb(struct wlan_objmgr_psoc *psoc, dcs_callback cbk, void *arg)
@@ -250,5 +262,12 @@ ucfg_dcs_set_user_request(struct wlan_objmgr_psoc *psoc, uint8_t mac_id,
uint32_t user_request_count)
{
}
static inline QDF_STATUS
ucfg_dcs_get_ch_util(struct wlan_objmgr_vdev *vdev,
struct wlan_host_dcs_ch_util_stats *dcs_stats)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif /* _WLAN_DCS_UCFG_API_H_ */