qcacmn: Add function to extract MAC addr list

For DBDC/DBS cases, each radio will have a separate MAC
address. FW will provide the list to host in ready
event. Handler has been added to extract the list.

Change-Id: I6da96ae02a1f30995e3953358677090b84fc57c4
This commit is contained in:
Manoj Ekbote
2017-07-09 23:28:56 -07:00
committed by snandini
parent 3844c6009c
commit 7c2444ce91
4 changed files with 51 additions and 1 deletions

View File

@@ -1161,6 +1161,9 @@ uint32_t wmi_ready_extract_init_status(void *wmi_hdl, void *ev);
QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
void *ev, uint8_t *macaddr);
wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
uint8_t *num_mac_addr);
QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
void *ev, struct wmi_host_fw_ver *fw_ver);

View File

@@ -975,6 +975,9 @@ QDF_STATUS (*save_fw_version)(wmi_unified_t wmi_handle, void *evt_buf);
uint32_t (*ready_extract_init_status)(wmi_unified_t wmi_hdl, void *ev);
QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
uint8_t *macaddr);
wmi_host_mac_addr * (*ready_extract_mac_addr_list)(wmi_unified_t wmi_hdl,
void *ev, uint8_t *num_mac_addr);
QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
uint32_t *len);

View File

@@ -4621,6 +4621,28 @@ QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl, void *ev, uint8_t *macaddr)
return QDF_STATUS_E_FAILURE;
}
/**
* wmi_ready_extract_mac_addr() - extract MAC address list from ready event
* @wmi_handle: wmi handle
* @param ev: pointer to event buffer
* @param num_mac_addr: Pointer to number of entries
*
* Return: address to start of mac addr list
*/
wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
uint8_t *num_mac_addr)
{
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
if (wmi_handle->ops->ready_extract_mac_addr_list)
return wmi_handle->ops->ready_extract_mac_addr_list(wmi_handle,
ev, num_mac_addr);
*num_mac_addr = 0;
return NULL;
}
/**
* wmi_extract_dbglog_data_len() - extract debuglog data length
* @wmi_handle: wmi handle

View File

@@ -15992,7 +15992,6 @@ static uint32_t ready_extract_init_status_tlv(wmi_unified_t wmi_handle,
WMI_READY_EVENTID_param_tlvs *param_buf = NULL;
wmi_ready_event_fixed_param *ev = NULL;
param_buf = (WMI_READY_EVENTID_param_tlvs *) evt_buf;
ev = param_buf->fixed_param;
@@ -16024,6 +16023,28 @@ static QDF_STATUS ready_extract_mac_addr_tlv(wmi_unified_t wmi_hamdle,
return QDF_STATUS_SUCCESS;
}
/**
* ready_extract_mac_addr_list_tlv() - extract MAC address list from ready event
* @wmi_handle: wmi handle
* @param evt_buf: pointer to event buffer
* @param macaddr: Pointer to hold number of MAC addresses
*
* Return: Pointer to addr list
*/
static wmi_host_mac_addr *ready_extract_mac_addr_list_tlv(wmi_unified_t wmi_hamdle,
void *evt_buf, uint8_t *num_mac)
{
WMI_READY_EVENTID_param_tlvs *param_buf = NULL;
wmi_ready_event_fixed_param *ev = NULL;
param_buf = (WMI_READY_EVENTID_param_tlvs *) evt_buf;
ev = param_buf->fixed_param;
*num_mac = ev->num_extra_mac_addr;
return (wmi_host_mac_addr *) param_buf->mac_addr_list;
}
/**
* extract_dbglog_data_len_tlv() - extract debuglog data length
* @wmi_handle: wmi handle
@@ -18957,6 +18978,7 @@ struct wmi_ops tlv_ops = {
.save_fw_version = save_fw_version_in_service_ready_tlv,
.ready_extract_init_status = ready_extract_init_status_tlv,
.ready_extract_mac_addr = ready_extract_mac_addr_tlv,
.ready_extract_mac_addr_list = ready_extract_mac_addr_list_tlv,
.extract_dbglog_data_len = extract_dbglog_data_len_tlv,
.extract_vdev_start_resp = extract_vdev_start_resp_tlv,
.extract_tbttoffset_update_params =