Kaynağa Gözat

qcacld-3.0: move wlan_cfg80211_mc_cp_stats.h file from cmn to qcacld

Currently wlan_cfg80211_mc_cp_stats.h file is present at
qca-wifi-host-cmn/cmn/os_if/linux/cp_stats/inc.
With this change, move file to 	qcacld-3.0/os_if/cp_stats/inc
as this file contain MCC specific code.

Change-Id: Ia531094fb15ae86f5afab2b9c3bdde197feaac6c
CRs-Fixed: 3108266
Divyajyothi Goparaju 3 yıl önce
ebeveyn
işleme
df1aa31d4b
2 değiştirilmiş dosya ile 169 ekleme ve 0 silme
  1. 2 0
      Kbuild
  2. 167 0
      os_if/cp_stats/inc/wlan_cfg80211_mc_cp_stats.h

+ 2 - 0
Kbuild

@@ -2272,6 +2272,7 @@ CP_STATS_OS_IF_INC              := -I$(WLAN_COMMON_INC)/os_if/linux/cp_stats/inc
 CP_STATS_TGT_INC                := -I$(WLAN_COMMON_INC)/target_if/cp_stats/inc
 CP_STATS_DISPATCHER_INC         := -I$(WLAN_COMMON_INC)/umac/cp_stats/dispatcher/inc
 CP_MC_STATS_COMPONENT_INC       := -I$(WLAN_ROOT)/components/cp_stats/dispatcher/inc
+CP_STATS_CFG80211_OS_IF_INC     := -I$(WLAN_ROOT)/os_if/cp_stats/inc
 
 ifeq ($(CONFIG_CP_STATS), y)
 CP_STATS_OBJS := $(CP_MC_STATS_COMPONENT_SRC)/wlan_cp_stats_mc_tgt_api.o	\
@@ -2831,6 +2832,7 @@ INCS +=		$(CP_STATS_OS_IF_INC)
 INCS +=		$(CP_STATS_TGT_INC)
 INCS +=		$(CP_STATS_DISPATCHER_INC)
 INCS +=		$(CP_MC_STATS_COMPONENT_INC)
+INCS +=		$(CP_STATS_CFG80211_OS_IF_INC)
 ################ Dynamic ACS ####################
 INCS +=		$(DCS_TGT_IF_INC)
 INCS +=		$(DCS_DISP_INC)

+ 167 - 0
os_if/cp_stats/inc/wlan_cfg80211_mc_cp_stats.h

@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
+ *
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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_cfg80211_mc_cp_stats.h
+ *
+ * This Header file provide declaration for cfg80211 command handler API
+ * registered cp stats and specific with ic
+ */
+
+#ifndef __WLAN_CFG80211_MC_CP_STATS_H__
+#define __WLAN_CFG80211_MC_CP_STATS_H__
+
+#ifdef QCA_SUPPORT_CP_STATS
+
+/* forward declaration */
+struct wiphy;
+struct wlan_objmgr_psoc;
+
+/**
+ * wlan_cfg80211_mc_cp_stats_get_wakelock_stats() - API to request wake lock
+ * stats. Stats are returned to user space via vender event
+ * @psoc:    Pointer to psoc
+ * @wiphy:   wiphy pointer
+ *
+ * Return: 0 on success, negative value on failure
+ */
+int wlan_cfg80211_mc_cp_stats_get_wakelock_stats(struct wlan_objmgr_psoc *psoc,
+						 struct wiphy *wiphy);
+
+/**
+ * wlan_cfg80211_mc_cp_stats_get_tx_power() - API to fetch tx power
+ * @vdev:    Pointer to vdev
+ * @dbm:     Pointer to TX power in dbm
+ *
+ * Return: 0 on success, negative value on failure
+ */
+int wlan_cfg80211_mc_cp_stats_get_tx_power(struct wlan_objmgr_vdev *vdev,
+					   int *dbm);
+#ifdef WLAN_FEATURE_MIB_STATS
+/**
+ * wlan_cfg80211_mc_cp_stats_get_mib_stats() - API to get mib stats
+ * statistics from firmware
+ * @vdev:    Pointer to vdev
+ * @errno:   error type in case of failure
+ *
+ * Callers of this API must call wlan_cfg80211_mc_cp_stats_free_stats_event
+ * API.
+ * Return: stats buffer on success, Null on failure
+ */
+struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_mib_stats(struct wlan_objmgr_vdev *vdev,
+					int *errno);
+#endif
+
+/**
+ * wlan_cfg80211_mc_cp_stats_get_station_stats() - API to get station
+ * statistics to firmware
+ * @vdev:    Pointer to vdev
+ * @errno:   error type in case of failure
+ *
+ * Call of this API must call wlan_cfg80211_mc_cp_stats_free_stats_event
+ * API when done with information provided by info.
+ * Return: stats buffer on success, Null on failure
+ */
+struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
+					    int *errno);
+
+/**
+ * wlan_cfg80211_mc_cp_stats_free_stats_event() - API to release station
+ * statistics buffer
+ * @vdev:    Pointer to vdev
+ * @info:    pointer to object to populate with station stats
+ *
+ * Return: None
+ */
+void wlan_cfg80211_mc_cp_stats_free_stats_event(struct stats_event *info);
+
+/**
+ * wlan_cfg80211_mc_cp_stats_get_peer_rssi() - API to fetch peer rssi
+ * @vdev:    Pointer to vdev
+ * @macaddress: mac address
+ * @errno:   error type in case of failure
+ *
+ * Call of this API must call wlan_cfg80211_mc_cp_stats_free_stats_event
+ * API when done with information provided by rssi_info.
+ * Return: stats buffer on success, Null on failure
+ */
+struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_peer_rssi(struct wlan_objmgr_vdev *vdev,
+					uint8_t *macaddress, int *errno);
+
+/**
+ * wlan_cfg80211_mc_cp_stats_get_peer_stats() - API to get peer
+ * statistics from firmware
+ * @vdev:    Pointer to vdev
+ * @mac_addr: mac address
+ * @errno:   error type in case of failure
+ *
+ * Call of this API must call wlan_cfg80211_mc_cp_stats_free_stats_event
+ * API when done with information provided by info.
+ * Return: stats buffer on success, Null on failure
+ */
+struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_peer_stats(struct wlan_objmgr_vdev *vdev,
+					 const uint8_t *mac_addr,
+					 int *errno);
+#else
+static inline int wlan_cfg80211_mc_cp_stats_get_tx_power(
+				struct wlan_objmgr_vdev *vdev,
+				int *dbm)
+{
+	return 0;
+}
+
+static inline int wlan_cfg80211_mc_cp_stats_get_wakelock_stats(
+				struct wlan_objmgr_psoc *psoc,
+				struct wiphy *wiphy)
+{
+	return 0;
+}
+
+static inline struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_peer_rssi(struct wlan_objmgr_vdev *vdev,
+					uint8_t *macaddress, int *errno)
+{
+	return NULL;
+}
+
+static inline void wlan_cfg80211_mc_cp_stats_free_stats_event(
+			struct stats_event *info)
+{}
+
+static inline struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_station_stats(struct wlan_objmgr_vdev *vdev,
+					    int *errno)
+{
+	return NULL;
+}
+
+static inline struct stats_event *
+wlan_cfg80211_mc_cp_stats_get_peer_stats(struct wlan_objmgr_vdev *vdev,
+					 const uint8_t *mac_addr,
+					 int *errno)
+{
+	return NULL;
+}
+#endif /* QCA_SUPPORT_CP_STATS */
+#endif /* __WLAN_CFG80211_MC_CP_STATS_H__ */