qcacmn: Add os_if implementation of pdev cp stats
Add change to support get API for pdev cp stats from within cp stats component Change-Id: Ib791a32a912b7f7e8b7c3b5ebcb3f4e64cdf1f6f CRs-Fixed: 2247228
This commit is contained in:
@@ -50,5 +50,15 @@ int wlan_cfg80211_get_peer_cp_stats(struct wlan_objmgr_peer *peer_obj,
|
|||||||
int wlan_cfg80211_get_vdev_cp_stats(struct wlan_objmgr_vdev *vdev_obj,
|
int wlan_cfg80211_get_vdev_cp_stats(struct wlan_objmgr_vdev *vdev_obj,
|
||||||
struct vdev_ic_cp_stats *vdev_cp_stats);
|
struct vdev_ic_cp_stats *vdev_cp_stats);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wlan_cfg80211_get_pdev_cp_stats() - API to get pdev cp stats object
|
||||||
|
* @pdev_obj: pdev object as input
|
||||||
|
* @pdev_cp_stats: pdev cp stats object to populate
|
||||||
|
*
|
||||||
|
* Return: 0 on success, negative value on failure
|
||||||
|
*/
|
||||||
|
int wlan_cfg80211_get_pdev_cp_stats(struct wlan_objmgr_pdev *pdev_obj,
|
||||||
|
struct pdev_ic_cp_stats *pdev_cp_stats);
|
||||||
|
|
||||||
#endif /* QCA_SUPPORT_CP_STATS */
|
#endif /* QCA_SUPPORT_CP_STATS */
|
||||||
#endif /* __WLAN_CFG80211_IC_CP_STATS_H__ */
|
#endif /* __WLAN_CFG80211_IC_CP_STATS_H__ */
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* DOC: wlan_cfg80211_ic_cp_stats.c
|
* DOC: wlan_cfg80211_ic_cp_stats.c
|
||||||
*
|
*
|
||||||
* This file provide definitions to cp stats supported cfg80211 cmd handlers
|
* This file provide definitions to os_if cp_stats APIs
|
||||||
*/
|
*/
|
||||||
#include <wlan_cfg80211_ic_cp_stats.h>
|
#include <wlan_cfg80211_ic_cp_stats.h>
|
||||||
#include <wlan_cp_stats_ic_ucfg_api.h>
|
#include <wlan_cp_stats_ic_ucfg_api.h>
|
||||||
@@ -73,3 +73,29 @@ int wlan_cfg80211_get_vdev_cp_stats(struct wlan_objmgr_vdev *vdev_obj,
|
|||||||
|
|
||||||
return qdf_status_to_os_return(status);
|
return qdf_status_to_os_return(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wlan_cfg80211_get_pdev_cp_stats(struct wlan_objmgr_pdev *pdev_obj,
|
||||||
|
struct pdev_ic_cp_stats *pdev_cp_stats)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
if (!pdev_obj) {
|
||||||
|
cfg80211_err("Invalid input, pdev obj is NULL");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pdev_cp_stats) {
|
||||||
|
cfg80211_err("Invalid input, pdev cp obj is NULL");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = wlan_ucfg_get_pdev_cp_stats(pdev_obj, pdev_cp_stats);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
cfg80211_err("wlan_cfg80211_get_pdev_cp_stats status: %d",
|
||||||
|
status);
|
||||||
|
}
|
||||||
|
|
||||||
|
return qdf_status_to_os_return(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_export_symbol(wlan_cfg80211_get_pdev_cp_stats);
|
||||||
|
Reference in New Issue
Block a user