qcacmn: Add WMI event for cp stats
Extract more flag from WMI event TLV buffer. Change-Id: I6623a81100b3191d796c156c93ae1ce4c3eaeb97
This commit is contained in:
@@ -4091,4 +4091,19 @@ wmi_unified_send_injector_frame_config_cmd(wmi_unified_t wmi_handle,
|
||||
*/
|
||||
QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
||||
void *buf_ptr, uint32_t buf_len);
|
||||
|
||||
/**
|
||||
* wmi_unified_extract_cp_stats_more_pending() - extract more flag
|
||||
* @wmi_handle: wmi handle
|
||||
* @evt_buf: event buffer
|
||||
* @more_flag: more flag
|
||||
*
|
||||
* This function extracts the more_flag from fixed param
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_unified_extract_cp_stats_more_pending(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, uint32_t *more_flag);
|
||||
|
||||
#endif /* _WMI_UNIFIED_API_H_ */
|
||||
|
@@ -4685,6 +4685,7 @@ typedef enum {
|
||||
wmi_vdev_bcn_latency_event_id,
|
||||
wmi_vdev_disconnect_event_id,
|
||||
wmi_peer_create_conf_event_id,
|
||||
wmi_pdev_cp_fwstats_eventid,
|
||||
wmi_events_max,
|
||||
} wmi_conv_event_id;
|
||||
|
||||
|
@@ -2396,6 +2396,10 @@ QDF_STATUS (*send_injector_config_cmd)(wmi_unified_t wmi_handle,
|
||||
|
||||
QDF_STATUS (*send_cp_stats_cmd)(wmi_unified_t wmi_handle,
|
||||
void *buf_ptr, uint32_t buf_len);
|
||||
|
||||
QDF_STATUS (*extract_cp_stats_more_pending)(wmi_unified_t wmi_handle,
|
||||
void *evt_buf,
|
||||
uint32_t *more_flag);
|
||||
};
|
||||
|
||||
/* Forward declartion for psoc*/
|
||||
|
@@ -3280,3 +3280,15 @@ QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_unified_extract_cp_stats_more_pending(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, uint32_t *more_flag)
|
||||
{
|
||||
if (wmi_handle->ops->extract_cp_stats_more_pending)
|
||||
return wmi_handle->ops->extract_cp_stats_more_pending(wmi_handle,
|
||||
evt_buf,
|
||||
more_flag);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
@@ -4744,6 +4744,30 @@ static QDF_STATUS send_cp_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* extract_cp_stats_more_pending_tlv - api to extract more flag from event data
|
||||
* @wmi_handle: wmi handle
|
||||
* @evt_buf: event buffer
|
||||
* @more_flag: buffer to populate more flag
|
||||
*
|
||||
* Return: status of operation
|
||||
*/
|
||||
static QDF_STATUS
|
||||
extract_cp_stats_more_pending_tlv(wmi_unified_t wmi, void *evt_buf,
|
||||
uint32_t *more_flag)
|
||||
{
|
||||
WMI_CTRL_PATH_STATS_EVENTID_param_tlvs *param_buf;
|
||||
wmi_ctrl_path_stats_event_fixed_param *ev;
|
||||
|
||||
param_buf = (WMI_CTRL_PATH_STATS_EVENTID_param_tlvs *)evt_buf;
|
||||
if (!param_buf)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
ev = (wmi_ctrl_path_stats_event_fixed_param *)param_buf->fixed_param;
|
||||
|
||||
*more_flag = ev->more;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_nlo_mawc_cmd_tlv() - Send MAWC NLO configuration
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -14014,6 +14038,8 @@ struct wmi_ops tlv_ops = {
|
||||
.send_roam_scan_ch_list_req_cmd = send_roam_scan_ch_list_req_cmd_tlv,
|
||||
.send_injector_config_cmd = send_injector_config_cmd_tlv,
|
||||
.send_cp_stats_cmd = send_cp_stats_cmd_tlv,
|
||||
.extract_cp_stats_more_pending =
|
||||
extract_cp_stats_more_pending_tlv,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -14406,6 +14432,8 @@ event_ids[wmi_roam_scan_chan_list_id] =
|
||||
WMI_VDEV_DISCONNECT_EVENTID;
|
||||
event_ids[wmi_peer_create_conf_event_id] =
|
||||
WMI_PEER_CREATE_CONF_EVENTID;
|
||||
event_ids[wmi_pdev_cp_fwstats_eventid] =
|
||||
WMI_CTRL_PATH_STATS_EVENTID;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user