1
0

qcacmn: Add os_if implementation of dcs chan stats

Add change to support get API for dcs chan stats from
within cp stats component

Change-Id: I55af5d83389f34c6c7ff9a7f2a7826eb3a9f4a4c
CRs-Fixed: 2247228
Este cometimento está contido em:
Naga
2018-05-03 11:45:20 +05:30
cometido por nshrivas
ascendente 8703c9c98f
cometimento 54a68b5752
2 ficheiros modificados com 37 adições e 0 eliminações

Ver ficheiro

@@ -32,6 +32,7 @@
#ifdef WLAN_ATF_ENABLE
#include <wlan_cp_stats_ic_atf_defs.h>
#endif
#include <wlan_cp_stats_ic_dcs_defs.h>
/**
* wlan_cfg80211_get_peer_cp_stats() - API to get peer stats object
@@ -93,5 +94,16 @@ int wlan_cfg80211_get_atf_peer_cp_stats_from_mac(
struct atf_peer_cp_stats *atf_cp_stats);
#endif /* WLAN_ATF_ENABLE */
/**
* wlan_cfg80211_get_dcs_pdev_cp_stats() - API to get DCS chan stats
* @pdev_obj: pdev object as input
* @dcs_chan_stats: DCS pdev stats object to populate
*
* Return: 0 on success, negative value on failure
*/
int wlan_cfg80211_get_dcs_pdev_cp_stats(
struct wlan_objmgr_pdev *pdev_obj,
struct pdev_dcs_chan_stats *dcs_chan_stats);
#endif /* QCA_SUPPORT_CP_STATS */
#endif /* __WLAN_CFG80211_IC_CP_STATS_H__ */

Ver ficheiro

@@ -158,3 +158,28 @@ int wlan_cfg80211_get_atf_peer_cp_stats_from_mac(
return qdf_status_to_os_return(status);
}
#endif
int
wlan_cfg80211_get_dcs_pdev_cp_stats(struct wlan_objmgr_pdev *pdev_obj,
struct pdev_dcs_chan_stats *dcs_chan_stats)
{
QDF_STATUS status;
if (!pdev_obj) {
cfg80211_err("Invalid input, pdev obj is NULL");
return -EINVAL;
}
if (!dcs_chan_stats) {
cfg80211_err("Invalid input, dcs chan stats is NULL");
return -EINVAL;
}
status = wlan_ucfg_get_dcs_chan_stats(pdev_obj, dcs_chan_stats);
if (QDF_IS_STATUS_ERROR(status)) {
cfg80211_err("wlan_cfg80211_get_dcs_pdev_cp_stats status: %d",
status);
}
return qdf_status_to_os_return(status);
}