qcacmn: Add support for HW cookie conversion

Support HW cookie conversion for BE platform.

Change-Id: I39058fbf256266557f5e734ba376db4db0731b24
CRs-Fixed: 2929533
此提交包含在:
Jinwei Chen
2021-02-22 03:22:07 -08:00
提交者 Madan Koyyalamudi
父節點 1bb3155d2c
當前提交 4083155141
共有 30 個檔案被更改,包括 1618 行新增124 行删除

查看文件

@@ -5280,6 +5280,8 @@ static void dp_soc_deinit(void *txrx_soc)
qdf_atomic_set(&soc->cmn_init_done, 0);
soc->arch_ops.txrx_soc_deinit(soc);
/* free peer tables & AST tables allocated during peer_map_attach */
if (soc->peer_map_attach_success) {
dp_peer_find_detach(soc);
@@ -12745,12 +12747,16 @@ dp_soc_attach(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
dp_err("DP SOC memory allocation failed");
goto fail0;
}
dp_info("soc memory allocated %pk", soc);
soc->hif_handle = hif_handle;
soc->hal_soc = hif_get_hal_handle(soc->hif_handle);
if (!soc->hal_soc)
goto fail1;
hif_get_cmem_info(soc->hif_handle,
&soc->cmem_base,
&soc->cmem_size);
int_ctx = 0;
soc->device_id = device_id;
soc->cdp_soc.ops = &dp_txrx_ops;
@@ -12852,21 +12858,26 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
wlan_minidump_log(soc, sizeof(*soc), soc->ctrl_psoc,
WLAN_MD_DP_SOC, "dp_soc");
if (!QDF_IS_STATUS_SUCCESS(soc->arch_ops.txrx_soc_init(soc))) {
dp_err("unable to do target specific init");
goto fail0;
}
htt_soc = htt_soc_attach(soc, htc_handle);
if (!htt_soc)
goto fail0;
goto fail1;
soc->htt_handle = htt_soc;
if (htt_soc_htc_prealloc(htt_soc) != QDF_STATUS_SUCCESS)
goto fail1;
goto fail2;
htt_set_htc_handle(htt_soc, htc_handle);
soc->hif_handle = hif_handle;
soc->hal_soc = hif_get_hal_handle(soc->hif_handle);
if (!soc->hal_soc)
goto fail2;
goto fail3;
dp_soc_cfg_init(soc);
@@ -12886,7 +12897,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
num_dp_msi = dp_get_num_msi_available(soc, soc->intr_mode);
if (num_dp_msi < 0) {
dp_init_err("%pK: dp_interrupt assignment failed", soc);
goto fail3;
goto fail4;
}
wlan_cfg_fill_interrupt_mask(soc->wlan_cfg_ctx, num_dp_msi,
soc->intr_mode, is_monitor_mode);
@@ -12894,20 +12905,20 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
/* initialize WBM_IDLE_LINK ring */
if (dp_hw_link_desc_ring_init(soc)) {
dp_init_err("%pK: dp_hw_link_desc_ring_init failed", soc);
goto fail3;
goto fail4;
}
dp_link_desc_ring_replenish(soc, WLAN_INVALID_PDEV_ID);
if (dp_soc_srng_init(soc)) {
dp_init_err("%pK: dp_soc_srng_init failed", soc);
goto fail4;
goto fail5;
}
if (htt_soc_initialize(soc->htt_handle, soc->ctrl_psoc,
htt_get_htc_handle(htt_soc),
soc->hal_soc, soc->osdev) == NULL)
goto fail5;
goto fail6;
/* Initialize descriptors in TCL Rings */
for (i = 0; i < soc->num_tcl_data_rings; i++) {
@@ -12917,7 +12928,7 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
if (dp_soc_tx_desc_sw_pools_init(soc)) {
dp_init_err("%pK: dp_tx_soc_attach failed", soc);
goto fail6;
goto fail7;
}
wlan_cfg_set_rx_hash(soc->wlan_cfg_ctx,
@@ -13028,18 +13039,20 @@ void *dp_soc_init(struct dp_soc *soc, HTC_HANDLE htc_handle,
qdf_skb_total_mem_stats_read());
return soc;
fail6:
fail7:
htt_soc_htc_dealloc(soc->htt_handle);
fail5:
fail6:
dp_soc_srng_deinit(soc);
fail4:
fail5:
dp_hw_link_desc_ring_deinit(soc);
fail3:
fail4:
dp_hw_link_desc_ring_free(soc);
fail2:
fail3:
htt_htc_pkt_pool_free(htt_soc);
fail1:
fail2:
htt_soc_detach(htt_soc);
fail1:
soc->arch_ops.txrx_soc_deinit(soc);
fail0:
return NULL;
}