qcacmn: Add target_if/wmi implementation of get congestion stats

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

Change-Id: Ic3b2f020c0169c9113c1b40738f782cbb3b8f6c5
CRs-Fixed: 2222781
This commit is contained in:
Naveen Rawat
2018-04-13 16:38:36 -07:00
committed by nshrivas
parent c461aeff4f
commit 96afb7f274
3 changed files with 34 additions and 0 deletions

View File

@@ -2252,4 +2252,18 @@ QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl,
wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl, wmi_host_channel_width wmi_get_ch_width_from_phy_mode(void *wmi_hdl,
WMI_HOST_WLAN_PHY_MODE phymode); WMI_HOST_WLAN_PHY_MODE phymode);
#ifdef QCA_SUPPORT_CP_STATS
/**
* wmi_extract_cca_stats() - api to extract congestion stats from event buffer
* @wmi_handle: wma handle
* @evt_buf: event buffer
* @datalen: length of buffer
* @stats: buffer to populated after stats extraction
*
* Return: status of operation
*/
QDF_STATUS wmi_extract_cca_stats(wmi_unified_t wmi_handle, void *evt_buf,
struct wmi_host_congestion_stats *stats);
#endif /* QCA_SUPPORT_CP_STATS */
#endif /* _WMI_UNIFIED_API_H_ */ #endif /* _WMI_UNIFIED_API_H_ */

View File

@@ -8391,4 +8391,19 @@ struct wmi_obss_color_collision_info {
uint32_t obss_color_bitmap_bit0to31; uint32_t obss_color_bitmap_bit0to31;
uint32_t obss_color_bitmap_bit32to63; uint32_t obss_color_bitmap_bit32to63;
}; };
#ifdef QCA_SUPPORT_CP_STATS
/**
* struct wmi_host_congestion_stats - host definition of congestion stats
* @vdev_id: ID of the vdev to which this info belongs.
* @congestion: This field holds 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 wmi_host_congestion_stats {
uint32_t vdev_id;
uint32_t congestion;
};
#endif
#endif /* _WMI_UNIFIED_PARAM_H_ */ #endif /* _WMI_UNIFIED_PARAM_H_ */

View File

@@ -1616,6 +1616,11 @@ QDF_STATUS (*extract_twt_resume_dialog_comp_event)(wmi_unified_t wmi_handle,
uint8_t *evt_buf, uint8_t *evt_buf,
struct wmi_twt_resume_dialog_complete_event_param *params); struct wmi_twt_resume_dialog_complete_event_param *params);
#endif #endif
#ifdef QCA_SUPPORT_CP_STATS
QDF_STATUS (*extract_cca_stats)(wmi_unified_t wmi_handle, void *evt_buf,
struct wmi_host_congestion_stats *stats);
#endif /* QCA_SUPPORT_CP_STATS */
}; };
/* Forward declartion for psoc*/ /* Forward declartion for psoc*/