Commit 391bb211 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: ath6kl: Remove A_FAILED macro

Remove obfuscating A_FAILED(foo) macro.
Just test for foo instead.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarVipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 509c9d97
...@@ -966,7 +966,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 ...@@ -966,7 +966,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32
A_UINT32 unalignedBytes = length & 0x3; A_UINT32 unalignedBytes = length & 0x3;
status = BMILZStreamStart (device, address); status = BMILZStreamStart (device, address);
if (A_FAILED(status)) { if (status) {
return A_ERROR; return A_ERROR;
} }
...@@ -977,7 +977,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 ...@@ -977,7 +977,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32
status = BMILZData(device, buffer, lastWordOffset); status = BMILZData(device, buffer, lastWordOffset);
if (A_FAILED(status)) { if (status) {
return A_ERROR; return A_ERROR;
} }
...@@ -990,7 +990,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 ...@@ -990,7 +990,7 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32
// Close compressed stream and open a new (fake) one. This serves mainly to flush Target caches. // Close compressed stream and open a new (fake) one. This serves mainly to flush Target caches.
// //
status = BMILZStreamStart (device, 0x00); status = BMILZStreamStart (device, 0x00);
if (A_FAILED(status)) { if (status) {
return A_ERROR; return A_ERROR;
} }
} }
......
...@@ -724,7 +724,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, ...@@ -724,7 +724,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
return A_ENOTSUP; return A_ENOTSUP;
} }
status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config); status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config);
if (A_FAILED(status)) { if (status) {
device->scatter_enabled = FALSE; device->scatter_enabled = FALSE;
} }
break; break;
......
...@@ -176,7 +176,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) ...@@ -176,7 +176,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("HIF-SCATTER: data error: %d \n",data.error)); AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("HIF-SCATTER: data error: %d \n",data.error));
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("HIF-SCATTER: FAILED!!! (%s) Address: 0x%X, Block mode (BlockLen: %d, BlockCount: %d)\n", AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("HIF-SCATTER: FAILED!!! (%s) Address: 0x%X, Block mode (BlockLen: %d, BlockCount: %d)\n",
(pReq->Request & HIF_WRITE) ? "WRITE":"READ",pReq->Address, data.blksz, data.blocks)); (pReq->Request & HIF_WRITE) ? "WRITE":"READ",pReq->Address, data.blksz, data.blocks));
} }
...@@ -265,7 +265,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) ...@@ -265,7 +265,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
} while (FALSE); } while (FALSE);
if (A_FAILED(status) && (request & HIF_ASYNCHRONOUS)) { if (status && (request & HIF_ASYNCHRONOUS)) {
pReq->CompletionStatus = status; pReq->CompletionStatus = status;
pReq->CompletionRoutine(pReq); pReq->CompletionRoutine(pReq);
status = A_OK; status = A_OK;
...@@ -348,7 +348,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO * ...@@ -348,7 +348,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
CleanupHIFScatterResources(device); CleanupHIFScatterResources(device);
} }
......
...@@ -96,7 +96,7 @@ int DevSetup(AR6K_DEVICE *pDev) ...@@ -96,7 +96,7 @@ int DevSetup(AR6K_DEVICE *pDev)
status = HIFAttachHTC(pDev->HIFDevice, &htcCallbacks); status = HIFAttachHTC(pDev->HIFDevice, &htcCallbacks);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -197,7 +197,7 @@ int DevSetup(AR6K_DEVICE *pDev) ...@@ -197,7 +197,7 @@ int DevSetup(AR6K_DEVICE *pDev)
status = DevDisableInterrupts(pDev); status = DevDisableInterrupts(pDev);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -205,7 +205,7 @@ int DevSetup(AR6K_DEVICE *pDev) ...@@ -205,7 +205,7 @@ int DevSetup(AR6K_DEVICE *pDev)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
if (pDev->HifAttached) { if (pDev->HifAttached) {
HIFDetachHTC(pDev->HIFDevice); HIFDetachHTC(pDev->HIFDevice);
pDev->HifAttached = FALSE; pDev->HifAttached = FALSE;
...@@ -343,7 +343,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke ...@@ -343,7 +343,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
(" Failed to disable receiver, status:%d \n", pPacket->Status)); (" Failed to disable receiver, status:%d \n", pPacket->Status));
} }
...@@ -393,7 +393,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, ...@@ -393,7 +393,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv,
} while (FALSE); } while (FALSE);
if (A_FAILED(status) && (pIOPacket != NULL)) { if (status && (pIOPacket != NULL)) {
AR6KFreeIOPacket(pDev,pIOPacket); AR6KFreeIOPacket(pDev,pIOPacket);
} }
...@@ -462,7 +462,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_ ...@@ -462,7 +462,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_
} while (FALSE); } while (FALSE);
if (A_FAILED(status) && (pIOPacket != NULL)) { if (status && (pIOPacket != NULL)) {
AR6KFreeIOPacket(pDev,pIOPacket); AR6KFreeIOPacket(pDev,pIOPacket);
} }
...@@ -510,7 +510,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec ...@@ -510,7 +510,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec
sizeof(A_UCHAR), sizeof(A_UCHAR),
HIF_RD_SYNC_BYTE_INC, HIF_RD_SYNC_BYTE_INC,
NULL); NULL);
if(A_FAILED(status)) if(status)
{ {
AR_DEBUG_PRINTF(ATH_LOG_ERR,("DevWaitForPendingRecv:Read HOST_INT_STATUS_ADDRESS Failed 0x%X\n",status)); AR_DEBUG_PRINTF(ATH_LOG_ERR,("DevWaitForPendingRecv:Read HOST_INT_STATUS_ADDRESS Failed 0x%X\n",status));
break; break;
...@@ -721,7 +721,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) ...@@ -721,7 +721,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
} while (FALSE); } while (FALSE);
if ((status != A_PENDING) && A_FAILED(status) && (request & HIF_ASYNCHRONOUS)) { if ((status != A_PENDING) && status && (request & HIF_ASYNCHRONOUS)) {
if (pIOPacket != NULL) { if (pIOPacket != NULL) {
AR6KFreeIOPacket(pDev,pIOPacket); AR6KFreeIOPacket(pDev,pIOPacket);
} }
...@@ -790,7 +790,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) ...@@ -790,7 +790,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
DevFreeScatterReq((HIF_DEVICE *)pDev,pReq); DevFreeScatterReq((HIF_DEVICE *)pDev,pReq);
} }
if (A_FAILED(status)) { if (status) {
DevCleanupVirtualScatterSupport(pDev); DevCleanupVirtualScatterSupport(pDev);
} else { } else {
pDev->HifScatterInfo.pAllocateReqFunc = DevAllocScatterReq; pDev->HifScatterInfo.pAllocateReqFunc = DevAllocScatterReq;
...@@ -825,7 +825,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) ...@@ -825,7 +825,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer)
&pDev->HifScatterInfo, &pDev->HifScatterInfo,
sizeof(pDev->HifScatterInfo)); sizeof(pDev->HifScatterInfo));
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_WARN, AR_DEBUG_PRINTF(ATH_DEBUG_WARN,
("AR6K: ** HIF layer does not support scatter requests (%d) \n",status)); ("AR6K: ** HIF layer does not support scatter requests (%d) \n",status));
...@@ -919,7 +919,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_B ...@@ -919,7 +919,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_B
status = DEV_PREPARE_SCATTER_OPERATION(pScatterReq); status = DEV_PREPARE_SCATTER_OPERATION(pScatterReq);
if (A_FAILED(status)) { if (status) {
if (Async) { if (Async) {
pScatterReq->CompletionStatus = status; pScatterReq->CompletionStatus = status;
pScatterReq->CompletionRoutine(pScatterReq); pScatterReq->CompletionRoutine(pScatterReq);
......
...@@ -85,7 +85,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, ...@@ -85,7 +85,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
status = pDev->GetPendingEventsFunc(pDev->HIFDevice, status = pDev->GetPendingEventsFunc(pDev->HIFDevice,
&events, &events,
NULL); NULL);
if (A_FAILED(status)) if (status)
{ {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get pending events \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get pending events \n"));
break; break;
...@@ -109,7 +109,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, ...@@ -109,7 +109,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
HIF_RD_SYNC_BYTE_INC, HIF_RD_SYNC_BYTE_INC,
NULL); NULL);
if (A_FAILED(status)){ if (status){
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to read register table \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to read register table \n"));
break; break;
} }
...@@ -310,7 +310,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -310,7 +310,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
do { do {
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
(" GetEvents I/O request failed, status:%d \n", pPacket->Status)); (" GetEvents I/O request failed, status:%d \n", pPacket->Status));
/* bail out, don't unmask HIF interrupt */ /* bail out, don't unmask HIF interrupt */
...@@ -501,7 +501,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -501,7 +501,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
&events, &events,
NULL); NULL);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -550,7 +550,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -550,7 +550,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
HIF_RD_SYNC_BYTE_INC, HIF_RD_SYNC_BYTE_INC,
NULL); NULL);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -597,7 +597,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -597,7 +597,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
do { do {
/* did the interrupt status fetches succeed? */ /* did the interrupt status fetches succeed? */
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -617,7 +617,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -617,7 +617,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
* completion routine of the callers read request. This can improve performance * completion routine of the callers read request. This can improve performance
* by reducing context switching when we rapidly pull packets */ * by reducing context switching when we rapidly pull packets */
status = pDev->MessagePendingCallback(pDev->HTCContext, &lookAhead, 1, pASyncProcessing, &fetched); status = pDev->MessagePendingCallback(pDev->HTCContext, &lookAhead, 1, pASyncProcessing, &fetched);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -637,7 +637,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -637,7 +637,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
if (HOST_INT_STATUS_CPU_GET(host_int_status)) { if (HOST_INT_STATUS_CPU_GET(host_int_status)) {
/* CPU Interrupt */ /* CPU Interrupt */
status = DevServiceCPUInterrupt(pDev); status = DevServiceCPUInterrupt(pDev);
if (A_FAILED(status)){ if (status){
break; break;
} }
} }
...@@ -645,7 +645,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -645,7 +645,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
if (HOST_INT_STATUS_ERROR_GET(host_int_status)) { if (HOST_INT_STATUS_ERROR_GET(host_int_status)) {
/* Error Interrupt */ /* Error Interrupt */
status = DevServiceErrorInterrupt(pDev); status = DevServiceErrorInterrupt(pDev);
if (A_FAILED(status)){ if (status){
break; break;
} }
} }
...@@ -653,7 +653,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr ...@@ -653,7 +653,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
if (HOST_INT_STATUS_COUNTER_GET(host_int_status)) { if (HOST_INT_STATUS_COUNTER_GET(host_int_status)) {
/* Counter Interrupt */ /* Counter Interrupt */
status = DevServiceCounterInterrupt(pDev); status = DevServiceCounterInterrupt(pDev);
if (A_FAILED(status)){ if (status){
break; break;
} }
} }
...@@ -697,7 +697,7 @@ int DevDsrHandler(void *context) ...@@ -697,7 +697,7 @@ int DevDsrHandler(void *context)
while (!done) { while (!done) {
status = ProcessPendingIRQs(pDev, &done, &asyncProc); status = ProcessPendingIRQs(pDev, &done, &asyncProc);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -763,7 +763,7 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev) ...@@ -763,7 +763,7 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev)
HIF_RD_SYNC_BYTE_INC, HIF_RD_SYNC_BYTE_INC,
NULL); NULL);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("DumpAR6KDevState : Failed to read register table (%d) \n",status)); ("DumpAR6KDevState : Failed to read register table (%d) \n",status));
return; return;
......
...@@ -65,7 +65,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -65,7 +65,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("IRQAction Operation (%d) failed! status:%d \n", pPacket->PktInfo.AsRx.HTCRxFlags,pPacket->Status)); ("IRQAction Operation (%d) failed! status:%d \n", pPacket->PktInfo.AsRx.HTCRxFlags,pPacket->Status));
} }
...@@ -137,7 +137,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE ...@@ -137,7 +137,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
NULL); NULL);
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
(" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status)); (" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status));
} else { } else {
...@@ -244,7 +244,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL ...@@ -244,7 +244,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
(" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status)); (" IRQAction Operation (%d) failed! status:%d \n", IrqAction, status));
} else { } else {
...@@ -285,7 +285,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) ...@@ -285,7 +285,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
status = DevGMboxIRQAction(pDev, GMBOX_DISABLE_ALL, PROC_IO_SYNC); status = DevGMboxIRQAction(pDev, GMBOX_DISABLE_ALL, PROC_IO_SYNC);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -305,13 +305,13 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) ...@@ -305,13 +305,13 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
HIF_WR_SYNC_BYTE_FIX, /* hit this register 4 times */ HIF_WR_SYNC_BYTE_FIX, /* hit this register 4 times */
NULL); NULL);
if (A_FAILED(status)) { if (status) {
break; break;
} }
status = GMboxProtocolInstall(pDev); status = GMboxProtocolInstall(pDev);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -348,7 +348,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) ...@@ -348,7 +348,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
status = A_ECOMM; status = A_ECOMM;
} }
if (A_FAILED(status)) { if (status) {
if (pDev->GMboxInfo.pTargetFailureCallback != NULL) { if (pDev->GMboxInfo.pTargetFailureCallback != NULL) {
pDev->GMboxInfo.pTargetFailureCallback(pDev->GMboxInfo.pProtocolContext, status); pDev->GMboxInfo.pTargetFailureCallback(pDev->GMboxInfo.pProtocolContext, status);
} }
...@@ -365,7 +365,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) ...@@ -365,7 +365,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
} }
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -378,7 +378,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) ...@@ -378,7 +378,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
/* do synchronous read */ /* do synchronous read */
status = DevGMboxReadCreditCounter(pDev, PROC_IO_SYNC, &credits); status = DevGMboxReadCreditCounter(pDev, PROC_IO_SYNC, &credits);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -522,7 +522,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -522,7 +522,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("Read Credit Operation failed! status:%d \n", pPacket->Status)); ("Read Credit Operation failed! status:%d \n", pPacket->Status));
} else { } else {
...@@ -583,7 +583,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits ...@@ -583,7 +583,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits
NULL); NULL);
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
(" DevGMboxReadCreditCounter failed! status:%d \n", status)); (" DevGMboxReadCreditCounter failed! status:%d \n", status));
} }
...@@ -659,7 +659,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int ...@@ -659,7 +659,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int
HIF_RD_SYNC_BYTE_INC, HIF_RD_SYNC_BYTE_INC,
NULL); NULL);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("DevGMboxRecvLookAheadPeek : Failed to read register table (%d) \n",status)); ("DevGMboxRecvLookAheadPeek : Failed to read register table (%d) \n",status));
break; break;
...@@ -701,7 +701,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) ...@@ -701,7 +701,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
HIF_WR_SYNC_BYTE_FIX, /* hit the register 4 times to align the I/O */ HIF_WR_SYNC_BYTE_FIX, /* hit the register 4 times to align the I/O */
NULL); NULL);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -718,7 +718,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) ...@@ -718,7 +718,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
HIF_RD_SYNC_BYTE_FIX, HIF_RD_SYNC_BYTE_FIX,
NULL); NULL);
if (A_FAILED(status)) { if (status) {
break; break;
} }
......
...@@ -140,7 +140,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) ...@@ -140,7 +140,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt)
status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits); status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -160,7 +160,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) ...@@ -160,7 +160,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt)
pProt->CreditsMax += credits; pProt->CreditsMax += credits;
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -174,7 +174,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) ...@@ -174,7 +174,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt)
/* now get the size */ /* now get the size */
status = DevGMboxReadCreditSize(pProt->pDev, &pProt->CreditSize); status = DevGMboxReadCreditSize(pProt->pDev, &pProt->CreditSize);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -353,7 +353,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V ...@@ -353,7 +353,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V
break; break;
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -426,7 +426,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V ...@@ -426,7 +426,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V
do { do {
if (A_FAILED(status) || (NULL == pPacket)) { if (status || (NULL == pPacket)) {
break; break;
} }
...@@ -438,7 +438,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V ...@@ -438,7 +438,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V
status = DevGMboxRead(pProt->pDev, pPacket, totalRecvLength); status = DevGMboxRead(pProt->pDev, pPacket, totalRecvLength);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -508,12 +508,12 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V ...@@ -508,12 +508,12 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V
} while (FALSE); } while (FALSE);
/* check if we need to disable the reciever */ /* check if we need to disable the reciever */
if (A_FAILED(status) || blockRecv) { if (status || blockRecv) {
DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC); DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_DISABLE, PROC_IO_SYNC);
} }
/* see if we need to recycle the recv buffer */ /* see if we need to recycle the recv buffer */
if (A_FAILED(status) && (pPacket != NULL)) { if (status && (pPacket != NULL)) {
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
if (A_EPROTO == status) { if (A_EPROTO == status) {
...@@ -537,7 +537,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) ...@@ -537,7 +537,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)Context; GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)Context;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket)); AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket));
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Send Packet (0x%lX) failed: %d , len:%d \n", AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Send Packet (0x%lX) failed: %d , len:%d \n",
(unsigned long)pPacket, pPacket->Status, pPacket->ActualLength)); (unsigned long)pPacket, pPacket->Status, pPacket->ActualLength));
} }
...@@ -556,7 +556,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) ...@@ -556,7 +556,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
while (TRUE) { while (TRUE) {
credits = 0; credits = 0;
status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits); status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits);
if (A_FAILED(status)) { if (status) {
break; break;
} }
LOCK_HCI_TX(pProt); LOCK_HCI_TX(pProt);
...@@ -676,7 +676,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S ...@@ -676,7 +676,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S
break; break;
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -706,7 +706,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S ...@@ -706,7 +706,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S
UNLOCK_HCI_TX(pProt); UNLOCK_HCI_TX(pProt);
status = SeekCreditsSynch(pProt); status = SeekCreditsSynch(pProt);
LOCK_HCI_TX(pProt); LOCK_HCI_TX(pProt);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* fall through and continue processing this send op */ /* fall through and continue processing this send op */
...@@ -784,7 +784,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S ...@@ -784,7 +784,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S
UNLOCK_HCI_TX(pProt); UNLOCK_HCI_TX(pProt);
} }
} else { } else {
if (A_FAILED(status) && (pPacket != NULL)) { if (status && (pPacket != NULL)) {
pPacket->Status = status; pPacket->Status = status;
DO_HCI_SEND_INDICATION(pProt,pPacket); DO_HCI_SEND_INDICATION(pProt,pPacket);
} }
...@@ -1052,7 +1052,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE ...@@ -1052,7 +1052,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
UNLOCK_HCI_RX(pProt); UNLOCK_HCI_RX(pProt);
if (A_FAILED(status)) { if (status) {
while (!HTC_QUEUE_EMPTY(pQueue)) { while (!HTC_QUEUE_EMPTY(pQueue)) {
pPacket = HTC_PACKET_DEQUEUE(pQueue); pPacket = HTC_PACKET_DEQUEUE(pQueue);
pPacket->Status = A_ECANCELED; pPacket->Status = A_ECANCELED;
...@@ -1116,25 +1116,25 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) ...@@ -1116,25 +1116,25 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans)
status = InitTxCreditState(pProt); status = InitTxCreditState(pProt);
if (A_FAILED(status)) { if (status) {
break; break;
} }
status = DevGMboxIRQAction(pProt->pDev, GMBOX_ERRORS_IRQ_ENABLE, PROC_IO_SYNC); status = DevGMboxIRQAction(pProt->pDev, GMBOX_ERRORS_IRQ_ENABLE, PROC_IO_SYNC);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* enable recv */ /* enable recv */
status = DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_ENABLE, PROC_IO_SYNC); status = DevGMboxIRQAction(pProt->pDev, GMBOX_RECV_IRQ_ENABLE, PROC_IO_SYNC);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* signal bridge side to power up BT */ /* signal bridge side to power up BT */
status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BT_ON, BTON_TIMEOUT_MS); status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BT_ON, BTON_TIMEOUT_MS);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI_TransportStart : Failed to trigger BT ON \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI_TransportStart : Failed to trigger BT ON \n"));
break; break;
} }
...@@ -1178,7 +1178,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, ...@@ -1178,7 +1178,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
bytes = sizeof(lookAhead); bytes = sizeof(lookAhead);
status = DevGMboxRecvLookAheadPeek(pProt->pDev,lookAhead,&bytes); status = DevGMboxRecvLookAheadPeek(pProt->pDev,lookAhead,&bytes);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1204,13 +1204,13 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, ...@@ -1204,13 +1204,13 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
break; break;
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
pPacket->Completion = NULL; pPacket->Completion = NULL;
status = DevGMboxRead(pProt->pDev,pPacket,totalRecvLength); status = DevGMboxRead(pProt->pDev,pPacket,totalRecvLength);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1272,7 +1272,7 @@ int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable) ...@@ -1272,7 +1272,7 @@ int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable)
status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_PWR_SAV_OFF, BTPWRSAV_TIMEOUT_MS); status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_PWR_SAV_OFF, BTPWRSAV_TIMEOUT_MS);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to enable/disable HCI power management!\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to enable/disable HCI power management!\n"));
} else { } else {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI power management enabled/disabled!\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI power management enabled/disabled!\n"));
......
...@@ -137,7 +137,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) ...@@ -137,7 +137,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
/* setup device layer */ /* setup device layer */
status = DevSetup(&target->Device); status = DevSetup(&target->Device);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -145,7 +145,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) ...@@ -145,7 +145,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
/* get the block sizes */ /* get the block sizes */
status = HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_MBOX_BLOCK_SIZE, status = HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_MBOX_BLOCK_SIZE,
blocksizes, sizeof(blocksizes)); blocksizes, sizeof(blocksizes));
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get block size info from HIF layer...\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to get block size info from HIF layer...\n"));
break; break;
} }
...@@ -165,7 +165,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) ...@@ -165,7 +165,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
} }
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -192,7 +192,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) ...@@ -192,7 +192,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
if (target != NULL) { if (target != NULL) {
HTCCleanup(target); HTCCleanup(target);
target = NULL; target = NULL;
...@@ -249,7 +249,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -249,7 +249,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
/* we should be getting 1 control message that the target is ready */ /* we should be getting 1 control message that the target is ready */
status = HTCWaitforControlMessage(target, &pPacket); status = HTCWaitforControlMessage(target, &pPacket);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" Target Not Available!!\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, (" Target Not Available!!\n"));
break; break;
} }
...@@ -305,7 +305,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -305,7 +305,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
/* limit what HTC can handle */ /* limit what HTC can handle */
target->MaxMsgPerBundle = min(HTC_HOST_MAX_MSG_PER_BUNDLE, target->MaxMsgPerBundle); target->MaxMsgPerBundle = min(HTC_HOST_MAX_MSG_PER_BUNDLE, target->MaxMsgPerBundle);
/* target supports message bundling, setup device layer */ /* target supports message bundling, setup device layer */
if (A_FAILED(DevSetupMsgBundling(&target->Device,target->MaxMsgPerBundle))) { if (DevSetupMsgBundling(&target->Device,target->MaxMsgPerBundle)) {
/* device layer can't handle bundling */ /* device layer can't handle bundling */
target->MaxMsgPerBundle = 0; target->MaxMsgPerBundle = 0;
} else { } else {
...@@ -351,7 +351,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -351,7 +351,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
&connect, &connect,
&resp); &resp);
if (!A_FAILED(status)) { if (!status) {
break; break;
} }
...@@ -419,14 +419,14 @@ int HTCStart(HTC_HANDLE HTCHandle) ...@@ -419,14 +419,14 @@ int HTCStart(HTC_HANDLE HTCHandle)
* target that the setup phase is complete */ * target that the setup phase is complete */
status = HTCSendSetupComplete(target); status = HTCSendSetupComplete(target);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* unmask interrupts */ /* unmask interrupts */
status = DevUnmaskInterrupts(&target->Device); status = DevUnmaskInterrupts(&target->Device);
if (A_FAILED(status)) { if (status) {
HTCStop(target); HTCStop(target);
} }
......
...@@ -204,7 +204,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, ...@@ -204,7 +204,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
break; break;
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -214,7 +214,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, ...@@ -214,7 +214,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
} }
#ifdef ATH_DEBUG_MODULE #ifdef ATH_DEBUG_MODULE
if (A_FAILED(status)) { if (status) {
DebugDumpBytes(pOrigBuffer,origLength,"BAD Recv Trailer"); DebugDumpBytes(pOrigBuffer,origLength,"BAD Recv Trailer");
} }
#endif #endif
...@@ -341,7 +341,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, ...@@ -341,7 +341,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
pNumLookAheads, pNumLookAheads,
pPacket->Endpoint); pPacket->Endpoint);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -365,7 +365,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, ...@@ -365,7 +365,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
/* dump the whole packet */ /* dump the whole packet */
#ifdef ATH_DEBUG_MODULE #ifdef ATH_DEBUG_MODULE
DebugDumpBytes(pBuf,pPacket->ActualLength < 256 ? pPacket->ActualLength : 256 ,"BAD HTC Recv PKT"); DebugDumpBytes(pBuf,pPacket->ActualLength < 256 ? pPacket->ActualLength : 256 ,"BAD HTC Recv PKT");
...@@ -537,7 +537,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -537,7 +537,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
do { do {
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCRecvCompleteHandler: request failed (status:%d, ep:%d) \n", AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HTCRecvCompleteHandler: request failed (status:%d, ep:%d) \n",
pPacket->Status, pPacket->Endpoint)); pPacket->Status, pPacket->Endpoint));
break; break;
...@@ -545,7 +545,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -545,7 +545,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
/* process the header for any trailer data */ /* process the header for any trailer data */
status = HTCProcessRecvHeader(target,pPacket,nextLookAheads,&numLookAheads); status = HTCProcessRecvHeader(target,pPacket,nextLookAheads,&numLookAheads);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -570,7 +570,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -570,7 +570,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("HTCRecvCompleteHandler , message fetch failed (status = %d) \n", ("HTCRecvCompleteHandler , message fetch failed (status = %d) \n",
status)); status));
...@@ -605,7 +605,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ...@@ -605,7 +605,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
&lookAhead, &lookAhead,
HTC_TARGET_RESPONSE_TIMEOUT); HTC_TARGET_RESPONSE_TIMEOUT);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -622,7 +622,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ...@@ -622,7 +622,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
break; break;
} }
if (A_FAILED(status)) { if (status) {
/* bad message */ /* bad message */
AR_DEBUG_ASSERT(FALSE); AR_DEBUG_ASSERT(FALSE);
status = A_EPROTO; status = A_EPROTO;
...@@ -653,7 +653,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ...@@ -653,7 +653,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
/* get the message from the device, this will block */ /* get the message from the device, this will block */
status = HTCIssueRecv(target, pPacket); status = HTCIssueRecv(target, pPacket);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -662,7 +662,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ...@@ -662,7 +662,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
pPacket->Status = status; pPacket->Status = status;
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("HTCWaitforControlMessage, HTCProcessRecvHeader failed (status = %d) \n", ("HTCWaitforControlMessage, HTCProcessRecvHeader failed (status = %d) \n",
status)); status));
...@@ -674,7 +674,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) ...@@ -674,7 +674,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
if (pPacket != NULL) { if (pPacket != NULL) {
/* cleanup buffer on error */ /* cleanup buffer on error */
HTC_FREE_CONTROL_RX(target,pPacket); HTC_FREE_CONTROL_RX(target,pPacket);
...@@ -856,7 +856,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, ...@@ -856,7 +856,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
pPacket->ActualLength = pHdr->PayloadLen + HTC_HDR_LENGTH; pPacket->ActualLength = pHdr->PayloadLen + HTC_HDR_LENGTH;
} }
if (A_FAILED(status)) { if (status) {
if (A_NO_RESOURCE == status) { if (A_NO_RESOURCE == status) {
/* this is actually okay */ /* this is actually okay */
status = A_OK; status = A_OK;
...@@ -868,7 +868,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, ...@@ -868,7 +868,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
UNLOCK_HTC_RX(target); UNLOCK_HTC_RX(target);
if (A_FAILED(status)) { if (status) {
while (!HTC_QUEUE_EMPTY(pQueue)) { while (!HTC_QUEUE_EMPTY(pQueue)) {
pPacket = HTC_PACKET_DEQUEUE(pQueue); pPacket = HTC_PACKET_DEQUEUE(pQueue);
/* recycle all allocated packets */ /* recycle all allocated packets */
...@@ -897,7 +897,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) ...@@ -897,7 +897,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
A_ASSERT(!IS_DEV_IRQ_PROC_SYNC_MODE(&target->Device)); A_ASSERT(!IS_DEV_IRQ_PROC_SYNC_MODE(&target->Device));
if (A_FAILED(pScatterReq->CompletionStatus)) { if (pScatterReq->CompletionStatus) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Recv Scatter Request Failed: %d \n",pScatterReq->CompletionStatus)); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Recv Scatter Request Failed: %d \n",pScatterReq->CompletionStatus));
} }
...@@ -1186,7 +1186,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1186,7 +1186,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
NumLookAheads, NumLookAheads,
pEndpoint, pEndpoint,
&recvPktQueue); &recvPktQueue);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1214,7 +1214,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1214,7 +1214,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
asyncProc ? NULL : &syncCompletedPktsQueue, asyncProc ? NULL : &syncCompletedPktsQueue,
&pktsFetched, &pktsFetched,
partialBundle); partialBundle);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1248,7 +1248,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1248,7 +1248,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
/* go fetch the packet */ /* go fetch the packet */
status = HTCIssueRecv(target, pPacket); status = HTCIssueRecv(target, pPacket);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1295,7 +1295,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1295,7 +1295,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
/* process header for each of the recv packets /* process header for each of the recv packets
* note: the lookahead of the last packet is useful for us to continue in this loop */ * note: the lookahead of the last packet is useful for us to continue in this loop */
status = HTCProcessRecvHeader(target,pPacket,lookAheads,&NumLookAheads); status = HTCProcessRecvHeader(target,pPacket,lookAheads,&NumLookAheads);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1317,7 +1317,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1317,7 +1317,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
DO_RCV_COMPLETION(pEndpoint,&container); DO_RCV_COMPLETION(pEndpoint,&container);
} }
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -1346,7 +1346,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu ...@@ -1346,7 +1346,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu
REF_IRQ_STATUS_RECHECK(&target->Device); REF_IRQ_STATUS_RECHECK(&target->Device);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("Failed to get pending recv messages (%d) \n",status)); ("Failed to get pending recv messages (%d) \n",status));
/* cleanup any packets we allocated but didn't use to actually fetch any packets */ /* cleanup any packets we allocated but didn't use to actually fetch any packets */
......
...@@ -81,7 +81,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoin ...@@ -81,7 +81,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoin
{ {
pPacket->Completion = NULL; pPacket->Completion = NULL;
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("CompleteSentPacket: request failed (status:%d, ep:%d, length:%d creds:%d) \n", ("CompleteSentPacket: request failed (status:%d, ep:%d, length:%d creds:%d) \n",
pPacket->Status, pPacket->Endpoint, pPacket->ActualLength, pPacket->PktInfo.AsTx.CreditsUsed)); pPacket->Status, pPacket->Endpoint, pPacket->ActualLength, pPacket->PktInfo.AsTx.CreditsUsed));
...@@ -280,7 +280,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq) ...@@ -280,7 +280,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
DEV_FINISH_SCATTER_OPERATION(pScatterReq); DEV_FINISH_SCATTER_OPERATION(pScatterReq);
if (A_FAILED(pScatterReq->CompletionStatus)) { if (pScatterReq->CompletionStatus) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Send Scatter Request Failed: %d \n",pScatterReq->CompletionStatus)); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("** Send Scatter Request Failed: %d \n",pScatterReq->CompletionStatus));
status = A_ERROR; status = A_ERROR;
} }
......
...@@ -184,14 +184,14 @@ int HTCConnectService(HTC_HANDLE HTCHandle, ...@@ -184,14 +184,14 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
HTC_PREPARE_SEND_PKT(pSendPacket,0,0,0); HTC_PREPARE_SEND_PKT(pSendPacket,0,0,0);
status = HTCIssueSend(target,pSendPacket); status = HTCIssueSend(target,pSendPacket);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* wait for response */ /* wait for response */
status = HTCWaitforControlMessage(target, &pRecvPacket); status = HTCWaitforControlMessage(target, &pRecvPacket);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* we controlled the buffer creation so it has to be properly aligned */ /* we controlled the buffer creation so it has to be properly aligned */
......
...@@ -73,8 +73,6 @@ ...@@ -73,8 +73,6 @@
#define A_PHY_ERROR 27 /* RX PHY error */ #define A_PHY_ERROR 27 /* RX PHY error */
#define A_CONSUMED 28 /* Object was consumed */ #define A_CONSUMED 28 /* Object was consumed */
#define A_FAILED(x) (!!x)
#ifndef TRUE #ifndef TRUE
#define TRUE 1 #define TRUE 1
#endif #endif
......
...@@ -107,7 +107,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, ...@@ -107,7 +107,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
status = HCI_TransportRecvHCIEventSync(pConfig->pHCIDev, status = HCI_TransportRecvHCIEventSync(pConfig->pHCIDev,
pRecvPacket, pRecvPacket,
HCI_EVENT_RESP_TIMEOUTMS); HCI_EVENT_RESP_TIMEOUTMS);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -158,7 +158,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, ...@@ -158,7 +158,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
status = SendHCICommand(pConfig, status = SendHCICommand(pConfig,
pBuffer + pConfig->pHCIProps->HeadRoom, pBuffer + pConfig->pHCIProps->HeadRoom,
CmdLength); CmdLength);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: Failed to send HCI Command (%d) \n", status)); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: Failed to send HCI Command (%d) \n", status));
AR_DEBUG_PRINTBUF(pHCICommand,CmdLength,"HCI Bridge Failed HCI Command"); AR_DEBUG_PRINTBUF(pHCICommand,CmdLength,"HCI Bridge Failed HCI Command");
break; break;
...@@ -167,7 +167,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, ...@@ -167,7 +167,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
/* reuse buffer to capture command complete event */ /* reuse buffer to capture command complete event */
A_MEMZERO(pBuffer,length); A_MEMZERO(pBuffer,length);
status = RecvHCIEvent(pConfig,pBuffer,&length); status = RecvHCIEvent(pConfig,pBuffer,&length);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: HCI event recv failed \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: HCI event recv failed \n"));
AR_DEBUG_PRINTBUF(pHCICommand,CmdLength,"HCI Bridge Failed HCI Command"); AR_DEBUG_PRINTBUF(pHCICommand,CmdLength,"HCI Bridge Failed HCI Command");
break; break;
...@@ -229,7 +229,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) ...@@ -229,7 +229,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
sizeof(hciBaudChangeCommand), sizeof(hciBaudChangeCommand),
&pEvent, &pEvent,
&pBufferToFree); &pBufferToFree);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: Baud rate change failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: Baud rate change failed! \n"));
break; break;
} }
...@@ -255,7 +255,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) ...@@ -255,7 +255,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
/* Tell target to change UART baud rate for AR6K */ /* Tell target to change UART baud rate for AR6K */
status = HCI_TransportSetBaudRate(pConfig->pHCIDev, pConfig->AR3KBaudRate); status = HCI_TransportSetBaudRate(pConfig->pHCIDev, pConfig->AR3KBaudRate);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("AR3K Config: failed to set scale and step values: %d \n", status)); ("AR3K Config: failed to set scale and step values: %d \n", status));
break; break;
...@@ -323,7 +323,7 @@ static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig) ...@@ -323,7 +323,7 @@ static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
&pEvent, &pEvent,
&pBufferToFree ); &pBufferToFree );
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: HCI reset failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR3K Config: HCI reset failed! \n"));
} }
...@@ -384,7 +384,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -384,7 +384,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
if (pBufferToFree != NULL) { if (pBufferToFree != NULL) {
A_FREE(pBufferToFree); A_FREE(pBufferToFree);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Config Failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Config Failed! \n"));
return status; return status;
} }
...@@ -399,7 +399,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -399,7 +399,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
if (pBufferToFree != NULL) { if (pBufferToFree != NULL) {
A_FREE(pBufferToFree); A_FREE(pBufferToFree);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Config Failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Config Failed! \n"));
return status; return status;
} }
...@@ -414,7 +414,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -414,7 +414,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
if (pBufferToFree != NULL) { if (pBufferToFree != NULL) {
A_FREE(pBufferToFree); A_FREE(pBufferToFree);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Enable Failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HostWakeup Enable Failed! \n"));
return status; return status;
} }
...@@ -429,7 +429,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -429,7 +429,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
if (pBufferToFree != NULL) { if (pBufferToFree != NULL) {
A_FREE(pBufferToFree); A_FREE(pBufferToFree);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Enable Failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Target Wakeup Enable Failed! \n"));
return status; return status;
} }
...@@ -444,7 +444,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig) ...@@ -444,7 +444,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
if (pBufferToFree != NULL) { if (pBufferToFree != NULL) {
A_FREE(pBufferToFree); A_FREE(pBufferToFree);
} }
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Sleep Enable Failed! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Sleep Enable Failed! \n"));
} }
...@@ -468,13 +468,13 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) ...@@ -468,13 +468,13 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
/* disable asynchronous recv while we issue commands and receive events synchronously */ /* disable asynchronous recv while we issue commands and receive events synchronously */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE); status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE);
if (A_FAILED(status)) { if (status) {
break; break;
} }
if (pConfig->Flags & AR3K_CONFIG_FLAG_FORCE_MINBOOT_EXIT) { if (pConfig->Flags & AR3K_CONFIG_FLAG_FORCE_MINBOOT_EXIT) {
status = AR3KExitMinBoot(pConfig); status = AR3KExitMinBoot(pConfig);
if (A_FAILED(status)) { if (status) {
break; break;
} }
} }
...@@ -491,7 +491,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) ...@@ -491,7 +491,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
if (pConfig->Flags & if (pConfig->Flags &
(AR3K_CONFIG_FLAG_SET_AR3K_BAUD | AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP)) { (AR3K_CONFIG_FLAG_SET_AR3K_BAUD | AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP)) {
status = AR3KConfigureHCIBaud(pConfig); status = AR3KConfigureHCIBaud(pConfig);
if (A_FAILED(status)) { if (status) {
break; break;
} }
} }
...@@ -508,7 +508,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) ...@@ -508,7 +508,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
/* re-enable asynchronous recv */ /* re-enable asynchronous recv */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE); status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -537,21 +537,21 @@ int AR3KConfigureExit(void *config) ...@@ -537,21 +537,21 @@ int AR3KConfigureExit(void *config)
/* disable asynchronous recv while we issue commands and receive events synchronously */ /* disable asynchronous recv while we issue commands and receive events synchronously */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE); status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE);
if (A_FAILED(status)) { if (status) {
break; break;
} }
if (pConfig->Flags & if (pConfig->Flags &
(AR3K_CONFIG_FLAG_SET_AR3K_BAUD | AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP)) { (AR3K_CONFIG_FLAG_SET_AR3K_BAUD | AR3K_CONFIG_FLAG_SET_AR6K_SCALE_STEP)) {
status = AR3KConfigureHCIBaud(pConfig); status = AR3KConfigureHCIBaud(pConfig);
if (A_FAILED(status)) { if (status) {
break; break;
} }
} }
/* re-enable asynchronous recv */ /* re-enable asynchronous recv */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE); status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE);
if (A_FAILED(status)) { if (status) {
break; break;
} }
......
...@@ -428,7 +428,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF ...@@ -428,7 +428,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF
status = ar6000_WriteRegDiag(hifDevice, &address, &data); status = ar6000_WriteRegDiag(hifDevice, &address, &data);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -458,7 +458,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF ...@@ -458,7 +458,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF
data = 0; data = 0;
status = ar6000_ReadRegDiag(hifDevice, &address, &data); status = ar6000_ReadRegDiag(hifDevice, &address, &data);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -472,7 +472,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF ...@@ -472,7 +472,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n")); AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
} }
...@@ -579,7 +579,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType) ...@@ -579,7 +579,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
/* read RAM location through diagnostic window */ /* read RAM location through diagnostic window */
status = ar6000_ReadRegDiag(hifDevice, &address, &regDumpArea); status = ar6000_ReadRegDiag(hifDevice, &address, &regDumpArea);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR6K: Failed to get ptr to register dump area \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR6K: Failed to get ptr to register dump area \n"));
break; break;
} }
...@@ -599,7 +599,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType) ...@@ -599,7 +599,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
(A_UCHAR *)&regDumpValues[0], (A_UCHAR *)&regDumpValues[0],
regDumpCount * (sizeof(A_UINT32))); regDumpCount * (sizeof(A_UINT32)));
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR6K: Failed to get register dump \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("AR6K: Failed to get register dump \n"));
break; break;
} }
...@@ -638,7 +638,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, ...@@ -638,7 +638,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
status = HIFConfigureDevice(hifDevice, HIF_DEVICE_GET_MBOX_BLOCK_SIZE, status = HIFConfigureDevice(hifDevice, HIF_DEVICE_GET_MBOX_BLOCK_SIZE,
blocksizes, sizeof(blocksizes)); blocksizes, sizeof(blocksizes));
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR,("Failed to get block size info from HIF layer...\n")); AR_DEBUG_PRINTF(ATH_LOG_ERR,("Failed to get block size info from HIF layer...\n"));
break; break;
} }
...@@ -658,7 +658,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, ...@@ -658,7 +658,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
(A_UCHAR *)&blocksizes[1], (A_UCHAR *)&blocksizes[1],
4); 4);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR,("BMIWriteMemory for IO block size failed \n")); AR_DEBUG_PRINTF(ATH_LOG_ERR,("BMIWriteMemory for IO block size failed \n"));
break; break;
} }
...@@ -673,7 +673,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice, ...@@ -673,7 +673,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
(A_UCHAR *)&MboxIsrYieldValue, (A_UCHAR *)&MboxIsrYieldValue,
4); 4);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR,("BMIWriteMemory for yield limit failed \n")); AR_DEBUG_PRINTF(ATH_LOG_ERR,("BMIWriteMemory for yield limit failed \n"));
break; break;
} }
...@@ -771,7 +771,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice) ...@@ -771,7 +771,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
address = 0x004ed4b0; /* REV1 target software ID is stored here */ address = 0x004ed4b0; /* REV1 target software ID is stored here */
status = ar6000_ReadRegDiag(hifDevice, &address, &data); status = ar6000_ReadRegDiag(hifDevice, &address, &data);
if (A_FAILED(status) || (data != AR6002_VERSION_REV1)) { if (status || (data != AR6002_VERSION_REV1)) {
return A_ERROR; /* Not AR6002 REV1 */ return A_ERROR; /* Not AR6002 REV1 */
} }
......
...@@ -866,7 +866,7 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar) ...@@ -866,7 +866,7 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar)
&ar->osDevInfo, &ar->osDevInfo,
sizeof(HIF_DEVICE_OS_DEVICE_INFO)); sizeof(HIF_DEVICE_OS_DEVICE_INFO));
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI: Failed to get OS device info from HIF\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI: Failed to get OS device info from HIF\n"));
return A_ERROR; return A_ERROR;
} }
...@@ -1536,18 +1536,16 @@ ar6000_configure_target(AR_SOFTC_T *ar) ...@@ -1536,18 +1536,16 @@ ar6000_configure_target(AR_SOFTC_T *ar)
/* since BMIInit is called in the driver layer, we have to set the block /* since BMIInit is called in the driver layer, we have to set the block
* size here for the target */ * size here for the target */
if (A_FAILED(ar6000_set_htc_params(ar->arHifDevice, if (ar6000_set_htc_params(ar->arHifDevice, ar->arTargetType,
ar->arTargetType, mbox_yield_limit, 0)) {
mbox_yield_limit, /* use default number of control buffers */
0 /* use default number of control buffers */
))) {
return A_ERROR; return A_ERROR;
} }
if (setupbtdev != 0) { if (setupbtdev != 0) {
if (A_FAILED(ar6000_set_hci_bridge_flags(ar->arHifDevice, if (ar6000_set_hci_bridge_flags(ar->arHifDevice,
ar->arTargetType, ar->arTargetType,
setupbtdev))) { setupbtdev)) {
return A_ERROR; return A_ERROR;
} }
} }
...@@ -1841,7 +1839,7 @@ ar6000_avail_ev(void *context, void *hif_handle) ...@@ -1841,7 +1839,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
(unsigned long)ar)); (unsigned long)ar));
avail_ev_failed : avail_ev_failed :
if (A_FAILED(init_status)) { if (init_status) {
if (bmienable) { if (bmienable) {
ar6000_sysfs_bmi_deinit(ar); ar6000_sysfs_bmi_deinit(ar);
} }
...@@ -2359,7 +2357,7 @@ static int ar6000_connectservice(AR_SOFTC_T *ar, ...@@ -2359,7 +2357,7 @@ static int ar6000_connectservice(AR_SOFTC_T *ar,
pConnect, pConnect,
&response); &response);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Failed to connect to %s service status:%d \n", AR_DEBUG_PRINTF(ATH_DEBUG_ERR,(" Failed to connect to %s service status:%d \n",
pDesc, status)); pDesc, status));
break; break;
...@@ -2502,7 +2500,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2502,7 +2500,7 @@ int ar6000_init(struct net_device *dev)
*/ */
status = HTCWaitTarget(ar->arHtcTarget); status = HTCWaitTarget(ar->arHtcTarget);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2533,7 +2531,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2533,7 +2531,7 @@ int ar6000_init(struct net_device *dev)
status = ar6000_connectservice(ar, status = ar6000_connectservice(ar,
&connect, &connect,
"WMI CONTROL"); "WMI CONTROL");
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2563,7 +2561,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2563,7 +2561,7 @@ int ar6000_init(struct net_device *dev)
status = ar6000_connectservice(ar, status = ar6000_connectservice(ar,
&connect, &connect,
"WMI DATA BE"); "WMI DATA BE");
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2573,7 +2571,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2573,7 +2571,7 @@ int ar6000_init(struct net_device *dev)
status = ar6000_connectservice(ar, status = ar6000_connectservice(ar,
&connect, &connect,
"WMI DATA BK"); "WMI DATA BK");
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2583,7 +2581,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2583,7 +2581,7 @@ int ar6000_init(struct net_device *dev)
status = ar6000_connectservice(ar, status = ar6000_connectservice(ar,
&connect, &connect,
"WMI DATA VI"); "WMI DATA VI");
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2596,7 +2594,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2596,7 +2594,7 @@ int ar6000_init(struct net_device *dev)
status = ar6000_connectservice(ar, status = ar6000_connectservice(ar,
&connect, &connect,
"WMI DATA VO"); "WMI DATA VO");
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -2636,7 +2634,7 @@ int ar6000_init(struct net_device *dev) ...@@ -2636,7 +2634,7 @@ int ar6000_init(struct net_device *dev)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
ret = -EIO; ret = -EIO;
goto ar6000_init_done; goto ar6000_init_done;
} }
...@@ -3455,7 +3453,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) ...@@ -3455,7 +3453,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue)
} }
} }
if (A_FAILED(status)) { if (status) {
if (status == A_ECANCELED) { if (status == A_ECANCELED) {
/* a packet was flushed */ /* a packet was flushed */
flushing = TRUE; flushing = TRUE;
......
...@@ -147,7 +147,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar, ...@@ -147,7 +147,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
&connect, &connect,
&response); &response);
if (A_FAILED(status)) { if (status) {
if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) { if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n"));
status = A_OK; status = A_OK;
...@@ -187,7 +187,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) ...@@ -187,7 +187,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
/* wait for target */ /* wait for target */
status = HTCWaitTarget(ar->arHtcTarget); status = HTCWaitTarget(ar->arHtcTarget);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTCWaitTarget failed (%d)\n", status)); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTCWaitTarget failed (%d)\n", status));
return -ENODEV; return -ENODEV;
} }
...@@ -206,7 +206,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) ...@@ -206,7 +206,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
/* try to connect to the raw service */ /* try to connect to the raw service */
status = ar6000_connect_raw_service(ar,streamID); status = ar6000_connect_raw_service(ar,streamID);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -245,7 +245,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) ...@@ -245,7 +245,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
arRaw->write_buffer_available[streamID] = TRUE; arRaw->write_buffer_available[streamID] = TRUE;
} }
if (A_FAILED(status)) { if (status) {
return -EIO; return -EIO;
} }
......
...@@ -304,7 +304,7 @@ static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) ...@@ -304,7 +304,7 @@ static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
bt_cleanup_hci_pal(pHciPalInfo); bt_cleanup_hci_pal(pHciPalInfo);
} }
return status; return status;
...@@ -423,7 +423,7 @@ int ar6k_setup_hci_pal(void *ar_p) ...@@ -423,7 +423,7 @@ int ar6k_setup_hci_pal(void *ar_p)
pHciPalInfo->ar = ar; pHciPalInfo->ar = ar;
status = bt_setup_hci_pal(pHciPalInfo); status = bt_setup_hci_pal(pHciPalInfo);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -437,7 +437,7 @@ int ar6k_setup_hci_pal(void *ar_p) ...@@ -437,7 +437,7 @@ int ar6k_setup_hci_pal(void *ar_p)
ar6k_pal_transport_ready(ar->hcipal_info); ar6k_pal_transport_ready(ar->hcipal_info);
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
ar6k_cleanup_hci_pal(ar); ar6k_cleanup_hci_pal(ar);
} }
return status; return status;
......
...@@ -248,7 +248,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, ...@@ -248,7 +248,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
/* start transport */ /* start transport */
status = HCI_TransportStart(pHcidevInfo->pHCIDev); status = HCI_TransportStart(pHcidevInfo->pHCIDev);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -304,14 +304,14 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, ...@@ -304,14 +304,14 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
/* configure the AR3K device */ /* configure the AR3K device */
memcpy(ar3kconfig.bdaddr,pHcidevInfo->ar->bdaddr,6); memcpy(ar3kconfig.bdaddr,pHcidevInfo->ar->bdaddr,6);
status = AR3KConfigure(&ar3kconfig); status = AR3KConfigure(&ar3kconfig);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* Make sure both AR6K and AR3K have power management enabled */ /* Make sure both AR6K and AR3K have power management enabled */
if (ar3kconfig.PwrMgmtEnabled) { if (ar3kconfig.PwrMgmtEnabled) {
status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, TRUE); status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, TRUE);
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to enable TLPM for AR6K! \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to enable TLPM for AR6K! \n"));
} }
} }
...@@ -354,7 +354,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) ...@@ -354,7 +354,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket)
A_ASSERT(osbuf != NULL); A_ASSERT(osbuf != NULL);
A_ASSERT(pHcidevInfo != NULL); A_ASSERT(pHcidevInfo != NULL);
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
if ((pPacket->Status != A_ECANCELED) && (pPacket->Status != A_NO_RESOURCE)) { if ((pPacket->Status != A_ECANCELED) && (pPacket->Status != A_NO_RESOURCE)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: Send Packet Failed: %d \n",pPacket->Status)); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: Send Packet Failed: %d \n",pPacket->Status));
} }
...@@ -376,7 +376,7 @@ static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) ...@@ -376,7 +376,7 @@ static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket)
do { do {
if (A_FAILED(pPacket->Status)) { if (pPacket->Status) {
break; break;
} }
...@@ -499,7 +499,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) ...@@ -499,7 +499,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
ar->exitCallback = AR3KConfigureExit; ar->exitCallback = AR3KConfigureExit;
status = bt_setup_hci(pHcidevInfo); status = bt_setup_hci(pHcidevInfo);
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -546,7 +546,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) ...@@ -546,7 +546,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
if (pHcidevInfo != NULL) { if (pHcidevInfo != NULL) {
if (NULL == pHcidevInfo->pHCIDev) { if (NULL == pHcidevInfo->pHCIDev) {
/* GMBOX may not be present in older chips */ /* GMBOX may not be present in older chips */
...@@ -877,7 +877,7 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) ...@@ -877,7 +877,7 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
sizeof(osDevInfo)); sizeof(osDevInfo));
#endif #endif
if (A_FAILED(status)) { if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to OS device info from HIF\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to OS device info from HIF\n"));
break; break;
} }
...@@ -906,7 +906,7 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) ...@@ -906,7 +906,7 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
} while (FALSE); } while (FALSE);
if (A_FAILED(status)) { if (status) {
bt_cleanup_hci(pHcidevInfo); bt_cleanup_hci(pHcidevInfo);
} }
......
...@@ -2203,7 +2203,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -2203,7 +2203,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
0, /* use default yield */ 0, /* use default yield */
0 /* use default number of HTC ctrl buffers */ 0 /* use default number of HTC ctrl buffers */
); );
if (A_FAILED(ret)) { if (ret) {
break; break;
} }
/* Terminate the BMI phase */ /* Terminate the BMI phase */
...@@ -4276,7 +4276,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -4276,7 +4276,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
break; break;
} }
if (A_FAILED(a_set_module_mask(moduleinfo.modulename, moduleinfo.mask))) { if (a_set_module_mask(moduleinfo.modulename, moduleinfo.mask)) {
ret = -EFAULT; ret = -EFAULT;
} }
...@@ -4291,7 +4291,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -4291,7 +4291,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
break; break;
} }
if (A_FAILED(a_get_module_mask(moduleinfo.modulename, &moduleinfo.mask))) { if (a_get_module_mask(moduleinfo.modulename, &moduleinfo.mask)) {
ret = -EFAULT; ret = -EFAULT;
break; break;
} }
......
...@@ -3144,7 +3144,7 @@ wmi_sync_point(struct wmi_t *wmip) ...@@ -3144,7 +3144,7 @@ wmi_sync_point(struct wmi_t *wmip)
/* if Buffer allocation for any of the dataSync fails, then do not /* if Buffer allocation for any of the dataSync fails, then do not
* send the Synchronize cmd on the control ep * send the Synchronize cmd on the control ep
*/ */
if (A_FAILED(status)) { if (status) {
break; break;
} }
...@@ -3155,7 +3155,7 @@ wmi_sync_point(struct wmi_t *wmip) ...@@ -3155,7 +3155,7 @@ wmi_sync_point(struct wmi_t *wmip)
status = wmi_cmd_send(wmip, cmd_osbuf, WMI_SYNCHRONIZE_CMDID, status = wmi_cmd_send(wmip, cmd_osbuf, WMI_SYNCHRONIZE_CMDID,
NO_SYNC_WMIFLAG); NO_SYNC_WMIFLAG);
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* cmd buffer sent, we no longer own it */ /* cmd buffer sent, we no longer own it */
...@@ -3170,7 +3170,7 @@ wmi_sync_point(struct wmi_t *wmip) ...@@ -3170,7 +3170,7 @@ wmi_sync_point(struct wmi_t *wmip)
trafficClass) trafficClass)
); );
if (A_FAILED(status)) { if (status) {
break; break;
} }
/* we don't own this buffer anymore, NULL it out of the array so it /* we don't own this buffer anymore, NULL it out of the array so it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment