From 79ec3e999b7431d6ede5c7fd9e39e3cfe6fc4188 Mon Sep 17 00:00:00 2001 From: Nirav Shah Date: Fri, 1 Jun 2018 16:32:28 +0530 Subject: [PATCH] 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 --- hif/src/ce/ce_internal.h | 3 +++ htc/htc_internal.h | 2 ++ qdf/inc/qdf_trace.h | 9 +++++++-- utils/logging/inc/wlan_roam_debug.h | 5 ++++- wmi/inc/wmi_unified_priv.h | 6 ++++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/hif/src/ce/ce_internal.h b/hif/src/ce/ce_internal.h index ad147441f57b..1a4557a2481b 100644 --- a/hif/src/ce/ce_internal.h +++ b/hif/src/ce/ce_internal.h @@ -516,7 +516,10 @@ int hif_get_wake_ce_id(struct hif_softc *scn, uint8_t *ce_id); * 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 ba0ffa2e4099..068777e2053d 100644 --- a/htc/htc_internal.h +++ b/htc/htc_internal.h @@ -78,7 +78,9 @@ extern "C" { #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 65ad828bac05..1998a1faa535 100644 --- a/qdf/inc/qdf_trace.h +++ b/qdf/inc/qdf_trace.h @@ -86,8 +86,11 @@ typedef int (qdf_abstract_print)(void *priv, const char *fmt, ...); /* 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 @@ typedef struct s_qdf_trace_data { #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 35b9c3a63e43..f38d67a64e82 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 @@ struct wlan_roam_debug_rec { 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 8c233763807f..ff2235bc2208 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