Browse Source

qcacld-3.0: Add initial roam offload state changes

Rename the existing roam offload states to include
WLAN_ prefix. Add 2 new states:
WLAN_ROAMING_IN_PROG - Roaming has started at firmware, this is
                       after candidate selection at firmware.

WLAN_ROAM_SYNCH_IN_PROG - State after handoff is complete at
                          firmware.

Also move the roam_offload_state enum to connection manager.

Change-Id: Ib1f38d200393849253893113172cdfc69e381fb3
CRs-Fixed: 2725387
Pragaspathi Thilagaraj 4 years ago
parent
commit
65c1c28045

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

@@ -260,6 +260,16 @@ struct wlan_mlme_nss_chains *mlme_get_ini_vdev_config(
 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);
 /**
  * mlme_cfg_on_psoc_enable() - Populate MLME structure from CFG and INI
  * @psoc: pointer to the psoc object
@@ -544,20 +554,32 @@ void
 mlme_set_operations_bitmap(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 			   enum wlan_cm_rso_control_requestor reqs, bool clear);
 
-#define MLME_IS_ROAM_STATE_RSO_STARTED(psoc, vdev_id) \
-	(mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STARTED)
+#define MLME_IS_ROAM_STATE_RSO_ENABLED(psoc, vdev_id) \
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_RSO_ENABLED)
 
 #define MLME_IS_ROAM_STATE_DEINIT(psoc, vdev_id) \
-	(mlme_get_roam_state(psoc, vdev_id) == ROAM_DEINIT)
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_DEINIT)
 
 #define MLME_IS_ROAM_STATE_INIT(psoc, vdev_id) \
-	(mlme_get_roam_state(psoc, vdev_id) == ROAM_INIT)
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_INIT)
 
 #define MLME_IS_ROAM_STATE_STOPPED(psoc, vdev_id) \
-	(mlme_get_roam_state(psoc, vdev_id) == ROAM_RSO_STOPPED)
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_RSO_STOPPED)
 
 #define MLME_IS_ROAM_INITIALIZED(psoc, vdev_id) \
-	(mlme_get_roam_state(psoc, vdev_id) >= ROAM_INIT)
+	(mlme_get_roam_state(psoc, vdev_id) >= WLAN_ROAM_INIT)
+#endif
+
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+#define MLME_IS_ROAMING_IN_PROG(psoc, vdev_id) \
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAMING_IN_PROG)
+
+#define MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) \
+	(mlme_get_roam_state(psoc, vdev_id) == WLAN_ROAM_SYNCH_IN_PROG)
+
+#else
+#define MLME_IS_ROAMING_IN_PROG(psoc, vdev_id) (false)
+#define MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, vdev_id) (false)
 #endif
 
 /**

+ 39 - 10
components/mlme/core/src/wlan_mlme_main.c

@@ -81,6 +81,30 @@ mlme_get_roam_invoke_params(struct wlan_objmgr_vdev *vdev)
 	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) {
+		mlme_legacy_err("Vdev object is NULL");
+		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;
+}
+
 uint8_t *mlme_get_dynamic_oce_flags(struct wlan_objmgr_vdev *vdev)
 {
 	struct mlme_legacy_priv *mlme_priv;
@@ -2579,14 +2603,18 @@ static
 const char *mlme_roam_state_to_string(enum roam_offload_state state)
 {
 	switch (state) {
-	case ROAM_INIT:
+	case WLAN_ROAM_INIT:
 		return "ROAM_INIT";
-	case ROAM_DEINIT:
+	case WLAN_ROAM_DEINIT:
 		return "ROAM_DEINIT";
-	case ROAM_RSO_STARTED:
-		return "ROAM_RSO_STARTED";
-	case ROAM_RSO_STOPPED:
+	case WLAN_ROAM_RSO_ENABLED:
+		return "ROAM_RSO_ENABLED";
+	case WLAN_ROAM_RSO_STOPPED:
 		return "ROAM_RSO_STOPPED";
+	case WLAN_ROAMING_IN_PROG:
+		return "ROAMING_IN_PROG";
+	case WLAN_ROAM_SYNCH_IN_PROG:
+		return "ROAM_SYNCH_IN_PROG";
 	default:
 		return "";
 	}
@@ -2596,9 +2624,10 @@ static void
 mlme_print_roaming_state(uint8_t vdev_id, enum roam_offload_state cur_state,
 			 enum roam_offload_state new_state)
 {
-	mlme_debug("ROAM: vdev %d: %s(%d) --> %s(%d)",
-		   vdev_id, mlme_roam_state_to_string(cur_state), cur_state,
-		   mlme_roam_state_to_string(new_state), new_state);
+	mlme_legacy_debug("ROAM: vdev%d: [%s(%d)] --> [%s(%d)]",
+			  vdev_id, mlme_roam_state_to_string(cur_state),
+			  cur_state,
+			  mlme_roam_state_to_string(new_state), new_state);
 
 	/* TODO: Try to print the state change requestor also */
 }
@@ -2777,14 +2806,14 @@ mlme_get_roam_state(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 
 	if (!vdev) {
 		mlme_legacy_err("vdev object is NULL");
-		return ROAM_DEINIT;
+		return WLAN_ROAM_DEINIT;
 	}
 
 	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
 	if (!mlme_priv) {
 		mlme_legacy_err("vdev legacy private object is NULL");
 		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
-		return ROAM_DEINIT;
+		return WLAN_ROAM_DEINIT;
 	}
 
 	roam_state = mlme_priv->mlme_roam.roam_sm.state;

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

@@ -271,25 +271,6 @@ enum mlme_ts_info_ack_policy {
 	TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
 };
 
-#if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
-/**
- * enum roam_offload_state - Roaming module state for each STA vdev.
- * @ROAM_DEINIT: Roaming module is not initialized at the
- *  firmware.
- * @ROAM_INIT: Roaming module initialized at the firmware.
- * @ROAM_RSO_STARTED: RSO started, firmware can roam to different AP.
- * @ROAM_RSO_STOPPED: RSO stopped - roaming module is initialized at firmware,
- *  but firmware cannot do roaming due to supplicant disabled roaming/driver
- * disabled roaming.
- */
-enum roam_offload_state {
-	ROAM_DEINIT,
-	ROAM_INIT,
-	ROAM_RSO_STARTED,
-	ROAM_RSO_STOPPED
-};
-#endif
-
 /**
  * struct mlme_edca_params - EDCA pramaters related config items
  *

+ 23 - 5
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_srtuct.h

@@ -26,6 +26,29 @@
 #include "reg_services_public_struct.h"
 
 #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
+/**
+ * enum roam_offload_state - Roaming module state for each STA vdev.
+ * @WLAN_ROAM_DEINIT: Roaming module is not initialized at the
+ *  firmware.
+ * @WLAN_ROAM_INIT: Roaming module initialized at the firmware.
+ * @WLAN_ROAM_RSO_ENABLED: RSO started, firmware can roam to different AP.
+ * @WLAN_ROAM_RSO_STOPPED: RSO stopped - roaming module is initialized at firmware,
+ * but firmware cannot do roaming due to supplicant disabled roaming/driver
+ * disabled roaming.
+ * @WLAN_ROAMING_IN_PROG: Roaming started at firmware. This state is
+ * transitioned after candidate selection is done at fw and preauth to
+ * the AP is started.
+ * @WLAN_ROAM_SYNCH_IN_PROG: Roaming handoff complete
+ */
+enum roam_offload_state {
+	WLAN_ROAM_DEINIT,
+	WLAN_ROAM_INIT,
+	WLAN_ROAM_RSO_ENABLED,
+	WLAN_ROAM_RSO_STOPPED,
+	WLAN_ROAMING_IN_PROG,
+	WLAN_ROAM_SYNCH_IN_PROG,
+};
+
 /**
  * enum wlan_cm_rso_control_requestor - Driver disabled roaming requestor that
  * will request the roam module to disable roaming based on the mlme operation
@@ -77,16 +100,11 @@ struct wlan_cm_roam_tx_ops {
  * struct wlan_cm_roam  - Connection manager roam configs, state and roam
  * data related structure
  * @tx_ops: Roam Tx ops to send roam offload commands to firmware
- * @reassoc_resp_frame:     Pointer to reassoc frame received in roam synch
- * indication
- * @reassoc_resp_frame_len: reassoc frame len received in roam synch indication
  * @pcl_vdev_cmd_active:  Flag to check if vdev level pcl command needs to be
  * sent or PDEV level PCL command needs to be sent
  */
 struct wlan_cm_roam {
 	struct wlan_cm_roam_tx_ops tx_ops;
-	uint8_t *reassoc_resp_frame;
-	uint16_t reassoc_resp_frame_len;
 	bool pcl_vdev_cmd_active;
 };
 #endif

+ 3 - 0
core/sme/inc/csr_neighbor_roam.h

@@ -265,6 +265,9 @@ void csr_roam_reset_roam_params(struct mac_context *mac_ptr);
 #define REASON_DRIVER_DISABLED                      48
 #define REASON_ROAM_CONTROL_CONFIG_RESTORED         49
 #define REASON_ROAM_CONTROL_CONFIG_ENABLED          50
+#define REASON_ROAM_CANDIDATE_FOUND                 51
+#define REASON_ROAM_HANDOFF_DONE                    52
+#define REASON_ROAM_ABORT                           53
 
 #if defined(WLAN_FEATURE_HOST_ROAM) || defined(WLAN_FEATURE_ROAM_OFFLOAD)
 QDF_STATUS csr_roam_offload_scan(struct mac_context *mac, uint8_t sessionId,

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

@@ -6226,7 +6226,8 @@ QDF_STATUS sme_config_fast_roaming(mac_handle_t mac_handle, uint8_t session_id,
 	mlme_set_supplicant_disabled_roaming(mac_ctx->psoc, session_id,
 					     !is_fast_roam_enabled);
 
-	state = (is_fast_roam_enabled) ? ROAM_RSO_STARTED : ROAM_RSO_STOPPED;
+	state = (is_fast_roam_enabled) ?
+		WLAN_ROAM_RSO_ENABLED : WLAN_ROAM_RSO_STOPPED;
 	status = csr_post_roam_state_change(mac_ctx, session_id, state,
 					    REASON_SUPPLICANT_DISABLED_ROAMING);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -6324,7 +6325,7 @@ QDF_STATUS sme_stop_roaming(mac_handle_t mac_handle, uint8_t session_id,
 					   requestor, false);
 
 	status = csr_post_roam_state_change(mac_ctx, session_id,
-					    ROAM_RSO_STOPPED,
+					    WLAN_ROAM_RSO_STOPPED,
 					    REASON_DRIVER_DISABLED);
 
 	return status;
@@ -6356,7 +6357,8 @@ QDF_STATUS sme_start_roaming(mac_handle_t mac_handle, uint8_t sessionId,
 	if (QDF_IS_STATUS_ERROR(status))
 		return QDF_STATUS_E_FAILURE;
 
-	status = csr_post_roam_state_change(mac, sessionId, ROAM_RSO_STARTED,
+	status = csr_post_roam_state_change(mac, sessionId,
+					    WLAN_ROAM_RSO_ENABLED,
 					    REASON_DRIVER_ENABLED);
 
 	sme_release_global_lock(&mac->sme);
@@ -15966,9 +15968,10 @@ static QDF_STATUS sme_enable_roaming(struct mac_context *mac, uint32_t vdev_id,
 	if (enable)
 		reason = REASON_SUPPLICANT_INIT_ROAMING;
 
-	csr_post_roam_state_change(mac, vdev_id,
-				   enable ? ROAM_RSO_STARTED : ROAM_DEINIT,
-				   reason);
+	csr_post_roam_state_change(
+			mac, vdev_id,
+			enable ? WLAN_ROAM_RSO_ENABLED : WLAN_ROAM_DEINIT,
+			reason);
 
 	sme_release_global_lock(&mac->sme);
 

+ 32 - 32
core/sme/src/csr/csr_api_roam.c

@@ -7563,7 +7563,7 @@ static void csr_roam_process_join_res(struct mac_context *mac_ctx,
 	}
 
 	if (csr_roam_is_sta_mode(mac_ctx, session_id))
-		csr_post_roam_state_change(mac_ctx, session_id, ROAM_INIT,
+		csr_post_roam_state_change(mac_ctx, session_id, WLAN_ROAM_INIT,
 					   REASON_CONNECT);
 
 	/* Not to signal link up because keys are yet to be set.
@@ -17542,8 +17542,7 @@ csr_create_roam_scan_offload_request(struct mac_context *mac_ctx,
 
 		req_buf->RoamScanOffloadEnabled = 0;
 	} else if (command == ROAM_SCAN_OFFLOAD_UPDATE_CFG) {
-		if (mlme_get_roam_state(mac_ctx->psoc, session_id) ==
-		    ROAM_RSO_STARTED)
+		if (MLME_IS_ROAM_STATE_RSO_ENABLED(mac_ctx->psoc, session_id))
 			req_buf->RoamScanOffloadEnabled = 1;
 	} else {
 		req_buf->RoamScanOffloadEnabled =
@@ -18637,7 +18636,7 @@ csr_roam_switch_to_init(struct mac_context *mac, uint8_t vdev_id,
 
 	cur_state = mlme_get_roam_state(mac->psoc, vdev_id);
 	switch (cur_state) {
-	case ROAM_DEINIT:
+	case WLAN_ROAM_DEINIT:
 		roaming_bitmap = mlme_get_roam_trigger_bitmap(mac->psoc,
 							      vdev_id);
 		if (!roaming_bitmap) {
@@ -18670,13 +18669,13 @@ csr_roam_switch_to_init(struct mac_context *mac, uint8_t vdev_id,
 				return QDF_STATUS_E_FAILURE;
 			}
 			csr_post_roam_state_change(mac, temp_vdev_id,
-						   ROAM_DEINIT, reason);
+						   WLAN_ROAM_DEINIT, reason);
 		}
 		break;
 
-	case ROAM_INIT:
-	case ROAM_RSO_STOPPED:
-	case ROAM_RSO_STARTED:
+	case WLAN_ROAM_INIT:
+	case WLAN_ROAM_RSO_STOPPED:
+	case WLAN_ROAM_RSO_ENABLED:
 	/*
 	 * Already the roaming module is initialized at fw,
 	 * just return from here
@@ -18689,7 +18688,7 @@ csr_roam_switch_to_init(struct mac_context *mac, uint8_t vdev_id,
 	if (QDF_IS_STATUS_ERROR(status))
 		return status;
 
-	mlme_set_roam_state(mac->psoc, vdev_id, ROAM_INIT);
+	mlme_set_roam_state(mac->psoc, vdev_id, WLAN_ROAM_INIT);
 
 	roam_enabled_vdev_id =
 		csr_get_roam_enabled_sta_sessionid(mac, vdev_id);
@@ -18721,17 +18720,17 @@ csr_roam_switch_to_rso_start(struct mac_context *mac, uint8_t vdev_id,
 
 	cur_state = mlme_get_roam_state(mac->psoc, vdev_id);
 	switch (cur_state) {
-	case ROAM_INIT:
-	case ROAM_RSO_STOPPED:
+	case WLAN_ROAM_INIT:
+	case WLAN_ROAM_RSO_STOPPED:
 		break;
 
-	case ROAM_DEINIT:
+	case WLAN_ROAM_DEINIT:
 		status = csr_roam_switch_to_init(mac, vdev_id, reason);
 		if (QDF_IS_STATUS_ERROR(status))
 			return status;
 
 		break;
-	case ROAM_RSO_STARTED:
+	case WLAN_ROAM_RSO_ENABLED:
 	/*
 	 * Send RSO update config if roaming already enabled
 	 */
@@ -18758,7 +18757,7 @@ csr_roam_switch_to_rso_start(struct mac_context *mac, uint8_t vdev_id,
 		sme_debug("ROAM: RSO start failed");
 		return status;
 	}
-	mlme_set_roam_state(mac->psoc, vdev_id, ROAM_RSO_STARTED);
+	mlme_set_roam_state(mac->psoc, vdev_id, WLAN_ROAM_RSO_ENABLED);
 
 	/*
 	 * If supplicant disabled roaming, driver does not send
@@ -18772,7 +18771,7 @@ csr_roam_switch_to_rso_start(struct mac_context *mac, uint8_t vdev_id,
 		return QDF_STATUS_SUCCESS;
 
 	sme_debug("ROAM: RSO disabled by Supplicant on vdev[%d]", vdev_id);
-	return csr_post_roam_state_change(mac, vdev_id, ROAM_RSO_STOPPED,
+	return csr_post_roam_state_change(mac, vdev_id, WLAN_ROAM_RSO_STOPPED,
 					  REASON_SUPPLICANT_DISABLED_ROAMING);
 }
 
@@ -18785,7 +18784,7 @@ csr_roam_switch_to_rso_stop(struct mac_context *mac, uint8_t vdev_id,
 
 	cur_state = mlme_get_roam_state(mac->psoc, vdev_id);
 	switch (cur_state) {
-	case ROAM_RSO_STARTED:
+	case WLAN_ROAM_RSO_ENABLED:
 		status = csr_post_rso_stop(mac, vdev_id, reason);
 		if (QDF_IS_STATUS_ERROR(status)) {
 			sme_err("ROAM: Unable to switch to RSO STOP State");
@@ -18793,9 +18792,9 @@ csr_roam_switch_to_rso_stop(struct mac_context *mac, uint8_t vdev_id,
 		}
 		break;
 
-	case ROAM_DEINIT:
-	case ROAM_RSO_STOPPED:
-	case ROAM_INIT:
+	case WLAN_ROAM_DEINIT:
+	case WLAN_ROAM_RSO_STOPPED:
+	case WLAN_ROAM_INIT:
 	/*
 	 * Already the roaming module is initialized at fw,
 	 * nothing to do here
@@ -18803,7 +18802,7 @@ csr_roam_switch_to_rso_stop(struct mac_context *mac, uint8_t vdev_id,
 	default:
 		return QDF_STATUS_SUCCESS;
 	}
-	mlme_set_roam_state(mac->psoc, vdev_id, ROAM_RSO_STOPPED);
+	mlme_set_roam_state(mac->psoc, vdev_id, WLAN_ROAM_RSO_STOPPED);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -18816,14 +18815,14 @@ csr_roam_switch_to_deinit(struct mac_context *mac, uint8_t vdev_id,
 	enum roam_offload_state cur_state = mlme_get_roam_state(mac->psoc,
 								vdev_id);
 	switch (cur_state) {
-	case ROAM_RSO_STARTED:
+	case WLAN_ROAM_RSO_ENABLED:
 		csr_roam_switch_to_rso_stop(mac, vdev_id, reason);
 		break;
-	case ROAM_RSO_STOPPED:
-	case ROAM_INIT:
+	case WLAN_ROAM_RSO_STOPPED:
+	case WLAN_ROAM_INIT:
 		break;
 
-	case ROAM_DEINIT:
+	case WLAN_ROAM_DEINIT:
 	/*
 	 * Already the roaming module is de-initialized at fw,
 	 * do nothing here
@@ -18836,7 +18835,7 @@ csr_roam_switch_to_deinit(struct mac_context *mac, uint8_t vdev_id,
 	if (QDF_IS_STATUS_ERROR(status))
 		return status;
 
-	mlme_set_roam_state(mac->psoc, vdev_id, ROAM_DEINIT);
+	mlme_set_roam_state(mac->psoc, vdev_id, WLAN_ROAM_DEINIT);
 
 	if (reason != REASON_SUPPLICANT_INIT_ROAMING)
 		csr_enable_roaming_on_connected_sta(mac, vdev_id);
@@ -18851,26 +18850,26 @@ csr_handle_roam_state_change(struct mac_context *mac, uint8_t vdev_id,
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	if (requested_state != ROAM_DEINIT &&
+	if (requested_state != WLAN_ROAM_DEINIT &&
 	    !csr_is_conn_state_connected_infra(mac, vdev_id)) {
 		sme_debug("ROAM: roam state change requested in disconnected state");
 		return status;
 	}
 
 	switch (requested_state) {
-	case ROAM_DEINIT:
+	case WLAN_ROAM_DEINIT:
 		status = csr_roam_switch_to_deinit(mac, vdev_id,
 						   reason);
 		break;
-	case ROAM_INIT:
+	case WLAN_ROAM_INIT:
 		status = csr_roam_switch_to_init(mac, vdev_id,
 						 reason);
 		break;
-	case ROAM_RSO_STARTED:
+	case WLAN_ROAM_RSO_ENABLED:
 		status = csr_roam_switch_to_rso_start(mac, vdev_id,
 						      reason);
 		break;
-	case ROAM_RSO_STOPPED:
+	case WLAN_ROAM_RSO_STOPPED:
 		status = csr_roam_switch_to_rso_stop(mac, vdev_id,
 						     reason);
 		break;
@@ -21641,7 +21640,7 @@ csr_send_roam_offload_init_msg(struct mac_context *mac, uint32_t vdev_id,
 QDF_STATUS
 csr_roam_update_cfg(struct mac_context *mac, uint8_t vdev_id, uint8_t reason)
 {
-	if (!MLME_IS_ROAM_STATE_RSO_STARTED(mac->psoc, vdev_id)) {
+	if (!MLME_IS_ROAM_STATE_RSO_ENABLED(mac->psoc, vdev_id)) {
 		sme_debug("Update cfg received while ROAM RSO not started");
 		return QDF_STATUS_E_INVAL;
 	}
@@ -21692,6 +21691,7 @@ csr_enable_roaming_on_connected_sta(struct mac_context *mac, uint8_t vdev_id)
 
 	sme_debug("ROAM: Enabling roaming on vdev[%d]", sta_vdev_id);
 
-	return csr_post_roam_state_change(mac, sta_vdev_id, ROAM_RSO_STARTED,
+	return csr_post_roam_state_change(mac, sta_vdev_id,
+					  WLAN_ROAM_RSO_ENABLED,
 					  REASON_CTX_INIT);
 }

+ 6 - 6
core/sme/src/csr/csr_neighbor_roam.c

@@ -141,11 +141,11 @@ QDF_STATUS csr_neighbor_roam_update_fast_roaming_enabled(struct mac_context *mac
 						     !fast_roam_enabled);
 		if (fast_roam_enabled) {
 			csr_post_roam_state_change(mac_ctx, session_id,
-						   ROAM_RSO_STARTED,
+						   WLAN_ROAM_RSO_ENABLED,
 						   REASON_CONNECT);
 		} else {
 			csr_post_roam_state_change(mac_ctx, session_id,
-					    ROAM_RSO_STOPPED,
+					    WLAN_ROAM_RSO_STOPPED,
 					    REASON_SUPPLICANT_DISABLED_ROAMING);
 		}
 		sme_release_global_lock(&mac_ctx->sme);
@@ -791,7 +791,7 @@ QDF_STATUS csr_neighbor_roam_indicate_disconnect(struct mac_context *mac,
 
 	/*Inform the Firmware to STOP Scanning as the host has a disconnect. */
 	if (csr_roam_is_sta_mode(mac, sessionId))
-		csr_post_roam_state_change(mac, sessionId, ROAM_DEINIT,
+		csr_post_roam_state_change(mac, sessionId, WLAN_ROAM_DEINIT,
 					   REASON_DISCONNECTED);
 
 	return QDF_STATUS_SUCCESS;
@@ -903,7 +903,7 @@ static void csr_neighbor_roam_info_ctx_init(struct mac_context *mac,
 #endif
 		{
 			csr_post_roam_state_change(mac, session_id,
-						   ROAM_RSO_STARTED,
+						   WLAN_ROAM_RSO_ENABLED,
 						   REASON_CTX_INIT);
 
 		}
@@ -1514,7 +1514,7 @@ QDF_STATUS csr_neighbor_roam_handoff_req_hdlr(
 	roam_ctrl_info->uOsRequestedHandoff = 1;
 
 	status = csr_post_roam_state_change(mac_ctx, session_id,
-					    ROAM_RSO_STOPPED,
+					    WLAN_ROAM_RSO_STOPPED,
 					    REASON_OS_REQUESTED_ROAMING_NOW);
 	if (QDF_STATUS_SUCCESS != status) {
 		sme_err("ROAM: RSO stop failed");
@@ -1579,7 +1579,7 @@ QDF_STATUS csr_neighbor_roam_start_lfr_scan(struct mac_context *mac,
 	/* There is no candidate or We are not roaming Now.
 	 * Inform the FW to restart Roam Offload Scan
 	 */
-	csr_post_roam_state_change(mac, sessionId, ROAM_RSO_STARTED,
+	csr_post_roam_state_change(mac, sessionId, WLAN_ROAM_RSO_ENABLED,
 				   REASON_NO_CAND_FOUND_OR_NOT_ROAMING_NOW);
 
 	return QDF_STATUS_SUCCESS;

+ 5 - 4
core/sme/src/csr/csr_roam_preauth.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -340,9 +340,10 @@ ABORT_PREAUTH:
 			reason = REASON_PREAUTH_FAILED_FOR_ALL;
 			if (neighbor_roam_info->uOsRequestedHandoff) {
 				neighbor_roam_info->uOsRequestedHandoff = 0;
-				csr_post_roam_state_change(mac_ctx, session_id,
-							   ROAM_RSO_STARTED,
-							   reason);
+				csr_post_roam_state_change(
+						   mac_ctx, session_id,
+						   WLAN_ROAM_RSO_ENABLED,
+						   reason);
 			} else {
 				/* ROAM_SCAN_OFFLOAD_RESTART is a
 				 * special command to trigger bmiss