qcacmn: Support pdevid conversion map for wmi_handle

Support pdevid conversion map for dynamic mode switch

Change-Id: I350d66b142c7206f87e4182abfbe990bdc0faa7d
CRs-Fixed: 2509336
This commit is contained in:
Shaakir Mohamed
2019-08-09 14:22:46 -07:00
committed by nshrivas
parent 0bd6d0366c
commit af7c6e0445
10 changed files with 173 additions and 52 deletions

View File

@@ -2520,6 +2520,8 @@ void *wmi_unified_get_pdev_handle(struct wmi_soc *soc, uint32_t pdev_idx)
wmi_handle->wmi_events = soc->wmi_events;
wmi_handle->services = soc->services;
wmi_handle->soc = soc;
wmi_handle->cmd_pdev_id_map = soc->cmd_pdev_id_map;
wmi_handle->evt_pdev_id_map = soc->evt_pdev_id_map;
wmi_interface_logging_init(wmi_handle, pdev_idx);
qdf_atomic_init(&wmi_handle->pending_cmds);
qdf_atomic_init(&wmi_handle->is_target_suspended);
@@ -2628,6 +2630,8 @@ void *wmi_unified_attach(void *scn_handle,
wmi_handle->wmi_events = soc->wmi_events;
wmi_handle->services = soc->services;
wmi_handle->scn_handle = scn_handle;
wmi_handle->cmd_pdev_id_map = soc->cmd_pdev_id_map;
wmi_handle->evt_pdev_id_map = soc->evt_pdev_id_map;
soc->scn_handle = scn_handle;
qdf_atomic_init(&wmi_handle->pending_cmds);
qdf_atomic_init(&wmi_handle->is_target_suspended);
@@ -3040,10 +3044,15 @@ qdf_export_symbol(wmi_flush_endpoint);
* By default pdev_id conversion is not done in WMI.
* This API can be used enable conversion in WMI.
* @param wmi_handle : handle to WMI
* @param pdev_map : pointer to pdev_map
* @size : size of pdev_id_map
* Return none
*/
void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle)
void wmi_pdev_id_conversion_enable(wmi_unified_t wmi_handle,
uint32_t *pdev_id_map, uint8_t size)
{
if (wmi_handle->target_type == WMI_TLV_TARGET)
wmi_handle->ops->wmi_pdev_id_conversion_enable(wmi_handle);
wmi_handle->ops->wmi_pdev_id_conversion_enable(wmi_handle,
pdev_id_map,
size);
}