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