qcacmn: Add non-tlv implementation in common wmi layer( part 2)
Add non-tlv fixes for issues observed during L1 validation in WIN platform. Change-Id: I20efe25021258137a97dc408b93c9fdc3714f367 Acked-by: Sathish Kumar <ksathis@qti.qualcomm.com> CRs-Fixed: 1005778
This commit is contained in:

committed by
Akash Patel

parent
2568939690
commit
fdb1bb31f7
@@ -5878,18 +5878,19 @@ QDF_STATUS wmi_extract_thermal_level_stats(void *wmi_hdl, void *evt_buf,
|
|||||||
* wmi_extract_profile_data() - extract profile data from event
|
* wmi_extract_profile_data() - extract profile data from event
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
* @param evt_buf: pointer to event buffer
|
* @param evt_buf: pointer to event buffer
|
||||||
|
* @idx index: index of profile data
|
||||||
* @param profile_data: Pointer to hold profile data
|
* @param profile_data: Pointer to hold profile data
|
||||||
*
|
*
|
||||||
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
*/
|
*/
|
||||||
QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf,
|
QDF_STATUS wmi_extract_profile_data(void *wmi_hdl, void *evt_buf, uint8_t idx,
|
||||||
wmi_host_wlan_profile_t *profile_data)
|
wmi_host_wlan_profile_t *profile_data)
|
||||||
{
|
{
|
||||||
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
if (wmi_handle->ops->extract_profile_data)
|
if (wmi_handle->ops->extract_profile_data)
|
||||||
return wmi_handle->ops->extract_profile_data(wmi_handle,
|
return wmi_handle->ops->extract_profile_data(wmi_handle,
|
||||||
evt_buf, profile_data);
|
evt_buf, idx, profile_data);
|
||||||
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
@@ -2217,6 +2217,29 @@ QDF_STATUS send_smart_ant_enable_cmd_non_tlv(wmi_unified_t wmi_handle,
|
|||||||
cmd->rx_antenna = param->rx_antenna;
|
cmd->rx_antenna = param->rx_antenna;
|
||||||
cmd->tx_default_antenna = param->rx_antenna;
|
cmd->tx_default_antenna = param->rx_antenna;
|
||||||
|
|
||||||
|
if (param->mode == SMART_ANT_MODE_SERIAL) {
|
||||||
|
cmd->gpio_pin[0] = param->gpio_pin[0];
|
||||||
|
cmd->gpio_pin[1] = param->gpio_pin[1];
|
||||||
|
cmd->gpio_pin[2] = 0;
|
||||||
|
cmd->gpio_pin[3] = 0;
|
||||||
|
|
||||||
|
cmd->gpio_func[0] = param->gpio_func[0];
|
||||||
|
cmd->gpio_func[1] = param->gpio_func[1];
|
||||||
|
cmd->gpio_func[2] = 0;
|
||||||
|
cmd->gpio_func[3] = 0;
|
||||||
|
|
||||||
|
} else if (param->mode == SMART_ANT_MODE_PARALLEL) {
|
||||||
|
cmd->gpio_pin[0] = param->gpio_pin[0];
|
||||||
|
cmd->gpio_pin[1] = param->gpio_pin[1];
|
||||||
|
cmd->gpio_pin[2] = param->gpio_pin[2];
|
||||||
|
cmd->gpio_pin[3] = param->gpio_pin[3];
|
||||||
|
|
||||||
|
cmd->gpio_func[0] = param->gpio_func[0];
|
||||||
|
cmd->gpio_func[1] = param->gpio_func[1];
|
||||||
|
cmd->gpio_func[2] = param->gpio_func[2];
|
||||||
|
cmd->gpio_func[3] = param->gpio_func[3];
|
||||||
|
}
|
||||||
|
|
||||||
ret = wmi_unified_cmd_send(wmi_handle,
|
ret = wmi_unified_cmd_send(wmi_handle,
|
||||||
buf,
|
buf,
|
||||||
len,
|
len,
|
||||||
@@ -6992,20 +7015,18 @@ static QDF_STATUS extract_profile_ctx_non_tlv(wmi_unified_t wmi_handle,
|
|||||||
* Return: 0 for success or error code
|
* Return: 0 for success or error code
|
||||||
*/
|
*/
|
||||||
static QDF_STATUS extract_profile_data_non_tlv(wmi_unified_t wmi_handle,
|
static QDF_STATUS extract_profile_data_non_tlv(wmi_unified_t wmi_handle,
|
||||||
void *evt_buf,
|
void *evt_buf, uint8_t idx,
|
||||||
wmi_host_wlan_profile_t *profile_data)
|
wmi_host_wlan_profile_t *profile_data)
|
||||||
{
|
{
|
||||||
wmi_profile_stats_event *profile_ev =
|
wmi_profile_stats_event *profile_ev =
|
||||||
(wmi_profile_stats_event *)evt_buf;
|
(wmi_profile_stats_event *)evt_buf;
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
for (i = 0; i < profile_ev->profile_ctx.bin_count; i++) {
|
if (idx > profile_ev->profile_ctx.bin_count)
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
|
||||||
qdf_mem_copy((profile_data+i), &profile_ev->profile_data[i],
|
qdf_mem_copy(profile_data, &profile_ev->profile_data[idx],
|
||||||
sizeof(wmi_host_wlan_profile_t));
|
sizeof(wmi_host_wlan_profile_t));
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7310,6 +7331,9 @@ struct wmi_ops non_tlv_ops = {
|
|||||||
.extract_tx_data_traffic_ctrl_ev =
|
.extract_tx_data_traffic_ctrl_ev =
|
||||||
extract_tx_data_traffic_ctrl_ev_non_tlv,
|
extract_tx_data_traffic_ctrl_ev_non_tlv,
|
||||||
.extract_vdev_extd_stats = extract_vdev_extd_stats_non_tlv,
|
.extract_vdev_extd_stats = extract_vdev_extd_stats_non_tlv,
|
||||||
|
.extract_fips_event_data = extract_fips_event_data_non_tlv,
|
||||||
|
.extract_fips_event_error_status =
|
||||||
|
extract_fips_event_error_status_non_tlv,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user