Browse Source

qcacld-3.0: Change FISA cfg check APIs to static inline

Change the cfg enablement check APIs (currently FISA),
to static inline, in order to avoid function call
every time to check if the feature is enabled or not.

Change-Id: Ie541313c1b0a7512f71a6189a706871e57b3145e
CRs-Fixed: 3540739
Rakesh Pillai 1 year ago
parent
commit
466b34b3c2
2 changed files with 25 additions and 24 deletions
  1. 25 2
      components/dp/core/inc/wlan_dp_main.h
  2. 0 22
      components/dp/core/src/wlan_dp_main.c

+ 25 - 2
components/dp/core/inc/wlan_dp_main.h

@@ -852,13 +852,18 @@ QDF_STATUS wlan_dp_select_profile_cfg(struct wlan_objmgr_psoc *psoc)
 
 /* DP CFG APIs - START */
 
+#ifdef WLAN_SUPPORT_RX_FISA
 /**
  * wlan_dp_cfg_is_rx_fisa_enabled() - Get Rx FISA enabled flag
  * @dp_cfg: soc configuration context
  *
  * Return: true if enabled, false otherwise.
  */
-bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg);
+static inline
+bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
+{
+	return dp_cfg->is_rx_fisa_enabled;
+}
 
 /**
  * wlan_dp_cfg_is_rx_fisa_lru_del_enabled() - Get Rx FISA LRU del enabled flag
@@ -866,7 +871,25 @@ bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg);
  *
  * Return: true if enabled, false otherwise.
  */
-bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg);
+static inline
+bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
+{
+	return dp_cfg->is_rx_fisa_lru_del_enabled;
+}
+#else
+static inline
+bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
+{
+	return false;
+}
+
+static inline
+bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
+{
+	return false;
+}
+#endif
+
 
 /* DP CFG APIs - END */
 #endif

+ 0 - 22
components/dp/core/src/wlan_dp_main.c

@@ -623,28 +623,6 @@ static void dp_set_rx_mode_value(struct wlan_dp_psoc_context *dp_ctx)
 		dp_ctx->rps, dp_ctx->dynamic_rps);
 }
 
-#ifdef WLAN_SUPPORT_RX_FISA
-bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
-{
-	return dp_cfg->is_rx_fisa_enabled;
-}
-
-bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
-{
-	return dp_cfg->is_rx_fisa_lru_del_enabled;
-}
-#else
-bool wlan_dp_cfg_is_rx_fisa_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
-{
-	return false;
-}
-
-bool wlan_dp_cfg_is_rx_fisa_lru_del_enabled(struct wlan_dp_psoc_cfg *dp_cfg)
-{
-	return false;
-}
-#endif
-
 /**
  * dp_cfg_init() - initialize target specific configuration
  * @ctx: dp context handle