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
This commit is contained in:
Rakesh Pillai
2023-06-26 02:52:09 -07:00
zatwierdzone przez Rahul Choudhary
rodzic d6c774e684
commit 466b34b3c2
2 zmienionych plików z 25 dodań i 24 usunięć

Wyświetl plik

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

Wyświetl plik

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