From 61de4bbbfe7c881f5dbdb87ab1060717332471f4 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Wed, 25 Nov 2015 15:46:41 -0800 Subject: [PATCH] qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSmeMaxAssocInd Replace tSirMacAddr with cdf_mac_addr in sSmeMaxAssocInd and tSirSmeGetAssocSTAsReq. Change-Id: Ie36a22b5ee5c823833981b51ef91525f6c6af692 CRs-Fixed: 898864 --- core/mac/inc/sir_api.h | 4 +- .../src/pe/lim/lim_process_sme_req_messages.c | 2 +- .../src/pe/lim/lim_send_sme_rsp_messages.c | 4 +- core/sme/src/csr/csr_api_roam.c | 47 +++++++++---------- core/sme/src/csr/csr_inside_api.h | 2 +- 5 files changed, 27 insertions(+), 32 deletions(-) diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 6e0656add819..b6b78404b3b0 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -2125,7 +2125,7 @@ typedef struct sLimScanChnInfo { typedef struct sSirSmeGetAssocSTAsReq { uint16_t messageType; /* eWNI_SME_GET_ASSOC_STAS_REQ */ uint16_t length; - tSirMacAddr bssId; /* BSSID */ + struct cdf_mac_addr bssid; /* BSSID */ uint16_t modId; void *pUsrContext; void *pSapEventCallback; @@ -2138,7 +2138,7 @@ typedef struct sSmeMaxAssocInd { uint16_t mesgLen; uint8_t sessionId; /* the new peer that got rejected max assoc limit reached */ - tSirMacAddr peerMac; + struct cdf_mac_addr peer_mac; } tSmeMaxAssocInd, *tpSmeMaxAssocInd; typedef struct sSmeCsaOffloadInd { diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 8e15c31d45a3..32aab52b1184 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -3145,7 +3145,7 @@ void lim_process_sme_get_assoc_sta_info(tpAniSirGlobal mac_ctx, * Find PE session Entry */ session_entry = pe_find_session_by_bssid(mac_ctx, - get_assoc_stas_req.bssId, + get_assoc_stas_req.bssid.bytes, &session_id); if (session_entry == NULL) { lim_log(mac_ctx, LOGE, 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 ec18e49165a5..68e11a6c8528 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 @@ -2305,8 +2305,8 @@ void lim_send_sme_max_assoc_exceeded_ntf(tpAniSirGlobal pMac, tSirMacAddr peerMa return; } cdf_mem_set((void *)pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd), 0); - cdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peerMac, - (uint8_t *) peerMacAddr, sizeof(tSirMacAddr)); + cdf_mem_copy((uint8_t *) pSmeMaxAssocInd->peer_mac.bytes, + (uint8_t *) peerMacAddr, CDF_MAC_ADDR_SIZE); pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED; pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd); pSmeMaxAssocInd->sessionId = smesessionId; diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index d6e8468150d8..7b69b208195b 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -3201,7 +3201,7 @@ csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, MAC_ADDR_ARRAY(bssId.bytes)); status = csr_send_mb_get_associated_stas_req_msg(pMac, sessionId, modId, - bssId.bytes, + bssId, pUsrContext, pfnSapEventCallback, pAssocStasBuf); @@ -10888,8 +10888,7 @@ csr_roam_chk_lnk_max_assoc_exceeded(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr) FL("max assoc have been reached, new peer cannot be accepted")); sessionId = pSmeMaxAssocInd->sessionId; roam_info.sessionId = sessionId; - cdf_mem_copy(&roam_info.peerMac, pSmeMaxAssocInd->peerMac, - sizeof(struct cdf_mac_addr)); + cdf_copy_macaddr(&roam_info.peerMac, &pSmeMaxAssocInd->peer_mac); csr_roam_call_callback(mac_ctx, sessionId, &roam_info, 0, eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED); @@ -14072,33 +14071,29 @@ CDF_STATUS csr_send_mb_disassoc_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, CDF_STATUS csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, - CDF_MODULE_ID modId, tSirMacAddr bssId, - void *pUsrContext, void *pfnSapEventCallback, + CDF_MODULE_ID modId, + struct cdf_mac_addr bssid, + void *pUsrContext, + void *pfnSapEventCallback, uint8_t *pAssocStasBuf) { CDF_STATUS status = CDF_STATUS_SUCCESS; tSirSmeGetAssocSTAsReq *pMsg; - do { - pMsg = cdf_mem_malloc(sizeof(tSirSmeGetAssocSTAsReq)); - if (NULL == pMsg) - status = CDF_STATUS_E_NOMEM; - else - status = CDF_STATUS_SUCCESS; - if (!CDF_IS_STATUS_SUCCESS(status)) - break; - cdf_mem_set(pMsg, sizeof(tSirSmeGetAssocSTAsReq), 0); - pMsg->messageType = eWNI_SME_GET_ASSOC_STAS_REQ; - cdf_mem_copy(pMsg->bssId, bssId, sizeof(tSirMacAddr)); - pMsg->modId = modId; - cdf_mem_copy(pMsg->pUsrContext, - pUsrContext, sizeof(void *)); - cdf_mem_copy(pMsg->pSapEventCallback, - pfnSapEventCallback, sizeof(void *)); - cdf_mem_copy(pMsg->pAssocStasArray, - pAssocStasBuf, sizeof(void *)); - pMsg->length = sizeof(struct sSirSmeGetAssocSTAsReq); - status = cds_send_mb_message_to_mac(pMsg); - } while (0); + + pMsg = cdf_mem_malloc(sizeof(*pMsg)); + if (NULL == pMsg) + return CDF_STATUS_E_NOMEM; + + pMsg->messageType = eWNI_SME_GET_ASSOC_STAS_REQ; + cdf_copy_macaddr(&pMsg->bssid, &bssid); + pMsg->modId = modId; + cdf_mem_copy(pMsg->pUsrContext, pUsrContext, sizeof(void *)); + cdf_mem_copy(pMsg->pSapEventCallback, + pfnSapEventCallback, sizeof(void *)); + cdf_mem_copy(pMsg->pAssocStasArray, pAssocStasBuf, sizeof(void *)); + pMsg->length = sizeof(*pMsg); + status = cds_send_mb_message_to_mac(pMsg); + return status; } diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h index d3785659569d..88c284ba7f24 100644 --- a/core/sme/src/csr/csr_inside_api.h +++ b/core/sme/src/csr/csr_inside_api.h @@ -971,7 +971,7 @@ CDF_STATUS csr_roam_get_associated_stas(tpAniSirGlobal pMac, uint32_t sessionId, CDF_STATUS csr_send_mb_get_associated_stas_req_msg(tpAniSirGlobal pMac, uint32_t sessionId, CDF_MODULE_ID modId, - tSirMacAddr bssId, + struct cdf_mac_addr bssId, void *pUsrContext, void *pfnSapEventCallback, uint8_t *pAssocStasBuf);