浏览代码

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
Yeshwanth Sriram Guntuka 2 年之前
父节点
当前提交
51c1c5669c
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. 8 2
      components/dp/core/src/wlan_dp_main.c

+ 8 - 2
components/dp/core/src/wlan_dp_main.c

@@ -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);