|
@@ -0,0 +1,74 @@
|
|
|
+/*
|
|
|
+ * 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: target_if_cp_stats.c
|
|
|
+ *
|
|
|
+ * This file provide definition for APIs registered through lmac Tx Ops
|
|
|
+ */
|
|
|
+
|
|
|
+#include <qdf_mem.h>
|
|
|
+#include <qdf_status.h>
|
|
|
+#include <target_if_cp_stats.h>
|
|
|
+#include <wmi_unified_priv.h>
|
|
|
+#include <wmi_unified_param.h>
|
|
|
+#include <target_if.h>
|
|
|
+#include <wlan_tgt_def_config.h>
|
|
|
+#include <wmi_unified_api.h>
|
|
|
+#include <wlan_osif_priv.h>
|
|
|
+#include <target_if.h>
|
|
|
+
|
|
|
+static QDF_STATUS
|
|
|
+target_if_cp_stats_register_event_handler(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ cp_stats_err("PSOC is NULL!");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+static QDF_STATUS
|
|
|
+target_if_cp_stats_unregister_event_handler(struct wlan_objmgr_psoc *psoc)
|
|
|
+{
|
|
|
+ if (!psoc) {
|
|
|
+ cp_stats_err("PSOC is NULL!");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|
|
|
+
|
|
|
+QDF_STATUS
|
|
|
+target_if_cp_stats_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
|
|
+{
|
|
|
+ struct wlan_lmac_if_cp_stats_tx_ops *cp_stats_tx_ops;
|
|
|
+
|
|
|
+ if (!tx_ops) {
|
|
|
+ cp_stats_err("lmac tx ops is NULL!");
|
|
|
+ return QDF_STATUS_E_INVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ cp_stats_tx_ops->cp_stats_attach =
|
|
|
+ target_if_cp_stats_register_event_handler;
|
|
|
+ cp_stats_tx_ops->cp_stats_detach =
|
|
|
+ target_if_cp_stats_unregister_event_handler;
|
|
|
+
|
|
|
+ return QDF_STATUS_SUCCESS;
|
|
|
+}
|