Преглед на файлове

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
Naveen Rawat преди 7 години
родител
ревизия
96afb7f274
променени са 3 файла, в които са добавени 34 реда и са изтрити 0 реда
  1. 14 0
      wmi_unified_api.h
  2. 15 0
      wmi_unified_param.h
  3. 5 0
      wmi_unified_priv.h

+ 14 - 0
wmi_unified_api.h

@@ -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_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_ */

+ 15 - 0
wmi_unified_param.h

@@ -8391,4 +8391,19 @@ struct wmi_obss_color_collision_info {
 	uint32_t obss_color_bitmap_bit0to31;
 	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_ */

+ 5 - 0
wmi_unified_priv.h

@@ -1616,6 +1616,11 @@ QDF_STATUS (*extract_twt_resume_dialog_comp_event)(wmi_unified_t wmi_handle,
 		uint8_t *evt_buf,
 		struct wmi_twt_resume_dialog_complete_event_param *params);
 #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*/