[][openwrt][mt7988][crypto][Refactor to unify EIP driver]

[Description]
Refactor to unify EIP driver.
1. Sync CAPWAP-DTLS functions for TOPS from neptune/eip_driver
2. Decoupled with hnat, IPSec inline mode is available even when hnat is
not activated now.

[Release-log]
N/A


Change-Id: Id53b483924fb90bc784570545b37e67e860a6024
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/8868628
diff --git a/feed/kernel/crypto-eip/crypto-eip.mk b/feed/kernel/crypto-eip/crypto-eip.mk
index 31df9bd..9150cff 100644
--- a/feed/kernel/crypto-eip/crypto-eip.mk
+++ b/feed/kernel/crypto-eip/crypto-eip.mk
@@ -18,13 +18,19 @@
 ifeq ($(CONFIG_CRYPTO_OFFLOAD_INLINE),y)
 EXTRA_KCONFIG+= \
 	CONFIG_MTK_CRYPTO_EIP_INLINE=m \
-	CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE=$(CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE)
+	CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE=$(CONFIG_CRYPTO_XFRM_OFFLOAD_MTK_PCE) \
+	CONFIG_MTK_TOPS_CAPWAP_DTLS=$(CONFIG_MTK_TOPS_CAPWAP_DTLS)
 
 EXTRA_CFLAGS+= \
 	-I$(LINUX_DIR)/drivers/net/ethernet/mediatek/ \
 	-I$(KERNEL_BUILD_DIR)/pce/inc/
 endif
 
+ifeq ($(CONFIG_MTK_TOPS_CAPWAP_DTLS),y)
+EXTRA_CFLAGS += \
+	-DCONFIG_TOPS_TNL_NUM=$(CONFIG_TOPS_TNL_NUM)
+endif
+
 # crypto-eip kernel package configuration
 define KernelPackage/crypto-eip
   CATEGORY:=MTK Properties
@@ -72,7 +78,8 @@
 	@CRYPTO_OFFLOAD_INLINE \
 	kmod-crypto-eip \
 	kmod-crypto-eip-ddk \
-	+kmod-pce
+	+kmod-pce \
+	+MTK_TOPS_CAPWAP_DTLS:kmod-tops
   FILES:=$(PKG_BUILD_DIR)/crypto-eip-inline.ko
   $(call AddDepends/crypto)
 endef