summaryrefslogtreecommitdiff
path: root/qdf/linux/src
diff options
context:
space:
mode:
authorPadma, Santhosh Kumar <skpadma@codeaurora.org>2016-08-10 19:16:08 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-09-19 07:39:29 -0700
commitabedfcaf35577a902509e2b124c9d9f9156ca609 (patch)
tree961af904c2ffce48faf09cd84f969782493c7843 /qdf/linux/src
parent879d7141bcae7f05139067ad7d925503f1577c9f (diff)
qcacmn: Add diag events for debugging
qcacld-2.0 to qcacmn propagation Currently there are no diag events to debug auth, assoc timeouts and memory failure. Add such diag events which can be useful during failures. Change-Id: Iec4c2a9946fbef388959fdc796273944d3be8003 CRs-Fixed: 954888
Diffstat (limited to 'qdf/linux/src')
-rw-r--r--qdf/linux/src/qdf_mem.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/qdf/linux/src/qdf_mem.c b/qdf/linux/src/qdf_mem.c
index 4f59f7a7e4ff..34b8f1399556 100644
--- a/qdf/linux/src/qdf_mem.c
+++ b/qdf/linux/src/qdf_mem.c
@@ -37,6 +37,12 @@
#include "qdf_module.h"
#include <qdf_trace.h>
+#ifdef CONFIG_MCL
+#include <host_diag_core_event.h>
+#else
+#define host_log_low_resource_failure(code) do {} while (0)
+#endif
+
#if defined(CONFIG_CNSS)
#include <net/cnss.h>
#endif
@@ -442,6 +448,7 @@ void *qdf_mem_malloc_debug(size_t size,
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"%s: called with invalid arg; passed in %zu !!!",
__func__, size);
+ host_log_low_resource_failure(WIFI_EVENT_MEMORY_FAILURE);
return NULL;
}
@@ -499,6 +506,10 @@ void *qdf_mem_malloc_debug(size_t size,
mem_ptr = (void *)(mem_struct + 1);
}
+
+ if (!mem_ptr)
+ host_log_low_resource_failure(WIFI_EVENT_MEMORY_FAILURE);
+
return mem_ptr;
}
EXPORT_SYMBOL(qdf_mem_malloc_debug);