Commit 4f69cef0 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: ath6kl: Remove #define A_OK

Just use 0.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a1d46529
......@@ -113,7 +113,7 @@ BMIDone(HIF_DEVICE *device)
if (bmiDone) {
AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
return A_OK;
return 0;
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
......@@ -138,7 +138,7 @@ BMIDone(HIF_DEVICE *device)
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -197,7 +197,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n",
targ_info->target_ver, targ_info->target_type));
return A_OK;
return 0;
}
int
......@@ -253,7 +253,7 @@ BMIReadMemory(HIF_DEVICE *device,
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -318,7 +318,7 @@ BMIWriteMemory(HIF_DEVICE *device,
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -366,7 +366,7 @@ BMIExecute(HIF_DEVICE *device,
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param));
return A_OK;
return 0;
}
int
......@@ -403,7 +403,7 @@ BMISetAppStart(HIF_DEVICE *device,
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -449,7 +449,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param));
return A_OK;
return 0;
}
int
......@@ -489,7 +489,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -545,7 +545,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id));
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id));
return A_OK;
return 0;
}
int
......@@ -582,7 +582,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id));
return A_OK;
return 0;
}
static int
......@@ -626,7 +626,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -692,7 +692,7 @@ BMILZData(HIF_DEVICE *device,
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n"));
return A_OK;
return 0;
}
int
......@@ -729,7 +729,7 @@ BMILZStreamStart(HIF_DEVICE *device,
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n"));
return A_OK;
return 0;
}
/* BMI Access routines */
......@@ -954,7 +954,7 @@ bmiBufferReceive(HIF_DEVICE *device,
return A_ERROR;
}
return A_OK;
return 0;
}
int
......
......@@ -148,7 +148,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
return A_ERROR;
}
return A_OK;
return 0;
}
......@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
void *context)
{
u8 opcode;
int status = A_OK;
int status = 0;
int ret;
u8 *tbuffer;
bool bounced = false;
......@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
u32 request,
void *context)
{
int status = A_OK;
int status = 0;
BUS_REQUEST *busrequest;
......@@ -644,13 +644,13 @@ int ReinitSDIO(HIF_DEVICE *device)
sdio_release_host(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));
return (err) ? A_ERROR : A_OK;
return (err) ? A_ERROR : 0;
}
int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{
int status = A_OK;
int status = 0;
#if defined(CONFIG_PM)
struct sdio_func *func = device->func;
int old_reset_val;
......@@ -678,7 +678,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
if (device->powerConfig == HIF_DEVICE_POWER_CUT) {
status = ReinitSDIO(device);
}
if (status == A_OK) {
if (status == 0) {
status = hifEnableFunc(device, func);
}
break;
......@@ -695,7 +695,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen)
{
u32 count;
int status = A_OK;
int status = 0;
switch(opcode) {
case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
......@@ -785,7 +785,7 @@ hifIRQHandler(struct sdio_func *func)
status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context);
sdio_claim_host(device->func);
atomic_set(&device->irqHandling, 0);
AR_DEBUG_ASSERT(status == A_OK || status == A_ECANCELED);
AR_DEBUG_ASSERT(status == 0 || status == A_ECANCELED);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n"));
}
......@@ -797,7 +797,7 @@ static int startup_task(void *param)
device = (HIF_DEVICE *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
/* start up inform DRV layer */
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != A_OK) {
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
}
return 0;
......@@ -814,7 +814,7 @@ static int enable_task(void *param)
if (device &&
device->claimedContext &&
osdrvCallbacks.devicePowerChangeHandler &&
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != A_OK)
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != 0)
{
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
}
......@@ -952,7 +952,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
{
int ret;
int status = A_OK;
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
device = getHifDevice(func);
......@@ -988,7 +988,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
sdio_release_host(device->func);
if (status == A_OK) {
if (status == 0) {
device->is_disabled = true;
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
......@@ -1001,7 +1001,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
struct task_struct* pTask;
const char *taskName = NULL;
int (*taskFunc)(void *) = NULL;
int ret = A_OK;
int ret = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
device = getHifDevice(func);
......@@ -1055,7 +1055,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
if (!device->claimedContext) {
taskFunc = startup_task;
taskName = "AR6K startup";
ret = A_OK;
ret = 0;
#if defined(CONFIG_PM)
} else {
taskFunc = enable_task;
......@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
static int hifDeviceSuspend(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = A_OK;
int status = 0;
HIF_DEVICE *device;
device = getHifDevice(func);
......@@ -1095,7 +1095,7 @@ static int hifDeviceSuspend(struct device *dev)
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));
switch (status) {
case A_OK:
case 0:
return 0;
case A_EBUSY:
return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */
......@@ -1107,14 +1107,14 @@ static int hifDeviceSuspend(struct device *dev)
static int hifDeviceResume(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = A_OK;
int status = 0;
HIF_DEVICE *device;
device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
if (status == A_OK) {
if (status == 0) {
device->is_suspend = false;
}
}
......@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)
static void hifDeviceRemoved(struct sdio_func *func)
{
int status = A_OK;
int status = 0;
HIF_DEVICE *device;
AR_DEBUG_ASSERT(func != NULL);
......@@ -1144,7 +1144,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
CleanupHIFScatterResources(device);
delHifDevice(device);
AR_DEBUG_ASSERT(status == A_OK);
AR_DEBUG_ASSERT(status == 0);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
}
......@@ -1155,7 +1155,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
{
s32 cnt = 10;
u8 host_int_status;
int status = A_OK;
int status = 0;
do {
while (atomic_read(&device->irqHandling)) {
......@@ -1178,7 +1178,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__));
}
return A_OK;
return 0;
}
......@@ -1240,7 +1240,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
return A_ERROR;
}
device->htcCallbacks = *callbacks;
return A_OK;
return 0;
}
void HIFDetachHTC(HIF_DEVICE *device)
......
......@@ -89,7 +89,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
struct mmc_data data;
HIF_SCATTER_REQ_PRIV *pReqPriv;
HIF_SCATTER_REQ *pReq;
int status = A_OK;
int status = 0;
struct scatterlist *pSg;
pReqPriv = busrequest->pScatterReq;
......@@ -260,7 +260,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest));
/* wake thread, it will process and then take care of the async callback */
up(&device->sem_async);
status = A_OK;
status = 0;
}
} while (false);
......@@ -268,7 +268,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
if (status && (request & HIF_ASYNCHRONOUS)) {
pReq->CompletionStatus = status;
pReq->CompletionRoutine(pReq);
status = A_OK;
status = 0;
}
return status;
......@@ -344,7 +344,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ;
pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE;
status = A_OK;
status = 0;
} while (false);
......
......@@ -77,7 +77,7 @@ void DevCleanup(AR6K_DEVICE *pDev)
int DevSetup(AR6K_DEVICE *pDev)
{
u32 blocksizes[AR6K_MAILBOXES];
int status = A_OK;
int status = 0;
int i;
HTC_CALLBACKS htcCallbacks;
......@@ -309,7 +309,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
* and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets.
* The AR6K interrupt enables reset back to an "enabled" state when this happens.
* */
int IntStatus = A_OK;
int IntStatus = 0;
DevDisableInterrupts(pDev);
#ifdef THREAD_X
......@@ -357,7 +357,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
* disable recv events */
static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
......@@ -405,7 +405,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo
* the host I/F */
static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket = NULL;
AR6K_IRQ_ENABLE_REGISTERS regs;
......@@ -490,7 +490,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending)
{
int status = A_OK;
int status = 0;
A_UCHAR host_int_status = 0x0;
u32 counter = 0x0;
......@@ -519,7 +519,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin
host_int_status = !status ? (host_int_status & (1 << 0)):0;
if(!host_int_status)
{
status = A_OK;
status = 0;
*pbIsRecvPending = false;
break;
}
......@@ -645,7 +645,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
remaining -= length;
}
return A_OK;
return 0;
}
static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
......@@ -667,7 +667,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
{
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context;
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket = NULL;
u32 request = pReq->Request;
......@@ -727,7 +727,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
}
pReq->CompletionStatus = status;
pReq->CompletionRoutine(pReq);
status = A_OK;
status = 0;
}
return status;
......@@ -751,7 +751,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
/* function to set up virtual scatter support if HIF layer has not implemented the interface */
static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
{
int status = A_OK;
int status = 0;
int bufferSize, sgreqSize;
int i;
DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo;
......@@ -923,7 +923,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
if (Async) {
pScatterReq->CompletionStatus = status;
pScatterReq->CompletionRoutine(pScatterReq);
return A_OK;
return 0;
}
return status;
}
......@@ -936,7 +936,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
DEV_FINISH_SCATTER_OPERATION(pScatterReq);
} else {
if (status == A_PENDING) {
status = A_OK;
status = 0;
}
}
......@@ -1127,7 +1127,7 @@ static u16 GetEndMarker(void)
/* send the ordered buffers to the target */
static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
{
int status = A_OK;
int status = 0;
u32 request = HIF_WR_SYNC_BLOCK_INC;
BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH];
int i;
......@@ -1171,7 +1171,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
/* poll the mailbox credit counter until we get a credit or timeout */
static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
{
int status = A_OK;
int status = 0;
int timeout = TEST_CREDITS_RECV_TIMEOUT;
u8 credits = 0;
u32 address;
......@@ -1207,7 +1207,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
}
if (status == A_OK) {
if (status == 0) {
*pCredits = credits;
}
......@@ -1218,7 +1218,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
/* wait for the buffers to come back */
static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
{
int status = A_OK;
int status = 0;
u32 request = HIF_RD_SYNC_BLOCK_INC;
BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH];
int curBuffer;
......@@ -1457,7 +1457,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev)
} while (false);
if (status == A_OK) {
if (status == 0) {
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n"));
} else {
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - FAILED! - \n"));
......
......@@ -189,7 +189,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
A_ASSERT(false);
if (pPacket->Completion != NULL) {
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
return A_OK;
return 0;
}
return A_EINVAL;
}
......@@ -212,7 +212,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
pPacket->Status = status;
} else {
if (status == A_PENDING) {
status = A_OK;
status = 0;
}
}
......@@ -234,7 +234,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Recv
paddedLength,RecvLength,pPacket->BufferLength));
if (pPacket->Completion != NULL) {
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
return A_OK;
return 0;
}
return A_EINVAL;
}
......@@ -291,7 +291,7 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);
} else {
return A_OK;
return 0;
}
}
......@@ -346,12 +346,12 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
/* compiled out */
#define DevCleanupGMbox(p)
#define DevCheckGMboxInterrupts(p) A_OK
#define DevCheckGMboxInterrupts(p) 0
#define DevNotifyGMboxTargetFailure(p)
static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
pDev->GMboxEnabled = false;
return A_OK;
return 0;
}
#endif
......
......@@ -55,7 +55,7 @@ int DevRWCompletionHandler(void *context, int status)
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
("-DevRWCompletionHandler\n"));
return A_OK;
return 0;
}
/* mailbox recv message polling */
......@@ -63,7 +63,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
u32 *pLookAhead,
int TimeoutMS)
{
int status = A_OK;
int status = 0;
int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS;
A_ASSERT(timeout > 0);
......@@ -187,7 +187,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
HIF_WR_SYNC_BYTE_FIX,
NULL);
A_ASSERT(status == A_OK);
A_ASSERT(status == 0);
return status;
}
......@@ -241,7 +241,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
HIF_WR_SYNC_BYTE_FIX,
NULL);
A_ASSERT(status == A_OK);
A_ASSERT(status == 0);
return status;
}
......@@ -271,7 +271,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
HIF_RD_SYNC_BYTE_INC,
NULL);
A_ASSERT(status == A_OK);
A_ASSERT(status == 0);
return status;
}
......@@ -296,7 +296,7 @@ static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev)
return DevServiceDebugInterrupt(pDev);
}
return A_OK;
return 0;
}
/* callback when our fetch to get interrupt status registers completes */
......@@ -391,7 +391,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
int DevCheckPendingRecvMsgsAsync(void *context)
{
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket;
/* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
......@@ -469,7 +469,7 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev)
/* process pending interrupts synchronously */
static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing)
{
int status = A_OK;
int status = 0;
u8 host_int_status = 0;
u32 lookAhead = 0;
......@@ -684,7 +684,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces
int DevDsrHandler(void *context)
{
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
int status = A_OK;
int status = 0;
bool done = false;
bool asyncProc = false;
......
......@@ -76,7 +76,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{
int status = A_OK;
int status = 0;
AR6K_IRQ_ENABLE_REGISTERS regs;
HTC_PACKET *pIOPacket = NULL;
......@@ -157,7 +157,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket = NULL;
u8 GMboxIntControl[4];
......@@ -271,7 +271,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev)
int DevSetupGMbox(AR6K_DEVICE *pDev)
{
int status = A_OK;
int status = 0;
u8 muxControl[4];
do {
......@@ -324,7 +324,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
{
int status = A_OK;
int status = 0;
u8 counter_int_status;
int credits;
u8 host_int_status2;
......@@ -426,7 +426,7 @@ int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength)
pPacket->Status = status;
} else {
if (status == A_PENDING) {
status = A_OK;
status = 0;
}
}
......@@ -450,7 +450,7 @@ int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength)
paddedLength,ReadLength,pPacket->BufferLength));
if (pPacket->Completion != NULL) {
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
return A_OK;
return 0;
}
return A_EINVAL;
}
......@@ -541,7 +541,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
......@@ -637,7 +637,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev)
int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes)
{
int status = A_OK;
int status = 0;
AR6K_IRQ_PROC_REGISTERS procRegs;
int maxCopy;
......@@ -678,7 +678,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo
int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
{
int status = A_OK;
int status = 0;
int i;
u8 buffer[4];
......
......@@ -195,7 +195,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE
bool enableCreditIrq = false;
bool disableCreditIrq = false;
bool doPendingSends = false;
int status = A_OK;
int status = 0;
/** this callback is called under 2 conditions:
* 1. The credit IRQ interrupt was enabled and signaled.
......@@ -307,7 +307,7 @@ static void StateDumpCallback(void *pContext)
static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidBytes)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
int status = A_OK;
int status = 0;
int totalRecvLength = 0;
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
bool recvRefillCalled = false;
......@@ -476,7 +476,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
/* adjust buffer to move past packet ID */
pPacket->pBuffer++;
pPacket->ActualLength = totalRecvLength - 1;
pPacket->Status = A_OK;
pPacket->Status = 0;
/* indicate packet */
DO_HCI_RECV_INDICATION(pProt,pPacket);
pPacket = NULL;
......@@ -549,7 +549,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
{
int status = A_OK;
int status = 0;
int credits;
int retry = 100;
......@@ -581,7 +581,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous)
{
int status = A_OK;
int status = 0;
int transferLength;
int creditsRequired, remainder;
u8 hciUartType;
......@@ -848,7 +848,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt)
int GMboxProtocolInstall(AR6K_DEVICE *pDev)
{
int status = A_OK;
int status = 0;
GMBOX_PROTO_HCI_UART *pProtocol = NULL;
do {
......@@ -911,7 +911,7 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev)
static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt)
{
HCI_TRANSPORT_PROPERTIES props;
int status = A_OK;
int status = 0;
do {
......@@ -1004,7 +1004,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
int status = A_OK;
int status = 0;
bool unblockRecv = false;
HTC_PACKET *pPacket;
......@@ -1066,7 +1066,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HCI_TransportAddReceivePkt \n"));
return A_OK;
return 0;
}
int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous)
......@@ -1163,7 +1163,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
int MaxPollMS)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
int status = A_OK;
int status = 0;
u8 lookAhead[8];
int bytes;
int totalRecvLength;
......@@ -1216,7 +1216,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
pPacket->pBuffer++;
pPacket->ActualLength = totalRecvLength - 1;
pPacket->Status = A_OK;
pPacket->Status = 0;
break;
}
......@@ -1235,7 +1235,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice);
u32 scaledBaud, scratchAddr;
int status = A_OK;
int status = 0;
/* Divide the desired baud rate by 100
* Store the LSB in the local scratch register 4 and the MSB in the local
......@@ -1247,14 +1247,14 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
scratchAddr = MBOX_BASE_ADDRESS | (LOCAL_SCRATCH_ADDRESS + 4 * MSB_SCRATCH_IDX);
scaledBaud = ((Baud / 100) >> (LOCAL_SCRATCH_VALUE_MSB+1)) & LOCAL_SCRATCH_VALUE_MASK;
status |= ar6000_WriteRegDiag(pHIFDevice, &scratchAddr, &scaledBaud);
if (A_OK != status) {
if (0 != status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to set up baud rate in scratch register!"));
return status;
}
/* Now interrupt the target to tell it about the baud rate */
status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BAUD_SET, BAUD_TIMEOUT_MS);
if (A_OK != status) {
if (0 != status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to tell target to change baud rate!"));
}
......
......@@ -93,7 +93,7 @@ static void HTCCleanup(HTC_TARGET *target)
HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
{
HTC_TARGET *target = NULL;
int status = A_OK;
int status = 0;
int i;
u32 ctrl_bufsz;
u32 blocksizes[HTC_MAILBOX_NUM_MAX];
......
......@@ -105,7 +105,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
pOrigBuffer = pBuffer;
origLength = Length;
status = A_OK;
status = 0;
while (Length > 0) {
......@@ -233,7 +233,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
{
u8 temp;
u8 *pBuf;
int status = A_OK;
int status = 0;
u16 payloadLen;
u32 lookAhead;
......@@ -692,7 +692,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
HTC_ENDPOINT *pEndpoint,
HTC_PACKET_QUEUE *pQueue)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pPacket;
HTC_FRAME_HDR *pHdr;
int i,j;
......@@ -816,7 +816,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
/* clear flags */
pPacket->PktInfo.AsRx.HTCRxFlags = 0;
pPacket->PktInfo.AsRx.IndicationFlags = 0;
pPacket->Status = A_OK;
pPacket->Status = 0;
if (noRecycle) {
/* flag that these packets cannot be recycled, they have to be returned to the
......@@ -859,7 +859,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
if (status) {
if (A_NO_RESOURCE == status) {
/* this is actually okay */
status = A_OK;
status = 0;
}
break;
}
......@@ -990,7 +990,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
int *pNumPacketsFetched,
bool PartialBundle)
{
int status = A_OK;
int status = 0;
HIF_SCATTER_REQ *pScatterReq;
int i, totalLength;
int pktsToScatter;
......@@ -1120,7 +1120,7 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
int status = A_OK;
int status = 0;
HTC_PACKET *pPacket;
HTC_ENDPOINT *pEndpoint;
bool asyncProc = false;
......@@ -1390,7 +1390,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint;
bool unblockRecv = false;
int status = A_OK;
int status = 0;
HTC_PACKET *pFirstPacket;
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
......@@ -1567,7 +1567,7 @@ int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
u32 TimeoutInMs,
bool *pbIsRecvPending)
{
int status = A_OK;
int status = 0;
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
status = DevWaitForPendingRecv(&target->Device,
......
......@@ -270,7 +270,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
HTC_PACKET *pPacket;
HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = A_OK;
int status = 0;
HTC_PACKET_QUEUE sendCompletes;
INIT_HTC_PACKET_QUEUE(&sendCompletes);
......@@ -705,7 +705,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-HTCSendPktsMultiple \n"));
return A_OK;
return 0;
}
/* HTC API - HTCSendPkt */
......
......@@ -126,7 +126,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
HTC_SERVICE_CONNECT_RESP *pConnectResp)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
int status = A_OK;
int status = 0;
HTC_PACKET *pRecvPacket = NULL;
HTC_PACKET *pSendPacket = NULL;
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
......@@ -290,7 +290,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
/* save local connection flags */
pEndpoint->LocalConnectionFlags = pConnectReq->LocalConnectionFlags;
status = A_OK;
status = 0;
} while (false);
......
......@@ -32,11 +32,10 @@
/*
* Generic error codes that can be used by hw, sta, ap, sim, dk
* and any other environments.
* Feel free to add any more codes that you need.
* Feel free to add any more non-zero codes that you need.
*/
#define A_ERROR (-1) /* Generic error return */
#define A_OK 0 /* success */
#define A_DEVICE_NOT_FOUND 1 /* not able to find PCI device */
#define A_NO_MEMORY 2 /* not able to allocate memory,
* not avail#defineable */
......
......@@ -1884,7 +1884,7 @@ typedef PREPACK struct {
} POSTPACK WMI_CHANNEL_LIST_REPLY;
typedef enum {
A_SUCCEEDED = A_OK,
A_SUCCEEDED = 0,
A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
A_SUCCEEDED_MODIFY_STREAM=251,
A_FAILED_INVALID_STREAM = 252,
......
......@@ -134,7 +134,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans);
@input: HciTrans - HCI transport handle
pQueue - a queue holding one or more packets
@output:
@return: A_OK on success
@return: 0 on success
@notes: user must supply HTC packets for capturing incomming HCI packets. The caller
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
macro. Each packet in the queue must be of the same type and length
......@@ -150,7 +150,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
pPacket - packet to send
Synchronous - send the packet synchronously (blocking)
@output:
@return: A_OK
@return: 0
@notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() and
HCI_SET_PACKET_TYPE() macros to prepare the packet.
If Synchronous is set to false the call is fully asynchronous. On error or completion,
......@@ -187,7 +187,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans);
@function name: HCI_TransportStart
@input: HciTrans - hci transport handle
@output:
@return: A_OK on success
@return: 0 on success
@notes: HCI transport communication will begin, the caller can expect the arrival
of HCI recv packets as soon as this call returns.
@example:
......@@ -201,7 +201,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
@input: HciTrans - hci transport handle
Enable - enable or disable asynchronous recv
@output:
@return: A_OK on success
@return: 0 on success
@notes: This API must be called when HCI recv is handled synchronously
@example:
@see also:
......@@ -215,7 +215,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E
pPacket - HTC packet to hold the recv data
MaxPollMS - maximum polling duration in Milliseconds;
@output:
@return: A_OK on success
@return: 0 on success
@notes: This API should be used only during HCI device initialization, the caller must call
HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API.
This API will only capture HCI Event packets.
......@@ -232,7 +232,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
@input: HciTrans - hci transport handle
Baud - baud rate in bps
@output:
@return: A_OK on success
@return: 0 on success
@notes: This API should be used only after HCI device initialization
@example:
@see also:
......@@ -245,7 +245,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
@input: HciTrans - hci transport handle
Enable - 1 = Enable, 0 = Disable
@output:
@return: A_OK on success
@return: 0 on success
@notes:
@example:
@see also:
......
......@@ -341,7 +341,7 @@ int HTCStart(HTC_HANDLE HTCHandle);
@input: HTCHandle - HTC handle
pPacket - HTC receive packet to add
@output:
@return: A_OK on success
@return: 0 on success
@notes: user must supply HTC packets for capturing incomming HTC frames. The caller
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
macro.
......@@ -370,7 +370,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
@input: HTCHandle - HTC handle
pPacket - packet to send
@output:
@return: A_OK
@return: 0
@notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() macro.
This interface is fully asynchronous. On error, HTC SendPkt will
call the registered Endpoint callback to cleanup the packet.
......@@ -499,7 +499,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
@input: HTCHandle - HTC handle
pPktQueue - local queue holding packets to send
@output:
@return: A_OK
@return: 0
@notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro.
The queue must only contain packets directed at the same endpoint.
Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order.
......@@ -519,7 +519,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
@input: HTCHandle - HTC handle
pPktQueue - HTC receive packet queue holding packets to add
@output:
@return: A_OK on success
@return: 0 on success
@notes: user must supply HTC packets for capturing incomming HTC frames. The caller
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
macro. The queue must only contain recv packets for the same endpoint.
......
......@@ -54,7 +54,7 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig,
int Length)
{
HTC_PACKET *pPacket = NULL;
int status = A_OK;
int status = 0;
do {
......@@ -88,7 +88,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
u8 *pBuffer,
int *pLength)
{
int status = A_OK;
int status = 0;
HTC_PACKET *pRecvPacket = NULL;
do {
......@@ -128,7 +128,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
u8 **ppEventBuffer,
u8 **ppBufferToFree)
{
int status = A_OK;
int status = 0;
u8 *pBuffer = NULL;
u8 *pTemp;
int length;
......@@ -211,7 +211,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
{
int status = A_OK;
int status = 0;
u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0};
u16 baudVal;
u8 *pEvent = NULL;
......@@ -312,7 +312,7 @@ static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig)
static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
{
int status = A_OK;
int status = 0;
u8 hciResetCommand[] = {0x03,0x0c,0x0};
u8 *pEvent = NULL;
u8 *pBufferToFree = NULL;
......@@ -455,7 +455,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
{
int status = A_OK;
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n"));
......@@ -481,7 +481,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
/* Load patching and PST file if available*/
if (A_OK != AthPSInitialize(pConfig)) {
if (0 != AthPSInitialize(pConfig)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Patch Download Failed!\n"));
}
......@@ -523,7 +523,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
int AR3KConfigureExit(void *config)
{
int status = A_OK;
int status = 0;
AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n"));
......
......@@ -93,7 +93,7 @@ void Hci_log(A_UCHAR * log_string,A_UCHAR *data,u32 len)
int AthPSInitialize(AR3K_CONFIG_INFO *hdev)
{
int status = A_OK;
int status = 0;
if(hdev == NULL) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n"));
return A_ERROR;
......@@ -280,8 +280,8 @@ int PSSendOps(void *arg)
HciCmdList[0].Hcipacket,
HciCmdList[0].packetLen,
&event,
&bufferToFree) == A_OK) {
if(ReadPSEvent(event) == A_OK) { /* Exit if the status is success */
&bufferToFree) == 0) {
if(ReadPSEvent(event) == 0) { /* Exit if the status is success */
if(bufferToFree != NULL) {
A_FREE(bufferToFree);
}
......@@ -309,8 +309,8 @@ int PSSendOps(void *arg)
HciCmdList[i].Hcipacket,
HciCmdList[i].packetLen,
&event,
&bufferToFree) == A_OK) {
if(ReadPSEvent(event) != A_OK) { /* Exit if the status is success */
&bufferToFree) == 0) {
if(ReadPSEvent(event) != 0) { /* Exit if the status is success */
if(bufferToFree != NULL) {
A_FREE(bufferToFree);
}
......@@ -415,7 +415,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
return A_ERROR;
}
return A_OK;
return 0;
}
#endif /* HCI_TRANSPORT_SDIO */
......@@ -426,14 +426,14 @@ int ReadPSEvent(A_UCHAR* Data){
{
switch(Data[3]){
case 0x0B:
return A_OK;
return 0;
break;
case 0x0C:
/* Change Baudrate */
return A_OK;
return 0;
break;
case 0x04:
return A_OK;
return 0;
break;
case 0x1E:
Rom_Version = Data[9];
......@@ -445,7 +445,7 @@ int ReadPSEvent(A_UCHAR* Data){
Build_Version = ((Build_Version << 8) |Data[12]);
Build_Version = ((Build_Version << 8) |Data[11]);
Build_Version = ((Build_Version << 8) |Data[10]);
return A_OK;
return 0;
break;
......@@ -499,13 +499,13 @@ int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type)
bdaddr_cmd[outc] = bdaddr[inc];
}
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd,
if(0 == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd,
sizeof(bdaddr_cmd),
&event,&bufferToFree)) {
if(event[4] == 0xFC && event[5] == 0x00){
if(event[3] == 0x0B){
result = A_OK;
result = 0;
}
}
......@@ -522,7 +522,7 @@ int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig)
u8 *event;
u8 *bufferToFree = NULL;
int result = A_ERROR;
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
result = ReadPSEvent(event);
}
......@@ -543,7 +543,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
hciCommand[4] = (u8)((FPGA_REGISTER >> 8) & 0xFF);
hciCommand[5] = (u8)((FPGA_REGISTER >> 16) & 0xFF);
hciCommand[6] = (u8)((FPGA_REGISTER >> 24) & 0xFF);
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
if(event[4] == 0xFC && event[5] == 0x00){
switch(event[3]){
......@@ -553,7 +553,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
reg = ((reg << 8) |event[7]);
reg = ((reg << 8) |event[6]);
*code = reg;
result = A_OK;
result = 0;
break;
case 0x06:
......
......@@ -549,7 +549,7 @@ int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat)
if(Buffer != NULL) {
A_FREE(Buffer);
}
return A_OK;
return 0;
}
......@@ -576,7 +576,7 @@ int GetNextTwoChar(A_UCHAR *srcbuffer,u32 len, u32 *pos, char *buffer)
{
return A_ERROR;
}
return A_OK;
return 0;
}
int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
......@@ -654,7 +654,7 @@ int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
}
return A_OK;
return 0;
}
......@@ -953,7 +953,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch
case CHANGE_BDADDR:
break;
}
return A_OK;
return 0;
}
int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
{
......@@ -965,5 +965,5 @@ int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
A_FREE((*HciPacketList)[i].Hcipacket);
}
A_FREE(*HciPacketList);
return A_OK;
return 0;
}
......@@ -134,7 +134,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
return status;
}
return A_OK;
return 0;
......@@ -177,7 +177,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
return status;
}
return A_OK;
return 0;
}
#endif
......@@ -248,11 +248,11 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
A_UCHAR *data, u32 length)
{
u32 count;
int status = A_OK;
int status = 0;
for (count = 0; count < length; count += 4, address += 4) {
if ((status = ar6000_ReadRegDiag(hifDevice, &address,
(u32 *)&data[count])) != A_OK)
(u32 *)&data[count])) != 0)
{
break;
}
......@@ -266,11 +266,11 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
A_UCHAR *data, u32 length)
{
u32 count;
int status = A_OK;
int status = 0;
for (count = 0; count < length; count += 4, address += 4) {
if ((status = ar6000_WriteRegDiag(hifDevice, &address,
(u32 *)&data[count])) != A_OK)
(u32 *)&data[count])) != 0)
{
break;
}
......@@ -382,13 +382,13 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
actual_wait += 100;
data = 0;
if (ar6000_ReadRegDiag(hifDevice, &address, &data) != A_OK) {
if (ar6000_ReadRegDiag(hifDevice, &address, &data) != 0) {
return A_ERROR;
}
if (data != 0) {
/* No need to wait longer -- we have a BMI credit */
return A_OK;
return 0;
}
}
return A_ERROR; /* timed out */
......@@ -401,7 +401,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
/* reset device */
int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
{
int status = A_OK;
int status = 0;
u32 address;
u32 data;
......@@ -476,7 +476,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl
AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
}
return A_OK;
return 0;
}
/* This should be called in BMI phase after firmware is downloaded */
......@@ -490,7 +490,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
if (BMIReadMemory(hifDevice,
HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data),
(A_UCHAR *)&eepHeaderAddr,
4)!= A_OK)
4)!= 0)
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadMemory for reading board data address failed \n"));
return;
......@@ -500,7 +500,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
eepHeaderAddr += 36; /* AR6003 customer data section offset is 37 */
for (i=0; i<AR6003_CUST_DATA_SIZE+4; i+=4){
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= A_OK) {
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
return ;
}
......@@ -514,7 +514,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
eepHeaderAddr += 64; /* AR6002 customer data sectioin offset is 64 */
for (i=0; i<AR6002_CUST_DATA_SIZE; i+=4){
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= A_OK) {
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
return ;
}
......@@ -686,7 +686,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
{
int status = A_OK;
int status = 0;
/* placeholder */
......@@ -695,7 +695,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
{
int status = A_OK;
int status = 0;
/* placeholder */
......@@ -714,7 +714,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
return prepare_ar6003(hifDevice,TargetVersion);
}
return A_OK;
return 0;
}
#if defined(CONFIG_AR6002_REV1_FORCE_HOST)
......@@ -734,7 +734,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
};
struct forceROM_s *ForceROM;
s32 szForceROM;
int status = A_OK;
int status = 0;
u32 address;
u32 data;
......@@ -782,7 +782,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
{
if (ar6000_WriteRegDiag(hifDevice,
&ForceROM[i].addr,
&ForceROM[i].data) != A_OK)
&ForceROM[i].data) != 0)
{
ATH_DEBUG_PRINTF (DBG_MISC_DRV, ATH_DEBUG_TRC, ("Cannot force Target to recognize Host!\n"));
return A_ERROR;
......@@ -791,7 +791,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
A_MDELAY(1000);
return A_OK;
return 0;
}
#endif /* CONFIG_AR6002_REV1_FORCE_HOST */
......@@ -942,7 +942,7 @@ int a_get_module_mask(char *module_name, u32 *pMask)
}
*pMask = pInfo->CurrentMask;
return A_OK;
return 0;
}
int a_set_module_mask(char *module_name, u32 Mask)
......@@ -955,7 +955,7 @@ int a_set_module_mask(char *module_name, u32 Mask)
pInfo->CurrentMask = Mask;
A_PRINTF("Module %s, new mask: 0x%8.8X \n",module_name,pInfo->CurrentMask);
return A_OK;
return 0;
}
......@@ -1002,7 +1002,7 @@ int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
u32 TargetType,
u32 Flags)
{
int status = A_OK;
int status = 0;
do {
......
......@@ -413,6 +413,6 @@ int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCr
servicepriority,
5);
return A_OK;
return 0;
}
......@@ -78,7 +78,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
u16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false};
ar->arWowState = WLAN_WOW_STATE_NONE;
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) {
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!= 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n"));
}
#if WOW_SET_SCAN_PARAMS
......@@ -99,7 +99,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == A_OK) {
if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == 0) {
}
#endif
ar6k_send_asleep_event_to_app(ar, false);
......@@ -137,7 +137,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
ar6000_TxDataCleanup(ar); /* IMPORTANT, otherwise there will be 11mA after listen interval as 1000*/
#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == A_OK) {
if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == 0) {
}
#endif
......@@ -213,7 +213,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
int ar6000_suspend_ev(void *context)
{
int status = A_OK;
int status = 0;
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
s16 pmmode = ar->arSuspendConfig;
wow_not_connected:
......@@ -240,7 +240,7 @@ int ar6000_suspend_ev(void *context)
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState));
}
AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Suspend for %d mode pwr %d status %d\n", __func__, pmmode, ar->arWlanPowerState, status));
status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? A_OK : A_EBUSY;
status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? 0 : A_EBUSY;
break;
}
......@@ -270,7 +270,7 @@ int ar6000_resume_ev(void *context)
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n"));
break;
}
return A_OK;
return 0;
}
void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
......@@ -293,17 +293,17 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
int ar6000_power_change_ev(void *context, u32 config)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
int status = A_OK;
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config));
switch (config) {
case HIF_DEVICE_POWER_UP:
ar6000_restart_endpoint(ar->arNetDev);
status = A_OK;
status = 0;
break;
case HIF_DEVICE_POWER_DOWN:
case HIF_DEVICE_POWER_CUT:
status = A_OK;
status = 0;
break;
}
return status;
......@@ -345,7 +345,7 @@ static struct platform_driver ar6000_pm_device = {
int
ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{
int status = A_OK;
int status = 0;
HIF_DEVICE_POWER_CHANGE_TYPE config;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState));
......@@ -383,10 +383,10 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
break;
}
#endif
status = A_OK;
} else if (status == A_OK) {
status = 0;
} else if (status == 0) {
ar6000_restart_endpoint(ar->arNetDev);
status = A_OK;
status = 0;
}
} else if (state == WLAN_DISABLED) {
......@@ -415,7 +415,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
int
ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{
int status = A_OK;
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState));
#ifdef CONFIG_PM
......@@ -439,7 +439,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
hostSleepMode.awake = true;
hostSleepMode.asleep = false;
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != A_OK) {
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != 0) {
break;
}
......@@ -456,7 +456,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
ar->scParams.shortScanRatio,
ar->scParams.scanCtrlFlags,
ar->scParams.max_dfsch_act_time,
ar->scParams.maxact_scan_per_ssid)) != A_OK)
ar->scParams.maxact_scan_per_ssid)) != 0)
{
break;
}
......@@ -464,7 +464,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
if (ar->arNetworkType != AP_NETWORK)
{
if (ar->arSsidLen) {
if (ar6000_connect_to_ap(ar) != A_OK) {
if (ar6000_connect_to_ap(ar) != 0) {
/* no need to report error if connection failed */
break;
}
......@@ -495,12 +495,12 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
ar->scan_triggered = 0;
if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != A_OK) {
if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != 0) {
break;
}
/* make sure we disable wow for deep sleep */
if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!=A_OK)
if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!= 0)
{
break;
}
......@@ -512,7 +512,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
hostSleepMode.awake = false;
hostSleepMode.asleep = true;
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!=A_OK) {
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!= 0) {
break;
}
if (ar->arTxPending[ar->arControlEp]) {
......@@ -539,7 +539,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
int
ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent)
{
int status = A_OK;
int status = 0;
u16 powerState, oldPowerState;
AR6000_WLAN_STATE oldstate = ar->arWlanState;
bool wlanOff = ar->arWlanOff;
......@@ -631,7 +631,7 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup WLAN state %d\n", ar->arWlanState));
ar->arWlanState = oldstate;
} else if (status == A_OK) {
} else if (status == 0) {
WMI_REPORT_SLEEP_STATE_EVENT wmiSleepEvent, *pSleepEvent = NULL;
if ((ar->arWlanPowerState == WLAN_POWER_STATE_ON) && (oldPowerState != WLAN_POWER_STATE_ON)) {
wmiSleepEvent.sleepState = WMI_REPORT_SLEEP_STATUS_IS_AWAKE;
......@@ -657,13 +657,13 @@ ar6000_set_bt_hw_state(struct ar6_softc *ar, u32 enable)
bool off = (enable == 0);
int status;
if (ar->arBTOff == off) {
return A_OK;
return 0;
}
ar->arBTOff = off;
status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false);
return status;
#else
return A_OK;
return 0;
#endif
}
......@@ -673,7 +673,7 @@ ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
int status;
bool off = (state == WLAN_DISABLED);
if (ar->arWlanOff == off) {
return A_OK;
return 0;
}
ar->arWlanOff = off;
status = ar6000_update_wlan_pwr_state(ar, state, false);
......
......@@ -55,7 +55,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to down the semaphore\n"));
}
A_ASSERT((pPacket->Status != A_OK) ||
A_ASSERT((pPacket->Status != 0) ||
(pPacket->pBuffer == (busy->data + HTC_HEADER_LEN)));
busy->length = pPacket->ActualLength + HTC_HEADER_LEN;
......@@ -150,7 +150,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
if (status) {
if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n"));
status = A_OK;
status = 0;
}
break;
}
......@@ -228,7 +228,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
arRawStream2EndpointID(ar,streamID));
/* Queue buffers to HTC for receive */
if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != A_OK)
if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != 0)
{
BMIInit();
return -EIO;
......@@ -262,7 +262,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
1);
/* Start the HTC component */
if ((status = HTCStart(ar->arHtcTarget)) != A_OK) {
if ((status = HTCStart(ar->arHtcTarget)) != 0) {
BMIInit();
return -EIO;
}
......
......@@ -120,7 +120,7 @@ static int btpal_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)skb->dev;
HCI_TRANSPORT_PACKET_TYPE type;
ar6k_hci_pal_info_t *pHciPalInfo;
int status = A_OK;
int status = 0;
struct sk_buff *txSkb = NULL;
AR_SOFTC_T *ar;
......@@ -184,7 +184,7 @@ static int btpal_send_frame(struct sk_buff *skb)
break;
}
if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != A_OK)
if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != 0)
{
PRIN_LOG("send hci cmd error");
break;
......@@ -220,7 +220,7 @@ static int btpal_send_frame(struct sk_buff *skb)
/* Add WMI packet type */
osbuf = (void *)txSkb;
if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != A_OK) {
if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != 0) {
PRIN_LOG("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n");
} else {
/* Send data buffer over HTC */
......@@ -271,11 +271,11 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
*********************************************************/
static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
{
int status = A_OK;
int status = 0;
struct hci_dev *pHciDev = NULL;
if (!setupbtdev) {
return A_OK;
return 0;
}
do {
......@@ -404,7 +404,7 @@ bool ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
**********************************************************/
int ar6k_setup_hci_pal(void *ar_p)
{
int status = A_OK;
int status = 0;
ar6k_hci_pal_info_t *pHciPalInfo;
ar6k_pal_config_t ar6k_pal_config;
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p;
......@@ -445,7 +445,7 @@ int ar6k_setup_hci_pal(void *ar_p)
#else /* AR6K_ENABLE_HCI_PAL */
int ar6k_setup_hci_pal(void *ar_p)
{
return A_OK;
return 0;
}
void ar6k_cleanup_hci_pal(void *ar_p)
{
......@@ -465,7 +465,7 @@ static int __init pal_init_module(void)
hciTransCallbacks.setupTransport = ar6k_setup_hci_pal;
hciTransCallbacks.cleanupTransport = ar6k_cleanup_hci_pal;
if(ar6k_register_hci_pal(&hciTransCallbacks) != A_OK)
if(ar6k_register_hci_pal(&hciTransCallbacks) != 0)
return -ENODEV;
return 0;
......
......@@ -153,7 +153,7 @@ ar6k_set_wpa_version(AR_SOFTC_T *ar, enum nl80211_wpa_versions wpa_version)
return -ENOTSUPP;
}
return A_OK;
return 0;
}
static int
......@@ -179,7 +179,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type)
return -ENOTSUPP;
}
return A_OK;
return 0;
}
static int
......@@ -221,7 +221,7 @@ ar6k_set_cipher(AR_SOFTC_T *ar, u32 cipher, bool ucast)
return -ENOTSUPP;
}
return A_OK;
return 0;
}
static void
......@@ -378,7 +378,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
}
if (!ar->arUserBssFilter) {
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) {
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
up(&ar->arSem);
return -EIO;
......@@ -743,7 +743,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
if (!ar->arUserBssFilter) {
if (wmi_bssfilter_cmd(ar->arWmi,
(ar->arConnected ? ALL_BUT_BSS_FILTER : ALL_BSS_FILTER),
0) != A_OK) {
0) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
return -EIO;
}
......@@ -769,7 +769,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
}
if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \
0, 0, 0, NULL) != A_OK) {
0, 0, 0, NULL) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__));
ret = -EIO;
}
......@@ -982,7 +982,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
struct ar_key *key = NULL;
int status = A_OK;
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
......@@ -1073,7 +1073,7 @@ ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
}
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != A_OK){
if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != 0){
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_set_rts_cmd failed\n", __func__));
return -EIO;
}
......@@ -1148,7 +1148,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
if((ar->arConnected == true)) {
ar->arTxPwr = 0;
if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) {
if(wmi_get_txPwr_cmd(ar->arWmi) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_get_txPwr_cmd failed\n", __func__));
return -EIO;
}
......@@ -1193,7 +1193,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy,
pwrMode.powerMode = REC_POWER;
}
if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != A_OK) {
if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_powermode_cmd failed\n", __func__));
return -EIO;
}
......
......@@ -66,7 +66,7 @@ int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks)
_HCI_TransportSetBaudRate = HCI_TransportSetBaudRate;
_HCI_TransportEnablePowerMgmt = HCI_TransportEnablePowerMgmt;
return A_OK;
return 0;
}
int
......
......@@ -294,7 +294,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
address = TARG_VTOP(pHcidevInfo->ar->arTargetType,
HOST_INTEREST_ITEM_ADDRESS(pHcidevInfo->ar, hi_hci_uart_pwr_mgmt_params));
status = ar6000_ReadRegDiag(pHcidevInfo->ar->arHifDevice, &address, &hci_uart_pwr_mgmt_params);
if (A_OK == status) {
if (0 == status) {
ar3kconfig.PwrMgmtEnabled = (hci_uart_pwr_mgmt_params & 0x1);
ar3kconfig.IdleTimeout = (hci_uart_pwr_mgmt_params & 0xFFFF0000) >> 16;
ar3kconfig.WakeupTimeout = (hci_uart_pwr_mgmt_params & 0xFF00) >> 8;
......@@ -470,7 +470,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
#endif
{
HCI_TRANSPORT_CONFIG_INFO config;
int status = A_OK;
int status = 0;
int i;
HTC_PACKET *pPacket;
AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
......@@ -551,7 +551,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
if (NULL == pHcidevInfo->pHCIDev) {
/* GMBOX may not be present in older chips */
/* just return success */
status = A_OK;
status = 0;
}
}
ar6000_cleanup_hci(ar);
......@@ -601,7 +601,7 @@ int hci_test_send(void *ar, struct sk_buff *skb)
int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
#endif
{
int status = A_OK;
int status = 0;
int length;
EPPING_HEADER *pHeader;
HTC_PACKET *pPacket;
......@@ -712,7 +712,7 @@ static int bt_send_frame(struct sk_buff *skb)
HCI_TRANSPORT_PACKET_TYPE type;
AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
HTC_PACKET *pPacket;
int status = A_OK;
int status = 0;
struct sk_buff *txSkb = NULL;
if (!hdev) {
......@@ -855,12 +855,12 @@ static void bt_destruct(struct hci_dev *hdev)
static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{
int status = A_OK;
int status = 0;
struct hci_dev *pHciDev = NULL;
HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
if (!setupbtdev) {
return A_OK;
return 0;
}
do {
......@@ -938,7 +938,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{
int err;
int status = A_OK;
int status = 0;
do {
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n"));
......@@ -1043,7 +1043,7 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk
/* stubs when we only want to test the HCI bridging Interface without the HT stack */
static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{
return A_OK;
return 0;
}
static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{
......@@ -1085,7 +1085,7 @@ int ar6000_setup_hci(void *ar)
int ar6000_setup_hci(AR_SOFTC_T *ar)
#endif
{
return A_OK;
return 0;
}
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
......
This diff is collapsed.
......@@ -109,7 +109,7 @@ a_netbuf_push(void *bufPtr, s32 len)
{
skb_push((struct sk_buff *)bufPtr, len);
return A_OK;
return 0;
}
/*
......@@ -122,7 +122,7 @@ a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len)
skb_push((struct sk_buff *) bufPtr, len);
A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len);
return A_OK;
return 0;
}
/*
......@@ -134,7 +134,7 @@ a_netbuf_put(void *bufPtr, s32 len)
{
skb_put((struct sk_buff *)bufPtr, len);
return A_OK;
return 0;
}
/*
......@@ -149,7 +149,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len)
skb_put((struct sk_buff *)bufPtr, len);
A_MEMCPY(start, srcPtr, len);
return A_OK;
return 0;
}
......@@ -161,7 +161,7 @@ a_netbuf_setlen(void *bufPtr, s32 len)
{
skb_trim((struct sk_buff *)bufPtr, len);
return A_OK;
return 0;
}
/*
......@@ -172,7 +172,7 @@ a_netbuf_trim(void *bufPtr, s32 len)
{
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
return A_OK;
return 0;
}
/*
......@@ -187,7 +187,7 @@ a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len)
A_MEMCPY(dstPtr, start, len);
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
return A_OK;
return 0;
}
......@@ -207,7 +207,7 @@ a_netbuf_pull(void *bufPtr, s32 len)
{
skb_pull((struct sk_buff *)bufPtr, len);
return A_OK;
return 0;
}
/*
......@@ -220,7 +220,7 @@ a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len)
A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len);
skb_pull((struct sk_buff *)bufPtr, len);
return A_OK;
return 0;
}
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
......
......@@ -57,7 +57,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
AGGR_INFO *p_aggr = NULL;
RXTID *rxtid;
u8 i;
int status = A_OK;
int status = 0;
A_PRINTF("In aggr_init..\n");
......@@ -90,13 +90,13 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
}while(false);
A_PRINTF("going out of aggr_init..status %s\n",
(status == A_OK) ? "OK":"Error");
(status == 0) ? "OK":"Error");
if (status) {
/* Cleanup */
aggr_module_destroy(p_aggr);
}
return ((status == A_OK) ? p_aggr : NULL);
return ((status == 0) ? p_aggr : NULL);
}
/* utility function to clear rx hold_q for a tid */
......@@ -399,7 +399,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf)
A_MEMCPY(A_NETBUF_DATA(new_buf), framep, frame_8023_len);
A_NETBUF_PUT(new_buf, frame_8023_len);
if (wmi_dot3_2_dix(new_buf) != A_OK) {
if (wmi_dot3_2_dix(new_buf) != 0) {
A_PRINTF("dot3_2_dix err..\n");
A_NETBUF_FREE(new_buf);
break;
......
......@@ -196,5 +196,5 @@ wlan_parse_beacon(u8 *buf, int framelen, struct ieee80211_common_ie *cie)
IEEE80211_VERIFY_ELEMENT(cie->ie_rates, IEEE80211_RATE_MAXSIZE);
IEEE80211_VERIFY_ELEMENT(cie->ie_ssid, IEEE80211_NWID_LEN);
return A_OK;
return 0;
}
This diff is collapsed.
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