Quellcode durchsuchen

qcacmn: Disable autonomy for opt wifi dp based on WLANflag

Currently IPA autonomy is disabled for opt wifi dp
feature inorder to set default packet routing
to HOST REO rings instead of IPA. The check currently
depends on the feature flag set from IPA.
But this does not handle the case if feature is
enabled from WLAN but disabled from IPA, as autonomy
will get enabled in this scenario and default packet
routing is set to IPA.
This fix will check if opt_wifi_dp feature is
enabled from WLAN and disable autonomy to
ensure the default routing is always set to
HOST REO rings.

Change-Id: I3673d7dbeefcadb45132ea300f4ec3ac22743b86
CRs-Fixed: 3450862
Namita Nair vor 2 Jahren
Ursprung
Commit
bf8fcc25af
1 geänderte Dateien mit 18 neuen und 3 gelöschten Zeilen
  1. 18 3
      ipa/core/src/wlan_ipa_core.c

+ 18 - 3
ipa/core/src/wlan_ipa_core.c

@@ -650,7 +650,7 @@ static inline void wlan_ipa_wdi_init_metering(struct wlan_ipa_priv *ipa_ctxt,
 
 #ifdef IPA_OPT_WIFI_DP
 /**
- * wlan_ipa_wdi_init_set_opt_wifi_dp - set if optional wifi dp feature enabled_
+ * wlan_ipa_wdi_init_set_opt_wifi_dp - set if optional wifi dp enabled from IPA
  * @ipa_ctxt: IPA context
  * @out: IPA WDI out param
  *
@@ -663,12 +663,27 @@ static inline void wlan_ipa_wdi_init_set_opt_wifi_dp(
 	ipa_ctxt->opt_wifi_datapath =
 				QDF_IPA_WDI_INIT_OUT_PARAMS_OPT_WIFI_DP(out);
 }
+
+/**
+ * wlan_ipa_opt_wifi_dp_enabled - set if optional wifi dp enabled in WLAN
+ *
+ * Return: bool
+ */
+static inline bool wlan_ipa_opt_wifi_dp_enabled(void)
+{
+	return true;
+}
 #else
 static inline void wlan_ipa_wdi_init_set_opt_wifi_dp(
 					     struct wlan_ipa_priv *ipa_ctxt,
 					     qdf_ipa_wdi_init_out_params_t *out)
 {
 }
+
+static inline bool wlan_ipa_opt_wifi_dp_enabled(void)
+{
+	return false;
+}
 #endif
 
 #ifdef IPA_WDS_EASYMESH_FEATURE
@@ -1737,7 +1752,7 @@ QDF_STATUS wlan_ipa_uc_enable_pipes(struct wlan_ipa_priv *ipa_ctx)
 	qdf_event_reset(&ipa_ctx->ipa_resource_comp);
 
 	if (qdf_atomic_read(&ipa_ctx->autonomy_disabled)) {
-		if (ipa_ctx->opt_wifi_datapath) {
+		if (wlan_ipa_opt_wifi_dp_enabled()) {
 			/* Default packet routing is to HOST REO rings */
 			ipa_info("opt_dp: enable pipes. Do not enable autonomy");
 		} else {
@@ -1749,7 +1764,7 @@ QDF_STATUS wlan_ipa_uc_enable_pipes(struct wlan_ipa_priv *ipa_ctx)
 end:
 	qdf_spin_lock_bh(&ipa_ctx->enable_disable_lock);
 	if (((!qdf_atomic_read(&ipa_ctx->autonomy_disabled)) ||
-	     ipa_ctx->opt_wifi_datapath) &&
+	     wlan_ipa_opt_wifi_dp_enabled()) &&
 	    !qdf_atomic_read(&ipa_ctx->pipes_disabled))
 		ipa_ctx->ipa_pipes_down = false;