staging: ath6kl: Remove #define A_OK
Just use 0. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a1d4652963
commit
4f69cef0a9
|
@ -113,7 +113,7 @@ BMIDone(HIF_DEVICE *device)
|
|||
|
||||
if (bmiDone) {
|
||||
AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
|
||||
|
@ -138,7 +138,7 @@ BMIDone(HIF_DEVICE *device)
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -197,7 +197,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n",
|
||||
targ_info->target_ver, targ_info->target_type));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -253,7 +253,7 @@ BMIReadMemory(HIF_DEVICE *device,
|
|||
}
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n"));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -318,7 +318,7 @@ BMIWriteMemory(HIF_DEVICE *device,
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -366,7 +366,7 @@ BMIExecute(HIF_DEVICE *device,
|
|||
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -403,7 +403,7 @@ BMISetAppStart(HIF_DEVICE *device,
|
|||
}
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n"));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -449,7 +449,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
|
|||
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -489,7 +489,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
|
|||
}
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n"));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -545,7 +545,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
|
|||
A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id));
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -582,7 +582,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
|
|||
}
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -626,7 +626,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -692,7 +692,7 @@ BMILZData(HIF_DEVICE *device,
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -729,7 +729,7 @@ BMILZStreamStart(HIF_DEVICE *device,
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* BMI Access routines */
|
||||
|
@ -954,7 +954,7 @@ bmiBufferReceive(HIF_DEVICE *device,
|
|||
return A_ERROR;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -148,7 +148,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
|
|||
return A_ERROR;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
|
|||
void *context)
|
||||
{
|
||||
u8 opcode;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int ret;
|
||||
u8 *tbuffer;
|
||||
bool bounced = false;
|
||||
|
@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
|
|||
u32 request,
|
||||
void *context)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
BUS_REQUEST *busrequest;
|
||||
|
||||
|
||||
|
@ -644,13 +644,13 @@ int ReinitSDIO(HIF_DEVICE *device)
|
|||
sdio_release_host(func);
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));
|
||||
|
||||
return (err) ? A_ERROR : A_OK;
|
||||
return (err) ? A_ERROR : 0;
|
||||
}
|
||||
|
||||
int
|
||||
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
#if defined(CONFIG_PM)
|
||||
struct sdio_func *func = device->func;
|
||||
int old_reset_val;
|
||||
|
@ -678,7 +678,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
|
|||
if (device->powerConfig == HIF_DEVICE_POWER_CUT) {
|
||||
status = ReinitSDIO(device);
|
||||
}
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
status = hifEnableFunc(device, func);
|
||||
}
|
||||
break;
|
||||
|
@ -695,7 +695,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
|
|||
void *config, u32 configLen)
|
||||
{
|
||||
u32 count;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
switch(opcode) {
|
||||
case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
|
||||
|
@ -785,7 +785,7 @@ hifIRQHandler(struct sdio_func *func)
|
|||
status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context);
|
||||
sdio_claim_host(device->func);
|
||||
atomic_set(&device->irqHandling, 0);
|
||||
AR_DEBUG_ASSERT(status == A_OK || status == A_ECANCELED);
|
||||
AR_DEBUG_ASSERT(status == 0 || status == A_ECANCELED);
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n"));
|
||||
}
|
||||
|
||||
|
@ -797,7 +797,7 @@ static int startup_task(void *param)
|
|||
device = (HIF_DEVICE *)param;
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
|
||||
/* start up inform DRV layer */
|
||||
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != A_OK) {
|
||||
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
|
||||
}
|
||||
return 0;
|
||||
|
@ -814,7 +814,7 @@ static int enable_task(void *param)
|
|||
if (device &&
|
||||
device->claimedContext &&
|
||||
osdrvCallbacks.devicePowerChangeHandler &&
|
||||
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != A_OK)
|
||||
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
|
||||
}
|
||||
|
@ -952,7 +952,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
|
|||
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
|
||||
{
|
||||
int ret;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
|
||||
device = getHifDevice(func);
|
||||
|
@ -988,7 +988,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
|
|||
|
||||
sdio_release_host(device->func);
|
||||
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
device->is_disabled = true;
|
||||
}
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
|
||||
|
@ -1001,7 +1001,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
|
|||
struct task_struct* pTask;
|
||||
const char *taskName = NULL;
|
||||
int (*taskFunc)(void *) = NULL;
|
||||
int ret = A_OK;
|
||||
int ret = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
|
||||
device = getHifDevice(func);
|
||||
|
@ -1055,7 +1055,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
|
|||
if (!device->claimedContext) {
|
||||
taskFunc = startup_task;
|
||||
taskName = "AR6K startup";
|
||||
ret = A_OK;
|
||||
ret = 0;
|
||||
#if defined(CONFIG_PM)
|
||||
} else {
|
||||
taskFunc = enable_task;
|
||||
|
@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
|
|||
static int hifDeviceSuspend(struct device *dev)
|
||||
{
|
||||
struct sdio_func *func=dev_to_sdio_func(dev);
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HIF_DEVICE *device;
|
||||
|
||||
device = getHifDevice(func);
|
||||
|
@ -1095,7 +1095,7 @@ static int hifDeviceSuspend(struct device *dev)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));
|
||||
|
||||
switch (status) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY:
|
||||
return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */
|
||||
|
@ -1107,14 +1107,14 @@ static int hifDeviceSuspend(struct device *dev)
|
|||
static int hifDeviceResume(struct device *dev)
|
||||
{
|
||||
struct sdio_func *func=dev_to_sdio_func(dev);
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HIF_DEVICE *device;
|
||||
|
||||
device = getHifDevice(func);
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
|
||||
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
|
||||
status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
device->is_suspend = false;
|
||||
}
|
||||
}
|
||||
|
@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)
|
|||
|
||||
static void hifDeviceRemoved(struct sdio_func *func)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HIF_DEVICE *device;
|
||||
AR_DEBUG_ASSERT(func != NULL);
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
|
|||
CleanupHIFScatterResources(device);
|
||||
|
||||
delHifDevice(device);
|
||||
AR_DEBUG_ASSERT(status == A_OK);
|
||||
AR_DEBUG_ASSERT(status == 0);
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
|
||||
}
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
|
|||
{
|
||||
s32 cnt = 10;
|
||||
u8 host_int_status;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
do {
|
||||
while (atomic_read(&device->irqHandling)) {
|
||||
|
@ -1178,7 +1178,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
|
|||
("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__));
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1240,7 +1240,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
|
|||
return A_ERROR;
|
||||
}
|
||||
device->htcCallbacks = *callbacks;
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void HIFDetachHTC(HIF_DEVICE *device)
|
||||
|
|
|
@ -89,7 +89,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
|
|||
struct mmc_data data;
|
||||
HIF_SCATTER_REQ_PRIV *pReqPriv;
|
||||
HIF_SCATTER_REQ *pReq;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct scatterlist *pSg;
|
||||
|
||||
pReqPriv = busrequest->pScatterReq;
|
||||
|
@ -260,7 +260,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest));
|
||||
/* wake thread, it will process and then take care of the async callback */
|
||||
up(&device->sem_async);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
|
||||
} while (false);
|
||||
|
@ -268,7 +268,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
|
|||
if (status && (request & HIF_ASYNCHRONOUS)) {
|
||||
pReq->CompletionStatus = status;
|
||||
pReq->CompletionRoutine(pReq);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -344,7 +344,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
|
|||
pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ;
|
||||
pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE;
|
||||
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
|
||||
} while (false);
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void DevCleanup(AR6K_DEVICE *pDev)
|
|||
int DevSetup(AR6K_DEVICE *pDev)
|
||||
{
|
||||
u32 blocksizes[AR6K_MAILBOXES];
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int i;
|
||||
HTC_CALLBACKS htcCallbacks;
|
||||
|
||||
|
@ -309,7 +309,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
|
|||
* and when HTC is finally ready to handle interrupts, other software can perform target "soft" resets.
|
||||
* The AR6K interrupt enables reset back to an "enabled" state when this happens.
|
||||
* */
|
||||
int IntStatus = A_OK;
|
||||
int IntStatus = 0;
|
||||
DevDisableInterrupts(pDev);
|
||||
|
||||
#ifdef THREAD_X
|
||||
|
@ -357,7 +357,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
|
|||
* disable recv events */
|
||||
static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
|
||||
|
@ -405,7 +405,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo
|
|||
* the host I/F */
|
||||
static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
AR6K_IRQ_ENABLE_REGISTERS regs;
|
||||
|
||||
|
@ -490,7 +490,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)
|
|||
|
||||
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
A_UCHAR host_int_status = 0x0;
|
||||
u32 counter = 0x0;
|
||||
|
||||
|
@ -519,7 +519,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin
|
|||
host_int_status = !status ? (host_int_status & (1 << 0)):0;
|
||||
if(!host_int_status)
|
||||
{
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
*pbIsRecvPending = false;
|
||||
break;
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
|
|||
remaining -= length;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
|
||||
|
@ -667,7 +667,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
|
|||
static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
|
||||
{
|
||||
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
u32 request = pReq->Request;
|
||||
|
||||
|
@ -727,7 +727,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
|
|||
}
|
||||
pReq->CompletionStatus = status;
|
||||
pReq->CompletionRoutine(pReq);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
|
||||
return status;
|
||||
|
@ -751,7 +751,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
|
|||
/* function to set up virtual scatter support if HIF layer has not implemented the interface */
|
||||
static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int bufferSize, sgreqSize;
|
||||
int i;
|
||||
DEV_SCATTER_DMA_VIRTUAL_INFO *pVirtualInfo;
|
||||
|
@ -923,7 +923,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
|
|||
if (Async) {
|
||||
pScatterReq->CompletionStatus = status;
|
||||
pScatterReq->CompletionRoutine(pScatterReq);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -936,7 +936,7 @@ int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, boo
|
|||
DEV_FINISH_SCATTER_OPERATION(pScatterReq);
|
||||
} else {
|
||||
if (status == A_PENDING) {
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ static u16 GetEndMarker(void)
|
|||
/* send the ordered buffers to the target */
|
||||
static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u32 request = HIF_WR_SYNC_BLOCK_INC;
|
||||
BUFFER_PROC_LIST sendList[BUFFER_PROC_LIST_DEPTH];
|
||||
int i;
|
||||
|
@ -1171,7 +1171,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
|
|||
/* poll the mailbox credit counter until we get a credit or timeout */
|
||||
static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int timeout = TEST_CREDITS_RECV_TIMEOUT;
|
||||
u8 credits = 0;
|
||||
u32 address;
|
||||
|
@ -1207,7 +1207,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
|
|||
|
||||
}
|
||||
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
*pCredits = credits;
|
||||
}
|
||||
|
||||
|
@ -1218,7 +1218,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
|
|||
/* wait for the buffers to come back */
|
||||
static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u32 request = HIF_RD_SYNC_BLOCK_INC;
|
||||
BUFFER_PROC_LIST recvList[BUFFER_PROC_LIST_DEPTH];
|
||||
int curBuffer;
|
||||
|
@ -1457,7 +1457,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev)
|
|||
|
||||
} while (false);
|
||||
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n"));
|
||||
} else {
|
||||
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - FAILED! - \n"));
|
||||
|
|
|
@ -189,7 +189,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
|
|||
A_ASSERT(false);
|
||||
if (pPacket->Completion != NULL) {
|
||||
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
return A_EINVAL;
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
|
|||
pPacket->Status = status;
|
||||
} else {
|
||||
if (status == A_PENDING) {
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Recv
|
|||
paddedLength,RecvLength,pPacket->BufferLength));
|
||||
if (pPacket->Completion != NULL) {
|
||||
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
return A_EINVAL;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
|
|||
if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
|
||||
return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);
|
||||
} else {
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -346,12 +346,12 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
|
|||
|
||||
/* compiled out */
|
||||
#define DevCleanupGMbox(p)
|
||||
#define DevCheckGMboxInterrupts(p) A_OK
|
||||
#define DevCheckGMboxInterrupts(p) 0
|
||||
#define DevNotifyGMboxTargetFailure(p)
|
||||
|
||||
static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
|
||||
pDev->GMboxEnabled = false;
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -55,7 +55,7 @@ int DevRWCompletionHandler(void *context, int status)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
|
||||
("-DevRWCompletionHandler\n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* mailbox recv message polling */
|
||||
|
@ -63,7 +63,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
|
|||
u32 *pLookAhead,
|
||||
int TimeoutMS)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int timeout = TimeoutMS/DELAY_PER_INTERVAL_MS;
|
||||
|
||||
A_ASSERT(timeout > 0);
|
||||
|
@ -187,7 +187,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
|
|||
HIF_WR_SYNC_BYTE_FIX,
|
||||
NULL);
|
||||
|
||||
A_ASSERT(status == A_OK);
|
||||
A_ASSERT(status == 0);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
|
|||
HIF_WR_SYNC_BYTE_FIX,
|
||||
NULL);
|
||||
|
||||
A_ASSERT(status == A_OK);
|
||||
A_ASSERT(status == 0);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
|
|||
HIF_RD_SYNC_BYTE_INC,
|
||||
NULL);
|
||||
|
||||
A_ASSERT(status == A_OK);
|
||||
A_ASSERT(status == 0);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev)
|
|||
return DevServiceDebugInterrupt(pDev);
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* callback when our fetch to get interrupt status registers completes */
|
||||
|
@ -391,7 +391,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
|
|||
int DevCheckPendingRecvMsgsAsync(void *context)
|
||||
{
|
||||
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket;
|
||||
|
||||
/* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
|
||||
|
@ -469,7 +469,7 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev)
|
|||
/* process pending interrupts synchronously */
|
||||
static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 host_int_status = 0;
|
||||
u32 lookAhead = 0;
|
||||
|
||||
|
@ -684,7 +684,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces
|
|||
int DevDsrHandler(void *context)
|
||||
{
|
||||
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
bool done = false;
|
||||
bool asyncProc = false;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
|
|||
|
||||
static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
AR6K_IRQ_ENABLE_REGISTERS regs;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
|
||||
|
@ -157,7 +157,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
|
|||
|
||||
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
u8 GMboxIntControl[4];
|
||||
|
||||
|
@ -271,7 +271,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev)
|
|||
|
||||
int DevSetupGMbox(AR6K_DEVICE *pDev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 muxControl[4];
|
||||
|
||||
do {
|
||||
|
@ -324,7 +324,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
|
|||
|
||||
int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 counter_int_status;
|
||||
int credits;
|
||||
u8 host_int_status2;
|
||||
|
@ -426,7 +426,7 @@ int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength)
|
|||
pPacket->Status = status;
|
||||
} else {
|
||||
if (status == A_PENDING) {
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -450,7 +450,7 @@ int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength)
|
|||
paddedLength,ReadLength,pPacket->BufferLength));
|
||||
if (pPacket->Completion != NULL) {
|
||||
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
return A_EINVAL;
|
||||
}
|
||||
|
@ -541,7 +541,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
|
|||
|
||||
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pIOPacket = NULL;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
|
||||
|
@ -637,7 +637,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev)
|
|||
int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes)
|
||||
{
|
||||
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
AR6K_IRQ_PROC_REGISTERS procRegs;
|
||||
int maxCopy;
|
||||
|
||||
|
@ -678,7 +678,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo
|
|||
|
||||
int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int i;
|
||||
u8 buffer[4];
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQE
|
|||
bool enableCreditIrq = false;
|
||||
bool disableCreditIrq = false;
|
||||
bool doPendingSends = false;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
/** this callback is called under 2 conditions:
|
||||
* 1. The credit IRQ interrupt was enabled and signaled.
|
||||
|
@ -307,7 +307,7 @@ static void StateDumpCallback(void *pContext)
|
|||
static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidBytes)
|
||||
{
|
||||
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int totalRecvLength = 0;
|
||||
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
|
||||
bool recvRefillCalled = false;
|
||||
|
@ -476,7 +476,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
|
|||
/* adjust buffer to move past packet ID */
|
||||
pPacket->pBuffer++;
|
||||
pPacket->ActualLength = totalRecvLength - 1;
|
||||
pPacket->Status = A_OK;
|
||||
pPacket->Status = 0;
|
||||
/* indicate packet */
|
||||
DO_HCI_RECV_INDICATION(pProt,pPacket);
|
||||
pPacket = NULL;
|
||||
|
@ -549,7 +549,7 @@ static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
|
|||
|
||||
static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int credits;
|
||||
int retry = 100;
|
||||
|
||||
|
@ -581,7 +581,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt)
|
|||
|
||||
static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int transferLength;
|
||||
int creditsRequired, remainder;
|
||||
u8 hciUartType;
|
||||
|
@ -848,7 +848,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt)
|
|||
|
||||
int GMboxProtocolInstall(AR6K_DEVICE *pDev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
GMBOX_PROTO_HCI_UART *pProtocol = NULL;
|
||||
|
||||
do {
|
||||
|
@ -911,7 +911,7 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev)
|
|||
static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt)
|
||||
{
|
||||
HCI_TRANSPORT_PROPERTIES props;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
do {
|
||||
|
||||
|
@ -1004,7 +1004,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
|
|||
int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
|
||||
{
|
||||
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
bool unblockRecv = false;
|
||||
HTC_PACKET *pPacket;
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HCI_TransportAddReceivePkt \n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous)
|
||||
|
@ -1163,7 +1163,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
|
|||
int MaxPollMS)
|
||||
{
|
||||
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 lookAhead[8];
|
||||
int bytes;
|
||||
int totalRecvLength;
|
||||
|
@ -1216,7 +1216,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
|
|||
|
||||
pPacket->pBuffer++;
|
||||
pPacket->ActualLength = totalRecvLength - 1;
|
||||
pPacket->Status = A_OK;
|
||||
pPacket->Status = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1235,7 +1235,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
|
|||
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
|
||||
HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice);
|
||||
u32 scaledBaud, scratchAddr;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
/* Divide the desired baud rate by 100
|
||||
* Store the LSB in the local scratch register 4 and the MSB in the local
|
||||
|
@ -1247,14 +1247,14 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
|
|||
scratchAddr = MBOX_BASE_ADDRESS | (LOCAL_SCRATCH_ADDRESS + 4 * MSB_SCRATCH_IDX);
|
||||
scaledBaud = ((Baud / 100) >> (LOCAL_SCRATCH_VALUE_MSB+1)) & LOCAL_SCRATCH_VALUE_MASK;
|
||||
status |= ar6000_WriteRegDiag(pHIFDevice, &scratchAddr, &scaledBaud);
|
||||
if (A_OK != status) {
|
||||
if (0 != status) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to set up baud rate in scratch register!"));
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Now interrupt the target to tell it about the baud rate */
|
||||
status = DevGMboxSetTargetInterrupt(pProt->pDev, MBOX_SIG_HCI_BRIDGE_BAUD_SET, BAUD_TIMEOUT_MS);
|
||||
if (A_OK != status) {
|
||||
if (0 != status) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to tell target to change baud rate!"));
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ static void HTCCleanup(HTC_TARGET *target)
|
|||
HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
|
||||
{
|
||||
HTC_TARGET *target = NULL;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int i;
|
||||
u32 ctrl_bufsz;
|
||||
u32 blocksizes[HTC_MAILBOX_NUM_MAX];
|
||||
|
|
|
@ -105,7 +105,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
|
|||
|
||||
pOrigBuffer = pBuffer;
|
||||
origLength = Length;
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
|
||||
while (Length > 0) {
|
||||
|
||||
|
@ -233,7 +233,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
|
|||
{
|
||||
u8 temp;
|
||||
u8 *pBuf;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u16 payloadLen;
|
||||
u32 lookAhead;
|
||||
|
||||
|
@ -692,7 +692,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
|
|||
HTC_ENDPOINT *pEndpoint,
|
||||
HTC_PACKET_QUEUE *pQueue)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pPacket;
|
||||
HTC_FRAME_HDR *pHdr;
|
||||
int i,j;
|
||||
|
@ -816,7 +816,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
|
|||
/* clear flags */
|
||||
pPacket->PktInfo.AsRx.HTCRxFlags = 0;
|
||||
pPacket->PktInfo.AsRx.IndicationFlags = 0;
|
||||
pPacket->Status = A_OK;
|
||||
pPacket->Status = 0;
|
||||
|
||||
if (noRecycle) {
|
||||
/* flag that these packets cannot be recycled, they have to be returned to the
|
||||
|
@ -859,7 +859,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
|
|||
if (status) {
|
||||
if (A_NO_RESOURCE == status) {
|
||||
/* this is actually okay */
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -990,7 +990,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
|
|||
int *pNumPacketsFetched,
|
||||
bool PartialBundle)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HIF_SCATTER_REQ *pScatterReq;
|
||||
int i, totalLength;
|
||||
int pktsToScatter;
|
||||
|
@ -1120,7 +1120,7 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
|
|||
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched)
|
||||
{
|
||||
HTC_TARGET *target = (HTC_TARGET *)Context;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pPacket;
|
||||
HTC_ENDPOINT *pEndpoint;
|
||||
bool asyncProc = false;
|
||||
|
@ -1390,7 +1390,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
|
|||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||
HTC_ENDPOINT *pEndpoint;
|
||||
bool unblockRecv = false;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pFirstPacket;
|
||||
|
||||
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
|
||||
|
@ -1567,7 +1567,7 @@ int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
|
|||
u32 TimeoutInMs,
|
||||
bool *pbIsRecvPending)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||
|
||||
status = DevWaitForPendingRecv(&target->Device,
|
||||
|
|
|
@ -270,7 +270,7 @@ static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
|
|||
HTC_PACKET *pPacket;
|
||||
HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
|
||||
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET_QUEUE sendCompletes;
|
||||
|
||||
INIT_HTC_PACKET_QUEUE(&sendCompletes);
|
||||
|
@ -705,7 +705,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
|
|||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("-HTCSendPktsMultiple \n"));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* HTC API - HTCSendPkt */
|
||||
|
|
|
@ -126,7 +126,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
|
|||
HTC_SERVICE_CONNECT_RESP *pConnectResp)
|
||||
{
|
||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pRecvPacket = NULL;
|
||||
HTC_PACKET *pSendPacket = NULL;
|
||||
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
|
||||
|
@ -290,7 +290,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
|
|||
/* save local connection flags */
|
||||
pEndpoint->LocalConnectionFlags = pConnectReq->LocalConnectionFlags;
|
||||
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
|
||||
} while (false);
|
||||
|
||||
|
|
|
@ -32,11 +32,10 @@
|
|||
/*
|
||||
* Generic error codes that can be used by hw, sta, ap, sim, dk
|
||||
* and any other environments.
|
||||
* Feel free to add any more codes that you need.
|
||||
* Feel free to add any more non-zero codes that you need.
|
||||
*/
|
||||
|
||||
#define A_ERROR (-1) /* Generic error return */
|
||||
#define A_OK 0 /* success */
|
||||
#define A_DEVICE_NOT_FOUND 1 /* not able to find PCI device */
|
||||
#define A_NO_MEMORY 2 /* not able to allocate memory,
|
||||
* not avail#defineable */
|
||||
|
|
|
@ -1884,7 +1884,7 @@ typedef PREPACK struct {
|
|||
} POSTPACK WMI_CHANNEL_LIST_REPLY;
|
||||
|
||||
typedef enum {
|
||||
A_SUCCEEDED = A_OK,
|
||||
A_SUCCEEDED = 0,
|
||||
A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
|
||||
A_SUCCEEDED_MODIFY_STREAM=251,
|
||||
A_FAILED_INVALID_STREAM = 252,
|
||||
|
|
|
@ -134,7 +134,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans);
|
|||
@input: HciTrans - HCI transport handle
|
||||
pQueue - a queue holding one or more packets
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: user must supply HTC packets for capturing incomming HCI packets. The caller
|
||||
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
|
||||
macro. Each packet in the queue must be of the same type and length
|
||||
|
@ -150,7 +150,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
|
|||
pPacket - packet to send
|
||||
Synchronous - send the packet synchronously (blocking)
|
||||
@output:
|
||||
@return: A_OK
|
||||
@return: 0
|
||||
@notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() and
|
||||
HCI_SET_PACKET_TYPE() macros to prepare the packet.
|
||||
If Synchronous is set to false the call is fully asynchronous. On error or completion,
|
||||
|
@ -187,7 +187,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans);
|
|||
@function name: HCI_TransportStart
|
||||
@input: HciTrans - hci transport handle
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: HCI transport communication will begin, the caller can expect the arrival
|
||||
of HCI recv packets as soon as this call returns.
|
||||
@example:
|
||||
|
@ -201,7 +201,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
|
|||
@input: HciTrans - hci transport handle
|
||||
Enable - enable or disable asynchronous recv
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: This API must be called when HCI recv is handled synchronously
|
||||
@example:
|
||||
@see also:
|
||||
|
@ -215,7 +215,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E
|
|||
pPacket - HTC packet to hold the recv data
|
||||
MaxPollMS - maximum polling duration in Milliseconds;
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: This API should be used only during HCI device initialization, the caller must call
|
||||
HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API.
|
||||
This API will only capture HCI Event packets.
|
||||
|
@ -232,7 +232,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
|
|||
@input: HciTrans - hci transport handle
|
||||
Baud - baud rate in bps
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: This API should be used only after HCI device initialization
|
||||
@example:
|
||||
@see also:
|
||||
|
@ -245,7 +245,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
|
|||
@input: HciTrans - hci transport handle
|
||||
Enable - 1 = Enable, 0 = Disable
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes:
|
||||
@example:
|
||||
@see also:
|
||||
|
|
|
@ -341,7 +341,7 @@ int HTCStart(HTC_HANDLE HTCHandle);
|
|||
@input: HTCHandle - HTC handle
|
||||
pPacket - HTC receive packet to add
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: user must supply HTC packets for capturing incomming HTC frames. The caller
|
||||
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
|
||||
macro.
|
||||
|
@ -370,7 +370,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
|
|||
@input: HTCHandle - HTC handle
|
||||
pPacket - packet to send
|
||||
@output:
|
||||
@return: A_OK
|
||||
@return: 0
|
||||
@notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() macro.
|
||||
This interface is fully asynchronous. On error, HTC SendPkt will
|
||||
call the registered Endpoint callback to cleanup the packet.
|
||||
|
@ -499,7 +499,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
|
|||
@input: HTCHandle - HTC handle
|
||||
pPktQueue - local queue holding packets to send
|
||||
@output:
|
||||
@return: A_OK
|
||||
@return: 0
|
||||
@notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro.
|
||||
The queue must only contain packets directed at the same endpoint.
|
||||
Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order.
|
||||
|
@ -519,7 +519,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
|
|||
@input: HTCHandle - HTC handle
|
||||
pPktQueue - HTC receive packet queue holding packets to add
|
||||
@output:
|
||||
@return: A_OK on success
|
||||
@return: 0 on success
|
||||
@notes: user must supply HTC packets for capturing incomming HTC frames. The caller
|
||||
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
|
||||
macro. The queue must only contain recv packets for the same endpoint.
|
||||
|
|
|
@ -54,7 +54,7 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig,
|
|||
int Length)
|
||||
{
|
||||
HTC_PACKET *pPacket = NULL;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
do {
|
||||
|
||||
|
@ -88,7 +88,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
|
|||
u8 *pBuffer,
|
||||
int *pLength)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HTC_PACKET *pRecvPacket = NULL;
|
||||
|
||||
do {
|
||||
|
@ -128,7 +128,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
|
|||
u8 **ppEventBuffer,
|
||||
u8 **ppBufferToFree)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 *pBuffer = NULL;
|
||||
u8 *pTemp;
|
||||
int length;
|
||||
|
@ -211,7 +211,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
|
|||
|
||||
static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 hciBaudChangeCommand[] = {0x0c,0xfc,0x2,0,0};
|
||||
u16 baudVal;
|
||||
u8 *pEvent = NULL;
|
||||
|
@ -312,7 +312,7 @@ static int AR3KExitMinBoot(AR3K_CONFIG_INFO *pConfig)
|
|||
|
||||
static int AR3KConfigureSendHCIReset(AR3K_CONFIG_INFO *pConfig)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u8 hciResetCommand[] = {0x03,0x0c,0x0};
|
||||
u8 *pEvent = NULL;
|
||||
u8 *pBufferToFree = NULL;
|
||||
|
@ -455,7 +455,7 @@ static int AR3KEnableTLPM(AR3K_CONFIG_INFO *pConfig)
|
|||
|
||||
int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuring AR3K ...\n"));
|
||||
|
||||
|
@ -481,7 +481,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
|
|||
|
||||
|
||||
/* Load patching and PST file if available*/
|
||||
if (A_OK != AthPSInitialize(pConfig)) {
|
||||
if (0 != AthPSInitialize(pConfig)) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Patch Download Failed!\n"));
|
||||
}
|
||||
|
||||
|
@ -523,7 +523,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
|
|||
|
||||
int AR3KConfigureExit(void *config)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
AR3K_CONFIG_INFO *pConfig = (AR3K_CONFIG_INFO *)config;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleaning up AR3K ...\n"));
|
||||
|
|
|
@ -93,7 +93,7 @@ void Hci_log(A_UCHAR * log_string,A_UCHAR *data,u32 len)
|
|||
|
||||
int AthPSInitialize(AR3K_CONFIG_INFO *hdev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
if(hdev == NULL) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Device handle received\n"));
|
||||
return A_ERROR;
|
||||
|
@ -280,8 +280,8 @@ int PSSendOps(void *arg)
|
|||
HciCmdList[0].Hcipacket,
|
||||
HciCmdList[0].packetLen,
|
||||
&event,
|
||||
&bufferToFree) == A_OK) {
|
||||
if(ReadPSEvent(event) == A_OK) { /* Exit if the status is success */
|
||||
&bufferToFree) == 0) {
|
||||
if(ReadPSEvent(event) == 0) { /* Exit if the status is success */
|
||||
if(bufferToFree != NULL) {
|
||||
A_FREE(bufferToFree);
|
||||
}
|
||||
|
@ -309,8 +309,8 @@ int PSSendOps(void *arg)
|
|||
HciCmdList[i].Hcipacket,
|
||||
HciCmdList[i].packetLen,
|
||||
&event,
|
||||
&bufferToFree) == A_OK) {
|
||||
if(ReadPSEvent(event) != A_OK) { /* Exit if the status is success */
|
||||
&bufferToFree) == 0) {
|
||||
if(ReadPSEvent(event) != 0) { /* Exit if the status is success */
|
||||
if(bufferToFree != NULL) {
|
||||
A_FREE(bufferToFree);
|
||||
}
|
||||
|
@ -415,7 +415,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
|
|||
return A_ERROR;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* HCI_TRANSPORT_SDIO */
|
||||
|
||||
|
@ -426,14 +426,14 @@ int ReadPSEvent(A_UCHAR* Data){
|
|||
{
|
||||
switch(Data[3]){
|
||||
case 0x0B:
|
||||
return A_OK;
|
||||
return 0;
|
||||
break;
|
||||
case 0x0C:
|
||||
/* Change Baudrate */
|
||||
return A_OK;
|
||||
return 0;
|
||||
break;
|
||||
case 0x04:
|
||||
return A_OK;
|
||||
return 0;
|
||||
break;
|
||||
case 0x1E:
|
||||
Rom_Version = Data[9];
|
||||
|
@ -445,7 +445,7 @@ int ReadPSEvent(A_UCHAR* Data){
|
|||
Build_Version = ((Build_Version << 8) |Data[12]);
|
||||
Build_Version = ((Build_Version << 8) |Data[11]);
|
||||
Build_Version = ((Build_Version << 8) |Data[10]);
|
||||
return A_OK;
|
||||
return 0;
|
||||
break;
|
||||
|
||||
|
||||
|
@ -499,13 +499,13 @@ int write_bdaddr(AR3K_CONFIG_INFO *pConfig,A_UCHAR *bdaddr,int type)
|
|||
bdaddr_cmd[outc] = bdaddr[inc];
|
||||
}
|
||||
|
||||
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd,
|
||||
if(0 == SendHCICommandWaitCommandComplete(pConfig,bdaddr_cmd,
|
||||
sizeof(bdaddr_cmd),
|
||||
&event,&bufferToFree)) {
|
||||
|
||||
if(event[4] == 0xFC && event[5] == 0x00){
|
||||
if(event[3] == 0x0B){
|
||||
result = A_OK;
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -522,7 +522,7 @@ int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig)
|
|||
u8 *event;
|
||||
u8 *bufferToFree = NULL;
|
||||
int result = A_ERROR;
|
||||
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
|
||||
if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
|
||||
result = ReadPSEvent(event);
|
||||
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
|
|||
hciCommand[4] = (u8)((FPGA_REGISTER >> 8) & 0xFF);
|
||||
hciCommand[5] = (u8)((FPGA_REGISTER >> 16) & 0xFF);
|
||||
hciCommand[6] = (u8)((FPGA_REGISTER >> 24) & 0xFF);
|
||||
if(A_OK == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
|
||||
if(0 == SendHCICommandWaitCommandComplete(pConfig,hciCommand,sizeof(hciCommand),&event,&bufferToFree)) {
|
||||
|
||||
if(event[4] == 0xFC && event[5] == 0x00){
|
||||
switch(event[3]){
|
||||
|
@ -553,7 +553,7 @@ int getDeviceType(AR3K_CONFIG_INFO *pConfig, u32 *code)
|
|||
reg = ((reg << 8) |event[7]);
|
||||
reg = ((reg << 8) |event[6]);
|
||||
*code = reg;
|
||||
result = A_OK;
|
||||
result = 0;
|
||||
|
||||
break;
|
||||
case 0x06:
|
||||
|
|
|
@ -549,7 +549,7 @@ int AthParseFilesUnified(A_UCHAR *srcbuffer,u32 srclen, int FileFormat)
|
|||
if(Buffer != NULL) {
|
||||
A_FREE(Buffer);
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
@ -576,7 +576,7 @@ int GetNextTwoChar(A_UCHAR *srcbuffer,u32 len, u32 *pos, char *buffer)
|
|||
{
|
||||
return A_ERROR;
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
|
||||
|
@ -654,7 +654,7 @@ int AthDoParsePatch(A_UCHAR *patchbuffer, u32 patchlen)
|
|||
|
||||
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -953,7 +953,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, u32 Param1,PSCmdPacket *PSPatch
|
|||
case CHANGE_BDADDR:
|
||||
break;
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
|
||||
{
|
||||
|
@ -965,5 +965,5 @@ int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
|
|||
A_FREE((*HciPacketList)[i].Hcipacket);
|
||||
}
|
||||
A_FREE(*HciPacketList);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
|
|||
return status;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
|
@ -177,7 +177,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
|
|||
return status;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -248,11 +248,11 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
|
|||
A_UCHAR *data, u32 length)
|
||||
{
|
||||
u32 count;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
for (count = 0; count < length; count += 4, address += 4) {
|
||||
if ((status = ar6000_ReadRegDiag(hifDevice, &address,
|
||||
(u32 *)&data[count])) != A_OK)
|
||||
(u32 *)&data[count])) != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -266,11 +266,11 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
|
|||
A_UCHAR *data, u32 length)
|
||||
{
|
||||
u32 count;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
for (count = 0; count < length; count += 4, address += 4) {
|
||||
if ((status = ar6000_WriteRegDiag(hifDevice, &address,
|
||||
(u32 *)&data[count])) != A_OK)
|
||||
(u32 *)&data[count])) != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -382,13 +382,13 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
|
|||
actual_wait += 100;
|
||||
|
||||
data = 0;
|
||||
if (ar6000_ReadRegDiag(hifDevice, &address, &data) != A_OK) {
|
||||
if (ar6000_ReadRegDiag(hifDevice, &address, &data) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
if (data != 0) {
|
||||
/* No need to wait longer -- we have a BMI credit */
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return A_ERROR; /* timed out */
|
||||
|
@ -401,7 +401,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
|
|||
/* reset device */
|
||||
int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u32 address;
|
||||
u32 data;
|
||||
|
||||
|
@ -476,7 +476,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl
|
|||
AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This should be called in BMI phase after firmware is downloaded */
|
||||
|
@ -490,7 +490,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
|
|||
if (BMIReadMemory(hifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(TargetType, hi_board_data),
|
||||
(A_UCHAR *)&eepHeaderAddr,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadMemory for reading board data address failed \n"));
|
||||
return;
|
||||
|
@ -500,7 +500,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
|
|||
eepHeaderAddr += 36; /* AR6003 customer data section offset is 37 */
|
||||
|
||||
for (i=0; i<AR6003_CUST_DATA_SIZE+4; i+=4){
|
||||
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= A_OK) {
|
||||
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&AR6003CustDataShadow[i])!= 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
|
||||
return ;
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
|
|||
eepHeaderAddr += 64; /* AR6002 customer data sectioin offset is 64 */
|
||||
|
||||
for (i=0; i<AR6002_CUST_DATA_SIZE; i+=4){
|
||||
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= A_OK) {
|
||||
if (BMIReadSOCRegister(hifDevice, eepHeaderAddr, (u32 *)&custDataAR6002[i])!= 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMIReadSOCRegister () failed \n"));
|
||||
return ;
|
||||
}
|
||||
|
@ -686,7 +686,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
|
|||
|
||||
static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
/* placeholder */
|
||||
|
||||
|
@ -695,7 +695,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
|
|||
|
||||
static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
/* placeholder */
|
||||
|
||||
|
@ -714,7 +714,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
|
|||
return prepare_ar6003(hifDevice,TargetVersion);
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_AR6002_REV1_FORCE_HOST)
|
||||
|
@ -734,7 +734,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
|
|||
};
|
||||
struct forceROM_s *ForceROM;
|
||||
s32 szForceROM;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u32 address;
|
||||
u32 data;
|
||||
|
||||
|
@ -782,7 +782,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
|
|||
{
|
||||
if (ar6000_WriteRegDiag(hifDevice,
|
||||
&ForceROM[i].addr,
|
||||
&ForceROM[i].data) != A_OK)
|
||||
&ForceROM[i].data) != 0)
|
||||
{
|
||||
ATH_DEBUG_PRINTF (DBG_MISC_DRV, ATH_DEBUG_TRC, ("Cannot force Target to recognize Host!\n"));
|
||||
return A_ERROR;
|
||||
|
@ -791,7 +791,7 @@ ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
|
|||
|
||||
A_MDELAY(1000);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_AR6002_REV1_FORCE_HOST */
|
||||
|
@ -942,7 +942,7 @@ int a_get_module_mask(char *module_name, u32 *pMask)
|
|||
}
|
||||
|
||||
*pMask = pInfo->CurrentMask;
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int a_set_module_mask(char *module_name, u32 Mask)
|
||||
|
@ -955,7 +955,7 @@ int a_set_module_mask(char *module_name, u32 Mask)
|
|||
|
||||
pInfo->CurrentMask = Mask;
|
||||
A_PRINTF("Module %s, new mask: 0x%8.8X \n",module_name,pInfo->CurrentMask);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
|
|||
u32 TargetType,
|
||||
u32 Flags)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
do {
|
||||
|
||||
|
|
|
@ -413,6 +413,6 @@ int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, COMMON_CREDIT_STATE_INFO *pCr
|
|||
servicepriority,
|
||||
5);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -410,19 +410,19 @@ ar6000_set_host_app_area(AR_SOFTC_T *ar)
|
|||
|
||||
/* Fetch the address of the host_app_area_s instance in the host interest area */
|
||||
address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest));
|
||||
if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != A_OK) {
|
||||
if (ar6000_ReadRegDiag(ar->arHifDevice, &address, &data) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
address = TARG_VTOP(ar->arTargetType, data);
|
||||
host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION;
|
||||
if (ar6000_WriteDataDiag(ar->arHifDevice, address,
|
||||
(A_UCHAR *)&host_app_area,
|
||||
sizeof(struct host_app_area_s)) != A_OK)
|
||||
sizeof(struct host_app_area_s)) != 0)
|
||||
{
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar)
|
||||
|
@ -433,7 +433,7 @@ u32 dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar)
|
|||
|
||||
address = TARG_VTOP(ar->arTargetType, HOST_INTEREST_ITEM_ADDRESS(ar, hi_dbglog_hdr));
|
||||
if ((status = ar6000_ReadDataDiag(ar->arHifDevice, address,
|
||||
(A_UCHAR *)¶m, 4)) != A_OK)
|
||||
(A_UCHAR *)¶m, 4)) != 0)
|
||||
{
|
||||
param = 0;
|
||||
}
|
||||
|
@ -566,7 +566,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
|
|||
if (ar->log_cnt > (DBGLOG_HOST_LOG_BUFFER_SIZE - length)) {
|
||||
ar->log_cnt = 0;
|
||||
}
|
||||
if(A_OK != ar6000_ReadDataDiag(ar->arHifDevice, address,
|
||||
if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address,
|
||||
(A_UCHAR *)&ar->log_buffer[ar->log_cnt], length))
|
||||
{
|
||||
break;
|
||||
|
@ -581,7 +581,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
|
|||
address = TARG_VTOP(ar->arTargetType, data[0] /* next */);
|
||||
length = 4 /* sizeof(next) */ + 4 /* sizeof(buffer) */ + 4 /* sizeof(bufsize) */ + 4 /* sizeof(length) */ + 4 /* sizeof(count) */ + 4 /* sizeof(free) */;
|
||||
A_MEMZERO(data, sizeof(data));
|
||||
if(A_OK != ar6000_ReadDataDiag(ar->arHifDevice, address,
|
||||
if(0 != ar6000_ReadDataDiag(ar->arHifDevice, address,
|
||||
(A_UCHAR *)&data, length))
|
||||
{
|
||||
break;
|
||||
|
@ -592,7 +592,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar)
|
|||
|
||||
ar->dbgLogFetchInProgress = false;
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -759,7 +759,7 @@ aptcTimerHandler(unsigned long arg)
|
|||
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
|
||||
status = wmi_powermode_cmd(ar->arWmi, REC_POWER);
|
||||
AR6000_SPIN_LOCK(&ar->arLock, 0);
|
||||
A_ASSERT(status == A_OK);
|
||||
A_ASSERT(status == 0);
|
||||
aptcTR.timerScheduled = false;
|
||||
} else {
|
||||
A_TIMEOUT_MS(&aptcTimer, APTC_TRAFFIC_SAMPLING_INTERVAL, 0);
|
||||
|
@ -816,7 +816,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj,
|
|||
|
||||
if (index == MAX_AR6000) return 0;
|
||||
|
||||
if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != A_OK) {
|
||||
if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -843,7 +843,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj,
|
|||
|
||||
if (index == MAX_AR6000) return 0;
|
||||
|
||||
if ((BMIRawWrite(ar->arHifDevice, (A_UCHAR*)buf, count)) != A_OK) {
|
||||
if ((BMIRawWrite(ar->arHifDevice, (A_UCHAR*)buf, count)) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -876,7 +876,7 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar)
|
|||
return A_ERROR;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -888,7 +888,7 @@ ar6000_sysfs_bmi_deinit(AR_SOFTC_T *ar)
|
|||
}
|
||||
|
||||
#define bmifn(fn) do { \
|
||||
if ((fn) < A_OK) { \
|
||||
if ((fn) < 0) { \
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI operation failed: %d\n", __LINE__)); \
|
||||
return A_ERROR; \
|
||||
} \
|
||||
|
@ -1151,7 +1151,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, u32 address, bool c
|
|||
return A_ERROR;
|
||||
}
|
||||
A_RELEASE_FIRMWARE(fw_entry);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* INIT_MODE_DRV_ENABLED */
|
||||
|
||||
|
@ -1163,13 +1163,13 @@ ar6000_update_bdaddr(AR_SOFTC_T *ar)
|
|||
u32 address;
|
||||
|
||||
if (BMIReadMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4) != A_OK)
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_data), (A_UCHAR *)&address, 4) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for hi_board_data failed\n"));
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (A_UCHAR *)ar->bdaddr, 6) != A_OK)
|
||||
if (BMIReadMemory(ar->arHifDevice, address + BDATA_BDADDR_OFFSET, (A_UCHAR *)ar->bdaddr, 6) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for BD address failed\n"));
|
||||
return A_ERROR;
|
||||
|
@ -1179,7 +1179,7 @@ ar6000_update_bdaddr(AR_SOFTC_T *ar)
|
|||
ar->bdaddr[4], ar->bdaddr[5]));
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1284,7 +1284,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address));
|
||||
|
||||
/* Write EEPROM data to Target RAM */
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != A_OK) {
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1295,7 +1295,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
|
|||
/* Transfer One time Programmable data */
|
||||
AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
|
||||
status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, true);
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
/* Execute the OTP code */
|
||||
param = 0;
|
||||
AR6K_APP_START_OVERRIDE_ADDRESS(address, ar->arVersion.target_ver);
|
||||
|
@ -1310,7 +1310,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
|
|||
|
||||
/* Download Target firmware */
|
||||
AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != A_OK) {
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1320,7 +1320,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
|
|||
|
||||
/* Apply the patches */
|
||||
AR6K_PATCH_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != A_OK) {
|
||||
if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1394,7 +1394,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, u32 mode)
|
|||
#endif /* INIT_MODE_DRV_ENABLED */
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1406,7 +1406,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_serial_enable),
|
||||
(A_UCHAR *)¶m,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enableuartprint failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1419,7 +1419,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_app_host_interest),
|
||||
(A_UCHAR *)¶m,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for htc version failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1438,7 +1438,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIReadMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for enabletimerwar failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1449,7 +1449,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4) != A_OK)
|
||||
4) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for enabletimerwar failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1464,7 +1464,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIReadMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for setting fwmode failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1475,7 +1475,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4) != A_OK)
|
||||
4) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for setting fwmode failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1490,7 +1490,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIReadMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4)!= A_OK)
|
||||
4)!= 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIReadMemory for disabling debug logs failed\n"));
|
||||
return A_ERROR;
|
||||
|
@ -1501,7 +1501,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_option_flag),
|
||||
(A_UCHAR *)¶m,
|
||||
4) != A_OK)
|
||||
4) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for HI_OPTION_DISABLE_DBGLOG\n"));
|
||||
return A_ERROR;
|
||||
|
@ -1523,7 +1523,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
if (BMIWriteMemory(ar->arHifDevice,
|
||||
HOST_INTEREST_ITEM_ADDRESS(ar, hi_board_ext_data),
|
||||
(A_UCHAR *)¶m,
|
||||
4) != A_OK)
|
||||
4) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BMIWriteMemory for hi_board_ext_data failed \n"));
|
||||
return A_ERROR;
|
||||
|
@ -1547,7 +1547,7 @@ ar6000_configure_target(AR_SOFTC_T *ar)
|
|||
return A_ERROR;
|
||||
}
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1603,7 +1603,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
#ifdef ATH6K_CONFIG_CFG80211
|
||||
struct wireless_dev *wdev;
|
||||
#endif /* ATH6K_CONFIG_CFG80211 */
|
||||
int init_status = A_OK;
|
||||
int init_status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("ar6000_available\n"));
|
||||
|
||||
|
@ -1722,7 +1722,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
{
|
||||
struct bmi_target_info targ_info;
|
||||
|
||||
if (BMIGetTargetInfo(ar->arHifDevice, &targ_info) != A_OK) {
|
||||
if (BMIGetTargetInfo(ar->arHifDevice, &targ_info) != 0) {
|
||||
init_status = A_ERROR;
|
||||
goto avail_ev_failed;
|
||||
}
|
||||
|
@ -1733,14 +1733,14 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
/* do any target-specific preparation that can be done through BMI */
|
||||
if (ar6000_prepare_target(ar->arHifDevice,
|
||||
targ_info.target_type,
|
||||
targ_info.target_ver) != A_OK) {
|
||||
targ_info.target_ver) != 0) {
|
||||
init_status = A_ERROR;
|
||||
goto avail_ev_failed;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ar6000_configure_target(ar) != A_OK) {
|
||||
if (ar6000_configure_target(ar) != 0) {
|
||||
init_status = A_ERROR;
|
||||
goto avail_ev_failed;
|
||||
}
|
||||
|
@ -1795,9 +1795,9 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
if ((wlaninitmode == WLAN_INIT_MODE_UDEV) ||
|
||||
(wlaninitmode == WLAN_INIT_MODE_DRV))
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
do {
|
||||
if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != A_OK)
|
||||
if ((status = ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
|
||||
break;
|
||||
|
@ -1806,7 +1806,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
|
|||
break; /* Don't call ar6000_init for ART */
|
||||
#endif
|
||||
rtnl_lock();
|
||||
status = (ar6000_init(dev)==0) ? A_OK : A_ERROR;
|
||||
status = (ar6000_init(dev)==0) ? 0 : A_ERROR;
|
||||
rtnl_unlock();
|
||||
if (status) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n"));
|
||||
|
@ -1852,7 +1852,7 @@ static void ar6000_target_failure(void *Instance, int Status)
|
|||
WMI_TARGET_ERROR_REPORT_EVENT errEvent;
|
||||
static bool sip = false;
|
||||
|
||||
if (Status != A_OK) {
|
||||
if (Status != 0) {
|
||||
|
||||
printk(KERN_ERR "ar6000_target_failure: target asserted \n");
|
||||
|
||||
|
@ -1889,26 +1889,26 @@ ar6000_unavail_ev(void *context, void *hif_handle)
|
|||
ar6000_devices[ar->arDeviceIndex] = NULL;
|
||||
ar6000_destroy(ar->arNetDev, 1);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ar6000_restart_endpoint(struct net_device *dev)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
BMIInit();
|
||||
do {
|
||||
if ( (status=ar6000_configure_target(ar))!=A_OK)
|
||||
if ( (status=ar6000_configure_target(ar))!= 0)
|
||||
break;
|
||||
if ( (status=ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != A_OK)
|
||||
if ( (status=ar6000_sysfs_bmi_get_config(ar, wlaninitmode)) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_sysfs_bmi_get_config failed\n"));
|
||||
break;
|
||||
}
|
||||
rtnl_lock();
|
||||
status = (ar6000_init(dev)==0) ? A_OK : A_ERROR;
|
||||
status = (ar6000_init(dev)==0) ? 0 : A_ERROR;
|
||||
rtnl_unlock();
|
||||
|
||||
if (status) {
|
||||
|
@ -1919,7 +1919,7 @@ ar6000_restart_endpoint(struct net_device *dev)
|
|||
}
|
||||
} while (0);
|
||||
|
||||
if (status==A_OK) {
|
||||
if (status== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2016,7 +2016,7 @@ ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs)
|
|||
A_MEMZERO(&ar3kconfig,sizeof(ar3kconfig));
|
||||
ar6000_set_default_ar3kconfig(ar, (void *)&ar3kconfig);
|
||||
status = ar->exitCallback(&ar3kconfig);
|
||||
if (A_OK != status) {
|
||||
if (0 != status) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to reset AR3K baud rate! \n"));
|
||||
}
|
||||
}
|
||||
|
@ -2196,7 +2196,7 @@ static void ar6000_detect_error(unsigned long ptr)
|
|||
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
|
||||
|
||||
/* Send the challenge on the control channel */
|
||||
if (wmi_get_challenge_resp_cmd(ar->arWmi, ar->arHBChallengeResp.seqNum, DRV_HB_CHALLENGE) != A_OK) {
|
||||
if (wmi_get_challenge_resp_cmd(ar->arWmi, ar->arHBChallengeResp.seqNum, DRV_HB_CHALLENGE) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to send heart beat challenge\n"));
|
||||
}
|
||||
|
||||
|
@ -2329,7 +2329,7 @@ ar6000_close(struct net_device *dev)
|
|||
|
||||
if(ar->arWmiReady == true) {
|
||||
if (wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0) != A_OK) {
|
||||
0, 0, 0, 0, 0, 0, 0, 0) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
ar->arWlanState = WLAN_DISABLED;
|
||||
|
@ -2460,7 +2460,7 @@ int ar6000_init(struct net_device *dev)
|
|||
|
||||
/* Do we need to finish the BMI phase */
|
||||
if ((wlaninitmode == WLAN_INIT_MODE_USR || wlaninitmode == WLAN_INIT_MODE_DRV) &&
|
||||
(BMIDone(ar->arHifDevice) != A_OK))
|
||||
(BMIDone(ar->arHifDevice) != 0))
|
||||
{
|
||||
ret = -EIO;
|
||||
goto ar6000_init_done;
|
||||
|
@ -2700,14 +2700,14 @@ int ar6000_init(struct net_device *dev)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s() WMI is ready\n", __func__));
|
||||
|
||||
/* Communicate the wmi protocol verision to the target */
|
||||
if ((ar6000_set_host_app_area(ar)) != A_OK) {
|
||||
if ((ar6000_set_host_app_area(ar)) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the host app area\n"));
|
||||
}
|
||||
|
||||
/* configure the device for rx dot11 header rules 0,0 are the default values
|
||||
* therefore this command can be skipped if the inputs are 0,false,false.Required
|
||||
if checksum offload is needed. Set RxMetaVersion to 2*/
|
||||
if ((wmi_set_rx_frame_format_cmd(ar->arWmi,ar->rxMetaVersion, processDot11Hdr, processDot11Hdr)) != A_OK) {
|
||||
if ((wmi_set_rx_frame_format_cmd(ar->arWmi,ar->rxMetaVersion, processDot11Hdr, processDot11Hdr)) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the rx frame format.\n"));
|
||||
}
|
||||
|
||||
|
@ -2724,7 +2724,7 @@ int ar6000_init(struct net_device *dev)
|
|||
#error Unsupported Bluetooth Type
|
||||
#endif /* Collocated Bluetooth Type */
|
||||
|
||||
if ((wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &sbcb_cmd)) != A_OK)
|
||||
if ((wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &sbcb_cmd)) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set collocated BT type\n"));
|
||||
}
|
||||
|
@ -2739,7 +2739,7 @@ int ar6000_init(struct net_device *dev)
|
|||
#error Unsupported Front-End Antenna Configuration
|
||||
#endif /* AR600x Front-End Antenna Configuration */
|
||||
|
||||
if ((wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &sbfa_cmd)) != A_OK) {
|
||||
if ((wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &sbfa_cmd)) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set fornt end antenna configuration\n"));
|
||||
}
|
||||
#endif /* INIT_MODE_DRV_ENABLED && ENABLE_COEXISTENCE */
|
||||
|
@ -3049,12 +3049,12 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
|
|||
}
|
||||
|
||||
if (dot11Hdr) {
|
||||
if (wmi_dot11_hdr_add(ar->arWmi,skb,ar->arNetworkType) != A_OK) {
|
||||
if (wmi_dot11_hdr_add(ar->arWmi,skb,ar->arNetworkType) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx-wmi_dot11_hdr_add failed\n"));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (wmi_dix_2_dot3(ar->arWmi, skb) != A_OK) {
|
||||
if (wmi_dix_2_dot3(ar->arWmi, skb) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_dix_2_dot3 failed\n"));
|
||||
break;
|
||||
}
|
||||
|
@ -3066,7 +3066,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
|
|||
metaV2.csumDest = csumDest;
|
||||
metaV2.csumFlags = 0x1;/*instruct target to calculate checksum*/
|
||||
if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,
|
||||
WMI_META_VERSION_2,&metaV2) != A_OK) {
|
||||
WMI_META_VERSION_2,&metaV2) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n"));
|
||||
break;
|
||||
}
|
||||
|
@ -3075,7 +3075,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev)
|
|||
else
|
||||
#endif
|
||||
{
|
||||
if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,0,NULL) != A_OK) {
|
||||
if (wmi_data_hdr_add(ar->arWmi, skb, DATA_MSGTYPE, bMoreData, dot11Hdr,0,NULL) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_data_tx - wmi_data_hdr_add failed\n"));
|
||||
break;
|
||||
}
|
||||
|
@ -3781,7 +3781,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket)
|
|||
break;
|
||||
}
|
||||
|
||||
A_ASSERT(status == A_OK);
|
||||
A_ASSERT(status == 0);
|
||||
|
||||
/* NWF: print the 802.11 hdr bytes */
|
||||
if(containsDot11Hdr) {
|
||||
|
@ -4130,7 +4130,7 @@ ar6000_get_iwstats(struct net_device * dev)
|
|||
|
||||
ar->statsUpdatePending = true;
|
||||
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4757,7 +4757,7 @@ ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd)
|
|||
void *osbuf = NULL;
|
||||
s8 i;
|
||||
u8 size, *buf;
|
||||
int ret = A_OK;
|
||||
int ret = 0;
|
||||
|
||||
size = cmd->evt_buf_sz + 4;
|
||||
osbuf = A_NETBUF_ALLOC(size);
|
||||
|
@ -4893,7 +4893,7 @@ ar6000_scanComplete_event(AR_SOFTC_T *ar, int status)
|
|||
wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0);
|
||||
}
|
||||
if (ar->scan_triggered) {
|
||||
if (status==A_OK) {
|
||||
if (status== 0) {
|
||||
union iwreq_data wrqu;
|
||||
A_MEMZERO(&wrqu, sizeof(wrqu));
|
||||
wireless_send_event(ar->arNetDev, SIOCGIWSCAN, &wrqu, NULL);
|
||||
|
@ -5266,7 +5266,7 @@ int
|
|||
ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid)
|
||||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct ar_cookie *cookie = NULL;
|
||||
int i;
|
||||
#ifdef CONFIG_PM
|
||||
|
@ -5332,7 +5332,7 @@ ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid)
|
|||
/* this interface is asynchronous, if there is an error, cleanup will happen in the
|
||||
* TX completion callback */
|
||||
HTCSendPkt(ar->arHtcTarget, &cookie->HtcPkt);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
|
||||
if (status) {
|
||||
|
@ -5952,7 +5952,7 @@ static int
|
|||
|
||||
ar6000_reinstall_keys(AR_SOFTC_T *ar, u8 key_op_ctrl)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct ieee80211req_key *uik = &ar->user_saved_keys.ucast_ik;
|
||||
struct ieee80211req_key *bik = &ar->user_saved_keys.bcast_ik;
|
||||
CRYPTO_TYPE keyType = ar->user_saved_keys.keyType;
|
||||
|
@ -6108,7 +6108,7 @@ ar6000_connect_to_ap(struct ar6_softc *ar)
|
|||
}
|
||||
|
||||
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) {
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -6184,12 +6184,12 @@ is_iwioctl_allowed(u8 mode, u16 cmd)
|
|||
{
|
||||
if(cmd >= SIOCSIWCOMMIT && cmd <= SIOCGIWPOWER) {
|
||||
cmd -= SIOCSIWCOMMIT;
|
||||
if(sioctl_filter[cmd] == 0xFF) return A_OK;
|
||||
if(sioctl_filter[cmd] & mode) return A_OK;
|
||||
if(sioctl_filter[cmd] == 0xFF) return 0;
|
||||
if(sioctl_filter[cmd] & mode) return 0;
|
||||
} else if(cmd >= SIOCIWFIRSTPRIV && cmd <= (SIOCIWFIRSTPRIV+30)) {
|
||||
cmd -= SIOCIWFIRSTPRIV;
|
||||
if(pioctl_filter[cmd] == 0xFF) return A_OK;
|
||||
if(pioctl_filter[cmd] & mode) return A_OK;
|
||||
if(pioctl_filter[cmd] == 0xFF) return 0;
|
||||
if(pioctl_filter[cmd] & mode) return 0;
|
||||
} else {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
@ -6203,8 +6203,8 @@ is_xioctl_allowed(u8 mode, int cmd)
|
|||
A_PRINTF("Filter for this cmd=%d not defined\n",cmd);
|
||||
return 0;
|
||||
}
|
||||
if(xioctl_filter[cmd] == 0xFF) return A_OK;
|
||||
if(xioctl_filter[cmd] & mode) return A_OK;
|
||||
if(xioctl_filter[cmd] == 0xFF) return 0;
|
||||
if(xioctl_filter[cmd] & mode) return 0;
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
|
@ -6230,7 +6230,7 @@ ap_set_wapi_key(struct ar6_softc *ar, void *ikey)
|
|||
ik->ik_keydata, KEY_OP_INIT_VAL, ik->ik_macaddr,
|
||||
SYNC_BOTH_WMIFLAG);
|
||||
|
||||
if (A_OK != status) {
|
||||
if (0 != status) {
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
|
@ -6343,7 +6343,7 @@ int ar6000_start_ap_interface(AR_SOFTC_T *ar)
|
|||
arApDev = (AR_VIRTUAL_INTERFACE_T *)ar->arApDev;
|
||||
ar->arNetDev = arApDev->arNetDev;
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ar6000_stop_ap_interface(AR_SOFTC_T *ar)
|
||||
|
@ -6356,7 +6356,7 @@ int ar6000_stop_ap_interface(AR_SOFTC_T *ar)
|
|||
ar->arNetDev = arApDev->arStaNetDev;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6390,7 +6390,7 @@ int ar6000_create_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
|
|||
/* Copy the MAC address */
|
||||
A_MEMCPY(dev->dev_addr, ar->arNetDev->dev_addr, AR6000_ETH_ADDR_LEN);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
|
||||
|
@ -6398,10 +6398,10 @@ int ar6000_add_ap_interface(AR_SOFTC_T *ar, char *ap_ifname)
|
|||
/* Interface already added, need not proceed further */
|
||||
if (ar->arApDev != NULL) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_add_ap_interface: interface already present \n"));
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ar6000_create_ap_interface(ar, ap_ifname) != A_OK) {
|
||||
if (ar6000_create_ap_interface(ar, ap_ifname) != 0) {
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
|
@ -6424,7 +6424,7 @@ int ar6000_remove_ap_interface(AR_SOFTC_T *ar)
|
|||
arApNetDev = NULL;
|
||||
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT */
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
|
|||
u16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
|
||||
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false};
|
||||
ar->arWowState = WLAN_WOW_STATE_NONE;
|
||||
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) {
|
||||
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!= 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n"));
|
||||
}
|
||||
#if WOW_SET_SCAN_PARAMS
|
||||
|
@ -99,7 +99,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
|
|||
|
||||
|
||||
#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == A_OK) {
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == 0) {
|
||||
}
|
||||
#endif
|
||||
ar6k_send_asleep_event_to_app(ar, false);
|
||||
|
@ -137,7 +137,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
|
|||
ar6000_TxDataCleanup(ar); /* IMPORTANT, otherwise there will be 11mA after listen interval as 1000*/
|
||||
|
||||
#if WOW_ENABLE_MAX_INTERVAL /* we don't do it if the power consumption is already good enough. */
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == A_OK) {
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, A_MAX_WOW_LISTEN_INTERVAL, 0) == 0) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -213,7 +213,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
|
|||
|
||||
int ar6000_suspend_ev(void *context)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
|
||||
s16 pmmode = ar->arSuspendConfig;
|
||||
wow_not_connected:
|
||||
|
@ -240,7 +240,7 @@ wow_not_connected:
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState));
|
||||
}
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Suspend for %d mode pwr %d status %d\n", __func__, pmmode, ar->arWlanPowerState, status));
|
||||
status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? A_OK : A_EBUSY;
|
||||
status = (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) ? 0 : A_EBUSY;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ int ar6000_resume_ev(void *context)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n"));
|
||||
break;
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
|
||||
|
@ -293,17 +293,17 @@ void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
|
|||
int ar6000_power_change_ev(void *context, u32 config)
|
||||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: power change event callback %d \n", __func__, config));
|
||||
switch (config) {
|
||||
case HIF_DEVICE_POWER_UP:
|
||||
ar6000_restart_endpoint(ar->arNetDev);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
break;
|
||||
case HIF_DEVICE_POWER_DOWN:
|
||||
case HIF_DEVICE_POWER_CUT:
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
|
@ -345,7 +345,7 @@ static struct platform_driver ar6000_pm_device = {
|
|||
int
|
||||
ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
HIF_DEVICE_POWER_CHANGE_TYPE config;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Cut power %d %d \n", __func__,state, ar->arWlanPowerState));
|
||||
|
@ -383,10 +383,10 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
status = A_OK;
|
||||
} else if (status == A_OK) {
|
||||
status = 0;
|
||||
} else if (status == 0) {
|
||||
ar6000_restart_endpoint(ar->arNetDev);
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
} else if (state == WLAN_DISABLED) {
|
||||
|
||||
|
@ -415,7 +415,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
int
|
||||
ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: Deep sleep %d %d \n", __func__,state, ar->arWlanPowerState));
|
||||
#ifdef CONFIG_PM
|
||||
|
@ -439,7 +439,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
hostSleepMode.awake = true;
|
||||
hostSleepMode.asleep = false;
|
||||
|
||||
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != A_OK) {
|
||||
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -456,7 +456,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
ar->scParams.shortScanRatio,
|
||||
ar->scParams.scanCtrlFlags,
|
||||
ar->scParams.max_dfsch_act_time,
|
||||
ar->scParams.maxact_scan_per_ssid)) != A_OK)
|
||||
ar->scParams.maxact_scan_per_ssid)) != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -464,7 +464,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
if (ar->arNetworkType != AP_NETWORK)
|
||||
{
|
||||
if (ar->arSsidLen) {
|
||||
if (ar6000_connect_to_ap(ar) != A_OK) {
|
||||
if (ar6000_connect_to_ap(ar) != 0) {
|
||||
/* no need to report error if connection failed */
|
||||
break;
|
||||
}
|
||||
|
@ -495,12 +495,12 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
|
||||
ar->scan_triggered = 0;
|
||||
|
||||
if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != A_OK) {
|
||||
if ((status=wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0, 0, 0, 0, 0, 0, 0, 0, 0)) != 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* make sure we disable wow for deep sleep */
|
||||
if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!=A_OK)
|
||||
if ((status=wmi_set_wow_mode_cmd(ar->arWmi, &wowMode))!= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
|
||||
hostSleepMode.awake = false;
|
||||
hostSleepMode.asleep = true;
|
||||
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!=A_OK) {
|
||||
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!= 0) {
|
||||
break;
|
||||
}
|
||||
if (ar->arTxPending[ar->arControlEp]) {
|
||||
|
@ -539,7 +539,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
int
|
||||
ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
u16 powerState, oldPowerState;
|
||||
AR6000_WLAN_STATE oldstate = ar->arWlanState;
|
||||
bool wlanOff = ar->arWlanOff;
|
||||
|
@ -631,7 +631,7 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool
|
|||
if (status) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup WLAN state %d\n", ar->arWlanState));
|
||||
ar->arWlanState = oldstate;
|
||||
} else if (status == A_OK) {
|
||||
} else if (status == 0) {
|
||||
WMI_REPORT_SLEEP_STATE_EVENT wmiSleepEvent, *pSleepEvent = NULL;
|
||||
if ((ar->arWlanPowerState == WLAN_POWER_STATE_ON) && (oldPowerState != WLAN_POWER_STATE_ON)) {
|
||||
wmiSleepEvent.sleepState = WMI_REPORT_SLEEP_STATUS_IS_AWAKE;
|
||||
|
@ -657,13 +657,13 @@ ar6000_set_bt_hw_state(struct ar6_softc *ar, u32 enable)
|
|||
bool off = (enable == 0);
|
||||
int status;
|
||||
if (ar->arBTOff == off) {
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
ar->arBTOff = off;
|
||||
status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false);
|
||||
return status;
|
||||
#else
|
||||
return A_OK;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -673,7 +673,7 @@ ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
|
|||
int status;
|
||||
bool off = (state == WLAN_DISABLED);
|
||||
if (ar->arWlanOff == off) {
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
ar->arWlanOff = off;
|
||||
status = ar6000_update_wlan_pwr_state(ar, state, false);
|
||||
|
|
|
@ -55,7 +55,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
|
|||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to down the semaphore\n"));
|
||||
}
|
||||
|
||||
A_ASSERT((pPacket->Status != A_OK) ||
|
||||
A_ASSERT((pPacket->Status != 0) ||
|
||||
(pPacket->pBuffer == (busy->data + HTC_HEADER_LEN)));
|
||||
|
||||
busy->length = pPacket->ActualLength + HTC_HEADER_LEN;
|
||||
|
@ -150,7 +150,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
|
|||
if (status) {
|
||||
if (response.ConnectRespCode == HTC_SERVICE_NO_MORE_EP) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC RAW , No more streams allowed \n"));
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
|
|||
arRawStream2EndpointID(ar,streamID));
|
||||
|
||||
/* Queue buffers to HTC for receive */
|
||||
if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != A_OK)
|
||||
if ((status = HTCAddReceivePkt(ar->arHtcTarget, &buffer->HTCPacket)) != 0)
|
||||
{
|
||||
BMIInit();
|
||||
return -EIO;
|
||||
|
@ -262,7 +262,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
|
|||
1);
|
||||
|
||||
/* Start the HTC component */
|
||||
if ((status = HTCStart(ar->arHtcTarget)) != A_OK) {
|
||||
if ((status = HTCStart(ar->arHtcTarget)) != 0) {
|
||||
BMIInit();
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ static int btpal_send_frame(struct sk_buff *skb)
|
|||
struct hci_dev *hdev = (struct hci_dev *)skb->dev;
|
||||
HCI_TRANSPORT_PACKET_TYPE type;
|
||||
ar6k_hci_pal_info_t *pHciPalInfo;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct sk_buff *txSkb = NULL;
|
||||
AR_SOFTC_T *ar;
|
||||
|
||||
|
@ -184,7 +184,7 @@ static int btpal_send_frame(struct sk_buff *skb)
|
|||
break;
|
||||
}
|
||||
|
||||
if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != A_OK)
|
||||
if (wmi_send_hci_cmd(ar->arWmi, skb->data, skb->len) != 0)
|
||||
{
|
||||
PRIN_LOG("send hci cmd error");
|
||||
break;
|
||||
|
@ -220,7 +220,7 @@ static int btpal_send_frame(struct sk_buff *skb)
|
|||
/* Add WMI packet type */
|
||||
osbuf = (void *)txSkb;
|
||||
|
||||
if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != A_OK) {
|
||||
if (wmi_data_hdr_add(ar->arWmi, osbuf, DATA_MSGTYPE, 0, WMI_DATA_HDR_DATA_TYPE_ACL,0,NULL) != 0) {
|
||||
PRIN_LOG("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n");
|
||||
} else {
|
||||
/* Send data buffer over HTC */
|
||||
|
@ -271,11 +271,11 @@ static void bt_cleanup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
|
|||
*********************************************************/
|
||||
static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct hci_dev *pHciDev = NULL;
|
||||
|
||||
if (!setupbtdev) {
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -404,7 +404,7 @@ bool ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
|
|||
**********************************************************/
|
||||
int ar6k_setup_hci_pal(void *ar_p)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
ar6k_hci_pal_info_t *pHciPalInfo;
|
||||
ar6k_pal_config_t ar6k_pal_config;
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar_p;
|
||||
|
@ -445,7 +445,7 @@ int ar6k_setup_hci_pal(void *ar_p)
|
|||
#else /* AR6K_ENABLE_HCI_PAL */
|
||||
int ar6k_setup_hci_pal(void *ar_p)
|
||||
{
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
void ar6k_cleanup_hci_pal(void *ar_p)
|
||||
{
|
||||
|
@ -465,7 +465,7 @@ static int __init pal_init_module(void)
|
|||
hciTransCallbacks.setupTransport = ar6k_setup_hci_pal;
|
||||
hciTransCallbacks.cleanupTransport = ar6k_cleanup_hci_pal;
|
||||
|
||||
if(ar6k_register_hci_pal(&hciTransCallbacks) != A_OK)
|
||||
if(ar6k_register_hci_pal(&hciTransCallbacks) != 0)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -153,7 +153,7 @@ ar6k_set_wpa_version(AR_SOFTC_T *ar, enum nl80211_wpa_versions wpa_version)
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -179,7 +179,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type)
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -221,7 +221,7 @@ ar6k_set_cipher(AR_SOFTC_T *ar, u32 cipher, bool ucast)
|
|||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -378,7 +378,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
|
|||
}
|
||||
|
||||
if (!ar->arUserBssFilter) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
|
@ -743,7 +743,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
if (!ar->arUserBssFilter) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi,
|
||||
(ar->arConnected ? ALL_BUT_BSS_FILTER : ALL_BSS_FILTER),
|
||||
0) != A_OK) {
|
||||
0) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Couldn't set bss filtering\n", __func__));
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
}
|
||||
|
||||
if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \
|
||||
0, 0, 0, NULL) != A_OK) {
|
||||
0, 0, 0, NULL) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__));
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -982,7 +982,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
|
||||
struct ar_key *key = NULL;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
|
|||
}
|
||||
|
||||
if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
|
||||
if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != A_OK){
|
||||
if (wmi_set_rts_cmd(ar->arWmi,wiphy->rts_threshold) != 0){
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_set_rts_cmd failed\n", __func__));
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -1148,7 +1148,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
|
|||
if((ar->arConnected == true)) {
|
||||
ar->arTxPwr = 0;
|
||||
|
||||
if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) {
|
||||
if(wmi_get_txPwr_cmd(ar->arWmi) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_get_txPwr_cmd failed\n", __func__));
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -1193,7 +1193,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|||
pwrMode.powerMode = REC_POWER;
|
||||
}
|
||||
|
||||
if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != A_OK) {
|
||||
if(wmi_powermode_cmd(ar->arWmi, pwrMode.powerMode) != 0) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_powermode_cmd failed\n", __func__));
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ int ar6000_register_hci_transport(HCI_TRANSPORT_CALLBACKS *hciTransCallbacks)
|
|||
_HCI_TransportSetBaudRate = HCI_TransportSetBaudRate;
|
||||
_HCI_TransportEnablePowerMgmt = HCI_TransportEnablePowerMgmt;
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -294,7 +294,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
|
|||
address = TARG_VTOP(pHcidevInfo->ar->arTargetType,
|
||||
HOST_INTEREST_ITEM_ADDRESS(pHcidevInfo->ar, hi_hci_uart_pwr_mgmt_params));
|
||||
status = ar6000_ReadRegDiag(pHcidevInfo->ar->arHifDevice, &address, &hci_uart_pwr_mgmt_params);
|
||||
if (A_OK == status) {
|
||||
if (0 == status) {
|
||||
ar3kconfig.PwrMgmtEnabled = (hci_uart_pwr_mgmt_params & 0x1);
|
||||
ar3kconfig.IdleTimeout = (hci_uart_pwr_mgmt_params & 0xFFFF0000) >> 16;
|
||||
ar3kconfig.WakeupTimeout = (hci_uart_pwr_mgmt_params & 0xFF00) >> 8;
|
||||
|
@ -470,7 +470,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
|
|||
#endif
|
||||
{
|
||||
HCI_TRANSPORT_CONFIG_INFO config;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int i;
|
||||
HTC_PACKET *pPacket;
|
||||
AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
|
||||
|
@ -551,7 +551,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
|
|||
if (NULL == pHcidevInfo->pHCIDev) {
|
||||
/* GMBOX may not be present in older chips */
|
||||
/* just return success */
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
ar6000_cleanup_hci(ar);
|
||||
|
@ -601,7 +601,7 @@ int hci_test_send(void *ar, struct sk_buff *skb)
|
|||
int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
|
||||
#endif
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
int length;
|
||||
EPPING_HEADER *pHeader;
|
||||
HTC_PACKET *pPacket;
|
||||
|
@ -712,7 +712,7 @@ static int bt_send_frame(struct sk_buff *skb)
|
|||
HCI_TRANSPORT_PACKET_TYPE type;
|
||||
AR6K_HCI_BRIDGE_INFO *pHcidevInfo;
|
||||
HTC_PACKET *pPacket;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct sk_buff *txSkb = NULL;
|
||||
|
||||
if (!hdev) {
|
||||
|
@ -855,12 +855,12 @@ static void bt_destruct(struct hci_dev *hdev)
|
|||
|
||||
static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
|
||||
{
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
struct hci_dev *pHciDev = NULL;
|
||||
HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
|
||||
|
||||
if (!setupbtdev) {
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -938,7 +938,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
|
|||
static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
|
||||
{
|
||||
int err;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
do {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n"));
|
||||
|
@ -1043,7 +1043,7 @@ static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *sk
|
|||
/* stubs when we only want to test the HCI bridging Interface without the HT stack */
|
||||
static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
|
||||
{
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
|
||||
{
|
||||
|
@ -1085,7 +1085,7 @@ int ar6000_setup_hci(void *ar)
|
|||
int ar6000_setup_hci(AR_SOFTC_T *ar)
|
||||
#endif
|
||||
{
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
|
||||
|
|
|
@ -45,7 +45,7 @@ ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
if(wmi_get_roam_tbl_cmd(ar->arWmi) != A_OK) {
|
||||
if(wmi_get_roam_tbl_cmd(ar->arWmi) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq)
|
|||
|
||||
|
||||
/* currently assume only roam times are required */
|
||||
if(wmi_get_roam_data_cmd(ar->arWmi, ROAM_DATA_TIME) != A_OK) {
|
||||
if(wmi_get_roam_data_cmd(ar->arWmi, ROAM_DATA_TIME) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if(wmi_set_roam_ctrl_cmd(ar->arWmi, &cmd, size) != A_OK) {
|
||||
if(wmi_set_roam_ctrl_cmd(ar->arWmi, &cmd, size) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if(wmi_set_powersave_timers_cmd(ar->arWmi, &cmd, size) != A_OK) {
|
||||
if(wmi_set_powersave_timers_cmd(ar->arWmi, &cmd, size) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq)
|
|||
ret = wmi_set_qos_supp_cmd(ar->arWmi, cmd.status);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -194,7 +194,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq)
|
|||
ret = wmi_set_wmm_cmd(ar->arWmi, cmd.status);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -229,7 +229,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq)
|
|||
ret = wmi_set_wmm_txop(ar->arWmi, cmd.txopEnable);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -284,7 +284,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq)
|
|||
A_MEMCPY(ar->ap_country_code, cmd.countryCode, 3);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -361,7 +361,7 @@ ar6000_ioctl_set_channelParams(struct net_device *dev, struct ifreq *rq)
|
|||
if (!ret &&
|
||||
(wmi_set_channelParams_cmd(ar->arWmi, cmdp->scanParam, cmdp->phyMode,
|
||||
cmdp->numChannels, cmdp->channelList)
|
||||
!= A_OK))
|
||||
!= 0))
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ ar6000_ioctl_set_snr_threshold(struct net_device *dev, struct ifreq *rq)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if( wmi_set_snr_threshold_params(ar->arWmi, &cmd) != A_OK ) {
|
||||
if( wmi_set_snr_threshold_params(ar->arWmi, &cmd) != 0 ) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -480,7 +480,7 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq)
|
|||
cmd.thresholdBelow5_Val = ar->rssi_map[10].rssi;
|
||||
cmd.thresholdBelow6_Val = ar->rssi_map[11].rssi;
|
||||
|
||||
if( wmi_set_rssi_threshold_params(ar->arWmi, &cmd) != A_OK ) {
|
||||
if( wmi_set_rssi_threshold_params(ar->arWmi, &cmd) != 0 ) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -503,7 +503,7 @@ ar6000_ioctl_set_lq_threshold(struct net_device *dev, struct ifreq *rq)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if( wmi_set_lq_threshold_params(ar->arWmi, &cmd) != A_OK ) {
|
||||
if( wmi_set_lq_threshold_params(ar->arWmi, &cmd) != 0 ) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ ar6000_ioctl_set_probedSsid(struct net_device *dev, struct ifreq *rq)
|
|||
}
|
||||
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, cmd.entryIndex, cmd.flag, cmd.ssidLength,
|
||||
cmd.ssid) != A_OK)
|
||||
cmd.ssid) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -559,11 +559,11 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq)
|
|||
/*
|
||||
* This is a delete badAP.
|
||||
*/
|
||||
if (wmi_deleteBadAp_cmd(ar->arWmi, cmd.badApIndex) != A_OK) {
|
||||
if (wmi_deleteBadAp_cmd(ar->arWmi, cmd.badApIndex) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
} else {
|
||||
if (wmi_addBadAp_cmd(ar->arWmi, cmd.badApIndex, cmd.bssid) != A_OK) {
|
||||
if (wmi_addBadAp_cmd(ar->arWmi, cmd.badApIndex, cmd.bssid) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -588,11 +588,11 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq)
|
|||
}
|
||||
|
||||
ret = wmi_verify_tspec_params(&cmd, tspecCompliance);
|
||||
if (ret == A_OK)
|
||||
if (ret == 0)
|
||||
ret = wmi_create_pstream_cmd(ar->arWmi, &cmd);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -622,7 +622,7 @@ ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq)
|
|||
ret = wmi_delete_pstream_cmd(ar->arWmi, cmd.trafficClass, cmd.tsid);
|
||||
|
||||
switch (ret) {
|
||||
case A_OK:
|
||||
case 0:
|
||||
return 0;
|
||||
case A_EBUSY :
|
||||
return -EBUSY;
|
||||
|
@ -687,7 +687,7 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev,
|
|||
}
|
||||
|
||||
ar->tcmdRxReport = 0;
|
||||
if (wmi_test_cmd(ar->arWmi, data, len) != A_OK) {
|
||||
if (wmi_test_cmd(ar->arWmi, data, len) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq)
|
|||
|
||||
ar->statsUpdatePending = true;
|
||||
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -865,7 +865,7 @@ ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq)
|
|||
|
||||
ar->statsUpdatePending = true;
|
||||
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
|
||||
if(wmi_get_stats_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -901,7 +901,7 @@ ar6000_ioctl_set_access_params(struct net_device *dev, struct ifreq *rq)
|
|||
}
|
||||
|
||||
if (wmi_set_access_params_cmd(ar->arWmi, cmd.ac, cmd.txop, cmd.eCWmin, cmd.eCWmax,
|
||||
cmd.aifsn) == A_OK)
|
||||
cmd.aifsn) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -926,7 +926,7 @@ ar6000_ioctl_set_disconnect_timeout(struct net_device *dev, struct ifreq *rq)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_disctimeout_cmd(ar->arWmi, cmd.disconnectTimeout) == A_OK)
|
||||
if (wmi_disctimeout_cmd(ar->arWmi, cmd.disconnectTimeout) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -951,7 +951,7 @@ ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_voice_pkt_size_cmd(ar->arWmi, cmd.voicePktSize) == A_OK)
|
||||
if (wmi_set_voice_pkt_size_cmd(ar->arWmi, cmd.voicePktSize) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -977,7 +977,7 @@ ar6000_xioctl_set_max_sp_len(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_max_sp_len_cmd(ar->arWmi, cmd.maxSPLen) == A_OK)
|
||||
if (wmi_set_max_sp_len_cmd(ar->arWmi, cmd.maxSPLen) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1003,7 +1003,7 @@ ar6000_xioctl_set_bt_status_cmd(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_bt_status_cmd(ar->arWmi, cmd.streamType, cmd.status) == A_OK)
|
||||
if (wmi_set_bt_status_cmd(ar->arWmi, cmd.streamType, cmd.status) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1028,7 +1028,7 @@ ar6000_xioctl_set_bt_params_cmd(struct net_device *dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_bt_params_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_bt_params_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1052,7 +1052,7 @@ ar6000_xioctl_set_btcoex_fe_ant_cmd(struct net_device * dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_fe_ant_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1077,7 +1077,7 @@ ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd(struct net_device * dev, char *use
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_colocated_bt_dev_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1102,7 +1102,7 @@ ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd(struct net_device * dev, cha
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_btinquiry_page_config_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_btinquiry_page_config_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1127,7 +1127,7 @@ ar6000_xioctl_set_btcoex_sco_config_cmd(struct net_device * dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_sco_config_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_sco_config_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1153,7 +1153,7 @@ ar6000_xioctl_set_btcoex_a2dp_config_cmd(struct net_device * dev,
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_a2dp_config_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_a2dp_config_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1178,7 +1178,7 @@ ar6000_xioctl_set_btcoex_aclcoex_config_cmd(struct net_device * dev, char *userd
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_aclcoex_config_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_aclcoex_config_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1203,7 +1203,7 @@ ar60000_xioctl_set_btcoex_debug_cmd(struct net_device * dev, char *userdata)
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_debug_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_debug_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1228,7 +1228,7 @@ ar6000_xioctl_set_btcoex_bt_operating_status_cmd(struct net_device * dev, char *
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_set_btcoex_bt_operating_status_cmd(ar->arWmi, &cmd) == A_OK)
|
||||
if (wmi_set_btcoex_bt_operating_status_cmd(ar->arWmi, &cmd) == 0)
|
||||
{
|
||||
ret = 0;
|
||||
} else {
|
||||
|
@ -1261,7 +1261,7 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char *userdata,
|
|||
return -ERESTARTSYS;
|
||||
}
|
||||
|
||||
if (wmi_get_btcoex_config_cmd(ar->arWmi, (WMI_GET_BTCOEX_CONFIG_CMD *)&btcoexConfig.configCmd) != A_OK)
|
||||
if (wmi_get_btcoex_config_cmd(ar->arWmi, (WMI_GET_BTCOEX_CONFIG_CMD *)&btcoexConfig.configCmd) != 0)
|
||||
{
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
|
@ -1305,7 +1305,7 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char *userdata, stru
|
|||
return -EFAULT;
|
||||
}
|
||||
|
||||
if (wmi_get_btcoex_stats_cmd(ar->arWmi) != A_OK)
|
||||
if (wmi_get_btcoex_stats_cmd(ar->arWmi) != 0)
|
||||
{
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
|
@ -1475,7 +1475,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu
|
|||
u8 tmp_space[8];
|
||||
HCI_ACL_DATA_PKT *acl;
|
||||
u8 hdr_size, *datap=NULL;
|
||||
int ret = A_OK;
|
||||
int ret = 0;
|
||||
|
||||
/* ACL is in data path. There is a need to create pool
|
||||
* mechanism for allocating and freeing NETBUFs - ToDo later.
|
||||
|
@ -1508,7 +1508,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, u8 *userdata, void **p_osbu
|
|||
}
|
||||
} while(false);
|
||||
|
||||
if (ret == A_OK) {
|
||||
if (ret == 0) {
|
||||
*p_osbuf = osbuf;
|
||||
} else {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
|
@ -1878,7 +1878,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
goto ioctl_done;
|
||||
}
|
||||
userdata = (char *)(((unsigned int *)rq->ifr_data)+1);
|
||||
if(is_xioctl_allowed(ar->arNextMode, cmd) != A_OK) {
|
||||
if(is_xioctl_allowed(ar->arNextMode, cmd) != 0) {
|
||||
A_PRINTF("xioctl: cmd=%d not allowed in this mode\n",cmd);
|
||||
ret = -EOPNOTSUPP;
|
||||
goto ioctl_done;
|
||||
|
@ -2193,7 +2193,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
|
||||
#ifdef HTC_RAW_INTERFACE
|
||||
case AR6000_XIOCTL_HTC_RAW_OPEN:
|
||||
ret = A_OK;
|
||||
ret = 0;
|
||||
if (!arRawIfEnabled(ar)) {
|
||||
/* make sure block size is set in case the target was reset since last
|
||||
* BMI phase (i.e. flashup downloads) */
|
||||
|
@ -2207,7 +2207,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
}
|
||||
/* Terminate the BMI phase */
|
||||
ret = BMIDone(hifDevice);
|
||||
if (ret == A_OK) {
|
||||
if (ret == 0) {
|
||||
ret = ar6000_htc_raw_open(ar);
|
||||
}
|
||||
}
|
||||
|
@ -2309,7 +2309,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
|
||||
if (wmi_prof_cfg_cmd(ar->arWmi, period, nbins) != A_OK) {
|
||||
if (wmi_prof_cfg_cmd(ar->arWmi, period, nbins) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -2325,7 +2325,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
|
||||
if (wmi_prof_addr_set_cmd(ar->arWmi, addr) != A_OK) {
|
||||
if (wmi_prof_addr_set_cmd(ar->arWmi, addr) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -2363,7 +2363,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
|
||||
prof_count_available = false;
|
||||
ret = prof_count_get(dev);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
up(&ar->arSem);
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -2406,7 +2406,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_powermode_cmd(ar->arWmi, pwrModeCmd.powerMode)
|
||||
!= A_OK)
|
||||
!= 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2425,7 +2425,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_ibsspmcaps_cmd(ar->arWmi, ibssPmCaps.power_saving, ibssPmCaps.ttl,
|
||||
ibssPmCaps.atim_windows, ibssPmCaps.timeout_value) != A_OK)
|
||||
ibssPmCaps.atim_windows, ibssPmCaps.timeout_value) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2447,7 +2447,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_apps_cmd(ar->arWmi, apPsCmd.psType, apPsCmd.idle_time,
|
||||
apPsCmd.ps_period, apPsCmd.sleep_period) != A_OK)
|
||||
apPsCmd.ps_period, apPsCmd.sleep_period) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2475,7 +2475,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
#else
|
||||
SEND_POWER_SAVE_FAIL_EVENT_ALWAYS
|
||||
#endif
|
||||
) != A_OK)
|
||||
) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2506,7 +2506,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ar->scParams.shortScanRatio,
|
||||
ar->scParams.scanCtrlFlags,
|
||||
ar->scParams.max_dfsch_act_time,
|
||||
ar->scParams.maxact_scan_per_ssid) != A_OK)
|
||||
ar->scParams.maxact_scan_per_ssid) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2524,7 +2524,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, listenCmd.listenInterval, listenCmd.numBeacons) != A_OK) {
|
||||
if (wmi_listeninterval_cmd(ar->arWmi, listenCmd.listenInterval, listenCmd.numBeacons) != 0) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
AR6000_SPIN_LOCK(&ar->arLock, 0);
|
||||
|
@ -2547,7 +2547,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_bmisstime_cmd(ar->arWmi, bmissCmd.bmissTime, bmissCmd.numBeacons) != A_OK) {
|
||||
if (wmi_bmisstime_cmd(ar->arWmi, bmissCmd.bmissTime, bmissCmd.numBeacons) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -2565,7 +2565,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, filt.bssFilter, filt.ieMask)
|
||||
!= A_OK) {
|
||||
!= 0) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
ar->arUserBssFilter = param;
|
||||
|
@ -2614,7 +2614,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
#else
|
||||
WMI_IGNORE_BARKER_IN_ERP
|
||||
#endif
|
||||
) != A_OK)
|
||||
) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2634,7 +2634,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else {
|
||||
ar->arRTS = rtsCmd.threshold;
|
||||
if (wmi_set_rts_cmd(ar->arWmi, rtsCmd.threshold)
|
||||
!= A_OK)
|
||||
!= 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -2728,7 +2728,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
if (wmi_associnfo_cmd(ar->arWmi, cmd.ieType,
|
||||
cmd.bufferSize, assocInfo) != A_OK) {
|
||||
cmd.bufferSize, assocInfo) != 0) {
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -2811,7 +2811,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
}
|
||||
|
||||
/* Send the challenge on the control channel */
|
||||
if (wmi_get_challenge_resp_cmd(ar->arWmi, cookie, APP_HB_CHALLENGE) != A_OK) {
|
||||
if (wmi_get_challenge_resp_cmd(ar->arWmi, cookie, APP_HB_CHALLENGE) != 0) {
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
}
|
||||
|
@ -2868,7 +2868,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
gpio_output_set_cmd.clear_mask,
|
||||
gpio_output_set_cmd.enable_mask,
|
||||
gpio_output_set_cmd.disable_mask);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -2896,7 +2896,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
}
|
||||
|
||||
ret = ar6000_gpio_input_get(dev);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
up(&ar->arSem);
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -2948,7 +2948,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = ar6000_gpio_register_set(dev,
|
||||
gpio_register_cmd.gpioreg_id,
|
||||
gpio_register_cmd.value);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -2989,7 +2989,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
ret = ar6000_gpio_register_get(dev, gpio_register_cmd.gpioreg_id);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
up(&ar->arSem);
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -3039,7 +3039,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
ret = ar6000_gpio_intr_ack(dev, gpio_intr_ack_cmd.ack_mask);
|
||||
if (ret != A_OK) {
|
||||
if (ret != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3076,7 +3076,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
/* Send the challenge on the control channel */
|
||||
if (wmi_config_debug_module_cmd(ar->arWmi, config.mmask,
|
||||
config.tsr, config.rep,
|
||||
config.size, config.valid) != A_OK)
|
||||
config.size, config.valid) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -3087,7 +3087,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
case AR6000_XIOCTL_DBGLOG_GET_DEBUG_LOGS:
|
||||
{
|
||||
/* Send the challenge on the control channel */
|
||||
if (ar6000_dbglog_get_debug_logs(ar) != A_OK)
|
||||
if (ar6000_dbglog_get_debug_logs(ar) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -3131,7 +3131,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
|
||||
} else if (wmi_set_opt_mode_cmd(ar->arWmi, optModeCmd.optMode)
|
||||
!= A_OK)
|
||||
!= 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3179,7 +3179,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
if (wmi_set_retry_limits_cmd(ar->arWmi, setRetryParams.frameType,
|
||||
setRetryParams.trafficClass,
|
||||
setRetryParams.maxRetries,
|
||||
setRetryParams.enableNotify) != A_OK)
|
||||
setRetryParams.enableNotify) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3201,7 +3201,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else if (wmi_set_adhoc_bconIntvl_cmd(ar->arWmi, bIntvlCmd.beaconInterval)
|
||||
!= A_OK)
|
||||
!= 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3266,7 +3266,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
AR6000_WLAN_STATE state;
|
||||
if (get_user(state, (unsigned int *)userdata))
|
||||
ret = -EFAULT;
|
||||
else if (ar6000_set_wlan_state(ar, state) != A_OK)
|
||||
else if (ar6000_set_wlan_state(ar, state) != 0)
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
@ -3354,7 +3354,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
cmdp->homeDwellTime,
|
||||
cmdp->forceScanInterval,
|
||||
cmdp->numChannels,
|
||||
cmdp->channelList) != A_OK)
|
||||
cmdp->channelList) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3376,7 +3376,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
returnStatus = wmi_set_fixrates_cmd(ar->arWmi, setFixRatesCmd.fixRateMask);
|
||||
if (returnStatus == A_EINVAL) {
|
||||
ret = -EINVAL;
|
||||
} else if(returnStatus != A_OK) {
|
||||
} else if(returnStatus != 0) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
ar->ap_profile_flag = 1; /* There is a change in profile */
|
||||
|
@ -3415,7 +3415,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else {
|
||||
ar->arRateMask = 0xFFFFFFFF;
|
||||
|
||||
if (wmi_get_ratemask_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_ratemask_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -3450,7 +3450,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_authmode_cmd(ar->arWmi, setAuthMode.mode) != A_OK)
|
||||
if (wmi_set_authmode_cmd(ar->arWmi, setAuthMode.mode) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3468,7 +3468,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_reassocmode_cmd(ar->arWmi, setReassocMode.mode) != A_OK)
|
||||
if (wmi_set_reassocmode_cmd(ar->arWmi, setReassocMode.mode) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3483,7 +3483,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
addr = TARG_VTOP(ar->arTargetType, addr);
|
||||
if (ar6000_ReadRegDiag(ar->arHifDevice, &addr, &data) != A_OK) {
|
||||
if (ar6000_ReadRegDiag(ar->arHifDevice, &addr, &data) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
if (put_user(data, (unsigned int *)userdata + 1)) {
|
||||
|
@ -3501,7 +3501,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
addr = TARG_VTOP(ar->arTargetType, addr);
|
||||
if (ar6000_WriteRegDiag(ar->arHifDevice, &addr, &data) != A_OK) {
|
||||
if (ar6000_WriteRegDiag(ar->arHifDevice, &addr, &data) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
break;
|
||||
|
@ -3516,7 +3516,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
sizeof(setKeepAlive))){
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_keepalive_cmd(ar->arWmi, setKeepAlive.keepaliveInterval) != A_OK) {
|
||||
if (wmi_set_keepalive_cmd(ar->arWmi, setKeepAlive.keepaliveInterval) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3536,7 +3536,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_params_cmd(ar->arWmi, cmd.opcode, cmd.length, cmd.buffer) != A_OK) {
|
||||
if (wmi_set_params_cmd(ar->arWmi, cmd.opcode, cmd.length, cmd.buffer) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3555,7 +3555,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
if (wmi_set_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0],
|
||||
cmd.multicast_mac[1],
|
||||
cmd.multicast_mac[2],
|
||||
cmd.multicast_mac[3]) != A_OK) {
|
||||
cmd.multicast_mac[3]) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3574,7 +3574,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
if (wmi_del_mcast_filter_cmd(ar->arWmi, cmd.multicast_mac[0],
|
||||
cmd.multicast_mac[1],
|
||||
cmd.multicast_mac[2],
|
||||
cmd.multicast_mac[3]) != A_OK) {
|
||||
cmd.multicast_mac[3]) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3590,7 +3590,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
sizeof(cmd))){
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_mcast_filter_cmd(ar->arWmi, cmd.enable) != A_OK) {
|
||||
if (wmi_mcast_filter_cmd(ar->arWmi, cmd.enable) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -3623,7 +3623,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else {
|
||||
getKeepAlive.keepaliveInterval = wmi_get_keepalive_cmd(ar->arWmi);
|
||||
ar->arKeepaliveConfigured = 0xFF;
|
||||
if (wmi_get_keepalive_configured(ar->arWmi) != A_OK){
|
||||
if (wmi_get_keepalive_configured(ar->arWmi) != 0){
|
||||
up(&ar->arSem);
|
||||
ret = -EIO;
|
||||
goto ioctl_done;
|
||||
|
@ -3675,7 +3675,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_appie_cmd(ar->arWmi, appIEcmd.mgmtFrmType,
|
||||
appIEcmd.ieLen, appIeInfo) != A_OK)
|
||||
appIEcmd.ieLen, appIeInfo) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3700,7 +3700,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else {
|
||||
cmd.bssFilter = NONE_BSS_FILTER;
|
||||
}
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, cmd.bssFilter, 0) != A_OK) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, cmd.bssFilter, 0) != 0) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
ar->arUserBssFilter = cmd.bssFilter;
|
||||
|
@ -3723,7 +3723,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
goto ioctl_done;
|
||||
}
|
||||
if (wmi_set_wsc_status_cmd(ar->arWmi, wsc_status) != A_OK) {
|
||||
if (wmi_set_wsc_status_cmd(ar->arWmi, wsc_status) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
break;
|
||||
|
@ -3747,7 +3747,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ROM_addr, RAM_addr, nbytes));
|
||||
ret = BMIrompatchInstall(hifDevice, ROM_addr, RAM_addr,
|
||||
nbytes, do_activate, &rompatch_id);
|
||||
if (ret == A_OK) {
|
||||
if (ret == 0) {
|
||||
/* return value */
|
||||
if (put_user(rompatch_id, (unsigned int *)rq->ifr_data)) {
|
||||
ret = -EFAULT;
|
||||
|
@ -3812,7 +3812,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_ip_cmd(ar->arWmi,
|
||||
&setIP) != A_OK)
|
||||
&setIP) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3832,7 +3832,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_host_sleep_mode_cmd(ar->arWmi,
|
||||
&setHostSleepMode) != A_OK)
|
||||
&setHostSleepMode) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3851,7 +3851,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_wow_mode_cmd(ar->arWmi,
|
||||
&setWowMode) != A_OK)
|
||||
&setWowMode) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3870,7 +3870,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_get_wow_list_cmd(ar->arWmi,
|
||||
&getWowList) != A_OK)
|
||||
&getWowList) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3912,7 +3912,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
}
|
||||
if (wmi_add_wow_pattern_cmd(ar->arWmi,
|
||||
&cmd, pattern_data, mask_data, cmd.filter_size) != A_OK)
|
||||
&cmd, pattern_data, mask_data, cmd.filter_size) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -3933,7 +3933,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_del_wow_pattern_cmd(ar->arWmi,
|
||||
&delWowPattern) != A_OK)
|
||||
&delWowPattern) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -4020,7 +4020,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
{
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_set_akmp_params_cmd(ar->arWmi, &akmpParams) != A_OK) {
|
||||
if (wmi_set_akmp_params_cmd(ar->arWmi, &akmpParams) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -4042,7 +4042,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
if (wmi_set_pmkid_list_cmd(ar->arWmi, &pmkidInfo) != A_OK) {
|
||||
if (wmi_set_pmkid_list_cmd(ar->arWmi, &pmkidInfo) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -4051,7 +4051,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
if (ar->arWmiReady == false) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
if (wmi_get_pmkid_list_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_pmkid_list_cmd(ar->arWmi) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -4365,7 +4365,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
|
||||
if (wmi_set_ht_cap_cmd(ar->arWmi, &htCap) != A_OK)
|
||||
if (wmi_set_ht_cap_cmd(ar->arWmi, &htCap) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -4382,7 +4382,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
|
||||
if (wmi_set_ht_op_cmd(ar->arWmi, htOp.sta_chan_width) != A_OK)
|
||||
if (wmi_set_ht_op_cmd(ar->arWmi, htOp.sta_chan_width) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -4395,10 +4395,10 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
void *osbuf = NULL;
|
||||
if (ar->arWmiReady == false) {
|
||||
ret = -EIO;
|
||||
} else if (ar6000_create_acl_data_osbuf(dev, (u8 *)userdata, &osbuf) != A_OK) {
|
||||
} else if (ar6000_create_acl_data_osbuf(dev, (u8 *)userdata, &osbuf) != 0) {
|
||||
ret = -EIO;
|
||||
} else {
|
||||
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) {
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("XIOCTL_ACL_DATA - wmi_data_hdr_add failed\n"));
|
||||
} else {
|
||||
/* Send data buffer over HTC */
|
||||
|
@ -4422,7 +4422,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else if(copy_from_user(cmd->buf, userdata + size, cmd->cmd_buf_sz)) {
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (wmi_send_hci_cmd(ar->arWmi, cmd->buf, cmd->cmd_buf_sz) != A_OK) {
|
||||
if (wmi_send_hci_cmd(ar->arWmi, cmd->buf, cmd->cmd_buf_sz) != 0) {
|
||||
ret = -EIO;
|
||||
}else if(loghci) {
|
||||
A_PRINTF_LOG("HCI Command To PAL --> \n");
|
||||
|
@ -4448,7 +4448,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
} else {
|
||||
if (cmd.precedence == BT_WLAN_CONN_PRECDENCE_WLAN ||
|
||||
cmd.precedence == BT_WLAN_CONN_PRECDENCE_PAL) {
|
||||
if ( wmi_set_wlan_conn_precedence_cmd(ar->arWmi, cmd.precedence) != A_OK) {
|
||||
if ( wmi_set_wlan_conn_precedence_cmd(ar->arWmi, cmd.precedence) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
} else {
|
||||
|
@ -4474,7 +4474,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
} else {
|
||||
|
||||
if (wmi_set_tx_select_rates_cmd(ar->arWmi, masks.rateMasks) != A_OK)
|
||||
if (wmi_set_tx_select_rates_cmd(ar->arWmi, masks.rateMasks) != 0)
|
||||
{
|
||||
ret = -EIO;
|
||||
}
|
||||
|
@ -4606,7 +4606,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
if (ar6000_set_bt_hw_state(ar, state)!=A_OK) {
|
||||
if (ar6000_set_bt_hw_state(ar, state)!= 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -4626,7 +4626,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
sizeof(SGICmd))){
|
||||
ret = -EFAULT;
|
||||
} else{
|
||||
if (wmi_SGI_cmd(ar->arWmi, SGICmd.sgiMask, SGICmd.sgiPERThreshold) != A_OK) {
|
||||
if (wmi_SGI_cmd(ar->arWmi, SGICmd.sgiMask, SGICmd.sgiPERThreshold) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -4641,7 +4641,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
if (copy_from_user(ap_ifname, userdata, IFNAMSIZ)) {
|
||||
ret = -EFAULT;
|
||||
} else {
|
||||
if (ar6000_add_ap_interface(ar, ap_ifname) != A_OK) {
|
||||
if (ar6000_add_ap_interface(ar, ap_ifname) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -4652,7 +4652,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|||
break;
|
||||
case AR6000_XIOCTL_REMOVE_AP_INTERFACE:
|
||||
#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
|
||||
if (ar6000_remove_ap_interface(ar) != A_OK) {
|
||||
if (ar6000_remove_ap_interface(ar) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -109,7 +109,7 @@ a_netbuf_push(void *bufPtr, s32 len)
|
|||
{
|
||||
skb_push((struct sk_buff *)bufPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -122,7 +122,7 @@ a_netbuf_push_data(void *bufPtr, char *srcPtr, s32 len)
|
|||
skb_push((struct sk_buff *) bufPtr, len);
|
||||
A_MEMCPY(((struct sk_buff *)bufPtr)->data, srcPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -134,7 +134,7 @@ a_netbuf_put(void *bufPtr, s32 len)
|
|||
{
|
||||
skb_put((struct sk_buff *)bufPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -149,7 +149,7 @@ a_netbuf_put_data(void *bufPtr, char *srcPtr, s32 len)
|
|||
skb_put((struct sk_buff *)bufPtr, len);
|
||||
A_MEMCPY(start, srcPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -161,7 +161,7 @@ a_netbuf_setlen(void *bufPtr, s32 len)
|
|||
{
|
||||
skb_trim((struct sk_buff *)bufPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -172,7 +172,7 @@ a_netbuf_trim(void *bufPtr, s32 len)
|
|||
{
|
||||
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -187,7 +187,7 @@ a_netbuf_trim_data(void *bufPtr, char *dstPtr, s32 len)
|
|||
A_MEMCPY(dstPtr, start, len);
|
||||
skb_trim((struct sk_buff *)bufPtr, ((struct sk_buff *)bufPtr)->len - len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -207,7 +207,7 @@ a_netbuf_pull(void *bufPtr, s32 len)
|
|||
{
|
||||
skb_pull((struct sk_buff *)bufPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -220,7 +220,7 @@ a_netbuf_pull_data(void *bufPtr, char *dstPtr, s32 len)
|
|||
A_MEMCPY(dstPtr, ((struct sk_buff *)bufPtr)->data, len);
|
||||
skb_pull((struct sk_buff *)bufPtr, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
|
||||
|
|
|
@ -419,7 +419,7 @@ ar6000_ioctl_giwscan(struct net_device *dev,
|
|||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
struct ar_giwscan_param param;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -466,7 +466,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
|
|||
u8 arNetworkType;
|
||||
u8 prevMode = ar->arNetworkType;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
|
|||
ar->arSsidLen = data->length - 1;
|
||||
A_MEMCPY(ar->arSsid, ssid, ar->arSsidLen);
|
||||
|
||||
if (ar6000_connect_to_ap(ar)!= A_OK) {
|
||||
if (ar6000_connect_to_ap(ar)!= 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}else{
|
||||
|
@ -659,7 +659,7 @@ ar6000_ioctl_giwessid(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -715,7 +715,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
|
|||
u32 kbps;
|
||||
s8 rate_idx;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -725,7 +725,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
|
|||
} else {
|
||||
kbps = -1; /* -1 indicates auto rate */
|
||||
}
|
||||
if(kbps != -1 && wmi_validate_bitrate(ar->arWmi, kbps, &rate_idx) != A_OK)
|
||||
if(kbps != -1 && wmi_validate_bitrate(ar->arWmi, kbps, &rate_idx) != 0)
|
||||
{
|
||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BitRate is not Valid %d\n", kbps));
|
||||
return -EINVAL;
|
||||
|
@ -733,7 +733,7 @@ ar6000_ioctl_siwrate(struct net_device *dev,
|
|||
ar->arBitRate = kbps;
|
||||
if(ar->arWmiReady == true)
|
||||
{
|
||||
if (wmi_set_bitrate_cmd(ar->arWmi, kbps, -1, -1) != A_OK) {
|
||||
if (wmi_set_bitrate_cmd(ar->arWmi, kbps, -1, -1) != 0) {
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
@ -751,7 +751,7 @@ ar6000_ioctl_giwrate(struct net_device *dev,
|
|||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -779,7 +779,7 @@ ar6000_ioctl_giwrate(struct net_device *dev,
|
|||
}
|
||||
|
||||
ar->arBitRate = 0xFFFF;
|
||||
if (wmi_get_bitrate_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_bitrate_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -814,7 +814,7 @@ ar6000_ioctl_siwtxpow(struct net_device *dev,
|
|||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
u8 dbM;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -856,7 +856,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev,
|
|||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -882,7 +882,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev,
|
|||
{
|
||||
ar->arTxPwr = 0;
|
||||
|
||||
if (wmi_get_txPwr_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_txPwr_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ ar6000_ioctl_siwretry(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ ar6000_ioctl_siwretry(struct net_device *dev,
|
|||
if(ar->arWmiReady == true)
|
||||
{
|
||||
if (wmi_set_retry_limits_cmd(ar->arWmi, DATA_FRAMETYPE, WMM_AC_BE,
|
||||
rrq->value, 0) != A_OK){
|
||||
rrq->value, 0) != 0){
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
@ -966,7 +966,7 @@ ar6000_ioctl_giwretry(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1009,7 +1009,7 @@ ar6000_ioctl_siwencode(struct net_device *dev,
|
|||
int index;
|
||||
s32 auth = 0;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1125,7 +1125,7 @@ ar6000_ioctl_giwencode(struct net_device *dev,
|
|||
u8 keyIndex;
|
||||
struct ar_wep_key *wk;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1557,7 +1557,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev,
|
|||
}
|
||||
|
||||
ret = 0;
|
||||
status = A_OK;
|
||||
status = 0;
|
||||
|
||||
switch (pmksa->cmd) {
|
||||
case IW_PMKSA_ADD:
|
||||
|
@ -1636,7 +1636,7 @@ static int ar6000_set_wapi_key(struct net_device *dev,
|
|||
KEY_OP_INIT_WAPIPN,
|
||||
NULL,
|
||||
SYNC_BEFORE_WMIFLAG);
|
||||
if (A_OK != status) {
|
||||
if (0 != status) {
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
|
@ -1908,7 +1908,7 @@ ar6000_ioctl_giwname(struct net_device *dev,
|
|||
u8 capability;
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -1962,7 +1962,7 @@ ar6000_ioctl_siwfreq(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2007,7 +2007,7 @@ ar6000_ioctl_giwfreq(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2047,7 +2047,7 @@ ar6000_ioctl_siwmode(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2118,7 +2118,7 @@ ar6000_ioctl_giwmode(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2180,7 +2180,7 @@ ar6000_ioctl_giwrange(struct net_device *dev,
|
|||
struct iw_range *range = (struct iw_range *) extra;
|
||||
int i, ret = 0;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2205,7 +2205,7 @@ ar6000_ioctl_giwrange(struct net_device *dev,
|
|||
ar->arNumChannels = -1;
|
||||
A_MEMZERO(ar->arChannelList, sizeof (ar->arChannelList));
|
||||
|
||||
if (wmi_get_channelList_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_channelList_cmd(ar->arWmi) != 0) {
|
||||
up(&ar->arSem);
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -2301,7 +2301,7 @@ ar6000_ioctl_siwap(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2333,7 +2333,7 @@ ar6000_ioctl_giwap(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2369,7 +2369,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2462,7 +2462,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
|
|||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
int ret = 0;
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
@ -2487,13 +2487,13 @@ ar6000_ioctl_siwscan(struct net_device *dev,
|
|||
}
|
||||
|
||||
if (!ar->arUserBssFilter) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != A_OK) {
|
||||
if (wmi_bssfilter_cmd(ar->arWmi, ALL_BSS_FILTER, 0) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
||||
if (ar->arConnected) {
|
||||
if (wmi_get_stats_cmd(ar->arWmi) != A_OK) {
|
||||
if (wmi_get_stats_cmd(ar->arWmi) != 0) {
|
||||
return -EIO;
|
||||
}
|
||||
}
|
||||
|
@ -2507,14 +2507,14 @@ ar6000_ioctl_siwscan(struct net_device *dev,
|
|||
struct iw_scan_req req;
|
||||
if (copy_from_user(&req, data->pointer, sizeof(struct iw_scan_req)))
|
||||
return -EIO;
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, SPECIFIC_SSID_FLAG, req.essid_len, req.essid) != A_OK)
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, SPECIFIC_SSID_FLAG, req.essid_len, req.essid) != 0)
|
||||
return -EIO;
|
||||
ar->scanSpecificSsid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ar->scanSpecificSsid) {
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK)
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != 0)
|
||||
return -EIO;
|
||||
ar->scanSpecificSsid = false;
|
||||
}
|
||||
|
@ -2523,7 +2523,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
|
|||
else
|
||||
{
|
||||
if (ar->scanSpecificSsid) {
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK)
|
||||
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != 0)
|
||||
return -EIO;
|
||||
ar->scanSpecificSsid = false;
|
||||
}
|
||||
|
@ -2532,7 +2532,7 @@ ar6000_ioctl_siwscan(struct net_device *dev,
|
|||
#endif /* ANDROID_ENV */
|
||||
|
||||
if (wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, false, false, \
|
||||
0, 0, 0, NULL) != A_OK) {
|
||||
0, 0, 0, NULL) != 0) {
|
||||
ret = -EIO;
|
||||
}
|
||||
|
||||
|
@ -2589,7 +2589,7 @@ ar6000_ioctl_siwcommit(struct net_device *dev,
|
|||
{
|
||||
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
|
||||
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != A_OK) {
|
||||
if (is_iwioctl_allowed(ar->arNextMode, info->cmd) != 0) {
|
||||
A_PRINTF("wext_ioctl: cmd=0x%x not allowed in this mode\n", info->cmd);
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
|
|||
AGGR_INFO *p_aggr = NULL;
|
||||
RXTID *rxtid;
|
||||
u8 i;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
A_PRINTF("In aggr_init..\n");
|
||||
|
||||
|
@ -90,13 +90,13 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
|
|||
}while(false);
|
||||
|
||||
A_PRINTF("going out of aggr_init..status %s\n",
|
||||
(status == A_OK) ? "OK":"Error");
|
||||
(status == 0) ? "OK":"Error");
|
||||
|
||||
if (status) {
|
||||
/* Cleanup */
|
||||
aggr_module_destroy(p_aggr);
|
||||
}
|
||||
return ((status == A_OK) ? p_aggr : NULL);
|
||||
return ((status == 0) ? p_aggr : NULL);
|
||||
}
|
||||
|
||||
/* utility function to clear rx hold_q for a tid */
|
||||
|
@ -399,7 +399,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf)
|
|||
|
||||
A_MEMCPY(A_NETBUF_DATA(new_buf), framep, frame_8023_len);
|
||||
A_NETBUF_PUT(new_buf, frame_8023_len);
|
||||
if (wmi_dot3_2_dix(new_buf) != A_OK) {
|
||||
if (wmi_dot3_2_dix(new_buf) != 0) {
|
||||
A_PRINTF("dot3_2_dix err..\n");
|
||||
A_NETBUF_FREE(new_buf);
|
||||
break;
|
||||
|
|
|
@ -196,5 +196,5 @@ wlan_parse_beacon(u8 *buf, int framelen, struct ieee80211_common_ie *cie)
|
|||
IEEE80211_VERIFY_ELEMENT(cie->ie_rates, IEEE80211_RATE_MAXSIZE);
|
||||
IEEE80211_VERIFY_ELEMENT(cie->ie_ssid, IEEE80211_NWID_LEN);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -416,7 +416,7 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
|
|||
* packet is already in 802.3 format - return success
|
||||
*/
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "packet already 802.3\n", DBGARG));
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -430,7 +430,7 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
|
|||
/*
|
||||
* Make room for LLC+SNAP headers
|
||||
*/
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
datap = A_NETBUF_DATA(osbuf);
|
||||
|
@ -446,19 +446,19 @@ wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf)
|
|||
llcHdr->orgCode[2] = 0x0;
|
||||
llcHdr->etherType = typeorlen;
|
||||
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS)
|
||||
{
|
||||
switch(*pVersion){
|
||||
case 0:
|
||||
return (A_OK);
|
||||
return (0);
|
||||
case WMI_META_VERSION_1:
|
||||
{
|
||||
WMI_TX_META_V1 *pV1= NULL;
|
||||
A_ASSERT(osbuf != NULL);
|
||||
if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -473,23 +473,23 @@ int wmi_meta_add(struct wmi_t *wmip, void *osbuf, u8 *pVersion,void *pTxMetaS)
|
|||
A_ASSERT(pVersion != NULL);
|
||||
/* the version must be used to populate the meta field of the WMI_DATA_HDR */
|
||||
*pVersion = WMI_META_VERSION_1;
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
#ifdef CONFIG_CHECKSUM_OFFLOAD
|
||||
case WMI_META_VERSION_2:
|
||||
{
|
||||
WMI_TX_META_V2 *pV2 ;
|
||||
A_ASSERT(osbuf != NULL);
|
||||
if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, WMI_MAX_TX_META_SZ) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
pV2 = (WMI_TX_META_V2 *)A_NETBUF_DATA(osbuf);
|
||||
A_MEMCPY(pV2,(WMI_TX_META_V2 *)pTxMetaS,sizeof(WMI_TX_META_V2));
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -506,11 +506,11 @@ wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData,
|
|||
|
||||
/* adds the meta data field after the wmi data hdr. If metaVersion
|
||||
* is returns 0 then no meta field was added. */
|
||||
if ((status = wmi_meta_add(wmip, osbuf, &metaVersion,pTxMetaS)) != A_OK) {
|
||||
if ((status = wmi_meta_add(wmip, osbuf, &metaVersion,pTxMetaS)) != 0) {
|
||||
return status;
|
||||
}
|
||||
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, u8 msgType, bool bMoreData,
|
|||
WMI_DATA_HDR_SET_META(dtHdr, metaVersion);
|
||||
//dtHdr->rssi = 0;
|
||||
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -664,7 +664,7 @@ wmi_dot11_hdr_add (struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode)
|
|||
/*
|
||||
* Make room for LLC+SNAP headers
|
||||
*/
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
datap = A_NETBUF_DATA(osbuf);
|
||||
|
@ -683,7 +683,7 @@ AddDot11Hdr:
|
|||
if (wmip->wmi_is_wmm_enabled)
|
||||
{
|
||||
hdrsize = A_ROUND_UP(sizeof(struct ieee80211_qosframe),sizeof(u32));
|
||||
if (A_NETBUF_PUSH(osbuf, hdrsize) != A_OK)
|
||||
if (A_NETBUF_PUSH(osbuf, hdrsize) != 0)
|
||||
{
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ AddDot11Hdr:
|
|||
else
|
||||
{
|
||||
hdrsize = A_ROUND_UP(sizeof(struct ieee80211_frame),sizeof(u32));
|
||||
if (A_NETBUF_PUSH(osbuf, hdrsize) != A_OK)
|
||||
if (A_NETBUF_PUSH(osbuf, hdrsize) != 0)
|
||||
{
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
@ -710,7 +710,7 @@ AddDot11Hdr:
|
|||
IEEE80211_ADDR_COPY(wh->i_addr1, macHdr.dstMac);
|
||||
}
|
||||
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -774,7 +774,7 @@ wmi_dot11_hdr_remove(struct wmi_t *wmip, void *osbuf)
|
|||
|
||||
A_MEMCPY (datap, &macHdr, sizeof(ATH_MAC_HDR));
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -795,7 +795,7 @@ wmi_dot3_2_dix(void *osbuf)
|
|||
llcHdr = (ATH_LLC_SNAP_HDR *)(datap + sizeof(ATH_MAC_HDR));
|
||||
macHdr.typeOrLen = llcHdr->etherType;
|
||||
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(ATH_LLC_SNAP_HDR)) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -803,7 +803,7 @@ wmi_dot3_2_dix(void *osbuf)
|
|||
|
||||
A_MEMCPY(datap, &macHdr, sizeof (ATH_MAC_HDR));
|
||||
|
||||
return (A_OK);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -833,7 +833,7 @@ wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
|
|||
u16 id;
|
||||
u8 *datap;
|
||||
u32 len;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
if (A_NETBUF_LEN(osbuf) < sizeof(WMIX_CMD_HDR)) {
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 1\n", DBGARG));
|
||||
|
@ -844,7 +844,7 @@ wmi_control_rx_xtnd(struct wmi_t *wmip, void *osbuf)
|
|||
cmd = (WMIX_CMD_HDR *)A_NETBUF_DATA(osbuf);
|
||||
id = cmd->commandId;
|
||||
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(WMIX_CMD_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(WMIX_CMD_HDR)) != 0) {
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG));
|
||||
wmip->wmi_stats.cmd_len_err++;
|
||||
return A_ERROR;
|
||||
|
@ -910,7 +910,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
u16 id;
|
||||
u8 *datap;
|
||||
u32 len, i, loggingReq;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
A_ASSERT(osbuf != NULL);
|
||||
if (A_NETBUF_LEN(osbuf) < sizeof(WMI_CMD_HDR)) {
|
||||
|
@ -923,7 +923,7 @@ wmi_control_rx(struct wmi_t *wmip, void *osbuf)
|
|||
cmd = (WMI_CMD_HDR *)A_NETBUF_DATA(osbuf);
|
||||
id = cmd->commandId;
|
||||
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(WMI_CMD_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PULL(osbuf, sizeof(WMI_CMD_HDR)) != 0) {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "bad packet 2\n", DBGARG));
|
||||
wmip->wmi_stats.cmd_len_err++;
|
||||
|
@ -1236,7 +1236,7 @@ wmi_ready_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_WMI_READY_EVENT(wmip->wmi_devt, ev->macaddr, ev->phyCapability,
|
||||
ev->sw_version, ev->abi_version);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define LE_READ_4(p) \
|
||||
|
@ -1314,7 +1314,7 @@ wmi_connect_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
ev->assocReqLen, ev->assocRespLen,
|
||||
ev->assocInfo);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1329,7 +1329,7 @@ wmi_regDomain_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_REGDOMAIN_EVENT(wmip->wmi_devt, ev->regDomain);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1350,7 +1350,7 @@ wmi_neighborReport_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_NEIGHBORREPORT_EVENT(wmip->wmi_devt, numAps, ev->neighbor);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1375,7 +1375,7 @@ wmi_disconnect_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_WMI_DISCONNECT_EVENT(wmip->wmi_devt, ev->disconnectReason, ev->bssid,
|
||||
ev->assocRespLen, ev->assocInfo, ev->protocolReasonStatus);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1395,7 +1395,7 @@ wmi_peer_node_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_PEER_EVENT (wmip->wmi_devt, ev->eventCode, ev->peerMacAddr);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1411,7 +1411,7 @@ wmi_tkip_micerr_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
ev = (WMI_TKIP_MICERR_EVENT *)datap;
|
||||
A_WMI_TKIP_MICERR_EVENT(wmip->wmi_devt, ev->keyid, ev->ismcast);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1434,7 +1434,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
if (bih->rssi > 0) {
|
||||
if (NULL == bss)
|
||||
return A_OK; //no node found in the table, just drop the node with incorrect RSSI
|
||||
return 0; //no node found in the table, just drop the node with incorrect RSSI
|
||||
else
|
||||
bih->rssi = bss->ni_rssi; //Adjust RSSI in datap in case it is used in A_WMI_BSSINFO_EVENT_RX
|
||||
}
|
||||
|
@ -1443,14 +1443,14 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
/* What is driver config for wlan node caching? */
|
||||
if(ar6000_get_driver_cfg(wmip->wmi_devt,
|
||||
AR6000_DRIVER_CFG_GET_WLANNODECACHING,
|
||||
&nodeCachingAllowed) != A_OK) {
|
||||
&nodeCachingAllowed) != 0) {
|
||||
wmi_node_return(wmip, bss);
|
||||
return A_EINVAL;
|
||||
}
|
||||
|
||||
if(!nodeCachingAllowed) {
|
||||
wmi_node_return(wmip, bss);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
buf = datap + sizeof(WMI_BSS_INFO_HDR);
|
||||
|
@ -1462,7 +1462,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
if(wps_enable && (bih->frameType == PROBERESP_FTYPE) ) {
|
||||
wmi_node_return(wmip, bss);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (bss != NULL) {
|
||||
|
@ -1563,7 +1563,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_MEMCPY(bss->ni_buf, buf, len);
|
||||
|
||||
bss->ni_framelen = len;
|
||||
if (wlan_parse_beacon(bss->ni_buf, len, &bss->ni_cie) != A_OK) {
|
||||
if (wlan_parse_beacon(bss->ni_buf, len, &bss->ni_cie) != 0) {
|
||||
wlan_node_free(bss);
|
||||
return A_EINVAL;
|
||||
}
|
||||
|
@ -1575,7 +1575,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
bss->ni_cie.ie_chan = bih->channel;
|
||||
wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1617,7 +1617,7 @@ wmi_opt_frame_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_MEMCPY(bss->ni_buf, buf, len);
|
||||
wlan_setup_node(&wmip->wmi_scan_table, bss, bih->bssid);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This event indicates inactivity timeout of a fatpipe(pstream)
|
||||
|
@ -1650,7 +1650,7 @@ wmi_pstream_timeout_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
/*Indicate inactivity to driver layer for this fatpipe (pstream)*/
|
||||
A_WMI_STREAM_TX_INACTIVE(wmip->wmi_devt, ev->trafficClass);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1681,7 +1681,7 @@ wmi_bitrate_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
}
|
||||
|
||||
A_WMI_BITRATE_RX(wmip->wmi_devt, rate);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1698,7 +1698,7 @@ wmi_ratemask_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_RATEMASK_RX(wmip->wmi_devt, reply->fixRateMask);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1715,7 +1715,7 @@ wmi_channelList_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_WMI_CHANNELLIST_RX(wmip->wmi_devt, reply->numChannels,
|
||||
reply->channelList);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1731,7 +1731,7 @@ wmi_txPwr_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_TXPWR_RX(wmip->wmi_devt, reply->dbM);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
static int
|
||||
wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
||||
|
@ -1746,7 +1746,7 @@ wmi_keepalive_reply_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_KEEPALIVE_RX(wmip->wmi_devt, reply->configured);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1767,7 +1767,7 @@ wmi_dset_open_req_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
dsetopenreq->targ_reply_fn,
|
||||
dsetopenreq->targ_reply_arg);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOST_DSET_SUPPORT
|
||||
|
@ -1784,7 +1784,7 @@ wmi_dset_close_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
dsetclose = (WMIX_DSETCLOSE_EVENT *)datap;
|
||||
A_WMI_DSET_CLOSE(wmip->wmi_devt, dsetclose->access_cookie);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1806,7 +1806,7 @@ wmi_dset_data_req_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
dsetdatareq->targ_reply_fn,
|
||||
dsetdatareq->targ_reply_arg);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_HOST_DSET_SUPPORT */
|
||||
|
||||
|
@ -1816,13 +1816,13 @@ wmi_scanComplete_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
WMI_SCAN_COMPLETE_EVENT *ev;
|
||||
|
||||
ev = (WMI_SCAN_COMPLETE_EVENT *)datap;
|
||||
if ((int)ev->status == A_OK) {
|
||||
if ((int)ev->status == 0) {
|
||||
wlan_refresh_inactive_nodes(&wmip->wmi_scan_table);
|
||||
}
|
||||
A_WMI_SCANCOMPLETE_EVENT(wmip->wmi_devt, (int) ev->status);
|
||||
is_probe_ssid = false;
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1851,7 +1851,7 @@ wmi_errorEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
break;
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1862,7 +1862,7 @@ wmi_statsEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_TARGETSTATS_EVENT(wmip->wmi_devt, datap, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1959,14 +1959,14 @@ wmi_rssiThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
rssi_event_value = rssi;
|
||||
|
||||
if (wmi_send_rssi_threshold_params(wmip, &cmd) != A_OK) {
|
||||
if (wmi_send_rssi_threshold_params(wmip, &cmd) != 0) {
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the RSSI thresholds\n",
|
||||
DBGARG));
|
||||
}
|
||||
|
||||
A_WMI_RSSI_THRESHOLD_EVENT(wmip->wmi_devt, newThreshold, reply->rssi);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1983,7 +1983,7 @@ wmi_reportErrorEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_REPORT_ERROR_EVENT(wmip->wmi_devt, (WMI_TARGET_ERROR_VAL) reply->errorVal);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2053,7 +2053,7 @@ wmi_cac_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
reply->cac_indication, reply->statusCode,
|
||||
reply->tspecSuggestion);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2070,7 +2070,7 @@ wmi_channel_change_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_WMI_CHANNEL_CHANGE_EVENT(wmip->wmi_devt, reply->oldChannel,
|
||||
reply->newChannel);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2086,7 +2086,7 @@ wmi_hbChallengeResp_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_HBCHALLENGERESP_EVENT(wmip->wmi_devt, reply->cookie, reply->source);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2102,7 +2102,7 @@ wmi_roam_tbl_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_ROAM_TABLE_EVENT(wmip->wmi_devt, reply);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2118,7 +2118,7 @@ wmi_roam_data_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_ROAM_DATA_EVENT(wmip->wmi_devt, reply);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2131,7 +2131,7 @@ wmi_txRetryErrEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_TX_RETRY_ERR_EVENT(wmip->wmi_devt);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2218,13 +2218,13 @@ wmi_snrThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
snr_event_value = snr;
|
||||
|
||||
if (wmi_send_snr_threshold_params(wmip, &cmd) != A_OK) {
|
||||
if (wmi_send_snr_threshold_params(wmip, &cmd) != 0) {
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "Unable to configure the SNR thresholds\n",
|
||||
DBGARG));
|
||||
}
|
||||
A_WMI_SNR_THRESHOLD_EVENT_RX(wmip->wmi_devt, newThreshold, reply->snr);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2242,7 +2242,7 @@ wmi_lqThresholdEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
(WMI_LQ_THRESHOLD_VAL) reply->range,
|
||||
reply->lq);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2283,7 +2283,7 @@ wmi_aplistEvent_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
ap_info_v1->channel));
|
||||
ap_info_v1++;
|
||||
}
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2295,7 +2295,7 @@ wmi_dbglog_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
datap += sizeof(dropped);
|
||||
len -= sizeof(dropped);
|
||||
A_WMI_DBGLOG_EVENT(wmip->wmi_devt, dropped, (s8 *)datap, len);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_HOST_GPIO_SUPPORT
|
||||
|
@ -2310,7 +2310,7 @@ wmi_gpio_intr_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_GPIO_INTR_RX(gpio_intr->intr_mask, gpio_intr->input_values);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2324,7 +2324,7 @@ wmi_gpio_data_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_GPIO_DATA_RX(gpio_data->reg_id, gpio_data->value);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2334,7 +2334,7 @@ wmi_gpio_ack_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_GPIO_ACK_RX();
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_HOST_GPIO_SUPPORT */
|
||||
|
||||
|
@ -2366,7 +2366,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
|
|||
wmi_sync_point(wmip);
|
||||
}
|
||||
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_CMD_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_CMD_HDR)) != 0) {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
@ -2379,7 +2379,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
|
|||
* Only for OPT_TX_CMD, use BE endpoint.
|
||||
*/
|
||||
if (IS_OPT_TX_CMD(cmdId)) {
|
||||
if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != A_OK) {
|
||||
if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != 0) {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
return status;
|
||||
}
|
||||
|
@ -2394,7 +2394,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId,
|
|||
*/
|
||||
wmi_sync_point(wmip);
|
||||
}
|
||||
return (A_OK);
|
||||
return (0);
|
||||
#undef IS_OPT_TX_CMD
|
||||
}
|
||||
|
||||
|
@ -2404,7 +2404,7 @@ wmi_cmd_send_xtnd(struct wmi_t *wmip, void *osbuf, WMIX_COMMAND_ID cmdId,
|
|||
{
|
||||
WMIX_CMD_HDR *cHdr;
|
||||
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMIX_CMD_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMIX_CMD_HDR)) != 0) {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
@ -3067,7 +3067,7 @@ wmi_dataSync_send(struct wmi_t *wmip, void *osbuf, HTC_ENDPOINT_ID eid)
|
|||
A_ASSERT( eid != wmip->wmi_endpoint_id);
|
||||
A_ASSERT(osbuf != NULL);
|
||||
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != A_OK) {
|
||||
if (A_NETBUF_PUSH(osbuf, sizeof(WMI_DATA_HDR)) != 0) {
|
||||
return A_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
@ -3092,7 +3092,7 @@ wmi_sync_point(struct wmi_t *wmip)
|
|||
WMI_SYNC_CMD *cmd;
|
||||
WMI_DATA_SYNC_BUFS dataSyncBufs[WMM_NUM_AC];
|
||||
u8 i,numPriStreams=0;
|
||||
int status = A_OK;
|
||||
int status = 0;
|
||||
|
||||
A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
|
||||
|
||||
|
@ -3528,7 +3528,7 @@ s8 wmi_validate_bitrate(struct wmi_t *wmip, s32 rate, s8 *rate_idx)
|
|||
}
|
||||
|
||||
*rate_idx = i;
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3857,7 +3857,7 @@ wmi_get_wow_list_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
A_WMI_WOW_LIST_EVENT(wmip->wmi_devt, reply->num_filters,
|
||||
reply);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int wmi_add_wow_pattern_cmd(struct wmi_t *wmip,
|
||||
|
@ -4647,7 +4647,7 @@ u8 wmi_get_power_mode_cmd(struct wmi_t *wmip)
|
|||
int
|
||||
wmi_verify_tspec_params(WMI_CREATE_PSTREAM_CMD *pCmd, int tspecCompliance)
|
||||
{
|
||||
int ret = A_OK;
|
||||
int ret = 0;
|
||||
|
||||
#define TSPEC_SUSPENSION_INTERVAL_ATHEROS_DEF (~0)
|
||||
#define TSPEC_SERVICE_START_TIME_ATHEROS_DEF 0
|
||||
|
@ -4685,7 +4685,7 @@ wmi_tcmd_test_report_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_TCMD_RX_REPORT_EVENT(wmip->wmi_devt, datap, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HOST_TCMD_SUPPORT*/
|
||||
|
@ -5473,7 +5473,7 @@ wmi_get_pmkid_list_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
|
|||
A_WMI_PMKID_LIST_EVENT(wmip->wmi_devt, reply->numPMKID,
|
||||
reply->pmkidList, reply->bssidList[0]);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5487,7 +5487,7 @@ wmi_set_params_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
|
|||
}
|
||||
reply = (WMI_SET_PARAMS_REPLY *)datap;
|
||||
|
||||
if (A_OK == reply->status)
|
||||
if (0 == reply->status)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -5496,7 +5496,7 @@ wmi_set_params_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
|
|||
|
||||
}
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5509,7 +5509,7 @@ wmi_acm_reject_event_rx(struct wmi_t *wmip, u8 *datap, u32 len)
|
|||
ev = (WMI_ACM_REJECT_EVENT *)datap;
|
||||
wmip->wmi_traffic_class = ev->trafficClass;
|
||||
printk("ACM REJECT %d\n",wmip->wmi_traffic_class);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -5549,7 +5549,7 @@ wmi_dset_data_reply(struct wmi_t *wmip,
|
|||
data_reply->targ_reply_arg = targ_reply_arg;
|
||||
data_reply->length = length;
|
||||
|
||||
if (status == A_OK) {
|
||||
if (status == 0) {
|
||||
if (a_copy_from_user(data_reply->buf, user_buf, length)) {
|
||||
A_NETBUF_FREE(osbuf);
|
||||
return A_ERROR;
|
||||
|
@ -5658,7 +5658,7 @@ wmi_prof_count_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_PROF_COUNT_RX(prof_data->addr, prof_data->count);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_TARGET_PROFILE_SUPPORT */
|
||||
|
||||
|
@ -5992,7 +5992,7 @@ bss_t *wmi_rm_current_bss (struct wmi_t *wmip, u8 *id)
|
|||
int wmi_add_current_bss (struct wmi_t *wmip, u8 *id, bss_t *bss)
|
||||
{
|
||||
wlan_setup_node (&wmip->wmi_scan_table, bss, id);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef ATH_AR6K_11N_SUPPORT
|
||||
|
@ -6003,7 +6003,7 @@ wmi_addba_req_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_AGGR_RECV_ADDBA_REQ_EVT(wmip->wmi_devt, cmd);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6014,7 +6014,7 @@ wmi_addba_resp_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_AGGR_RECV_ADDBA_RESP_EVT(wmip->wmi_devt, cmd);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -6024,7 +6024,7 @@ wmi_delba_req_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_AGGR_RECV_DELBA_REQ_EVT(wmip->wmi_devt, cmd);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -6034,7 +6034,7 @@ wmi_btcoex_config_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
|
||||
A_WMI_BTCOEX_CONFIG_EVENT(wmip->wmi_devt, datap, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -6045,7 +6045,7 @@ wmi_btcoex_stats_event_rx(struct wmi_t * wmip,u8 *datap,int len)
|
|||
|
||||
A_WMI_BTCOEX_STATS_EVENT(wmip->wmi_devt, datap, len);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -6056,7 +6056,7 @@ wmi_hci_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
WMI_HCI_EVENT *cmd = (WMI_HCI_EVENT *)datap;
|
||||
A_WMI_HCI_EVENT_EVT(wmip->wmi_devt, cmd);
|
||||
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -6216,14 +6216,14 @@ wmi_pspoll_event_rx(struct wmi_t *wmip, u8 *datap, int len)
|
|||
ev = (WMI_PSPOLL_EVENT *)datap;
|
||||
|
||||
A_WMI_PSPOLL_EVENT(wmip->wmi_devt, ev->aid);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
wmi_dtimexpiry_event_rx(struct wmi_t *wmip, u8 *datap,int len)
|
||||
{
|
||||
A_WMI_DTIMEXPIRY_EVENT(wmip->wmi_devt);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef WAPI_ENABLE
|
||||
|
@ -6238,7 +6238,7 @@ wmi_wapi_rekey_event_rx(struct wmi_t *wmip, u8 *datap,int len)
|
|||
ev = (u8 *)datap;
|
||||
|
||||
A_WMI_WAPI_REKEY_EVENT(wmip->wmi_devt, *ev, &ev[1]);
|
||||
return A_OK;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue