Merge tag 'LA.UM.8.1.r1-14300-sm8150.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/data-ipa-cfg-mgr into lineage-17.1
"LA.UM.8.1.r1-14300-sm8150.0"
Change-Id: I5776321fbf8638f27673fe433e95bd9767c1d067
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/hal/Android.mk b/hal/Android.mk
index 6ebca46..58b3414 100644
--- a/hal/Android.mk
+++ b/hal/Android.mk
@@ -16,7 +16,6 @@
libhidlbase \
libhidltransport \
liblog \
- libcutils \
libdl \
libbase \
libutils \
diff --git a/hal/src/CtUpdateAmbassador.cpp b/hal/src/CtUpdateAmbassador.cpp
index eba6b93..b5e60e2 100644
--- a/hal/src/CtUpdateAmbassador.cpp
+++ b/hal/src/CtUpdateAmbassador.cpp
@@ -33,7 +33,7 @@
/* External Includes */
#include <arpa/inet.h>
-#include <cutils/log.h>
+#include <log/log.h>
/* HIDL Includes */
#include <android/hardware/tetheroffload/control/1.0/ITetheringOffloadCallback.h>
diff --git a/hal/src/HAL.cpp b/hal/src/HAL.cpp
index 3f1a41f..175f833 100644
--- a/hal/src/HAL.cpp
+++ b/hal/src/HAL.cpp
@@ -39,7 +39,7 @@
#include <linux/netfilter/nfnetlink_compat.h>
/* External Includes */
-#include <cutils/log.h>
+#include <log/log.h>
#include <cstring>
#include <sys/socket.h>
#include <sys/types.h>
diff --git a/hal/src/IpaEventRelay.cpp b/hal/src/IpaEventRelay.cpp
index 137092f..484355a 100644
--- a/hal/src/IpaEventRelay.cpp
+++ b/hal/src/IpaEventRelay.cpp
@@ -28,7 +28,7 @@
*/
#define LOG_TAG "IPAHALService/IpaEventRelay"
/* External Includes */
-#include <cutils/log.h>
+#include <log/log.h>
/* HIDL Includes */
#include <android/hardware/tetheroffload/control/1.0/ITetheringOffloadCallback.h>
diff --git a/hal/src/LocalLogBuffer.cpp b/hal/src/LocalLogBuffer.cpp
index f556e40..50fa91c 100644
--- a/hal/src/LocalLogBuffer.cpp
+++ b/hal/src/LocalLogBuffer.cpp
@@ -29,7 +29,7 @@
#define LOG_TAG "IPAHALService/dump"
/* External Includes */
-#include <cutils/log.h>
+#include <log/log.h>
#include <deque>
#include <string>
#include <sys/types.h>
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/ipacm/src/ipacm.rc b/ipacm/src/ipacm.rc
index c1c876b..8a63b46 100644
--- a/ipacm/src/ipacm.rc
+++ b/ipacm/src/ipacm.rc
@@ -25,10 +25,12 @@
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# msm specific files that need to be created on /data
+on post-fs-data
+ mkdir /data/vendor/ipa 0770 radio radio
+ chmod 0770 /data/vendor/ipa
+
service vendor.ipacm /system/vendor/bin/ipacm
- class main
+ class late_start
user radio
group radio inet
-
-on post-fs
- start vendor.ipacm
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)