[qca-nss-clients] Modify netlink for 4.4 kernel

General netlink structures had changed post 3.12 kernel.
This patch takes care of fixing compile issue with netlink based on
4.4 kernel. Also includes changes to the new IPsec infrastructure.

Change-Id: If6dc86190b0061a0a231946ee467849e90a6fe66
Signed-off-by: Vijay Vigneshan <vvignesh@codeaurora.org>
Signed-off-by: Poddar,Sourav <souravp@codeaurora.org>
Signed-off-by: Tanmay V Jagdale <tjagdale@codeaurora.org>
Signed-off-by: pavir <pavir@codeaurora.org>
diff --git a/netlink/Makefile b/netlink/Makefile
index 7e5a66c..6ef50fc 100644
--- a/netlink/Makefile
+++ b/netlink/Makefile
@@ -1,20 +1,25 @@
 ccflags-y := -Werror
 ccflags-y += -I$(obj)/include
-ccflags-y += -I$(obj)/../../qca-nss-crypto/include/
+ccflags-y += -I$(obj)/../exports
 ccflags-y += -DNSS_NL_DEBUG_LEVEL=4
 ccflags-y += -DNSS_CLIENT_BUILD_ID="$(BUILD_ID)"
 
-ccflags-y += -DCONFIG_NSS_NLCRYPTO=1
 ccflags-y += -DCONFIG_NSS_NLIPV4=1
 ccflags-y += -DCONFIG_NSS_NLIPV6=1
 ccflags-y += -DCONFIG_NSS_NLIPSEC=1
 ccflags-y += -DCONFIG_NSS_NLOAM=1
 
-obj-m += qca-nss-netlink.o
-
 qca-nss-netlink-objs := nss_nl.o
-qca-nss-netlink-objs += nss_nlcrypto.o
 qca-nss-netlink-objs += nss_nlipv4.o
 qca-nss-netlink-objs += nss_nlipv6.o
 qca-nss-netlink-objs += nss_nlipsec.o
 qca-nss-netlink-objs += nss_nloam.o
+obj-m += qca-nss-netlink.o
+
+ifeq (ipq807x, $(findstring ipq807x, $(SoC)))
+ccflags-y += -DCONFIG_NSS_NLCRYPTOV2=1
+qca-nss-netlink-objs += nss_nlcryptov2.o
+else
+ccflags-y += -DCONFIG_NSS_NLCRYPTO=1
+qca-nss-netlink-objs += nss_nlcrypto.o
+endif