From ff302a9f4a93654e2ad7114eef305877adaa7b52 Mon Sep 17 00:00:00 2001 From: hqu Date: Thu, 18 Jul 2019 00:06:11 +0800 Subject: [PATCH] qcacld-3.0: Define void * data members of cp_stats with specific type Define void * data members of cp_stats with specific type, remove void pointer usage for part of cp stats code. Change-Id: Iace37c0a546909b865d5185830a2e02b5b39b7d8 CRs-Fixed: 2492544 --- Kbuild | 4 ++ .../dispatcher/inc/wlan_cp_stats_ext_type.h | 63 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 components/cp_stats/dispatcher/inc/wlan_cp_stats_ext_type.h diff --git a/Kbuild b/Kbuild index 964a514d5e..39a7b1c5c1 100644 --- a/Kbuild +++ b/Kbuild @@ -1474,6 +1474,9 @@ CP_STATS_OBJS := $(CP_STATS_TGT_SRC)/target_if_mc_cp_stats.o \ $(CP_STATS_DISPATCHER_SRC)/wlan_cp_stats_mc_ucfg_api.o endif +###### COMPONENT CP STATS ######## +COMP_CP_STATS_DISPATCHER_INC := -I$(WLAN_ROOT)/components/cp_stats/dispatcher/inc + ###### INTEROP ISSUES AP ######## INTEROP_ISSUES_AP_OS_IF_SRC := os_if/interop_issues_ap/src INTEROP_ISSUES_AP_TGT_SRC := components/target_if/interop_issues_ap/src @@ -1829,6 +1832,7 @@ INCS += $(WIFI_POS_OS_IF_INC) INCS += $(CP_STATS_OS_IF_INC) INCS += $(CP_STATS_TGT_INC) INCS += $(CP_STATS_DISPATCHER_INC) +INCS += $(COMP_CP_STATS_DISPATCHER_INC) ################ INTEROP ISSUES AP ################ INCS += $(INTEROP_ISSUES_AP_OS_IF_INC) INCS += $(INTEROP_ISSUES_AP_TGT_INC) diff --git a/components/cp_stats/dispatcher/inc/wlan_cp_stats_ext_type.h b/components/cp_stats/dispatcher/inc/wlan_cp_stats_ext_type.h new file mode 100644 index 0000000000..a4f5ae1a19 --- /dev/null +++ b/components/cp_stats/dispatcher/inc/wlan_cp_stats_ext_type.h @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2019 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_ext_cp_stats_types.h + * + * This header file is included by the converged control path statistics + * component to map legacy statistic structures to the external + * (ext)typedefs used by the converged code. This mechanism allows the + * legacy structs to be included as part of the global objmgr objects. + */ + +#ifndef __WLAN_EXT_CP_STATS_TYPE_H__ +#define __WLAN_EXT_CP_STATS_TYPE_H__ + +/** + * typedef psoc_ext_cp_stats_t - Definition of psoc cp stats pointer + * Define obj_stats from external umac/cp_stats component point to this type + */ +typedef struct psoc_mc_cp_stats psoc_ext_cp_stats_t; + +/** + * typedef pdev_ext_cp_stats_t - Definition of pdev cp stats pointer + * Define pdev_stats from external umac/cp_stats component point to this type + */ +typedef struct pdev_mc_cp_stats pdev_ext_cp_stats_t; + +/** + * typedef vdev_ext_cp_stats_t - Definition of vdev cp stats pointer + * Define vdev_stats from external umac/cp_stats component point to this type + */ +typedef struct vdev_mc_cp_stats vdev_ext_cp_stats_t; + +/** + * typedef peer_ext_cp_stats_t - Definition of peer cp stats pointer + * Define peer_stats from external umac/cp_stats component point to this type + */ +typedef struct peer_mc_cp_stats peer_ext_cp_stats_t; + +/** + * typedef peer_ext_adv_cp_stats_t - Definition of peer adv cp stats pointer + * Define peer_adv_stats from external umac/cp_stats component point to this + * type + */ +typedef struct peer_adv_mc_cp_stats peer_ext_adv_cp_stats_t; + +#endif /* __WLAN_EXT_CP_STATS_TYPE_H__ */ +