diff --git a/target_if/cp_stats/inc/target_if_cp_stats.h b/target_if/cp_stats/inc/target_if_cp_stats.h index eeef6fce7fae..58d940a65439 100644 --- a/target_if/cp_stats/inc/target_if_cp_stats.h +++ b/target_if/cp_stats/inc/target_if_cp_stats.h @@ -64,27 +64,12 @@ target_if_cp_stats_get_tx_ops(struct wlan_objmgr_psoc *psoc) */ QDF_STATUS target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops); - -/** - * target_if_cp_stats_register_rx_ops() - define cp_stats lmac rx ops functions - * @rx_ops: pointer to lmac rx ops - * - * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error - */ -QDF_STATUS -target_if_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); #else static inline QDF_STATUS target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) { return QDF_STATUS_SUCCESS; } - -static inline QDF_STATUS -target_if_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) -{ - return QDF_STATUS_SUCCESS; -} #endif /* QCA_SUPPORT_CP_STATS */ #endif /* __TARGET_IF_CP_STATS_H__ */ diff --git a/target_if/cp_stats/src/target_if_cp_stats.c b/target_if/cp_stats/src/target_if_cp_stats.c index de5c4f441811..e0e99fedf8b7 100644 --- a/target_if/cp_stats/src/target_if_cp_stats.c +++ b/target_if/cp_stats/src/target_if_cp_stats.c @@ -79,8 +79,3 @@ target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) return QDF_STATUS_SUCCESS; } -QDF_STATUS -target_if_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) -{ - return QDF_STATUS_SUCCESS; -} diff --git a/target_if/cp_stats/src/target_if_mc_cp_stats.c b/target_if/cp_stats/src/target_if_mc_cp_stats.c index 745c01a0c415..701ba20f717f 100644 --- a/target_if/cp_stats/src/target_if_mc_cp_stats.c +++ b/target_if/cp_stats/src/target_if_mc_cp_stats.c @@ -307,10 +307,3 @@ target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops) return QDF_STATUS_SUCCESS; } -QDF_STATUS -target_if_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) -{ - rx_ops->cp_stats_rx_ops.process_stats_event = - tgt_mc_cp_stats_process_stats_event; - return QDF_STATUS_SUCCESS; -} diff --git a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_tgt_api.h b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_tgt_api.h index e13fc0fa3d92..94929afff981 100644 --- a/umac/cp_stats/dispatcher/inc/wlan_cp_stats_tgt_api.h +++ b/umac/cp_stats/dispatcher/inc/wlan_cp_stats_tgt_api.h @@ -23,9 +23,19 @@ */ #ifndef __WLAN_CP_STATS_TGT_API_H__ #define __WLAN_CP_STATS_TGT_API_H__ - -#ifdef QCA_SUPPORT_CP_STATS +#include #include +#ifdef QCA_SUPPORT_CP_STATS +/** + * tgt_cp_stats_register_rx_ops(): API to register rx ops with lmac + * @rx_ops: rx ops struct + * + * Return: none + */ +void tgt_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops); +#else +static inline void tgt_cp_stats_register_rx_ops( + struct wlan_lmac_if_rx_ops *rx_ops) {} #endif /* QCA_SUPPORT_CP_STATS */ #endif /* __WLAN_CP_STATS_TGT_API_H__ */ diff --git a/umac/cp_stats/dispatcher/src/wlan_cp_stats_ic_tgt_api.c b/umac/cp_stats/dispatcher/src/wlan_cp_stats_ic_tgt_api.c index 5a7c1b1c6e86..164372897a98 100644 --- a/umac/cp_stats/dispatcher/src/wlan_cp_stats_ic_tgt_api.c +++ b/umac/cp_stats/dispatcher/src/wlan_cp_stats_ic_tgt_api.c @@ -23,4 +23,8 @@ * from southbound interface */ #include +#include +void tgt_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) +{ +} diff --git a/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_tgt_api.c b/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_tgt_api.c index 4fe11d74b1be..b0ecef7fdc53 100644 --- a/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_tgt_api.c +++ b/umac/cp_stats/dispatcher/src/wlan_cp_stats_mc_tgt_api.c @@ -31,6 +31,12 @@ #include #include "../../core/src/wlan_cp_stats_defs.h" +void tgt_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops) +{ + rx_ops->cp_stats_rx_ops.process_stats_event = + tgt_mc_cp_stats_process_stats_event; +} + static void tgt_mc_cp_stats_extract_tx_power(struct wlan_objmgr_psoc *psoc, struct stats_event *ev, bool is_station_stats) diff --git a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h index b60bf973e9cd..caf4cd4bfa18 100644 --- a/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h +++ b/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h @@ -73,7 +73,6 @@ struct scheduler_msg; #endif #ifdef QCA_SUPPORT_CP_STATS -#include #include #endif /* QCA_SUPPORT_CP_STATS */ diff --git a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c index 4ed28cde6997..9d7868b1e5f0 100644 --- a/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c +++ b/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c @@ -65,7 +65,6 @@ #ifdef QCA_SUPPORT_CP_STATS #include -#include #endif /* QCA_SUPPORT_CP_STATS */ /* Function pointer for OL/WMA specific UMAC tx_ops @@ -87,7 +86,7 @@ qdf_export_symbol(wlan_lmac_if_umac_tx_ops_register); static void wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops) { - target_if_cp_stats_register_rx_ops(rx_ops); + tgt_cp_stats_register_rx_ops(rx_ops); } #else static void