Browse Source

qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp

Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp.

Change-Id: I7036160f39ff69be5f937a71769e057d8906f2d3
CRs-Fixed: 898864
Srinivas Girigowda 9 years ago
parent
commit
e6a851ebdf

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

@@ -1413,8 +1413,8 @@ typedef struct sSirSmeDeauthReq {
 	uint16_t length;
 	uint8_t sessionId;      /* Session ID */
 	uint16_t transactionId; /* Transaction ID for cmd */
-	tSirMacAddr bssId;      /* AP BSSID */
-	tSirMacAddr peerMacAddr;
+	struct cdf_mac_addr bssid;      /* AP BSSID */
+	struct cdf_mac_addr peer_macaddr;
 	uint16_t reasonCode;
 } tSirSmeDeauthReq, *tpSirSmeDeauthReq;
 

+ 20 - 34
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -668,45 +668,32 @@ lim_cleanup_rx_path(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 } /*** end lim_cleanup_rx_path() ***/
 
 /**
- * lim_send_del_sta_cnf()
+ * lim_send_del_sta_cnf() - Send Del sta confirmation
+ * @pMac: Pointer to Global MAC structure
+ * @sta_dsaddr: sta ds address
+ * @staDsAssocId: sta ds association id
+ * @mlmStaContext: MLM station context
+ * @statusCode: Status code
+ * @psessionEntry: Session entry
  *
- ***FUNCTION:
- * This function is called to  send appropriate CNF message to SME
- *
- ***LOGIC:
+ * This function is called to send appropriate CNF message to SME.
  *
- *
- ***ASSUMPTIONS:
- * NA
- *
- ***NOTE:
- * NA
- *
- * @param pMac    Pointer to Global MAC structure
- * @param tpAniSirGlobal pMac,
- * @param tSirMacAddr staDsAddr,
- * @param uint16_t staDsAssocId,
- * @param tLimMlmStaContext mlmStaContext,
- * @param tSirResultCodes statusCode
- *
- * @return None
+ * Return: None
  */
-
 void
-lim_send_del_sta_cnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
+lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct cdf_mac_addr sta_dsaddr,
 		     uint16_t staDsAssocId, tLimMlmStaContext mlmStaContext,
 		     tSirResultCodes statusCode, tpPESession psessionEntry)
 {
-
 	tLimMlmDisassocCnf mlmDisassocCnf;
 	tLimMlmDeauthCnf mlmDeauthCnf;
 	tLimMlmPurgeStaInd mlmPurgeStaInd;
 
-	lim_log(pMac, LOG1, FL("Sessionid: %d staDsAssocId: %d Trigger: %d"
-			       "statusCode: %d staDsAddr: " MAC_ADDRESS_STR),
+	lim_log(pMac, LOG1,
+		FL("Sessionid: %d staDsAssocId: %d Trigger: %d statusCode: %d sta_dsaddr: "MAC_ADDRESS_STR),
 		psessionEntry->peSessionId, staDsAssocId,
 		mlmStaContext.cleanupTrigger, statusCode,
-		MAC_ADDR_ARRAY(staDsAddr));
+		MAC_ADDR_ARRAY(sta_dsaddr.bytes));
 
 	if (LIM_IS_STA_ROLE(psessionEntry) ||
 	    LIM_IS_BT_AMP_STA_ROLE(psessionEntry)) {
@@ -748,7 +735,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
 			mlmStaContext.cleanupTrigger);
 
 		cdf_mem_copy((uint8_t *) &mlmDisassocCnf.peerMacAddr,
-			     (uint8_t *) staDsAddr, sizeof(tSirMacAddr));
+			     (uint8_t *) sta_dsaddr.bytes, CDF_MAC_ADDR_SIZE);
 		mlmDisassocCnf.resultCode = statusCode;
 		mlmDisassocCnf.disassocTrigger = mlmStaContext.cleanupTrigger;
 		/* Update PE session Id */
@@ -768,8 +755,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
 		lim_log(pMac, LOGW,
 			FL("Lim Posting DEAUTH_CNF to Sme. Trigger: %d"),
 			mlmStaContext.cleanupTrigger);
-		cdf_mem_copy((uint8_t *) &mlmDeauthCnf.peerMacAddr,
-			     (uint8_t *) staDsAddr, sizeof(tSirMacAddr));
+		cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr, &sta_dsaddr);
 		mlmDeauthCnf.resultCode = statusCode;
 		mlmDeauthCnf.deauthTrigger = mlmStaContext.cleanupTrigger;
 		/* PE session Id */
@@ -789,7 +775,7 @@ lim_send_del_sta_cnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
 			FL("Lim Posting PURGE_STA_IND to Sme. Trigger: %d"),
 			mlmStaContext.cleanupTrigger);
 		cdf_mem_copy((uint8_t *) &mlmPurgeStaInd.peerMacAddr,
-			     (uint8_t *) staDsAddr, sizeof(tSirMacAddr));
+			     (uint8_t *) sta_dsaddr.bytes, CDF_MAC_ADDR_SIZE);
 		mlmPurgeStaInd.reasonCode =
 			(uint8_t) mlmStaContext.disassocReason;
 		mlmPurgeStaInd.aid = staDsAssocId;
@@ -4857,7 +4843,7 @@ lim_prepare_and_send_del_sta_cnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 				 tpPESession psessionEntry)
 {
 	uint16_t staDsAssocId = 0;
-	tSirMacAddr staDsAddr;
+	struct cdf_mac_addr sta_dsaddr;
 	tLimMlmStaContext mlmStaContext;
 
 	if (pStaDs == NULL) {
@@ -4865,8 +4851,8 @@ lim_prepare_and_send_del_sta_cnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 		return;
 	}
 	staDsAssocId = pStaDs->assocId;
-	cdf_mem_copy((uint8_t *) staDsAddr,
-		     pStaDs->staAddr, sizeof(tSirMacAddr));
+	cdf_mem_copy((uint8_t *) sta_dsaddr.bytes,
+		     pStaDs->staAddr, CDF_MAC_ADDR_SIZE);
 
 	mlmStaContext = pStaDs->mlmStaContext;
 	if (LIM_IS_AP_ROLE(psessionEntry) ||
@@ -4883,7 +4869,7 @@ lim_prepare_and_send_del_sta_cnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs,
 				 psessionEntry->peSessionId,
 				 psessionEntry->limMlmState));
 	}
-	lim_send_del_sta_cnf(pMac, staDsAddr, staDsAssocId, mlmStaContext,
+	lim_send_del_sta_cnf(pMac, sta_dsaddr, staDsAssocId, mlmStaContext,
 			     statusCode, psessionEntry);
 }
 

+ 1 - 1
core/mac/src/pe/lim/lim_assoc_utils.h

@@ -134,7 +134,7 @@ void lim_post_reassoc_failure(tpAniSirGlobal,
 			      tSirResultCodes, uint16_t, tpPESession);
 bool lim_is_reassoc_in_progress(tpAniSirGlobal, tpPESession);
 void
-lim_send_del_sta_cnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
+lim_send_del_sta_cnf(tpAniSirGlobal pMac, struct cdf_mac_addr sta_dsaddr,
 		     uint16_t staDsAssocId, tLimMlmStaContext mlmStaContext,
 		     tSirResultCodes statusCode, tpPESession psessionEntry);
 

+ 8 - 9
core/mac/src/pe/lim/lim_process_auth_frame.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -527,15 +527,14 @@ lim_process_auth_frame(tpAniSirGlobal pMac, uint8_t *pRxPacketInfo,
 			    &&
 			    (cdf_mem_compare
 				     ((uint8_t *) pHdr->sa,
-				     (uint8_t *) &pMlmDeauthReq->peerMacAddr,
-				     sizeof(tSirMacAddr)))) {
+				     (uint8_t *) &pMlmDeauthReq->peer_macaddr.bytes,
+				     CDF_MAC_ADDR_SIZE))) {
 				PELOGE(lim_log
-					       (pMac, LOGE,
-					       FL("TODO:Ack for deauth frame "
-						  "is pending Issue delsta for "
-						  MAC_ADDRESS_STR),
-					       MAC_ADDR_ARRAY(pMlmDeauthReq->
-							      peerMacAddr));
+				      (pMac, LOGE,
+				       FL("TODO:Ack for deauth frame is pending Issue delsta for "
+					  MAC_ADDRESS_STR),
+					  MAC_ADDR_ARRAY(pMlmDeauthReq->
+							 peer_macaddr.bytes));
 				       )
 				lim_process_deauth_ack_timeout(pMac);
 				isConnected = eSIR_FALSE;

+ 32 - 28
core/mac/src/pe/lim/lim_process_mlm_req_messages.c

@@ -1798,8 +1798,8 @@ bool lim_check_disassoc_deauth_ack_pending(tpAniSirGlobal mac_ctx,
 			      (uint8_t *) &disassoc_req->peerMacAddr,
 			       sizeof(tSirMacAddr)))) ||
 	    (deauth_req && (cdf_mem_compare((uint8_t *) sta_mac,
-			      (uint8_t *) &deauth_req->peerMacAddr,
-			       sizeof(tSirMacAddr))))) {
+			      (uint8_t *) &deauth_req->peer_macaddr.bytes,
+			       CDF_MAC_ADDR_SIZE)))) {
 		PELOG1(lim_log(mac_ctx, LOG1,
 			       FL("Disassoc/Deauth ack pending"));)
 		return true;
@@ -1848,8 +1848,8 @@ void lim_clean_up_disassoc_deauth_req(tpAniSirGlobal mac_ctx,
 	mlm_deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq;
 	if (mlm_deauth_req &&
 	    (cdf_mem_compare((uint8_t *) sta_mac,
-			     (uint8_t *) &mlm_deauth_req->peerMacAddr,
-			     sizeof(tSirMacAddr)))) {
+			     (uint8_t *) &mlm_deauth_req->peer_macaddr.bytes,
+			     CDF_MAC_ADDR_SIZE))) {
 		if (clean_rx_path) {
 			lim_process_deauth_ack_timeout(mac_ctx);
 		} else {
@@ -1957,7 +1957,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 		mlm_deauth_req->sessionId,
 		GET_LIM_SYSTEM_ROLE(session),
 		session->limMlmState,
-		MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+		MAC_ADDR_ARRAY(mlm_deauth_req->peer_macaddr.bytes));
 	sir_copy_mac_addr(curr_bssId, session->bssId);
 
 	switch (GET_LIM_SYSTEM_ROLE(session)) {
@@ -1974,14 +1974,14 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 		case eLIM_MLM_AUTHENTICATED_STATE:
 		case eLIM_MLM_WT_ASSOC_RSP_STATE:
 		case eLIM_MLM_LINK_ESTABLISHED_STATE:
-			if (!cdf_mem_compare(mlm_deauth_req->peerMacAddr,
-					curr_bssId, sizeof(tSirMacAddr))) {
+			if (!cdf_mem_compare(mlm_deauth_req->peer_macaddr.bytes,
+					curr_bssId, CDF_MAC_ADDR_SIZE)) {
 				lim_log(mac_ctx, LOGE,
 					FL("received MLM_DEAUTH_REQ with invalid BSS id "
 					   "Peer MAC: "MAC_ADDRESS_STR
 					   " CFG BSSID Addr : "MAC_ADDRESS_STR),
 					MAC_ADDR_ARRAY(
-						mlm_deauth_req->peerMacAddr),
+						mlm_deauth_req->peer_macaddr.bytes),
 					MAC_ADDR_ARRAY(curr_bssId));
 				/*
 				 * Deauthentication response to host triggered
@@ -1998,7 +1998,8 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 				lim_log(mac_ctx, LOG1,
 					FL("send deauth rsp with ret code %d for" MAC_ADDRESS_STR),
 					eSIR_SME_DEAUTH_STATUS,
-					MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+					MAC_ADDR_ARRAY(
+					  mlm_deauth_req->peer_macaddr.bytes));
 
 				sme_deauth_rsp->messageType =
 						eWNI_SME_DEAUTH_RSP;
@@ -2011,8 +2012,8 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 				sme_deauth_rsp->transactionId = 0;
 
 				cdf_mem_copy(sme_deauth_rsp->peer_macaddr.bytes,
-						mlm_deauth_req->peerMacAddr,
-						CDF_MAC_ADDR_SIZE);
+					     mlm_deauth_req->peer_macaddr.bytes,
+					     CDF_MAC_ADDR_SIZE);
 
 				msg_buf = (uint32_t *)sme_deauth_rsp;
 
@@ -2027,9 +2028,9 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 			     eLIM_MLM_WT_ASSOC_RSP_STATE)) {
 				/* Send deauth frame to peer entity */
 				lim_send_deauth_mgmt_frame(mac_ctx,
-						mlm_deauth_req->reasonCode,
-						mlm_deauth_req->peerMacAddr,
-						session, false);
+					mlm_deauth_req->reasonCode,
+					mlm_deauth_req->peer_macaddr.bytes,
+					session, false);
 				/* Prepare and Send LIM_MLM_DEAUTH_CNF */
 				mlm_deauth_cnf.resultCode = eSIR_SME_SUCCESS;
 				session->limMlmState = eLIM_MLM_IDLE_STATE;
@@ -2044,7 +2045,8 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 				FL("received MLM_DEAUTH_REQ with in state %d for peer "
 				   MAC_ADDRESS_STR),
 				session->limMlmState,
-				MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+				MAC_ADDR_ARRAY(
+					mlm_deauth_req->peer_macaddr.bytes));
 			lim_print_mlm_state(mac_ctx, LOGW,
 					    session->limMlmState);
 			/* Prepare and Send LIM_MLM_DEAUTH_CNF */
@@ -2077,13 +2079,14 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 	 * Check if there exists a context for the peer entity
 	 * to be deauthenticated with.
 	 */
-	sta_ds = dph_lookup_hash_entry(mac_ctx, mlm_deauth_req->peerMacAddr,
+	sta_ds = dph_lookup_hash_entry(mac_ctx,
+				       mlm_deauth_req->peer_macaddr.bytes,
 				       &aid, &session->dph.dphHashTable);
 
 	if (sta_ds == NULL) {
 		/* Check if there exists pre-auth context for this STA */
 		auth_node = lim_search_pre_auth_list(mac_ctx,
-						mlm_deauth_req->peerMacAddr);
+					mlm_deauth_req->peer_macaddr.bytes);
 		if (auth_node == NULL) {
 			/*
 			 * Received DEAUTH REQ for a STA that is neither
@@ -2095,19 +2098,20 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 				   "does not have context, Addr="
 				   MAC_ADDRESS_STR),
 				session->limMlmState,
-				MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+				MAC_ADDR_ARRAY(
+					mlm_deauth_req->peer_macaddr.bytes));
 			mlm_deauth_cnf.resultCode =
 				eSIR_SME_STA_NOT_AUTHENTICATED;
 		} else {
 			mlm_deauth_cnf.resultCode = eSIR_SME_SUCCESS;
 			/* Delete STA from pre-auth STA list */
 			lim_delete_pre_auth_node(mac_ctx,
-						 mlm_deauth_req->peerMacAddr);
+					 mlm_deauth_req->peer_macaddr.bytes);
 			/* Send Deauthentication frame to peer entity */
 			lim_send_deauth_mgmt_frame(mac_ctx,
-						   mlm_deauth_req->reasonCode,
-						   mlm_deauth_req->peerMacAddr,
-						   session, false);
+					   mlm_deauth_req->reasonCode,
+					   mlm_deauth_req->peer_macaddr.bytes,
+					   session, false);
 		}
 		goto end;
 	} else if ((sta_ds->mlmStaContext.mlmState !=
@@ -2120,7 +2124,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 		 */
 		lim_log(mac_ctx, LOGW,
 			FL("Invalid MLM_DEAUTH_REQ, Addr="MAC_ADDRESS_STR),
-			MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+			MAC_ADDR_ARRAY(mlm_deauth_req->peer_macaddr.bytes));
 		/* Prepare and Send LIM_MLM_DEAUTH_CNF */
 		mlm_deauth_cnf.resultCode = eSIR_SME_INVALID_PARAMETERS;
 		goto end;
@@ -2141,12 +2145,12 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
 	sta_ds->mlmStaContext.mlmState = eLIM_MLM_WT_DEL_STA_RSP_STATE;
 	/* Send Deauthentication frame to peer entity */
 	lim_send_deauth_mgmt_frame(mac_ctx, mlm_deauth_req->reasonCode,
-				   mlm_deauth_req->peerMacAddr, session, true);
+				   mlm_deauth_req->peer_macaddr.bytes,
+				   session, true);
 	return;
 end:
-	cdf_mem_copy((uint8_t *) &mlm_deauth_cnf.peerMacAddr,
-		     (uint8_t *) mlm_deauth_req->peerMacAddr,
-		     sizeof(tSirMacAddr));
+	cdf_copy_macaddr(&mlm_deauth_cnf.peer_macaddr,
+			 &mlm_deauth_req->peer_macaddr);
 	mlm_deauth_cnf.deauthTrigger = mlm_deauth_req->deauthTrigger;
 	mlm_deauth_cnf.aid = mlm_deauth_req->aid;
 	mlm_deauth_cnf.sessionId = mlm_deauth_req->sessionId;
@@ -2200,7 +2204,7 @@ lim_process_mlm_deauth_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		FL("Process Deauth Req on sessionID %d from: "
 		   MAC_ADDRESS_STR),
 		mlm_deauth_req->sessionId,
-		MAC_ADDR_ARRAY(mlm_deauth_req->peerMacAddr));
+		MAC_ADDR_ARRAY(mlm_deauth_req->peer_macaddr.bytes));
 
 	session = pe_find_session_by_session_id(mac_ctx,
 				mlm_deauth_req->sessionId);

+ 1 - 1
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -1328,7 +1328,7 @@ void lim_process_mlm_deauth_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
 			pMac->lim.gLimRspReqd = false;
 	}
 	/* On STA or on BASIC AP, send SME_DEAUTH_RSP to host */
-	lim_send_sme_deauth_ntf(pMac, pMlmDeauthCnf->peerMacAddr,
+	lim_send_sme_deauth_ntf(pMac, pMlmDeauthCnf->peer_macaddr.bytes,
 				resultCode,
 				pMlmDeauthCnf->deauthTrigger,
 				aid, psessionEntry->smeSessionId,

+ 9 - 8
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2729,8 +2729,9 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx,
 	 * We need to get a session first but we don't even know
 	 * if the message is correct.
 	 */
-	session_entry = pe_find_session_by_bssid(mac_ctx, sme_deauth_req.bssId,
-				&session_id);
+	session_entry = pe_find_session_by_bssid(mac_ctx,
+					sme_deauth_req.bssid.bytes,
+					&session_id);
 	if (session_entry == NULL) {
 		lim_log(mac_ctx, LOGE,
 			FL("session does not exist for given bssId"));
@@ -2754,7 +2755,7 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx,
 		MAC_ADDRESS_STR), sme_session_id,
 		GET_LIM_SYSTEM_ROLE(session_entry), sme_deauth_req.reasonCode,
 		session_entry->limSmeState,
-		MAC_ADDR_ARRAY(sme_deauth_req.peerMacAddr));
+		MAC_ADDR_ARRAY(sme_deauth_req.peer_macaddr.bytes));
 #ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM    /* FEATURE_WLAN_DIAG_SUPPORT */
 	lim_diag_event_report(mac_ctx, WLAN_PE_DIAG_DEAUTH_REQ_EVENT,
 			session_entry, 0, sme_deauth_req.reasonCode);
@@ -2885,9 +2886,8 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx,
 		return;
 	}
 
-	cdf_mem_copy((uint8_t *) &mlm_deauth_req->peerMacAddr,
-		     (uint8_t *) &sme_deauth_req.peerMacAddr,
-		     sizeof(tSirMacAddr));
+	cdf_copy_macaddr(&mlm_deauth_req->peer_macaddr,
+			 &sme_deauth_req.peer_macaddr);
 
 	mlm_deauth_req->reasonCode = reason_code;
 	mlm_deauth_req->deauthTrigger = deauth_trigger;
@@ -2900,8 +2900,9 @@ static void __lim_process_sme_deauth_req(tpAniSirGlobal mac_ctx,
 	return;
 
 send_deauth:
-	lim_send_sme_deauth_ntf(mac_ctx, sme_deauth_req.peerMacAddr, ret_code,
-			deauth_trigger, 1, sme_session_id, sme_transaction_id);
+	lim_send_sme_deauth_ntf(mac_ctx, sme_deauth_req.peer_macaddr.bytes,
+				ret_code, deauth_trigger, 1,
+				sme_session_id, sme_transaction_id);
 }
 
 /**

+ 6 - 5
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -3078,7 +3078,9 @@ CDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac)
 		}
 
 		pStaDs =
-			dph_lookup_hash_entry(pMac, pMlmDeauthReq->peerMacAddr, &aid,
+			dph_lookup_hash_entry(pMac,
+					      pMlmDeauthReq->peer_macaddr.bytes,
+					      &aid,
 					      &psessionEntry->dph.dphHashTable);
 		if (pStaDs == NULL) {
 			mlmDeauthCnf.resultCode = eSIR_SME_INVALID_PARAMETERS;
@@ -3132,9 +3134,8 @@ CDF_STATUS lim_send_deauth_cnf(tpAniSirGlobal pMac)
 	}
 	return CDF_STATUS_SUCCESS;
 end:
-	cdf_mem_copy((uint8_t *) &mlmDeauthCnf.peerMacAddr,
-		     (uint8_t *) pMlmDeauthReq->peerMacAddr,
-		     sizeof(tSirMacAddr));
+	cdf_copy_macaddr(&mlmDeauthCnf.peer_macaddr,
+			 &pMlmDeauthReq->peer_macaddr);
 	mlmDeauthCnf.deauthTrigger = pMlmDeauthReq->deauthTrigger;
 	mlmDeauthCnf.aid = pMlmDeauthReq->aid;
 	mlmDeauthCnf.sessionId = pMlmDeauthReq->sessionId;

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

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -648,8 +648,8 @@ uint8_t
 lim_is_sme_deauth_req_valid(tpAniSirGlobal pMac, tpSirSmeDeauthReq pDeauthReq,
 			    tpPESession psessionEntry)
 {
-	if (lim_is_group_addr(pDeauthReq->peerMacAddr) &&
-	    !lim_is_addr_bc(pDeauthReq->peerMacAddr))
+	if (cdf_is_macaddr_group(&pDeauthReq->peer_macaddr) &&
+	    !cdf_is_macaddr_broadcast(&pDeauthReq->peer_macaddr))
 		return false;
 
 	return true;

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

@@ -309,7 +309,7 @@ typedef struct sLimMlmAuthCnf {
 } tLimMlmAuthCnf, *tpLimMlmAuthCnf;
 
 typedef struct sLimMlmDeauthReq {
-	tSirMacAddr peerMacAddr;
+	struct cdf_mac_addr peer_macaddr;
 	uint16_t reasonCode;
 	uint16_t deauthTrigger;
 	uint16_t aid;
@@ -318,7 +318,7 @@ typedef struct sLimMlmDeauthReq {
 } tLimMlmDeauthReq, *tpLimMlmDeauthReq;
 
 typedef struct sLimMlmDeauthCnf {
-	tSirMacAddr peerMacAddr;
+	struct cdf_mac_addr peer_macaddr;
 	tSirResultCodes resultCode;
 	uint16_t deauthTrigger;
 	uint16_t aid;

+ 5 - 8
core/sme/src/csr/csr_api_roam.c

@@ -14252,19 +14252,16 @@ CDF_STATUS csr_send_mb_deauth_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 
 	if ((pSession->pCurRoamProfile != NULL)
 	     && (CSR_IS_INFRA_AP(pSession->pCurRoamProfile))) {
-		cdf_mem_copy(&pMsg->bssId,
+		cdf_mem_copy(&pMsg->bssid,
 			     &pSession->selfMacAddr,
-			     sizeof(tSirMacAddr));
+			     CDF_MAC_ADDR_SIZE);
 	} else {
-		cdf_mem_copy(&pMsg->bssId,
-			     bssId,
-			     sizeof(tSirMacAddr));
+		cdf_mem_copy(&pMsg->bssid,
+			     bssId, CDF_MAC_ADDR_SIZE);
 	}
 
 	/* Set the peer MAC address before sending the message to LIM */
-	cdf_mem_copy(&pMsg->peerMacAddr,
-		     bssId,
-		     sizeof(tSirMacAddr));
+	cdf_mem_copy(&pMsg->peer_macaddr.bytes, bssId, CDF_MAC_ADDR_SIZE);
 	pMsg->reasonCode = reasonCode;
 
 	return cds_send_mb_message_to_mac(pMsg);