]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: ath12k: Move Copy Engine configuration to Wi-Fi 7 specific file
authorKiran Venkatappa <quic_kiranv@quicinc.com>
Tue, 12 Aug 2025 17:09:28 +0000 (22:39 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Wed, 20 Aug 2025 21:39:03 +0000 (14:39 -0700)
Relocate Copy Engine (CE) assignment logic from ce.c to a new ce_wifi7.c
file to consolidate Wi-Fi 7 specific CE configuration in one place.
Move CE service map and target configuration from hw.c to ce_wifi7.c.

This reorganization improves code clarity and modularity by isolating
device-specific logic. It is part of a broader effort to separate
common and hardware-specific code into distinct modules.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Kiran Venkatappa <quic_kiranv@quicinc.com>
Reviewed-by: Vasanthakumar Thiagarajan <vasanthakumar.thiagarajan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20250812-ath12k-mod-v1-2-8c9b0eb9335d@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/Makefile
drivers/net/wireless/ath/ath12k/ce.c
drivers/net/wireless/ath/ath12k/ce.h
drivers/net/wireless/ath/ath12k/ce_wifi7.c [new file with mode: 0644]
drivers/net/wireless/ath/ath12k/ce_wifi7.h [new file with mode: 0644]
drivers/net/wireless/ath/ath12k/hw.c

index 1a26e00627b0a3d631ddfa62ef70a9b29b426a3f..e4776887c939ab0d11307e8f616f3728ed39ce71 100644 (file)
@@ -14,6 +14,7 @@ ath12k-y += core.o \
            dp_rx.o \
            debug.o \
            ce.o \
+           ce_wifi7.o \
            peer.o \
            dbring.o \
            hw.o \
index f93a419abf65ec6e9b31e22c78c8c2cdd7bdbc76..6e380b773f05627ddc76541af845f4969a0f206a 100644 (file)
@@ -8,307 +8,6 @@
 #include "debug.h"
 #include "hif.h"
 
-const struct ce_attr ath12k_host_ce_config_qcn9274[] = {
-       /* CE0: host->target HTC control and raw streams */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 16,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE1: target->host HTT + HTC control */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-
-       /* CE2: target->host WMI */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 128,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-
-       /* CE3: host->target WMI (mac0) */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 32,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE4: host->target HTT */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 2048,
-               .src_sz_max = 256,
-               .dest_nentries = 0,
-       },
-
-       /* CE5: target->host pktlog */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler,
-       },
-
-       /* CE6: target autonomous hif_memcpy */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE7: host->target WMI (mac1) */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 32,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE8: target autonomous hif_memcpy */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE9: MHI */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE10: MHI */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE11: MHI */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE12: CV Prefetch */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE13: CV Prefetch */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE14: target->host dbg log */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-
-       /* CE15: reserved for future use */
-       {
-               .flags = (CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-};
-
-const struct ce_attr ath12k_host_ce_config_wcn7850[] = {
-       /* CE0: host->target HTC control and raw streams */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 16,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE1: target->host HTT + HTC control */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-
-       /* CE2: target->host WMI */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 64,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-
-       /* CE3: host->target WMI (mac0) */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 32,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE4: host->target HTT */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 2048,
-               .src_sz_max = 256,
-               .dest_nentries = 0,
-       },
-
-       /* CE5: target->host pktlog */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE6: target autonomous hif_memcpy */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-       /* CE7: host->target WMI (mac1) */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-
-       /* CE8: target autonomous hif_memcpy */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-
-};
-
-const struct ce_attr ath12k_host_ce_config_ipq5332[] = {
-       /* CE0: host->target HTC control and raw streams */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 16,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-       /* CE1: target->host HTT + HTC control */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-       /* CE2: target->host WMI */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 128,
-               .recv_cb = ath12k_htc_rx_completion_handler,
-       },
-       /* CE3: host->target WMI */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 32,
-               .src_sz_max = 2048,
-               .dest_nentries = 0,
-       },
-       /* CE4: host->target HTT */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 2048,
-               .src_sz_max = 256,
-               .dest_nentries = 0,
-       },
-       /* CE5: target -> host PKTLOG */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 512,
-               .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler,
-       },
-       /* CE6: Target autonomous HIF_memcpy */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-       /* CE7: CV Prefetch */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-       /* CE8: Target HIF memcpy (Generic HIF memcypy) */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-       /* CE9: WMI logging/CFR/Spectral/Radar */
-       {
-               .flags = CE_ATTR_FLAGS,
-               .src_nentries = 0,
-               .src_sz_max = 2048,
-               .dest_nentries = 128,
-       },
-       /* CE10: Unused */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-       /* CE11: Unused */
-       {
-               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
-               .src_nentries = 0,
-               .src_sz_max = 0,
-               .dest_nentries = 0,
-       },
-};
-
 static int ath12k_ce_rx_buf_enqueue_pipe(struct ath12k_ce_pipe *pipe,
                                         struct sk_buff *skb, dma_addr_t paddr)
 {
index 57f75899ee03d63479698011fc081936677f8698..f44ce2244bcfdb60d505d51096ed70b3965952c9 100644 (file)
@@ -173,10 +173,6 @@ struct ath12k_ce {
        struct ath12k_hp_update_timer hp_timer[CE_COUNT_MAX];
 };
 
-extern const struct ce_attr ath12k_host_ce_config_qcn9274[];
-extern const struct ce_attr ath12k_host_ce_config_wcn7850[];
-extern const struct ce_attr ath12k_host_ce_config_ipq5332[];
-
 void ath12k_ce_cleanup_pipes(struct ath12k_base *ab);
 void ath12k_ce_rx_replenish_retry(struct timer_list *t);
 void ath12k_ce_per_engine_service(struct ath12k_base *ab, u16 ce_id);
diff --git a/drivers/net/wireless/ath/ath12k/ce_wifi7.c b/drivers/net/wireless/ath/ath12k/ce_wifi7.c
new file mode 100644 (file)
index 0000000..cf27259
--- /dev/null
@@ -0,0 +1,970 @@
+// SPDX-License-Identifier: BSD-3-Clause-Clear
+/*
+ * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#include <linux/types.h>
+#include <linux/bitops.h>
+#include <linux/bitfield.h>
+
+#include "core.h"
+#include "ce.h"
+#include "ce_wifi7.h"
+#include "dp_rx.h"
+
+/* Copy Engine (CE) configs for QCN9274 */
+/* Target firmware's Copy Engine configuration. */
+const struct ce_pipe_config ath12k_target_ce_config_wlan_qcn9274[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .pipenum = __cpu_to_le32(0),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE1: target->host HTT + HTC control */
+       {
+               .pipenum = __cpu_to_le32(1),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE2: target->host WMI */
+       {
+               .pipenum = __cpu_to_le32(2),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE3: host->target WMI (mac0) */
+       {
+               .pipenum = __cpu_to_le32(3),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .pipenum = __cpu_to_le32(4),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(256),
+               .nbytes_max = __cpu_to_le32(256),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE5: target->host Pktlog */
+       {
+               .pipenum = __cpu_to_le32(5),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE6: Reserved for target autonomous hif_memcpy */
+       {
+               .pipenum = __cpu_to_le32(6),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE7: host->target WMI (mac1) */
+       {
+               .pipenum = __cpu_to_le32(7),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE8: Reserved for target autonomous hif_memcpy */
+       {
+               .pipenum = __cpu_to_le32(8),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE9, 10 and 11: Reserved for MHI */
+
+       /* CE12: Target CV prefetch */
+       {
+               .pipenum = __cpu_to_le32(12),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE13: Target CV prefetch */
+       {
+               .pipenum = __cpu_to_le32(13),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE14: WMI logging/CFR/Spectral/Radar */
+       {
+               .pipenum = __cpu_to_le32(14),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE15: Reserved */
+};
+
+/* Map from service/endpoint to Copy Engine.
+ * This table is derived from the CE_PCI TABLE, above.
+ * It is passed to the Target at startup for use by firmware.
+ * Pipe direction:
+ *      PIPEDIR_OUT = UL = host -> target
+ *      PIPEDIR_IN = DL = target -> host
+ */
+const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_qcn9274[] = {
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(0),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(0),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(4),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(7),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_PKT_LOG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(5),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_DIAG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(14),
+       },
+
+       /* (Additions here) */
+
+       { /* must be last */
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+       },
+};
+
+const struct ce_attr ath12k_host_ce_config_qcn9274[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 16,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE1: target->host HTT + HTC control */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE2: target->host WMI */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 128,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE3: host->target WMI (mac0) */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 32,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 2048,
+               .src_sz_max = 256,
+               .dest_nentries = 0,
+       },
+
+       /* CE5: target->host pktlog */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler,
+       },
+
+       /* CE6: target autonomous hif_memcpy */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE7: host->target WMI (mac1) */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 32,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE8: target autonomous hif_memcpy */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE9: MHI */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE10: MHI */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE11: MHI */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE12: CV Prefetch */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE13: CV Prefetch */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE14: target->host dbg log */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE15: reserved for future use */
+       {
+               .flags = (CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+};
+
+/* Copy Engine (CE) configs for WCN7850 */
+/* Target firmware's Copy Engine configuration. */
+const struct ce_pipe_config ath12k_target_ce_config_wlan_wcn7850[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .pipenum = __cpu_to_le32(0),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE1: target->host HTT + HTC control */
+       {
+               .pipenum = __cpu_to_le32(1),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE2: target->host WMI */
+       {
+               .pipenum = __cpu_to_le32(2),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE3: host->target WMI */
+       {
+               .pipenum = __cpu_to_le32(3),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .pipenum = __cpu_to_le32(4),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(256),
+               .nbytes_max = __cpu_to_le32(256),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE5: target->host Pktlog */
+       {
+               .pipenum = __cpu_to_le32(5),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE6: Reserved for target autonomous hif_memcpy */
+       {
+               .pipenum = __cpu_to_le32(6),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE7 used only by Host */
+       {
+               .pipenum = __cpu_to_le32(7),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H),
+               .nentries = __cpu_to_le32(0),
+               .nbytes_max = __cpu_to_le32(0),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE8 target->host used only by IPA */
+       {
+               .pipenum = __cpu_to_le32(8),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+       /* CE 9, 10, 11 are used by MHI driver */
+};
+
+const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_wcn7850[] = {
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(0),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(4),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+
+       /* (Additions here) */
+
+       { /* must be last */
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+       },
+};
+
+const struct ce_attr ath12k_host_ce_config_wcn7850[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 16,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE1: target->host HTT + HTC control */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE2: target->host WMI */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 64,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE3: host->target WMI (mac0) */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 32,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 2048,
+               .src_sz_max = 256,
+               .dest_nentries = 0,
+       },
+
+       /* CE5: target->host pktlog */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE6: target autonomous hif_memcpy */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE7: host->target WMI (mac1) */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE8: target autonomous hif_memcpy */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+};
+
+/* Copy Engine (CE) configs for IPQ5332 */
+/* Target firmware's Copy Engine configuration. */
+const struct ce_pipe_config ath12k_target_ce_config_wlan_ipq5332[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .pipenum = __cpu_to_le32(0),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE1: target->host HTT */
+       {
+               .pipenum = __cpu_to_le32(1),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE2: target->host WMI  + HTC control */
+       {
+               .pipenum = __cpu_to_le32(2),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE3: host->target WMI */
+       {
+               .pipenum = __cpu_to_le32(3),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .pipenum = __cpu_to_le32(4),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(256),
+               .nbytes_max = __cpu_to_le32(256),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE5: Target -> host PKTLOG */
+       {
+               .pipenum = __cpu_to_le32(5),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE6: Reserved for target autonomous HIF_memcpy */
+       {
+               .pipenum = __cpu_to_le32(6),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE7: Reserved for CV Prefetch */
+       {
+               .pipenum = __cpu_to_le32(7),
+               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE8: Reserved for target generic HIF memcpy */
+       {
+               .pipenum = __cpu_to_le32(8),
+               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(16384),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE9: WMI logging/CFR/Spectral/Radar/ */
+       {
+               .pipenum = __cpu_to_le32(9),
+               .pipedir = __cpu_to_le32(PIPEDIR_IN),
+               .nentries = __cpu_to_le32(32),
+               .nbytes_max = __cpu_to_le32(2048),
+               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
+               .reserved = __cpu_to_le32(0),
+       },
+
+       /* CE10: Unused TBD */
+       {
+               .pipenum = __cpu_to_le32(10),
+               .pipedir = __cpu_to_le32(PIPEDIR_NONE),
+               .nentries = __cpu_to_le32(0),
+               .nbytes_max = __cpu_to_le32(0),
+               .flags = __cpu_to_le32(0),
+               .reserved = __cpu_to_le32(0),
+       },
+       /* CE11: Unused TBD */
+       {
+               .pipenum = __cpu_to_le32(11),
+               .pipedir = __cpu_to_le32(PIPEDIR_NONE),
+               .nentries = __cpu_to_le32(0),
+               .nbytes_max = __cpu_to_le32(0),
+               .flags = __cpu_to_le32(0),
+               .reserved = __cpu_to_le32(0),
+       },
+};
+
+const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_ipq5332[] = {
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(3),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(2),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(0),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(0),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_OUT),
+               __cpu_to_le32(4),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(1),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_PKT_LOG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(5),
+       },
+       {
+               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_DIAG),
+               __cpu_to_le32(PIPEDIR_IN),
+               __cpu_to_le32(9),
+       },
+       /* (Additions here) */
+
+       { /* must be last */
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+               __cpu_to_le32(0),
+       },
+};
+
+const struct ce_attr ath12k_host_ce_config_ipq5332[] = {
+       /* CE0: host->target HTC control and raw streams */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 16,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE1: target->host HTT + HTC control */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE2: target->host WMI */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 128,
+               .recv_cb = ath12k_htc_rx_completion_handler,
+       },
+
+       /* CE3: host->target WMI */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 32,
+               .src_sz_max = 2048,
+               .dest_nentries = 0,
+       },
+
+       /* CE4: host->target HTT */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 2048,
+               .src_sz_max = 256,
+               .dest_nentries = 0,
+       },
+
+       /* CE5: target -> host PKTLOG */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 512,
+               .recv_cb = ath12k_dp_htt_htc_t2h_msg_handler,
+       },
+
+       /* CE6: Target autonomous HIF_memcpy */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE7: CV Prefetch */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE8: Target HIF memcpy (Generic HIF memcypy) */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE9: WMI logging/CFR/Spectral/Radar */
+       {
+               .flags = CE_ATTR_FLAGS,
+               .src_nentries = 0,
+               .src_sz_max = 2048,
+               .dest_nentries = 128,
+       },
+
+       /* CE10: Unused */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+
+       /* CE11: Unused */
+       {
+               .flags = CE_ATTR_FLAGS | CE_ATTR_DIS_INTR,
+               .src_nentries = 0,
+               .src_sz_max = 0,
+               .dest_nentries = 0,
+       },
+};
diff --git a/drivers/net/wireless/ath/ath12k/ce_wifi7.h b/drivers/net/wireless/ath/ath12k/ce_wifi7.h
new file mode 100644 (file)
index 0000000..1e211e8
--- /dev/null
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: BSD-3-Clause-Clear */
+/*
+ * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+#ifndef ATH12K_WIFI7_CE_H
+#define ATH12K_WIFI7_CE_H
+
+extern const struct ce_pipe_config ath12k_target_ce_config_wlan_qcn9274[];
+extern const struct ce_pipe_config ath12k_target_ce_config_wlan_wcn7850[];
+extern const struct ce_pipe_config ath12k_target_ce_config_wlan_ipq5332[];
+
+extern const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_qcn9274[];
+extern const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_wcn7850[];
+extern const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_ipq5332[];
+
+extern const struct ce_attr ath12k_host_ce_config_qcn9274[];
+extern const struct ce_attr ath12k_host_ce_config_wcn7850[];
+extern const struct ce_attr ath12k_host_ce_config_ipq5332[];
+
+#endif /* ATH12K_WIFI7_CE_H */
index 6791ae1d64e50feb96df9add0d8b5f2f76b425e4..dd60e27cc499648e4c6ec95d0a56ec06f4c7c6ae 100644 (file)
@@ -11,6 +11,7 @@
 #include "debug.h"
 #include "core.h"
 #include "ce.h"
+#include "ce_wifi7.h"
 #include "hw.h"
 #include "mhi.h"
 #include "dp_rx.h"
@@ -177,634 +178,6 @@ static const struct ath12k_hw_ops wcn7850_ops = {
 #define ATH12K_RX_MON_STATUS_RING_MASK_1 0x2
 #define ATH12K_RX_MON_STATUS_RING_MASK_2 0x4
 
-/* Target firmware's Copy Engine configuration. */
-static const struct ce_pipe_config ath12k_target_ce_config_wlan_qcn9274[] = {
-       /* CE0: host->target HTC control and raw streams */
-       {
-               .pipenum = __cpu_to_le32(0),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE1: target->host HTT + HTC control */
-       {
-               .pipenum = __cpu_to_le32(1),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE2: target->host WMI */
-       {
-               .pipenum = __cpu_to_le32(2),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE3: host->target WMI (mac0) */
-       {
-               .pipenum = __cpu_to_le32(3),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE4: host->target HTT */
-       {
-               .pipenum = __cpu_to_le32(4),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(256),
-               .nbytes_max = __cpu_to_le32(256),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE5: target->host Pktlog */
-       {
-               .pipenum = __cpu_to_le32(5),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE6: Reserved for target autonomous hif_memcpy */
-       {
-               .pipenum = __cpu_to_le32(6),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE7: host->target WMI (mac1) */
-       {
-               .pipenum = __cpu_to_le32(7),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE8: Reserved for target autonomous hif_memcpy */
-       {
-               .pipenum = __cpu_to_le32(8),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE9, 10 and 11: Reserved for MHI */
-
-       /* CE12: Target CV prefetch */
-       {
-               .pipenum = __cpu_to_le32(12),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE13: Target CV prefetch */
-       {
-               .pipenum = __cpu_to_le32(13),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE14: WMI logging/CFR/Spectral/Radar */
-       {
-               .pipenum = __cpu_to_le32(14),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE15: Reserved */
-};
-
-/* Target firmware's Copy Engine configuration. */
-static const struct ce_pipe_config ath12k_target_ce_config_wlan_wcn7850[] = {
-       /* CE0: host->target HTC control and raw streams */
-       {
-               .pipenum = __cpu_to_le32(0),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE1: target->host HTT + HTC control */
-       {
-               .pipenum = __cpu_to_le32(1),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE2: target->host WMI */
-       {
-               .pipenum = __cpu_to_le32(2),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE3: host->target WMI */
-       {
-               .pipenum = __cpu_to_le32(3),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE4: host->target HTT */
-       {
-               .pipenum = __cpu_to_le32(4),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(256),
-               .nbytes_max = __cpu_to_le32(256),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE5: target->host Pktlog */
-       {
-               .pipenum = __cpu_to_le32(5),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE6: Reserved for target autonomous hif_memcpy */
-       {
-               .pipenum = __cpu_to_le32(6),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE7 used only by Host */
-       {
-               .pipenum = __cpu_to_le32(7),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT_H2H),
-               .nentries = __cpu_to_le32(0),
-               .nbytes_max = __cpu_to_le32(0),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
-               .reserved = __cpu_to_le32(0),
-       },
-
-       /* CE8 target->host used only by IPA */
-       {
-               .pipenum = __cpu_to_le32(8),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* CE 9, 10, 11 are used by MHI driver */
-};
-
-/* Map from service/endpoint to Copy Engine.
- * This table is derived from the CE_PCI TABLE, above.
- * It is passed to the Target at startup for use by firmware.
- */
-static const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_qcn9274[] = {
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(0),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(0),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(4),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(7),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_MAC1),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_PKT_LOG),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(5),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_DIAG),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(14),
-       },
-
-       /* (Additions here) */
-
-       { /* must be last */
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-       },
-};
-
-static const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_wcn7850[] = {
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(0),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_OUT),     /* out = UL = host -> target */
-               __cpu_to_le32(4),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_IN),      /* in = DL = target -> host */
-               __cpu_to_le32(1),
-       },
-
-       /* (Additions here) */
-
-       { /* must be last */
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-       },
-};
-
-static const struct ce_pipe_config ath12k_target_ce_config_wlan_ipq5332[] = {
-       /* host->target HTC control and raw streams */
-       {
-               .pipenum = __cpu_to_le32(0),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* target->host HTT */
-       {
-               .pipenum = __cpu_to_le32(1),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* target->host WMI  + HTC control */
-       {
-               .pipenum = __cpu_to_le32(2),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* host->target WMI */
-       {
-               .pipenum = __cpu_to_le32(3),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* host->target HTT */
-       {
-               .pipenum = __cpu_to_le32(4),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(256),
-               .nbytes_max = __cpu_to_le32(256),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS | CE_ATTR_DIS_INTR),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* Target -> host PKTLOG */
-       {
-               .pipenum = __cpu_to_le32(5),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* Reserved for target autonomous HIF_memcpy */
-       {
-               .pipenum = __cpu_to_le32(6),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* CE7 Reserved for CV Prefetch */
-       {
-               .pipenum = __cpu_to_le32(7),
-               .pipedir = __cpu_to_le32(PIPEDIR_OUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* CE8 Reserved for target generic HIF memcpy */
-       {
-               .pipenum = __cpu_to_le32(8),
-               .pipedir = __cpu_to_le32(PIPEDIR_INOUT),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(16384),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* CE9 WMI logging/CFR/Spectral/Radar/ */
-       {
-               .pipenum = __cpu_to_le32(9),
-               .pipedir = __cpu_to_le32(PIPEDIR_IN),
-               .nentries = __cpu_to_le32(32),
-               .nbytes_max = __cpu_to_le32(2048),
-               .flags = __cpu_to_le32(CE_ATTR_FLAGS),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* Unused TBD */
-       {
-               .pipenum = __cpu_to_le32(10),
-               .pipedir = __cpu_to_le32(PIPEDIR_NONE),
-               .nentries = __cpu_to_le32(0),
-               .nbytes_max = __cpu_to_le32(0),
-               .flags = __cpu_to_le32(0),
-               .reserved = __cpu_to_le32(0),
-       },
-       /* Unused TBD */
-       {
-               .pipenum = __cpu_to_le32(11),
-               .pipedir = __cpu_to_le32(PIPEDIR_NONE),
-               .nentries = __cpu_to_le32(0),
-               .nbytes_max = __cpu_to_le32(0),
-               .flags = __cpu_to_le32(0),
-               .reserved = __cpu_to_le32(0),
-       },
-};
-
-static const struct service_to_pipe ath12k_target_service_to_ce_map_wlan_ipq5332[] = {
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VO),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BK),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_BE),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_DATA_VI),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(3),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(2),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(0),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_RSVD_CTRL),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(0),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_TEST_RAW_STREAMS),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_OUT),
-               __cpu_to_le32(4),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_HTT_DATA_MSG),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(1),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_PKT_LOG),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(5),
-       },
-       {
-               __cpu_to_le32(ATH12K_HTC_SVC_ID_WMI_CONTROL_DIAG),
-               __cpu_to_le32(PIPEDIR_IN),
-               __cpu_to_le32(9),
-       },
-       /* (Additions here) */
-
-       { /* must be last */
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-               __cpu_to_le32(0),
-       },
-};
-
 static const struct ath12k_hw_ring_mask ath12k_hw_ring_mask_qcn9274 = {
        .tx  = {
                ATH12K_TX_RING_MASK_0,