qcacmn: Add support for wmi halphy stats
Add support for halphy stats through wmi control path. Change-Id: I1bf8f49104e23ae64596d8979d91c616a336da98 CRs-Fixed: 3236891
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c2a5c7ec7e
commit
12d44924a6
@@ -4633,6 +4633,19 @@ QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
|||||||
void *buf_ptr, uint32_t buf_len);
|
void *buf_ptr, uint32_t buf_len);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_unified_send_halphy_stats_cmd() - Send halphy stats command
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @buf_ptr: buf_ptr received from wifistats
|
||||||
|
* @buf_len: length of buffer received from wifistats
|
||||||
|
*
|
||||||
|
* This function sends halphy stats cmd to get halphy stats.
|
||||||
|
*
|
||||||
|
* Return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_unified_send_halphy_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_unified_extract_cp_stats_more_pending() - extract more flag
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
|
@@ -2856,6 +2856,9 @@ QDF_STATUS (*send_injector_config_cmd)(wmi_unified_t wmi_handle,
|
|||||||
QDF_STATUS (*send_cp_stats_cmd)(wmi_unified_t wmi_handle,
|
QDF_STATUS (*send_cp_stats_cmd)(wmi_unified_t wmi_handle,
|
||||||
void *buf_ptr, uint32_t buf_len);
|
void *buf_ptr, uint32_t buf_len);
|
||||||
|
|
||||||
|
QDF_STATUS (*send_halphy_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,
|
QDF_STATUS (*extract_cp_stats_more_pending)(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf,
|
void *evt_buf,
|
||||||
uint32_t *more_flag);
|
uint32_t *more_flag);
|
||||||
|
@@ -3700,6 +3700,17 @@ QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_unified_send_halphy_stats_cmd(wmi_unified_t wmi_handle,
|
||||||
|
void *buf_ptr, uint32_t buf_len)
|
||||||
|
{
|
||||||
|
if (wmi_handle->ops->send_halphy_stats_cmd)
|
||||||
|
return wmi_handle->ops->send_halphy_stats_cmd(wmi_handle,
|
||||||
|
buf_ptr,
|
||||||
|
buf_len);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wmi_unified_extract_cp_stats_more_pending(wmi_unified_t wmi_handle,
|
wmi_unified_extract_cp_stats_more_pending(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf, uint32_t *more_flag)
|
void *evt_buf, uint32_t *more_flag)
|
||||||
|
@@ -5359,6 +5359,45 @@ static QDF_STATUS send_cp_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_halphy_stats_cmd_tlv() - Send halphy stats wmi command
|
||||||
|
* @wmi_handle: wmi handle
|
||||||
|
* @buf_ptr: Buffer passed by upper layers
|
||||||
|
* @buf_len: Length of passed buffer by upper layer
|
||||||
|
*
|
||||||
|
* Copy the buffer passed by the upper layers and send it
|
||||||
|
* down to the firmware.
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
static QDF_STATUS send_halphy_stats_cmd_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *buf_ptr, uint32_t buf_len)
|
||||||
|
{
|
||||||
|
wmi_buf_t buf = NULL;
|
||||||
|
QDF_STATUS status;
|
||||||
|
int len;
|
||||||
|
uint8_t *data_ptr;
|
||||||
|
|
||||||
|
len = buf_len;
|
||||||
|
buf = wmi_buf_alloc(wmi_handle, len);
|
||||||
|
if (!buf)
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
|
||||||
|
data_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||||
|
qdf_mem_copy(data_ptr, buf_ptr, len);
|
||||||
|
|
||||||
|
wmi_mtrace(WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID, NO_SESSION, 0);
|
||||||
|
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||||
|
len,
|
||||||
|
WMI_REQUEST_HALPHY_CTRL_PATH_STATS_CMDID);
|
||||||
|
|
||||||
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_cp_stats_more_pending_tlv - api to extract more flag from event data
|
* extract_cp_stats_more_pending_tlv - api to extract more flag from event data
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
@@ -18793,6 +18832,7 @@ struct wmi_ops tlv_ops = {
|
|||||||
.send_roam_scan_ch_list_req_cmd = send_roam_scan_ch_list_req_cmd_tlv,
|
.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_injector_config_cmd = send_injector_config_cmd_tlv,
|
||||||
.send_cp_stats_cmd = send_cp_stats_cmd_tlv,
|
.send_cp_stats_cmd = send_cp_stats_cmd_tlv,
|
||||||
|
.send_halphy_stats_cmd = send_halphy_stats_cmd_tlv,
|
||||||
#ifdef FEATURE_MEC_OFFLOAD
|
#ifdef FEATURE_MEC_OFFLOAD
|
||||||
.send_pdev_set_mec_timer_cmd = send_pdev_set_mec_timer_cmd_tlv,
|
.send_pdev_set_mec_timer_cmd = send_pdev_set_mec_timer_cmd_tlv,
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user