qcacmn: Add support to configure buffer size from kbuild
Add support to configure logging buffer size from
per-OEM kbuild based on memory requirement.
Change-Id: Ia91d79e5e738b1c9787015de101c3f67ccde46aa
CRs-Fixed: 2253438
diff --git a/hif/src/ce/ce_internal.h b/hif/src/ce/ce_internal.h
index ad14744..1a4557a 100644
--- a/hif/src/ce/ce_internal.h
+++ b/hif/src/ce/ce_internal.h
@@ -516,7 +516,10 @@
* for defined here
*/
#if HIF_CE_DEBUG_DATA_BUF
+
+#ifndef HIF_CE_HISTORY_MAX
#define HIF_CE_HISTORY_MAX 512
+#endif
#define CE_DEBUG_MAX_DATA_BUF_SIZE 64
/**
diff --git a/htc/htc_internal.h b/htc/htc_internal.h
index ba0ffa2..068777e 100644
--- a/htc/htc_internal.h
+++ b/htc/htc_internal.h
@@ -78,7 +78,9 @@
#define HTC_SERVICE_TX_PACKET_TAG HTC_TX_PACKET_TAG_INTERNAL
+#ifndef HTC_CREDIT_HISTORY_MAX
#define HTC_CREDIT_HISTORY_MAX 1024
+#endif
#define HTC_IS_EPPING_ENABLED(_x) ((_x) == QDF_GLOBAL_EPPING_MODE)
diff --git a/qdf/inc/qdf_trace.h b/qdf/inc/qdf_trace.h
index 65ad828..1998a1f 100644
--- a/qdf/inc/qdf_trace.h
+++ b/qdf/inc/qdf_trace.h
@@ -86,8 +86,11 @@
/* Preprocessor definitions and constants */
#define ASSERT_BUFFER_SIZE (512)
-#define QDF_TRACE_DEFAULT_PDEV_ID 0xff
+#ifndef MAX_QDF_TRACE_RECORDS
#define MAX_QDF_TRACE_RECORDS 4000
+#endif
+
+#define QDF_TRACE_DEFAULT_PDEV_ID 0xff
#define INVALID_QDF_TRACE_ADDR 0xffffffff
#define DEFAULT_QDF_TRACE_DUMP_COUNT 0
@@ -154,8 +157,10 @@
#define CASE_RETURN_STRING(str) case ((str)): return (uint8_t *)(# str);
-
+#ifndef MAX_QDF_DP_TRACE_RECORDS
#define MAX_QDF_DP_TRACE_RECORDS 2000
+#endif
+
#define QDF_DP_TRACE_RECORD_SIZE 40
#define INVALID_QDF_DP_TRACE_ADDR 0xffffffff
#define QDF_DP_TRACE_VERBOSITY_HIGH 3
diff --git a/utils/logging/inc/wlan_roam_debug.h b/utils/logging/inc/wlan_roam_debug.h
index 35b9c3a..f38d67a 100644
--- a/utils/logging/inc/wlan_roam_debug.h
+++ b/utils/logging/inc/wlan_roam_debug.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-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
@@ -44,7 +44,10 @@
uint32_t arg2;
};
+#ifndef WLAN_ROAM_DEBUG_MAX_REC
#define WLAN_ROAM_DEBUG_MAX_REC 256
+#endif
+
/**
* struct wlan_roam_debug_info - Buffer to store the wma debug records
* @index: index of the most recent entry in the circular buffer
diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h
index 8c23376..ff2235b 100644
--- a/wmi/inc/wmi_unified_priv.h
+++ b/wmi/inc/wmi_unified_priv.h
@@ -55,10 +55,16 @@
#ifdef WMI_INTERFACE_EVENT_LOGGING
+#ifndef WMI_EVENT_DEBUG_MAX_ENTRY
#define WMI_EVENT_DEBUG_MAX_ENTRY (1024)
+#endif
+
#define WMI_EVENT_DEBUG_ENTRY_MAX_LENGTH (16)
+
/* wmi_mgmt commands */
+#ifndef WMI_MGMT_EVENT_DEBUG_MAX_ENTRY
#define WMI_MGMT_EVENT_DEBUG_MAX_ENTRY (256)
+#endif
/**
* struct wmi_command_debug - WMI command log buffer data type