Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6a851eb authored by Srinivas Girigowda's avatar Srinivas Girigowda Committed by Akash Patel
Browse files

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
parent cd88e760
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
/*
 * 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 "
				       FL("TODO:Ack for deauth frame is pending Issue delsta for "
					  MAC_ADDRESS_STR),
					  MAC_ADDR_ARRAY(pMlmDeauthReq->
							      peerMacAddr));
							 peer_macaddr.bytes));
				       )
				lim_process_deauth_ack_timeout(pMac);
				isConnected = eSIR_FALSE;
+32 −28
Original line number Diff line number Diff line
@@ -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,7 +2012,7 @@ 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,
					     mlm_deauth_req->peer_macaddr.bytes,
					     CDF_MAC_ADDR_SIZE);

				msg_buf = (uint32_t *)sme_deauth_rsp;
@@ -2028,7 +2029,7 @@ lim_process_mlm_deauth_req_ntf(tpAniSirGlobal mac_ctx,
				/* Send deauth frame to peer entity */
				lim_send_deauth_mgmt_frame(mac_ctx,
					mlm_deauth_req->reasonCode,
						mlm_deauth_req->peerMacAddr,
					mlm_deauth_req->peer_macaddr.bytes,
					session, false);
				/* Prepare and Send LIM_MLM_DEAUTH_CNF */
				mlm_deauth_cnf.resultCode = eSIR_SME_SUCCESS;
@@ -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,18 +2098,19 @@ 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,
					   mlm_deauth_req->peer_macaddr.bytes,
					   session, false);
		}
		goto end;
@@ -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);
Loading