qcacmn: Add API to extract params from WMI ready event
WMI ready event provides num_dscp_tid, num_total_peers and other information that is used. Add API to extract these params. Change-Id: I85ffc43f20935d84de133591020468c5e5f102de CRs-Fixed: 2141667
This commit is contained in:

committed by
snandini

parent
361892ec58
commit
276e8d5911
@@ -1200,6 +1200,18 @@ QDF_STATUS wmi_ready_extract_mac_addr(void *wmi_hdl,
|
|||||||
wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
|
wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
|
||||||
uint8_t *num_mac_addr);
|
uint8_t *num_mac_addr);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_extract_ready_params() - Extract data from ready event apart from
|
||||||
|
* status, macaddr and version.
|
||||||
|
* @wmi_handle: Pointer to WMI handle.
|
||||||
|
* @evt_buf: Pointer to Ready event buffer.
|
||||||
|
* @ev_param: Pointer to host defined struct to copy the data from event.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success.
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
|
||||||
|
void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
|
||||||
|
|
||||||
QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
|
QDF_STATUS wmi_extract_fw_version(void *wmi_hdl,
|
||||||
void *ev, struct wmi_host_fw_ver *fw_ver);
|
void *ev, struct wmi_host_fw_ver *fw_ver);
|
||||||
|
|
||||||
|
@@ -7932,4 +7932,23 @@ struct get_arp_stats {
|
|||||||
uint32_t vdev_id;
|
uint32_t vdev_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct wmi_host_ready_ev_param - Data revieved in ready event
|
||||||
|
* @num_dscp_table: Number of DSCP table supported in FW
|
||||||
|
* @num_extra_mac_addr: Extra mac address present in ready event. Used
|
||||||
|
* in DBDC mode to provide multiple mac per pdev.
|
||||||
|
* @num_total_peer: Total number of peers FW could allocate. Zero means
|
||||||
|
* FW could allocate num peers requested by host in init.
|
||||||
|
* Otherwise, host need update it max_peer to this value.
|
||||||
|
* @agile_capability: Boolean specification of whether the target supports
|
||||||
|
* agile DFS, by means of using one 80 MHz radio chain for
|
||||||
|
* radar detection, concurrently with using another radio
|
||||||
|
* chain for non-160 MHz regular operation.
|
||||||
|
*/
|
||||||
|
struct wmi_host_ready_ev_param {
|
||||||
|
uint32_t num_dscp_table;
|
||||||
|
uint32_t num_extra_mac_addr;
|
||||||
|
uint32_t num_total_peer;
|
||||||
|
bool agile_capability;
|
||||||
|
};
|
||||||
#endif /* _WMI_UNIFIED_PARAM_H_ */
|
#endif /* _WMI_UNIFIED_PARAM_H_ */
|
||||||
|
@@ -988,6 +988,8 @@ QDF_STATUS (*ready_extract_mac_addr)(wmi_unified_t wmi_hdl, void *ev,
|
|||||||
uint8_t *macaddr);
|
uint8_t *macaddr);
|
||||||
wmi_host_mac_addr * (*ready_extract_mac_addr_list)(wmi_unified_t wmi_hdl,
|
wmi_host_mac_addr * (*ready_extract_mac_addr_list)(wmi_unified_t wmi_hdl,
|
||||||
void *ev, uint8_t *num_mac_addr);
|
void *ev, uint8_t *num_mac_addr);
|
||||||
|
QDF_STATUS (*extract_ready_event_params)(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct wmi_host_ready_ev_param *ev_param);
|
||||||
|
|
||||||
QDF_STATUS (*check_and_update_fw_version)(wmi_unified_t wmi_hdl, void *ev);
|
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,
|
uint8_t* (*extract_dbglog_data_len)(wmi_unified_t wmi_handle, void *evt_buf,
|
||||||
|
@@ -4717,6 +4717,27 @@ wmi_host_mac_addr *wmi_ready_extract_mac_addr_list(void *wmi_hdl, void *ev,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_extract_ready_params() - Extract data from ready event apart from
|
||||||
|
* status, macaddr and version.
|
||||||
|
* @wmi_handle: Pointer to WMI handle.
|
||||||
|
* @evt_buf: Pointer to Ready event buffer.
|
||||||
|
* @ev_param: Pointer to host defined struct to copy the data from event.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success.
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_extract_ready_event_params(void *wmi_hdl,
|
||||||
|
void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->extract_ready_event_params)
|
||||||
|
return wmi_handle->ops->extract_ready_event_params(wmi_handle,
|
||||||
|
evt_buf, ev_param);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wmi_extract_dbglog_data_len() - extract debuglog data length
|
* wmi_extract_dbglog_data_len() - extract debuglog data length
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
|
@@ -5833,6 +5833,32 @@ static QDF_STATUS ready_extract_mac_addr_non_tlv(wmi_unified_t wmi_hdl,
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ready_params_non_tlv() - Extract data from ready event apart from
|
||||||
|
* status, macaddr and version.
|
||||||
|
* @wmi_handle: Pointer to WMI handle.
|
||||||
|
* @evt_buf: Pointer to Ready event buffer.
|
||||||
|
* @ev_param: Pointer to host defined struct to copy the data from event.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success.
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ready_event_params_non_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
|
||||||
|
{
|
||||||
|
wmi_ready_event *ev = (wmi_ready_event *) evt_buf;
|
||||||
|
|
||||||
|
ev_param->num_dscp_table = ev->num_dscp_table;
|
||||||
|
if (ev->agile_capability)
|
||||||
|
ev_param->agile_capability = true;
|
||||||
|
else
|
||||||
|
ev_param->agile_capability = false;
|
||||||
|
/* Following params not present in non-TLV target. Set Defaults */
|
||||||
|
ev_param->num_extra_mac_addr = 0;
|
||||||
|
ev_param->num_total_peer = 0;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_dbglog_data_len_non_tlv() - extract debuglog data length
|
* extract_dbglog_data_len_non_tlv() - extract debuglog data length
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
@@ -8274,6 +8300,7 @@ struct wmi_ops non_tlv_ops = {
|
|||||||
.extract_dbglog_data_len = extract_dbglog_data_len_non_tlv,
|
.extract_dbglog_data_len = extract_dbglog_data_len_non_tlv,
|
||||||
.ready_extract_init_status = ready_extract_init_status_non_tlv,
|
.ready_extract_init_status = ready_extract_init_status_non_tlv,
|
||||||
.ready_extract_mac_addr = ready_extract_mac_addr_non_tlv,
|
.ready_extract_mac_addr = ready_extract_mac_addr_non_tlv,
|
||||||
|
.extract_ready_event_params = extract_ready_event_params_non_tlv,
|
||||||
.extract_wds_addr_event = extract_wds_addr_event_non_tlv,
|
.extract_wds_addr_event = extract_wds_addr_event_non_tlv,
|
||||||
.extract_dcs_interference_type = extract_dcs_interference_type_non_tlv,
|
.extract_dcs_interference_type = extract_dcs_interference_type_non_tlv,
|
||||||
.extract_dcs_cw_int = extract_dcs_cw_int_non_tlv,
|
.extract_dcs_cw_int = extract_dcs_cw_int_non_tlv,
|
||||||
|
@@ -16719,6 +16719,33 @@ static wmi_host_mac_addr *ready_extract_mac_addr_list_tlv(wmi_unified_t wmi_hamd
|
|||||||
return (wmi_host_mac_addr *) param_buf->mac_addr_list;
|
return (wmi_host_mac_addr *) param_buf->mac_addr_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* extract_ready_params_tlv() - Extract data from ready event apart from
|
||||||
|
* status, macaddr and version.
|
||||||
|
* @wmi_handle: Pointer to WMI handle.
|
||||||
|
* @evt_buf: Pointer to Ready event buffer.
|
||||||
|
* @ev_param: Pointer to host defined struct to copy the data from event.
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success.
|
||||||
|
*/
|
||||||
|
static QDF_STATUS extract_ready_event_params_tlv(wmi_unified_t wmi_handle,
|
||||||
|
void *evt_buf, struct wmi_host_ready_ev_param *ev_param)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
ev_param->num_dscp_table = ev->num_dscp_table;
|
||||||
|
ev_param->num_extra_mac_addr = ev->num_extra_mac_addr;
|
||||||
|
ev_param->num_total_peer = ev->num_total_peers;
|
||||||
|
/* Agile_cap in ready event is not supported in TLV target */
|
||||||
|
ev_param->agile_capability = false;
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extract_dbglog_data_len_tlv() - extract debuglog data length
|
* extract_dbglog_data_len_tlv() - extract debuglog data length
|
||||||
* @wmi_handle: wmi handle
|
* @wmi_handle: wmi handle
|
||||||
@@ -19960,6 +19987,7 @@ struct wmi_ops tlv_ops = {
|
|||||||
.ready_extract_init_status = ready_extract_init_status_tlv,
|
.ready_extract_init_status = ready_extract_init_status_tlv,
|
||||||
.ready_extract_mac_addr = ready_extract_mac_addr_tlv,
|
.ready_extract_mac_addr = ready_extract_mac_addr_tlv,
|
||||||
.ready_extract_mac_addr_list = ready_extract_mac_addr_list_tlv,
|
.ready_extract_mac_addr_list = ready_extract_mac_addr_list_tlv,
|
||||||
|
.extract_ready_event_params = extract_ready_event_params_tlv,
|
||||||
.extract_dbglog_data_len = extract_dbglog_data_len_tlv,
|
.extract_dbglog_data_len = extract_dbglog_data_len_tlv,
|
||||||
.extract_vdev_start_resp = extract_vdev_start_resp_tlv,
|
.extract_vdev_start_resp = extract_vdev_start_resp_tlv,
|
||||||
.extract_tbttoffset_update_params =
|
.extract_tbttoffset_update_params =
|
||||||
|
Reference in New Issue
Block a user