Merge tag 'LA.UM.8.1.r1-09500-sm8150.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/data-ipa-cfg-mgr into lineage-17.0
"LA.UM.8.1.r1-09500-sm8150.0"
Change-Id: Icac11a6a986ac0a99bb97b2a735b7c8c74842b4b
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..ac85f3c
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,7 @@
+ifeq ($(call my-dir),$(call project-path-for,qcom-data-ipa-cfg-mgr))
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call first-makefiles-under,$(LOCAL_PATH))
+
+endif
diff --git a/ipacm/src/Android.mk b/ipacm/src/Android.mk
index a4d6d98..d8a5104 100644
--- a/ipacm/src/Android.mk
+++ b/ipacm/src/Android.mk
@@ -37,11 +37,9 @@
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../src
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../inc
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
-LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+LOCAL_HEADER_LIBRARIES := generated_kernel_headers
-LOCAL_CFLAGS := -v
-LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
+LOCAL_CFLAGS := -DFEATURE_IPA_ANDROID
LOCAL_CFLAGS += -DFEATURE_IPACM_RESTART
ifeq ($(call is-board-platform-in-list,$(BOARD_ETH_BRIDGE_LIST)),true)
@@ -49,7 +47,7 @@
endif
LOCAL_CFLAGS += -DFEATURE_IPACM_HAL -Wall -Werror -Wno-error=macro-redefined
-ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
LOCAL_CFLAGS += -DDEBUG
endif
diff --git a/ipanat/inc/ipa_nat_drvi.h b/ipanat/inc/ipa_nat_drvi.h
index 8015c98..3f6efc6 100644
--- a/ipanat/inc/ipa_nat_drvi.h
+++ b/ipanat/inc/ipa_nat_drvi.h
@@ -43,7 +43,9 @@
#include "ipa_nat_logi.h"
+#ifdef DEBUG
#define NAT_DUMP
+#endif
/*======= IMPLEMENTATION related data structures and functions ======= */
#ifdef IPA_ON_R3PC
diff --git a/ipanat/src/Android.mk b/ipanat/src/Android.mk
index aaa8409..bb87e82 100644
--- a/ipanat/src/Android.mk
+++ b/ipanat/src/Android.mk
@@ -19,8 +19,8 @@
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
-LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+
+LOCAL_HEADER_LIBRARIES := generated_kernel_headers
LOCAL_SRC_FILES := ipa_nat_drv.c \
ipa_nat_drvi.c
@@ -29,7 +29,10 @@
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64
LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib
-LOCAL_CFLAGS := -DDEBUG -Wall -Werror
+ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
+LOCAL_CFLAGS := -DDEBUG
+endif
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_CFLAGS += -DFEATURE_IPA_ANDROID
LOCAL_MODULE := libipanat
LOCAL_MODULE_TAGS := optional
diff --git a/ipanat/test/Android.mk b/ipanat/test/Android.mk
index b8ae6a4..a6bb4b0 100644
--- a/ipanat/test/Android.mk
+++ b/ipanat/test/Android.mk
@@ -10,8 +10,7 @@
LOCAL_C_INCLUDES := $(LOCAL_PATH)/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ipanat/inc
-LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include
-LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
+LOCAL_HEADER_LIBRARIES := generated_kernel_headers
LOCAL_MODULE := ipa_nat_test
LOCAL_SRC_FILES := ipa_nat_test000.c \
@@ -42,7 +41,7 @@
LOCAL_SHARED_LIBRARIES := libipanat
-LOCAL_MODULE_TAGS := debug
+LOCAL_MODULE_TAGS := tests
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/kernel-tests/ip_accelerator
include $(BUILD_EXECUTABLE)