ソースを参照

qcacld-3.0: Disable ipa ready registration in FTM mode

In FTM mode do not register callback with IPA driver
to check if IPA is ready.
IPA offload is not supported in FTM mode.

Change-Id: I9d36f3085db72d3ffe9e6080f422618f7a531c01
CRs-Fixed: 2772192
Nisha Menon 4 年 前
コミット
d5f0559bbb

+ 12 - 0
components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h

@@ -49,6 +49,14 @@ QDF_STATUS ipa_deinit(void);
  */
 QDF_STATUS ipa_register_is_ipa_ready(struct wlan_objmgr_pdev *pdev);
 
+/**
+ * ipa_disable_register_cb() - Reset the IPA is ready flag
+ *
+ * Return: Set the ipa_is_ready flag to false when module is
+ * unloaded to indicate that ipa ready cb is not registered
+ */
+void ipa_disable_register_cb(void);
+
 #else
 
 static inline QDF_STATUS ipa_init(void)
@@ -66,6 +74,10 @@ static inline QDF_STATUS ipa_register_is_ipa_ready(
 {
 	return QDF_STATUS_SUCCESS;
 }
+
+static inline void ipa_disable_register_cb(void)
+{
+}
 #endif /* IPA_OFFLOAD */
 
 #endif /* _WLAN_IPA_OBJ_MGMT_H_ */

+ 7 - 0
components/ipa/dispatcher/src/wlan_ipa_obj_mgmt_api.c

@@ -31,6 +31,12 @@ bool ipa_is_ready(void)
 	return g_ipa_is_ready;
 }
 
+void ipa_disable_register_cb(void)
+{
+	ipa_debug("Don't register ready cb with IPA driver");
+	g_ipa_is_ready = false;
+}
+
 /**
  * ipa_pdev_obj_destroy_notification() - IPA pdev object destroy notification
  * @pdev: pdev handle
@@ -65,6 +71,7 @@ ipa_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev,
 
 	ipa_obj_cleanup(ipa_obj);
 	qdf_mem_free(ipa_obj);
+	ipa_disable_register_cb();
 
 	return status;
 }

+ 9 - 5
core/hdd/src/wlan_hdd_main.c

@@ -13724,10 +13724,14 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
 	 * observed otherwise.
 	 */
 
-	status = ipa_register_is_ipa_ready(hdd_ctx->pdev);
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
-		hdd_err("ipa_register_is_ipa_ready failed");
-		goto out;
+	if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) {
+		ipa_disable_register_cb();
+	} else {
+		status = ipa_register_is_ipa_ready(hdd_ctx->pdev);
+		if (!QDF_IS_STATUS_SUCCESS(status)) {
+			hdd_err("ipa_register_is_ipa_ready failed");
+			goto out;
+		}
 	}
 
 	/*
@@ -13997,7 +14001,6 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 		}
 		/* pdev close and destroy use tx rx ops so call this here */
 		wlan_global_lmac_if_close(hdd_ctx->psoc);
-		ucfg_ipa_component_config_free();
 	}
 
 	/*
@@ -14026,6 +14029,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode)
 		epping_close();
 	}
 
+	ucfg_ipa_component_config_free();
 	hdd_hif_close(hdd_ctx, hif_ctx);
 
 	ol_cds_free();