summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrunal soni <ksoni@qca.qualcomm.com>2014-02-11 17:32:35 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-03-03 10:38:27 -0800
commit90840696029bb1cb128948db80fecff07ca829cf (patch)
treec442f0bdcca2bbb299ea745002e7c1a52b9ac77b
parent49aa4962dff248c5517846b206e9ef5dfeaa462e (diff)
wlan: Fix in PE and SME for 32bit to 64bit migration.
This will fix the warnings on 64bit platform without interrupting 32 bit platform. Change-Id: I2a0e6aa36384ac0a3e3dcac63d40333a3bda3422 CRs-fixed: 573465
-rw-r--r--CORE/MAC/src/pe/lim/limSerDesUtils.c32
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c27
2 files changed, 27 insertions, 32 deletions
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index db88848b8a7f..2ac0f897b3ff 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2323,23 +2323,23 @@ limIsSmeGetAssocSTAsReqValid(tpAniSirGlobal pMac, tpSirSmeGetAssocSTAsReq pGetAs
return eSIR_FAILURE;
// Extract pUsrContext
- pGetAssocSTAsReq->pUsrContext = (void *)limGetU32(pBuf);
- pBuf += sizeof(tANI_U32);
- len -= sizeof(tANI_U32);
+ vos_mem_copy((tANI_U8 *)pGetAssocSTAsReq->pUsrContext, pBuf, sizeof(void*));
+ pBuf += sizeof(void*);
+ len -= sizeof(void*);
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
// Extract pSapEventCallback
- pGetAssocSTAsReq->pSapEventCallback = (void *)limGetU32(pBuf);
- pBuf += sizeof(tANI_U32);
- len -= sizeof(tANI_U32);
+ vos_mem_copy((tANI_U8 *)pGetAssocSTAsReq->pSapEventCallback, pBuf, sizeof(void*));
+ pBuf += sizeof(void*);
+ len -= sizeof(void*);
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
// Extract pAssocStasArray
- pGetAssocSTAsReq->pAssocStasArray = (void *)limGetU32(pBuf);
- pBuf += sizeof(tANI_U32);
- len -= sizeof(tANI_U32);
+ vos_mem_copy((tANI_U8 *)pGetAssocSTAsReq->pAssocStasArray, pBuf, sizeof(void*));
+ pBuf += sizeof(void*);
+ len -= sizeof(void*);
PELOG1(limLog(pMac, LOG1, FL("SME_GET_ASSOC_STAS_REQ length consumed %d bytes "), len);)
@@ -2476,16 +2476,16 @@ limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsR
return eSIR_FAILURE;
// Extract pUsrContext
- pGetWPSPBCSessionsReq->pUsrContext = (void *)limGetU32(pBuf);
- pBuf += sizeof(tANI_U32);
- len -= sizeof(tANI_U32);
+ vos_mem_copy((tANI_U8 *)pGetWPSPBCSessionsReq->pUsrContext, pBuf, sizeof(void*));
+ pBuf += sizeof(void*);
+ len -= sizeof(void*);
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
// Extract pSapEventCallback
- pGetWPSPBCSessionsReq->pSapEventCallback = (void *)limGetU32(pBuf);
- pBuf += sizeof(tANI_U32);
- len -= sizeof(tANI_U32);
+ vos_mem_copy((tANI_U8 *)pGetWPSPBCSessionsReq->pSapEventCallback, pBuf, sizeof(void*));
+ pBuf += sizeof(void*);
+ len -= sizeof(void*);
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 15929907d9d5..ecf1968b3644 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -13251,17 +13251,14 @@ csrSendMBGetAssociatedStasReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId,
vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U16));
pBuf += sizeof(tANI_U16);
// pUsrContext
- dwTmp = pal_cpu_to_be32((tANI_U32)pUsrContext);
- vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
- pBuf += sizeof(tANI_U32);
+ vos_mem_copy(pBuf, (tANI_U8 *)pUsrContext, sizeof(void *));
+ pBuf += sizeof(void*);
// pfnSapEventCallback
- dwTmp = pal_cpu_to_be32((tANI_U32)pfnSapEventCallback);
- vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
- pBuf += sizeof(tANI_U32);
+ vos_mem_copy(pBuf, (tANI_U8 *)pfnSapEventCallback, sizeof(void*));
+ pBuf += sizeof(void*);
// pAssocStasBuf
- dwTmp = pal_cpu_to_be32((tANI_U32)pAssocStasBuf);
- vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
- pBuf += sizeof(tANI_U32);
+ vos_mem_copy(pBuf, pAssocStasBuf, sizeof(void*));
+ pBuf += sizeof(void*);
pMsg->length = pal_cpu_to_be16((tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)));//msg_header + msg
status = palSendMBMessage( pMac->hHdd, pMsg );
} while( 0 );
@@ -13274,7 +13271,7 @@ csrSendMBGetWPSPBCSessions( tpAniSirGlobal pMac, tANI_U32 sessionId,
eHalStatus status = eHAL_STATUS_SUCCESS;
tSirSmeGetWPSPBCSessionsReq *pMsg;
tANI_U8 *pBuf = NULL, *wTmpBuf = NULL;
- tANI_U32 dwTmp;
+
do
{
pMsg = vos_mem_malloc(sizeof(tSirSmeGetWPSPBCSessionsReq));
@@ -13294,13 +13291,11 @@ csrSendMBGetWPSPBCSessions( tpAniSirGlobal pMac, tANI_U32 sessionId,
}
wTmpBuf = pBuf;
// pUsrContext
- dwTmp = pal_cpu_to_be32((tANI_U32)pUsrContext);
- vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
- pBuf += sizeof(tANI_U32);
+ vos_mem_copy(pBuf, (tANI_U8 *)pUsrContext, sizeof(void*));
+ pBuf += sizeof(void *);
// pSapEventCallback
- dwTmp = pal_cpu_to_be32((tANI_U32)pfnSapEventCallback);
- vos_mem_copy(pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U32));
- pBuf += sizeof(tANI_U32);
+ vos_mem_copy(pBuf, (tANI_U8 *)pfnSapEventCallback, sizeof(void *));
+ pBuf += sizeof(void *);
// bssId
vos_mem_copy((tSirMacAddr *)pBuf, bssId, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);