浏览代码

qcacmn: Enable the minidump API based on Kernel Version

The minidump API msm_minidump_remove_region() was added to the
msm-kernel from version 4.19 so, to avoid compilation failures in
older kernel versions, enable the feature flag WLAN_QCOM_MINIDUMP
for kernel beginnig with 4.19 version.

Change-Id: Iba7a293fb9ca3e5ffe967e8d610251df8c2a3969
CRs-Fixed: 2901746
Aditya Kodukula 4 年之前
父节点
当前提交
45e98f35da
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. 11 2
      qdf/linux/src/i_qdf_trace.h

+ 11 - 2
qdf/linux/src/i_qdf_trace.h

@@ -26,13 +26,22 @@
 #if !defined(__I_QDF_TRACE_H)
 #define __I_QDF_TRACE_H
 
+/*
+ * The CONFIG_QCOM_MINIDUMP feature can only be used
+ * beginning with kernel version msm-4.19 since that is
+ * when msm_minidump_removerefion() was added.
+ */
+#if defined(CONFIG_QCOM_MINIDUMP) && \
+	(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
+#define WLAN_QCOM_MINIDUMP
+#endif
 /* older kernels have a bug in kallsyms, so ensure module.h is included */
 #include <linux/module.h>
 #include <linux/kallsyms.h>
 #ifdef CONFIG_QCA_MINIDUMP
 #include <linux/minidump_tlv.h>
 #endif
-#ifdef CONFIG_QCOM_MINIDUMP
+#ifdef WLAN_QCOM_MINIDUMP
 #include <soc/qcom/minidump.h>
 #endif
 
@@ -475,7 +484,7 @@ __qdf_minidump_remove(void *addr, size_t size, const char *name)
 {
 	minidump_remove_segments((const uintptr_t)addr);
 }
-#elif defined(CONFIG_QCOM_MINIDUMP)
+#elif defined(WLAN_QCOM_MINIDUMP)
 static inline void
 __qdf_minidump_log(void *start_addr, const size_t size,
 		   const char *name)