qcacmn: Add support to send WMI_VDEV_GET_BIG_DATA_P2_CMDID to fw
Send WMI_VDEV_GET_BIG_DATA_P2_CMDID to fw to get big data stats. Change-Id: I40870a0d9106860f58272a200025870b41d4aef9 CRs-Fixed: 2861082
This commit is contained in:
@@ -76,6 +76,20 @@ QDF_STATUS wmi_unified_stats_request_send(wmi_unified_t wmi_handle,
|
||||
uint8_t macaddr[QDF_MAC_ADDR_SIZE],
|
||||
struct stats_request_params *param);
|
||||
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
/**
|
||||
* wmi_unified_big_data_stats_request_send() - WMI request big data stats
|
||||
* function
|
||||
* @wmi_handle: handle to WMI
|
||||
* @param: pointer to hold stats request parameter
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_unified_big_data_stats_request_send(wmi_unified_t wmi_handle,
|
||||
struct stats_request_params *param);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wmi_extract_stats_param() - extract all stats count from event
|
||||
* @wmi_handle: wmi handle
|
||||
|
@@ -2513,6 +2513,11 @@ QDF_STATUS (*config_peer_latency_info_cmd)(
|
||||
QDF_STATUS (*send_set_tpc_power_cmd)(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id,
|
||||
struct reg_tpc_power_info *param);
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
QDF_STATUS (*send_big_data_stats_request_cmd)(
|
||||
wmi_unified_t wmi_handle,
|
||||
struct stats_request_params *param);
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Forward declartion for psoc*/
|
||||
|
@@ -61,6 +61,20 @@ QDF_STATUS wmi_unified_stats_request_send(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
QDF_STATUS
|
||||
wmi_unified_big_data_stats_request_send(wmi_unified_t wmi_handle,
|
||||
struct stats_request_params *param)
|
||||
{
|
||||
if (wmi_handle->ops->send_big_data_stats_request_cmd)
|
||||
return wmi_handle->ops->send_big_data_stats_request_cmd(
|
||||
wmi_handle,
|
||||
param);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS
|
||||
wmi_extract_stats_param(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
wmi_host_stats_event *stats_param)
|
||||
|
@@ -408,6 +408,51 @@ send_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return qdf_status_from_os_return(ret);
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
/**
|
||||
* send_big_data_stats_request_cmd_tlv () - send big data stats cmd
|
||||
* @wmi_handle: wmi handle
|
||||
* @param : pointer to command request param
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||
*/
|
||||
static QDF_STATUS
|
||||
send_big_data_stats_request_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct stats_request_params *param)
|
||||
{
|
||||
int32_t ret = 0;
|
||||
wmi_vdev_get_big_data_p2_cmd_fixed_param *cmd;
|
||||
wmi_buf_t buf;
|
||||
uint16_t len = sizeof(wmi_vdev_get_big_data_p2_cmd_fixed_param);
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
cmd = (wmi_vdev_get_big_data_p2_cmd_fixed_param *)wmi_buf_data(buf);
|
||||
WMITLV_SET_HDR(
|
||||
&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_vdev_get_big_data_p2_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN
|
||||
(wmi_vdev_get_big_data_p2_cmd_fixed_param));
|
||||
|
||||
cmd->vdev_id = param->vdev_id;
|
||||
|
||||
wmi_debug("STATS VDEV_ID:%d -->", cmd->vdev_id);
|
||||
|
||||
wmi_mtrace(WMI_VDEV_GET_BIG_DATA_P2_CMDID, cmd->vdev_id, 0);
|
||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
WMI_VDEV_GET_BIG_DATA_P2_CMDID);
|
||||
|
||||
if (ret) {
|
||||
wmi_err("Failed to send big data stats request to fw =%d", ret);
|
||||
wmi_buf_free(buf);
|
||||
}
|
||||
|
||||
return qdf_status_from_os_return(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* extract_all_stats_counts_tlv() - extract all stats count from event
|
||||
* @param wmi_handle: wmi handle
|
||||
@@ -857,6 +902,10 @@ void wmi_cp_stats_attach_tlv(wmi_unified_t wmi_handle)
|
||||
struct wmi_ops *ops = wmi_handle->ops;
|
||||
|
||||
ops->send_stats_request_cmd = send_stats_request_cmd_tlv;
|
||||
#ifdef WLAN_FEATURE_BIG_DATA_STATS
|
||||
ops->send_big_data_stats_request_cmd =
|
||||
send_big_data_stats_request_cmd_tlv;
|
||||
#endif
|
||||
ops->extract_all_stats_count = extract_all_stats_counts_tlv;
|
||||
ops->extract_pdev_stats = extract_pdev_stats_tlv;
|
||||
ops->extract_vdev_stats = extract_vdev_stats_tlv;
|
||||
|
Reference in New Issue
Block a user