qcacmn: Remove DA specific from common cp_stats
Remove DA specific init APIs from common cp_stats and change logic to not return callback status for psoc close and disable to override devpool issue for DA arch CRs-Fixed: 2224153 Change-Id: Ie5bfb7cb7773d3fc09237a9d14ec3611e78cc06f
This commit is contained in:
@@ -1,36 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DOC: wlan_cp_stats_da_api.c
|
|
||||||
*
|
|
||||||
* This file provide definitions for cp stats global context initialization
|
|
||||||
* specific to DA
|
|
||||||
*/
|
|
||||||
#include "wlan_cp_stats_defs.h"
|
|
||||||
#include "wlan_cp_stats_da_api.h"
|
|
||||||
|
|
||||||
QDF_STATUS wlan_cp_stats_ctx_init_da(struct cp_stats_context *csc)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS wlan_cp_stats_ctx_deinit_da(struct cp_stats_context *ac)
|
|
||||||
{
|
|
||||||
return QDF_STATUS_SUCCESS;
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
|
||||||
* above copyright notice and this permission notice appear in all
|
|
||||||
* copies.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
||||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
||||||
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
||||||
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
||||||
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
* PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* DOC: wlan_cp_stats_da_api.h
|
|
||||||
*
|
|
||||||
* This header file provide declarations for cp stats global context object
|
|
||||||
* initialization specific to DA
|
|
||||||
*/
|
|
||||||
#ifndef __WLAN_CP_STATS_DA_API_H__
|
|
||||||
#define __WLAN_CP_STATS_DA_API_H__
|
|
||||||
|
|
||||||
#ifdef QCA_SUPPORT_CP_STATS
|
|
||||||
#include <wlan_objmgr_cmn.h>
|
|
||||||
#include "wlan_cp_stats_defs.h"
|
|
||||||
#include "wlan_cp_stats_da_api.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wlan_cp_stats_ctx_init_da() - initialize cp stats global context
|
|
||||||
* @pdev: Pointer to cp stats global context object
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS - Success or Failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wlan_cp_stats_ctx_init_da(struct cp_stats_context *csc);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* wlan_cp_stats_ctx_deinit_da() - deinitialize cp stats global context
|
|
||||||
* @pdev: Pointer to cp stats global context object
|
|
||||||
*
|
|
||||||
* Return: QDF_STATUS - Success or Failure
|
|
||||||
*/
|
|
||||||
QDF_STATUS wlan_cp_stats_ctx_deinit_da(struct cp_stats_context *csc);
|
|
||||||
|
|
||||||
#endif /* QCA_SUPPORT_CP_STATS */
|
|
||||||
#endif /* __WLAN_CP_STATS_DA_API_H__ */
|
|
@@ -26,13 +26,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "wlan_cp_stats_obj_mgr_handler.h"
|
#include "wlan_cp_stats_obj_mgr_handler.h"
|
||||||
#include "wlan_cp_stats_defs.h"
|
#include "wlan_cp_stats_defs.h"
|
||||||
#include "wlan_cp_stats_da_api.h"
|
|
||||||
#include "wlan_cp_stats_ol_api.h"
|
#include "wlan_cp_stats_ol_api.h"
|
||||||
|
|
||||||
#include "wlan_cp_stats_defs.h"
|
#include "wlan_cp_stats_defs.h"
|
||||||
#include "wlan_cp_stats_ic_ucfg_handler.h"
|
|
||||||
|
|
||||||
#include <wlan_cp_stats_ucfg_api.h>
|
|
||||||
#include "wlan_cp_stats_utils_api.h"
|
#include "wlan_cp_stats_utils_api.h"
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
|
@@ -34,6 +34,12 @@
|
|||||||
#include <wlan_objmgr_vdev_obj.h>
|
#include <wlan_objmgr_vdev_obj.h>
|
||||||
#include <wlan_objmgr_peer_obj.h>
|
#include <wlan_objmgr_peer_obj.h>
|
||||||
|
|
||||||
|
#ifdef QCA_SUPPORT_CP_STATS_DA
|
||||||
|
#include "wlan_cp_stats_da_api.h"
|
||||||
|
#else
|
||||||
|
#include "wlan_cp_stats_defs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wlan_cp_stats_psoc_obj_create_handler() - psoc create notification handler
|
* wlan_cp_stats_psoc_obj_create_handler() - psoc create notification handler
|
||||||
* callback function
|
* callback function
|
||||||
@@ -122,5 +128,19 @@ QDF_STATUS wlan_cp_stats_peer_obj_create_handler(
|
|||||||
QDF_STATUS wlan_cp_stats_peer_obj_destroy_handler(
|
QDF_STATUS wlan_cp_stats_peer_obj_destroy_handler(
|
||||||
struct wlan_objmgr_peer *peer, void *data);
|
struct wlan_objmgr_peer *peer, void *data);
|
||||||
|
|
||||||
|
#ifndef QCA_SUPPORT_CP_STATS_DA
|
||||||
|
static inline
|
||||||
|
QDF_STATUS wlan_cp_stats_ctx_init_da(struct cp_stats_context *csc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
QDF_STATUS wlan_cp_stats_ctx_deinit_da(struct cp_stats_context *csc)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* QCA_SUPPORT_CP_STATS */
|
#endif /* QCA_SUPPORT_CP_STATS */
|
||||||
#endif /* __WLAN_CP_STATS_OBJ_MGR_HANDLER_H__ */
|
#endif /* __WLAN_CP_STATS_OBJ_MGR_HANDLER_H__ */
|
||||||
|
@@ -26,6 +26,9 @@
|
|||||||
#define __WLAN_CP_STATS_UCFG_API_H__
|
#define __WLAN_CP_STATS_UCFG_API_H__
|
||||||
|
|
||||||
#ifdef QCA_SUPPORT_CP_STATS
|
#ifdef QCA_SUPPORT_CP_STATS
|
||||||
|
#include <wlan_cp_stats_utils_api.h>
|
||||||
|
#include "../../core/src/wlan_cp_stats_defs.h"
|
||||||
|
#include "../../core/src/wlan_cp_stats_cmn_api_i.h"
|
||||||
|
|
||||||
#endif /* QCA_SUPPORT_CP_STATS */
|
#endif /* QCA_SUPPORT_CP_STATS */
|
||||||
#endif /* __WLAN_CP_STATS_UCFG_API_H__ */
|
#endif /* __WLAN_CP_STATS_UCFG_API_H__ */
|
||||||
|
@@ -232,6 +232,25 @@ QDF_STATUS wlan_cp_stats_open(struct wlan_objmgr_psoc *psoc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS wlan_cp_stats_close(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS wlan_cp_stats_close(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct cp_stats_context *csc;
|
||||||
|
|
||||||
|
if (!psoc) {
|
||||||
|
cp_stats_err("PSOC is null!");
|
||||||
|
return QDF_STATUS_E_INVAL;
|
||||||
|
}
|
||||||
|
csc =
|
||||||
|
wlan_objmgr_psoc_get_comp_private_obj(psoc, WLAN_UMAC_COMP_CP_STATS);
|
||||||
|
if (csc && csc->cp_stats_close) {
|
||||||
|
csc->cp_stats_close(psoc);
|
||||||
|
qdf_spinlock_destroy(&csc->csc_lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* WMI registrations stage */
|
||||||
|
QDF_STATUS wlan_cp_stats_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||||
struct cp_stats_context *csc;
|
struct cp_stats_context *csc;
|
||||||
@@ -247,30 +266,6 @@ QDF_STATUS wlan_cp_stats_close(struct wlan_objmgr_psoc *psoc)
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (csc->cp_stats_close)
|
|
||||||
status = csc->cp_stats_close(psoc);
|
|
||||||
|
|
||||||
qdf_spinlock_destroy(&csc->csc_lock);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* WMI registrations stage */
|
|
||||||
QDF_STATUS wlan_cp_stats_enable(struct wlan_objmgr_psoc *psoc)
|
|
||||||
{
|
|
||||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
||||||
struct cp_stats_context *csc;
|
|
||||||
|
|
||||||
if (!psoc) {
|
|
||||||
cp_stats_err("PSOC is null!\n");
|
|
||||||
return QDF_STATUS_E_INVAL;
|
|
||||||
}
|
|
||||||
csc =
|
|
||||||
wlan_objmgr_psoc_get_comp_private_obj(psoc, WLAN_UMAC_COMP_CP_STATS);
|
|
||||||
if (!csc) {
|
|
||||||
cp_stats_err("cp_stats_context is null!\n");
|
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (csc->cp_stats_enable)
|
if (csc->cp_stats_enable)
|
||||||
status = csc->cp_stats_enable(psoc);
|
status = csc->cp_stats_enable(psoc);
|
||||||
|
|
||||||
@@ -279,7 +274,6 @@ QDF_STATUS wlan_cp_stats_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
|
|
||||||
QDF_STATUS wlan_cp_stats_disable(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS wlan_cp_stats_disable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
|
||||||
struct cp_stats_context *csc;
|
struct cp_stats_context *csc;
|
||||||
|
|
||||||
if (!psoc) {
|
if (!psoc) {
|
||||||
@@ -288,15 +282,10 @@ QDF_STATUS wlan_cp_stats_disable(struct wlan_objmgr_psoc *psoc)
|
|||||||
}
|
}
|
||||||
csc =
|
csc =
|
||||||
wlan_objmgr_psoc_get_comp_private_obj(psoc, WLAN_UMAC_COMP_CP_STATS);
|
wlan_objmgr_psoc_get_comp_private_obj(psoc, WLAN_UMAC_COMP_CP_STATS);
|
||||||
if (!csc) {
|
if (csc && csc->cp_stats_disable)
|
||||||
cp_stats_err("cp_stats_context is null!\n");
|
csc->cp_stats_disable(psoc);
|
||||||
return QDF_STATUS_E_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (csc->cp_stats_disable)
|
return QDF_STATUS_SUCCESS;
|
||||||
status = csc->cp_stats_disable(psoc);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
|
Reference in New Issue
Block a user