qcacmn: Add WMI fixes made for TLV bringup on WIN
These fixes are made during qca8074 VP control path bringup. Add fixes in tlv.c and enable TLV helper routines for WIN. Fixed some inconsistencies in wmi API params by adding compiler flags. This needs to be cleaned up so that API and params have common interface between WIN and MCL. Change-Id: I0821daa58df86ad0b394a7846a982a9e3577cd14 CRs-Fixed: 1063252
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
a73d0a7f5c
commit
1d5f5ab6a4
@@ -35,7 +35,7 @@
|
||||
#include "wmi_unified_api.h"
|
||||
#include "wmi_unified_priv.h"
|
||||
|
||||
#ifdef WMI_NON_TLV_SUPPORT
|
||||
#if defined(WMI_NON_TLV_SUPPORT) || defined(WMI_TLV_AND_NON_TLV_SUPPORT)
|
||||
#include "legacy/wmi.h"
|
||||
#include "legacy/wmi_unified.h"
|
||||
/**
|
||||
@@ -510,6 +510,56 @@ QDF_STATUS send_peer_delete_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
WMI_PEER_DELETE_CMDID);
|
||||
}
|
||||
|
||||
/**
|
||||
* convert_host_peer_id_to_target_id_non_tlv - convert host peer param_id
|
||||
* to target id.
|
||||
* @targ_paramid: Target parameter id to hold the result.
|
||||
* @peer_param_id: host param id.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS for success
|
||||
* QDF_STATUS_E_NOSUPPORT when the param_id in not supported in tareget
|
||||
*/
|
||||
static QDF_STATUS convert_host_peer_id_to_target_id_non_tlv(
|
||||
uint32_t *targ_paramid,
|
||||
uint32_t peer_param_id)
|
||||
{
|
||||
switch (peer_param_id) {
|
||||
case WMI_HOST_PEER_MIMO_PS_STATE:
|
||||
*targ_paramid = WMI_PEER_MIMO_PS_STATE;
|
||||
break;
|
||||
case WMI_HOST_PEER_AMPDU:
|
||||
*targ_paramid = WMI_PEER_AMPDU;
|
||||
break;
|
||||
case WMI_HOST_PEER_AUTHORIZE:
|
||||
*targ_paramid = WMI_PEER_AUTHORIZE;
|
||||
break;
|
||||
case WMI_HOST_PEER_CHWIDTH:
|
||||
*targ_paramid = WMI_PEER_CHWIDTH;
|
||||
break;
|
||||
case WMI_HOST_PEER_NSS:
|
||||
*targ_paramid = WMI_PEER_NSS;
|
||||
break;
|
||||
case WMI_HOST_PEER_USE_4ADDR:
|
||||
*targ_paramid = WMI_PEER_USE_4ADDR;
|
||||
break;
|
||||
case WMI_HOST_PEER_USE_FIXED_PWR:
|
||||
*targ_paramid = WMI_PEER_USE_FIXED_PWR;
|
||||
break;
|
||||
case WMI_HOST_PEER_PARAM_FIXED_RATE:
|
||||
*targ_paramid = WMI_PEER_PARAM_FIXED_RATE;
|
||||
break;
|
||||
case WMI_HOST_PEER_SET_MU_WHITELIST:
|
||||
*targ_paramid = WMI_PEER_SET_MU_WHITELIST;
|
||||
break;
|
||||
case WMI_HOST_PEER_EXT_STATS_ENABLE:
|
||||
*targ_paramid = WMI_PEER_EXT_STATS_ENABLE;
|
||||
break;
|
||||
default:
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
/**
|
||||
* send_peer_param_cmd_non_tlv() - set peer parameter in fw
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -525,6 +575,11 @@ QDF_STATUS send_peer_param_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
wmi_peer_set_param_cmd *cmd;
|
||||
wmi_buf_t buf;
|
||||
int len = sizeof(wmi_peer_set_param_cmd);
|
||||
uint32_t param_id;
|
||||
|
||||
if (convert_host_peer_id_to_target_id_non_tlv(¶m_id,
|
||||
param->param_id) != QDF_STATUS_SUCCESS)
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
|
||||
buf = wmi_buf_alloc(wmi_handle, len);
|
||||
if (!buf) {
|
||||
@@ -533,7 +588,7 @@ QDF_STATUS send_peer_param_cmd_non_tlv(wmi_unified_t wmi_handle,
|
||||
}
|
||||
cmd = (wmi_peer_set_param_cmd *)wmi_buf_data(buf);
|
||||
WMI_CHAR_ARRAY_TO_MAC_ADDR(peer_addr, &cmd->peer_macaddr);
|
||||
cmd->param_id = param->param_id;
|
||||
cmd->param_id = param_id;
|
||||
cmd->param_value = param->param_value;
|
||||
cmd->vdev_id = param->vdev_id;
|
||||
return wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
@@ -7989,7 +8044,7 @@ static void populate_vdev_param_non_tlv(uint32_t *vdev_param)
|
||||
*/
|
||||
void wmi_non_tlv_attach(struct wmi_unified *wmi_handle)
|
||||
{
|
||||
#ifdef WMI_NON_TLV_SUPPORT
|
||||
#if defined(WMI_NON_TLV_SUPPORT) || defined(WMI_TLV_AND_NON_TLV_SUPPORT)
|
||||
wmi_handle->ops = &non_tlv_ops;
|
||||
populate_non_tlv_service(wmi_handle->services);
|
||||
populate_non_tlv_events_id(wmi_handle->wmi_events);
|
||||
|
Reference in New Issue
Block a user