Sfoglia il codice sorgente

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
Shwetha G K 4 anni fa
parent
commit
4ff5e4ef13

+ 32 - 0
target_if/spectral/target_if_spectral.c

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

+ 2 - 30
target_if/spectral/target_if_spectral.h

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