Browse Source

qcacld-3.0: Move unused Lfr3 specific item under FEATURE_CM_ENABLE

Move unused Lfr3 specific item under ifndef FEATURE_CM_ENABLE.

Change-Id: I94d5f9d48f5cb853dc3ac9039f6140f23ab620cd
CRs-Fixed: 2953719
Utkarsh Bhatnagar 3 years ago
parent
commit
045ed44dee

+ 37 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -937,6 +937,22 @@ error:
 	return status;
 }
 
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+static void cm_ho_fail_diag_event(void)
+{
+	WLAN_HOST_DIAG_EVENT_DEF(roam_connection,
+				 host_event_wlan_status_payload_type);
+	qdf_mem_zero(&roam_connection,
+		     sizeof(host_event_wlan_status_payload_type));
+
+	roam_connection.eventId = DIAG_WLAN_STATUS_DISCONNECT;
+	roam_connection.reason = DIAG_REASON_ROAM_HO_FAIL;
+	WLAN_HOST_DIAG_EVENT_REPORT(&roam_connection, EVENT_WLAN_STATUS_V2);
+}
+#else
+static inline void cm_ho_fail_diag_event(void) {}
+#endif
+
 static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 {
 	QDF_STATUS status;
@@ -947,6 +963,8 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 	wlan_cm_id cm_id = CM_ID_INVALID;
 	struct reject_ap_info ap_info;
 	struct cm_roam_req *roam_req = NULL;
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+	struct wlan_objmgr_psoc *psoc;
 
 	if (!msg || !msg->bodyptr)
 		return QDF_STATUS_E_FAILURE;
@@ -968,6 +986,19 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 		goto error;
 	}
 
+	psoc = wlan_pdev_get_psoc(pdev);
+	if (!psoc) {
+		mlme_err("psoc object is NULL");
+		status = QDF_STATUS_E_NULL_VALUE;
+		goto error;
+	}
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("Failed to mlme psoc obj");
+		status = QDF_STATUS_E_FAILURE;
+		goto error;
+	}
+
 	cm_ctx = cm_get_cm_ctx(vdev);
 	if (!cm_ctx) {
 		status = QDF_STATUS_E_NULL_VALUE;
@@ -989,6 +1020,7 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 	ap_info.source = ADDED_BY_DRIVER;
 	wlan_blm_add_bssid_to_reject_list(pdev, &ap_info);
 
+	cm_ho_fail_diag_event();
 	wlan_roam_debug_log(ind->vdev_id,
 			    DEBUG_ROAM_SYNCH_FAIL,
 			    DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
@@ -998,6 +1030,11 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 			       REASON_FW_TRIGGERED_ROAM_FAILURE,
 			       NULL);
 
+	if (mlme_obj->cfg.gen.fatal_event_trigger)
+		cds_flush_logs(WLAN_LOG_TYPE_FATAL,
+			       WLAN_LOG_INDICATOR_HOST_DRIVER,
+			       WLAN_LOG_REASON_ROAM_HO_FAILURE, false, false);
+
 	if (QDF_IS_STATUS_ERROR(status))
 		cm_remove_cmd(cm_ctx, &cm_id);
 

+ 2 - 1
core/mac/inc/sir_api.h

@@ -2581,6 +2581,7 @@ typedef struct {
 } tSirStatsExtEvent, *tpSirStatsExtEvent;
 #endif
 
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 struct handoff_failure_ind {
 	uint8_t vdev_id;
@@ -2590,7 +2591,7 @@ struct handoff_failure_ind {
 struct roam_offload_synch_fail {
 	uint8_t session_id;
 };
-
+#endif
 #endif
 
 /**

+ 4 - 0
core/mac/inc/wni_api.h

@@ -161,10 +161,12 @@ enum eWniMsgTypes {
 #ifdef QCA_HT_2040_COEX
 	eWNI_SME_SET_HT_2040_MODE = SIR_SME_MSG_TYPES_BEGIN + 96,
 #endif
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	/* Hand Off Failure Ind from WMA to SME */
 	eWNI_SME_HO_FAIL_IND = SIR_SME_MSG_TYPES_BEGIN + 97,
 #endif
+#endif
 #ifdef WLAN_FEATURE_NAN
 	eWNI_SME_NAN_EVENT = SIR_SME_MSG_TYPES_BEGIN + 98,
 #endif
@@ -206,7 +208,9 @@ enum eWniMsgTypes {
 	eWNI_SME_SEND_DISASSOC_FRAME = SIR_SME_MSG_TYPES_BEGIN + 129,
 	eWNI_SME_UPDATE_ACCESS_POLICY_VENDOR_IE = SIR_SME_MSG_TYPES_BEGIN + 130,
 	eWNI_SME_DEFAULT_SCAN_IE = SIR_SME_MSG_TYPES_BEGIN + 131,
+#ifndef FEATURE_CM_ENABLE
 	eWNI_SME_ROAM_INVOKE = SIR_SME_MSG_TYPES_BEGIN + 132,
+#endif
 	/* 133 unused */
 	eWNI_SME_LOST_LINK_INFO_IND = SIR_SME_MSG_TYPES_BEGIN + 134,
 	eWNI_SME_DEL_ALL_TDLS_PEERS = SIR_SME_MSG_TYPES_BEGIN + 135,

+ 2 - 2
core/mac/src/include/sir_params.h

@@ -497,12 +497,12 @@ enum halmsgtype {
 #endif /* DHCP_SERVER_OFFLOAD */
 	SIR_HAL_LED_FLASHING_REQ          = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 223),
 
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-	SIR_HAL_ROAM_OFFLOAD_SYNCH_IND    = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 225),
 	SIR_HAL_ROAM_OFFLOAD_SYNCH_FAIL   = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 226),
 	SIR_HAL_ROAM_INVOKE               = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 227),
 #endif
-
+#endif
 /*= (SIR_HAL_ITC_MSG_TYPES_BEGIN + 228), is unused */
 
 	SIR_HAL_SET_MAS                   = (SIR_HAL_ITC_MSG_TYPES_BEGIN + 229),

+ 2 - 0
core/mac/src/pe/lim/lim_process_message_queue.c

@@ -1760,7 +1760,9 @@ static void lim_process_messages(struct mac_context *mac_ctx,
 #endif  /* FEATURE_WLAN_ESE */
 	case eWNI_SME_REGISTER_MGMT_FRAME_CB:
 	case eWNI_SME_EXT_CHANGE_CHANNEL:
+#ifndef FEATURE_CM_ENABLE
 	case eWNI_SME_ROAM_INVOKE:
+#endif
 		/* fall through */
 	case eWNI_SME_ROAM_SEND_SET_PCL_REQ:
 	case eWNI_SME_SET_ADDBA_ACCEPT:

+ 4 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -6808,6 +6808,7 @@ static inline void lim_send_roam_set_pcl(struct mac_context *mac_ctx,
 }
 #endif
 
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /**
  * lim_process_roam_invoke() - process the Roam Invoke req
@@ -6840,6 +6841,7 @@ static void lim_process_roam_invoke(struct mac_context *mac_ctx,
 	qdf_mem_free(msg_buf);
 }
 #endif
+#endif
 
 static void lim_handle_update_ssid_hidden(struct mac_context *mac_ctx,
 				struct pe_session *session, uint8_t ssid_hidden)
@@ -7851,10 +7853,12 @@ bool lim_process_sme_req_messages(struct mac_context *mac,
 		lim_send_roam_set_pcl(mac, (struct set_pcl_req *)msg_buf);
 		bufConsumed = false;
 		break;
+#ifndef FEATURE_CM_ENABLE
 	case eWNI_SME_ROAM_INVOKE:
 		lim_process_roam_invoke(mac, msg_buf);
 		bufConsumed = false;
 		break;
+#endif
 	case eWNI_SME_CHNG_MCC_BEACON_INTERVAL:
 		/* Update the beaconInterval */
 		__lim_process_sme_change_bi(mac, msg_buf);

+ 6 - 3
core/mac/src/sys/legacy/src/utils/src/mac_trace.c

@@ -283,9 +283,11 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg)
 		CASE_RETURN_STRING(eWNI_SME_AUTO_SHUTDOWN_IND);
 #endif
 		CASE_RETURN_STRING(eWNI_SME_SET_HT_2040_MODE);
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		CASE_RETURN_STRING(eWNI_SME_HO_FAIL_IND);
 #endif
+#endif
 #ifdef FEATURE_WLAN_TDLS
 		CASE_RETURN_STRING(eWNI_SME_TDLS_SEND_MGMT_REQ);
 		CASE_RETURN_STRING(eWNI_SME_TDLS_SEND_MGMT_RSP);
@@ -493,8 +495,10 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_INIT_THERMAL_INFO_CMD);
 		CASE_RETURN_STRING(WMA_SET_THERMAL_LEVEL);
 		CASE_RETURN_STRING(WMA_SET_SAP_INTRABSS_DIS);
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		CASE_RETURN_STRING(WMA_ROAM_OFFLOAD_SYNCH_FAIL);
+#endif
 #endif
 		CASE_RETURN_STRING(SIR_HAL_SET_BASE_MACADDR_IND);
 		CASE_RETURN_STRING(WMA_LINK_STATUS_GET_REQ);
@@ -520,8 +524,10 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_SET_PDEV_IE_REQ);
 		CASE_RETURN_STRING(WMA_SEND_FREQ_RANGE_CONTROL_IND);
 		CASE_RETURN_STRING(WMA_POWER_DEBUG_STATS_REQ);
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 		CASE_RETURN_STRING(SIR_HAL_ROAM_INVOKE);
+#endif
 #endif
 		CASE_RETURN_STRING(SIR_HAL_SET_MAS);
 		CASE_RETURN_STRING(SIR_HAL_SET_MIRACAST);
@@ -543,9 +549,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg)
 		CASE_RETURN_STRING(WMA_SET_TDLS_LINK_ESTABLISH_REQ_RSP);
 #endif
 		CASE_RETURN_STRING(WMA_CSA_OFFLOAD_EVENT);
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-		CASE_RETURN_STRING(WMA_ROAM_OFFLOAD_SYNCH_IND);
-#endif
 		CASE_RETURN_STRING(WMA_UPDATE_RX_NSS);
 #ifdef WLAN_FEATURE_NAN
 		CASE_RETURN_STRING(WMA_NAN_REQUEST);

+ 1 - 11
core/sme/inc/csr_internal.h

@@ -924,7 +924,7 @@ QDF_STATUS
 csr_rso_save_ap_to_scan_cache(struct mac_context *mac,
 			      struct roam_offload_synch_ind *roam_synch_ind,
 			      struct bss_description *bss_desc_ptr);
-#endif
+
 /**
  * csr_process_ho_fail_ind  - This function will process the Hand Off Failure
  * indication received from the firmware. It will trigger a disconnect on
@@ -936,16 +936,6 @@ csr_rso_save_ap_to_scan_cache(struct mac_context *mac,
  */
 void csr_process_ho_fail_ind(struct mac_context *mac, void *msg_buf);
 #endif
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-void csr_roaming_report_diag_event(struct mac_context *mac_ctx,
-		struct roam_offload_synch_ind *roam_synch_ind_ptr,
-		enum diagwlan_status_eventreason reason);
-#else
-static inline void csr_roaming_report_diag_event(
-		struct mac_context *mac_ctx,
-		struct roam_offload_synch_ind *roam_synch_ind_ptr,
-		enum diagwlan_status_eventreason reason)
-{}
 #endif
 
 QDF_STATUS csr_get_channels_and_power(struct mac_context *mac);

+ 2 - 0
core/sme/src/common/sme_api.c

@@ -2622,11 +2622,13 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 		goto release_lock;
 	}
 	switch (pMsg->type) {
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 	case eWNI_SME_HO_FAIL_IND:
 		csr_process_ho_fail_ind(mac, pMsg->bodyptr);
 		qdf_mem_free(pMsg->bodyptr);
 		break;
+#endif
 #endif
 	case eWNI_SME_ADDTS_RSP:
 	case eWNI_SME_DELTS_RSP:

+ 15 - 28
core/sme/src/csr/csr_api_roam.c

@@ -4891,7 +4891,6 @@ void csr_update_scan_entry_associnfo(struct mac_context *mac_ctx,
 	if (QDF_IS_STATUS_ERROR(status))
 		sme_debug("Failed to update the MLME info in scan entry");
 }
-#endif
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 static void csr_roam_synch_clean_up(struct mac_context *mac, uint8_t session_id)
@@ -4923,7 +4922,6 @@ static void csr_roam_synch_clean_up(struct mac_context *mac, uint8_t session_id)
 }
 #endif
 
-#ifndef FEATURE_CM_ENABLE
 #if defined(WLAN_FEATURE_FILS_SK)
 /**
  * csr_update_fils_seq_number() - Copy FILS sequence number to roam info
@@ -6268,9 +6266,6 @@ QDF_STATUS csr_roam_issue_connect(struct mac_context *mac, uint32_t sessionId,
 		sme_err(" fail to get command buffer");
 		status = QDF_STATUS_E_RESOURCES;
 	} else {
-		if (fClearScan)
-			csr_scan_abort_mac_scan(mac, sessionId, INVAL_SCAN_ID);
-
 		pCommand->u.roamCmd.fReleaseProfile = false;
 		if (!pProfile) {
 			/* We can roam now
@@ -7443,7 +7438,7 @@ csr_roam_save_connected_information(struct mac_context *mac,
 	return status;
 }
 
-
+#ifndef FEATURE_CM_ENABLE
 bool is_disconnect_pending(struct mac_context *pmac, uint8_t vdev_id)
 {
 	tListElem *entry = NULL;
@@ -7468,7 +7463,6 @@ bool is_disconnect_pending(struct mac_context *pmac, uint8_t vdev_id)
 	return disconnect_cmd_exist;
 }
 
-#ifndef FEATURE_CM_ENABLE
 #if defined(WLAN_SAE_SINGLE_PMK) && defined(WLAN_FEATURE_ROAM_OFFLOAD)
 static void
 csr_clear_other_bss_sae_single_pmk_entry(struct mac_context *mac,
@@ -15173,6 +15167,7 @@ QDF_STATUS csr_queue_sme_command(struct mac_context *mac_ctx, tSmeCmd *sme_cmd,
 		goto error;
 	}
 
+#ifndef FEATURE_CM_ENABLE
 	if (CSR_IS_WAIT_FOR_KEY(mac_ctx, sme_cmd->vdev_id)) {
 		if (!CSR_IS_DISCONNECT_COMMAND(sme_cmd)) {
 			sme_err("Can't process cmd(%d), waiting for key",
@@ -15180,7 +15175,7 @@ QDF_STATUS csr_queue_sme_command(struct mac_context *mac_ctx, tSmeCmd *sme_cmd,
 			goto error;
 		}
 	}
-
+#endif
 	qdf_mem_zero(&cmd, sizeof(struct wlan_serialization_command));
 	status = csr_set_serialization_params_to_cmd(mac_ctx, sme_cmd,
 					&cmd, high_priority);
@@ -15621,6 +15616,8 @@ QDF_STATUS csr_sta_continue_csa(struct mac_context *mac_ctx, uint8_t vdev_id)
 	return status;
 }
 
+#ifndef FEATURE_CM_ENABLE
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
 /**
  * csr_roaming_report_diag_event() - Diag events for LFR3
@@ -15635,7 +15632,7 @@ QDF_STATUS csr_sta_continue_csa(struct mac_context *mac_ctx, uint8_t vdev_id)
  *
  * Return: None
  */
-void csr_roaming_report_diag_event(struct mac_context *mac_ctx,
+static void csr_roaming_report_diag_event(struct mac_context *mac_ctx,
 		struct roam_offload_synch_ind *roam_synch_ind_ptr,
 		enum diagwlan_status_eventreason reason)
 {
@@ -15667,7 +15664,6 @@ void csr_roaming_report_diag_event(struct mac_context *mac_ctx,
 }
 #endif
 
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
 void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
 {
 	struct handoff_failure_ind *pSmeHOFailInd = msg_buf;
@@ -15688,15 +15684,13 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
 	ap_info.source = ADDED_BY_DRIVER;
 	wlan_blm_add_bssid_to_reject_list(mac_ctx->pdev, &ap_info);
 
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
 	/* Roaming is supported only on Infra STA Mode. */
 	if (!csr_roam_is_sta_mode(mac_ctx, sessionId)) {
 		sme_err("LFR3:HO Fail cannot be handled for session %d",
 			sessionId);
 		return;
 	}
-#endif
+
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, sessionId,
 						    WLAN_LEGACY_SME_ID);
 	if (!vdev) {
@@ -15713,29 +15707,19 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
 
 	mac_ctx->sme.set_connection_info_cb(false);
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
+
 	csr_roam_roaming_offload_timer_action(mac_ctx, 0, sessionId,
 			ROAMING_OFFLOAD_TIMER_STOP);
 	csr_roam_call_callback(mac_ctx, sessionId, NULL, 0,
 			eCSR_ROAM_NAPI_OFF, eCSR_ROAM_RESULT_FAILURE);
-#endif
 	csr_roam_synch_clean_up(mac_ctx, sessionId);
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
 	csr_roaming_report_diag_event(mac_ctx, NULL,
 			DIAG_REASON_ROAM_HO_FAIL);
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
-	sme_release_global_lock(&mac_ctx->sme);
-	/* do not call cm disconnect while holding Sme lock */
-	cm_disconnect(mac_ctx->psoc, sessionId,
-		      CM_MLME_DISCONNECT,
-		      REASON_FW_TRIGGERED_ROAM_FAILURE, NULL);
-	sme_acquire_global_lock(&mac_ctx->sme);
-#else
+#endif
 	csr_roam_disconnect(mac_ctx, sessionId,
 			eCSR_DISCONNECT_REASON_ROAM_HO_FAIL,
 			REASON_FW_TRIGGERED_ROAM_FAILURE);
-#endif
 	if (mac_ctx->mlme_cfg->gen.fatal_event_trigger)
 		cds_flush_logs(WLAN_LOG_TYPE_FATAL,
 				WLAN_LOG_INDICATOR_HOST_DRIVER,
@@ -15743,6 +15727,7 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
 				false, false);
 }
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
+#endif
 
 /**
  * csr_update_op_class_array() - update op class for each band
@@ -15979,11 +15964,13 @@ void csr_process_set_hw_mode(struct mac_context *mac, tSmeCmd *command)
 		goto fail;
 
 	action = command->u.set_hw_mode_cmd.action;
+
+#ifndef FEATURE_CM_ENABLE
 	/* For hidden SSID case, if there is any scan command pending
 	 * it needs to be cleared before issuing set HW mode
 	 */
 	if (command->u.set_hw_mode_cmd.reason ==
-		POLICY_MGR_UPDATE_REASON_HIDDEN_STA) {
+	    POLICY_MGR_UPDATE_REASON_HIDDEN_STA) {
 		sme_err("clear any pending scan command");
 		status = csr_scan_abort_mac_scan(mac,
 			command->u.set_hw_mode_cmd.session_id, INVAL_SCAN_ID);
@@ -15992,7 +15979,7 @@ void csr_process_set_hw_mode(struct mac_context *mac, tSmeCmd *command)
 			goto fail;
 		}
 	}
-
+#endif
 	status = policy_mgr_validate_dbs_switch(mac->psoc, action);
 
 	if (QDF_IS_STATUS_ERROR(status)) {

+ 1 - 1
core/sme/src/csr/csr_api_scan.c

@@ -1351,6 +1351,7 @@ static void csr_save_tx_power_to_cfg(struct mac_context *mac,
 	qdf_mem_free(p_buf);
 }
 
+#ifndef FEATURE_CM_ENABLE
 QDF_STATUS csr_scan_abort_mac_scan(struct mac_context *mac_ctx,
 				   uint32_t vdev_id,
 				   uint32_t scan_id)
@@ -1397,7 +1398,6 @@ QDF_STATUS csr_scan_abort_mac_scan(struct mac_context *mac_ctx,
 	return status;
 }
 
-#ifndef FEATURE_CM_ENABLE
 bool csr_roam_is_valid_channel(struct mac_context *mac, uint32_t ch_freq)
 {
 	bool fValid = false;

+ 2 - 4
core/sme/src/csr/csr_inside_api.h

@@ -125,8 +125,6 @@ struct scan_result_list {
 					(pCommand)->u.roamCmd.roamReason) || \
 					(eCsrForcedDisassocMICFailure == \
 					(pCommand)->u.roamCmd.roamReason)))
-#else
-#define CSR_IS_DISCONNECT_COMMAND(pCommand) false
 #endif
 
 enum csr_roam_state csr_roam_state_change(struct mac_context *mac,
@@ -162,7 +160,6 @@ csr_scan_append_bss_description(struct mac_context *mac,
 QDF_STATUS csr_scan_for_ssid(struct mac_context *mac, uint32_t sessionId,
 			     struct csr_roam_profile *pProfile, uint32_t roamId,
 			     bool notify);
-#endif
 /**
  * csr_scan_abort_mac_scan() - Generic API to abort scan request
  * @mac: pointer to pmac
@@ -175,6 +172,7 @@ QDF_STATUS csr_scan_for_ssid(struct mac_context *mac, uint32_t sessionId,
  */
 QDF_STATUS csr_scan_abort_mac_scan(struct mac_context *mac, uint32_t vdev_id,
 				   uint32_t scan_id);
+#endif
 
 void csr_free_scan_result_entry(struct mac_context *mac, struct tag_csrscan_result
 				*pResult);
@@ -886,9 +884,9 @@ csr_get_fst_bssdescr_ptr(tScanResultHandle result_handle);
 struct bss_description*
 csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle,
 				  struct bss_description *bss_descr);
-#endif
 bool is_disconnect_pending(struct mac_context *mac_ctx,
 				   uint8_t sessionid);
+#endif
 
 QDF_STATUS
 csr_roam_prepare_bss_config_from_profile(struct mac_context *mac_ctx,

+ 1 - 1
core/wma/inc/wma_internal.h

@@ -174,9 +174,9 @@ QDF_STATUS wma_set_ppsconfig(uint8_t vdev_id, uint16_t pps_param,
 #ifndef FEATURE_CM_ENABLE
 void wma_process_roam_invoke(WMA_HANDLE handle,
 				struct roam_invoke_req *roaminvoke);
-#endif
 void wma_process_roam_synch_fail(WMA_HANDLE handle,
 				 struct roam_offload_synch_fail *synch_fail);
+#endif
 
 int wma_roam_synch_event_handler(void *handle, uint8_t *event,
 					uint32_t len);

+ 2 - 2
core/wma/inc/wma_types.h

@@ -220,11 +220,11 @@ enum wmamsgtype {
 
 	WMA_ROAM_PRE_AUTH_STATUS = SIR_HAL_ROAM_PRE_AUTH_STATUS_IND,
 
+#ifndef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
-	WMA_ROAM_OFFLOAD_SYNCH_IND = SIR_HAL_ROAM_OFFLOAD_SYNCH_IND,
 	WMA_ROAM_OFFLOAD_SYNCH_FAIL = SIR_HAL_ROAM_OFFLOAD_SYNCH_FAIL,
 #endif
-
+#endif
 	WMA_8023_MULTICAST_LIST_REQ = SIR_HAL_8023_MULTICAST_LIST_REQ,
 
 #ifdef WLAN_FEATURE_PACKET_FILTERING

+ 1 - 1
core/wma/src/wma_main.c

@@ -8759,12 +8759,12 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
 		break;
 #endif /* WLAN_FEATURE_LINK_LAYER_STATS */
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
+#ifndef FEATURE_CM_ENABLE
 	case WMA_ROAM_OFFLOAD_SYNCH_FAIL:
 		wma_process_roam_synch_fail(wma_handle,
 			(struct roam_offload_synch_fail *)msg->bodyptr);
 		qdf_mem_free(msg->bodyptr);
 		break;
-#ifndef FEATURE_CM_ENABLE
 	case SIR_HAL_ROAM_INVOKE:
 		wma_debug("SIR_HAL_ROAM_INVOKE - wma_process_roam_invoke");
 		wma_process_roam_invoke(wma_handle,

+ 1 - 1
core/wma/src/wma_scan_roam.c

@@ -534,7 +534,6 @@ free_frame_buf:
 		roaminvoke->frame_buf = NULL;
 	}
 }
-#endif
 
 /**
  * wma_process_roam_synch_fail() -roam synch failure handle
@@ -560,6 +559,7 @@ void wma_process_roam_synch_fail(WMA_HANDLE handle,
 			    DEBUG_ROAM_SYNCH_FAIL,
 			    DEBUG_INVALID_PEER_ID, NULL, NULL, 0, 0);
 }
+#endif
 
 /**
  * wma_free_roam_synch_frame_ind() - Free the bcn_probe_rsp, reassoc_req,