瀏覽代碼

qcacmn: Request and process Beacon stats from FW

Request and process  Beacon frames from FW using WMI command and event.
WMI_HOST_REQUEST_BCN_STAT is for beacon stats request and event processing.

Change-Id: I99250384868d62089a0f7d2acf94dd6e29ef67b9
CRs-Fixed: 2139393
Gurumoorthi Gnanasambandhan 7 年之前
父節點
當前提交
18977551ec
共有 3 個文件被更改,包括 22 次插入1 次删除
  1. 3 0
      wmi_unified_api.h
  2. 16 1
      wmi_unified_param.h
  3. 3 0
      wmi_unified_priv.h

+ 3 - 0
wmi_unified_api.h

@@ -1474,6 +1474,9 @@ QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf,
 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
 QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf,
 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
 
 
+QDF_STATUS wmi_extract_bcn_stats(void *wmi_hdl, void *evt_buf,
+		uint32_t index, wmi_host_bcn_stats *vdev_bcn_stats);
+
 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
 QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
 				struct wmi_power_dbg_params *param);
 				struct wmi_power_dbg_params *param);
 
 

+ 16 - 1
wmi_unified_param.h

@@ -815,6 +815,7 @@ typedef enum {
 	WMI_HOST_REQUEST_INST_STAT  = 0x40,
 	WMI_HOST_REQUEST_INST_STAT  = 0x40,
 	WMI_HOST_REQUEST_PEER_EXTD_STAT =  0x80,
 	WMI_HOST_REQUEST_PEER_EXTD_STAT =  0x80,
 	WMI_HOST_REQUEST_VDEV_EXTD_STAT =  0x100,
 	WMI_HOST_REQUEST_VDEV_EXTD_STAT =  0x100,
+	WMI_HOST_REQUEST_BCN_STAT =  0x800,
 } wmi_host_stats_id;
 } wmi_host_stats_id;
 
 
 typedef struct {
 typedef struct {
@@ -4885,7 +4886,8 @@ struct rx_reorder_queue_remove_params {
  * @num_peer_stats: number of peer stats event structures 0 or max peers
  * @num_peer_stats: number of peer stats event structures 0 or max peers
  * @num_bcnflt_stats: number of beacon filter stats
  * @num_bcnflt_stats: number of beacon filter stats
  * @num_chan_stats: number of channel stats
  * @num_chan_stats: number of channel stats
- * @pdev_id: pdev_id
+ * @pdev_id: device id for the radio
+ * @num_bcn_stats: number of beacon stats
  */
  */
 typedef struct {
 typedef struct {
 	wmi_host_stats_id stats_id;
 	wmi_host_stats_id stats_id;
@@ -4896,6 +4898,7 @@ typedef struct {
 	uint32_t num_bcnflt_stats;
 	uint32_t num_bcnflt_stats;
 	uint32_t num_chan_stats;
 	uint32_t num_chan_stats;
 	uint32_t pdev_id;
 	uint32_t pdev_id;
+	uint32_t num_bcn_stats;
 } wmi_host_stats_event;
 } wmi_host_stats_event;
 
 
 /**
 /**
@@ -5196,6 +5199,18 @@ typedef struct {
 	uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
 	uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
 } wmi_host_vdev_stats;
 } wmi_host_vdev_stats;
 
 
+/**
+ * struct wmi_host_vdev_stats - vdev stats structure
+ * @vdev_id: unique id identifying the VDEV, generated by the caller
+ * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully
+ * @tx_bcn_outage_cnt: Total number of failed beacons
+ */
+typedef struct {
+	uint32_t vdev_id;
+	uint32_t tx_bcn_succ_cnt;
+	uint32_t tx_bcn_outage_cnt;
+} wmi_host_bcn_stats;
+
 /**
 /**
  * struct wmi_host_vdev_extd_stats - VDEV extended stats
  * struct wmi_host_vdev_extd_stats - VDEV extended stats
  * @vdev_id: unique id identifying the VDEV, generated by the caller
  * @vdev_id: unique id identifying the VDEV, generated by the caller

+ 3 - 0
wmi_unified_priv.h

@@ -1276,6 +1276,9 @@ QDF_STATUS (*extract_atf_token_info_ev)(wmi_unified_t wmi_handle,
 QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
 QDF_STATUS (*extract_vdev_extd_stats)(wmi_unified_t wmi_handle, void *evt_buf,
 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
 		uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats);
 
 
+QDF_STATUS (*extract_bcn_stats)(wmi_unified_t wmi_handle, void *evt_buf,
+		uint32_t index, wmi_host_bcn_stats *bcn_stats);
+
 QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
 QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
 				struct wmi_power_dbg_params *param);
 				struct wmi_power_dbg_params *param);