From 2e59ee014533b9fa30c3a8adda2039d3768d78d2 Mon Sep 17 00:00:00 2001 From: Abhijit Pradhan Date: Sat, 1 Apr 2017 16:54:16 +0530 Subject: [PATCH] qcacmn: A common function to get dfs_rx_ops Instead of calling and defining the same function from different files, have a common function in a header file and call it from different files. The function retrieves the dfs rx_ops from the psoc context. Change-Id: I1c9089c2508faa9ee7a5bf6645dcf02659923bc3 CRs-Fixed: 2001106 --- .../lmac_if/inc/wlan_lmac_if_api.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h index 4d1722154d9b..2e3c2360250d 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_api.h @@ -66,6 +66,23 @@ wlan_lmac_if_get_mgmt_txrx_rx_ops(struct wlan_objmgr_psoc *psoc) return &psoc->soc_cb.rx_ops.mgmt_txrx_rx_ops; } +/** + * wlan_lmac_if_get_dfs_rx_ops() - retrieve the dfs rx_ops + * @psoc: psoc context + * + * API to retrieve the dfs rx_ops from the psoc context + * + * Return: dfs_rx_ops pointer + */ +static inline struct wlan_lmac_if_dfs_rx_ops * +wlan_lmac_if_get_dfs_rx_ops(struct wlan_objmgr_psoc *psoc) +{ + if (!psoc) + return NULL; + + return &psoc->soc_cb.rx_ops.dfs_rx_ops; +} + /** * mgmt_txrx_get_nbuf() - retrieve nbuf from mgmt desc_id * @psoc: psoc context