Bläddra i källkod

qcacld-3.0: Replace sme_session_id with vdev_id

Replace sme_session_id with vdev_id in SME and LIM.

Change-Id: I7a4a85c440d8d7d7a2a4163bc71776e288da0222
CRs-Fixed: 2569190
Abhishek Singh 5 år sedan
förälder
incheckning
345be418c9

+ 2 - 2
components/tdls/core/src/wlan_tdls_cmds_process.c

@@ -1297,7 +1297,7 @@ QDF_STATUS tdls_process_send_mgmt_rsp(struct tdls_send_mgmt_rsp *rsp)
 	struct tdls_osif_indication ind;
 
 	psoc = rsp->psoc;
-	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, rsp->session_id,
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, rsp->vdev_id,
 						    WLAN_TDLS_SB_ID);
 	if (!vdev) {
 		tdls_err("invalid vdev");
@@ -1350,7 +1350,7 @@ QDF_STATUS tdls_send_mgmt_tx_completion(
 
 	psoc = tx_complete->psoc;
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
-						    tx_complete->session_id,
+						    tx_complete->vdev_id,
 						    WLAN_TDLS_SB_ID);
 
 	if (!vdev) {

+ 4 - 4
components/tdls/dispatcher/inc/wlan_tdls_public_structs.h

@@ -1185,24 +1185,24 @@ enum legacy_result_code {
 
 /**
  * struct tdls_send_mgmt_rsp - TDLS Response struct PE --> TDLS module
- * @session_id: session id
+ * @vdev_id: vdev id
  * @status_code: status code as tSirResultCodes
  * @psoc: soc object
  */
 struct tdls_send_mgmt_rsp {
-	uint8_t session_id;
+	uint8_t vdev_id;
 	enum legacy_result_code status_code;
 	struct wlan_objmgr_psoc *psoc;
 };
 
 /**
  * struct tdls_mgmt_tx_completion_ind - TDLS TX completion PE --> TDLS module
- * @session_id: session id
+ * @vdev_id: vdev_id
  * @tx_complete_status: tx complete status
  * @psoc: soc object
  */
 struct tdls_mgmt_tx_completion_ind {
-	uint8_t session_id;      /* Session ID */
+	uint8_t vdev_id;
 	uint32_t tx_complete_status;
 	struct wlan_objmgr_psoc *psoc;
 };

+ 8 - 8
core/mac/inc/sir_api.h

@@ -368,7 +368,7 @@ struct register_mgmt_frame {
 typedef struct sSirSmeRsp {
 	uint16_t messageType;   /* eWNI_SME_*_RSP */
 	uint16_t length;
-	uint8_t sessionId;
+	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	struct wlan_objmgr_psoc *psoc;
 } tSirSmeRsp, *tpSirSmeRsp;
@@ -574,7 +574,7 @@ struct add_ie_params {
 struct start_bss_req {
 	uint16_t messageType;   /* eWNI_SME_START_BSS_REQ */
 	uint16_t length;
-	uint8_t sessionId;
+	uint8_t vdev_id;
 	struct qdf_mac_addr bssid;
 	struct qdf_mac_addr self_macaddr;
 	uint16_t beaconInterval;
@@ -984,7 +984,7 @@ struct join_req {
 struct join_rsp {
 	uint16_t messageType;   /* eWNI_SME_JOIN_RSP */
 	uint16_t length;
-	uint8_t sessionId;      /* Session ID */
+	uint8_t vdev_id;      /* Session ID */
 	tSirResultCodes status_code;
 	tAniAuthType authType;
 	uint32_t vht_channel_width;
@@ -1241,7 +1241,7 @@ struct disassoc_rsp {
 struct disassoc_ind {
 	uint16_t messageType;   /* eWNI_SME_DISASSOC_IND */
 	uint16_t length;
-	uint8_t sessionId;      /* Session Identifier */
+	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	struct qdf_mac_addr bssid;
 	struct qdf_mac_addr peer_macaddr;
@@ -1254,7 +1254,7 @@ struct disassoc_ind {
 struct disassoc_cnf {
 	uint16_t messageType;   /* eWNI_SME_DISASSOC_CNF */
 	uint16_t length;
-	uint8_t sme_session_id;
+	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	struct qdf_mac_addr bssid;
 	struct qdf_mac_addr peer_macaddr;
@@ -1280,7 +1280,7 @@ struct sir_sme_discon_done_ind {
 struct deauth_req {
 	uint16_t messageType;   /* eWNI_SME_DEAUTH_REQ */
 	uint16_t length;
-	uint8_t sessionId;      /* Session ID */
+	uint8_t vdev_id;      /* Session ID */
 	struct qdf_mac_addr bssid;      /* AP BSSID */
 	struct qdf_mac_addr peer_macaddr;
 	uint16_t reasonCode;
@@ -1299,7 +1299,7 @@ struct deauth_rsp {
 struct deauth_ind {
 	uint16_t messageType;   /* eWNI_SME_DEAUTH_IND */
 	uint16_t length;
-	uint8_t sessionId;      /* Added for BT-AMP */
+	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	struct qdf_mac_addr bssid;      /* AP BSSID */
 	struct qdf_mac_addr peer_macaddr;
@@ -1313,7 +1313,7 @@ struct deauth_ind {
 struct deauth_cnf {
 	uint16_t messageType;   /* eWNI_SME_DEAUTH_CNF */
 	uint16_t length;
-	uint8_t sme_session_id;
+	uint8_t vdev_id;
 	tSirResultCodes status_code;
 	struct qdf_mac_addr bssid;
 	struct qdf_mac_addr peer_macaddr;

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

@@ -161,13 +161,13 @@ typedef struct sSirMbMsg {
  * struct sir_mgmt_msg - Structure used to send auth frame from CSR to LIM
  * @type: Message type
  * @msg_len: Message length
- * @session_id: session id
+ * @vdev_id: vdev id
  * @data: Pointer to data tobe transmitted
  */
 struct sir_mgmt_msg {
 	uint16_t type;
 	uint16_t msg_len;
-	uint8_t session_id;
+	uint8_t vdev_id;
 	uint8_t *data;
 };
 

+ 2 - 2
core/mac/src/pe/include/lim_session.h

@@ -615,7 +615,7 @@ static inline void pe_free_dph_node_array_buffer(void)
  * @sessionId: PE session ID is returned here, if PE session is created.
  * @numSta: number of stations
  * @bssType: bss type of new session to do conditional memory allocation.
- * @sme_session_id: sme session identifier
+ * @vdev_id: vdev_id
  *
  * This function returns the session context and the session ID if the session
  * corresponding to the passed BSSID is found in the PE session table.
@@ -626,7 +626,7 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 			      uint8_t *bssid,
 			      uint8_t *sessionId,
 			      uint16_t numSta, enum bss_type bssType,
-			      uint8_t sme_session_id);
+			      uint8_t vdev_id);
 
 /**
  * pe_find_session_by_bssid() - looks up the PE session given the BSSID.

+ 14 - 15
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -511,7 +511,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 	uint32_t auto_gen_bssid = false;
 	uint8_t session_id;
 	struct pe_session *session = NULL;
-	uint8_t sme_session_id = 0xFF;
+	uint8_t vdev_id = 0xFF;
 	uint32_t chanwidth;
 	struct vdev_type_nss *vdev_type_nss;
 	QDF_STATUS qdf_status = QDF_STATUS_SUCCESS;
@@ -534,7 +534,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 		goto free;
 	}
 	qdf_mem_copy(sme_start_bss_req, msg_buf, size);
-	sme_session_id = sme_start_bss_req->sessionId;
+	vdev_id = sme_start_bss_req->vdev_id;
 
 	if ((mac_ctx->lim.gLimSmeState == eLIM_SME_OFFLINE_STATE) ||
 	    (mac_ctx->lim.gLimSmeState == eLIM_SME_IDLE_STATE)) {
@@ -562,7 +562,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu
 					sme_start_bss_req->bssid.bytes,
 					&session_id, mac_ctx->lim.maxStation,
 					sme_start_bss_req->bssType,
-					sme_start_bss_req->sessionId);
+					sme_start_bss_req->vdev_id);
 			if (!session) {
 				pe_warn("Session Can not be created");
 				ret_code = eSIR_SME_RESOURCES_UNAVAILABLE;
@@ -971,7 +971,7 @@ free:
 		session = NULL;
 	}
 	lim_send_sme_start_bss_rsp(mac_ctx, eWNI_SME_START_BSS_RSP, ret_code,
-				   session, sme_session_id);
+				   session, vdev_id);
 }
 
 /**
@@ -2272,7 +2272,7 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *msg_buf)
 	if (!pe_session) {
 		pe_err("session does not exist for given bssId");
 		status = lim_prepare_disconnect_done_ind(mac, &msg,
-						smeDisassocCnf.sme_session_id,
+						smeDisassocCnf.vdev_id,
 						eSIR_SME_INVALID_SESSION,
 						NULL);
 		if (QDF_IS_STATUS_SUCCESS(status))
@@ -2416,10 +2416,10 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 	tSirResultCodes ret_code = eSIR_SME_SUCCESS;
 	struct pe_session *session_entry;
 	uint8_t session_id;      /* PE sessionId */
-	uint8_t sme_session_id;
+	uint8_t vdev_id;
 
 	qdf_mem_copy(&sme_deauth_req, msg_buf, sizeof(sme_deauth_req));
-	sme_session_id = sme_deauth_req.sessionId;
+	vdev_id = sme_deauth_req.vdev_id;
 
 	/*
 	 * We need to get a session first but we don't even know
@@ -2444,8 +2444,8 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 		deauth_trigger = eLIM_HOST_DEAUTH;
 		goto send_deauth;
 	}
-	pe_debug("received DEAUTH_REQ sessionid %d Systemrole %d reasoncode %u limSmestate %d from "
-		QDF_MAC_ADDR_STR, sme_session_id,
+	pe_debug("received DEAUTH_REQ vdev_id %d Systemrole %d reasoncode %u limSmestate %d from "
+		QDF_MAC_ADDR_STR, vdev_id,
 		GET_LIM_SYSTEM_ROLE(session_entry), sme_deauth_req.reasonCode,
 		session_entry->limSmeState,
 		QDF_MAC_ADDR_ARRAY(sme_deauth_req.peer_macaddr.bytes));
@@ -2454,7 +2454,7 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 			session_entry, 0, sme_deauth_req.reasonCode);
 #endif /* FEATURE_WLAN_DIAG_SUPPORT */
 
-	session_entry->smeSessionId = sme_session_id;
+	session_entry->vdev_id = vdev_id;
 
 	switch (GET_LIM_SYSTEM_ROLE(session_entry)) {
 	case eLIM_STA_ROLE:
@@ -2588,8 +2588,7 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 
 send_deauth:
 	lim_send_sme_deauth_ntf(mac_ctx, sme_deauth_req.peer_macaddr.bytes,
-				ret_code, deauth_trigger, 1,
-				sme_session_id);
+				ret_code, deauth_trigger, 1, vdev_id);
 }
 
 /**
@@ -4552,7 +4551,7 @@ static void lim_process_sme_disassoc_cnf(struct mac_context *mac_ctx,
 		       sme_disassoc_cnf.bssid.bytes);
 		status = lim_prepare_disconnect_done_ind
 						(mac_ctx, &err_msg,
-						sme_disassoc_cnf.sme_session_id,
+						sme_disassoc_cnf.vdev_id,
 						eSIR_SME_INVALID_SESSION,
 						NULL);
 
@@ -4637,7 +4636,7 @@ static void lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 					sme_deauth_req.peer_macaddr.bytes,
 					eSIR_SME_INVALID_PARAMETERS,
 					eLIM_HOST_DEAUTH, 1,
-					sme_deauth_req.sessionId);
+					sme_deauth_req.vdev_id);
 
 		return;
 	}
@@ -4649,7 +4648,7 @@ static void lim_process_sme_deauth_req(struct mac_context *mac_ctx,
 					sme_deauth_req.peer_macaddr.bytes,
 					eSIR_SME_INVALID_PARAMETERS,
 					eLIM_HOST_DEAUTH, 1,
-					sme_deauth_req.sessionId);
+					sme_deauth_req.vdev_id);
 		return;
 	}
 

+ 3 - 2
core/mac/src/pe/lim/lim_process_tdls.c

@@ -2755,6 +2755,7 @@ add_sta_error:
  * @msg_type:         Indicates message type
  * @result_code:       Indicates the result of previously issued
  *                    eWNI_SME_msg_type_REQ message
+ * @vdev_id: vdev id
  *
  * This function is called by lim_process_sme_req_messages() to send
  * eWNI_SME_START_RSP, eWNI_SME_STOP_BSS_RSP
@@ -2766,7 +2767,7 @@ add_sta_error:
 
 static void
 lim_send_tdls_comp_mgmt_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
-	 tSirResultCodes result_code, uint8_t sme_session_id)
+	 tSirResultCodes result_code, uint8_t vdev_id)
 {
 	struct scheduler_msg msg = {0};
 	struct tdls_send_mgmt_rsp *sme_rsp;
@@ -2780,7 +2781,7 @@ lim_send_tdls_comp_mgmt_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
 		return;
 
 	sme_rsp->status_code = (enum legacy_result_code)result_code;
-	sme_rsp->session_id = sme_session_id;
+	sme_rsp->vdev_id = vdev_id;
 	sme_rsp->psoc = mac_ctx->psoc;
 
 	msg.type = msg_type;

+ 9 - 9
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -3895,7 +3895,7 @@ lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
 	void                     *packet;
 	QDF_STATUS               qdf_status;
 	uint8_t                  txFlag = 0;
-	uint8_t                  sme_session_id = 0;
+	uint8_t                  vdev_id = 0;
 	uint8_t                  ch_spacing;
 	tLimWiderBWChannelSwitchInfo *wide_bw_ie;
 
@@ -3904,7 +3904,7 @@ lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	sme_session_id = session_entry->smeSessionId;
+	vdev_id = session_entry->smeSessionId;
 
 	qdf_mem_zero(&frm, sizeof(frm));
 
@@ -4002,7 +4002,7 @@ lim_send_extended_chan_switch_action_frame(struct mac_context *mac_ctx,
 						 ANI_TXDIR_TODS,
 						 7,
 						 lim_tx_complete, frame,
-						 txFlag, sme_session_id, 0,
+						 txFlag, vdev_id, 0,
 						 RATEID_DEFAULT);
 	MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
 			session_entry->peSessionId, qdf_status));
@@ -4063,14 +4063,14 @@ lim_p2p_oper_chan_change_confirm_action_frame(struct mac_context *mac_ctx,
 	void                     *packet;
 	QDF_STATUS               qdf_status;
 	uint8_t                  tx_flag = 0;
-	uint8_t                  sme_session_id = 0;
+	uint8_t                  vdev_id = 0;
 
 	if (!session_entry) {
 		pe_err("Session entry is NULL!!!");
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	sme_session_id = session_entry->smeSessionId;
+	vdev_id = session_entry->smeSessionId;
 
 	qdf_mem_zero(&frm, sizeof(frm));
 
@@ -4152,7 +4152,7 @@ lim_p2p_oper_chan_change_confirm_action_frame(struct mac_context *mac_ctx,
 			TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
 			7, lim_tx_complete, frame,
 			lim_oper_chan_change_confirm_tx_complete_cnf,
-			tx_flag, sme_session_id, false, 0, RATEID_DEFAULT);
+			tx_flag, vdev_id, false, 0, RATEID_DEFAULT);
 
 	MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
 			session_entry->peSessionId, qdf_status));
@@ -5099,7 +5099,7 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx,
 	uint16_t auth_ack_status;
 	enum rateid min_rid = RATEID_DEFAULT;
 
-	vdev_id = mb_msg->session_id;
+	vdev_id = mb_msg->vdev_id;
 	session = pe_find_session_by_vdev_id(mac_ctx, vdev_id);
 	if (!session) {
 		cds_packet_free((void *)packet);
@@ -5139,7 +5139,7 @@ void lim_send_mgmt_frame_tx(struct mac_context *mac_ctx,
 	struct sir_mgmt_msg *mb_msg = (struct sir_mgmt_msg *)msg->bodyptr;
 	uint32_t msg_len;
 	tpSirMacFrameCtl fc = (tpSirMacFrameCtl) mb_msg->data;
-	uint8_t sme_session_id;
+	uint8_t vdev_id;
 	QDF_STATUS qdf_status;
 	uint8_t *frame;
 	void *packet;
@@ -5149,7 +5149,7 @@ void lim_send_mgmt_frame_tx(struct mac_context *mac_ctx,
 	pe_debug("sending fc->type: %d fc->subType: %d",
 		fc->type, fc->subType);
 
-	sme_session_id = mb_msg->session_id;
+	vdev_id = mb_msg->vdev_id;
 	mac_hdr = (tpSirMacMgmtHdr)mb_msg->data;
 
 	lim_add_mgmt_seq_num(mac_ctx, mac_hdr);

+ 11 - 12
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -57,7 +57,7 @@
 #include "wma.h"
 
 void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
-		      tSirResultCodes result_code, uint8_t sme_session_id)
+		      tSirResultCodes result_code, uint8_t vdev_id)
 {
 	struct scheduler_msg msg = {0};
 	tSirSmeRsp *sme_rsp;
@@ -72,13 +72,12 @@ void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
 	sme_rsp->messageType = msg_type;
 	sme_rsp->length = sizeof(tSirSmeRsp);
 	sme_rsp->status_code = result_code;
-	sme_rsp->sessionId = sme_session_id;
+	sme_rsp->vdev_id = vdev_id;
 
 	msg.type = msg_type;
 	msg.bodyptr = sme_rsp;
 	msg.bodyval = 0;
-	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG,
-			 sme_session_id, msg.type));
+	MTRACE(mac_trace(mac_ctx, TRACE_CODE_TX_SME_MSG, vdev_id, msg.type));
 
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	switch (msg_type) {
@@ -392,7 +391,7 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
 				   tSirResultCodes result_code,
 				   uint16_t prot_status_code,
 				   struct pe_session *session_entry,
-				   uint8_t sme_session_id)
+				   uint8_t vdev_id)
 {
 	struct join_rsp *sme_join_rsp;
 	uint32_t rsp_len;
@@ -484,7 +483,7 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
 	sme_join_rsp->status_code = result_code;
 	sme_join_rsp->protStatusCode = prot_status_code;
 
-	sme_join_rsp->sessionId = sme_session_id;
+	sme_join_rsp->vdev_id = vdev_id;
 
 	lim_send_sme_join_reassoc_rsp_after_resume(mac_ctx, QDF_STATUS_SUCCESS,
 						   sme_join_rsp);
@@ -748,7 +747,7 @@ void lim_send_sme_disassoc_ntf(struct mac_context *mac,
 			 reasonCode, QDF_MAC_ADDR_ARRAY(peerMacAddr));
 		pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
 		pSirSmeDisassocInd->length = sizeof(*pSirSmeDisassocInd);
-		pSirSmeDisassocInd->sessionId = smesessionId;
+		pSirSmeDisassocInd->vdev_id = smesessionId;
 		pSirSmeDisassocInd->reasonCode = reasonCode;
 		pSirSmeDisassocInd->status_code = reasonCode;
 		qdf_mem_copy(pSirSmeDisassocInd->bssid.bytes,
@@ -801,7 +800,7 @@ lim_send_sme_disassoc_ind(struct mac_context *mac, tpDphHashNode sta,
 	pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
 	pSirSmeDisassocInd->length = sizeof(*pSirSmeDisassocInd);
 
-	pSirSmeDisassocInd->sessionId = pe_session->smeSessionId;
+	pSirSmeDisassocInd->vdev_id = pe_session->smeSessionId;
 	pSirSmeDisassocInd->status_code = eSIR_SME_DEAUTH_STATUS;
 	pSirSmeDisassocInd->reasonCode = sta->mlmStaContext.disassocReason;
 
@@ -852,7 +851,7 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode sta,
 	pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
 	pSirSmeDeauthInd->length = sizeof(*pSirSmeDeauthInd);
 
-	pSirSmeDeauthInd->sessionId = pe_session->smeSessionId;
+	pSirSmeDeauthInd->vdev_id = pe_session->smeSessionId;
 	if (eSIR_INFRA_AP_MODE == pe_session->bssType) {
 		pSirSmeDeauthInd->status_code =
 			(tSirResultCodes) sta->mlmStaContext.cleanupTrigger;
@@ -946,7 +945,7 @@ lim_send_sme_tdls_del_sta_ind(struct mac_context *mac, tpDphHashNode sta,
  */
 void
 lim_send_sme_mgmt_tx_completion(struct mac_context *mac,
-				uint32_t sme_session_id,
+				uint32_t vdev_id,
 				uint32_t txCompleteStatus)
 {
 	struct scheduler_msg msg = {0};
@@ -959,7 +958,7 @@ lim_send_sme_mgmt_tx_completion(struct mac_context *mac,
 		return;
 
 	/* sessionId */
-	mgmt_tx_completion_ind->session_id = sme_session_id;
+	mgmt_tx_completion_ind->vdev_id = vdev_id;
 
 	mgmt_tx_completion_ind->tx_complete_status = txCompleteStatus;
 
@@ -1083,7 +1082,7 @@ void lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
 		pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
 		pSirSmeDeauthInd->length = sizeof(*pSirSmeDeauthInd);
 		pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
-		pSirSmeDeauthInd->sessionId = smesessionId;
+		pSirSmeDeauthInd->vdev_id = smesessionId;
 		pSirSmeDeauthInd->status_code = reasonCode;
 		qdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, pe_session->bssId,
 			     sizeof(tSirMacAddr));

+ 6 - 6
core/mac/src/pe/lim/lim_send_sme_rsp_messages.h

@@ -42,7 +42,7 @@
  * @msg_type:       Indicates message type
  * @result_code:    Indicates the result of previously issued
  *                  eWNI_SME_msg_type_REQ message
- * @sme_session_id: SME session associated with the request
+ * @vdev_id: vdev_id
  *
  * This function is called by lim_process_sme_req_messages() to send
  * eWNI_SME_START_RSP, eWNI_SME_STOP_BSS_RSP
@@ -52,7 +52,7 @@
  * Return: None
  */
 void lim_send_sme_rsp(struct mac_context *mac_ctx, uint16_t msg_type,
-		      tSirResultCodes result_code, uint8_t sme_session_id);
+		      tSirResultCodes result_code, uint8_t vdev_id);
 
 /**
  * lim_send_sme_start_bss_rsp() - Send Start BSS response
@@ -78,7 +78,7 @@ void lim_send_sme_start_bss_rsp(struct mac_context *mac,
  * @result_code: Indicates the result of previously issued request
  * @prot_status_code: Protocol Status Code
  * @session_entry: PE Session Info
- * @sme_session_id: SME Session ID
+ * @vdev_id: vdev_id
  *
  * This function is called by lim_process_sme_req_messages() to send
  * eWNI_SME_JOIN_RSP or eWNI_SME_REASSOC_RSP messages to applications
@@ -91,7 +91,7 @@ void lim_send_sme_join_reassoc_rsp(struct mac_context *mac_ctx,
 				   tSirResultCodes result_code,
 				   uint16_t prot_status_code,
 				   struct pe_session *session_entry,
-				   uint8_t sme_session_id);
+				   uint8_t vdev_id);
 
 /**
  * lim_prepare_disconnect_done_ind() - Prepares the disconnect done ind message
@@ -140,7 +140,7 @@ void lim_send_sme_disassoc_ntf(struct mac_context *mac,
  * @reasonCode: the reason for Deauthetication
  * @deauthTrigger: the trigger for Deauthetication
  * @aid: the STAID. This parameter is present only on AP.
- * @smesessionId: ID of the SME session associated with the notification
+ * @vdev_id: vdev id
  *
  * This function is used for sending eWNI_SME_DEAUTH_RSP or
  * eWNI_SME_DEAUTH_IND to upper layers depending on deauthentication
@@ -150,7 +150,7 @@ void lim_send_sme_disassoc_ntf(struct mac_context *mac,
  */
 void lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
 			     tSirResultCodes reasonCode, uint16_t deauthTrigger,
-			     uint16_t aid, uint8_t smesessionId);
+			     uint16_t aid, uint8_t vdev_id);
 
 void lim_send_sme_disassoc_ind(struct mac_context *, tpDphHashNode, struct pe_session *);
 void lim_send_sme_deauth_ind(struct mac_context *, tpDphHashNode,

+ 4 - 4
core/mac/src/pe/lim/lim_session.c

@@ -533,7 +533,7 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 			      uint8_t *bssid,
 			      uint8_t *sessionId,
 			      uint16_t numSta, enum bss_type bssType,
-			      uint8_t sme_session_id)
+			      uint8_t vdev_id)
 {
 	QDF_STATUS status;
 	uint8_t i;
@@ -632,14 +632,14 @@ struct pe_session *pe_create_session(struct mac_context *mac,
 	 * reference count.
 	 */
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac->psoc,
-						    sme_session_id,
+						    vdev_id,
 						    WLAN_LEGACY_MAC_ID);
 	if (!vdev) {
-		pe_err("vdev is NULL for vdev_id: %u", sme_session_id);
+		pe_err("vdev is NULL for vdev_id: %u", vdev_id);
 		goto free_session_attrs;
 	}
 	session_ptr->vdev = vdev;
-	session_ptr->smeSessionId = sme_session_id;
+	session_ptr->vdev_id = vdev_id;
 	session_ptr->mac_ctx = mac;
 
 	if (eSIR_INFRASTRUCTURE_MODE == bssType)

+ 2 - 4
core/mac/src/pe/lim/lim_types.h

@@ -728,10 +728,8 @@ QDF_STATUS lim_process_sme_tdls_add_sta_req(struct mac_context *mac,
 QDF_STATUS lim_process_sme_tdls_del_sta_req(struct mac_context *mac,
 					    void *msg);
 
-void lim_send_sme_mgmt_tx_completion(
-		struct mac_context *mac,
-		uint32_t sme_session_id,
-		uint32_t txCompleteStatus);
+void lim_send_sme_mgmt_tx_completion(struct mac_context *mac, uint32_t vdev_id,
+				     uint32_t txCompleteStatus);
 QDF_STATUS lim_delete_tdls_peers(struct mac_context *mac_ctx,
 				    struct pe_session *session_entry);
 QDF_STATUS lim_process_tdls_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *);

+ 3 - 3
core/mac/src/pe/lim/lim_utils.c

@@ -5528,7 +5528,7 @@ void lim_set_peer_twt_cap(struct pe_session *session, struct s_ext_cap *ext_cap)
 /**
  * lim_send_ie() - sends IE to wma
  * @mac_ctx: global MAC context
- * @sme_session_id: sme session id
+ * @vdev_id: vdev_id
  * @eid: IE id
  * @band: band for which IE is intended
  * @buf: buffer containing IE
@@ -5538,7 +5538,7 @@ void lim_set_peer_twt_cap(struct pe_session *session, struct s_ext_cap *ext_cap)
  *
  * Return: status of operation
  */
-static QDF_STATUS lim_send_ie(struct mac_context *mac_ctx, uint32_t sme_session_id,
+static QDF_STATUS lim_send_ie(struct mac_context *mac_ctx, uint32_t vdev_id,
 			      uint8_t eid, enum cds_band_type band,
 			      uint8_t *buf, uint32_t len)
 {
@@ -5551,7 +5551,7 @@ static QDF_STATUS lim_send_ie(struct mac_context *mac_ctx, uint32_t sme_session_
 	if (!ie_msg)
 		return QDF_STATUS_E_NOMEM;
 
-	ie_msg->vdev_id = sme_session_id;
+	ie_msg->vdev_id = vdev_id;
 	ie_msg->ie_id = eid;
 	ie_msg->length = len;
 	ie_msg->band = band;

+ 10 - 12
core/sme/src/common/sme_api.c

@@ -4905,14 +4905,14 @@ QDF_STATUS sme_deregister_mgmt_frame(mac_handle_t mac_handle, uint8_t sessionId,
 /**
  * sme_prepare_mgmt_tx() - Prepares mgmt frame
  * @mac_handle: The handle returned by mac_open
- * @session_id: session id
+ * @vdev_id: vdev id
  * @buf: pointer to frame
  * @len: frame length
  *
  * Return: QDF_STATUS
  */
 static QDF_STATUS sme_prepare_mgmt_tx(mac_handle_t mac_handle,
-				      uint8_t session_id,
+				      uint8_t vdev_id,
 				      const uint8_t *buf, uint32_t len)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -4929,7 +4929,7 @@ static QDF_STATUS sme_prepare_mgmt_tx(mac_handle_t mac_handle,
 	} else {
 		msg->type = eWNI_SME_SEND_MGMT_FRAME_TX;
 		msg->msg_len = msg_len;
-		msg->session_id = session_id;
+		msg->vdev_id = vdev_id;
 		msg->data = (uint8_t *)msg + sizeof(*msg);
 		qdf_mem_copy(msg->data, buf, len);
 
@@ -8693,7 +8693,7 @@ QDF_STATUS sme_send_rate_update_ind(mac_handle_t mac_handle,
 /**
  * sme_update_access_policy_vendor_ie() - update vendor ie and access policy.
  * @mac_handle: Pointer to the mac context
- * @session_id: sme session id
+ * @vdev_id: vdev_id
  * @vendor_ie: vendor ie
  * @access_policy: vendor ie access policy
  *
@@ -8702,7 +8702,7 @@ QDF_STATUS sme_send_rate_update_ind(mac_handle_t mac_handle,
  * Return: success or failure.
  */
 QDF_STATUS sme_update_access_policy_vendor_ie(mac_handle_t mac_handle,
-					      uint8_t session_id,
+					      uint8_t vdev_id,
 					      uint8_t *vendor_ie,
 					      int access_policy)
 {
@@ -8722,12 +8722,10 @@ QDF_STATUS sme_update_access_policy_vendor_ie(mac_handle_t mac_handle,
 
 	qdf_mem_copy(&msg->ie[0], vendor_ie, sizeof(msg->ie));
 
-	msg->vdev_id = session_id;
+	msg->vdev_id = vdev_id;
 	msg->access_policy = access_policy;
 
-	sme_debug("sme_session_id: %hu, access_policy: %d", session_id,
-		  access_policy);
-
+	sme_debug("vdev_id: %hu, access_policy: %d", vdev_id, access_policy);
 	status = umac_send_mb_message_to_mac(msg);
 
 	return status;
@@ -13452,7 +13450,7 @@ void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode,
  * skipped or not
  * @skip_unsafe_channels: Param to tell if driver needs to
  * skip unsafe channels or not.
- * @param session_id: sme_session_id
+ * @vdev_id: vdev_id
  * @sap_operating_band: Band on which SAP is operating
  *
  * sme_update_sta_roam_policy update sta rome policies to csr
@@ -13464,7 +13462,7 @@ void sme_get_vdev_type_nss(enum QDF_OPMODE dev_mode,
 QDF_STATUS sme_update_sta_roam_policy(mac_handle_t mac_handle,
 				      enum sta_roam_policy_dfs_mode dfs_mode,
 				      bool skip_unsafe_channels,
-				      uint8_t session_id,
+				      uint8_t vdev_id,
 				      uint8_t sap_operating_band)
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
@@ -13502,7 +13500,7 @@ QDF_STATUS sme_update_sta_roam_policy(mac_handle_t mac_handle,
 	if (mac_ctx->mlme_cfg->lfr.roam_scan_offload_enabled) {
 		status = sme_acquire_global_lock(&mac_ctx->sme);
 		if (QDF_IS_STATUS_SUCCESS(status)) {
-			csr_roam_update_cfg(mac_ctx, session_id,
+			csr_roam_update_cfg(mac_ctx, vdev_id,
 				      REASON_ROAM_SCAN_STA_ROAM_POLICY_CHANGED);
 			sme_release_global_lock(&mac_ctx->sme);
 		}

+ 55 - 59
core/sme/src/csr/csr_api_roam.c

@@ -9261,9 +9261,9 @@ static void csr_roam_join_rsp_processor(struct mac_context *mac,
 		return;
 	}
 
-	session_ptr = CSR_GET_SESSION(mac, pSmeJoinRsp->sessionId);
+	session_ptr = CSR_GET_SESSION(mac, pSmeJoinRsp->vdev_id);
 	if (!session_ptr) {
-		sme_err("session %d not found", pSmeJoinRsp->sessionId);
+		sme_err("session %d not found", pSmeJoinRsp->vdev_id);
 		return;
 	}
 
@@ -9283,7 +9283,7 @@ static void csr_roam_join_rsp_processor(struct mac_context *mac,
 		    eCsrSmeIssuedAssocToSimilarAP ==
 		    pCommand->u.roamCmd.roamReason) {
 #ifndef WLAN_MDM_CODE_REDUCTION_OPT
-			sme_qos_csr_event_ind(mac, pSmeJoinRsp->sessionId,
+			sme_qos_csr_event_ind(mac, pSmeJoinRsp->vdev_id,
 					    SME_QOS_CSR_HANDOFF_COMPLETE, NULL);
 #endif
 		}
@@ -9304,7 +9304,7 @@ static void csr_roam_join_rsp_processor(struct mac_context *mac,
 		 */
 		session_ptr->join_bssid_count = 0;
 		csr_roam_complete(mac, eCsrJoinSuccess, (void *)pSmeJoinRsp,
-				  pSmeJoinRsp->sessionId);
+				  pSmeJoinRsp->vdev_id);
 
 		return;
 	}
@@ -9345,14 +9345,14 @@ static void csr_roam_join_rsp_processor(struct mac_context *mac,
 	/* If Join fails while Handoff is in progress, indicate
 	 * disassociated event to supplicant to reconnect
 	 */
-	if (csr_roam_is_handoff_in_progress(mac, pSmeJoinRsp->sessionId)) {
-		csr_roam_call_callback(mac, pSmeJoinRsp->sessionId, NULL,
+	if (csr_roam_is_handoff_in_progress(mac, pSmeJoinRsp->vdev_id)) {
+		csr_roam_call_callback(mac, pSmeJoinRsp->vdev_id, NULL,
 				       roamId, eCSR_ROAM_DISASSOCIATED,
 				       eCSR_ROAM_RESULT_FORCED);
 		/* Should indicate neighbor roam algorithm about the
 		 * connect failure here
 		 */
-		csr_neighbor_roam_indicate_connect(mac, pSmeJoinRsp->sessionId,
+		csr_neighbor_roam_indicate_connect(mac, pSmeJoinRsp->vdev_id,
 						   QDF_STATUS_E_FAILURE);
 	}
 
@@ -9406,7 +9406,7 @@ static void csr_roam_join_rsp_processor(struct mac_context *mac,
 	csr_roam_call_callback(mac, session_ptr->sessionId, NULL, roamId,
 			       eCSR_ROAM_ASSOCIATION_COMPLETION,
 			       eCSR_ROAM_RESULT_NOT_ASSOCIATED);
-	csr_roam_complete(mac, eCsrNothingToJoin, NULL, pSmeJoinRsp->sessionId);
+	csr_roam_complete(mac, eCsrNothingToJoin, NULL, pSmeJoinRsp->vdev_id);
 	csr_roam_free_connected_info(mac, prev_connect_info);
 }
 
@@ -9531,8 +9531,7 @@ bool csr_is_roam_command_waiting_for_session(struct mac_context *mac,
 
 static void
 csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
-				       tSmeCmd *cmd,
-				       uint8_t sme_session_id)
+				       tSmeCmd *cmd, uint8_t vdev_id)
 {
 	struct tag_csrscan_result *scan_result = NULL;
 	struct bss_description *bss_desc = NULL;
@@ -9557,8 +9556,7 @@ csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
 	if (CSR_IS_ROAMING(session) && session->fCancelRoaming) {
 		/* the roaming is cancelled. Simply complete the command */
 		sme_warn("Roam command canceled");
-		csr_roam_complete(mac_ctx, eCsrNothingToJoin, NULL,
-					sme_session_id);
+		csr_roam_complete(mac_ctx, eCsrNothingToJoin, NULL, vdev_id);
 		return;
 	}
 
@@ -9585,7 +9583,7 @@ csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
 			sme_err("CSR start BSS failed");
 			/* We need to complete the command */
 			csr_roam_complete(mac_ctx, eCsrStartBssFailure, NULL,
-					sme_session_id);
+					  vdev_id);
 		}
 		return;
 	}
@@ -9593,8 +9591,7 @@ csr_roaming_state_config_cnf_processor(struct mac_context *mac_ctx,
 	if (!cmd->u.roamCmd.pRoamBssEntry) {
 		sme_err("pRoamBssEntry is NULL");
 		/* We need to complete the command */
-		csr_roam_complete(mac_ctx, eCsrJoinFailure, NULL,
-				sme_session_id);
+		csr_roam_complete(mac_ctx, eCsrJoinFailure, NULL, vdev_id);
 		return;
 	}
 
@@ -9698,19 +9695,18 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
 	tpCsrNeighborRoamControlInfo pNeighborRoamInfo = NULL;
 	struct csr_roam_session *csr_session;
 
-	if (pSmeJoinRsp->sessionId >= WLAN_MAX_VDEVS) {
-		sme_err("Invalid session ID received %d",
-			 pSmeJoinRsp->sessionId);
+	if (pSmeJoinRsp->vdev_id >= WLAN_MAX_VDEVS) {
+		sme_err("Invalid session ID received %d", pSmeJoinRsp->vdev_id);
 		return;
 	}
 
 	pNeighborRoamInfo =
-		&mac->roam.neighborRoamInfo[pSmeJoinRsp->sessionId];
+		&mac->roam.neighborRoamInfo[pSmeJoinRsp->vdev_id];
 	if (eSIR_SME_SUCCESS == pSmeJoinRsp->status_code) {
 		QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 			 "CSR SmeReassocReq Successful");
 		result = eCsrReassocSuccess;
-		csr_session = CSR_GET_SESSION(mac, pSmeJoinRsp->sessionId);
+		csr_session = CSR_GET_SESSION(mac, pSmeJoinRsp->vdev_id);
 		if (csr_session) {
 			if (pSmeJoinRsp->nss < csr_session->nss) {
 				csr_session->nss = pSmeJoinRsp->nss;
@@ -9727,17 +9723,17 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
 		 * processing the result in csr_roam_process_results()
 		 */
 		if (csr_roam_is_handoff_in_progress(mac,
-						pSmeJoinRsp->sessionId)) {
+						pSmeJoinRsp->vdev_id)) {
 			/* Need to dig more on indicating events to
 			 * SME QoS module
 			 */
-			sme_qos_csr_event_ind(mac, pSmeJoinRsp->sessionId,
+			sme_qos_csr_event_ind(mac, pSmeJoinRsp->vdev_id,
 					    SME_QOS_CSR_HANDOFF_COMPLETE, NULL);
 			csr_roam_complete(mac, result, pSmeJoinRsp,
-					pSmeJoinRsp->sessionId);
+					pSmeJoinRsp->vdev_id);
 		} else {
 			csr_roam_complete(mac, result, NULL,
-					pSmeJoinRsp->sessionId);
+					pSmeJoinRsp->vdev_id);
 		}
 	}
 	/* Should we handle this similar to handling the join failure? Is it ok
@@ -9767,7 +9763,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
 				if (!roam_info)
 					return;
 				csr_roam_call_callback(mac,
-						       pSmeJoinRsp->sessionId,
+						       pSmeJoinRsp->vdev_id,
 						       roam_info, roam_id,
 						    eCSR_ROAM_FT_REASSOC_FAILED,
 						    eCSR_ROAM_RESULT_SUCCESS);
@@ -9782,7 +9778,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
 				 * were trying to reassoc.
 				 */
 				csr_roam_complete(mac, eCsrJoinFailure, NULL,
-						pSmeJoinRsp->sessionId);
+						pSmeJoinRsp->vdev_id);
 				qdf_mem_free(roam_info);
 				return;
 			}
@@ -9796,11 +9792,11 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
 		 */
 		if (!QDF_IS_STATUS_SUCCESS
 			    (csr_roam_issue_disassociate
-				    (mac, pSmeJoinRsp->sessionId,
+				    (mac, pSmeJoinRsp->vdev_id,
 				    eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE,
 				false))) {
 			csr_roam_complete(mac, eCsrJoinFailure, NULL,
-					pSmeJoinRsp->sessionId);
+					pSmeJoinRsp->vdev_id);
 		}
 	}
 }
@@ -9825,20 +9821,20 @@ static void csr_roam_roaming_state_stop_bss_rsp_processor(struct mac_context *ma
 		}
 	}
 #endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */
-	mac->roam.roamSession[pSmeRsp->sessionId].connectState =
+	mac->roam.roamSession[pSmeRsp->vdev_id].connectState =
 		eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
-	if (CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(mac, pSmeRsp->sessionId)) {
+	if (CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ(mac, pSmeRsp->vdev_id)) {
 		profile =
-		    mac->roam.roamSession[pSmeRsp->sessionId].pCurRoamProfile;
+		    mac->roam.roamSession[pSmeRsp->vdev_id].pCurRoamProfile;
 		if (profile && CSR_IS_CONN_NDI(profile)) {
 			result_code = eCsrStopBssSuccess;
 			if (pSmeRsp->status_code != eSIR_SME_SUCCESS)
 				result_code = eCsrStopBssFailure;
 		}
-		csr_roam_complete(mac, result_code, NULL, pSmeRsp->sessionId);
+		csr_roam_complete(mac, result_code, NULL, pSmeRsp->vdev_id);
 	} else if (CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(mac,
-			pSmeRsp->sessionId)) {
-		csr_roam_reissue_roam_command(mac, pSmeRsp->sessionId);
+			pSmeRsp->vdev_id)) {
+		csr_roam_reissue_roam_command(mac, pSmeRsp->vdev_id);
 	}
 }
 
@@ -10369,20 +10365,20 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf)
 	sme_debug("Message %d[0x%04X] received in substate %s",
 		pSmeRsp->messageType, pSmeRsp->messageType,
 		mac_trace_getcsr_roam_sub_state(
-			mac->roam.curSubState[pSmeRsp->sessionId]));
+			mac->roam.curSubState[pSmeRsp->vdev_id]));
 
 	switch (pSmeRsp->messageType) {
 
 	case eWNI_SME_JOIN_RSP:
 		/* in Roaming state, process the Join response message... */
-		if (CSR_IS_ROAM_SUBSTATE_JOIN_REQ(mac, pSmeRsp->sessionId))
+		if (CSR_IS_ROAM_SUBSTATE_JOIN_REQ(mac, pSmeRsp->vdev_id))
 			/* We sent a JOIN_REQ */
 			csr_roam_join_rsp_processor(mac,
 						    (struct join_rsp *)pSmeRsp);
 		break;
 	case eWNI_SME_REASSOC_RSP:
 		/* or the Reassociation response message... */
-		if (CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(mac, pSmeRsp->sessionId))
+		if (CSR_IS_ROAM_SUBSTATE_REASSOC_REQ(mac, pSmeRsp->vdev_id))
 			csr_roam_roaming_state_reassoc_rsp_processor(mac,
 						(struct join_rsp *)pSmeRsp);
 		break;
@@ -10392,30 +10388,30 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf)
 		break;
 	case eWNI_SME_DISASSOC_RSP:
 		/* or the Disassociate response message... */
-		if (CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(mac, pSmeRsp->sessionId)
+		if (CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ(mac, pSmeRsp->vdev_id)
 		    || CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN(mac,
-							pSmeRsp->sessionId)
+							pSmeRsp->vdev_id)
 		    || CSR_IS_ROAM_SUBSTATE_REASSOC_FAIL(mac,
-							pSmeRsp->sessionId)
+							pSmeRsp->vdev_id)
 		    || CSR_IS_ROAM_SUBSTATE_DISASSOC_FORCED(mac,
-							pSmeRsp->sessionId)
+							pSmeRsp->vdev_id)
 		    || CSR_IS_ROAM_SUBSTATE_DISCONNECT_CONTINUE(mac,
-							pSmeRsp->sessionId)
+							pSmeRsp->vdev_id)
 		    || CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(mac,
-							pSmeRsp->sessionId)) {
+							pSmeRsp->vdev_id)) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 				 "eWNI_SME_DISASSOC_RSP subState = %s",
 				  mac_trace_getcsr_roam_sub_state(
-				  mac->roam.curSubState[pSmeRsp->sessionId]));
+				  mac->roam.curSubState[pSmeRsp->vdev_id]));
 			csr_roam_roaming_state_disassoc_rsp_processor(mac,
 						(struct disassoc_rsp *) pSmeRsp);
 		}
 		break;
 	case eWNI_SME_DEAUTH_RSP:
 		/* or the Deauthentication response message... */
-		if (CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(mac, pSmeRsp->sessionId)) {
+		if (CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ(mac, pSmeRsp->vdev_id)) {
 			csr_remove_nonscan_cmd_from_pending_list(mac,
-					pSmeRsp->sessionId,
+					pSmeRsp->vdev_id,
 					eSmeCommandWmStatusChange);
 			csr_roam_roaming_state_deauth_rsp_processor(mac,
 						(struct deauth_rsp *) pSmeRsp);
@@ -10424,7 +10420,7 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf)
 	case eWNI_SME_START_BSS_RSP:
 		/* or the Start BSS response message... */
 		if (CSR_IS_ROAM_SUBSTATE_START_BSS_REQ(mac,
-						       pSmeRsp->sessionId))
+						       pSmeRsp->vdev_id))
 			csr_roam_roaming_state_start_bss_rsp_processor(mac,
 					(struct start_bss_rsp *)pSmeRsp);
 		break;
@@ -10439,7 +10435,7 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf)
 			break;
 
 		qdf_copy_macaddr(&roam_info->peerMac, &pIbssPeerInd->peer_addr);
-		csr_roam_call_callback(mac, pSmeRsp->sessionId, roam_info, 0,
+		csr_roam_call_callback(mac, pSmeRsp->vdev_id, roam_info, 0,
 				       eCSR_ROAM_CONNECT_STATUS_UPDATE,
 				       eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
 		qdf_mem_free(roam_info);
@@ -10465,9 +10461,9 @@ void csr_roaming_state_msg_processor(struct mac_context *mac, void *msg_buf)
 		sme_debug("Unexpected message type: %d[0x%X] received in substate %s",
 			pSmeRsp->messageType, pSmeRsp->messageType,
 			mac_trace_getcsr_roam_sub_state(
-				mac->roam.curSubState[pSmeRsp->sessionId]));
+				mac->roam.curSubState[pSmeRsp->vdev_id]));
 		/* If we are connected, check the link status change */
-		if (!csr_is_conn_state_disconnected(mac, pSmeRsp->sessionId))
+		if (!csr_is_conn_state_disconnected(mac, pSmeRsp->vdev_id))
 			csr_roam_check_for_link_status_change(mac, pSmeRsp);
 		break;
 	}
@@ -12208,8 +12204,8 @@ csr_roam_chk_lnk_deauth_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
 	struct deauth_ind *pDeauthInd;
 
 	pDeauthInd = (struct deauth_ind *)msg_ptr;
-	sme_debug("DEAUTH Indication from MAC for session %d bssid %pM",
-		  pDeauthInd->sessionId, pDeauthInd->bssid.bytes);
+	sme_debug("DEAUTH Indication from MAC for vdev_id %d bssid %pM",
+		  pDeauthInd->vdev_id, pDeauthInd->bssid.bytes);
 
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 						   &pDeauthInd->bssid,
@@ -16719,13 +16715,13 @@ QDF_STATUS csr_set_ht2040_mode(struct mac_context *mac, uint32_t sessionId,
 #endif
 
 QDF_STATUS csr_send_mb_deauth_req_msg(struct mac_context *mac,
-				      uint32_t sessionId,
+				      uint32_t vdev_id,
 				      tSirMacAddr bssId, uint16_t reasonCode)
 {
 	struct deauth_req *pMsg;
-	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
+	struct csr_roam_session *pSession = CSR_GET_SESSION(mac, vdev_id);
 
-	if (!CSR_IS_SESSION_VALID(mac, sessionId))
+	if (!CSR_IS_SESSION_VALID(mac, vdev_id))
 		return QDF_STATUS_E_FAILURE;
 
 	pMsg = qdf_mem_malloc(sizeof(*pMsg));
@@ -16734,7 +16730,7 @@ QDF_STATUS csr_send_mb_deauth_req_msg(struct mac_context *mac,
 
 	pMsg->messageType = eWNI_SME_DEAUTH_REQ;
 	pMsg->length = sizeof(*pMsg);
-	pMsg->sessionId = sessionId;
+	pMsg->vdev_id = vdev_id;
 
 	if ((pSession->pCurRoamProfile)
 	     && (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) {
@@ -16774,7 +16770,7 @@ QDF_STATUS csr_send_mb_disassoc_cnf_msg(struct mac_context *mac,
 		pMsg->messageType = eWNI_SME_DISASSOC_CNF;
 		pMsg->status_code = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(*pMsg);
-		pMsg->sme_session_id = pDisassocInd->sessionId;
+		pMsg->vdev_id = pDisassocInd->vdev_id;
 		qdf_copy_macaddr(&pMsg->peer_macaddr,
 				 &pDisassocInd->peer_macaddr);
 		status = QDF_STATUS_SUCCESS;
@@ -16812,7 +16808,7 @@ QDF_STATUS csr_send_mb_deauth_cnf_msg(struct mac_context *mac,
 		pMsg->messageType = eWNI_SME_DEAUTH_CNF;
 		pMsg->status_code = eSIR_SME_SUCCESS;
 		pMsg->length = sizeof(*pMsg);
-		pMsg->sme_session_id = pDeauthInd->sessionId;
+		pMsg->vdev_id = pDeauthInd->vdev_id;
 		qdf_copy_macaddr(&pMsg->bssid, &pDeauthInd->bssid);
 		status = QDF_STATUS_SUCCESS;
 		if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -16981,7 +16977,7 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(struct mac_context *mac, uint32_t
 		return QDF_STATUS_E_NOMEM;
 
 	pMsg->messageType = eWNI_SME_START_BSS_REQ;
-	pMsg->sessionId = sessionId;
+	pMsg->vdev_id = sessionId;
 	pMsg->length = sizeof(*pMsg);
 	qdf_copy_macaddr(&pMsg->bssid, &pParam->bssid);
 	/* self_mac_addr */

+ 6 - 7
core/sme/src/csr/csr_cmd_process.c

@@ -39,16 +39,15 @@ QDF_STATUS csr_msg_processor(struct mac_context *mac_ctx, void *msg_buf)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	tSirSmeRsp *sme_rsp = (tSirSmeRsp *) msg_buf;
-	uint8_t session_id = sme_rsp->sessionId;
+	uint8_t vdev_id = sme_rsp->vdev_id;
 	enum csr_roam_state cur_state;
 
-	cur_state = sme_get_current_roam_state(MAC_HANDLE(mac_ctx), session_id);
+	cur_state = sme_get_current_roam_state(MAC_HANDLE(mac_ctx), vdev_id);
 	sme_debug("msg %d[0x%04X] recvd in curstate %s & substate %s id(%d)",
 		sme_rsp->messageType, sme_rsp->messageType,
 		mac_trace_getcsr_roam_state(cur_state),
 		mac_trace_getcsr_roam_sub_state(
-			mac_ctx->roam.curSubState[session_id]),
-		session_id);
+			mac_ctx->roam.curSubState[vdev_id]), vdev_id);
 
 	/* Process the message based on the state of the roaming states... */
 	switch (cur_state) {
@@ -91,19 +90,19 @@ QDF_STATUS csr_msg_processor(struct mac_context *mac_ctx, void *msg_buf)
 		} else {
 			sme_err("Message 0x%04X is not handled by CSR state is %d session Id %d",
 				sme_rsp->messageType, cur_state,
-				session_id);
+				vdev_id);
 
 			if (eWNI_SME_FT_PRE_AUTH_RSP ==
 					sme_rsp->messageType) {
 				sme_err("Dequeue eSmeCommandRoam command with reason eCsrPerformPreauth");
 				csr_dequeue_roam_command(mac_ctx,
-					eCsrPerformPreauth, session_id);
+					eCsrPerformPreauth, vdev_id);
 			} else if (eWNI_SME_REASSOC_RSP ==
 					sme_rsp->messageType) {
 				sme_err("Dequeue eSmeCommandRoam command with reason eCsrSmeIssuedFTReassoc");
 				csr_dequeue_roam_command(mac_ctx,
 					eCsrSmeIssuedFTReassoc,
-					session_id);
+					vdev_id);
 			}
 		}
 		break;