BMICleanup(void)
{
if (pBMICmdCredits) {
- A_FREE(pBMICmdCredits);
+ kfree(pBMICmdCredits);
pBMICmdCredits = NULL;
}
if (pBMICmdBuf) {
- A_FREE(pBMICmdBuf);
+ kfree(pBMICmdBuf);
pBMICmdBuf = NULL;
}
}
}
if (pBMICmdCredits) {
- A_FREE(pBMICmdCredits);
+ kfree(pBMICmdCredits);
pBMICmdCredits = NULL;
}
if (pBMICmdBuf) {
- A_FREE(pBMICmdBuf);
+ kfree(pBMICmdBuf);
pBMICmdBuf = NULL;
}
(MAX_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item)));
if (NULL == pReqPriv->pHifScatterReq) {
- A_FREE(pReqPriv);
+ kfree(pReqPriv);
break;
}
/* just zero the main part of the scatter request */
/* allocate a bus request for this scatter request */
busrequest = hifAllocateBusRequest(device);
if (NULL == busrequest) {
- A_FREE(pReqPriv->pHifScatterReq);
- A_FREE(pReqPriv);
+ kfree(pReqPriv->pHifScatterReq);
+ kfree(pReqPriv);
break;
}
/* assign the scatter request to this bus request */
}
if (pReqPriv->pHifScatterReq != NULL) {
- A_FREE(pReqPriv->pHifScatterReq);
+ kfree(pReqPriv->pHifScatterReq);
pReqPriv->pHifScatterReq = NULL;
}
- A_FREE(pReqPriv);
+ kfree(pReqPriv);
}
}
if (NULL == pReq) {
break;
}
- A_FREE(pReq);
+ kfree(pReq);
}
}
A_MUTEX_DELETE(&pProtocol->HCIRxLock);
A_MUTEX_DELETE(&pProtocol->HCITxLock);
- A_FREE(pProtocol);
+ kfree(pProtocol);
}
static int InitTxCreditState(struct gmbox_proto_hci_uart *pProt)
for (i = 0;i < NUM_CONTROL_BUFFERS;i++) {
if (target->HTCControlBuffers[i].Buffer) {
- A_FREE(target->HTCControlBuffers[i].Buffer);
+ kfree(target->HTCControlBuffers[i].Buffer);
}
}
A_MUTEX_DELETE(&target->HTCTxLock);
}
/* free our instance */
- A_FREE(target);
+ kfree(target);
}
/* registered target arrival callback from the HIF layer */
} while (false);
if (pPacket != NULL) {
- A_FREE(pPacket);
+ kfree(pPacket);
}
return status;
} while (false);
if (pRecvPacket != NULL) {
- A_FREE(pRecvPacket);
+ kfree(pRecvPacket);
}
return status;
} while (false);
if (pBuffer != NULL) {
- A_FREE(pBuffer);
+ kfree(pBuffer);
}
return status;
} while (false);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
}
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
}
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Config Failed! \n"));
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Config Failed! \n"));
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Enable Failed! \n"));
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Enable Failed! \n"));
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Sleep Enable Failed! \n"));
A_RELEASE_FIRMWARE(firmware);
/* Parse the PS buffer to a global variable */
status = AthDoParsePS(buffer,len);
- A_FREE(buffer);
+ kfree(buffer);
} else {
A_RELEASE_FIRMWARE(firmware);
}
A_RELEASE_FIRMWARE(firmware);
/* parse and store the Patch file contents to a global variables */
status = AthDoParsePatch(buffer,len);
- A_FREE(buffer);
+ kfree(buffer);
} else {
A_RELEASE_FIRMWARE(firmware);
}
&bufferToFree) == 0) {
if(ReadPSEvent(event) == 0) { /* Exit if the status is success */
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
#ifndef HCI_TRANSPORT_SDIO
goto complete;
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
} else {
status = 0;
&bufferToFree) == 0) {
if(ReadPSEvent(event) != 0) { /* Exit if the status is success */
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
status = 1;
goto complete;
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
} else {
status = 0;
AthFreeCommandList(&HciCmdList,numCmds);
}
if(path) {
- A_FREE(path);
+ kfree(path);
}
if(config_path) {
- A_FREE(config_path);
+ kfree(config_path);
}
return status;
}
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
}
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
}
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("error\n"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if(uGetInputDataFormat(pCharLine, &stPS_DataFormat)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("uGetInputDataFormat fail\n"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if(uGetInputDataFormat(pCharLine, &stPS_DataFormat)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("uGetInputDataFormat fail \n"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if (ByteCount > LINE_SIZE_MAX/2)
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if(uGetInputDataFormat(pCharLine,&stPS_DataFormat)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("uGetInputDataFormat Fail\n"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("\n Buffer over flow PS File too big!!!"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
//Sleep (3000);
default:
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return 0;
/* Handle case when the number of patch buffer is more than the 20K */
if(MAX_NUM_PATCH_ENTRY == Patch_Count) {
for(i = 0; i < Patch_Count; i++) {
- A_FREE(RamPatch[i].Data);
+ kfree(RamPatch[i].Data);
}
return A_ERROR;
}
for(count = 0; count < Patch_Count; count++) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Freeing Patch Buffer %d \r\n",count));
- A_FREE(RamPatch[Patch_Count].Data);
+ kfree(RamPatch[Patch_Count].Data);
}
for(count = 0; count < Tag_Count; count++) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Freeing PS Buffer %d \r\n",count));
- A_FREE(PsTagEntry[count].TagData);
+ kfree(PsTagEntry[count].TagData);
}
/*
return A_ERROR;
}
for(i = 0; i < numPackets;i++) {
- A_FREE((*HciPacketList)[i].Hcipacket);
+ kfree((*HciPacketList)[i].Hcipacket);
}
- A_FREE(*HciPacketList);
+ kfree(*HciPacketList);
return 0;
}
#ifndef A_MALLOC
#define A_MALLOC(size) kmalloc((size),GFP_KERNEL)
#endif /* A_MALLOC */
-
-
-#ifndef A_FREE
-#define A_FREE(addr) kfree((addr))
-#endif /* A_MALLOC */
#endif /* HCI_TRANSPORT_UART */
/* String manipulation APIs */
}
source = "softmac file";
}
- A_FREE(macbuf);
+ kfree(macbuf);
}
A_RELEASE_FIRMWARE(softmac_entry);
}
#ifdef HTC_RAW_INTERFACE
if (ar->arRawHtc) {
- A_FREE(ar->arRawHtc);
+ kfree(ar->arRawHtc);
ar->arRawHtc = NULL;
}
#endif
memcpy(pmkcand->bssid.sa_data, info->bssid, ATH_MAC_LEN);
wrqu.data.length = sizeof(struct iw_pmkid_cand);
wireless_send_event(ar->arNetDev, IWEVPMKIDCAND, &wrqu, (char *)pmkcand);
- A_FREE(pmkcand);
+ kfree(pmkcand);
#else /* WIRELESS_EXT >= 18 */
snprintf(buf, sizeof(buf), "%s%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x",
tag,
A_MEMZERO(&wrqu, sizeof(wrqu));
wrqu.data.length = size;
wireless_send_event(ar->arNetDev, IWEVCUSTOM, &wrqu, buf);
- A_FREE(buf);
+ kfree(buf);
#endif
wrqu.data.length = size;
wireless_send_event(ar->arNetDev, IWEVGENIE, &wrqu, buf);
- A_FREE(buf);
+ kfree(buf);
#endif /* (WIRELESS_EXT >= 18) */
if (pHciPalInfo != NULL) {
bt_cleanup_hci_pal(pHciPalInfo);
- A_FREE(pHciPalInfo);
+ kfree(pHciPalInfo);
ar->hcipal_info = NULL;
}
}
ibss_channel, mgmt,
le16_to_cpu(size),
signal, GFP_KERNEL);
- A_FREE(ieeemgmtbuf);
+ kfree(ieeemgmtbuf);
cfg80211_put_bss(bss);
}
le16_to_cpu(size),
signal, GFP_KERNEL);
- A_FREE (ieeemgmtbuf);
+ kfree (ieeemgmtbuf);
}
static int
}
if (pHcidevInfo->pHTCStructAlloc != NULL) {
- A_FREE(pHcidevInfo->pHTCStructAlloc);
+ kfree(pHcidevInfo->pHTCStructAlloc);
pHcidevInfo->pHTCStructAlloc = NULL;
}
- A_FREE(pHcidevInfo);
+ kfree(pHcidevInfo);
#ifndef EXPORT_HCI_BRIDGE_INTERFACE
ar->hcidev_info = NULL;
#endif
#define A_MEMZERO(addr, len) memset(addr, 0, len)
#define A_MALLOC(size) kmalloc((size), GFP_KERNEL)
#define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC)
-#define A_FREE(addr) kfree(addr)
#if defined(ANDROID_ENV) && defined(CONFIG_ANDROID_LOGGER)
extern unsigned int enablelogcat;
#define A_MEMZERO(addr, len) memset((addr), 0, (len))
#define A_MALLOC(size) malloc(size)
-#define A_FREE(addr) free(addr)
#ifdef ANDROID
#ifndef err
if (copy_to_user(rq->ifr_data, buffer, length)) {
ret = -EFAULT;
}
- A_FREE(buffer);
+ kfree(buffer);
} else {
ret = -ENOMEM;
}
} else {
ret = BMIWriteMemory(hifDevice, address, buffer, length);
}
- A_FREE(buffer);
+ kfree(buffer);
} else {
ret = -ENOMEM;
}
} else {
ret = BMILZData(hifDevice, buffer, length);
}
- A_FREE(buffer);
+ kfree(buffer);
} else {
ret = -ENOMEM;
}
ret = BMIrompatchDeactivate(hifDevice, rompatch_count, (u32 *)buffer);
}
}
- A_FREE(buffer);
+ kfree(buffer);
} else {
ret = -ENOMEM;
}
rxtid->hold_q_sz = 0;
if(rxtid->hold_q) {
- A_FREE(rxtid->hold_q);
+ kfree(rxtid->hold_q);
rxtid->hold_q = NULL;
}
A_NETBUF_FREE(rxtid->hold_q[k].osbuf);
}
}
- A_FREE(rxtid->hold_q);
+ kfree(rxtid->hold_q);
}
/* Free the dispatch q contents*/
while(A_NETBUF_QUEUE_SIZE(&rxtid->q)) {
while(A_NETBUF_QUEUE_SIZE(&p_aggr->freeQ)) {
A_NETBUF_FREE(A_NETBUF_DEQUEUE(&p_aggr->freeQ));
}
- A_FREE(p_aggr);
+ kfree(p_aggr);
}
A_PRINTF("out aggr_module_destroy\n");
}
{
ni->ni_buf = A_MALLOC_NOWAIT(wh_size);
if (ni->ni_buf == NULL) {
- A_FREE(ni);
+ kfree(ni);
ni = NULL;
return ni;
}
wlan_node_free(bss_t *ni)
{
if (ni->ni_buf != NULL) {
- A_FREE(ni->ni_buf);
+ kfree(ni->ni_buf);
}
- A_FREE(ni);
+ kfree(ni);
}
void
A_MUTEX_DELETE(&wmip->wmi_lock);
#endif
}
- A_FREE(wmip);
+ kfree(wmip);
}
}
ar6000_scan_indication (wmip->wmi_devt, pAr6kScanIndEvent, size);
- A_FREE(pAr6kScanIndEvent);
+ kfree(pAr6kScanIndEvent);
}
#endif