qcacld-3.0: Remove handling of deprecated OEM related events
Remove handling of deprecated OEM related events since FW and userspace application will use only TLV based messaging. Support to handle following events are removed, WMI_OEM_CAPABILITY_EVENTID WMI_OEM_MEASUREMENT_REPORT_EVENTID WMI_OEM_ERROR_REPORT_EVENTID Change-Id: Ia194f559acde6689a50c56b52078b7dc967c6159 CRs-Fixed: 1038872
Cette révision appartient à :

révisé par
Vishwajith Upendra

Parent
dc335378ca
révision
9a78b25103
@@ -940,15 +940,6 @@ int wma_gtk_offload_status_event(void *handle, uint8_t *event, uint32_t len);
|
||||
#endif
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
int wma_oem_capability_event_callback(void *handle,
|
||||
uint8_t *datap, uint32_t len);
|
||||
|
||||
int wma_oem_measurement_report_event_callback(void *handle, uint8_t *datap,
|
||||
uint32_t len);
|
||||
|
||||
int wma_oem_error_report_event_callback(void *handle, uint8_t *datap,
|
||||
uint32_t len);
|
||||
|
||||
int wma_oem_data_response_handler(void *handle, uint8_t *datap,
|
||||
uint32_t len);
|
||||
#endif
|
||||
|
@@ -1627,245 +1627,6 @@ int wma_csa_offload_handler(void *handle, uint8_t *event, uint32_t len)
|
||||
}
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
|
||||
/**
|
||||
* wma_oem_capability_event_callback() - OEM capability event handler
|
||||
* @handle: wma handle
|
||||
* @datap: data ptr
|
||||
* @len: data length
|
||||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int wma_oem_capability_event_callback(void *handle,
|
||||
uint8_t *datap, uint32_t len)
|
||||
{
|
||||
tp_wma_handle wma = (tp_wma_handle) handle;
|
||||
WMI_OEM_CAPABILITY_EVENTID_param_tlvs *param_buf;
|
||||
uint8_t *data;
|
||||
uint32_t datalen;
|
||||
uint32_t *msg_subtype;
|
||||
tStartOemDataRsp *pStartOemDataRsp;
|
||||
|
||||
param_buf = (WMI_OEM_CAPABILITY_EVENTID_param_tlvs *) datap;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Received NULL buf ptr from FW", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data = param_buf->data;
|
||||
datalen = param_buf->num_data;
|
||||
|
||||
if (!data) {
|
||||
WMA_LOGE("%s: Received NULL data from FW", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* wma puts 4 bytes prefix for msg subtype, so length
|
||||
* of data received from target should be 4 bytes less
|
||||
* then max allowed
|
||||
*/
|
||||
if (datalen > (OEM_DATA_RSP_SIZE - OEM_MESSAGE_SUBTYPE_LEN)) {
|
||||
WMA_LOGE("%s: Received data len (%d) exceeds max value (%d)",
|
||||
__func__, datalen, (OEM_DATA_RSP_SIZE - 4));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
|
||||
if (!pStartOemDataRsp) {
|
||||
WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->rsp_len = datalen + OEM_MESSAGE_SUBTYPE_LEN;
|
||||
if (pStartOemDataRsp->rsp_len) {
|
||||
pStartOemDataRsp->oem_data_rsp =
|
||||
qdf_mem_malloc(pStartOemDataRsp->rsp_len);
|
||||
if (!pStartOemDataRsp->oem_data_rsp) {
|
||||
WMA_LOGE(FL("malloc failed for oem_data_rsp"));
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
WMA_LOGE(FL("Invalid rsp length: %d"),
|
||||
pStartOemDataRsp->rsp_len);
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->target_rsp = true;
|
||||
msg_subtype = (uint32_t *) pStartOemDataRsp->oem_data_rsp;
|
||||
*msg_subtype = WMI_OEM_CAPABILITY_RSP;
|
||||
/* copy data after msg sub type */
|
||||
qdf_mem_copy(pStartOemDataRsp->oem_data_rsp + OEM_MESSAGE_SUBTYPE_LEN,
|
||||
data, datalen);
|
||||
|
||||
WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
|
||||
__func__, pStartOemDataRsp->rsp_len);
|
||||
|
||||
wma_send_msg(wma, WMA_START_OEM_DATA_RSP, (void *)pStartOemDataRsp, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_oem_measurement_report_event_callback() - OEM measurement report handler
|
||||
* @handle: wma handle
|
||||
* @datap: data ptr
|
||||
* @len: data length
|
||||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int wma_oem_measurement_report_event_callback(void *handle,
|
||||
uint8_t *datap,
|
||||
uint32_t len)
|
||||
{
|
||||
tp_wma_handle wma = (tp_wma_handle) handle;
|
||||
WMI_OEM_MEASUREMENT_REPORT_EVENTID_param_tlvs *param_buf;
|
||||
uint8_t *data;
|
||||
uint32_t datalen;
|
||||
uint32_t *msg_subtype;
|
||||
tStartOemDataRsp *pStartOemDataRsp;
|
||||
|
||||
param_buf = (WMI_OEM_MEASUREMENT_REPORT_EVENTID_param_tlvs *) datap;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Received NULL buf ptr from FW", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data = param_buf->data;
|
||||
datalen = param_buf->num_data;
|
||||
|
||||
if (!data) {
|
||||
WMA_LOGE("%s: Received NULL data from FW", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* wma puts 4 bytes prefix for msg subtype, so length
|
||||
* of data received from target should be 4 bytes less
|
||||
* then max allowed
|
||||
*/
|
||||
if (datalen > (OEM_DATA_RSP_SIZE - OEM_MESSAGE_SUBTYPE_LEN)) {
|
||||
WMA_LOGE("%s: Received data len (%d) exceeds max value (%d)",
|
||||
__func__, datalen, (OEM_DATA_RSP_SIZE - 4));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
|
||||
if (!pStartOemDataRsp) {
|
||||
WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->rsp_len = datalen + OEM_MESSAGE_SUBTYPE_LEN;
|
||||
if (pStartOemDataRsp->rsp_len) {
|
||||
pStartOemDataRsp->oem_data_rsp =
|
||||
qdf_mem_malloc(pStartOemDataRsp->rsp_len);
|
||||
if (!pStartOemDataRsp->oem_data_rsp) {
|
||||
WMA_LOGE(FL("malloc failed for oem_data_rsp"));
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
WMA_LOGE(FL("Invalid rsp length: %d"),
|
||||
pStartOemDataRsp->rsp_len);
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->target_rsp = true;
|
||||
msg_subtype = (uint32_t *) pStartOemDataRsp->oem_data_rsp;
|
||||
*msg_subtype = WMI_OEM_MEASUREMENT_RSP;
|
||||
/* copy data after msg sub type */
|
||||
qdf_mem_copy(pStartOemDataRsp->oem_data_rsp + OEM_MESSAGE_SUBTYPE_LEN,
|
||||
data, datalen);
|
||||
|
||||
WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
|
||||
__func__, pStartOemDataRsp->rsp_len);
|
||||
|
||||
wma_send_msg(wma, WMA_START_OEM_DATA_RSP, (void *)pStartOemDataRsp, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_oem_error_report_event_callback() - OEM error report handler
|
||||
* @handle: wma handle
|
||||
* @datap: data ptr
|
||||
* @len: data length
|
||||
*
|
||||
* Return: 0 for success or error code
|
||||
*/
|
||||
int wma_oem_error_report_event_callback(void *handle,
|
||||
uint8_t *datap, uint32_t len)
|
||||
{
|
||||
tp_wma_handle wma = (tp_wma_handle) handle;
|
||||
WMI_OEM_ERROR_REPORT_EVENTID_param_tlvs *param_buf;
|
||||
uint8_t *data;
|
||||
uint32_t datalen;
|
||||
uint32_t *msg_subtype;
|
||||
tStartOemDataRsp *pStartOemDataRsp;
|
||||
|
||||
param_buf = (WMI_OEM_ERROR_REPORT_EVENTID_param_tlvs *) datap;
|
||||
if (!param_buf) {
|
||||
WMA_LOGE("%s: Received NULL buf ptr from FW", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data = param_buf->data;
|
||||
datalen = param_buf->num_data;
|
||||
|
||||
if (!data) {
|
||||
WMA_LOGE("%s: Received NULL data from FW", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* wma puts 4 bytes prefix for msg subtype, so length
|
||||
* of data received from target should be 4 bytes less
|
||||
* then max allowed
|
||||
*/
|
||||
if (datalen > (OEM_DATA_RSP_SIZE - OEM_MESSAGE_SUBTYPE_LEN)) {
|
||||
WMA_LOGE("%s: Received data len (%d) exceeds max value (%d)",
|
||||
__func__, datalen, (OEM_DATA_RSP_SIZE - 4));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp = qdf_mem_malloc(sizeof(*pStartOemDataRsp));
|
||||
if (!pStartOemDataRsp) {
|
||||
WMA_LOGE("%s: Failed to alloc pStartOemDataRsp", __func__);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->rsp_len = datalen + OEM_MESSAGE_SUBTYPE_LEN;
|
||||
if (pStartOemDataRsp->rsp_len) {
|
||||
pStartOemDataRsp->oem_data_rsp =
|
||||
qdf_mem_malloc(pStartOemDataRsp->rsp_len);
|
||||
if (!pStartOemDataRsp->oem_data_rsp) {
|
||||
WMA_LOGE(FL("malloc failed for oem_data_rsp"));
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
} else {
|
||||
WMA_LOGE(FL("Invalid rsp length: %d"),
|
||||
pStartOemDataRsp->rsp_len);
|
||||
qdf_mem_free(pStartOemDataRsp);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pStartOemDataRsp->target_rsp = true;
|
||||
msg_subtype = (uint32_t *) pStartOemDataRsp->oem_data_rsp;
|
||||
*msg_subtype = WMI_OEM_ERROR_REPORT_RSP;
|
||||
/* copy data after msg sub type */
|
||||
qdf_mem_copy(pStartOemDataRsp->oem_data_rsp + OEM_MESSAGE_SUBTYPE_LEN,
|
||||
data, datalen);
|
||||
|
||||
WMA_LOGI("%s: Sending WMA_START_OEM_DATA_RSP, data len (%d)",
|
||||
__func__, pStartOemDataRsp->rsp_len);
|
||||
|
||||
wma_send_msg(wma, WMA_START_OEM_DATA_RSP, (void *)pStartOemDataRsp, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_oem_data_response_handler() - OEM data response event handler
|
||||
* @handle: wma handle
|
||||
|
@@ -1961,21 +1961,6 @@ QDF_STATUS wma_open(void *cds_context,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_OEM_CAPABILITY_EVENTID,
|
||||
wma_oem_capability_event_callback,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_OEM_MEASUREMENT_REPORT_EVENTID,
|
||||
wma_oem_measurement_report_event_callback,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_OEM_ERROR_REPORT_EVENTID,
|
||||
wma_oem_error_report_event_callback,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
WMI_OEM_RESPONSE_EVENTID,
|
||||
wma_oem_data_response_handler,
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur