qcacld-3.0: Enable compile time enable/disable for roaming

Enable compile time featurization support for both LFR2.0
and LFR3.0 using WLAN_FEATURE_HOST_ROAM and
WLAN_FEATURE_ROAM_OFFLOAD respectively

CRs-Fixed: 978905
Change-Id: Ib5976cd0cd5a6e117a1334bfc73a043e36e25f77
diff --git a/Kbuild b/Kbuild
index f14e5a9..3316971 100755
--- a/Kbuild
+++ b/Kbuild
@@ -41,6 +41,8 @@
 	CONFIG_MOBILE_ROUTER := y
 	endif
 
+	#Flag to enable Legacy Fast Roaming2(LFR2)
+	CONFIG_QCACLD_WLAN_LFR2 := y
 	#Flag to enable Legacy Fast Roaming3(LFR3)
 	CONFIG_QCACLD_WLAN_LFR3 := y
 
@@ -401,10 +403,8 @@
 		$(MAC_SRC_DIR)/pe/lim/lim_admit_control.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_api.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_assoc_utils.o \
-		$(MAC_SRC_DIR)/pe/lim/lim_reassoc_utils.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_debug.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_ft.o \
-		$(MAC_SRC_DIR)/pe/lim/lim_ft_preauth.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_ibss_peer_mgmt.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_link_monitoring_algo.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_p2p.o \
@@ -417,7 +417,6 @@
 		$(MAC_SRC_DIR)/pe/lim/lim_process_deauth_frame.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_process_disassoc_frame.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_process_message_queue.o \
-		$(MAC_SRC_DIR)/pe/lim/lim_process_mlm_host_roam.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_process_mlm_req_messages.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_process_mlm_rsp_messages.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_process_probe_req_frame.o \
@@ -427,7 +426,6 @@
 		$(MAC_SRC_DIR)/pe/lim/lim_scan_result_utils.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_security_utils.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_send_management_frames.o \
-		$(MAC_SRC_DIR)/pe/lim/lim_send_frames_host_roam.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_send_messages.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_send_sme_rsp_messages.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_ser_des_utils.o \
@@ -436,7 +434,6 @@
 		$(MAC_SRC_DIR)/pe/lim/lim_sme_req_utils.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_sta_hash_api.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_timer_utils.o \
-		$(MAC_SRC_DIR)/pe/lim/lim_roam_timer_utils.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_trace.o \
 		$(MAC_SRC_DIR)/pe/lim/lim_utils.o
 
@@ -444,6 +441,14 @@
 MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_process_tdls.o
 endif
 
+ifeq ($(CONFIG_QCACLD_WLAN_LFR2),y)
+	MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_process_mlm_host_roam.o \
+		$(MAC_SRC_DIR)/pe/lim/lim_send_frames_host_roam.o \
+		$(MAC_SRC_DIR)/pe/lim/lim_roam_timer_utils.o \
+		$(MAC_SRC_DIR)/pe/lim/lim_ft_preauth.o \
+		$(MAC_SRC_DIR)/pe/lim/lim_reassoc_utils.o
+endif
+
 MAC_SCH_OBJS := $(MAC_SRC_DIR)/pe/sch/sch_api.o \
 		$(MAC_SRC_DIR)/pe/sch/sch_beacon_gen.o \
 		$(MAC_SRC_DIR)/pe/sch/sch_beacon_process.o \
@@ -500,13 +505,18 @@
 		-I$(WLAN_ROOT)/$(SME_SRC_DIR)/csr
 
 SME_CSR_OBJS := $(SME_SRC_DIR)/csr/csr_api_roam.o \
-		$(SME_SRC_DIR)/csr/csr_roam_preauth.o \
 		$(SME_SRC_DIR)/csr/csr_api_scan.o \
 		$(SME_SRC_DIR)/csr/csr_cmd_process.o \
 		$(SME_SRC_DIR)/csr/csr_link_list.o \
 		$(SME_SRC_DIR)/csr/csr_neighbor_roam.o \
 		$(SME_SRC_DIR)/csr/csr_util.o \
+
+
+ifeq ($(CONFIG_QCACLD_WLAN_LFR2),y)
+SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csr_roam_preauth.o \
 		$(SME_SRC_DIR)/csr/csr_host_scan_roam.o
+endif
+
 
 ifeq ($(CONFIG_QCOM_TDLS),y)
 SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csr_tdls_process.o
@@ -1019,6 +1029,10 @@
 CDEFINES += -DWLAN_FEATURE_ROAM_OFFLOAD
 endif
 
+ifeq ($(CONFIG_QCACLD_WLAN_LFR2),y)
+CDEFINES += -DWLAN_FEATURE_HOST_ROAM
+endif
+
 ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
 CDEFINES += -DFEATURE_WLAN_OKC
 endif