Переглянути джерело

qcacld-3.0: Code cleanup for connection manager MLME/SME

Remove unused code related to ndef FEATURE_CM_ENABLE in MLME/SME.

Change-Id: I022823296d2e186450a1a1082a975eccf0b7c122
CRs-Fixed: 2977907
Abhishek Singh 3 роки тому
батько
коміт
5ca9e12a4e
27 змінених файлів з 19 додано та 1531 видалено
  1. 0 3
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c
  2. 0 28
      components/mlme/core/inc/wlan_mlme_main.h
  3. 0 38
      components/mlme/core/src/wlan_mlme_main.c
  4. 0 12
      components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c
  5. 0 22
      components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
  6. 0 3
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c
  7. 1 2
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_i.h
  8. 4 69
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c
  9. 0 2
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h
  10. 0 2
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c
  11. 0 25
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_api.h
  12. 0 17
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c
  13. 0 4
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_disconnect.c
  14. 1 59
      components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h
  15. 3 11
      components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h
  16. 0 2
      components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h
  17. 0 2
      components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h
  18. 2 103
      components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c
  19. 0 3
      components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c
  20. 0 2
      components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c
  21. 1 161
      core/sme/inc/sme_api.h
  22. 0 47
      core/sme/inc/sme_ft_api.h
  23. 6 676
      core/sme/src/common/sme_api.c
  24. 1 192
      core/sme/src/common/sme_ft_api.c
  25. 0 14
      core/sme/src/common/sme_power_save.c
  26. 0 23
      core/sme/src/qos/sme_qos.c
  27. 0 9
      core/sme/src/rrm/sme_rrm.c

+ 0 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -3039,8 +3039,6 @@ static void policy_mgr_nss_update_cb(struct wlan_objmgr_psoc *psoc,
 						next_action, reason,
 						request_id);
 	} else {
-		/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 		if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT ||
 		    reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM) {
 			sme_debug("Continue connect/reassoc on vdev %d request_id %x reason %d",
@@ -3049,7 +3047,6 @@ static void policy_mgr_nss_update_cb(struct wlan_objmgr_psoc *psoc,
 						    request_id,
 						    QDF_STATUS_SUCCESS);
 		}
-#endif
 		policy_mgr_debug("No action needed right now");
 		ret = policy_mgr_set_opportunistic_update(psoc);
 		if (!QDF_IS_STATUS_SUCCESS(ret))

+ 0 - 28
components/mlme/core/inc/wlan_mlme_main.h

@@ -370,7 +370,6 @@ struct wait_for_key_timer {
  * @dynamic_cfg: current configuration of nss, chains for vdev.
  * @ini_cfg: Max configuration of nss, chains supported for vdev.
  * @sta_dynamic_oce_value: Dyanmic oce flags value for sta
- * @roam_invoke_params: Roam invoke params
  * @disconnect_info: Disconnection information
  * @vdev_stop_type: vdev stop type request
  * @roam_off_state: Roam offload state
@@ -403,9 +402,6 @@ struct mlme_legacy_priv {
 	struct wlan_mlme_nss_chains dynamic_cfg;
 	struct wlan_mlme_nss_chains ini_cfg;
 	uint8_t sta_dynamic_oce_value;
-#ifndef FEATURE_CM_ENABLE
-	struct mlme_roam_after_data_stall roam_invoke_params;
-#endif
 	struct wlan_disconnect_info disconnect_info;
 	uint32_t vdev_stop_type;
 	struct wlan_mlme_roam mlme_roam;
@@ -423,9 +419,6 @@ struct mlme_legacy_priv {
 #ifdef WLAN_FEATURE_11AX
 	tDot11fIEhe_cap he_config;
 	uint32_t he_sta_obsspd;
-#endif
-#ifndef FEATURE_CM_ENABLE
-	struct rso_config rso_cfg;
 #endif
 	struct mlme_connect_info connect_info;
 	struct wait_for_key_timer wait_key_timer;
@@ -530,27 +523,6 @@ uint32_t mlme_get_vdev_he_ops(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
 struct wlan_mlme_nss_chains *mlme_get_ini_vdev_config(
 					struct wlan_objmgr_vdev *vdev);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * mlme_get_roam_invoke_params() - get the roam invoke params
- * @vdev: vdev pointer
- *
- * Return: pointer to the vdev roam invoke config structure
- */
-struct mlme_roam_after_data_stall *
-mlme_get_roam_invoke_params(struct wlan_objmgr_vdev *vdev);
-
-/**
- * mlme_is_roam_invoke_in_progress  - Get if roam invoked by host
- * is active.
- * @psoc: Pointer to global psoc.
- * @vdev_id: vdev id
- *
- * Return: True if roaming invoke is in progress
- */
-bool mlme_is_roam_invoke_in_progress(struct wlan_objmgr_psoc *psoc,
-				     uint8_t vdev_id);
-#endif
 /**
  * mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
  * @psoc: pointer to the psoc object

+ 0 - 38
components/mlme/core/src/wlan_mlme_main.c

@@ -91,44 +91,6 @@ struct wlan_mlme_nss_chains *mlme_get_ini_vdev_config(
 	return &mlme_priv->ini_cfg;
 }
 
-#ifndef FEATURE_CM_ENABLE
-struct mlme_roam_after_data_stall *
-mlme_get_roam_invoke_params(struct wlan_objmgr_vdev *vdev)
-{
-	struct mlme_legacy_priv *mlme_priv;
-
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv) {
-		mlme_legacy_err("vdev legacy private object is NULL");
-		return NULL;
-	}
-
-	return &mlme_priv->roam_invoke_params;
-}
-
-bool mlme_is_roam_invoke_in_progress(struct wlan_objmgr_psoc *psoc,
-				     uint8_t vdev_id)
-{
-	struct mlme_roam_after_data_stall *vdev_roam_params;
-	struct wlan_objmgr_vdev *vdev;
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
-						    WLAN_MLME_NB_ID);
-	if (!vdev)
-		return false;
-
-	vdev_roam_params = mlme_get_roam_invoke_params(vdev);
-	if (!vdev_roam_params) {
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-		return false;
-	}
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-
-	return vdev_roam_params->roam_invoke_in_progress;
-}
-#endif
-
 uint8_t *mlme_get_dynamic_oce_flags(struct wlan_objmgr_vdev *vdev)
 {
 	struct mlme_legacy_priv *mlme_priv;

+ 0 - 12
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -1211,11 +1211,6 @@ static void mlme_ext_handler_destroy(struct vdev_mlme_obj *vdev_mlme)
 	mlme_free_self_disconnect_ies(vdev_mlme->vdev);
 	mlme_free_peer_disconnect_ies(vdev_mlme->vdev);
 	mlme_free_sae_auth_retry(vdev_mlme->vdev);
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
-	wlan_cm_rso_config_deinit(vdev_mlme->vdev,
-				  &vdev_mlme->ext_vdev_ptr->rso_cfg);
-#endif
 	mlme_deinit_wait_for_key_timer(&vdev_mlme->ext_vdev_ptr->wait_key_timer);
 	mlme_free_fils_info(&vdev_mlme->ext_vdev_ptr->connect_info);
 	qdf_mem_free(vdev_mlme->ext_vdev_ptr);
@@ -1241,11 +1236,6 @@ QDF_STATUS vdevmgr_mlme_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme)
 
 	mlme_init_rate_config(vdev_mlme);
 	vdev_mlme->ext_vdev_ptr->connect_info.fils_con_info = NULL;
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
-	wlan_cm_rso_config_init(vdev_mlme->vdev,
-				&vdev_mlme->ext_vdev_ptr->rso_cfg);
-#endif
 	mlme_init_wait_for_key_timer(vdev_mlme->vdev,
 				     &vdev_mlme->ext_vdev_ptr->wait_key_timer);
 
@@ -1808,7 +1798,6 @@ static struct mlme_ext_ops ext_ops = {
 	.mlme_vdev_ext_hdl_destroy = vdevmgr_mlme_ext_hdl_destroy,
 	.mlme_vdev_ext_hdl_post_create = vdevmgr_mlme_ext_post_hdl_create,
 	.mlme_vdev_ext_delete_rsp = vdevmgr_vdev_delete_rsp_handle,
-#ifdef FEATURE_CM_ENABLE
 	.mlme_cm_ext_hdl_create_cb = cm_ext_hdl_create,
 	.mlme_cm_ext_hdl_destroy_cb = cm_ext_hdl_destroy,
 	.mlme_cm_ext_connect_start_ind_cb = cm_connect_start_ind,
@@ -1822,5 +1811,4 @@ static struct mlme_ext_ops ext_ops = {
 	.mlme_cm_ext_vdev_down_req_cb = cm_send_vdev_down_req,
 	.mlme_cm_ext_reassoc_req_cb = cm_handle_reassoc_req,
 	.mlme_cm_ext_roam_start_ind_cb = cm_handle_roam_start,
-#endif
 };

+ 0 - 22
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -264,28 +264,6 @@ struct wlan_mlme_dot11_mode {
 	uint32_t vdev_type_dot11_mode;
 };
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * enum roam_invoke_source_entity - Source of invoking roam invoke command.
- * @USERSPACE_INITIATED: Userspace (supplicant)
- * @CONNECTION_MGR_INITIATED: connection mgr initiated.
- */
-enum roam_invoke_source_entity {
-	USERSPACE_INITIATED,
-	CONNECTION_MGR_INITIATED,
-};
-
-/**
- * struct mlme_roam_after_data_stall - roam invoke entity params
- * @roam_invoke_in_progress: is roaming already in progress.
- * @source: source of the roam invoke command.
- */
-struct mlme_roam_after_data_stall {
-	bool roam_invoke_in_progress;
-	enum roam_invoke_source_entity source;
-};
-#endif
-
 /**
  * struct mlme_edca_ac_vi - cwmin, cwmax and  aifs value for edca_ac_vi
  *

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

@@ -40,7 +40,6 @@
 #include "cds_utils.h"
 #include "wlan_roam_debug.h"
 #include "wlan_mlme_twt_api.h"
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_roam.h"
 #include "connection_mgr/core/src/wlan_cm_main.h"
 #include "connection_mgr/core/src/wlan_cm_sm.h"
@@ -1111,5 +1110,3 @@ rel_ref:
 	return status;
 }
 #endif /* WLAN_FEATURE_FIPS */
-
-#endif // FEATURE_CM_ENABLE

+ 1 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_i.h

@@ -31,7 +31,7 @@
 #include "wlan_objmgr_vdev_obj.h"
 #include "connection_mgr/core/src/wlan_cm_main.h"
 #include "wlan_cm_roam_public_struct.h"
-#ifdef FEATURE_CM_ENABLE
+
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /**
  * cm_add_fw_roam_dummy_ser_cb() - Add dummy blocking command
@@ -194,5 +194,4 @@ QDF_STATUS cm_fw_roam_invoke_fail(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_E_NOSUPPORT;
 }
 #endif /*WLAN_FEATURE_ROAM_OFFLOAD */
-#endif /* FEATURE_CM_ENABLE */
 #endif /* _WLAN_CM_ROAM_I_H_ */

+ 4 - 69
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -37,11 +37,9 @@
 #include "wlan_cm_vdev_api.h"
 #include "cfg_nan_api.h"
 #include "wlan_mlme_api.h"
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_roam.h"
 #include "connection_mgr/core/src/wlan_cm_main.h"
 #include "connection_mgr/core/src/wlan_cm_sm.h"
-#endif
 
 #ifdef WLAN_FEATURE_SAE
 #define CM_IS_FW_FT_SAE_SUPPORTED(fw_akm_bitmap) \
@@ -2630,13 +2628,6 @@ cm_roam_stop_req(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	if (QDF_IS_STATUS_ERROR(status)) {
 		mlme_debug("fail to send roam stop");
 	}
-#ifndef FEATURE_CM_ENABLE
-	else {
-		status = wlan_cm_roam_scan_offload_rsp(vdev_id, reason);
-		if (QDF_IS_STATUS_ERROR(status))
-			mlme_debug("fail to send rso rsp msg");
-	}
-#endif
 
 rel_vdev_ref:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
@@ -2803,7 +2794,6 @@ cm_akm_roam_allowed(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
-#ifdef FEATURE_CM_ENABLE
 #ifdef WLAN_ADAPTIVE_11R
 static bool
 cm_is_adaptive_11r_roam_supported(struct wlan_mlme_psoc_ext_obj *mlme_obj,
@@ -2922,14 +2912,6 @@ static QDF_STATUS cm_is_rso_allowed(struct wlan_objmgr_psoc *psoc,
 
 	return status;
 }
-#else
-static QDF_STATUS cm_is_rso_allowed(struct wlan_objmgr_psoc *psoc,
-				    uint8_t vdev_id, uint8_t command,
-				    uint8_t reason)
-{
-	return wlan_cm_roam_cmd_allowed(psoc, vdev_id, command, reason);
-}
-#endif
 
 QDF_STATUS cm_roam_send_rso_cmd(struct wlan_objmgr_psoc *psoc,
 				uint8_t vdev_id, uint8_t rso_command,
@@ -3007,11 +2989,6 @@ cm_roam_switch_to_rso_stop(struct wlan_objmgr_pdev *pdev,
 	 */
 	default:
 
-#ifndef FEATURE_CM_ENABLE
-		/* For LFR2 BTM request, need handoff even roam disabled */
-		if (reason == REASON_OS_REQUESTED_ROAMING_NOW)
-			wlan_cm_roam_neighbor_proceed_with_handoff_req(vdev_id);
-#endif
 		return QDF_STATUS_SUCCESS;
 	}
 	mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_RSO_STOPPED);
@@ -3019,24 +2996,6 @@ cm_roam_switch_to_rso_stop(struct wlan_objmgr_pdev *pdev,
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifndef FEATURE_CM_ENABLE
-static void cm_roam_roam_invoke_in_progress(struct wlan_objmgr_psoc *psoc,
-					    uint8_t vdev_id, bool set)
-{
-	struct wlan_objmgr_vdev *vdev;
-	struct mlme_roam_after_data_stall *vdev_roam_params;
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
-						    WLAN_MLME_NB_ID);
-	if (!vdev)
-		return;
-	vdev_roam_params = mlme_get_roam_invoke_params(vdev);
-	if (vdev_roam_params)
-		vdev_roam_params->roam_invoke_in_progress = set;
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-}
-#endif
-
 /**
  * cm_roam_switch_to_deinit() - roam state handling for roam deinit
  * @pdev: pdev pointer
@@ -3057,9 +3016,6 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev,
 	enum roam_offload_state cur_state = mlme_get_roam_state(psoc, vdev_id);
 	bool sup_disabled_roam;
 
-#ifndef FEATURE_CM_ENABLE
-	cm_roam_roam_invoke_in_progress(psoc, vdev_id, false);
-#endif
 	switch (cur_state) {
 	/*
 	 * If RSO stop is not done already, send RSO stop first and
@@ -3160,11 +3116,6 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_FAILURE;
 
 	dual_sta_policy = &mlme_obj->cfg.gen.dual_sta_policy;
-
-#ifndef FEATURE_CM_ENABLE
-	cm_roam_roam_invoke_in_progress(psoc, vdev_id, false);
-#endif
-
 	dual_sta_roam_active =
 		wlan_mlme_get_dual_sta_roaming_enabled(psoc);
 
@@ -3425,12 +3376,8 @@ cm_roam_switch_to_roam_start(struct wlan_objmgr_pdev *pdev,
 		 * notification. Allow roam start in this condition.
 		 */
 		if (mlme_get_supplicant_disabled_roaming(psoc, vdev_id) &&
-#ifdef FEATURE_CM_ENABLE
-		    wlan_cm_roaming_in_progress(pdev, vdev_id)
-#else
-		    mlme_is_roam_invoke_in_progress(psoc, vdev_id)
-#endif
-		) {
+
+		    wlan_cm_roaming_in_progress(pdev, vdev_id)) {
 			mlme_set_roam_state(psoc, vdev_id,
 					    WLAN_ROAMING_IN_PROG);
 			break;
@@ -3474,12 +3421,7 @@ cm_roam_switch_to_roam_sync(struct wlan_objmgr_pdev *pdev,
 		 * deauth roam trigger to stop data path queues
 		 */
 	case WLAN_ROAMING_IN_PROG:
-#ifdef FEATURE_CM_ENABLE
-		if (!cm_is_vdevid_active(pdev, vdev_id))
-#else
-		if (!wlan_cm_is_sta_connected(vdev_id))
-#endif
-		{
+		if (!cm_is_vdevid_active(pdev, vdev_id)) {
 			mlme_err("ROAM: STA not in connected state");
 			return QDF_STATUS_E_FAILURE;
 		}
@@ -3493,12 +3435,7 @@ cm_roam_switch_to_roam_sync(struct wlan_objmgr_pdev *pdev,
 		 * this state transition
 		 */
 		if (mlme_get_supplicant_disabled_roaming(psoc, vdev_id) &&
-#ifdef FEATURE_CM_ENABLE
-		    wlan_cm_roaming_in_progress(pdev, vdev_id)
-#else
-		    mlme_is_roam_invoke_in_progress(psoc, vdev_id)
-#endif
-		    ) {
+		    wlan_cm_roaming_in_progress(pdev, vdev_id)) {
 			mlme_set_roam_state(psoc, vdev_id,
 					    WLAN_ROAM_SYNCH_IN_PROG);
 			break;
@@ -4434,7 +4371,6 @@ rel_vdev_ref:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
 }
 
-#ifdef FEATURE_CM_ENABLE
 QDF_STATUS cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
 				struct wlan_objmgr_vdev *vdev,
 				struct qdf_mac_addr *bssid,
@@ -4685,4 +4621,3 @@ bool cm_roam_offload_enabled(struct wlan_objmgr_psoc *psoc)
 	return val;
 }
 #endif  /* WLAN_FEATURE_ROAM_OFFLOAD */
-#endif  /* FEATURE_CM_ENABLE */

+ 0 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h

@@ -109,7 +109,6 @@ cm_roam_fill_rssi_change_params(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
  */
 void cm_dump_freq_list(struct rso_chan_info *chan_info);
 
-#ifdef FEATURE_CM_ENABLE
 /**
  * cm_start_roam_invoke() - Validate and send Roam invoke req to CM
  * @pdev: Pdev pointer
@@ -127,7 +126,6 @@ cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
 		     uint32_t chan_freq,
 		     enum wlan_cm_source source);
 #endif
-#endif
 
 #ifdef FEATURE_WLAN_ESE
 /**

+ 0 - 2
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c

@@ -32,7 +32,6 @@
 #include "wlan_serialization_api.h"
 #include "wlan_cm_roam_api.h"
 #include <wlan_cfg80211_scan.h>
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_roam.h"
 #include "connection_mgr/core/src/wlan_cm_sm.h"
 #include "connection_mgr/core/src/wlan_cm_main_api.h"
@@ -334,4 +333,3 @@ rel_ref:
 
 	return status;
 }
-#endif /*FEATURE_CM_ENABLE */

+ 0 - 25
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_api.h

@@ -26,13 +26,10 @@
 
 #include <wlan_cm_public_struct.h>
 #include "scheduler_api.h"
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_main.h"
 #include "connection_mgr/core/src/wlan_cm_main_api.h"
-#endif
 #include <wlan_cm_roam_api.h>
 
-#ifdef FEATURE_CM_ENABLE
 /**
  * struct cm_vdev_join_req - connect req from legacy CM to vdev manager
  * @vdev_id: vdev id
@@ -142,7 +139,6 @@ struct cm_host_roam_start_ind {
 struct cm_ext_obj {
 	struct rso_config rso_cfg;
 };
-#endif
 
 #ifdef WLAN_FEATURE_FILS_SK
 /**
@@ -248,26 +244,6 @@ void cm_csr_set_idle(uint8_t vdev_id);
 int8_t cm_get_rssi_by_bssid(struct wlan_objmgr_pdev *pdev,
 			    struct qdf_mac_addr *bssid);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * cm_csr_is_handoff_in_progress() - CM CSR API to check handoff in progress
- * @vdev_id: vdev_id
- *
- * Return: true if handoff is in progress, else false
- */
-bool cm_csr_is_handoff_in_progress(uint8_t vdev_id);
-
-/**
- * cm_csr_disconnect_on_wait_key_timeout() - CM CSR API to issue disconnect on
- * wait for key timeout
- * @vdev_id: vdev_id
- *
- * Return: None
- */
-void cm_csr_disconnect_on_wait_key_timeout(uint8_t vdev_id);
-#endif
-
-#ifdef FEATURE_CM_ENABLE
 static inline QDF_STATUS
 cm_ext_hdl_create(struct wlan_objmgr_vdev *vdev, cm_ext_t **ext_cm_ptr)
 {
@@ -670,5 +646,4 @@ QDF_STATUS wlan_cm_send_connect_rsp(struct scheduler_msg *msg);
  * Return: void
  */
 void wlan_cm_free_connect_rsp(struct cm_vdev_join_rsp *rsp);
-#endif /* FEATURE_CM_ENABLE */
 #endif /* __WLAN_CM_VDEV_API_H__ */

+ 0 - 17
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -78,7 +78,6 @@ void cm_update_hlp_info(struct wlan_objmgr_vdev *vdev,
 }
 #endif
 
-#ifdef FEATURE_CM_ENABLE
 static bool wlan_cm_is_vdev_id_roam_reassoc_state(struct wlan_objmgr_vdev *vdev)
 {
 	return wlan_cm_is_vdev_roam_reassoc_state(vdev);
@@ -91,19 +90,6 @@ wlan_cm_disconnect_on_wait_key_timeout(struct wlan_objmgr_psoc *psoc,
 	cm_disconnect(psoc, vdev->vdev_objmgr.vdev_id, CM_MLME_DISCONNECT,
 		      REASON_KEY_TIMEOUT, NULL);
 }
-#else
-static bool wlan_cm_is_vdev_id_roam_reassoc_state(struct wlan_objmgr_vdev *vdev)
-{
-	return cm_csr_is_handoff_in_progress(vdev->vdev_objmgr.vdev_id);
-}
-
-static void
-wlan_cm_disconnect_on_wait_key_timeout(struct wlan_objmgr_psoc *psoc,
-				       struct wlan_objmgr_vdev *vdev)
-{
-	cm_csr_disconnect_on_wait_key_timeout(vdev->vdev_objmgr.vdev_id);
-}
-#endif
 
 void cm_wait_for_key_time_out_handler(void *data)
 {
@@ -969,7 +955,6 @@ void cm_get_sta_cxn_info(struct wlan_objmgr_vdev *vdev,
 #endif
 #endif
 
-#ifdef FEATURE_CM_ENABLE
 QDF_STATUS cm_connect_start_ind(struct wlan_objmgr_vdev *vdev,
 				struct wlan_cm_connect_req *req)
 {
@@ -1460,5 +1445,3 @@ bool cm_is_vdevid_active(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 
 	return active;
 }
-
-#endif

+ 0 - 4
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_disconnect.c

@@ -30,11 +30,8 @@
 #include <wlan_objmgr_vdev_obj.h>
 #include <wlan_cm_roam_api.h>
 #include "wni_api.h"
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_roam.h"
-#endif
 
-#ifdef FEATURE_CM_ENABLE
 QDF_STATUS cm_disconnect_start_ind(struct wlan_objmgr_vdev *vdev,
 				   struct wlan_cm_disconnect_req *req)
 {
@@ -438,4 +435,3 @@ QDF_STATUS cm_handle_disconnect_resp(struct scheduler_msg *msg)
 
 	return QDF_STATUS_SUCCESS;
 }
-#endif

+ 1 - 59
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h

@@ -89,47 +89,6 @@ QDF_STATUS
 wlan_roam_update_cfg(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 		     uint8_t reason);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * wlan_cm_roam_cmd_allowed() - check roam cmd is allowed or not
- * @psoc: pointer to psoc object
- * @vdev_id: vdev id
- * @rso_command: roam scan offload command
- * @reason: reason to roam
- *
- * This function gets called to check roam cmd is allowed or not
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS
-wlan_cm_roam_cmd_allowed(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
-			 uint8_t rso_command, uint8_t reason);
-
-/**
- * wlan_cm_roam_neighbor_proceed_with_handoff_req() - invoke host handover to
- * new AP
- * @vdev_id: vdev id
- *
- * This function gets called to invoke host handover to new AP
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS
-wlan_cm_roam_neighbor_proceed_with_handoff_req(uint8_t vdev_id);
-
-/**
- * wlan_cm_roam_scan_offload_rsp() - send roam scan offload response message
- * @vdev_id: vdev id
- * @reason: reason to roam
- *
- * This function gets called to send roam scan offload response message
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS
-wlan_cm_roam_scan_offload_rsp(uint8_t vdev_id, uint8_t reason);
-#endif
-
 /**
  * wlan_cm_send_beacon_miss() - initiate beacon miss
  * @vdev_id: vdev id
@@ -523,21 +482,6 @@ struct wlan_fils_connection_info *wlan_cm_get_fils_connection_info(
 		struct wlan_objmgr_psoc *psoc,
 		uint8_t vdev_id);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * wlan_cm_update_mlme_fils_connection_info  - Update FILS connection info
- * to mlme vdev private object
- * @psoc: Pointer to psoc object
- * @src_fils_info: Current profile FILS connection information
- * @vdev_id: vdev_id
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
-		struct wlan_objmgr_psoc *psoc,
-		struct wlan_fils_connection_info *src_fils_info,
-		uint8_t vdev_id);
-#else
 /**
  * wlan_cm_update_mlme_fils_info  - Update FILS connection info
  * to mlme vdev private object
@@ -549,7 +493,7 @@ QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
 QDF_STATUS
 wlan_cm_update_mlme_fils_info(struct wlan_objmgr_vdev *vdev,
 			      struct wlan_fils_con_info *src_fils_info);
-#endif
+
 /**
  * wlan_cm_update_fils_ft - Update the FILS FT derived to mlme
  * @psoc: Psoc pointer
@@ -637,7 +581,6 @@ void cm_update_session_assoc_ie(struct wlan_objmgr_psoc *psoc,
 				uint8_t vdev_id,
 				struct element_info *assoc_ie);
 
-#ifdef FEATURE_CM_ENABLE
 /**
  * wlan_cm_roam_invoke() - Validate and send Roam invoke req to CM
  * @pdev: Pdev pointer
@@ -731,7 +674,6 @@ static inline QDF_STATUS wlan_cm_host_roam_start(struct scheduler_msg *msg)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-#endif
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /**

+ 3 - 11
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -89,15 +89,9 @@
 #define REASON_ROAM_ABORT                           53
 #define REASON_ROAM_SET_PRIMARY                     54
 
-#ifdef FEATURE_CM_ENABLE
 #define FILS_MAX_KEYNAME_NAI_LENGTH WLAN_CM_FILS_MAX_KEYNAME_NAI_LENGTH
 #define WLAN_FILS_MAX_REALM_LEN WLAN_CM_FILS_MAX_REALM_LEN
 #define WLAN_FILS_MAX_RRK_LENGTH WLAN_CM_FILS_MAX_RRK_LENGTH
-#else
-#define FILS_MAX_KEYNAME_NAI_LENGTH 253
-#define WLAN_FILS_MAX_REALM_LEN 255
-#define WLAN_FILS_MAX_RRK_LENGTH 64
-#endif
 
 #define FILS_MAX_HLP_DATA_LEN 2048
 
@@ -113,7 +107,7 @@
 #define MAX_BSSID_AVOID_LIST     16
 #define MAX_BSSID_FAVORED      16
 
-#if defined(FEATURE_CM_ENABLE) && defined(WLAN_FEATURE_HOST_ROAM)
+#ifdef WLAN_FEATURE_HOST_ROAM
 #define MAX_FTIE_SIZE CM_MAX_FTIE_SIZE
 #else
 #define MAX_FTIE_SIZE 384
@@ -267,7 +261,7 @@ enum roam_fail_params {
 	ROAM_FAIL_REASON,
 };
 
-#if defined(FEATURE_CM_ENABLE) && defined(WLAN_FEATURE_HOST_ROAM)
+#ifdef WLAN_FEATURE_HOST_ROAM
 /**
  * srtuct reassoc_timer_ctx - reassoc timer context
  * @pdev: pdev object pointer
@@ -330,7 +324,7 @@ struct reassoc_timer_ctx {
  * @lost_link_rssi: lost link RSSI
  */
 struct rso_config {
-#if defined(FEATURE_CM_ENABLE) && defined(WLAN_FEATURE_HOST_ROAM)
+#ifdef WLAN_FEATURE_HOST_ROAM
 	qdf_mc_timer_t reassoc_timer;
 	struct reassoc_timer_ctx ctx;
 #endif
@@ -1732,11 +1726,9 @@ struct wlan_cm_roam_tx_ops {
 					 struct wlan_roam_triggers *req);
 	QDF_STATUS (*send_roam_disable_config)(struct wlan_objmgr_vdev *vdev,
 				struct roam_disable_cfg *req);
-#ifdef FEATURE_CM_ENABLE
 	QDF_STATUS (*send_roam_invoke_cmd)(struct wlan_objmgr_vdev *vdev,
 					   struct roam_invoke_req *req);
 	QDF_STATUS (*send_roam_sync_complete_cmd)(struct wlan_objmgr_vdev *vdev);
-#endif
 };
 
 /**

+ 0 - 2
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h

@@ -132,7 +132,6 @@ ucfg_cm_update_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
-#ifdef FEATURE_CM_ENABLE
 /**
  * ucfg_wlan_cm_roam_invoke() - Invokes Roam request
  * @pdev: Pointer to pdev
@@ -162,6 +161,5 @@ ucfg_cm_update_fils_config(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 #endif
-#endif
 
 #endif /* _WLAN_CM_ROAM_UCFG_API_H_ */

+ 0 - 2
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_tgt_if_tx_api.h

@@ -131,7 +131,6 @@ QDF_STATUS wlan_cm_tgt_send_roam_triggers(struct wlan_objmgr_psoc *psoc,
 					  uint8_t vdev_id,
 					  struct wlan_roam_triggers *req);
 
-#ifdef FEATURE_CM_ENABLE
 /**
  * wlan_cm_tgt_send_roam_triggers()  - Send roam trigger command to FW
  * @psoc: psoc pointer
@@ -154,7 +153,6 @@ QDF_STATUS
 wlan_cm_tgt_send_roam_sync_complete_cmd(struct wlan_objmgr_psoc *psoc,
 					uint8_t vdev_id);
 #endif
-#endif
 
 /**
  * wlan_cm_tgt_send_roam_disable_config()  - Send roam disable config command

+ 2 - 103
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -28,9 +28,7 @@
 #include <../../core/src/wlan_cm_vdev_api.h>
 #include "wlan_crypto_global_api.h"
 #include <wlan_cm_api.h>
-#ifdef FEATURE_CM_ENABLE
 #include "connection_mgr/core/src/wlan_cm_roam.h"
-#endif
 
 /* Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.) */
 #define BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
@@ -232,7 +230,6 @@ release_ref:
 	return status;
 }
 
-#ifdef FEATURE_CM_ENABLE
 bool wlan_cm_host_roam_in_progress(struct wlan_objmgr_psoc *psoc,
 				   uint8_t vdev_id)
 {
@@ -254,7 +251,6 @@ bool wlan_cm_host_roam_in_progress(struct wlan_objmgr_psoc *psoc,
 
 	return host_roam_in_progress;
 }
-#endif
 
 QDF_STATUS wlan_cm_abort_rso(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
@@ -295,10 +291,6 @@ release_ref:
 
 bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 {
-#ifndef FEATURE_CM_ENABLE
-	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-	QDF_STATUS status;
-#endif
 	bool roaming_in_progress = false;
 	struct wlan_objmgr_vdev *vdev;
 
@@ -309,23 +301,7 @@ bool wlan_cm_roaming_in_progress(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id)
 		return roaming_in_progress;
 	}
 
-	/* this is temp change will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	roaming_in_progress = wlan_cm_is_vdev_roaming(vdev);
-#else
-	status = cm_roam_acquire_lock(vdev);
-	if (QDF_IS_STATUS_ERROR(status))
-		goto release_ref;
-
-	if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) ||
-	    MLME_IS_ROAMING_IN_PROG(psoc, vdev_id) ||
-	    mlme_is_roam_invoke_in_progress(psoc, vdev_id) ||
-	    wlan_cm_host_roam_in_progress(psoc, vdev_id))
-		roaming_in_progress = true;
-
-	cm_roam_release_lock(vdev);
-release_ref:
-#endif
 
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
 
@@ -1180,7 +1156,7 @@ static void cm_rso_chan_to_freq_list(struct wlan_objmgr_pdev *pdev,
 			wlan_reg_legacy_chan_to_freq(pdev, chan_list[count]);
 }
 
-#if defined(FEATURE_CM_ENABLE) && defined(WLAN_FEATURE_HOST_ROAM)
+#ifdef WLAN_FEATURE_HOST_ROAM
 static QDF_STATUS cm_init_reassoc_timer(struct rso_config *rso_cfg)
 {
 	QDF_STATUS status;
@@ -1237,9 +1213,7 @@ QDF_STATUS wlan_cm_rso_config_init(struct wlan_objmgr_vdev *vdev,
 	if (QDF_IS_STATUS_ERROR(status))
 		return status;
 
-#ifdef FEATURE_CM_ENABLE
 	qdf_mutex_create(&rso_cfg->cm_rso_lock);
-#endif
 	cfg_params = &rso_cfg->cfg_param;
 	cfg_params->max_chan_scan_time =
 		mlme_obj->cfg.lfr.neighbor_scan_max_chan_time;
@@ -1344,13 +1318,11 @@ void wlan_cm_rso_config_deinit(struct wlan_objmgr_vdev *vdev,
 	cm_flush_roam_channel_list(&cfg_params->specific_chan_info);
 	cm_flush_roam_channel_list(&cfg_params->pref_chan_info);
 
-#ifdef FEATURE_CM_ENABLE
 	qdf_mutex_destroy(&rso_cfg->cm_rso_lock);
-#endif
+
 	cm_deinit_reassoc_timer(rso_cfg);
 }
 
-#ifdef FEATURE_CM_ENABLE
 struct rso_config *wlan_cm_get_rso_config_fl(struct wlan_objmgr_vdev *vdev,
 					     const char *func, uint32_t line)
 
@@ -1501,28 +1473,6 @@ QDF_STATUS cm_mlme_roam_preauth_fail(struct wlan_objmgr_vdev *vdev,
 }
 #endif
 
-#else
-struct rso_config *wlan_cm_get_rso_config_fl(struct wlan_objmgr_vdev *vdev,
-					     const char *func, uint32_t line)
-{
-	struct mlme_legacy_priv *mlme_priv;
-	enum QDF_OPMODE op_mode = wlan_vdev_mlme_get_opmode(vdev);
-
-	/* get only for CLI and STA */
-	if (op_mode != QDF_STA_MODE && op_mode != QDF_P2P_CLIENT_MODE)
-		return NULL;
-
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv) {
-		mlme_nofl_err("%s:%u: vdev %d legacy private object is NULL",
-			      func, line, wlan_vdev_get_id(vdev));
-		return NULL;
-	}
-
-	return &mlme_priv->rso_cfg;
-}
-#endif
-
 void wlan_cm_fill_crypto_filter_from_vdev(struct wlan_objmgr_vdev *vdev,
 					  struct scan_filter *filter)
 {
@@ -1746,56 +1696,6 @@ rel_vdev_ref:
 }
 
 #ifdef WLAN_FEATURE_FILS_SK
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS wlan_cm_update_mlme_fils_connection_info(
-		struct wlan_objmgr_psoc *psoc,
-		struct wlan_fils_connection_info *src_fils_info,
-		uint8_t vdev_id)
-{
-	struct wlan_objmgr_vdev *vdev;
-	struct mlme_legacy_priv *mlme_priv;
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
-						    WLAN_MLME_NB_ID);
-	if (!vdev) {
-		mlme_err("vdev object is NULL");
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv) {
-		mlme_err("vdev legacy private object is NULL");
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	if (!src_fils_info) {
-		mlme_debug("FILS: vdev:%d Clear fils info", vdev_id);
-		qdf_mem_free(mlme_priv->connect_info.fils_con_info);
-		mlme_priv->connect_info.fils_con_info = NULL;
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-		return QDF_STATUS_SUCCESS;
-	}
-
-	if (mlme_priv->connect_info.fils_con_info)
-		qdf_mem_free(mlme_priv->connect_info.fils_con_info);
-
-	mlme_priv->connect_info.fils_con_info =
-		qdf_mem_malloc(sizeof(struct wlan_fils_connection_info));
-	if (!mlme_priv->connect_info.fils_con_info) {
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-		return QDF_STATUS_E_NOMEM;
-	}
-
-	mlme_debug("FILS: vdev:%d update fils info", vdev_id);
-	qdf_mem_copy(mlme_priv->connect_info.fils_con_info, src_fils_info,
-		     sizeof(struct wlan_fils_connection_info));
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
-
-	return QDF_STATUS_SUCCESS;
-}
-#else
 QDF_STATUS
 wlan_cm_update_mlme_fils_info(struct wlan_objmgr_vdev *vdev,
 			      struct wlan_fils_con_info *src_fils_info)
@@ -1845,7 +1745,6 @@ wlan_cm_update_mlme_fils_info(struct wlan_objmgr_vdev *vdev,
 
 	return QDF_STATUS_SUCCESS;
 }
-#endif
 
 void wlan_cm_update_hlp_info(struct wlan_objmgr_psoc *psoc,
 			     const uint8_t *gen_ie, uint16_t len,

+ 0 - 3
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c

@@ -230,7 +230,6 @@ QDF_STATUS ucfg_cm_set_cckm_ie(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 
 #endif
 
-#ifdef FEATURE_CM_ENABLE
 #ifdef WLAN_FEATURE_FILS_SK
 QDF_STATUS
 ucfg_cm_update_fils_config(struct wlan_objmgr_psoc *psoc,
@@ -261,5 +260,3 @@ ucfg_wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
 {
 	return wlan_cm_roam_invoke(pdev, vdev_id, bssid, ch_freq, source);
 }
-
-#endif

+ 0 - 2
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c

@@ -428,7 +428,6 @@ QDF_STATUS wlan_cm_tgt_send_roam_disable_config(struct wlan_objmgr_psoc *psoc,
 	return status;
 }
 
-#ifdef FEATURE_CM_ENABLE
 QDF_STATUS
 wlan_cm_tgt_send_roam_invoke_req(struct wlan_objmgr_psoc *psoc,
 				 struct roam_invoke_req *roam_invoke_req)
@@ -494,4 +493,3 @@ wlan_cm_tgt_send_roam_sync_complete_cmd(struct wlan_objmgr_psoc *psoc,
 
 	return status;
 }
-#endif

+ 1 - 161
core/sme/inc/sme_api.h

@@ -432,14 +432,6 @@ void sme_cleanup_session(mac_handle_t mac_handle, uint8_t vdev_id);
  */
 void sme_set_curr_device_mode(mac_handle_t mac_handle,
 			      enum QDF_OPMODE curr_device_mode);
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_update_nud_config() - update nud config
- * @mac_handle: The handle returned by mac_open.
- * @nud_fail_behavior: Vlaue of nud fail behaviour
- */
-void sme_update_nud_config(mac_handle_t mac_handle, uint8_t nud_fail_behavior);
-#endif
 /**
  * sme_update_roam_params() - Store/Update the roaming params
  * @mac_handle: Opaque handle to the global MAC context
@@ -531,25 +523,6 @@ QDF_STATUS sme_scan_get_result(mac_handle_t mac_handle, uint8_t vdev_id,
 			       struct scan_filter *filter,
 			       tScanResultHandle *phResult);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_get_ap_channel_from_scan_cache() - a wrapper function to get AP's channel
- * from CSR by filtering the result which matches our roam profile.
- * @profile: SAP profile
- * @ap_ch_freq: pointer to channel id of SAP. Fill the value after finding the
- *              best ap from scan cache.
- * @vdev_id: vdev id
- *
- * This function is written to get AP's channel id from CSR by filtering
- * the result which matches our roam profile. This is a synchronous call.
- *
- * Return: QDF_STATUS.
- */
-QDF_STATUS sme_get_ap_channel_from_scan_cache(struct csr_roam_profile *profile,
-					      tScanResultHandle *scan_cache,
-					      uint32_t *ap_ch_freq,
-					      uint8_t vdev_id);
-#endif
 tCsrScanResultInfo *sme_scan_result_get_first(mac_handle_t,
 		tScanResultHandle hScanResult);
 tCsrScanResultInfo *sme_scan_result_get_next(mac_handle_t,
@@ -557,12 +530,7 @@ tCsrScanResultInfo *sme_scan_result_get_next(mac_handle_t,
 QDF_STATUS sme_scan_result_purge(tScanResultHandle hScanResult);
 QDF_STATUS sme_roam_connect(mac_handle_t mac_handle, uint8_t sessionId,
 		struct csr_roam_profile *pProfile, uint32_t *pRoamId);
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
-		struct csr_roam_profile *pProfile,
-		tCsrRoamModifyProfileFields modProfileFields,
-		uint32_t *pRoamId, bool fForce);
-#endif
+
 /**
  * sme_roam_disconnect() - API to request CSR to disconnect
  * @mac_handle: Opaque handle to the global MAC context
@@ -582,10 +550,6 @@ QDF_STATUS sme_roam_disconnect_sta(mac_handle_t mac_handle, uint8_t sessionId,
 		struct csr_del_sta_params *p_del_sta_params);
 QDF_STATUS sme_roam_deauth_sta(mac_handle_t mac_handle, uint8_t sessionId,
 		struct csr_del_sta_params *pDelStaParams);
-#ifndef FEATURE_CM_ENABLE
-struct bss_description *sme_roam_get_connect_bss_desc(mac_handle_t mac_handle,
-						       uint8_t vdev_id);
-#endif
 
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 /**
@@ -657,28 +621,6 @@ QDF_STATUS sme_roam_set_psk_pmk(mac_handle_t mac_handle, uint8_t sessionId,
 }
 #endif
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_roam_get_wpa_rsn_req_ie() - Retrieve WPA/RSN Request IE
- * @mac_handle: Opaque handle to the global MAC context
- * @session_id: ID of the specific session
- * @len: Caller allocated memory that has the length of @buf as input.
- *	Upon returned, @len has the length of the IE store in @buf
- * @buf: Caller allocated memory that contain the IE field, if any,
- *	upon return
- *
- * A wrapper function to request CSR to return the WPA or RSN IE CSR
- * passes to PE to JOIN request or START_BSS request
- * This is a synchronous call.
- *
- * Return: QDF_STATUS - when fail, it usually means the buffer allocated is not
- *			 big enough
- */
-QDF_STATUS sme_roam_get_wpa_rsn_req_ie(mac_handle_t mac_handle,
-				       uint8_t session_id,
-				       uint32_t *len, uint8_t *buf);
-#endif
-
 QDF_STATUS sme_get_config_param(mac_handle_t mac_handle,
 				struct sme_config_params *pParam);
 QDF_STATUS sme_get_snr(mac_handle_t mac_handle,
@@ -704,13 +646,6 @@ QDF_STATUS sme_set_plm_request(mac_handle_t mac_handle,
 			       struct plm_req_params *req);
 #endif /*FEATURE_WLAN_ESE */
 
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_get_modify_profile_fields(mac_handle_t mac_handle,
-					 uint8_t sessionId,
-					 tCsrRoamModifyProfileFields *
-					 pModifyProfileFields);
-#endif
-
 #ifdef FEATURE_OEM_DATA_SUPPORT
 QDF_STATUS sme_register_oem_data_rsp_callback(mac_handle_t mac_handle,
 		sme_send_oem_data_rsp_msg callback);
@@ -1188,23 +1123,12 @@ bool sme_is_feature_supported_by_fw(enum cap_bitmap feature);
 QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode);
 eCsrPhyMode sme_get_phy_mode(mac_handle_t mac_handle);
 
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_handoff_request(mac_handle_t mac_handle, uint8_t sessionId,
-			       tCsrHandoffRequest *pHandoffInfo);
-#endif
 QDF_STATUS sme_add_periodic_tx_ptrn(mac_handle_t mac_handle,
 		tSirAddPeriodicTxPtrn *addPeriodicTxPtrnParams);
 QDF_STATUS sme_del_periodic_tx_ptrn(mac_handle_t mac_handle,
 		tSirDelPeriodicTxPtrn *delPeriodicTxPtrnParams);
 QDF_STATUS sme_send_rate_update_ind(mac_handle_t mac_handle,
 		tSirRateUpdateInd *rateUpdateParams);
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle,
-					 uint8_t vdev_id,
-					 struct wlan_crypto_pmksa *pmksa,
-					 bool set_pmk);
-#endif
-
 void sme_get_command_q_status(mac_handle_t mac_handle);
 
 /**
@@ -2428,68 +2352,6 @@ QDF_STATUS sme_get_rssi_snr_by_bssid(mac_handle_t mac_handle,
 				     const uint8_t *bssid, int8_t *rssi,
 				     int8_t *snr);
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_get_beacon_frm() - gets the bss descriptor from scan cache and prepares
- * beacon frame
- * @mac_handle: handle returned by mac_open
- * @profile: current connected profile
- * @bssid: bssid to look for in scan cache
- * @frame_buf: frame buffer to populate
- * @frame_len: length of constructed frame
- * @ch_freq: Pointer to channel freq info to be filled
- * @vdev_id: vdev id
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_get_beacon_frm(mac_handle_t mac_handle,
-			      struct csr_roam_profile *profile,
-			      const tSirMacAddr bssid,
-			      uint8_t **frame_buf, uint32_t *frame_len,
-			      uint32_t *ch_freq, uint8_t vdev_id);
-
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-/**
- * sme_fast_reassoc() - invokes FAST REASSOC command
- * @mac_handle: handle returned by mac_open
- * @profile: current connected profile
- * @bssid: bssid to look for in scan cache
- * @ch_freq: channel on which reassoc should be send
- * @vdev_id: vdev id
- * @connected_bssid: bssid of currently connected profile
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
-			    struct csr_roam_profile *profile,
-			    const tSirMacAddr bssid, uint32_t ch_freq,
-			    uint8_t vdev_id, const tSirMacAddr connected_bssid);
-
-/**
- * sme_roam_invoke_nud_fail() - invokes REASSOC command to best available bssid
- * @mac_handle: handle returned by mac_open
- * @vdev_id: vdev id
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id);
-#else
-static inline
-QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
-			    struct csr_roam_profile *profile,
-			    const tSirMacAddr bssid, uint32_t ch_freq,
-			    uint8_t vdev_id, const tSirMacAddr connected_bssid)
-{
-	return QDF_STATUS_SUCCESS;
-}
-
-static inline
-QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
-#endif
 /**
  * sme_register_tx_queue_cb(): Register tx queue callback
  * @mac_handle: Opaque handle for MAC context
@@ -2865,20 +2727,6 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
 				       uint8_t vdev_id);
 
 #if defined(WLAN_FEATURE_FILS_SK)
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_update_fils_config - Update FILS config to CSR roam session
- * @mac_handle: Opaque handle to the global MAC context
- * @vdev_id: vdev id
- * @src_profile: Source roam profile having latest FILS config
- *
- * API to update FILS config to roam csr session.
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
-				  struct csr_roam_profile *src_profile);
-#endif
 /**
  * sme_free_join_rsp_fils_params - free fils params
  * @roam_info: roam info
@@ -2887,14 +2735,6 @@ QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
  */
 void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info);
 #else
-#ifndef FEATURE_CM_ENABLE
-static inline
-QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
-				  struct csr_roam_profile *src_profile)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif
 static inline
 void sme_free_join_rsp_fils_params(struct csr_roam_info *roam_info)
 {}

+ 0 - 47
core/sme/inc/sme_ft_api.h

@@ -21,38 +21,6 @@
 
 #ifdef WLAN_FEATURE_HOST_ROAM
 
-#ifndef FEATURE_CM_ENABLE
-/* FT neighbor roam callback user context */
-typedef struct sFTRoamCallbackUsrCtx {
-	struct mac_context *mac;
-	uint8_t sessionId;
-} tFTRoamCallbackUsrCtx, *tpFTRoamCallbackUsrCtx;
-
-typedef struct sFTSMEContext {
-	/* Saved pFTPreAuthRsp */
-	tpSirFTPreAuthRsp psavedFTPreAuthRsp;
-	/* Time to trigger reassoc once pre-auth is successful */
-	qdf_mc_timer_t preAuthReassocIntvlTimer;
-	tSirMacAddr preAuthbssId;       /* BSSID to preauth to */
-	/* User context for the timer callback */
-	tpFTRoamCallbackUsrCtx pUsrCtx;
-} tftSMEContext, *tpftSMEContext;
-
-
-/*--------------------------------------------------------------------------
-  Prototype functions
-  ------------------------------------------------------------------------*/
-void sme_ft_open(mac_handle_t mac_handle, uint8_t sessionId);
-void sme_ft_close(mac_handle_t mac_handle, uint8_t sessionId);
-void sme_get_ft_pre_auth_response(mac_handle_t mac_handle, uint8_t sessionId,
-				  uint8_t *ft_ies, uint32_t ft_ies_ip_len,
-				  uint16_t *ft_ies_length);
-void sme_get_rici_es(mac_handle_t mac_handle, uint8_t sessionId,
-		     uint8_t *ric_ies,
-		     uint32_t ric_ies_ip_len, uint32_t *ric_ies_length);
-void sme_preauth_reassoc_intvl_timer_callback(void *context);
-#endif /* FEATURE_CM_ENABLE */
-
 void sme_ft_reset(mac_handle_t mac_handle, uint8_t sessionId);
 
 /**
@@ -95,21 +63,6 @@ bool sme_get_ft_pre_auth_state(mac_handle_t mac_handle, uint8_t sessionId);
 
 #else /* WLAN_FEATURE_HOST_ROAM */
 
-#ifndef FEATURE_CM_ENABLE
-static inline void sme_ft_open(mac_handle_t mac_handle, uint8_t sessionId) {}
-static inline void sme_ft_close(mac_handle_t mac_handle, uint8_t sessionId) {}
-static inline  void sme_get_ft_pre_auth_response(mac_handle_t mac_handle,
-						 uint8_t sessionId,
-						 uint8_t *ft_ies,
-						 uint32_t ft_ies_ip_len,
-						 uint16_t *ft_ies_length) {}
-static inline void sme_get_rici_es(mac_handle_t mac_handle, uint8_t sessionId,
-				   uint8_t *ric_ies,
-				   uint32_t ric_ies_ip_len,
-				   uint32_t *ric_ies_length) {}
-static inline void sme_preauth_reassoc_intvl_timer_callback(void *context) {}
-#endif
-
 static inline void sme_ft_reset(mac_handle_t mac_handle, uint8_t sessionId) {}
 static inline
 void sme_set_ft_ies(mac_handle_t mac_handle, uint8_t sessionId,

+ 6 - 676
core/sme/src/common/sme_api.c

@@ -142,9 +142,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 	policy_mgr_pdev_set_hw_mode_cback callback = NULL;
 	struct sir_set_hw_mode_resp *param;
 	enum policy_mgr_conn_update_reason reason;
-#ifndef FEATURE_CM_ENABLE
-	struct csr_roam_session *session;
-#endif
+
 	uint32_t session_id;
 	uint32_t request_id;
 
@@ -210,29 +208,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 		sme_err("session %d is invalid", session_id);
 		goto end;
 	}
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
-	session = CSR_GET_SESSION(mac, session_id);
-	if (reason == POLICY_MGR_UPDATE_REASON_HIDDEN_STA) {
-		/* In the case of hidden SSID, connection update
-		 * (set hw mode) is done after the scan with reason
-		 * code eCsrScanForSsid completes. The connect/failure
-		 * needs to be handled after the response of set hw
-		 * mode
-		 */
-		if (param->status == SET_HW_MODE_STATUS_OK ||
-		    param->status == SET_HW_MODE_STATUS_ALREADY) {
-			sme_debug("search for ssid success");
-			csr_scan_handle_search_for_ssid(mac,
-					session_id);
-		} else {
-			sme_debug("search for ssid failure");
-			csr_scan_handle_search_for_ssid_failure(mac,
-					session_id);
-		}
-		csr_saved_scan_cmd_free_fields(mac, session);
-	}
-#endif
+
 	if (reason == POLICY_MGR_UPDATE_REASON_CHANNEL_SWITCH_STA) {
 		sme_debug("Continue channel switch for STA on vdev %d",
 			  session_id);
@@ -244,8 +220,7 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 			  session_id);
 		csr_csa_restart(mac, session_id);
 	}
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
+
 	if (reason == POLICY_MGR_UPDATE_REASON_STA_CONNECT ||
 	    reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM) {
 		QDF_STATUS status = QDF_STATUS_E_FAILURE;
@@ -259,10 +234,6 @@ static QDF_STATUS sme_process_set_hw_mode_resp(struct mac_context *mac, uint8_t
 		wlan_cm_hw_mode_change_resp(mac->pdev, session_id, request_id,
 					    status);
 	}
-#else
-	if (reason == POLICY_MGR_UPDATE_REASON_LFR2_ROAM)
-		csr_continue_lfr2_connect(mac, session_id);
-#endif
 
 end:
 	found = csr_nonscan_active_ll_remove_entry(mac, entry,
@@ -672,12 +643,7 @@ static void sme_state_info_dump(char **buf_ptr, uint16_t *size)
 	struct mac_context *mac;
 	uint16_t len = 0;
 	char *buf = *buf_ptr;
-	/* This is temp ifdef will be removed in near future */
-#ifndef FEATURE_CM_ENABLE
-	eCsrConnectState connect_state;
-#else
 	enum QDF_OPMODE op_mode;
-#endif
 
 	mac_handle = cds_get_context(QDF_MODULE_ID_SME);
 	if (!mac_handle) {
@@ -695,8 +661,6 @@ static void sme_state_info_dump(char **buf_ptr, uint16_t *size)
 
 	for (vdev_id = 0; vdev_id < WLAN_MAX_VDEVS; vdev_id++) {
 		if (CSR_IS_SESSION_VALID(mac, vdev_id)) {
-			/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 			op_mode = wlan_get_opmode_from_vdev_id(mac->pdev,
 							       vdev_id);
 			if (op_mode != QDF_STA_MODE &&
@@ -708,25 +672,6 @@ static void sme_state_info_dump(char **buf_ptr, uint16_t *size)
 				len += qdf_scnprintf(buf + len, *size - len,
 					"\n RoamSubState: %d", mac->roam.curSubState[vdev_id]);
 			}
-#else
-			connect_state =
-				mac->roam.roamSession[vdev_id].connectState;
-			if ((eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED ==
-			     connect_state)
-			    || (eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED ==
-				connect_state)) {
-				len += qdf_scnprintf(buf + len, *size - len,
-					"\n NeighborRoamState: %d",
-					mac->roam.neighborRoamInfo[vdev_id].neighborRoamState);
-				len += qdf_scnprintf(buf + len, *size - len,
-					"\n RoamState: %d", mac->roam.curState[vdev_id]);
-				len += qdf_scnprintf(buf + len, *size - len,
-					"\n RoamSubState: %d", mac->roam.curSubState[vdev_id]);
-				len += qdf_scnprintf(buf + len, *size - len,
-					"\n ConnectState: %d",
-					connect_state);
-			}
-#endif
 		}
 	}
 
@@ -952,14 +897,6 @@ void sme_update_fine_time_measurement_capab(mac_handle_t mac_handle,
 	}
 }
 
-#ifndef FEATURE_CM_ENABLE
-void sme_update_nud_config(mac_handle_t mac_handle, uint8_t nud_fail_behavior)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	mac->nud_fail_behaviour = nud_fail_behavior;
-}
-#endif
 /*
  * sme_update_config() - Change configurations for all SME moduels
  * The function updates some configuration for modules in SME, CSR, etc
@@ -1136,9 +1073,6 @@ QDF_STATUS sme_hdd_ready_ind(mac_handle_t mac_handle)
 
 		msg->messageType = eWNI_SME_SYS_READY_IND;
 		msg->length = sizeof(*msg);
-#ifndef FEATURE_CM_ENABLE
-		msg->csr_roam_synch_cb = csr_roam_synch_callback;
-#endif
 		msg->sme_msg_cb = sme_process_msg_callback;
 		msg->stop_roaming_cb = sme_stop_roaming;
 		msg->csr_roam_auth_event_handle_cb =
@@ -2666,14 +2600,6 @@ 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:
 	case eWNI_SME_DELTS_IND:
@@ -2732,13 +2658,6 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 		}
 		break;
 #endif /* FEATURE_WLAN_ESE */
-#ifndef FEATURE_CM_ENABLE
-	case eWNI_SME_ROAM_SCAN_OFFLOAD_RSP:
-		status = csr_roam_offload_scan_rsp_hdlr((void *)mac,
-							pMsg->bodyptr);
-		qdf_mem_free(pMsg->bodyptr);
-		break;
-#endif
 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
 	case eWNI_SME_READY_TO_EXTWOW_IND:
 		if (pMsg->bodyptr) {
@@ -3218,82 +3137,6 @@ QDF_STATUS sme_scan_get_result_for_bssid(mac_handle_t mac_handle,
 	return status;
 }
 
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_get_ap_channel_from_scan_cache(
-	struct csr_roam_profile *profile, tScanResultHandle *scan_cache,
-	uint32_t *ap_ch_freq, uint8_t vdev_id)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac_ctx = sme_get_mac_context();
-	struct scan_filter *scan_filter;
-	tScanResultHandle filtered_scan_result = NULL;
-	struct bss_description first_ap_profile;
-
-	if (!mac_ctx) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-				FL("mac_ctx is NULL"));
-		return QDF_STATUS_E_FAILURE;
-	}
-	scan_filter = qdf_mem_malloc(sizeof(*scan_filter));
-	if (!scan_filter)
-		return QDF_STATUS_E_FAILURE;
-
-	qdf_mem_zero(&first_ap_profile, sizeof(struct bss_description));
-	if (!profile) {
-		QDF_SET_PARAM(scan_filter->authmodeset, WLAN_CRYPTO_AUTH_OPEN);
-	} else {
-		/* Here is the profile we need to connect to */
-		status = csr_roam_get_scan_filter_from_profile(mac_ctx, profile,
-							       scan_filter,
-							       false, vdev_id);
-	}
-
-	if (QDF_IS_STATUS_ERROR(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
-			FL("Preparing the profile filter failed"));
-		qdf_mem_free(scan_filter);
-		return QDF_STATUS_E_FAILURE;
-	}
-	status = sme_acquire_global_lock(&mac_ctx->sme);
-	if (QDF_STATUS_SUCCESS == status) {
-		status = csr_scan_get_result(mac_ctx, scan_filter,
-					  &filtered_scan_result, false);
-		if (QDF_STATUS_SUCCESS == status) {
-			csr_get_bssdescr_from_scan_handle(filtered_scan_result,
-					&first_ap_profile);
-			*scan_cache = filtered_scan_result;
-			if (first_ap_profile.chan_freq) {
-				*ap_ch_freq = first_ap_profile.chan_freq;
-				QDF_TRACE(QDF_MODULE_ID_SME,
-					  QDF_TRACE_LEVEL_DEBUG,
-					  FL("Found best AP & its on freq[%d]"),
-					  first_ap_profile.chan_freq);
-			} else {
-				/*
-				 * This means scan result is empty
-				 * so set the channel to zero, caller should
-				 * take of zero channel id case.
-				 */
-				*ap_ch_freq = 0;
-				QDF_TRACE(QDF_MODULE_ID_SME,
-					  QDF_TRACE_LEVEL_ERROR,
-					  FL("Scan is empty, set chnl to 0"));
-				status = QDF_STATUS_E_FAILURE;
-			}
-		} else {
-			sme_err("Failed to get scan get result");
-			status = QDF_STATUS_E_FAILURE;
-		}
-		sme_release_global_lock(&mac_ctx->sme);
-	} else {
-		status = QDF_STATUS_E_FAILURE;
-	}
-	qdf_mem_free(scan_filter);
-
-	return status;
-}
-#endif
-
 /*
  * sme_scan_result_get_first() -
  * A wrapper function to request CSR to returns the first element of
@@ -3444,51 +3287,6 @@ QDF_STATUS sme_set_phy_mode(mac_handle_t mac_handle, eCsrPhyMode phyMode)
 	return QDF_STATUS_SUCCESS;
 }
 
-#ifndef FEATURE_CM_ENABLE
-/*
- * sme_roam_reassoc() -
- * A wrapper function to request CSR to inititiate a re-association
- *
- * pProfile - can be NULL to join the currently connected AP. In that
- * case modProfileFields should carry the modified field(s) which could trigger
- * reassoc
- * modProfileFields - fields which are part of tCsrRoamConnectedProfile
- *   that might need modification dynamically once STA is up & running and this
- *   could trigger a reassoc
- * pRoamId - to get back the request ID
- * Return QDF_STATUS
- */
-QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
-			    struct csr_roam_profile *pProfile,
-			    tCsrRoamModifyProfileFields modProfileFields,
-			    uint32_t *pRoamId, bool fForce)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_ROAM_REASSOC, sessionId, 0));
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		if (CSR_IS_SESSION_VALID(mac, sessionId)) {
-			if ((!pProfile) && (fForce == 1))
-				status = csr_reassoc(mac, sessionId,
-						     &modProfileFields, pRoamId,
-						     fForce);
-			else
-				status = csr_roam_reassoc(mac, sessionId,
-						pProfile,
-						modProfileFields, pRoamId);
-		} else {
-			status = QDF_STATUS_E_INVAL;
-		}
-		sme_release_global_lock(&mac->sme);
-	}
-
-	return status;
-}
-#endif
-
 QDF_STATUS sme_roam_disconnect(mac_handle_t mac_handle, uint8_t session_id,
 			       eCsrRoamDisconnectReason reason,
 			       enum wlan_reason_code mac_reason)
@@ -3637,62 +3435,6 @@ QDF_STATUS sme_roam_deauth_sta(mac_handle_t mac_handle, uint8_t sessionId,
 	return status;
 }
 
-#ifndef FEATURE_CM_ENABLE
-struct bss_description *sme_roam_get_connect_bss_desc(mac_handle_t mac_handle,
-						      uint8_t vdev_id)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *session;
-	struct bss_description *bss_desc = NULL;
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_ROAM_GET_CONNECTPROFILE,
-			 vdev_id, 0));
-	if (!CSR_IS_SESSION_VALID(mac, vdev_id))
-		return NULL;
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_ERROR(status))
-		return NULL;
-
-	session = CSR_GET_SESSION(mac, vdev_id);
-	if (session && csr_is_conn_state_connected(mac, vdev_id))
-		bss_desc = session->pConnectBssDesc;
-	sme_release_global_lock(&mac->sme);
-
-	return bss_desc;
-}
-
-QDF_STATUS sme_roam_del_pmkid_from_cache(mac_handle_t mac_handle,
-					 uint8_t vdev_id,
-					 struct wlan_crypto_pmksa *pmksa,
-					 bool set_pmk)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct wlan_objmgr_vdev *vdev;
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_ROAM_DEL_PMKIDCACHE,
-			 vdev_id, set_pmk));
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc, vdev_id,
-						    WLAN_LEGACY_SME_ID);
-	if (!vdev) {
-		sme_err("Vdev[%d] is NULL!", vdev_id);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	status = wlan_crypto_set_del_pmksa(vdev, pmksa, set_pmk);
-	if (QDF_IS_STATUS_ERROR(status))
-		sme_err("Delete PMK entry failed");
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-	return status;
-}
-#endif
-
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 void sme_get_pmk_info(mac_handle_t mac_handle, uint8_t session_id,
 		      struct wlan_crypto_pmksa *pmk_cache)
@@ -3744,28 +3486,6 @@ QDF_STATUS sme_roam_set_psk_pmk(mac_handle_t mac_handle, uint8_t sessionId,
 }
 #endif
 
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_roam_get_wpa_rsn_req_ie(mac_handle_t mac_handle,
-				       uint8_t session_id,
-				       uint32_t *len, uint8_t *buf)
-{
-	QDF_STATUS status;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		if (CSR_IS_SESSION_VALID(mac, session_id))
-			status = csr_roam_get_wpa_rsn_req_ie(mac, session_id,
-							     len, buf);
-		else
-			status = QDF_STATUS_E_INVAL;
-		sme_release_global_lock(&mac->sme);
-	}
-
-	return status;
-}
-#endif
-
 /*
  * sme_get_config_param() -
  * A wrapper function that HDD calls to get the global settings
@@ -3809,46 +3529,6 @@ uint32_t sme_get_eht_ch_width(void)
 }
 #endif
 
-#ifndef FEATURE_CM_ENABLE
-/*
- * sme_get_modify_profile_fields() -
- * HDD or SME - QOS calls this function to get the current values of
- * connected profile fields, changing which can cause reassoc.
- * This function must be called after CFG is downloaded and STA is in connected
- * state. Also, make sure to call this function to get the current profile
- * fields before calling the reassoc. So that pModifyProfileFields will have
- * all the latest values plus the one(s) has been updated as part of reassoc
- * request.
- *
- * pModifyProfileFields - pointer to the connected profile fields
- *   changing which can cause reassoc
- * Return QDF_STATUS
- */
-QDF_STATUS sme_get_modify_profile_fields(mac_handle_t mac_handle,
-					 uint8_t sessionId,
-					 tCsrRoamModifyProfileFields *
-					 pModifyProfileFields)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	MTRACE(qdf_trace(QDF_MODULE_ID_SME,
-			 TRACE_CODE_SME_RX_HDD_GET_MODPROFFIELDS, sessionId,
-			 0));
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		if (CSR_IS_SESSION_VALID(mac, sessionId))
-			status = csr_get_modify_profile_fields(mac, sessionId,
-							  pModifyProfileFields);
-		else
-			status = QDF_STATUS_E_INVAL;
-		sme_release_global_lock(&mac->sme);
-	}
-
-	return status;
-}
-#endif
-
 #ifdef FEATURE_OEM_DATA_SUPPORT
 /**
  * sme_register_oem_data_rsp_callback() - Register a routine of
@@ -5803,16 +5483,10 @@ QDF_STATUS sme_update_channel_list(mac_handle_t mac_handle)
 
 		csr_apply_channel_power_info_wrapper(mac_ctx);
 		csr_scan_filter_results(mac_ctx);
-#ifdef FEATURE_CM_ENABLE
 		sme_release_global_lock(&mac_ctx->sme);
 		/* release the sme lock before we call cm disconnect */
 		sme_disconnect_connected_sessions(mac_ctx,
 					REASON_OPER_CHANNEL_USER_DISABLED);
-#else
-		sme_disconnect_connected_sessions(mac_ctx,
-					REASON_OPER_CHANNEL_USER_DISABLED);
-		sme_release_global_lock(&mac_ctx->sme);
-#endif
 	}
 
 	return status;
@@ -5875,17 +5549,9 @@ static void sme_disconnect_connected_sessions(struct mac_context *mac_ctx,
 		found = sme_search_in_base_ch_freq_lst(mac_ctx, chan_freq);
 		if (!found) {
 			sme_debug("Disconnect Session: %d", vdev_id);
-			/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 			/* do not call cm disconnect while holding Sme lock */
 			cm_disconnect(mac_ctx->psoc, vdev_id,
 				      CM_MLME_DISCONNECT, reason, NULL);
-#else
-			sme_debug("Disconnect Session: %d", vdev_id);
-			csr_roam_disconnect(mac_ctx, vdev_id,
-					    eCSR_DISCONNECT_REASON_UNSPECIFIED,
-					    reason);
-#endif
 		}
 	}
 }
@@ -5907,12 +5573,7 @@ QDF_STATUS sme_8023_multicast_list(mac_handle_t mac_handle, uint8_t sessionId,
 	/* Find the connected Infra / P2P_client connected session */
 	pSession = CSR_GET_SESSION(mac, sessionId);
 	if (!CSR_IS_SESSION_VALID(mac, sessionId) ||
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	    (!cm_is_vdevid_connected(mac->pdev, sessionId) &&
-#else
-	    (!csr_is_conn_state_infra(mac, sessionId) &&
-#endif
 	     !csr_is_ndi_started(mac, sessionId))) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
 			  "%s: Unable to find the session Id: %d", __func__,
@@ -5924,8 +5585,6 @@ QDF_STATUS sme_8023_multicast_list(mac_handle_t mac_handle, uint8_t sessionId,
 	if (!request_buf)
 		return QDF_STATUS_E_NOMEM;
 
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	if (!cm_is_vdevid_connected(mac->pdev, sessionId) &&
 	    !csr_is_ndi_started(mac, sessionId)) {
 		sme_err("Request ignored, session %d is not connected or started",
@@ -5933,15 +5592,6 @@ QDF_STATUS sme_8023_multicast_list(mac_handle_t mac_handle, uint8_t sessionId,
 		qdf_mem_free(request_buf);
 		return QDF_STATUS_E_FAILURE;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac, sessionId) &&
-	    !csr_is_ndi_started(mac, sessionId)) {
-		sme_err("Request ignored, session %d is not connected or started",
-			sessionId);
-		qdf_mem_free(request_buf);
-		return QDF_STATUS_E_FAILURE;
-	}
-#endif
 
 	qdf_mem_copy(request_buf, pMulticastAddrs,
 		     sizeof(tSirRcvFltMcAddrList));
@@ -6372,18 +6022,6 @@ QDF_STATUS sme_send_rso_connect_params(mac_handle_t mac_handle,
 }
 
 #ifdef WLAN_FEATURE_FILS_SK
-#ifndef FEATURE_CM_ENABLE
-QDF_STATUS sme_update_fils_config(mac_handle_t mac_handle, uint8_t vdev_id,
-				  struct csr_roam_profile *src_profile)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	csr_update_fils_config(mac, vdev_id, src_profile);
-
-	return status;
-}
-#endif
 void sme_send_hlp_ie_info(mac_handle_t mac_handle, uint8_t vdev_id,
 			  uint32_t if_addr)
 {
@@ -7716,38 +7354,6 @@ void sme_set_curr_device_mode(mac_handle_t mac_handle,
 	mac->sme.curr_device_mode = curr_device_mode;
 }
 
-#ifndef FEATURE_CM_ENABLE
-/*
- * sme_handoff_request() - a wrapper function to Request a handoff from CSR.
- *   This is a synchronous call
- *
- * mac_handle - The handle returned by mac_open
- * sessionId - Session Identifier
- * pHandoffInfo - info provided by HDD with the handoff request (namely:
- * BSSID, channel etc.)
- * Return QDF_STATUS_SUCCESS - SME passed the request to CSR successfully.
- *	   Other status means SME is failed to send the request.
- */
-
-QDF_STATUS sme_handoff_request(mac_handle_t mac_handle,
-			       uint8_t sessionId,
-			       tCsrHandoffRequest *pHandoffInfo)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_SUCCESS(status)) {
-		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
-			  "%s: invoked", __func__);
-		status = csr_handoff_request(mac, sessionId, pHandoffInfo);
-		sme_release_global_lock(&mac->sme);
-	}
-
-	return status;
-}
-#endif
-
 /**
  * sme_add_periodic_tx_ptrn() - Add Periodic TX Pattern
  * @mac_handle: Opaque handle to the global MAC context
@@ -8260,20 +7866,12 @@ int sme_send_addba_req(mac_handle_t mac_handle, uint8_t session_id, uint8_t tid,
 	struct scheduler_msg msg = {0};
 	struct send_add_ba_req *send_ba_req;
 
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id)) {
 		sme_err("STA not infra/connected state session_id: %d",
 			session_id);
 		return -EINVAL;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) {
-		sme_err("STA not infra/connected state session_id: %d",
-			session_id);
-		return -EINVAL;
-	}
-#endif
+
 	if (!CSR_IS_SESSION_VALID(mac_ctx, session_id)) {
 		sme_err("CSR session is invalid");
 		return -EINVAL;
@@ -11419,18 +11017,11 @@ sme_validate_session_for_cap_update(struct mac_context *mac_ctx,
 		sme_err("Session does not exist, Session_id: %d", session_id);
 		return QDF_STATUS_E_INVAL;
 	}
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
+
 	if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id)) {
 		sme_debug("STA is not connected, Session_id: %d", session_id);
 		return QDF_STATUS_E_INVAL;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) {
-		sme_debug("STA is not connected, Session_id: %d", session_id);
-		return QDF_STATUS_E_INVAL;
-	}
-#endif
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -11595,18 +11186,11 @@ int sme_config_action_tx_in_tb_ppdu(mac_handle_t mac_handle, uint8_t session_id,
 	struct scheduler_msg msg = {0};
 	struct sir_cfg_action_frm_tb_ppdu *cfg_msg;
 
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id)) {
 		sme_debug("STA is not connected, Session_id: %d", session_id);
 		return -EINVAL;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) {
-		sme_debug("STA is not connected, Session_id: %d", session_id);
-		return -EINVAL;
-	}
-#endif
+
 	cfg_msg = qdf_mem_malloc(sizeof(*cfg_msg));
 	if (!cfg_msg)
 		return -EIO;
@@ -13545,260 +13129,6 @@ exit:
 	return status;
 }
 
-#ifndef FEATURE_CM_ENABLE
-/**
- * sme_prepare_beacon_from_bss_descp() - prepares beacon frame by populating
- * different fields and IEs from bss descriptor.
- * @frame_buf: frame buffer to populate
- * @bss_descp: bss descriptor
- * @bssid: bssid of the beacon frame to populate
- * @ie_len: length of IE fields
- *
- * Return: None
- */
-static void sme_prepare_beacon_from_bss_descp(uint8_t *frame_buf,
-					      struct bss_description *bss_descp,
-					      const tSirMacAddr bssid,
-					      uint32_t ie_len)
-{
-	tDot11fBeacon1 *bcn_fixed;
-	tpSirMacMgmtHdr mac_hdr = (tpSirMacMgmtHdr)frame_buf;
-
-	/* populate mac header first to indicate beacon */
-	mac_hdr->fc.protVer = SIR_MAC_PROTOCOL_VERSION;
-	mac_hdr->fc.type = SIR_MAC_MGMT_FRAME;
-	mac_hdr->fc.subType = SIR_MAC_MGMT_BEACON;
-	qdf_mem_copy((uint8_t *) mac_hdr->da,
-		     (uint8_t *) "\xFF\xFF\xFF\xFF\xFF\xFF",
-		     sizeof(struct qdf_mac_addr));
-	qdf_mem_copy((uint8_t *) mac_hdr->sa, bssid,
-		     sizeof(struct qdf_mac_addr));
-	qdf_mem_copy((uint8_t *) mac_hdr->bssId, bssid,
-		     sizeof(struct qdf_mac_addr));
-
-	/* now populate fixed params */
-	bcn_fixed = (tDot11fBeacon1 *)(frame_buf + SIR_MAC_HDR_LEN_3A);
-	/* populate timestamp */
-	qdf_mem_copy(&bcn_fixed->TimeStamp.timestamp, &bss_descp->timeStamp,
-			sizeof(bss_descp->timeStamp));
-	/* populate beacon interval */
-	bcn_fixed->BeaconInterval.interval = bss_descp->beaconInterval;
-	/* populate capability */
-	qdf_mem_copy(&bcn_fixed->Capabilities, &bss_descp->capabilityInfo,
-			sizeof(bss_descp->capabilityInfo));
-
-	/* copy IEs now */
-	qdf_mem_copy(frame_buf + SIR_MAC_HDR_LEN_3A
-		     + SIR_MAC_B_PR_SSID_OFFSET,
-		     &bss_descp->ieFields, ie_len);
-}
-
-QDF_STATUS sme_get_beacon_frm(mac_handle_t mac_handle,
-			      struct csr_roam_profile *profile,
-			      const tSirMacAddr bssid,
-			      uint8_t **frame_buf, uint32_t *frame_len,
-			      uint32_t *ch_freq, uint8_t vdev_id)
-{
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	tScanResultHandle result_handle = NULL;
-	struct scan_filter *scan_filter;
-	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct bss_description *bss_descp;
-	struct scan_result_list *bss_list;
-	uint32_t ie_len;
-
-	scan_filter = qdf_mem_malloc(sizeof(*scan_filter));
-	if (!scan_filter) {
-		status = QDF_STATUS_E_NOMEM;
-		goto exit;
-	}
-	status = csr_roam_get_scan_filter_from_profile(mac_ctx,
-						       profile, scan_filter,
-						       false, vdev_id);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		sme_err("prepare_filter failed");
-		status = QDF_STATUS_E_FAULT;
-		qdf_mem_free(scan_filter);
-		goto exit;
-	}
-
-	/* update filter to get scan result with just target BSSID */
-	scan_filter->num_of_bssid = 1;
-	qdf_mem_copy(scan_filter->bssid_list[0].bytes,
-		     bssid, sizeof(struct qdf_mac_addr));
-
-	status = csr_scan_get_result(mac_ctx, scan_filter, &result_handle,
-				     false);
-	qdf_mem_free(scan_filter);
-	if (QDF_STATUS_SUCCESS != status) {
-		sme_err("parse_scan_result failed");
-		status = QDF_STATUS_E_FAULT;
-		goto exit;
-	}
-
-	bss_list = (struct scan_result_list *)result_handle;
-	bss_descp = csr_get_fst_bssdescr_ptr(bss_list);
-	if (!bss_descp) {
-		sme_err("unable to fetch bss descriptor");
-		status = QDF_STATUS_E_FAULT;
-		goto exit;
-	}
-
-	/**
-	 * Length of BSS descriptor is without length of
-	 * length itself and length of pointer that holds ieFields.
-	 *
-	 * struct bss_description
-	 * +--------+---------------------------------+---------------+
-	 * | length | other fields                    | pointer to IEs|
-	 * +--------+---------------------------------+---------------+
-	 *                                            ^
-	 *                                            ieFields
-	 */
-	ie_len = bss_descp->length + sizeof(bss_descp->length)
-		- (uint16_t)(offsetof(struct bss_description, ieFields[0]));
-	sme_debug("found bss_descriptor ie_len: %d frequency %d",
-		  ie_len, bss_descp->chan_freq);
-
-	/* include mac header and fixed params along with IEs in frame */
-	*frame_len = SIR_MAC_HDR_LEN_3A + SIR_MAC_B_PR_SSID_OFFSET + ie_len;
-	*frame_buf = qdf_mem_malloc(*frame_len);
-	if (!*frame_buf) {
-		status = QDF_STATUS_E_NOMEM;
-		goto exit;
-	}
-
-	sme_prepare_beacon_from_bss_descp(*frame_buf, bss_descp, bssid, ie_len);
-
-	if (!*ch_freq)
-		*ch_freq = bss_descp->chan_freq;
-exit:
-	if (result_handle)
-		csr_scan_result_purge(mac_ctx, result_handle);
-
-	return status;
-}
-#endif
-#ifndef FEATURE_CM_ENABLE
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-QDF_STATUS sme_roam_invoke_nud_fail(mac_handle_t mac_handle, uint8_t vdev_id)
-{
-	struct roam_invoke_req *roam_invoke_params;
-	struct scheduler_msg msg = {0};
-	QDF_STATUS status;
-	struct wlan_objmgr_vdev *vdev;
-	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	struct mlme_roam_after_data_stall *vdev_roam_params;
-	struct csr_roam_session *session;
-	bool control_bitmap;
-
-	if (!mac_ctx->mlme_cfg->gen.data_stall_recovery_fw_support) {
-		sme_debug("FW does not support data stall recovery, aborting roam invoke");
-		return QDF_STATUS_E_NOSUPPORT;
-	}
-
-	session = CSR_GET_SESSION(mac_ctx, vdev_id);
-	if (!session) {
-		sme_err("session %d not found", vdev_id);
-		return QDF_STATUS_E_FAILURE;
-	}
-	status = sme_acquire_global_lock(&mac_ctx->sme);
-	if (!QDF_IS_STATUS_SUCCESS(status))
-		return status;
-
-	control_bitmap = mlme_get_operations_bitmap(mac_ctx->psoc, vdev_id);
-	if (control_bitmap ||
-	    !MLME_IS_ROAM_INITIALIZED(mac_ctx->psoc, vdev_id)) {
-		sme_debug("ROAM: RSO Disabled internaly: vdev[%d] bitmap[0x%x]",
-			  vdev_id, control_bitmap);
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, vdev_id,
-						    WLAN_LEGACY_SME_ID);
-
-	if (!vdev) {
-		sme_err("vdev is NULL, aborting roam invoke");
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_NULL_VALUE;
-	}
-
-	vdev_roam_params = mlme_get_roam_invoke_params(vdev);
-
-	if (!vdev_roam_params) {
-		sme_err("Invalid vdev roam params, aborting roam invoke");
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_NULL_VALUE;
-	}
-
-	if (vdev_roam_params->roam_invoke_in_progress) {
-		sme_debug("Roaming already initiated by %d source",
-			  vdev_roam_params->source);
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_BUSY;
-	}
-
-	roam_invoke_params = qdf_mem_malloc(sizeof(*roam_invoke_params));
-	if (!roam_invoke_params) {
-		wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-		sme_release_global_lock(&mac_ctx->sme);
-		return QDF_STATUS_E_NOMEM;
-	}
-	roam_invoke_params->vdev_id = vdev_id;
-	/* Set forced roaming as true so that FW scans all ch, and connect */
-	roam_invoke_params->forced_roaming = true;
-
-	msg.type = eWNI_SME_ROAM_INVOKE;
-	msg.reserved = 0;
-	msg.bodyptr = roam_invoke_params;
-	status = scheduler_post_message(QDF_MODULE_ID_SME,
-					QDF_MODULE_ID_PE,
-					QDF_MODULE_ID_PE, &msg);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		sme_err("Not able to post ROAM_INVOKE_CMD message to PE");
-		qdf_mem_free(roam_invoke_params);
-	} else {
-		vdev_roam_params->roam_invoke_in_progress = true;
-		vdev_roam_params->source = CONNECTION_MGR_INITIATED;
-	}
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-	sme_release_global_lock(&mac_ctx->sme);
-
-	return status;
-}
-QDF_STATUS sme_fast_reassoc(mac_handle_t mac_handle,
-			    struct csr_roam_profile *profile,
-			    const tSirMacAddr bssid, uint32_t ch_freq,
-			    uint8_t vdev_id,
-			    const tSirMacAddr connected_bssid)
-{
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-
-	if (!mac)
-		return QDF_STATUS_E_FAILURE;
-
-	if (!CSR_IS_SESSION_VALID(mac, vdev_id)) {
-		sme_err("Invalid vdev_id: %d", vdev_id);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	if (QDF_IS_STATUS_ERROR(sme_acquire_global_lock(&mac->sme)))
-		return QDF_STATUS_E_FAILURE;
-
-	status = csr_fast_reassoc(mac_handle, profile, bssid, ch_freq, vdev_id,
-					  connected_bssid);
-
-	sme_release_global_lock(&mac->sme);
-
-	return status;
-}
-#endif
-#endif
 void sme_clear_sae_single_pmk_info(struct wlan_objmgr_psoc *psoc,
 				   uint8_t session_id,
 				   struct wlan_crypto_pmksa *pmk_cache_info)

+ 1 - 192
core/sme/src/common/sme_ft_api.c

@@ -24,190 +24,6 @@
 
 #ifdef WLAN_FEATURE_HOST_ROAM
 
-#ifndef FEATURE_CM_ENABLE
-/* Initialize the FT context. */
-void sme_ft_open(mac_handle_t mac_handle, uint8_t sessionId)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
-
-	if (pSession) {
-		/* Clean up the context */
-		qdf_mem_zero(&pSession->ftSmeContext, sizeof(tftSMEContext));
-
-		pSession->ftSmeContext.pUsrCtx =
-			qdf_mem_malloc(sizeof(tFTRoamCallbackUsrCtx));
-		if (!pSession->ftSmeContext.pUsrCtx)
-			return;
-
-		pSession->ftSmeContext.pUsrCtx->mac = mac;
-		pSession->ftSmeContext.pUsrCtx->sessionId = sessionId;
-
-		status =
-			qdf_mc_timer_init(&pSession->ftSmeContext.preAuthReassocIntvlTimer,
-					  QDF_TIMER_TYPE_SW,
-				sme_preauth_reassoc_intvl_timer_callback,
-					(void *)pSession->ftSmeContext.pUsrCtx);
-
-		if (QDF_STATUS_SUCCESS != status) {
-			sme_err("Preauth Reassoc interval Timer allocation failed");
-			qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
-			pSession->ftSmeContext.pUsrCtx = NULL;
-			return;
-		}
-	}
-}
-
-/* Cleanup the SME FT Global context. */
-void sme_ft_close(mac_handle_t mac_handle, uint8_t sessionId)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *pSession = NULL;
-
-	pSession = CSR_GET_SESSION(mac, sessionId);
-	if (pSession) {
-		if (pSession->ftSmeContext.psavedFTPreAuthRsp) {
-			qdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp);
-			pSession->ftSmeContext.psavedFTPreAuthRsp = NULL;
-		}
-		qdf_mem_zero(pSession->ftSmeContext.preAuthbssId,
-			     QDF_MAC_ADDR_SIZE);
-		/* check if the timer is running */
-		if (QDF_TIMER_STATE_RUNNING ==
-		    qdf_mc_timer_get_current_state(&pSession->ftSmeContext.
-						   preAuthReassocIntvlTimer)) {
-			qdf_mc_timer_stop(&pSession->ftSmeContext.
-					  preAuthReassocIntvlTimer);
-		}
-
-		qdf_mc_timer_destroy(&pSession->ftSmeContext.
-					preAuthReassocIntvlTimer);
-		if (pSession->ftSmeContext.pUsrCtx) {
-			qdf_mem_free(pSession->ftSmeContext.pUsrCtx);
-			pSession->ftSmeContext.pUsrCtx = NULL;
-		}
-	}
-}
-
-/*
- * HDD Interface to SME. SME now sends the Auth 2 and RIC IEs up to the
- * supplicant. The supplicant will then proceed to send down the
- * Reassoc Req.
- */
-void sme_get_ft_pre_auth_response(mac_handle_t mac_handle, uint8_t sessionId,
-				  uint8_t *ft_ies, uint32_t ft_ies_ip_len,
-				  uint16_t *ft_ies_length)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
-	QDF_STATUS status = QDF_STATUS_E_FAILURE;
-	struct wlan_objmgr_vdev *vdev;
-	struct mlme_legacy_priv *mlme_priv;
-
-	*ft_ies_length = 0;
-
-	if (!pSession) {
-		sme_err("pSession is NULL");
-		return;
-	}
-
-	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac->pdev, sessionId,
-						    WLAN_LEGACY_SME_ID);
-	if (!vdev)
-		return;
-
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv)
-		goto end;
-
-	status = sme_acquire_global_lock(&mac->sme);
-	if (QDF_IS_STATUS_ERROR(status))
-		goto end;
-
-	/* All or nothing - proceed only if both BSSID and FT IE fit */
-	if ((QDF_MAC_ADDR_SIZE +
-	     pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length) >
-	    ft_ies_ip_len) {
-		sme_release_global_lock(&mac->sme);
-		goto end;
-	}
-	/* hdd needs to pack the bssid also along with the */
-	/* auth response to supplicant */
-	qdf_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId,
-		     QDF_MAC_ADDR_SIZE);
-
-	/* Copy the auth resp FTIEs */
-	qdf_mem_copy(&(ft_ies[QDF_MAC_ADDR_SIZE]),
-		     pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies,
-		     pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length);
-
-	*ft_ies_length = QDF_MAC_ADDR_SIZE +
-		pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length;
-
-	sme_debug("Filled auth resp: %d", *ft_ies_length);
-	sme_release_global_lock(&mac->sme);
-end:
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-
-}
-
-/*
- * SME now sends the RIC IEs up to the supplicant.
- * The supplicant will then proceed to send down the
- * Reassoc Req.
- */
-void sme_get_rici_es(mac_handle_t mac_handle, uint8_t sessionId,
-		     uint8_t *ric_ies,
-		     uint32_t ric_ies_ip_len, uint32_t *ric_ies_length)
-{
-	struct mac_context *mac = MAC_CONTEXT(mac_handle);
-	struct wlan_objmgr_vdev *vdev;
-	struct mlme_legacy_priv *mlme_priv;
-
-	*ric_ies_length = 0;
-	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(mac->pdev, sessionId,
-						    WLAN_LEGACY_SME_ID);
-	if (!vdev)
-		return;
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv) {
-		goto end;
-	}
-
-	/* All or nothing */
-	if (mlme_priv->connect_info.ft_info.ric_ies_length > ric_ies_ip_len)
-		goto end;
-
-	qdf_mem_copy(ric_ies,
-		     mlme_priv->connect_info.ft_info.ric_ies,
-		     mlme_priv->connect_info.ft_info.ric_ies_length);
-
-	*ric_ies_length = mlme_priv->connect_info.ft_info.ric_ies_length;
-
-	sme_debug("Filled ric ies: %d", *ric_ies_length);
-end:
-
-	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);
-}
-
-/*
- * Timer callback for the timer that is started between the preauth completion
- * and reassoc request to the PE. In this interval, it is expected that the
- * pre-auth response and RIC IEs are passed up to the WPA supplicant and
- * received back the necessary FTIEs required to be sent in the reassoc request
- */
-void sme_preauth_reassoc_intvl_timer_callback(void *context)
-{
-	tFTRoamCallbackUsrCtx *pUsrCtx = (tFTRoamCallbackUsrCtx *) context;
-
-	if (pUsrCtx)
-		csr_neighbor_roam_request_handoff(pUsrCtx->mac,
-						  pUsrCtx->sessionId);
-}
-
-#endif
-
 void sme_set_ft_pre_auth_state(mac_handle_t mac_handle, uint8_t sessionId,
 			       bool state)
 {
@@ -419,14 +235,7 @@ void sme_ft_reset(mac_handle_t mac_handle, uint8_t sessionId)
 
 	qdf_mem_zero(&mlme_priv->connect_info.ft_info,
 		     sizeof(struct ft_context));
-#ifndef FEATURE_CM_ENABLE
-	if (pSession->ftSmeContext.psavedFTPreAuthRsp) {
-		qdf_mem_free(pSession->ftSmeContext.psavedFTPreAuthRsp);
-		pSession->ftSmeContext.psavedFTPreAuthRsp = NULL;
-	}
-	qdf_mem_zero(pSession->ftSmeContext.preAuthbssId,
-		     QDF_MAC_ADDR_SIZE);
-#endif
+
 	mlme_priv->connect_info.ft_info.ft_state = FT_START_READY;
 end:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_SME_ID);

+ 0 - 14
core/sme/src/common/sme_power_save.c

@@ -354,20 +354,11 @@ QDF_STATUS sme_enable_sta_ps_check(struct mac_context *mac_ctx,
 	 * also if command is power save disable  there is not need to check
 	 * for connected state as firmware can handle this
 	 */
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id)) {
 		sme_debug("STA not infra/connected state Session_id: %d",
 			  session_id);
 		return QDF_STATUS_E_FAILURE;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) {
-		sme_debug("STA not infra/connected state Session_id: %d",
-			  session_id);
-		return QDF_STATUS_E_FAILURE;
-	}
-#endif
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -401,12 +392,7 @@ QDF_STATUS sme_ps_enable_disable(mac_handle_t mac_handle, uint32_t session_id,
 		 * But kernel expects return status success even
 		 * in the disconnected state.
 		 */
-		/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 		if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id))
-#else
-		if (!csr_is_conn_state_connected_infra(mac_ctx, session_id))
-#endif
 			status = QDF_STATUS_SUCCESS;
 		return status;
 	}

+ 0 - 23
core/sme/src/qos/sme_qos.c

@@ -7600,11 +7600,6 @@ static QDF_STATUS sme_qos_request_reassoc(struct mac_context *mac,
 	struct sme_qos_sessioninfo *pSession;
 	struct sme_qos_acinfo *pACInfo;
 	QDF_STATUS status;
-#ifndef FEATURE_CM_ENABLE
-	struct csr_roam_session *session;
-	struct csr_roam_profile *roam_profile;
-	bool roam_offload_enable = true;
-#endif
 	struct qdf_mac_addr bssid;
 	qdf_freq_t ch_freq;
 
@@ -7620,26 +7615,8 @@ static QDF_STATUS sme_qos_request_reassoc(struct mac_context *mac,
 	pSession = &sme_qos_cb.sessionInfo[sessionId];
 	wlan_mlme_get_bssid_vdev_id(mac->pdev, sessionId, &bssid);
 	ch_freq = wlan_get_operation_chan_freq_vdev_id(mac->pdev, sessionId);
-#ifdef FEATURE_CM_ENABLE
 	status = wlan_cm_roam_invoke(mac->pdev, sessionId, &bssid, ch_freq,
 				     CM_ROAMING_HOST);
-#else
-	status = ucfg_mlme_get_roaming_offload(mac->psoc, &roam_offload_enable);
-	if (QDF_IS_STATUS_ERROR(status))
-		return status;
-	if (roam_offload_enable) {
-		session = CSR_GET_SESSION(mac, sessionId);
-		roam_profile = session->pCurRoamProfile;
-	status = sme_fast_reassoc(MAC_HANDLE(mac), roam_profile,
-				  bssid.bytes,
-				  ch_freq,
-				  sessionId,
-				  bssid.bytes);
-	} else {
-		status = csr_reassoc(mac, sessionId, pModFields,
-				     &pSession->roamID, fForce);
-	}
-#endif
 
 	if (QDF_IS_STATUS_SUCCESS(status)) {
 		/* Update the state to Handoff so subsequent requests are

+ 0 - 9
core/sme/src/rrm/sme_rrm.c

@@ -580,20 +580,11 @@ static QDF_STATUS sme_rrm_send_scan_result(struct mac_context *mac_ctx,
 		goto rrm_send_scan_results_done;
 	}
 
-	/* This is temp ifdef will be removed in near future */
-#ifdef FEATURE_CM_ENABLE
 	if (!cm_is_vdevid_connected(mac_ctx->pdev, session_id)) {
 		sme_err("Invaild session");
 		status = QDF_STATUS_E_FAILURE;
 		goto rrm_send_scan_results_done;
 	}
-#else
-	if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) {
-		sme_err("Invaild session");
-		status = QDF_STATUS_E_FAILURE;
-		goto rrm_send_scan_results_done;
-	}
-#endif
 
 	while (scan_results) {
 		/*