Quellcode durchsuchen

qcacmn: Define CDP ops and DP context for SAWF

Adding SAWF ops for CDP and adding SAWF context
to DP peeer.

Add calls to initialize DP SAWF peer context
when DP peer is created.

Change-Id: I7efb89ae18a28c8b070ad9fcee7754553caa7ff3
CRs-Fixed: 3118160
Vivek vor 3 Jahren
Ursprung
Commit
afc1a46abd
1 geänderte Dateien mit 75 neuen und 0 gelöschten Zeilen
  1. 75 0
      dp/inc/cdp_txrx_sawf.h

+ 75 - 0
dp/inc/cdp_txrx_sawf.h

@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+
+#ifndef _CDP_TXRX_SAWF_H_
+#define _CDP_TXRX_SAWF_H_
+
+static inline QDF_STATUS
+cdp_sawf_peer_svcid_map(ol_txrx_soc_handle soc,
+			uint8_t *mac, uint8_t svc_id)
+{
+	if (!soc || !soc->ops) {
+		dp_cdp_debug("Invalid Instance");
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->sawf_ops ||
+	    !soc->ops->sawf_ops->sawf_def_queues_map_req) {
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	return soc->ops->sawf_ops->sawf_def_queues_map_req(soc, mac, svc_id);
+}
+
+static inline QDF_STATUS
+cdp_sawf_peer_unmap(ol_txrx_soc_handle soc,
+		    uint8_t *mac, uint8_t svc_id)
+{
+	if (!soc || !soc->ops) {
+		dp_cdp_debug("Invalid Instance");
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->sawf_ops ||
+	    !soc->ops->sawf_ops->sawf_def_queues_unmap_req) {
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	return soc->ops->sawf_ops->sawf_def_queues_unmap_req(soc, mac, svc_id);
+}
+
+static inline QDF_STATUS
+cdp_sawf_peer_get_map_conf(ol_txrx_soc_handle soc,
+			   uint8_t *mac)
+{
+	if (!soc || !soc->ops) {
+		dp_cdp_debug("Invalid Instance");
+		QDF_BUG(0);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	if (!soc->ops->sawf_ops ||
+	    !soc->ops->sawf_ops->sawf_def_queues_get_map_report) {
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	return soc->ops->sawf_ops->sawf_def_queues_get_map_report(soc, mac);
+}
+#endif /* _CDP_TXRX_SAWF_H_ */