qca-wifi: Move into correct compile flags.
Move the code dependent on DIRECT_BUF_RX into necessary macros
to avoid compilation failure when WIFI_3_0 configs are disabled.
CRs-Fixed: 2445655
Change-Id: I61001f6d6a1d33bd9bd92b795c50813f1e88f87f
diff --git a/target_if/cfr/src/target_if_cfr_8074v2.c b/target_if/cfr/src/target_if_cfr_8074v2.c
index e0db63f..86eda2b 100644
--- a/target_if/cfr/src/target_if_cfr_8074v2.c
+++ b/target_if/cfr/src/target_if_cfr_8074v2.c
@@ -32,6 +32,7 @@
#include <target_if_direct_buf_rx_api.h>
#endif
+#ifdef DIRECT_BUF_RX_ENABLE
static u_int32_t end_magic = 0xBEAFDEAD;
int dump_lut(struct wlan_objmgr_pdev *pdev)
@@ -55,7 +56,7 @@
return 0;
}
-#ifdef DIRECT_BUF_RX_ENABLE
+
void dump_dma_hdr(struct whal_cfir_dma_hdr *dma_hdr, int error)
{
if (!error) {
@@ -276,7 +277,6 @@
return true;
}
-#endif
void dump_cfr_peer_tx_event(wmi_cfr_peer_tx_event_param *event)
{
@@ -472,6 +472,13 @@
return 0;
}
+#else
+static int
+target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
+{
+ return 0;
+}
+#endif
int
target_if_register_tx_completion_event_handler(struct wlan_objmgr_psoc *psoc)
@@ -601,11 +608,13 @@
if (!pdev_cfrobj)
return -EINVAL;
+#if DIRECT_BUF_RX_ENABLE
status = target_if_register_to_dbr(pdev);
if (QDF_STATUS_SUCCESS != status) {
cfr_err("Failed to register with dbr");
return -EINVAL;
}
+#endif
status = target_if_register_tx_completion_event_handler(psoc);
if (QDF_STATUS_SUCCESS != status) {