diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index d6a7841ebc7a..3d5d6cbd9f3e 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -3418,8 +3418,8 @@ typedef struct sSirTdlsDelStaReq { uint8_t sessionId; /* Session ID */ uint16_t transactionId; /* Transaction ID for cmd */ /* For multi-session, for PE to locate peSession ID */ - tSirMacAddr bssid; - tSirMacAddr peerMac; + struct cdf_mac_addr bssid; + struct cdf_mac_addr peermac; } tSirTdlsDelStaReq, *tpSirSmeTdlsDelStaReq; /* TDLS Response struct PE-->SME */ typedef struct sSirTdlsDelStaRsp { @@ -3427,7 +3427,7 @@ typedef struct sSirTdlsDelStaRsp { uint16_t length; uint8_t sessionId; /* Session ID */ tSirResultCodes statusCode; - tSirMacAddr peerMac; + struct cdf_mac_addr peermac; uint16_t staId; } tSirTdlsDelStaRsp, *tpSirTdlsDelStaRsp; /* TDLS Delete Indication struct PE-->SME */ @@ -3435,7 +3435,7 @@ typedef struct sSirTdlsDelStaInd { uint16_t messageType; uint16_t length; uint8_t sessionId; /* Session ID */ - tSirMacAddr peerMac; + struct cdf_mac_addr peermac; uint16_t staId; uint16_t reasonCode; } tSirTdlsDelStaInd, *tpSirTdlsDelStaInd; diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c index 7afba538ce76..a7b47eac1340 100644 --- a/core/mac/src/pe/lim/lim_process_tdls.c +++ b/core/mac/src/pe/lim/lim_process_tdls.c @@ -2437,14 +2437,15 @@ static tSirRetStatus lim_tdls_setup_add_sta(tpAniSirGlobal pMac, /* * Del STA, after Link is teardown or discovery response sent on direct link */ -static tpDphHashNode lim_tdls_del_sta(tpAniSirGlobal pMac, tSirMacAddr peerMac, +static tpDphHashNode lim_tdls_del_sta(tpAniSirGlobal pMac, + struct cdf_mac_addr peerMac, tpPESession psessionEntry) { tSirRetStatus status = eSIR_SUCCESS; uint16_t peerIdx = 0; tpDphHashNode pStaDs = NULL; - pStaDs = dph_lookup_hash_entry(pMac, peerMac, &peerIdx, + pStaDs = dph_lookup_hash_entry(pMac, peerMac.bytes, &peerIdx, &psessionEntry->dph.dphHashTable); if (pStaDs) { @@ -2874,7 +2875,7 @@ void lim_send_sme_tdls_link_establish_req_rsp(tpAniSirGlobal pMac, */ static CDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac, uint8_t sessionId, - tSirMacAddr peerMac, + struct cdf_mac_addr peerMac, tDphHashNode *pStaDs, uint8_t status) { tSirMsgQ mmhMsg = { 0 }; @@ -2894,9 +2895,7 @@ static CDF_STATUS lim_send_sme_tdls_del_sta_rsp(tpAniSirGlobal pMac, } else pDelSta->staId = STA_INVALID_IDX; - if (peerMac) { - cdf_mem_copy(pDelSta->peerMac, peerMac, sizeof(tSirMacAddr)); - } + cdf_copy_macaddr(&pDelSta->peermac, &peerMac); pDelSta->length = sizeof(tSirTdlsDelStaRsp); pDelSta->messageType = eWNI_SME_TDLS_DEL_STA_RSP; @@ -2985,7 +2984,8 @@ tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, lim_log(pMac, LOG1, FL("TDLS Delete STA Request Recieved")); psessionEntry = - pe_find_session_by_bssid(pMac, pDelStaReq->bssid, &sessionId); + pe_find_session_by_bssid(pMac, pDelStaReq->bssid.bytes, + &sessionId); if (psessionEntry == NULL) { lim_log(pMac, LOGE, FL( @@ -2993,7 +2993,7 @@ tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, ), pDelStaReq->sessionId); lim_send_sme_tdls_del_sta_rsp(pMac, pDelStaReq->sessionId, - pDelStaReq->peerMac, NULL, + pDelStaReq->peermac, NULL, eSIR_FAILURE); return eSIR_FAILURE; } @@ -3019,13 +3019,13 @@ tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, goto lim_tdls_del_sta_error; } - pStaDs = lim_tdls_del_sta(pMac, pDelStaReq->peerMac, psessionEntry); + pStaDs = lim_tdls_del_sta(pMac, pDelStaReq->peermac, psessionEntry); /* now send indication to SME-->HDD->TL to remove STA from TL */ if (pStaDs) { lim_send_sme_tdls_del_sta_rsp(pMac, psessionEntry->smeSessionId, - pDelStaReq->peerMac, pStaDs, + pDelStaReq->peermac, pStaDs, eSIR_SUCCESS); lim_release_peer_idx(pMac, pStaDs->assocId, psessionEntry); @@ -3041,7 +3041,7 @@ tSirRetStatus lim_process_sme_tdls_del_sta_req(tpAniSirGlobal pMac, lim_tdls_del_sta_error: lim_send_sme_tdls_del_sta_rsp(pMac, psessionEntry->smeSessionId, - pDelStaReq->peerMac, NULL, eSIR_FAILURE); + pDelStaReq->peermac, NULL, eSIR_FAILURE); return eSIR_SUCCESS; } diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index eee97bae7934..c7d1517d2523 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -1182,8 +1182,8 @@ lim_send_sme_tdls_del_sta_ind(tpAniSirGlobal pMac, tpDphHashNode pStaDs, pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId; /* peerMacAddr */ - cdf_mem_copy(pSirTdlsDelStaInd->peerMac, pStaDs->staAddr, - sizeof(tSirMacAddr)); + cdf_mem_copy(pSirTdlsDelStaInd->peermac.bytes, pStaDs->staAddr, + CDF_MAC_ADDR_SIZE); /* staId */ lim_copy_u16((uint8_t *) (&pSirTdlsDelStaInd->staId), diff --git a/core/sme/src/csr/csr_tdls_process.c b/core/sme/src/csr/csr_tdls_process.c index cb4694279539..632356955e88 100644 --- a/core/sme/src/csr/csr_tdls_process.c +++ b/core/sme/src/csr/csr_tdls_process.c @@ -545,11 +545,11 @@ CDF_STATUS csr_tdls_process_del_sta(tpAniSirGlobal pMac, tSmeCmd *cmd) /* Using dialog as transactionId. This can be used to match response with request */ tdlsDelStaReq->transactionId = 0; - cdf_mem_copy(tdlsDelStaReq->bssid, - pSession->pConnectBssDesc->bssId, sizeof(tSirMacAddr)); + cdf_mem_copy(tdlsDelStaReq->bssid.bytes, + pSession->pConnectBssDesc->bssId, CDF_MAC_ADDR_SIZE); - cdf_mem_copy(tdlsDelStaReq->peerMac, - tdlsDelStaCmdInfo->peerMac, sizeof(tSirMacAddr)); + cdf_mem_copy(tdlsDelStaReq->peermac.bytes, + tdlsDelStaCmdInfo->peerMac, CDF_MAC_ADDR_SIZE); /* Send the request to PE. */ sms_log(pMac, LOG1, @@ -717,8 +717,7 @@ CDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsAddPeer); break; case eWNI_SME_TDLS_DEL_STA_RSP: - cdf_mem_copy(&roamInfo.peerMac, delStaRsp->peerMac, - sizeof(tSirMacAddr)); + cdf_copy_macaddr(&roamInfo.peerMac, &delStaRsp->peermac); roamInfo.staId = delStaRsp->staId; roamInfo.statusCode = delStaRsp->statusCode; /* @@ -733,9 +732,8 @@ CDF_STATUS tdls_msg_processor(tpAniSirGlobal pMac, uint16_t msgType, csr_tdls_remove_sme_cmd(pMac, eSmeCommandTdlsDelPeer); break; case eWNI_SME_TDLS_DEL_STA_IND: - cdf_mem_copy(&roamInfo.peerMac, - pSirTdlsDelStaInd->peerMac, - sizeof(tSirMacAddr)); + cdf_copy_macaddr(&roamInfo.peerMac, + &pSirTdlsDelStaInd->peermac); roamInfo.staId = pSirTdlsDelStaInd->staId; roamInfo.reasonCode = pSirTdlsDelStaInd->reasonCode;