qcacmn: Fix CP_STATS rx_ops registration

Fix CP_STATS rx_ops registration in wlan_lmac_if.c, by including
dispatcher header and directly referencing public dispatcher tgt
APIs.

Change-Id: Id42aac8d2a7f1311d4319c77db05eadd75ee4aa0
CRs-Fixed: 2228934
This commit is contained in:
Naveen Rawat 2018-04-21 09:22:23 -07:00 • committed by nshrivas
commit 8f4c9087bf
8 changed files with 23 additions and 32 deletions

View file

@ -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__ */

View file

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

View file

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

View file

@ -23,9 +23,19 @@
*/
#ifndef __WLAN_CP_STATS_TGT_API_H__
#define __WLAN_CP_STATS_TGT_API_H__
#ifdef QCA_SUPPORT_CP_STATS
#include <wlan_lmac_if_def.h>
#include <wlan_objmgr_cmn.h>
#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__ */

View file

@ -23,4 +23,8 @@
* from southbound interface
*/
#include <wlan_cp_stats_ic_atf_defs.h>
#include <wlan_cp_stats_tgt_api.h>
void tgt_cp_stats_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{
}

View file

@ -31,6 +31,12 @@
#include <wlan_cp_stats_utils_api.h>
#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)

View file

@ -73,7 +73,6 @@ struct scheduler_msg;
#endif
#ifdef QCA_SUPPORT_CP_STATS
#include <wlan_cp_stats_tgt_api.h>
#include <wlan_cp_stats_mc_defs.h>
#endif /* QCA_SUPPORT_CP_STATS */

View file

@ -65,7 +65,6 @@
#ifdef QCA_SUPPORT_CP_STATS
#include <wlan_cp_stats_tgt_api.h>
#include <target_if_cp_stats.h>
#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