qcacmn: Add wmi support wifistats
Send WMI command to FW with provided tlv from wifistats Change-Id: I80ac9f621c75429bdca18962423026c2008a71d0
This commit is contained in:
@@ -4107,4 +4107,17 @@ wmi_unified_extract_time_sync_ftm_offset(wmi_unified_t wmi_handle,
|
||||
QDF_STATUS
|
||||
wmi_unified_send_injector_frame_config_cmd(wmi_unified_t wmi_handle,
|
||||
struct wmi_host_injector_frame_params *param);
|
||||
|
||||
/**
|
||||
* wmi_unified_send_cp_stats_cmd() - Send cp stats command
|
||||
* @wmi_handle: wmi handle
|
||||
* @buf_ptr: buf_ptr received from wifistats
|
||||
* @buf_len: length of buffer received from wifistats
|
||||
*
|
||||
* This function sends cp stats cmd to get cp stats.
|
||||
*
|
||||
* Return QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
||||
void *buf_ptr, uint32_t buf_len);
|
||||
#endif /* _WMI_UNIFIED_API_H_ */
|
||||
|
@@ -2327,6 +2327,9 @@ QDF_STATUS (*send_roam_scan_ch_list_req_cmd)(wmi_unified_t wmi_hdl,
|
||||
|
||||
QDF_STATUS (*send_injector_config_cmd)(wmi_unified_t wmi_handle,
|
||||
struct wmi_host_injector_frame_params *params);
|
||||
|
||||
QDF_STATUS (*send_cp_stats_cmd)(wmi_unified_t wmi_handle,
|
||||
void *buf_ptr, uint32_t buf_len);
|
||||
};
|
||||
|
||||
/* Forward declartion for psoc*/
|
||||
|
@@ -3349,3 +3349,14 @@ wmi_unified_send_injector_frame_config_cmd(wmi_unified_t wmi_handle,
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS wmi_unified_send_cp_stats_cmd(wmi_unified_t wmi_handle,
|
||||
void *buf_ptr, uint32_t buf_len)
|
||||
{
|
||||
if (wmi_handle->ops->send_cp_stats_cmd)
|
||||
return wmi_handle->ops->send_cp_stats_cmd(wmi_handle, buf_ptr,
|
||||
buf_len);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
|
@@ -4753,6 +4753,43 @@ static void wmi_set_pno_channel_prediction(uint8_t *buf_ptr,
|
||||
channel_prediction_cfg->full_scan_period_ms);
|
||||
}
|
||||
|
||||
/**
|
||||
* send_cp_stats_cmd_tlv() - Send cp stats wmi command
|
||||
* @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_cp_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_CTRL_PATH_STATS_CMDID, NO_SESSION, 0);
|
||||
status = wmi_unified_cmd_send(wmi_handle, buf,
|
||||
len, WMI_REQUEST_CTRL_PATH_STATS_CMDID);
|
||||
|
||||
if (QDF_IS_STATUS_ERROR(status)) {
|
||||
wmi_buf_free(buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_nlo_mawc_cmd_tlv() - Send MAWC NLO configuration
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -14528,6 +14565,7 @@ struct wmi_ops tlv_ops = {
|
||||
#endif /* FEATURE_WLAN_TIME_SYNC_FTM */
|
||||
.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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user