qcacld-3.0: Initialize Direct Link DP only if FW supports

Initialize direct link datapath based on the capability
bit from FW.

Change-Id: I054ae693762bafcd9461cf2505b0c4446c3c6c2f
CRs-Fixed: 3335329
Tento commit je obsažen v:
Yeshwanth Sriram Guntuka
2022-11-12 19:04:35 +05:30
rodič d87a5b9b96
revize 51c1c5669c

Zobrazit soubor

@@ -1667,7 +1667,10 @@ QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
struct dp_direct_link_context *dp_direct_link_ctx;
QDF_STATUS status;
/* ToDo: Check for FW direct_link capability */
if (!pld_is_direct_link_supported(dp_ctx->qdf_dev->dev)) {
dp_info("FW does not support Direct Link");
return QDF_STATUS_SUCCESS;
}
dp_direct_link_ctx = qdf_mem_malloc(sizeof(*dp_direct_link_ctx));
if (!dp_direct_link_ctx) {
@@ -1697,7 +1700,10 @@ QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx)
{
if (dp_ctx->dp_direct_link_ctx)
if (!pld_is_direct_link_supported(dp_ctx->qdf_dev->dev))
return;
if (!dp_ctx->dp_direct_link_ctx)
return;
dp_direct_link_refill_ring_deinit(dp_ctx->dp_direct_link_ctx);