qcacmn: Handle failure in service ready event

Handle error case if unable to allocate peer map
memory.

Change-Id: Id11b04e6ae0714a9f09f051fc61231b758b56179
CRs-fixed: 2396533
This commit is contained in:
Chaithanya Garrepalli
2019-02-15 20:33:10 +05:30
committato da nshrivas
parent 26c518a6f6
commit 0e2d7fc5ad
2 ha cambiato i file con 15 aggiunte e 7 eliminazioni

Vedi File

@@ -2053,17 +2053,20 @@ void cdp_if_mgmt_drain(ol_txrx_soc_handle soc,
* @peer_map_unmap_v2: flag indicates HTT peer map v2 is enabled in FW
*
*
* Return: void
* Return: QDF_STATUS
*/
static inline void
static inline QDF_STATUS
cdp_peer_map_attach(ol_txrx_soc_handle soc, uint32_t max_peers,
uint32_t max_ast_index, bool peer_map_unmap_v2)
{
if (soc && soc->ops && soc->ops->cmn_drv_ops &&
soc->ops->cmn_drv_ops->txrx_peer_map_attach)
soc->ops->cmn_drv_ops->txrx_peer_map_attach(soc, max_peers,
max_ast_index,
peer_map_unmap_v2);
return soc->ops->cmn_drv_ops->txrx_peer_map_attach(soc,
max_peers,
max_ast_index,
peer_map_unmap_v2);
return QDF_STATUS_SUCCESS;
}
/**

Vedi File

@@ -416,8 +416,13 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle,
max_peers = tgt_cfg->num_peers + ready_ev.num_extra_peer + 1;
max_ast_index = ready_ev.max_ast_index + 1;
cdp_peer_map_attach(wlan_psoc_get_dp_handle(psoc), max_peers,
max_ast_index, tgt_cfg->peer_map_unmap_v2);
if (cdp_peer_map_attach(wlan_psoc_get_dp_handle(psoc),
max_peers, max_ast_index,
tgt_cfg->peer_map_unmap_v2) !=
QDF_STATUS_SUCCESS) {
target_if_err("DP peer map attach failed");
return -EINVAL;
}
}
/* Indicate to the waiting thread that the ready