Patch v4.4.100 to Cradlepoint Current
Change-Id: Ia3c8d927e2d4445cc67793de5468074e521507a3
diff --git a/Makefile b/Makefile
index 91dd783..0380981 100644
--- a/Makefile
+++ b/Makefile
@@ -395,7 +395,9 @@
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
- -std=gnu89 $(call cc-option,-fno-PIE)
+ -std=gnu89 $(call cc-option,-fno-PIE) \
+ -DPRODUCT_$(PRODUCT) \
+ -DPRODUCT_NAME_$(PRODUCT_NAME)
KBUILD_AFLAGS_KERNEL :=
@@ -623,6 +625,85 @@
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
+# Broadcom source tree + compile options (consumer SDK)
+ifneq ($(CONFIG_ARCH_BRCM),)
+KBUILD_CFLAGS += -I$(SRCBASE)/include
+KBUILD_CFLAGS += -I$(SRCBASE)/common/include
+KBUILD_CFLAGS += $(WLAN_ComponentIncPath)
+KBUILD_CFLAGS += $(WLAN_StdIncPathA)
+KBUILD_AFLAGS += -I$(SRCBASE)/include
+KBUILD_AFLAGS += -I$(SRCBASE)/common/include
+KBUILD_CFLAGS += -DBCMDRIVER -Dlinux
+
+ifneq ($(CONFIG_BCM_CTF),)
+KBUILD_CFLAGS += -DHNDCTF -DCTFPOOL -DCTFMAP -DPKTC -DCTF_PPPOE
+ifneq ($(CONFIG_WL_USBAP),)
+KBUILD_CFLAGS += -DCTFPOOL_SPINLOCK
+endif
+ifneq ($(CONFIG_IPV6),)
+KBUILD_CFLAGS += -DCTF_IPV6
+endif
+ifeq ($(CONFIG_BRCM_SDK_TYPE),"entsdk")
+KBUILD_CFLAGS += -DCTF_ESDK_VERSION
+endif
+ifeq ($(CONFIG_BRCM_SDK_TYPE),"consumer")
+KBUILD_CFLAGS += -DCTF_ESDK_VERSION
+endif
+endif
+
+ifneq ($(CONFIG_BCM_FA),)
+KBUILD_CFLAGS += -DBCMFA
+endif
+
+ifneq ($(CONFIG_BCM47XX),)
+KBUILD_CFLAGS += -DBCM47XX
+endif
+
+ifneq ($(CONFIG_WLENT_VLAN),)
+KBUILD_CFLAGS += -DWLENT_VLAN
+endif
+
+ifneq ($(CONFIG_WLENT_QOS),)
+KBUILD_CFLAGS += -DWLENT_QOS
+endif
+endif # CONFIG_ARCH_BRCM
+
+# Broadcom features compile options (LDK)
+ifneq ($(CONFIG_ARCH_IPROC),)
+
+ifneq ($(CONFIG_WL),)
+KBUILD_CFLAGS += -I$(SRCBASE)/include
+KBUILD_CFLAGS += -I$(SRCBASE)/common/include
+KBUILD_CFLAGS += $(WLAN_ComponentIncPath)
+KBUILD_CFLAGS += $(WLAN_StdIncPathA)
+KBUILD_AFLAGS += -I$(SRCBASE)/include
+KBUILD_AFLAGS += -I$(SRCBASE)/common/include
+KBUILD_CFLAGS += -DBCMDRIVER -Dlinux
+endif
+ifneq ($(CONFIG_BCM_CTF2),)
+#KBUILD_CFLAGS += -DHNDCTF -DCTFPOOL -DCTFMAP -DPKTC -DCTF_PPPOE -DBCMDRIVER
+KBUILD_CFLAGS += -DHNDCTF -DCTFPOOL -DCTFMAP -DPKTC -DBCMDRIVER
+ifneq ($(CONFIG_WL_USBAP),)
+KBUILD_CFLAGS += -DCTFPOOL_SPINLOCK
+endif
+ifneq ($(CONFIG_IPV6),)
+KBUILD_CFLAGS += -DCTF_IPV6
+endif
+endif
+
+ifneq ($(CONFIG_BCM_FA),)
+KBUILD_CFLAGS += -DBCMFA
+endif
+
+ifneq ($(CONFIG_BCM47XX),)
+KBUILD_CFLAGS += -DBCM47XX
+endif
+
+ifneq ($(CONFIG_IPROC_FA2),)
+KBUILD_CFLAGS += -DIPROC_FA2
+endif
+endif # CONFIG_ARCH_IPROC
+
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os
else