wlan : To remove PAL memory wrapper in PE(6)
This is to remove PAL memory wrapper in PE and replace with vos calls.
CRs-Fixed: 520321
Change-Id: Ia89a0ce6f5ad72ecda903509b6d82c9c919930f3
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index bf9cc90..161a155 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -178,8 +178,8 @@
sizeof(tANI_U32) + ieLen);
// Copy BSS Id
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pBssDescr->bssId,
- (tANI_U8 *) pHdr->bssId,
+ vos_mem_copy((tANI_U8 *) &pBssDescr->bssId,
+ (tANI_U8 *) pHdr->bssId,
sizeof(tSirMacAddr));
// Copy Timestamp, Beacon Interval and Capability Info
@@ -277,7 +277,7 @@
}
#endif
// Copy IE fields
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pBssDescr->ieFields,
+ vos_mem_copy((tANI_U8 *) &pBssDescr->ieFields,
pBody + SIR_MAC_B_PR_SSID_OFFSET,
ieLen);
@@ -322,7 +322,7 @@
for (i = 0; i < pMac->lim.gpLimMlmScanReq->numSsid; i++)
{
- if ( eANI_BOOLEAN_TRUE == palEqualMemory( pMac->hHdd,(tANI_U8 *) ssId,
+ if ( eANI_BOOLEAN_TRUE == vos_mem_compare((tANI_U8 *) ssId,
(tANI_U8 *) &pMac->lim.gpLimMlmScanReq->ssId[i],
(tANI_U8) (pMac->lim.gpLimMlmScanReq->ssId[i].length + 1)))
{
@@ -379,11 +379,11 @@
//Checking if scanning for a particular BSSID
if ((fScanning) && (pMac->lim.gpLimMlmScanReq))
{
- fFound = palEqualMemory(pMac->hHdd, pHdr->addr3, &pMac->lim.gpLimMlmScanReq->bssId, 6);
+ fFound = vos_mem_compare(pHdr->addr3, &pMac->lim.gpLimMlmScanReq->bssId, 6);
if (!fFound)
{
if ((pMac->lim.gpLimMlmScanReq->p2pSearch) &&
- (palEqualMemory(pMac->hHdd, pBPR->P2PProbeRes.P2PDeviceInfo.P2PDeviceAddress,
+ (vos_mem_compare(pBPR->P2PProbeRes.P2PDeviceInfo.P2PDeviceAddress,
&pMac->lim.gpLimMlmScanReq->bssId, 6)))
{
fFound = eANI_BOOLEAN_TRUE;
@@ -413,7 +413,7 @@
!limIsScanRequestedSSID(pMac, &pBPR->ssId)) ||
(!fFound && (pMac->lim.gpLimMlmScanReq &&
pMac->lim.gpLimMlmScanReq->bssId) &&
- !palEqualMemory(pMac->hHdd, bssid,
+ !vos_mem_compare(bssid,
&pMac->lim.gpLimMlmScanReq->bssId, 6))))
{
/**
@@ -492,11 +492,12 @@
frameLen = sizeof(tLimScanResultNode) + ieLen - sizeof(tANI_U32); //Sizeof(tANI_U32) is for ieFields[1]
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pBssDescr, frameLen))
+ pBssDescr = vos_mem_malloc(frameLen);
+ if ( NULL == pBssDescr )
{
// Log error
limLog(pMac, LOGP,
- FL("call for palAllocateMemory failed for storing BSS description"));
+ FL("call for AllocateMemory failed for storing BSS description"));
return;
}
@@ -603,7 +604,7 @@
if( eHAL_STATUS_SUCCESS != status )
{
- palFreeMemory( pMac->hHdd, pBssDescr );
+ vos_mem_free( pBssDescr );
}
} /****** end limCheckAndAddBssDescription() ******/
@@ -721,13 +722,13 @@
{
//For infrastructure, check BSSID and SSID. For IBSS, check more
pSirCapTemp = (tSirMacCapabilityInfo *)&ptemp->bssDescription.capabilityInfo;
- if((pSirCapTemp->ess == pSirCap->ess) && //matching ESS type first
- (palEqualMemory( pMac->hHdd,(tANI_U8 *) pBssDescr->bssDescription.bssId,
+ if ((pSirCapTemp->ess == pSirCap->ess) && //matching ESS type first
+ (vos_mem_compare( (tANI_U8 *) pBssDescr->bssDescription.bssId,
(tANI_U8 *) ptemp->bssDescription.bssId,
sizeof(tSirMacAddr))) && //matching BSSID
(pBssDescr->bssDescription.channelId ==
ptemp->bssDescription.channelId) &&
- palEqualMemory( pMac->hHdd,((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
+ vos_mem_compare( ((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
((tANI_U8 *) &ptemp->bssDescription.ieFields + 1),
(tANI_U8) (ssidLen + 1)) &&
((pSirCapTemp->ess) || //we are done for infrastructure
@@ -763,7 +764,7 @@
//Found it
if((DOT11F_IE_WSCPROBERES_MAX_LEN - 2) >= pbIe[1])
{
- palCopyMemory(pMac->hHdd, pBssDescr->bssDescription.WscIeProbeRsp,
+ vos_mem_copy(pBssDescr->bssDescription.WscIeProbeRsp,
pbIe, pbIe[1] + 2);
pBssDescr->bssDescription.WscIeLen = pbIe[1] + 2;
}
@@ -792,7 +793,7 @@
pMac->lim.gLimMlmScanResultLength -=
ptemp->bssDescription.length + sizeof(tANI_U16);
- palFreeMemory( pMac->hHdd, (tANI_U8 *) ptemp);
+ vos_mem_free(ptemp);
}
found = true;
break;
@@ -943,13 +944,13 @@
{
//For infrastructure, check BSSID and SSID. For IBSS, check more
pSirCapTemp = (tSirMacCapabilityInfo *)&ptemp->bssDescription.capabilityInfo;
- if((pSirCapTemp->ess == pSirCap->ess) && //matching ESS type first
- (palEqualMemory( pMac->hHdd,(tANI_U8 *) pBssDescr->bssDescription.bssId,
+ if ((pSirCapTemp->ess == pSirCap->ess) && //matching ESS type first
+ (vos_mem_compare( (tANI_U8 *) pBssDescr->bssDescription.bssId,
(tANI_U8 *) ptemp->bssDescription.bssId,
sizeof(tSirMacAddr))) && //matching BSSID
(pBssDescr->bssDescription.channelId ==
ptemp->bssDescription.channelId) &&
- palEqualMemory( pMac->hHdd,((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
+ vos_mem_compare( ((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
((tANI_U8 *) &ptemp->bssDescription.ieFields + 1),
(tANI_U8) (ssidLen + 1)) &&
((pSirCapTemp->ess) || //we are done for infrastructure
@@ -986,7 +987,7 @@
//Found it
if((DOT11F_IE_WSCPROBERES_MAX_LEN - 2) >= pbIe[1])
{
- palCopyMemory(pMac->hHdd, pBssDescr->bssDescription.WscIeProbeRsp,
+ vos_mem_copy( pBssDescr->bssDescription.WscIeProbeRsp,
pbIe, pbIe[1] + 2);
pBssDescr->bssDescription.WscIeLen = pbIe[1] + 2;
}
@@ -1015,7 +1016,7 @@
pMac->lim.gLimMlmLfrScanResultLength -=
ptemp->bssDescription.length + sizeof(tANI_U16);
- palFreeMemory( pMac->hHdd, (tANI_U8 *) ptemp);
+ vos_mem_free(ptemp);
}
break;
}
@@ -1117,7 +1118,7 @@
while(ptemp)
{
/// Copy entire BSS description including length
- palCopyMemory( pMac->hHdd, pDest,
+ vos_mem_copy( pDest,
(tANI_U8 *) &ptemp->bssDescription,
ptemp->bssDescription.length + 2);
pDest += ptemp->bssDescription.length + 2;
@@ -1164,7 +1165,7 @@
pNextNode = pNode->next;
// Delete the current node
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pNode);
+ vos_mem_free(pNode);
pNode = pNextNode;
}
@@ -1242,7 +1243,7 @@
pNextNode = pNode->next;
// Delete the current node
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pNode);
+ vos_mem_free(pNode);
pNode = pNextNode;
}
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c
index 75f27ee..958eb51 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -264,9 +264,9 @@
while (pTempNode != NULL)
{
- if (palEqualMemory( pMac->hHdd,(tANI_U8 *) macAddr,
- (tANI_U8 *) &pTempNode->peerMacAddr,
- sizeof(tSirMacAddr)) )
+ if (vos_mem_compare( (tANI_U8 *) macAddr,
+ (tANI_U8 *) &pTempNode->peerMacAddr,
+ sizeof(tSirMacAddr)) )
break;
pTempNode = pTempNode->next;
@@ -371,9 +371,9 @@
if (pTempNode == NULL)
return;
- if (palEqualMemory( pMac->hHdd,(tANI_U8 *) macAddr,
- (tANI_U8 *) &pTempNode->peerMacAddr,
- sizeof(tSirMacAddr)) )
+ if (vos_mem_compare( (tANI_U8 *) macAddr,
+ (tANI_U8 *) &pTempNode->peerMacAddr,
+ sizeof(tSirMacAddr)) )
{
// First node to be deleted
@@ -393,8 +393,8 @@
while (pTempNode != NULL)
{
- if (palEqualMemory( pMac->hHdd,(tANI_U8 *) macAddr,
- (tANI_U8 *) &pTempNode->peerMacAddr,
+ if (vos_mem_compare( (tANI_U8 *) macAddr,
+ (tANI_U8 *) &pTempNode->peerMacAddr,
sizeof(tSirMacAddr)) )
{
// Found node to be deleted
@@ -454,7 +454,7 @@
tSirMacAddr currentBssId;
tLimMlmAuthCnf mlmAuthCnf;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmAuthCnf.peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmAuthCnf.peerMacAddr,
(tANI_U8 *) &pMac->lim.gpLimMlmAuthReq->peerMacAddr,
sizeof(tSirMacAddr));
mlmAuthCnf.authType = pMac->lim.gpLimMlmAuthReq->authType;
@@ -466,7 +466,7 @@
/// Free up buffer allocated
/// for pMac->lim.gLimMlmAuthReq
- palFreeMemory( pMac->hHdd, pMac->lim.gpLimMlmAuthReq);
+ vos_mem_free(pMac->lim.gpLimMlmAuthReq);
pMac->lim.gpLimMlmAuthReq = NULL;
sessionEntry->limMlmState = sessionEntry->limPrevMlmState;
@@ -565,12 +565,12 @@
halGetTxTSFtimer(pMac, (tSirMacTimeStamp *) &seed);
// Bytes 3-7 of seed is key
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &seed[3], pKey, keyLength - 3);
+ vos_mem_copy((tANI_U8 *) &seed[3], pKey, keyLength - 3);
// Compute CRC-32 and place them in last 4 bytes of plain text
limComputeCrc32(icv, pPlainText, sizeof(tSirMacAuthFrameBody));
- palCopyMemory( pMac->hHdd, pPlainText + sizeof(tSirMacAuthFrameBody),
+ vos_mem_copy( pPlainText + sizeof(tSirMacAuthFrameBody),
icv, SIR_MAC_WEP_ICV_LENGTH);
// Run RC4 on plain text with the seed
@@ -760,10 +760,10 @@
// Bytes 0-2 of seed is received IV
- palCopyMemory( pMac->hHdd, (tANI_U8 *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1);
+ vos_mem_copy((tANI_U8 *) seed, pEncrBody, SIR_MAC_WEP_IV_LENGTH - 1);
// Bytes 3-7 of seed is key
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &seed[3], pKey, keyLength - 3);
+ vos_mem_copy((tANI_U8 *) &seed[3], pKey, keyLength - 3);
// Run RC4 on encrypted text with the seed
limRC4(pPlainBody,
@@ -802,17 +802,17 @@
tLimMlmSetKeysCnf *mlmSetKeysCnf)
{
// Prepare and Send LIM_MLM_SETKEYS_CNF
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmSetKeysCnf->peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmSetKeysCnf->peerMacAddr,
(tANI_U8 *) pMlmSetKeysReq->peerMacAddr,
sizeof(tSirMacAddr));
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmSetKeysCnf->peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmSetKeysCnf->peerMacAddr,
(tANI_U8 *) pMlmSetKeysReq->peerMacAddr,
sizeof(tSirMacAddr));
/// Free up buffer allocated for mlmSetKeysReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmSetKeysReq );
+ vos_mem_free( pMlmSetKeysReq );
pMac->lim.gpLimMlmSetKeysReq = NULL;
limPostSmeMessage( pMac,
@@ -831,12 +831,12 @@
tLimMlmRemoveKeyCnf *mlmRemoveKeyCnf)
{
// Prepare and Send LIM_MLM_REMOVEKEYS_CNF
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmRemoveKeyCnf->peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmRemoveKeyCnf->peerMacAddr,
(tANI_U8 *) pMlmRemoveKeyReq->peerMacAddr,
sizeof(tSirMacAddr));
/// Free up buffer allocated for mlmRemoveKeysReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmRemoveKeyReq );
+ vos_mem_free( pMlmRemoveKeyReq );
pMac->lim.gpLimMlmRemoveKeyReq = NULL;
psessionEntry->limMlmState = psessionEntry->limPrevMlmState; //Restore the state.
@@ -889,21 +889,19 @@
// Package WDA_SET_BSSKEY_REQ message parameters
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pSetBssKeyParams,
- sizeof( tSetBssKeyParams )))
+ pSetBssKeyParams = vos_mem_malloc(sizeof( tSetBssKeyParams ));
+ if ( NULL == pSetBssKeyParams )
{
limLog( pMac, LOGE,
- FL( "Unable to PAL allocate memory during SET_BSSKEY" ));
+ FL( "Unable to allocate memory during SET_BSSKEY" ));
// Respond to SME with error code
mlmSetKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
else
- palZeroMemory( pMac->hHdd,
- (void *) pSetBssKeyParams,
- sizeof( tSetBssKeyParams ));
+ vos_mem_set( (void *) pSetBssKeyParams,
+ sizeof( tSetBssKeyParams ), 0);
// Update the WDA_SET_BSSKEY_REQ parameters
pSetBssKeyParams->bssIdx = psessionEntry->bssIdx;
@@ -928,18 +926,16 @@
/* IF the key id is non-zero and encryption type is WEP, Send all the 4
* keys to HAL with filling the key at right index in pSetBssKeyParams->key. */
pSetBssKeyParams->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) &pSetBssKeyParams->key[pMlmSetKeysReq->key[0].keyId],
- (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof(pMlmSetKeysReq->key[0]));
+ vos_mem_copy( (tANI_U8 *) &pSetBssKeyParams->key[pMlmSetKeysReq->key[0].keyId],
+ (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof(pMlmSetKeysReq->key[0]));
}
else
{
pSetBssKeyParams->numKeys = pMlmSetKeysReq->numKeys;
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) &pSetBssKeyParams->key,
- (tANI_U8 *) &pMlmSetKeysReq->key,
- sizeof( tSirKeys ) * pMlmSetKeysReq->numKeys );
+ vos_mem_copy( (tANI_U8 *) &pSetBssKeyParams->key,
+ (tANI_U8 *) &pMlmSetKeysReq->key,
+ sizeof( tSirKeys ) * pMlmSetKeysReq->numKeys );
}
SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
@@ -1009,12 +1005,14 @@
tANI_U32 val = 0;
// Package WDA_SET_STAKEY_REQ message parameters
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **) &pSetStaKeyParams,
- sizeof( tSetStaKeyParams ))) {
- limLog( pMac, LOGP, FL( "Unable to PAL allocate memory during SET_BSSKEY" ));
- return;
- }else
- palZeroMemory( pMac->hHdd, (void *) pSetStaKeyParams, sizeof( tSetStaKeyParams ));
+ pSetStaKeyParams = vos_mem_malloc(sizeof( tSetStaKeyParams ));
+ if ( NULL == pSetStaKeyParams )
+ {
+ limLog( pMac, LOGP, FL( "Unable to allocate memory during SET_BSSKEY" ));
+ return;
+ }
+ else
+ vos_mem_set( (void *) pSetStaKeyParams, sizeof( tSetStaKeyParams ), 0);
// Update the WDA_SET_STAKEY_REQ parameters
pSetStaKeyParams->staIdx = staIdx;
@@ -1068,9 +1066,8 @@
for(i=0; i < SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS ;i++)
{
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) &pSetStaKeyParams->key[i],
- (tANI_U8 *) &pMlmSetKeysReq->key[i], sizeof( tSirKeys ));
+ vos_mem_copy( (tANI_U8 *) &pSetStaKeyParams->key[i],
+ (tANI_U8 *) &pMlmSetKeysReq->key[i], sizeof( tSirKeys ));
}
pSetStaKeyParams->wepType = eSIR_WEP_STATIC;
sessionEntry->limMlmState = eLIM_MLM_WT_SET_STA_KEY_STATE;
@@ -1078,8 +1075,7 @@
}else {
/*This case the keys are coming from upper layer so need to fill the
* key at the default wep key index and send to the HAL */
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) &pSetStaKeyParams->key[defWEPIdx],
+ vos_mem_copy((tANI_U8 *) &pSetStaKeyParams->key[defWEPIdx],
(tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof( pMlmSetKeysReq->key[0] ));
pMlmSetKeysReq->numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
}
@@ -1090,8 +1086,8 @@
case eSIR_ED_WPI:
#endif
{
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pSetStaKeyParams->key,
- (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof( tSirKeys ));
+ vos_mem_copy( (tANI_U8 *) &pSetStaKeyParams->key,
+ (tANI_U8 *) &pMlmSetKeysReq->key[0], sizeof( tSirKeys ));
}
break;
default:
@@ -1150,22 +1146,19 @@
tSirRetStatus retCode;
// Package WDA_REMOVE_BSSKEY_REQ message parameters
-
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pRemoveBssKeyParams,
- sizeof( tRemoveBssKeyParams )))
+ pRemoveBssKeyParams = vos_mem_malloc(sizeof( tRemoveBssKeyParams ));
+ if ( NULL == pRemoveBssKeyParams )
{
limLog( pMac, LOGE,
- FL( "Unable to PAL allocate memory during REMOVE_BSSKEY" ));
+ FL( "Unable to allocate memory during REMOVE_BSSKEY" ));
// Respond to SME with error code
mlmRemoveKeysCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
else
- palZeroMemory( pMac->hHdd,
- (void *) pRemoveBssKeyParams,
- sizeof( tRemoveBssKeyParams ));
+ vos_mem_set( (void *) pRemoveBssKeyParams,
+ sizeof( tRemoveBssKeyParams ), 0);
// Update the WDA_REMOVE_BSSKEY_REQ parameters
pRemoveBssKeyParams->bssIdx = psessionEntry->bssIdx;
@@ -1234,7 +1227,7 @@
*/
void limSendRemoveStaKeyReq( tpAniSirGlobal pMac,
tLimMlmRemoveKeyReq *pMlmRemoveKeyReq,
- tANI_U16 staIdx ,
+ tANI_U16 staIdx,
tpPESession psessionEntry)
{
tSirMsgQ msgQ;
@@ -1242,23 +1235,19 @@
tLimMlmRemoveKeyCnf mlmRemoveKeyCnf;
tSirRetStatus retCode;
-
-
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pRemoveStaKeyParams,
- sizeof( tRemoveStaKeyParams )))
+ pRemoveStaKeyParams = vos_mem_malloc(sizeof( tRemoveStaKeyParams ));
+ if ( NULL == pRemoveStaKeyParams )
{
limLog( pMac, LOGE,
- FL( "Unable to PAL allocate memory during REMOVE_STAKEY" ));
+ FL( "Unable to allocate memory during REMOVE_STAKEY" ));
// Respond to SME with error code
mlmRemoveKeyCnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
goto end;
}
else
- palZeroMemory( pMac->hHdd,
- (void *) pRemoveStaKeyParams,
- sizeof( tRemoveStaKeyParams ));
+ vos_mem_set( (void *) pRemoveStaKeyParams,
+ sizeof( tRemoveStaKeyParams ), 0);
if( (pMlmRemoveKeyReq->edType == eSIR_ED_WEP104 || pMlmRemoveKeyReq->edType == eSIR_ED_WEP40) &&
pMlmRemoveKeyReq->wepType == eSIR_WEP_STATIC )
@@ -1298,7 +1287,7 @@
limLog( pMac, LOGE,
FL("Posting REMOVE_STAKEY to HAL failed, reason=%X"),
retCode );
- palFreeMemory(pMac->hHdd, pRemoveStaKeyParams);
+ vos_mem_free(pRemoveStaKeyParams);
pRemoveStaKeyParams = NULL;
// Respond to SME with LIM_MLM_REMOVEKEY_CNF
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index 9138561..35d83dd 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -108,7 +108,7 @@
tANI_U8* pBD,
tANI_U8 type,
tANI_U8 subType,
- tSirMacAddr peerAddr ,tSirMacAddr selfMacAddr)
+ tSirMacAddr peerAddr, tSirMacAddr selfMacAddr)
{
tSirRetStatus statusCode = eSIR_SUCCESS;
tpSirMacMgmtHdr pMacHdr;
@@ -122,8 +122,7 @@
pMacHdr->fc.subType = subType;
// Prepare Address 1
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) pMacHdr->da,
+ vos_mem_copy( (tANI_U8 *) pMacHdr->da,
(tANI_U8 *) peerAddr,
sizeof( tSirMacAddr ));
@@ -131,8 +130,7 @@
sirCopyMacAddr(pMacHdr->sa,selfMacAddr);
// Prepare Address 3
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) pMacHdr->bssId,
+ vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
(tANI_U8 *) peerAddr,
sizeof( tSirMacAddr ));
return statusCode;
@@ -255,7 +253,7 @@
// The scheme here is to fill out a 'tDot11fProbeRequest' structure
// and then hand it off to 'dot11fPackProbeRequest' (for
// serialization). We start by zero-initializing the structure:
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&pr, sizeof( pr ) );
+ vos_mem_set(( tANI_U8* )&pr, sizeof( pr ), 0);
// & delegating to assorted helpers:
PopulateDot11fSSID( pMac, pSsid, &pr.SSID );
@@ -372,11 +370,11 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
- SIR_MAC_MGMT_PROBE_REQ, bssid ,SelfMacAddr);
+ SIR_MAC_MGMT_PROBE_REQ, bssid, SelfMacAddr);
if ( eSIR_SUCCESS != nSirStatus )
{
limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
@@ -407,7 +405,7 @@
// Append any AddIE if present.
if( nAdditionalIELen )
{
- palCopyMemory( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
+ vos_mem_copy( pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
pAdditionalIE, nAdditionalIELen );
nPayload += nAdditionalIELen;
}
@@ -465,8 +463,8 @@
return eSIR_FAILURE;
}
- if( (palAllocateMemory(pMac->hHdd, (void**)&tempbuf,
- left)) != eHAL_STATUS_SUCCESS)
+ tempbuf = vos_mem_malloc(left);
+ if ( NULL == tempbuf )
{
PELOGE(limLog(pMac, LOGE,
FL("Unable to allocate memory to store addn IE"));)
@@ -483,21 +481,21 @@
limLog( pMac, LOGE,
FL("****Invalid IEs eid = %d elem_len=%d left=%d*****"),
elem_id,elem_len,left);
- palFreeMemory(pMac->hHdd, tempbuf);
+ vos_mem_free(tempbuf);
return eSIR_FAILURE;
}
if ( !( (SIR_MAC_EID_VENDOR == elem_id) &&
(memcmp(&ptr[2], SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE)==0) ) )
{
- palCopyMemory ( pMac->hHdd, tempbuf + tempLen, &ptr[0], elem_len + 2);
+ vos_mem_copy (tempbuf + tempLen, &ptr[0], elem_len + 2);
tempLen += (elem_len + 2);
}
left -= elem_len;
ptr += (elem_len + 2);
}
- palCopyMemory ( pMac->hHdd, addIE, tempbuf, tempLen);
+ vos_mem_copy (addIE, tempbuf, tempLen);
*addnIELen = tempLen;
- palFreeMemory(pMac->hHdd, tempbuf);
+ vos_mem_free(tempbuf);
}
return eSIR_SUCCESS;
}
@@ -542,17 +540,17 @@
{
return;
}
-
- if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
- (void **)&pFrm, sizeof(tDot11fProbeResponse)))
+
+ pFrm = vos_mem_malloc(sizeof(tDot11fProbeResponse));
+ if ( NULL == pFrm )
{
- limLog(pMac, LOGE, FL("Unable to PAL allocate memory in limSendProbeRspMgmtFrame") );
+ limLog(pMac, LOGE, FL("Unable to allocate memory in limSendProbeRspMgmtFrame") );
return;
}
// Fill out 'frm', after which we'll just hand the struct off to
// 'dot11fPackProbeResponse'.
- palZeroMemory( pMac->hHdd, ( tANI_U8* )pFrm, sizeof( tDot11fProbeResponse ) );
+ vos_mem_set(( tANI_U8* )pFrm, sizeof( tDot11fProbeResponse ), 0);
// Timestamp to be updated by TFP, below.
@@ -568,7 +566,7 @@
{
limLog( pMac, LOGP, FL("Failed to retrieve WNI_CFG_BEACON_INTERVAL from CFG (%d)."),
nSirStatus );
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
pFrm->BeaconInterval.interval = ( tANI_U16 ) cfg;
@@ -711,19 +709,20 @@
&addnIEPresent) != eSIR_SUCCESS)
{
limLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_FLAG"));
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
}
if (addnIEPresent)
{
- if( (palAllocateMemory(pMac->hHdd, (void**)&addIE,
- WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN*3 )) != eHAL_STATUS_SUCCESS)
+
+ addIE = vos_mem_malloc(WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN*3);
+ if ( NULL == addIE )
{
PELOGE(limLog(pMac, LOGE,
FL("Unable to allocate memory to store addn IE"));)
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
@@ -732,8 +731,8 @@
WNI_CFG_PROBE_RSP_ADDNIE_DATA1, &addnIE1Len) )
{
limLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 length"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
if (addnIE1Len <= WNI_CFG_PROBE_RSP_ADDNIE_DATA1_LEN && addnIE1Len &&
@@ -745,8 +744,8 @@
{
limLog(pMac, LOGP,
FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA1 String"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
}
@@ -756,8 +755,8 @@
WNI_CFG_PROBE_RSP_ADDNIE_DATA2, &addnIE2Len) )
{
limLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA2 length"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
if (addnIE2Len <= WNI_CFG_PROBE_RSP_ADDNIE_DATA2_LEN && addnIE2Len &&
@@ -769,8 +768,8 @@
{
limLog(pMac, LOGP,
FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA2 String"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
}
@@ -780,8 +779,8 @@
WNI_CFG_PROBE_RSP_ADDNIE_DATA3, &addnIE3Len) )
{
limLog(pMac, LOGP, FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA3 length"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
if (addnIE3Len <= WNI_CFG_PROBE_RSP_ADDNIE_DATA3_LEN && addnIE3Len &&
@@ -794,8 +793,8 @@
{
limLog(pMac, LOGP,
FL("Unable to get WNI_CFG_PROBE_RSP_ADDNIE_DATA3 String"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
}
@@ -805,8 +804,8 @@
{
limLog(pMac, LOGP,
FL("Unable to get final Additional IE for Probe Req"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
return;
}
nBytes = nBytes + totalAddnIeLen;
@@ -837,14 +836,14 @@
"be Response."), nBytes );
if ( addIE != NULL )
{
- palFreeMemory(pMac->hHdd, addIE);
+ vos_mem_free(addIE);
}
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -858,9 +857,9 @@
( void* ) pFrame, ( void* ) pPacket );
if ( addIE != NULL )
{
- palFreeMemory(pMac->hHdd, addIE);
+ vos_mem_free(addIE);
}
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
@@ -878,9 +877,9 @@
palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket );
if ( addIE != NULL )
{
- palFreeMemory(pMac->hHdd, addIE);
+ vos_mem_free(addIE);
}
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return; // allocated!
}
else if ( DOT11F_WARNED( nStatus ) )
@@ -896,25 +895,13 @@
if( pMac->lim.gpLimRemainOnChanReq )
{
- palCopyMemory ( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
+ vos_mem_copy ( pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
pMac->lim.gpLimRemainOnChanReq->probeRspIe, (pMac->lim.gpLimRemainOnChanReq->length - sizeof( tSirRemainOnChnReq )) );
}
if ( addnIEPresent )
{
- if (palCopyMemory ( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
- &addIE[0], totalAddnIeLen) != eHAL_STATUS_SUCCESS)
- {
- limLog(pMac, LOGP, FL("Additional Probe Rp IE request failed while Appending: %x"),halstatus);
- palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
- ( void* ) pFrame, ( void* ) pPacket );
- if ( addIE != NULL )
- {
- palFreeMemory(pMac->hHdd, addIE);
- }
- palFreeMemory(pMac->hHdd, pFrm);
- return;
- }
+ vos_mem_copy(pFrame+sizeof(tSirMacMgmtHdr)+nPayload, &addIE[0], totalAddnIeLen);
}
if (noaLen != 0)
{
@@ -922,15 +909,15 @@
{
limLog(pMac, LOGE,
FL("Not able to insert NoA because of length constraint"));
- palFreeMemory(pMac->hHdd, addIE);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(addIE);
+ vos_mem_free(pFrm);
palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
( void* ) pFrame, ( void* ) pPacket );
return;
}
else
{
- palCopyMemory(pMac->hHdd, &pFrame[nBytes - (total_noaLen)],
+ vos_mem_copy( &pFrame[nBytes - (total_noaLen)],
&noaIe[0], total_noaLen);
}
}
@@ -958,10 +945,10 @@
if ( addIE != NULL )
{
- palFreeMemory(pMac->hHdd, addIE);
+ vos_mem_free(addIE);
}
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
@@ -994,7 +981,7 @@
if ( ! pAddTS->wmeTspecPresent )
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&AddTSReq, sizeof( AddTSReq ) );
+ vos_mem_set(( tANI_U8* )&AddTSReq, sizeof( AddTSReq ), 0);
AddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ;
AddTSReq.DialogToken.token = pAddTS->dialogToken;
@@ -1062,7 +1049,7 @@
}
else
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&WMMAddTSReq, sizeof( WMMAddTSReq ) );
+ vos_mem_set(( tANI_U8* )&WMMAddTSReq, sizeof( WMMAddTSReq ), 0);
WMMAddTSReq.Action.action = SIR_MAC_QOS_ADD_TS_REQ;
WMMAddTSReq.DialogToken.token = pAddTS->dialogToken;
@@ -1117,7 +1104,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -1250,7 +1237,7 @@
return;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
limGetQosMode(psessionEntry, &qosMode);
limGetWmeMode(psessionEntry, &wmeMode);
@@ -1358,7 +1345,7 @@
} // End if on non-NULL 'pSta'.
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&beaconParams, sizeof( tUpdateBeaconParams) );
+ vos_mem_set(( tANI_U8* )&beaconParams, sizeof( tUpdateBeaconParams), 0);
if( psessionEntry->limSystemRole == eLIM_AP_ROLE ){
if(psessionEntry->gLimProtectionControl != WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
@@ -1436,7 +1423,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac,
@@ -1494,14 +1481,7 @@
if ( addnIEPresent )
{
- if (palCopyMemory ( pMac->hHdd, pFrame+sizeof(tSirMacMgmtHdr)+nPayload,
- &addIE[0], addnIELen ) != eHAL_STATUS_SUCCESS)
- {
- limLog(pMac, LOGP, FL("Additional Assoc IEs request failed while Appending: %x"),halstatus);
- palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
- ( void* ) pFrame, ( void* ) pPacket );
- return;
- }
+ vos_mem_copy ( pFrame+sizeof(tSirMacMgmtHdr)+nPayload, &addIE[0], addnIELen ) ;
}
if( ( SIR_BAND_5_GHZ == limGetRFBand(psessionEntry->currentOperChannel))
@@ -1561,7 +1541,7 @@
if ( ! pAddTS->wmeTspecPresent )
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&AddTSRsp, sizeof( AddTSRsp ) );
+ vos_mem_set( ( tANI_U8* )&AddTSRsp, sizeof( AddTSRsp ), 0 );
AddTSRsp.Category.category = SIR_MAC_ACTION_QOS_MGMT;
AddTSRsp.Action.action = SIR_MAC_QOS_ADD_TS_RSP;
@@ -1668,7 +1648,7 @@
}
else
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&WMMAddTSRsp, sizeof( WMMAddTSRsp ) );
+ vos_mem_set( ( tANI_U8* )&WMMAddTSRsp, sizeof( WMMAddTSRsp ), 0 );
WMMAddTSRsp.Category.category = SIR_MAC_ACTION_WME;
WMMAddTSRsp.Action.action = SIR_MAC_QOS_ADD_TS_RSP;
@@ -1705,7 +1685,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -1830,7 +1810,7 @@
if ( ! wmmTspecPresent )
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&DelTS, sizeof( DelTS ) );
+ vos_mem_set( ( tANI_U8* )&DelTS, sizeof( DelTS ), 0 );
DelTS.Category.category = SIR_MAC_ACTION_QOS_MGMT;
DelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ;
@@ -1854,7 +1834,7 @@
}
else
{
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&WMMDelTS, sizeof( WMMDelTS ) );
+ vos_mem_set( ( tANI_U8* )&WMMDelTS, sizeof( WMMDelTS ), 0 );
WMMDelTS.Category.category = SIR_MAC_ACTION_WME;
WMMDelTS.Action.action = SIR_MAC_QOS_DEL_TS_REQ;
@@ -1889,7 +1869,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -2027,15 +2007,15 @@
nAddIELen = psessionEntry->pLimJoinReq->addIEAssoc.length;
pAddIE = psessionEntry->pLimJoinReq->addIEAssoc.addIEdata;
- if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
- (void **)&pFrm, sizeof(tDot11fAssocRequest)))
+ pFrm = vos_mem_malloc(sizeof(tDot11fAssocRequest));
+ if ( NULL == pFrm )
{
- limLog(pMac, LOGE, FL("Unable to PAL allocate memory in limSendAssocReqMgmtFrame") );
+ limLog(pMac, LOGE, FL("Unable to allocate memory in limSendAssocReqMgmtFrame") );
return;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )pFrm, sizeof( tDot11fAssocRequest ) );
+ vos_mem_set( ( tANI_U8* )pFrm, sizeof( tDot11fAssocRequest ), 0 );
caps = pMlmAssocReq->capabilityInfo;
if ( PROP_CAPABILITY_GET( 11EQOS, psessionEntry->limCurrentBssPropCap ) )
@@ -2269,12 +2249,12 @@
limPostSmeMessage( pMac, LIM_MLM_ASSOC_CNF,
( tANI_U32* ) &mlmAssocCnf);
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -2285,7 +2265,7 @@
"tor for an Association Request (%d)."),
nSirStatus );
palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT, ( void* ) pFrame, ( void* ) pPacket );
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
@@ -2301,7 +2281,7 @@
nStatus );
palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
( void* ) pFrame, ( void* ) pPacket );
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
else if ( DOT11F_WARNED( nStatus ) )
@@ -2317,27 +2297,27 @@
if( psessionEntry->assocReq != NULL )
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_free(psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
}
if( nAddIELen )
{
- palCopyMemory( pMac->hHdd, pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
- pAddIE,
- nAddIELen );
+ vos_mem_copy( pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
+ pAddIE,
+ nAddIELen );
nPayload += nAddIELen;
}
- if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
- nPayload)) != eHAL_STATUS_SUCCESS)
+ psessionEntry->assocReq = vos_mem_malloc(nPayload);
+ if ( NULL == psessionEntry->assocReq )
{
PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
}
else
{
//Store the Assoc request. This is sent to csr/hdd in join cnf response.
- palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
+ vos_mem_copy( psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
psessionEntry->assocReqLen = nPayload;
}
@@ -2364,13 +2344,13 @@
limLog( pMac, LOGE, FL("Failed to send Association Request (%X)!"),
halstatus );
//Pkt will be freed up by the callback
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pFrm);
return;
}
// Free up buffer allocated for mlmAssocReq
- palFreeMemory( pMac->hHdd, ( tANI_U8* ) pMlmAssocReq );
- palFreeMemory(pMac->hHdd, pFrm);
+ vos_mem_free(pMlmAssocReq);
+ vos_mem_free(pFrm);
return;
} // End limSendAssocReqMgmtFrame
@@ -2421,7 +2401,7 @@
limLog( pMac, LOG1, FL("limSendReassocReqWithFTIEsMgmtFrame received in "
"state (%d)."), psessionEntry->limMlmState);
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
caps = pMlmReassocReq->capabilityInfo;
if (PROP_CAPABILITY_GET(11EQOS, psessionEntry->limReassocBssPropCap))
@@ -2441,7 +2421,7 @@
frm.ListenInterval.interval = pMlmReassocReq->listenInterval;
// Get the old bssid of the older AP.
- palCopyMemory( pMac->hHdd, ( tANI_U8* )frm.CurrentAPAddress.mac,
+ vos_mem_copy( ( tANI_U8* )frm.CurrentAPAddress.mac,
pMac->ft.ftPEContext.pFTPreAuthReq->currbssId, 6);
PopulateDot11fSSID2( pMac, &frm.SSID );
@@ -2665,7 +2645,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes + ft_ies_length);
+ vos_mem_set( pFrame, nBytes + ft_ies_length, 0);
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
limPrintMacAddr(pMac, psessionEntry->limReAssocbssId, LOG1);
@@ -2707,27 +2687,27 @@
nBytes, nPayload );)
if( psessionEntry->assocReq != NULL )
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_free(psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
}
if( nAddIELen )
{
- palCopyMemory( pMac->hHdd, pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
- pAddIE,
- nAddIELen );
+ vos_mem_copy( pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
+ pAddIE,
+ nAddIELen );
nPayload += nAddIELen;
}
- if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
- nPayload)) != eHAL_STATUS_SUCCESS)
+ psessionEntry->assocReq = vos_mem_malloc(nPayload);
+ if ( NULL == psessionEntry->assocReq )
{
PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
}
else
{
//Store the Assoc request. This is sent to csr/hdd in join cnf response.
- palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
+ vos_mem_copy( psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
psessionEntry->assocReqLen = nPayload;
}
@@ -2763,12 +2743,12 @@
if( NULL != psessionEntry->assocReq )
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_free(psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
}
- if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
- (ft_ies_length))) != eHAL_STATUS_SUCCESS )
+ psessionEntry->assocReq = vos_mem_malloc(ft_ies_length);
+ if ( NULL == psessionEntry->assocReq )
{
PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
psessionEntry->assocReqLen = 0;
@@ -2776,8 +2756,8 @@
else
{
//Store the Assoc request. This is sent to csr/hdd in join cnf response.
- palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pMac->ft.ftSmeContext.reassoc_ft_ies,
- (ft_ies_length));
+ vos_mem_copy( psessionEntry->assocReq, pMac->ft.ftSmeContext.reassoc_ft_ies,
+ (ft_ies_length));
psessionEntry->assocReqLen = (ft_ies_length);
}
@@ -2798,7 +2778,7 @@
end:
// Free up buffer allocated for mlmAssocReq
- palFreeMemory( pMac->hHdd, ( tANI_U8* ) pMlmReassocReq );
+ vos_mem_free( pMlmReassocReq );
psessionEntry->pLimMlmReassocReq = NULL;
}
@@ -2811,9 +2791,10 @@
tLimMlmReassocReq *pTmpMlmReassocReq = NULL;
if(NULL == pTmpMlmReassocReq)
{
- if ( !HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pTmpMlmReassocReq, sizeof(tLimMlmReassocReq))) ) goto end;
- palZeroMemory(pMac->hHdd, pTmpMlmReassocReq, sizeof(tLimMlmReassocReq));
- palCopyMemory( pMac->hHdd, pTmpMlmReassocReq, pMlmReassocReq, sizeof(tLimMlmReassocReq));
+ pTmpMlmReassocReq = vos_mem_malloc(sizeof(tLimMlmReassocReq));
+ if ( NULL == pTmpMlmReassocReq ) goto end;
+ vos_mem_set( pTmpMlmReassocReq, sizeof(tLimMlmReassocReq), 0);
+ vos_mem_copy( pTmpMlmReassocReq, pMlmReassocReq, sizeof(tLimMlmReassocReq));
}
// Prepare and send Reassociation request frame
@@ -2842,12 +2823,12 @@
// Free up buffer allocated for reassocReq
if (pMlmReassocReq != NULL)
{
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmReassocReq);
+ vos_mem_free(pMlmReassocReq);
pMlmReassocReq = NULL;
}
if (pTmpMlmReassocReq != NULL)
{
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pTmpMlmReassocReq);
+ vos_mem_free(pTmpMlmReassocReq);
pTmpMlmReassocReq = NULL;
}
mlmReassocCnf.resultCode = eSIR_SME_FT_REASSOC_FAILURE;
@@ -2894,7 +2875,7 @@
nAddIELen = psessionEntry->pLimReAssocReq->addIEAssoc.length;
pAddIE = psessionEntry->pLimReAssocReq->addIEAssoc.addIEdata;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
caps = pMlmReassocReq->capabilityInfo;
if (PROP_CAPABILITY_GET(11EQOS, psessionEntry->limReassocBssPropCap))
@@ -2913,8 +2894,8 @@
frm.ListenInterval.interval = pMlmReassocReq->listenInterval;
- palCopyMemory( pMac->hHdd, ( tANI_U8* )frm.CurrentAPAddress.mac,
- ( tANI_U8* )psessionEntry->bssId, 6 );
+ vos_mem_copy(( tANI_U8* )frm.CurrentAPAddress.mac,
+ ( tANI_U8* )psessionEntry->bssId, 6 );
PopulateDot11fSSID2( pMac, &frm.SSID );
PopulateDot11fSuppRates( pMac, POPULATE_DOT11F_RATES_OPERATIONAL,
@@ -3065,7 +3046,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -3105,27 +3086,27 @@
if( psessionEntry->assocReq != NULL )
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_free(psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
}
if( nAddIELen )
{
- palCopyMemory( pMac->hHdd, pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
- pAddIE,
- nAddIELen );
+ vos_mem_copy( pFrame + sizeof(tSirMacMgmtHdr) + nPayload,
+ pAddIE,
+ nAddIELen );
nPayload += nAddIELen;
}
- if( (palAllocateMemory(pMac->hHdd, (void**)&psessionEntry->assocReq,
- nPayload)) != eHAL_STATUS_SUCCESS)
+ psessionEntry->assocReq = vos_mem_malloc(nPayload);
+ if ( NULL == psessionEntry->assocReq )
{
PELOGE(limLog(pMac, LOGE, FL("Unable to allocate memory to store assoc request"));)
}
else
{
//Store the Assoc request. This is sent to csr/hdd in join cnf response.
- palCopyMemory(pMac->hHdd, psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
+ vos_mem_copy(psessionEntry->assocReq, pFrame + sizeof(tSirMacMgmtHdr), nPayload);
psessionEntry->assocReqLen = nPayload;
}
@@ -3158,7 +3139,7 @@
end:
// Free up buffer allocated for mlmAssocReq
- palFreeMemory( pMac->hHdd, ( tANI_U8* ) pMlmReassocReq );
+ vos_mem_free( pMlmReassocReq );
psessionEntry->pLimMlmReassocReq = NULL;
} // limSendReassocReqMgmtFrame
@@ -3349,9 +3330,9 @@
// Prepare BSSId
if( (psessionEntry->limSystemRole == eLIM_AP_ROLE)|| (psessionEntry->limSystemRole == eLIM_BT_AMP_AP_ROLE) )
{
- palCopyMemory( pMac->hHdd,(tANI_U8 *) pMacHdr->bssId,
- (tANI_U8 *) psessionEntry->bssId,
- sizeof( tSirMacAddr ));
+ vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
+ (tANI_U8 *) psessionEntry->bssId,
+ sizeof( tSirMacAddr ));
}
/// Prepare Authentication frame body
@@ -3359,7 +3340,7 @@
if (wepBit == LIM_WEP_IN_FC)
{
- palCopyMemory( pMac->hHdd, pBody, (tANI_U8 *) pAuthFrameBody, bodyLen);
+ vos_mem_copy(pBody, (tANI_U8 *) pAuthFrameBody, bodyLen);
PELOG1(limLog(pMac, LOG1,
FL("*** Sending Auth seq# 3 status %d (%d) to"),
@@ -3382,7 +3363,7 @@
pBody += sizeof(tANI_U16);
bodyLen -= sizeof(tANI_U16);
if ( bodyLen < sizeof (pAuthFrameBody->type) + sizeof (pAuthFrameBody->length) + sizeof (pAuthFrameBody->challengeText))
- palCopyMemory( pMac->hHdd, pBody, (tANI_U8 *) &pAuthFrameBody->type, bodyLen);
+ vos_mem_copy(pBody, (tANI_U8 *) &pAuthFrameBody->type, bodyLen);
#if defined WLAN_FEATURE_VOWIFI_11R
if ((pAuthFrameBody->authAlgoNumber == eSIR_FT_AUTH) &&
@@ -3503,12 +3484,12 @@
/// Receive path cleanup with dummy packet
limCleanupRxPath(pMac, pStaDs,psessionEntry);
/// Free up buffer allocated for mlmDeauthReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDeauthReq);
+ vos_mem_free(pMlmDeauthReq);
pMac->lim.limDisassocDeauthCnfReq.pMlmDeauthReq = NULL;
}
return eHAL_STATUS_SUCCESS;
end:
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmDeauthCnf.peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmDeauthCnf.peerMacAddr,
(tANI_U8 *) pMlmDeauthReq->peerMacAddr,
sizeof(tSirMacAddr));
mlmDeauthCnf.deauthTrigger = pMlmDeauthReq->deauthTrigger;
@@ -3517,7 +3498,7 @@
// Free up buffer allocated
// for mlmDeauthReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDeauthReq);
+ vos_mem_free(pMlmDeauthReq);
limPostSmeMessage(pMac,
LIM_MLM_DEAUTH_CNF,
@@ -3606,7 +3587,7 @@
#endif
/// Free up buffer allocated for mlmDisassocReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDisassocReq);
+ vos_mem_free(pMlmDisassocReq);
pMac->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL;
return eHAL_STATUS_SUCCESS;
}
@@ -3615,7 +3596,7 @@
return eHAL_STATUS_SUCCESS;
}
end:
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &mlmDisassocCnf.peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) &mlmDisassocCnf.peerMacAddr,
(tANI_U8 *) pMlmDisassocReq->peerMacAddr,
sizeof(tSirMacAddr));
mlmDisassocCnf.aid = pMlmDisassocReq->aid;
@@ -3627,7 +3608,7 @@
if(pMlmDisassocReq != NULL)
{
/// Free up buffer allocated for mlmDisassocReq
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pMlmDisassocReq);
+ vos_mem_free(pMlmDisassocReq);
pMac->lim.limDisassocDeauthCnfReq.pMlmDisassocReq = NULL;
}
@@ -3683,7 +3664,7 @@
return;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0);
frm.Reason.code = nReason;
@@ -3716,7 +3697,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -3863,7 +3844,7 @@
return;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* ) &frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* ) &frm, sizeof( frm ), 0 );
frm.Reason.code = nReason;
@@ -3896,7 +3877,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4064,7 +4045,7 @@
void *pPacket;
eHalStatus halstatus;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
frm.Action.action = SIR_MAC_ACTION_MEASURE_REPORT_ID;
@@ -4123,7 +4104,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4212,7 +4193,7 @@
void *pPacket;
eHalStatus halstatus;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
frm.Action.action = SIR_MAC_ACTION_TPC_REQUEST_ID;
@@ -4246,7 +4227,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set(pFrame, nBytes,0);
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4336,7 +4317,7 @@
void *pPacket;
eHalStatus halstatus;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
frm.Action.action = SIR_MAC_ACTION_TPC_REPORT_ID;
@@ -4377,7 +4358,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
@@ -4481,7 +4462,7 @@
eHalStatus halstatus;
tANI_U8 txFlag = 0;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
frm.Action.action = SIR_MAC_ACTION_CHANNEL_SWITCH_ID;
@@ -4517,16 +4498,15 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
SIR_MAC_MGMT_ACTION, peer, psessionEntry->selfMacAddr);
pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) pMacHdr->bssId,
- (tANI_U8 *) psessionEntry->bssId,
- sizeof( tSirMacAddr ));
+ vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
+ (tANI_U8 *) psessionEntry->bssId,
+ sizeof( tSirMacAddr ));
if ( eSIR_SUCCESS != nSirStatus )
{
limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
@@ -4614,7 +4594,7 @@
eHalStatus halstatus;
tANI_U8 txFlag = 0;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_VHT;
frm.Action.action = SIR_MAC_VHT_OPMODE_NOTIFICATION;
@@ -4649,7 +4629,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
@@ -4660,10 +4640,9 @@
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
SIR_MAC_MGMT_ACTION, psessionEntry->bssId, psessionEntry->selfMacAddr);
pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) pMacHdr->bssId,
- (tANI_U8 *) psessionEntry->bssId,
- sizeof( tSirMacAddr ));
+ vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
+ (tANI_U8 *) psessionEntry->bssId,
+ sizeof( tSirMacAddr ));
if ( eSIR_SUCCESS != nSirStatus )
{
limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
@@ -4746,7 +4725,7 @@
eHalStatus halstatus;
tANI_U8 txFlag = 0;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SPECTRUM_MGMT;
@@ -4788,16 +4767,15 @@
return eSIR_FAILURE;
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Next, we fill out the buffer descriptor:
nSirStatus = limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
SIR_MAC_MGMT_ACTION, peer, psessionEntry->selfMacAddr);
pMacHdr = ( tpSirMacMgmtHdr ) pFrame;
- palCopyMemory( pMac->hHdd,
- (tANI_U8 *) pMacHdr->bssId,
- (tANI_U8 *) psessionEntry->bssId,
- sizeof( tSirMacAddr ));
+ vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
+ (tANI_U8 *) psessionEntry->bssId,
+ sizeof( tSirMacAddr ));
if ( eSIR_SUCCESS != nSirStatus )
{
limLog( pMac, LOGE, FL("Failed to populate the buffer descrip"
@@ -4866,7 +4844,7 @@
* eSIR_FAILURE is some problem is encountered
*/
tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
- tpLimMlmAddBAReq pMlmAddBAReq ,tpPESession psessionEntry)
+ tpLimMlmAddBAReq pMlmAddBAReq, tpPESession psessionEntry)
{
tDot11fAddBAReq frmAddBAReq;
tANI_U8 *pAddBAReqBuffer = NULL;
@@ -4882,7 +4860,7 @@
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, (void *) &frmAddBAReq, sizeof( frmAddBAReq ));
+ vos_mem_set( (void *) &frmAddBAReq, sizeof( frmAddBAReq ), 0);
// Category - 3 (BA)
frmAddBAReq.Category.category = SIR_MAC_ACTION_BLKACK;
@@ -4952,7 +4930,7 @@
goto returnAfterError;
}
- palZeroMemory( pMac->hHdd, (void *) pAddBAReqBuffer, frameLen );
+ vos_mem_set( (void *) pAddBAReqBuffer, frameLen, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -5090,7 +5068,7 @@
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, (void *) &frmAddBARsp, sizeof( frmAddBARsp ));
+ vos_mem_set( (void *) &frmAddBARsp, sizeof( frmAddBARsp ), 0);
// Category - 3 (BA)
frmAddBARsp.Category.category = SIR_MAC_ACTION_BLKACK;
@@ -5154,7 +5132,7 @@
goto returnAfterError;
}
- palZeroMemory( pMac->hHdd, (void *) pAddBARspBuffer, frameLen );
+ vos_mem_set( (void *) pAddBARspBuffer, frameLen, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -5297,7 +5275,7 @@
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, (void *) &frmDelBAInd, sizeof( frmDelBAInd ));
+ vos_mem_set( (void *) &frmDelBAInd, sizeof( frmDelBAInd ), 0);
// Category - 3 (BA)
frmDelBAInd.Category.category = SIR_MAC_ACTION_BLKACK;
@@ -5353,7 +5331,7 @@
goto returnAfterError;
}
- palZeroMemory( pMac->hHdd, (void *) pDelBAIndBuffer, frameLen );
+ vos_mem_set( (void *) pDelBAIndBuffer, frameLen, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -5494,7 +5472,7 @@
limLog( pMac, LOGE, FL("(psession == NULL) in Request to send Neighbor Report request action frame") );
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_RRM;
frm.Action.action = SIR_MAC_RRM_NEIGHBOR_REQ;
@@ -5533,7 +5511,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -5652,7 +5630,7 @@
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_RRM;
frm.Action.action = SIR_MAC_RRM_LINK_MEASUREMENT_RPT;
@@ -5701,7 +5679,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -5832,7 +5810,7 @@
vos_mem_free(frm);
return eSIR_FAILURE;
}
- palZeroMemory( pMac->hHdd, ( tANI_U8* )frm, sizeof( *frm ) );
+ vos_mem_set( ( tANI_U8* )frm, sizeof( *frm ), 0 );
frm->Category.category = SIR_MAC_ACTION_RRM;
frm->Action.action = SIR_MAC_RRM_RADIO_MEASURE_RPT;
@@ -5891,7 +5869,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Copy necessary info to BD
if( eSIR_SUCCESS !=
@@ -6007,7 +5985,7 @@
eHalStatus halstatus;
tANI_U8 txFlag = 0;
- palZeroMemory( pMac->hHdd, ( tANI_U8* )&frm, sizeof( frm ) );
+ vos_mem_set( ( tANI_U8* )&frm, sizeof( frm ), 0 );
frm.Category.category = SIR_MAC_ACTION_SA_QUERY;
/*11w action field is :
action: 0 --> SA query request action frame
@@ -6043,7 +6021,7 @@
}
// Paranoia:
- palZeroMemory( pMac->hHdd, pFrame, nBytes );
+ vos_mem_set( pFrame, nBytes, 0 );
// Copy necessary info to BD
nSirStatus = limPopulateMacHeader( pMac,
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index 4e8be27..368726c 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -95,16 +95,15 @@
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pCFParams,
- sizeof( tUpdateCFParams )))
+ pCFParams = vos_mem_malloc(sizeof( tUpdateCFParams ));
+ if ( NULL == pCFParams )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory during Update CF Params" ));
+ FL( "Unable to allocate memory during Update CF Params" ));
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pCFParams, sizeof(tUpdateCFParams));
+ vos_mem_set( (tANI_U8 *) pCFParams, sizeof(tUpdateCFParams), 0);
pCFParams->cfpCount = cfpCount;
pCFParams->cfpPeriod = cfpPeriod;
pCFParams->bssIdx = bssIdx;
@@ -118,7 +117,7 @@
MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pCFParams);
+ vos_mem_free(pCFParams);
limLog( pMac, LOGP,
FL("Posting WDA_UPDATE_CF_IND to WDA failed, reason=%X"),
retCode );
@@ -156,14 +155,14 @@
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pBcnParams, sizeof(*pBcnParams)))
+ pBcnParams = vos_mem_malloc(sizeof(*pBcnParams));
+ if ( NULL == pBcnParams )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory during Update Beacon Params" ));
+ FL( "Unable to allocate memory during Update Beacon Params" ));
return eSIR_MEM_ALLOC_FAILED;
}
- palCopyMemory( pMac->hHdd, (tANI_U8 *) pBcnParams, pUpdatedBcnParams, sizeof(*pBcnParams));
+ vos_mem_copy((tANI_U8 *) pBcnParams, pUpdatedBcnParams, sizeof(*pBcnParams));
msgQ.type = WDA_UPDATE_BEACON_IND;
msgQ.reserved = 0;
msgQ.bodyptr = pBcnParams;
@@ -181,7 +180,7 @@
}
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pBcnParams);
+ vos_mem_free(pBcnParams);
limLog( pMac, LOGP,
FL("Posting WDA_UPDATE_BEACON_IND to WDA failed, reason=%X"),
retCode );
@@ -227,31 +226,30 @@
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
tpPESession pSessionEntry;
- if((pSessionEntry = peFindSessionBySessionId(pMac , peSessionId)) == NULL)
+ if((pSessionEntry = peFindSessionBySessionId(pMac, peSessionId)) == NULL)
{
limLog( pMac, LOGP,
FL( "Unable to get Session for session Id %d" ), peSessionId);
return eSIR_FAILURE;
}
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pChnlParams,
- sizeof( tSwitchChannelParams )))
- {
- limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory during Switch Channel Params" ));
+ pChnlParams = vos_mem_malloc(sizeof( tSwitchChannelParams ));
+ if ( NULL == pChnlParams )
+ {
+ limLog( pMac, LOGP,
+ FL( "Unable to allocate memory during Switch Channel Params" ));
retCode = eSIR_MEM_ALLOC_FAILED;
goto returnFailure;
- }
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pChnlParams, sizeof(tSwitchChannelParams));
+ }
+ vos_mem_set((tANI_U8 *) pChnlParams, sizeof(tSwitchChannelParams), 0);
pChnlParams->secondaryChannelOffset = secondaryChnlOffset;
pChnlParams->channelNumber= chnlNumber;
#if defined WLAN_FEATURE_VOWIFI
pChnlParams->maxTxPower = maxTxPower;
- palCopyMemory( pMac->hHdd, pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr, sizeof(tSirMacAddr) );
+ vos_mem_copy( pChnlParams->selfStaMacAddr, pSessionEntry->selfMacAddr, sizeof(tSirMacAddr) );
#else
pChnlParams->localPowerConstraint = localPwrConstraint;
#endif
- palCopyMemory( pMac->hHdd, pChnlParams->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr) );
+ vos_mem_copy( pChnlParams->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr) );
pChnlParams->peSessionId = peSessionId;
//we need to defer the message until we get the response back from WDA.
@@ -272,7 +270,7 @@
MTRACE(macTraceMsgTx(pMac, peSessionId, msgQ.type));
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pChnlParams);
+ vos_mem_free(pChnlParams);
limLog( pMac, LOGP,
FL("Posting WDA_CHNL_SWITCH_REQ to WDA failed, reason=%X"),
retCode );
@@ -307,12 +305,12 @@
tEdcaParams *pEdcaParams = NULL;
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pEdcaParams,
- sizeof(tEdcaParams)))
+
+ pEdcaParams = vos_mem_malloc(sizeof(tEdcaParams));
+ if ( NULL == pEdcaParams )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory during Update EDCA Params" ));
+ FL( "Unable to allocate memory during Update EDCA Params" ));
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
@@ -339,7 +337,7 @@
MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pEdcaParams);
+ vos_mem_free(pEdcaParams);
limLog( pMac, LOGP,
FL("Posting WDA_UPDATE_EDCA_PROFILE_IND to WDA failed, reason=%X"),
retCode );
@@ -470,16 +468,15 @@
tSirRetStatus retCode;
tpLinkStateParams pLinkStateParams = NULL;
// Allocate memory.
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pLinkStateParams,
- sizeof(tLinkStateParams)))
+ pLinkStateParams = vos_mem_malloc(sizeof(tLinkStateParams));
+ if ( NULL == pLinkStateParams )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory while sending Set Link State" ));
+ FL( "Unable to allocate memory while sending Set Link State" ));
retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
return retCode;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams));
+ vos_mem_set((tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
pLinkStateParams->callback = callback;
pLinkStateParams->callbackArg = callbackArg;
@@ -498,7 +495,7 @@
retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
if (retCode != eSIR_SUCCESS)
{
- palFreeMemory(pMac, (void*)pLinkStateParams);
+ vos_mem_free(pLinkStateParams);
limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x "), retCode);
}
return retCode;
@@ -511,16 +508,15 @@
tSirRetStatus retCode;
tpLinkStateParams pLinkStateParams = NULL;
// Allocate memory.
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pLinkStateParams,
- sizeof(tLinkStateParams)))
+ pLinkStateParams = vos_mem_malloc(sizeof(tLinkStateParams));
+ if ( NULL == pLinkStateParams )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory while sending Set Link State" ));
+ FL( "Unable to allocate memory while sending Set Link State" ));
retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
return retCode;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams));
+ vos_mem_set((tANI_U8 *) pLinkStateParams, sizeof(tLinkStateParams), 0);
pLinkStateParams->state = state;
/* Copy Mac address */
sirCopyMacAddr(pLinkStateParams->bssid,bssId);
@@ -544,7 +540,7 @@
retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
if (retCode != eSIR_SUCCESS)
{
- palFreeMemory(pMac, (void*)pLinkStateParams);
+ vos_mem_free(pLinkStateParams);
limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x "), retCode);
}
return retCode;
@@ -569,18 +565,18 @@
if (NULL == pMsgBuf)
return eSIR_FAILURE;
- palAllocateMemory(pMac->hHdd, (void **)&txPowerReq, sizeof(tSirSetTxPowerReq));
- if (NULL == txPowerReq)
+ txPowerReq = vos_mem_malloc(sizeof(tSirSetTxPowerReq));
+ if ( NULL == txPowerReq )
{
return eSIR_FAILURE;
}
- palCopyMemory(pMac->hHdd, txPowerReq, (tSirSetTxPowerReq *)pMsgBuf, sizeof(tSirSetTxPowerReq));
+ vos_mem_copy(txPowerReq, (tSirSetTxPowerReq *)pMsgBuf, sizeof(tSirSetTxPowerReq));
/* Found corresponding seesion to find BSS IDX */
psessionEntry = peFindSessionByBssid(pMac, txPowerReq->bssId, &sessionId);
if (NULL == psessionEntry)
{
- palFreeMemory(pMac->hHdd, (tANI_U8 *) txPowerReq);
+ vos_mem_free(txPowerReq);
limLog(pMac, LOGE, FL("Session does not exist for given BSSID"));
return eSIR_FAILURE;
}
@@ -598,7 +594,7 @@
if (eSIR_SUCCESS != retCode)
{
limLog(pMac, LOGP, FL("Posting WDA_SET_TX_POWER_REQ to WDA failed, reason=%X"), retCode);
- palFreeMemory(pMac->hHdd, (tANI_U8 *) txPowerReq);
+ vos_mem_free(txPowerReq);
return retCode;
}
@@ -628,7 +624,7 @@
limLog( pMac, LOGP, FL("Posting WDA_GET_TX_POWER_REQ to WDA failed, reason=%X"), retCode );
if (NULL != pTxPowerReq)
{
- palFreeMemory( pMac->hHdd, (tANI_U8 *) pTxPowerReq);
+ vos_mem_free(pTxPowerReq);
}
return retCode;
}
@@ -657,14 +653,14 @@
return retCode;
}
msgSize = sizeof(tBeaconFilterMsg) + sizeof(beaconFilterTable);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pBeaconFilterMsg, msgSize) )
+ pBeaconFilterMsg = vos_mem_malloc(msgSize);
+ if ( NULL == pBeaconFilterMsg )
{
limLog( pMac, LOGP, FL("Fail to allocate memory for beaconFiilterMsg "));
retCode = eSIR_MEM_ALLOC_FAILED;
return retCode;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pBeaconFilterMsg, msgSize);
+ vos_mem_set((tANI_U8 *) pBeaconFilterMsg, msgSize, 0);
// Fill in capability Info and mask
//TBD-RAJESH get the BSS capability from session.
//Don't send this message if no active Infra session is found.
@@ -697,7 +693,7 @@
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pBeaconFilterMsg);
+ vos_mem_free(pBeaconFilterMsg);
limLog( pMac, LOGP,
FL("Posting WDA_BEACON_FILTER_IND to WDA failed, reason=%X"),
retCode );
@@ -715,14 +711,14 @@
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMsgQ msgQ;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pVhtOpMode, sizeof(tUpdateVHTOpMode)))
+ pVhtOpMode = vos_mem_malloc(sizeof(tUpdateVHTOpMode));
+ if ( NULL == pVhtOpMode )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory during Update Op Mode" ));
+ FL( "Unable to allocate memory during Update Op Mode" ));
return eSIR_MEM_ALLOC_FAILED;
}
- palCopyMemory( pMac->hHdd, (tANI_U8 *)pVhtOpMode, pTempParam, sizeof(tUpdateVHTOpMode));
+ vos_mem_copy((tANI_U8 *)pVhtOpMode, pTempParam, sizeof(tUpdateVHTOpMode));
msgQ.type = WDA_UPDATE_OP_MODE;
msgQ.reserved = 0;
msgQ.bodyptr = pVhtOpMode;
@@ -739,7 +735,7 @@
}
if( eSIR_SUCCESS != (retCode = wdaPostCtrlMsg( pMac, &msgQ )))
{
- palFreeMemory(pMac->hHdd, pVhtOpMode);
+ vos_mem_free(pVhtOpMode);
limLog( pMac, LOGP,
FL("Posting WDA_UPDATE_OP_MODE to WDA failed, reason=%X"),
retCode );
@@ -765,27 +761,26 @@
tpSirTdlsLinkEstablishInd pTdlsLinkEstablish = NULL;
// Allocate memory.
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pTdlsLinkEstablish,
- sizeof(tSirTdlsLinkEstablishInd)))
+ pTdlsLinkEstablish = vos_mem_malloc(sizeof(tSirTdlsLinkEstablishInd));
+ if ( NULL == pTdlsLinkEstablish )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory while sending Tdls Link Establish " ));
+ FL( "Unable to allocate memory while sending Tdls Link Establish " ));
retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
return retCode;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pTdlsLinkEstablish, sizeof(tSirTdlsLinkEstablishInd));
+ vos_mem_set((tANI_U8 *) pTdlsLinkEstablish, sizeof(tSirTdlsLinkEstablishInd), 0);
pTdlsLinkEstablish->bIsResponder = !!bIsPeerResponder;
pTdlsLinkEstablish->linkIdenOffset = linkIdenOffset;
pTdlsLinkEstablish->ptiBufStatusOffset = ptiBufStatusOffset;
pTdlsLinkEstablish->ptiTemplateLen = ptiFrameLen;
/* Copy ptiFrame template */
- palCopyMemory( pMac->hHdd, pTdlsLinkEstablish->ptiTemplateBuf, ptiFrame, ptiFrameLen);
+ vos_mem_copy(pTdlsLinkEstablish->ptiTemplateBuf, ptiFrame, ptiFrameLen);
/* Copy extended capabilities */
- palCopyMemory( pMac->hHdd, (tANI_U8 *) pTdlsLinkEstablish->extCapability, extCapability, sizeof(pTdlsLinkEstablish->extCapability));
+ vos_mem_copy((tANI_U8 *) pTdlsLinkEstablish->extCapability, extCapability, sizeof(pTdlsLinkEstablish->extCapability));
msgQ.type = SIR_HAL_TDLS_LINK_ESTABLISH;
msgQ.reserved = 0;
@@ -797,7 +792,7 @@
retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
if (retCode != eSIR_SUCCESS)
{
- palFreeMemory(pMac, (void*)pTdlsLinkEstablish);
+ vos_mem_free(pTdlsLinkEstablish);
limLog(pMac, LOGP, FL("Posting tdls link establish %d failed, reason = %x "), retCode);
}
@@ -818,18 +813,17 @@
tpSirTdlsLinkTeardownInd pTdlsLinkTeardown = NULL;
// Allocate memory.
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **) &pTdlsLinkTeardown,
- sizeof(tSirTdlsLinkTeardownInd)))
+ pTdlsLinkTeardown = vos_mem_malloc(sizeof(tSirTdlsLinkTeardownInd));
+ if ( NULL == pTdlsLinkTeardown )
{
limLog( pMac, LOGP,
- FL( "Unable to PAL allocate memory while sending Tdls Link Teardown " ));
+ FL( "Unable to allocate memory while sending Tdls Link Teardown " ));
retCode = eSIR_SME_RESOURCES_UNAVAILABLE;
return retCode;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) pTdlsLinkTeardown, sizeof(tSirTdlsLinkTeardownInd));
+ vos_mem_set((tANI_U8 *) pTdlsLinkTeardown, sizeof(tSirTdlsLinkTeardownInd), 0);
pTdlsLinkTeardown->staId = staId;
@@ -843,7 +837,7 @@
retCode = (tANI_U32)wdaPostCtrlMsg(pMac, &msgQ);
if (retCode != eSIR_SUCCESS)
{
- palFreeMemory(pMac, (void*)pTdlsLinkTeardown);
+ vos_mem_free(pTdlsLinkTeardown);
limLog(pMac, LOGP, FL("Posting tdls link teardown %d failed, reason = %x "), retCode);
}
@@ -871,12 +865,11 @@
tSirMsgQ msgQ;
tSirWlanExcludeUnencryptParam * pExcludeUnencryptParam;
- if (eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
- (void **) &pExcludeUnencryptParam,
- sizeof(tSirWlanExcludeUnencryptParam)))
+ pExcludeUnencryptParam = vos_mem_malloc(sizeof(tSirWlanExcludeUnencryptParam));
+ if ( NULL == pExcludeUnencryptParam )
{
limLog(pMac, LOGP,
- FL( "Unable to PAL allocate memory during limSendExcludeUnencryptInd"));
+ FL( "Unable to allocate memory during limSendExcludeUnencryptInd"));
return eSIR_MEM_ALLOC_FAILED;
}
@@ -893,7 +886,7 @@
retCode = wdaPostCtrlMsg(pMac, &msgQ);
if (eSIR_SUCCESS != retCode)
{
- palFreeMemory(pMac->hHdd, pExcludeUnencryptParam);
+ vos_mem_free(pExcludeUnencryptParam);
limLog(pMac, LOGP,
FL("Posting WDA_EXCLUDE_UNENCRYPTED_IND to WDA failed, reason=%X"),
retCode);
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index d91c595..82ac7d8 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -109,11 +109,12 @@
FL("Sending message %s with reasonCode %s"),
limMsgStr(msgType), limResultCodeStr(resultCode));)
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, sizeof(tSirSmeRsp)))
+ pSirSmeRsp = vos_mem_malloc(sizeof(tSirSmeRsp));
+ if ( NULL == pSirSmeRsp )
{
/// Buffer not available. Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_*_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_*_RSP"));
return;
}
@@ -130,7 +131,7 @@
mmhMsg.type = msgType;
mmhMsg.bodyptr = pSirSmeRsp;
mmhMsg.bodyval = 0;
- MTRACE(macTraceMsgTx(pMac, smesessionId , mmhMsg.type));
+ MTRACE(macTraceMsgTx(pMac, smesessionId, mmhMsg.type));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
{
@@ -264,14 +265,15 @@
rspLen = sizeof(tSirSmeJoinRsp);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
+ pSirSmeJoinRsp = vos_mem_malloc(rspLen);
+ if ( NULL == pSirSmeJoinRsp )
{
/// Buffer not available. Log error
- limLog(pMac, LOGP, FL("call to palAllocateMemory failed for JOIN/REASSOC_RSP"));
+ limLog(pMac, LOGP, FL("call to AllocateMemory failed for JOIN/REASSOC_RSP"));
return;
}
- palZeroMemory(pMac, (tANI_U8*)pSirSmeJoinRsp, rspLen);
+ vos_mem_set((tANI_U8*)pSirSmeJoinRsp, rspLen, 0);
pSirSmeJoinRsp->beaconLength = 0;
@@ -290,17 +292,18 @@
psessionEntry->tspecLen +
#endif
sizeof(tSirSmeJoinRsp) - sizeof(tANI_U8) ;
-
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
+
+ pSirSmeJoinRsp = vos_mem_malloc(rspLen);
+ if ( NULL == pSirSmeJoinRsp )
{
/// Buffer not available. Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for JOIN/REASSOC_RSP"));
+ FL("call to AllocateMemory failed for JOIN/REASSOC_RSP"));
return;
}
- palZeroMemory(pMac, (tANI_U8*)pSirSmeJoinRsp, rspLen);
+ vos_mem_set((tANI_U8*)pSirSmeJoinRsp, rspLen, 0);
if (resultCode == eSIR_SME_SUCCESS)
{
@@ -334,8 +337,9 @@
if(psessionEntry->beacon != NULL)
{
pSirSmeJoinRsp->beaconLength = psessionEntry->bcnLen;
- palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames, psessionEntry->beacon, pSirSmeJoinRsp->beaconLength);
- palFreeMemory(pMac->hHdd, psessionEntry->beacon);
+ vos_mem_copy( pSirSmeJoinRsp->frames, psessionEntry->beacon,
+ pSirSmeJoinRsp->beaconLength);
+ vos_mem_free( psessionEntry->beacon);
psessionEntry->beacon = NULL;
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOG1(limLog(pMac, LOG1, FL("Beacon=%d"), psessionEntry->bcnLen);)
@@ -345,8 +349,9 @@
if(psessionEntry->assocReq != NULL)
{
pSirSmeJoinRsp->assocReqLength = psessionEntry->assocReqLen;
- palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen, psessionEntry->assocReq, pSirSmeJoinRsp->assocReqLength);
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen,
+ psessionEntry->assocReq, pSirSmeJoinRsp->assocReqLength);
+ vos_mem_free( psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOG1(limLog(pMac, LOG1, FL("AssocReq=%d"), psessionEntry->assocReqLen);)
@@ -355,16 +360,21 @@
if(psessionEntry->assocRsp != NULL)
{
pSirSmeJoinRsp->assocRspLength = psessionEntry->assocRspLen;
- palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen, psessionEntry->assocRsp, pSirSmeJoinRsp->assocRspLength);
- palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
+ vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen +
+ psessionEntry->assocReqLen,
+ psessionEntry->assocRsp,
+ pSirSmeJoinRsp->assocRspLength);
+ vos_mem_free( psessionEntry->assocRsp);
psessionEntry->assocRsp = NULL;
}
#ifdef WLAN_FEATURE_VOWIFI_11R
if(psessionEntry->ricData != NULL)
{
pSirSmeJoinRsp->parsedRicRspLen = psessionEntry->RICDataLen;
- palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen + psessionEntry->assocRspLen, psessionEntry->ricData, pSirSmeJoinRsp->parsedRicRspLen);
- palFreeMemory(pMac->hHdd, psessionEntry->ricData);
+ vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen +
+ psessionEntry->assocReqLen + psessionEntry->assocRspLen,
+ psessionEntry->ricData, pSirSmeJoinRsp->parsedRicRspLen);
+ vos_mem_free(psessionEntry->ricData);
psessionEntry->ricData = NULL;
PELOG1(limLog(pMac, LOG1, FL("RicLength=%d"), pSirSmeJoinRsp->parsedRicRspLen);)
}
@@ -373,8 +383,11 @@
if(psessionEntry->tspecIes != NULL)
{
pSirSmeJoinRsp->tspecIeLen = psessionEntry->tspecLen;
- palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen + psessionEntry->assocRspLen + psessionEntry->RICDataLen, psessionEntry->tspecIes, pSirSmeJoinRsp->tspecIeLen);
- palFreeMemory(pMac->hHdd, psessionEntry->tspecIes);
+ vos_mem_copy( pSirSmeJoinRsp->frames + psessionEntry->bcnLen +
+ psessionEntry->assocReqLen + psessionEntry->assocRspLen +
+ psessionEntry->RICDataLen,
+ psessionEntry->tspecIes, pSirSmeJoinRsp->tspecIeLen);
+ vos_mem_free(psessionEntry->tspecIes);
psessionEntry->tspecIes = NULL;
PELOG1(limLog(pMac, LOG1, FL("CCX-TspecLen=%d"), psessionEntry->tspecLen);)
}
@@ -389,19 +402,19 @@
if(psessionEntry->beacon != NULL)
{
- palFreeMemory(pMac->hHdd, psessionEntry->beacon);
+ vos_mem_free(psessionEntry->beacon);
psessionEntry->beacon = NULL;
}
if(psessionEntry->assocReq != NULL)
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocReq);
+ vos_mem_free( psessionEntry->assocReq);
psessionEntry->assocReq = NULL;
}
if(psessionEntry->assocRsp != NULL)
{
- palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
+ vos_mem_free( psessionEntry->assocRsp);
psessionEntry->assocRsp = NULL;
}
@@ -500,14 +513,14 @@
if(psessionEntry == NULL)
{
-
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, size))
+ pSirSmeRsp = vos_mem_malloc(size);
+ if ( NULL == pSirSmeRsp )
{
/// Buffer not available. Log error
- limLog(pMac, LOGP,FL("call to palAllocateMemory failed for eWNI_SME_START_BSS_RSP"));
+ limLog(pMac, LOGP,FL("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
return;
}
- palZeroMemory(pMac, (tANI_U8*)pSirSmeRsp, size);
+ vos_mem_set((tANI_U8*)pSirSmeRsp, size, 0);
}
else
@@ -518,15 +531,16 @@
//calculate the memory size to allocate
size += ieLen;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, size))
+ pSirSmeRsp = vos_mem_malloc(size);
+ if ( NULL == pSirSmeRsp )
{
/// Buffer not available. Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_START_BSS_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_START_BSS_RSP"));
return;
}
- palZeroMemory(pMac, (tANI_U8*)pSirSmeRsp, size);
+ vos_mem_set((tANI_U8*)pSirSmeRsp, size, 0);
size = sizeof(tSirSmeStartBssRsp);
if (resultCode == eSIR_SME_SUCCESS)
{
@@ -554,11 +568,11 @@
pSirSmeRsp->bssDescription.aniIndicator = 1;
curLen = pMac->sch.schObject.gSchBeaconOffsetBegin - ieOffset;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields,
+ vos_mem_copy( (tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields,
pMac->sch.schObject.gSchBeaconFrameBegin + ieOffset,
(tANI_U32)curLen);
- palCopyMemory( pMac->hHdd, ((tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields) + curLen,
+ vos_mem_copy( ((tANI_U8 *) &pSirSmeRsp->bssDescription.ieFields) + curLen,
pMac->sch.schObject.gSchBeaconFrameEnd,
(tANI_U32)pMac->sch.schObject.gSchBeaconOffsetEnd);
@@ -666,11 +680,12 @@
bssCount = 0;
msgLen = 0;
allocLength = LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED * LIM_SIZE_OF_EACH_BSS;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, allocLength))
+ pSirSmeScanRsp = vos_mem_malloc(allocLength);
+ if ( NULL == pSirSmeScanRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP"));
return;
}
@@ -706,11 +721,12 @@
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, allocLength))
+ pSirSmeScanRsp = vos_mem_malloc(allocLength);
+ if ( NULL == pSirSmeScanRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP"));
return;
}
msgLen = sizeof(tSirSmeScanRsp) -
@@ -726,9 +742,9 @@
msgLen, ptemp->bssDescription.length);)
pDesc->length
= ptemp->bssDescription.length;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pDesc->bssId,
- (tANI_U8 *) &ptemp->bssDescription.bssId,
- ptemp->bssDescription.length);
+ vos_mem_copy( (tANI_U8 *) &pDesc->bssId,
+ (tANI_U8 *) &ptemp->bssDescription.bssId,
+ ptemp->bssDescription.length);
PELOG2(limLog(pMac, LOG2, FL("BssId "));
limPrintMacAddr(pMac, ptemp->bssDescription.bssId, LOG2);)
@@ -745,7 +761,7 @@
limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId);
if (NULL != pSirSmeScanRsp)
{
- palFreeMemory( pMac->hHdd, pSirSmeScanRsp);
+ vos_mem_free( pSirSmeScanRsp);
pSirSmeScanRsp = NULL;
}
}
@@ -826,12 +842,12 @@
bssCount = 0;
msgLen = 0;
allocLength = LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED * LIM_SIZE_OF_EACH_BSS;
- if ( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **)&pSirSmeScanRsp, allocLength))
+ pSirSmeScanRsp = vos_mem_malloc(allocLength);
+ if ( NULL == pSirSmeScanRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
+ FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
return;
}
@@ -867,13 +883,12 @@
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
- if (eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
- (void **)&pSirSmeScanRsp,
- allocLength))
+ pSirSmeScanRsp = vos_mem_malloc(allocLength);
+ if ( NULL == pSirSmeScanRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
+ FL("call to AllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
return;
}
msgLen = sizeof(tSirSmeScanRsp) -
@@ -889,9 +904,9 @@
msgLen, ptemp->bssDescription.length);)
pDesc->length
= ptemp->bssDescription.length;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &pDesc->bssId,
- (tANI_U8 *) &ptemp->bssDescription.bssId,
- ptemp->bssDescription.length);
+ vos_mem_copy( (tANI_U8 *) &pDesc->bssId,
+ (tANI_U8 *) &ptemp->bssDescription.bssId,
+ ptemp->bssDescription.length);
PELOG2(limLog(pMac, LOG2, FL("BssId "));
limPrintMacAddr(pMac, ptemp->bssDescription.bssId, LOG2);)
@@ -908,7 +923,7 @@
limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId);
if (NULL != pSirSmeScanRsp)
{
- palFreeMemory( pMac->hHdd, pSirSmeScanRsp);
+ vos_mem_free( pSirSmeScanRsp);
pSirSmeScanRsp = NULL;
}
}
@@ -965,12 +980,13 @@
FL("limPostSmeScanRspMessage: send SME_SCAN_RSP (len %d, reasonCode %s). "),
length, limResultCodeStr(resultCode));)
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeScanRsp, length))
+ pSirSmeScanRsp = vos_mem_malloc(length);
+ if ( NULL == pSirSmeScanRsp )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_SCAN_RSP"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_SCAN_RSP"));
return;
}
- palZeroMemory(pMac->hHdd, (void*)pSirSmeScanRsp, length);
+ vos_mem_set((void*)pSirSmeScanRsp, length, 0);
pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
pSirSmeScanRsp->length = length;
@@ -1042,9 +1058,10 @@
msgLength = sizeof(tSirOemDataRsp);
//now allocate memory for the char buffer
- if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd, (void**)&pSirSmeOemDataRsp, msgLength))
+ pSirSmeOemDataRsp = vos_mem_malloc(msgLength);
+ if (NULL == pSirSmeOemDataRsp)
{
- limLog(pMac, LOGP, FL("call to palAllocateMemory failed for pSirSmeOemDataRsp"));
+ limLog(pMac, LOGP, FL("call to AllocateMemory failed for pSirSmeOemDataRsp"));
return;
}
@@ -1056,10 +1073,10 @@
pSirSmeOemDataRsp->messageType = eWNI_SME_OEM_DATA_RSP;
#endif
- palCopyMemory(pMac->hHdd, pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE);
+ vos_mem_copy(pSirSmeOemDataRsp->oemDataRsp, pMlmOemDataRsp->oemDataRsp, OEM_DATA_RSP_SIZE);
//Now free the memory from MLM Rsp Message
- palFreeMemory(pMac->hHdd, pMlmOemDataRsp);
+ vos_mem_free(pMlmOemDataRsp);
mmhMsg.type = eWNI_SME_OEM_DATA_RSP;
mmhMsg.bodyptr = pSirSmeOemDataRsp;
@@ -1109,12 +1126,12 @@
tSirMsgQ mmhMsg;
tSirSmeAuthRsp *pSirSmeAuthRsp;
-
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeAuthRsp, sizeof(tSirSmeAuthRsp)))
+ pSirSmeAuthRsp = vos_mem_malloc(sizeof(tSirSmeAuthRsp));
+ if (NULL == pSirSmeAuthRsp)
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_AUTH_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_AUTH_RSP"));
return;
}
@@ -1123,7 +1140,7 @@
if(psessionEntry != NULL)
{
- palCopyMemory( pMac->hHdd, (tANI_U8 *) pSirSmeAuthRsp->peerMacAddr,
+ vos_mem_copy( (tANI_U8 *) pSirSmeAuthRsp->peerMacAddr,
(tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
pSirSmeAuthRsp->authType = authType;
@@ -1216,11 +1233,12 @@
* host triggered disassociation
*/
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocRsp, sizeof(tSirSmeDisassocRsp)))
+ pSirSmeDisassocRsp = vos_mem_malloc(sizeof(tSirSmeDisassocRsp));
+ if ( NULL == pSirSmeDisassocRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_DISASSOC_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_DISASSOC_RSP"));
return;
}
@@ -1241,7 +1259,7 @@
pBuf += sizeof(tSirResultCodes);
//peerMacAddr
- palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
// Clear Station Stats
@@ -1250,6 +1268,7 @@
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+
limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_RSP_EVENT,
psessionEntry, (tANI_U16)reasonCode, 0);
#endif
@@ -1262,11 +1281,12 @@
* frame reception from peer entity or due to
* loss of link with peer entity.
*/
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocInd, sizeof(tSirSmeDisassocInd)))
+ pSirSmeDisassocInd = vos_mem_malloc(sizeof(tSirSmeDisassocInd));
+ if ( NULL == pSirSmeDisassocInd )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_DISASSOC_IND"));
+ FL("call to AllocateMemory failed for eWNI_SME_DISASSOC_IND"));
return;
}
@@ -1283,10 +1303,10 @@
limCopyU32(pBuf, reasonCode);
pBuf += sizeof(tSirResultCodes);
- palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
- palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
@@ -1328,9 +1348,10 @@
tSirMsgQ mmhMsg;
tSirSmeDisassocInd *pSirSmeDisassocInd;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDisassocInd, sizeof(tSirSmeDisassocInd)))
+ pSirSmeDisassocInd = vos_mem_malloc(sizeof(tSirSmeDisassocInd));
+ if ( NULL == pSirSmeDisassocInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_DISASSOC_IND"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DISASSOC_IND"));
return;
}
@@ -1341,13 +1362,13 @@
pSirSmeDisassocInd->transactionId = psessionEntry->transactionId;
pSirSmeDisassocInd->statusCode = pStaDs->mlmStaContext.disassocReason;
pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
-
- palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->bssId , psessionEntry->bssId , sizeof(tSirMacAddr));
-
- palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->peerMacAddr , pStaDs->staAddr, sizeof(tSirMacAddr));
+
+ vos_mem_copy( pSirSmeDisassocInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
+
+ vos_mem_copy( pSirSmeDisassocInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr));
pSirSmeDisassocInd->staId = pStaDs->staIndex;
-
+
mmhMsg.type = eWNI_SME_DISASSOC_IND;
mmhMsg.bodyptr = pSirSmeDisassocInd;
mmhMsg.bodyval = 0;
@@ -1380,9 +1401,10 @@
tSirMsgQ mmhMsg;
tSirSmeDeauthInd *pSirSmeDeauthInd;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthInd, sizeof(tSirSmeDeauthInd)))
+ pSirSmeDeauthInd = vos_mem_malloc(sizeof(tSirSmeDeauthInd));
+ if ( NULL == pSirSmeDeauthInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_DEAUTH_IND "));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_DEAUTH_IND "));
return;
}
@@ -1401,9 +1423,9 @@
pSirSmeDeauthInd->statusCode = (tSirResultCodes)pStaDs->mlmStaContext.disassocReason;
}
//BSSID
- palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
+ vos_mem_copy( pSirSmeDeauthInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
//peerMacAddr
- palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pSirSmeDeauthInd->peerMacAddr, pStaDs->staAddr, sizeof(tSirMacAddr));
pSirSmeDeauthInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
@@ -1448,9 +1470,10 @@
tSirMsgQ mmhMsg;
tSirTdlsDelStaInd *pSirTdlsDelStaInd;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirTdlsDelStaInd, sizeof(tSirTdlsDelStaInd)))
+ pSirTdlsDelStaInd = vos_mem_malloc(sizeof(tSirTdlsDelStaInd));
+ if ( NULL == pSirTdlsDelStaInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_TDLS_DEL_STA_IND "));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_TDLS_DEL_STA_IND "));
return;
}
@@ -1462,7 +1485,7 @@
pSirTdlsDelStaInd->sessionId = psessionEntry->smeSessionId;
//peerMacAddr
- palCopyMemory( pMac->hHdd, pSirTdlsDelStaInd->peerMac, pStaDs->staAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pSirTdlsDelStaInd->peerMac, pStaDs->staAddr, sizeof(tSirMacAddr));
//staId
limCopyU16((tANI_U8*)(&pSirTdlsDelStaInd->staId), (tANI_U16)pStaDs->staIndex);
@@ -1503,9 +1526,10 @@
tSirMsgQ mmhMsg;
tSirTdlsDelAllPeerInd *pSirTdlsDelAllPeerInd;
- if ( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirTdlsDelAllPeerInd, sizeof(tSirTdlsDelAllPeerInd)))
+ pSirTdlsDelAllPeerInd = vos_mem_malloc(sizeof(tSirTdlsDelAllPeerInd));
+ if ( NULL == pSirTdlsDelAllPeerInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_TDLS_DEL_ALL_PEER_IND"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_TDLS_DEL_ALL_PEER_IND"));
return;
}
@@ -1552,9 +1576,10 @@
tSirMsgQ mmhMsg;
tSirMgmtTxCompletionInd *pSirMgmtTxCompletionInd;
- if ( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirMgmtTxCompletionInd, sizeof(tSirMgmtTxCompletionInd)))
+ pSirMgmtTxCompletionInd = vos_mem_malloc(sizeof(tSirMgmtTxCompletionInd));
+ if ( NULL == pSirMgmtTxCompletionInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_MGMT_FRM_TX_COMPLETION_IND"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_MGMT_FRM_TX_COMPLETION_IND"));
return;
}
@@ -1627,11 +1652,12 @@
* Deauthentication response to host triggered
* deauthentication.
*/
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthRsp, sizeof(tSirSmeDeauthRsp)))
+ pSirSmeDeauthRsp = vos_mem_malloc(sizeof(tSirSmeDeauthRsp));
+ if ( NULL == pSirSmeDeauthRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_DEAUTH_RSP"));
+ FL("call to AllocateMemory failed for eWNI_SME_DEAUTH_RSP"));
return;
}
@@ -1643,7 +1669,7 @@
pSirSmeDeauthRsp->transactionId = smetransactionId;
pBuf = (tANI_U8 *) pSirSmeDeauthRsp->peerMacAddr;
- palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, peerMacAddr, sizeof(tSirMacAddr));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT,
@@ -1659,11 +1685,12 @@
* frame reception from peer entity or due to
* loss of link with peer entity.
*/
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeDeauthInd, sizeof(tSirSmeDeauthInd)))
+ pSirSmeDeauthInd = vos_mem_malloc(sizeof(tSirSmeDeauthInd));
+ if ( NULL == pSirSmeDeauthInd )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_DEAUTH_Ind"));
+ FL("call to AllocateMemory failed for eWNI_SME_DEAUTH_Ind"));
return;
}
@@ -1685,11 +1712,11 @@
pBuf += sizeof(tSirResultCodes);
//bssId
- palCopyMemory( pMac->hHdd, pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, psessionEntry->bssId, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
//peerMacAddr
- palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pSirSmeDeauthInd->peerMacAddr, peerMacAddr, sizeof(tSirMacAddr));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT,
@@ -1742,17 +1769,11 @@
{
tSirMsgQ mmhMsg;
tSirSmeWmStatusChangeNtf *pSirSmeWmStatusChangeNtf;
- eHalStatus status;
-
-
-
- status = palAllocateMemory( pMac->hHdd, (void **)&pSirSmeWmStatusChangeNtf,
- sizeof(tSirSmeWmStatusChangeNtf));
- if (status != eHAL_STATUS_SUCCESS)
+ pSirSmeWmStatusChangeNtf = vos_mem_malloc(sizeof(tSirSmeWmStatusChangeNtf));
+ if ( NULL == pSirSmeWmStatusChangeNtf )
{
limLog(pMac, LOGE,
- FL("call to palAllocateMemory failed for eWNI_SME_WM_STATUS_CHANGE_NTF, status = %d"),
- status);
+ FL("call to AllocateMemory failed for eWNI_SME_WM_STATUS_CHANGE_NTF"));
return;
}
@@ -1784,7 +1805,8 @@
pSirSmeWmStatusChangeNtf->sessionId = sessionId;
if(sizeof(pSirSmeWmStatusChangeNtf->statusChangeInfo) >= infoLen)
{
- palCopyMemory( pMac->hHdd, (tANI_U8 *)&pSirSmeWmStatusChangeNtf->statusChangeInfo, (tANI_U8 *)pStatusChangeInfo, infoLen);
+ vos_mem_copy( (tANI_U8 *)&pSirSmeWmStatusChangeNtf->statusChangeInfo,
+ (tANI_U8 *)pStatusChangeInfo, infoLen);
}
limLog(pMac, LOGE, FL("***---*** StatusChg: code 0x%x, length %d ***---***"),
statusChangeCode, infoLen);
@@ -1795,7 +1817,7 @@
MTRACE(macTraceMsgTx(pMac, sessionId, mmhMsg.type));
if (eSIR_SUCCESS != limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT))
{
- palFreeMemory(pMac->hHdd, (void *) pSirSmeWmStatusChangeNtf);
+ vos_mem_free(pSirSmeWmStatusChangeNtf);
limLog( pMac, LOGP, FL("limSysProcessMmhMsgApi failed"));
}
@@ -1839,11 +1861,12 @@
tSirMsgQ mmhMsg;
tSirSmeSetContextRsp *pSirSmeSetContextRsp;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeSetContextRsp, sizeof(tSirSmeSetContextRsp)))
+ pSirSmeSetContextRsp = vos_mem_malloc(sizeof(tSirSmeSetContextRsp));
+ if ( NULL == pSirSmeSetContextRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for SmeSetContextRsp"));
+ FL("call to AllocateMemory failed for SmeSetContextRsp"));
return;
}
@@ -1854,7 +1877,7 @@
pBuf = pSirSmeSetContextRsp->peerMacAddr;
- palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
@@ -1918,11 +1941,12 @@
tSirMsgQ mmhMsg;
tSirSmeRemoveKeyRsp *pSirSmeRemoveKeyRsp;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRemoveKeyRsp, sizeof(tSirSmeRemoveKeyRsp)))
+ pSirSmeRemoveKeyRsp = vos_mem_malloc(sizeof(tSirSmeRemoveKeyRsp));
+ if ( NULL == pSirSmeRemoveKeyRsp )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for SmeRemoveKeyRsp"));
+ FL("call to AllocateMemory failed for SmeRemoveKeyRsp"));
return;
}
@@ -1932,7 +1956,7 @@
if(psessionEntry != NULL)
{
pBuf = pSirSmeRemoveKeyRsp->peerMacAddr;
- palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_copy( pBuf, (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
pBuf += sizeof(tSirMacAddr);
limCopyU32(pBuf, resultCode);
}
@@ -1988,10 +2012,11 @@
tSirMsgQ mmhMsg;
tSirMbMsg *pMbMsg;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pMbMsg, sizeof(tSirMbMsg)))
+ pMbMsg = vos_mem_malloc(sizeof(tSirMbMsg));
+ if ( NULL == pMbMsg )
{
// Log error
- limLog(pMac, LOGP, FL("call to palAllocateMemory failed"));
+ limLog(pMac, LOGP, FL("call to AllocateMemory failed"));
return;
}
@@ -2068,11 +2093,12 @@
* and length of header itself
*/
val = pBssDescr->bssDescription.length + sizeof(tANI_U16) + sizeof(tANI_U32) + sizeof(tANI_U8);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pNewBssInd, val))
+ pNewBssInd = vos_mem_malloc(val);
+ if ( NULL == pNewBssInd )
{
// Log error
limLog(pMac, LOGP,
- FL("call to palAllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND"));
+ FL("call to AllocateMemory failed for eWNI_SME_NEIGHBOR_BSS_IND"));
return;
}
@@ -2081,7 +2107,7 @@
pNewBssInd->length = (tANI_U16) val;
pNewBssInd->sessionId = 0;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) pNewBssInd->bssDescription,
+ vos_mem_copy( (tANI_U8 *) pNewBssInd->bssDescription,
(tANI_U8 *) &pBssDescr->bssDescription,
pBssDescr->bssDescription.length + sizeof(tANI_U16));
@@ -2112,19 +2138,19 @@
if (! rspReqd)
return;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirAddtsRsp)))
+ rsp = vos_mem_malloc(sizeof(tSirAddtsRsp));
+ if ( NULL == rsp )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for ADDTS_RSP"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for ADDTS_RSP"));
return;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
+ vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_ADDTS_RSP;
rsp->rc = status;
rsp->rsp.status = (enum eSirMacStatusCodes) status;
- //palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec));
+ //vos_mem_copy( (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec));
rsp->rsp.tspec = tspec;
-
/* Update SME session Id and transcation Id */
rsp->sessionId = smesessionId;
rsp->transactionId = smetransactionId;
@@ -2159,17 +2185,18 @@
addts->tspec.tsinfo.traffic.tsid,
addts->tspec.tsinfo.traffic.userPrio);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirAddtsRsp)))
+ rsp = vos_mem_malloc(sizeof(tSirAddtsRsp));
+ if ( NULL == rsp )
{
// Log error
- limLog(pMac, LOGP, FL("palAllocateMemory failed for ADDTS_IND"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for ADDTS_IND"));
return;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
+ vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_ADDTS_IND;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) addts, sizeof(*addts));
+ vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) addts, sizeof(*addts));
mmhMsg.type = eWNI_SME_ADDTS_IND;
mmhMsg.bodyptr = rsp;
@@ -2192,20 +2219,21 @@
if (! delts->rspReqd)
return;
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirDeltsRsp)))
+ rsp = vos_mem_malloc(sizeof(tSirDeltsRsp));
+ if ( NULL == rsp )
{
// Log error
- limLog(pMac, LOGP, FL("palAllocateMemory failed for DELTS_RSP"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for DELTS_RSP"));
return;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
+ vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0);
if(psessionEntry != NULL)
{
rsp->aid = delts->aid;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->macAddr[0], (tANI_U8 *) &delts->macAddr[0], 6);
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) &delts->req, sizeof(tSirDeltsReqInfo));
+ vos_mem_copy( (tANI_U8 *) &rsp->macAddr[0], (tANI_U8 *) &delts->macAddr[0], 6);
+ vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) &delts->req, sizeof(tSirDeltsReqInfo));
}
@@ -2245,18 +2273,19 @@
delts->tsinfo.traffic.tsid,
delts->tsinfo.traffic.userPrio);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&rsp, sizeof(tSirDeltsRsp)))
+ rsp = vos_mem_malloc(sizeof(tSirDeltsRsp));
+ if ( NULL == rsp )
{
// Log error
- limLog(pMac, LOGP, FL("palAllocateMemory failed for DELTS_IND"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for DELTS_IND"));
return;
}
- palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
+ vos_mem_set( (tANI_U8 *) rsp, sizeof(*rsp), 0);
rsp->messageType = eWNI_SME_DELTS_IND;
rsp->rc = eSIR_SUCCESS;
rsp->aid = aid;
- palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) delts, sizeof(*delts));
+ vos_mem_copy( (tANI_U8 *) &rsp->rsp, (tANI_U8 *) delts, sizeof(*delts));
/* Update SME session Id and SME transaction Id */
@@ -2472,16 +2501,16 @@
tSirMsgQ mmhMsg;
tSmeIbssPeerInd *pNewPeerInd;
- if(eHAL_STATUS_SUCCESS !=
- palAllocateMemory(pMac->hHdd,(void * *) &pNewPeerInd,(sizeof(tSmeIbssPeerInd) + beaconLen)))
+ pNewPeerInd = vos_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen);
+ if ( NULL == pNewPeerInd )
{
PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
return;
}
- palZeroMemory(pMac->hHdd, (void *) pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen));
+ vos_mem_set((void *) pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen), 0);
- palCopyMemory( pMac->hHdd, (tANI_U8 *) pNewPeerInd->peerAddr,
+ vos_mem_copy( (tANI_U8 *) pNewPeerInd->peerAddr,
peerMacAddr, sizeof(tSirMacAddr));
pNewPeerInd->staId= staIndex;
pNewPeerInd->ucastSig = ucastIdx;
@@ -2492,7 +2521,8 @@
if ( beacon != NULL )
{
- palCopyMemory(pMac->hHdd, (void*) ((tANI_U8*)pNewPeerInd+sizeof(tSmeIbssPeerInd)), (void*)beacon, beaconLen);
+ vos_mem_copy((void*) ((tANI_U8*)pNewPeerInd+sizeof(tSmeIbssPeerInd)),
+ (void*)beacon, beaconLen);
}
mmhMsg.type = msgType;
@@ -2522,12 +2552,13 @@
tpSirSmeExitBmpsInd pExitBmpsInd;
msgLen = sizeof(tSirSmeExitBmpsInd);
- if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pExitBmpsInd, msgLen ))
+ pExitBmpsInd = vos_mem_malloc(msgLen);
+ if ( NULL == pExitBmpsInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for PMC_EXIT_BMPS_IND "));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for PMC_EXIT_BMPS_IND "));
return;
}
- palZeroMemory(pMac->hHdd, pExitBmpsInd, msgLen);
+ vos_mem_set(pExitBmpsInd, msgLen, 0);
pExitBmpsInd->mesgType = eWNI_PMC_EXIT_BMPS_IND;
pExitBmpsInd->mesgLen = msgLen;
@@ -2605,7 +2636,7 @@
mmhMsg.type = eWNI_SME_FT_AGGR_QOS_RSP;
mmhMsg.bodyptr = aggrQosRsp;
mmhMsg.bodyval = 0;
- MTRACE(macTraceMsgTx(pMac, smesessionId , mmhMsg.type));
+ MTRACE(macTraceMsgTx(pMac, smesessionId, mmhMsg.type));
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return;
@@ -2666,15 +2697,15 @@
tSirMsgQ mmhMsg;
tSmeMaxAssocInd *pSmeMaxAssocInd;
- if(eHAL_STATUS_SUCCESS !=
- palAllocateMemory(pMac->hHdd,(void **)&pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd)))
+ pSmeMaxAssocInd = vos_mem_malloc(sizeof(tSmeMaxAssocInd));
+ if ( NULL == pSmeMaxAssocInd )
{
PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
return;
}
- palZeroMemory(pMac->hHdd, (void *) pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd));
- palCopyMemory( pMac->hHdd, (tANI_U8 *)pSmeMaxAssocInd->peerMac,
- (tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr));
+ vos_mem_set((void *) pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd),0);
+ vos_mem_copy( (tANI_U8 *)pSmeMaxAssocInd->peerMac,
+ (tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr));
pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd);
pSmeMaxAssocInd->sessionId = smesessionId;
@@ -2708,11 +2739,10 @@
tSirMsgQ mmhMsg;
tSirSmeCandidateFoundInd *pSirSmeCandidateFoundInd;
- if ( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd,
- (void **)&pSirSmeCandidateFoundInd,
- sizeof(tSirSmeCandidateFoundInd)))
+ pSirSmeCandidateFoundInd = vos_mem_malloc(sizeof(tSirSmeCandidateFoundInd));
+ if ( NULL == pSirSmeCandidateFoundInd )
{
- limLog(pMac, LOGP, FL("palAllocateMemory failed for eWNI_SME_CANDIDATE_FOUND_IND\n"));
+ limLog(pMac, LOGP, FL("AllocateMemory failed for eWNI_SME_CANDIDATE_FOUND_IND\n"));
return;
}