|
@@ -1,5 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
|
|
+ * Copyright (c) 2021 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
|
|
@@ -35,9 +36,13 @@
|
|
|
#include <linux/string.h>
|
|
|
#include <qdf_list.h>
|
|
|
|
|
|
-#if IS_ENABLED(CONFIG_WCNSS_MEM_PRE_ALLOC)
|
|
|
+#ifdef CNSS_MEM_PRE_ALLOC
|
|
|
+#ifdef CONFIG_CNSS_OUT_OF_TREE
|
|
|
+#include "cnss_prealloc.h"
|
|
|
+#else
|
|
|
#include <net/cnss_prealloc.h>
|
|
|
#endif
|
|
|
+#endif
|
|
|
|
|
|
#if defined(MEMORY_DEBUG) || defined(NBUF_MEMORY_DEBUG)
|
|
|
static bool mem_debug_disabled;
|
|
@@ -1380,7 +1385,7 @@ void __qdf_mempool_free(qdf_device_t osdev, __qdf_mempool_t pool, void *buf)
|
|
|
}
|
|
|
qdf_export_symbol(__qdf_mempool_free);
|
|
|
|
|
|
-#if IS_ENABLED(CONFIG_WCNSS_MEM_PRE_ALLOC)
|
|
|
+#ifdef CNSS_MEM_PRE_ALLOC
|
|
|
static bool qdf_might_be_prealloc(void *ptr)
|
|
|
{
|
|
|
if (ksize(ptr) > WCNSS_PRE_ALLOC_GET_THRESHOLD)
|
|
@@ -1434,7 +1439,7 @@ static inline bool qdf_mem_prealloc_put(void *ptr)
|
|
|
{
|
|
|
return false;
|
|
|
}
|
|
|
-#endif /* CONFIG_WCNSS_MEM_PRE_ALLOC */
|
|
|
+#endif /* CNSS_MEM_PRE_ALLOC */
|
|
|
|
|
|
/* External Function implementation */
|
|
|
#ifdef MEMORY_DEBUG
|