qcacmn: Add umac implementation of get congestion stats

Add changes to support get congestion stats(arp stats) from
within cp_stats component.

Change-Id: Ieff7df33dd8f3a8a80cda57952eb8d5941ccaedc
CRs-Fixed: 2222781
This commit is contained in:
Naveen Rawat
2018-04-16 17:36:21 -07:00
committed by nshrivas
vanhempi 413868686d
commit 7b90f6cdfe
4 muutettua tiedostoa jossa 90 lisäystä ja 3 poistoa

Näytä tiedosto

@@ -125,6 +125,16 @@ struct pending_stats_requests {
struct request_info req[TYPE_MAX];
};
/**
* struct cca_stats - cca stats
* @congestion: the congestion percentage = (busy_time/total_time)*100
* for the interval from when the vdev was started to the current time
* (or the time at which the vdev was stopped).
*/
struct cca_stats {
uint32_t congestion;
};
/**
* struct psoc_mc_cp_stats: psoc specific stats
* @pending: details of pending requests
@@ -144,11 +154,13 @@ struct pdev_mc_cp_stats {
};
/**
* struct vdev_mc_cp_stats - vdev specific stats
* @wow_stats: wake_lock stats for vdev
* struct vdev_mc_cp_stats - vdev specific stats
* @wow_stats: wake_lock stats for vdev
* @cca: cca stats
*/
struct vdev_mc_cp_stats {
struct wake_lock_stats wow_stats;
struct cca_stats cca;
};
/**
@@ -165,18 +177,30 @@ struct peer_mc_cp_stats {
uint8_t peer_macaddr[WLAN_MACADDR_LEN];
};
/**
* struct congestion_stats_event: congestion stats event param
* @vdev_id: vdev_id of the event
* @congestion: the congestion percentage
*/
struct congestion_stats_event {
uint8_t vdev_id;
uint32_t congestion;
};
/**
* struct stats_event - parameters populated by stats event
* @num_pdev_stats: num pdev stats
* @pdev_stats: if populated array indicating pdev stats (index = pdev_id)
* @num_peer_stats: num peer stats
* @peer_stats: if populated array indicating peer stats
* @cca_stats: if populated indicates congestion stats
*/
struct stats_event {
uint32_t num_pdev_stats;
struct pdev_mc_cp_stats *pdev_stats;
uint32_t num_peer_stats;
struct peer_mc_cp_stats *peer_stats;
struct congestion_stats_event *cca_stats;
};
#endif /* CONFIG_MCL */

Näytä tiedosto

@@ -185,5 +185,15 @@ QDF_STATUS ucfg_mc_cp_stats_get_pending_req(struct wlan_objmgr_psoc *psoc,
*/
void ucfg_mc_cp_stats_free_stats_resources(struct stats_event *ev);
/**
* ucfg_mc_cp_stats_cca_stats_get() - API to fetch cca stats
* @vdev: pointer to vdev object
* @cca_stats: pointer to cca info
*
* Return - status of operation
*/
QDF_STATUS ucfg_mc_cp_stats_cca_stats_get(struct wlan_objmgr_vdev *vdev,
struct cca_stats *cca_stats);
#endif /* QCA_SUPPORT_CP_STATS */
#endif /* __WLAN_CP_STATS_MC_UCFG_API_H__ */