summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ath6kl/miscdrv
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/ath6kl/miscdrv')
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kconfig.c22
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c22
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c28
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h5
4 files changed, 36 insertions, 41 deletions
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
index 4f18f43..5125edc 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
@@ -78,7 +78,7 @@ static int SendHCICommand(struct ar3k_config_info *pConfig,
} while (false);
if (pPacket != NULL) {
- A_FREE(pPacket);
+ kfree(pPacket);
}
return status;
@@ -116,7 +116,7 @@ static int RecvHCIEvent(struct ar3k_config_info *pConfig,
} while (false);
if (pRecvPacket != NULL) {
- A_FREE(pRecvPacket);
+ kfree(pRecvPacket);
}
return status;
@@ -203,7 +203,7 @@ int SendHCICommandWaitCommandComplete(struct ar3k_config_info *pConfig,
} while (false);
if (pBuffer != NULL) {
- A_FREE(pBuffer);
+ kfree(pBuffer);
}
return status;
@@ -268,7 +268,7 @@ static int AR3KConfigureHCIBaud(struct ar3k_config_info *pConfig)
} while (false);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
@@ -304,7 +304,7 @@ static int AR3KExitMinBoot(struct ar3k_config_info *pConfig)
}
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
@@ -328,7 +328,7 @@ static int AR3KConfigureSendHCIReset(struct ar3k_config_info *pConfig)
}
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
return status;
@@ -382,7 +382,7 @@ static int AR3KEnableTLPM(struct ar3k_config_info *pConfig)
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Config Failed! \n"));
@@ -397,7 +397,7 @@ static int AR3KEnableTLPM(struct ar3k_config_info *pConfig)
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Config Failed! \n"));
@@ -412,7 +412,7 @@ static int AR3KEnableTLPM(struct ar3k_config_info *pConfig)
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Enable Failed! \n"));
@@ -427,7 +427,7 @@ static int AR3KEnableTLPM(struct ar3k_config_info *pConfig)
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Enable Failed! \n"));
@@ -442,7 +442,7 @@ static int AR3KEnableTLPM(struct ar3k_config_info *pConfig)
&pEvent,
&pBufferToFree);
if (pBufferToFree != NULL) {
- A_FREE(pBufferToFree);
+ kfree(pBufferToFree);
}
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Sleep Enable Failed! \n"));
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
index 8393efe..282ceac 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
@@ -222,7 +222,7 @@ int PSSendOps(void *arg)
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);
}
@@ -256,7 +256,7 @@ int PSSendOps(void *arg)
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);
}
@@ -283,7 +283,7 @@ int PSSendOps(void *arg)
&bufferToFree) == 0) {
if(ReadPSEvent(event) == 0) { /* Exit if the status is success */
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
#ifndef HCI_TRANSPORT_SDIO
@@ -295,7 +295,7 @@ int PSSendOps(void *arg)
goto complete;
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
} else {
status = 0;
@@ -312,13 +312,13 @@ int PSSendOps(void *arg)
&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;
@@ -376,10 +376,10 @@ complete:
AthFreeCommandList(&HciCmdList,numCmds);
}
if(path) {
- A_FREE(path);
+ kfree(path);
}
if(config_path) {
- A_FREE(config_path);
+ kfree(config_path);
}
return status;
}
@@ -511,7 +511,7 @@ int write_bdaddr(struct ar3k_config_info *pConfig,u8 *bdaddr,int type)
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
@@ -527,7 +527,7 @@ int ReadVersionInfo(struct ar3k_config_info *pConfig)
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
}
@@ -564,7 +564,7 @@ int getDeviceType(struct ar3k_config_info *pConfig, u32 *code)
}
if(bufferToFree != NULL) {
- A_FREE(bufferToFree);
+ kfree(bufferToFree);
}
return result;
}
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
index 94a0939..c01c0cb 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
@@ -362,7 +362,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("error\n"));
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
@@ -401,7 +401,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
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;
}
@@ -422,7 +422,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
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;
}
@@ -433,7 +433,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
if (ByteCount > LINE_SIZE_MAX/2)
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
@@ -449,7 +449,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
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;
}
@@ -510,7 +510,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
{
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);
@@ -524,7 +524,7 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
default:
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
@@ -541,13 +541,13 @@ int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat)
{
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return A_ERROR;
}
if(Buffer != NULL) {
- A_FREE(Buffer);
+ kfree(Buffer);
}
return 0;
@@ -609,7 +609,7 @@ int AthDoParsePatch(u8 *patchbuffer, u32 patchlen)
/* 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;
}
@@ -812,13 +812,13 @@ int AthCreateCommandList(struct ps_cmd_packet **HciPacketList, u32 *numPackets)
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);
}
/*
@@ -962,8 +962,8 @@ int AthFreeCommandList(struct ps_cmd_packet **HciPacketList, u32 numPackets)
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;
}
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
index 9378efc..cd0a9e8 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
@@ -60,11 +60,6 @@
#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 */
OpenPOWER on IntegriCloud