qcacmn: Add fwtest interface
Add wmi fw test interface to support generic fw test command. Change-Id: Ic2dc113e3a698555c0fdcbafb30df154f6deb97d CRs-Fixed: 1045265
This commit is contained in:
@@ -1258,4 +1258,7 @@ QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl,
|
||||
QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl,
|
||||
struct wmi_adaptive_dwelltime_params *
|
||||
wmi_param);
|
||||
QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
|
||||
struct set_fwtest_params *wmi_fwtest);
|
||||
|
||||
#endif /* _WMI_UNIFIED_API_H_ */
|
||||
|
@@ -676,7 +676,7 @@ QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle,
|
||||
uint8_t vdev_id);
|
||||
|
||||
QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle,
|
||||
struct wmi_unit_test_cmd *wmi_utest);
|
||||
struct wmi_unit_test_cmd *wmi_utest);
|
||||
|
||||
QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle,
|
||||
struct wmi_roam_invoke_cmd *roaminvoke,
|
||||
@@ -1124,6 +1124,9 @@ QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle,
|
||||
|
||||
QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle,
|
||||
struct wmi_adaptive_dwelltime_params *dwelltime_params);
|
||||
|
||||
QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle,
|
||||
struct set_fwtest_params *wmi_fwtest);
|
||||
};
|
||||
|
||||
struct target_abi_version {
|
||||
|
@@ -3233,6 +3233,28 @@ QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_unified_fw_test_cmd() - send fw test command to fw.
|
||||
* @wmi_hdl: wmi handle
|
||||
* @wmi_fwtest: fw test command
|
||||
*
|
||||
* This function sends fw test command to fw.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||
*/
|
||||
QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl,
|
||||
struct set_fwtest_params *wmi_fwtest)
|
||||
{
|
||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||
|
||||
if (wmi_handle->ops->send_fw_test_cmd)
|
||||
return wmi_handle->ops->send_fw_test_cmd(wmi_handle,
|
||||
wmi_fwtest);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* wmi_unified_unit_test_cmd() - send unit test command to fw.
|
||||
* @wmi_hdl: wmi handle
|
||||
|
@@ -10104,6 +10104,48 @@ QDF_STATUS send_process_roam_synch_complete_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_fw_test_cmd_tlv() - send fw test command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
* @wmi_fwtest: fw test command
|
||||
*
|
||||
* This function sends fw test command to fw.
|
||||
*
|
||||
* Return: CDF STATUS
|
||||
*/
|
||||
QDF_STATUS send_fw_test_cmd_tlv(wmi_unified_t wmi_handle,
|
||||
struct set_fwtest_params *wmi_fwtest)
|
||||
{
|
||||
wmi_fwtest_set_param_cmd_fixed_param *cmd;
|
||||
wmi_buf_t wmi_buf;
|
||||
uint16_t len;
|
||||
|
||||
len = sizeof(*cmd);
|
||||
|
||||
wmi_buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!wmi_buf) {
|
||||
WMI_LOGE("%s: wmai_buf_alloc failed", __func__);
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
}
|
||||
|
||||
cmd = (wmi_fwtest_set_param_cmd_fixed_param *) wmi_buf_data(wmi_buf);
|
||||
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||
WMITLV_TAG_STRUC_wmi_fwtest_set_param_cmd_fixed_param,
|
||||
WMITLV_GET_STRUCT_TLVLEN(
|
||||
wmi_fwtest_set_param_cmd_fixed_param));
|
||||
cmd->param_id = wmi_fwtest->arg;
|
||||
cmd->param_value = wmi_fwtest->value;
|
||||
|
||||
if (wmi_unified_cmd_send(wmi_handle, wmi_buf, len,
|
||||
WMI_FWTEST_CMDID)) {
|
||||
WMI_LOGP("%s: failed to send fw test command", __func__);
|
||||
qdf_nbuf_free(wmi_buf);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* send_unit_test_cmd_tlv() - send unit test command to fw.
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -12095,6 +12137,7 @@ struct wmi_ops tlv_ops = {
|
||||
.extract_profile_data = extract_profile_data_tlv,
|
||||
.extract_chan_info_event = extract_chan_info_event_tlv,
|
||||
.extract_channel_hopping_event = extract_channel_hopping_event_tlv,
|
||||
.send_fw_test_cmd = send_fw_test_cmd_tlv,
|
||||
};
|
||||
|
||||
#ifdef WMI_TLV_AND_NON_TLV_SUPPORT
|
||||
|
Reference in New Issue
Block a user