qcacmn: change get spectral handle to non-inline

Change the get_target_if_spectral_handle_from_pdev() api to
non-inline for code size reduction.

CRs-Fixed: 2896467
Change-Id: Icb92643a9c0d85a1b4328cd0c516d6d771877a4f
This commit is contained in:
Shwetha G K 2021-03-10 12:59:05 +05:30 committed by snandini
parent 8055c97ed3
commit 4ff5e4ef13
2 changed files with 34 additions and 30 deletions

View File

@ -98,6 +98,38 @@ bool target_if_spectral_wmi_service_enabled(struct wlan_objmgr_psoc *psoc,
}
#endif /* SPECTRAL_MODULIZED_ENABLE */
struct target_if_spectral *get_target_if_spectral_handle_from_pdev(
struct wlan_objmgr_pdev *pdev)
{
struct target_if_spectral *spectral;
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_rx_ops *rx_ops;
if (!pdev) {
spectral_err("pdev is null");
return NULL;
}
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc) {
spectral_err("psoc is null");
return NULL;
}
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
if (!rx_ops) {
spectral_err("rx_ops is null");
return NULL;
}
spectral = (struct target_if_spectral *)
rx_ops->sptrl_rx_ops.sptrlro_get_pdev_target_handle(pdev);
return spectral;
}
qdf_export_symbol(get_target_if_spectral_handle_from_pdev);
/**
* target_if_spectral_get_normal_mode_cap() - API to get normal
* Spectral scan capability of a given pdev

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011,2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2011,2017-2021 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@ -1454,36 +1454,8 @@ void target_if_dbg_print_samp_msg(struct spectral_samp_msg *pmsg);
* Return: Handle to target_if internal Spectral data on success, NULL on
* failure
*/
static inline
struct target_if_spectral *get_target_if_spectral_handle_from_pdev(
struct wlan_objmgr_pdev *pdev)
{
struct target_if_spectral *spectral;
struct wlan_objmgr_psoc *psoc;
struct wlan_lmac_if_rx_ops *rx_ops;
if (!pdev) {
spectral_err("pdev is null");
return NULL;
}
psoc = wlan_pdev_get_psoc(pdev);
if (!psoc) {
spectral_err("psoc is null");
return NULL;
}
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
if (!rx_ops) {
spectral_err("rx_ops is null");
return NULL;
}
spectral = (struct target_if_spectral *)
rx_ops->sptrl_rx_ops.sptrlro_get_pdev_target_handle(pdev);
return spectral;
}
struct wlan_objmgr_pdev *pdev);
/**
* get_target_if_spectral_handle_from_psoc() - Get handle to psoc target_if