Commit 1071a134 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

staging: ath6kl: Remove A_BOOL and TRUE/FALSE

Use kernel bool and true/false.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 949c3676
......@@ -39,7 +39,7 @@
#define BMI_COMMUNICATION_TIMEOUT 100000
/* ------ Global Variable Declarations ------- */
static A_BOOL bmiDone;
static bool bmiDone;
int
bmiBufferSend(HIF_DEVICE *device,
......@@ -50,6 +50,6 @@ int
bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
A_BOOL want_timeout);
bool want_timeout);
#endif
......@@ -53,7 +53,7 @@ and does not use the HTC protocol nor even DMA -- it is intentionally kept
very simple.
*/
static A_BOOL pendingEventsFuncCheck = FALSE;
static bool pendingEventsFuncCheck = false;
static A_UINT32 *pBMICmdCredits;
static A_UCHAR *pBMICmdBuf;
#define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \
......@@ -66,8 +66,8 @@ static A_UCHAR *pBMICmdBuf;
void
BMIInit(void)
{
bmiDone = FALSE;
pendingEventsFuncCheck = FALSE;
bmiDone = false;
pendingEventsFuncCheck = false;
/*
* On some platforms, it's not possible to DMA to a static variable
......@@ -117,7 +117,7 @@ BMIDone(HIF_DEVICE *device)
}
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
bmiDone = TRUE;
bmiDone = true;
cid = BMI_DONE;
status = bmiBufferSend(device, (A_UCHAR *)&cid, sizeof(cid));
......@@ -162,7 +162,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
}
status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_ver,
sizeof(targ_info->target_ver), TRUE);
sizeof(targ_info->target_ver), true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Version from the device\n"));
return A_ERROR;
......@@ -171,7 +171,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
if (targ_info->target_ver == TARGET_VERSION_SENTINAL) {
/* Determine how many bytes are in the Target's targ_info */
status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_info_byte_count,
sizeof(targ_info->target_info_byte_count), TRUE);
sizeof(targ_info->target_info_byte_count), true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info Byte Count from the device\n"));
return A_ERROR;
......@@ -186,7 +186,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
/* Read the remainder of the targ_info */
status = bmiBufferReceive(device,
((A_UCHAR *)targ_info)+sizeof(targ_info->target_info_byte_count),
sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), TRUE);
sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info (%d bytes) from the device\n",
targ_info->target_info_byte_count));
......@@ -243,7 +243,7 @@ BMIReadMemory(HIF_DEVICE *device,
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n"));
return A_ERROR;
}
status = bmiBufferReceive(device, pBMICmdBuf, rxlen, TRUE);
status = bmiBufferReceive(device, pBMICmdBuf, rxlen, true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
return A_ERROR;
......@@ -357,7 +357,7 @@ BMIExecute(HIF_DEVICE *device,
return A_ERROR;
}
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), FALSE);
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), false);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
return A_ERROR;
......@@ -441,7 +441,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
return A_ERROR;
}
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), TRUE);
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
return A_ERROR;
......@@ -537,7 +537,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
return A_ERROR;
}
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), TRUE);
status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), true);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
return A_ERROR;
......@@ -785,7 +785,7 @@ int
bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
A_BOOL want_timeout)
bool want_timeout)
{
int status;
A_UINT32 address;
......@@ -800,7 +800,7 @@ bmiBufferReceive(HIF_DEVICE *device,
HIF_DEVICE_GET_PENDING_EVENTS_FUNC,
&getPendingEventsFunc,
sizeof(getPendingEventsFunc));
pendingEventsFuncCheck = TRUE;
pendingEventsFuncCheck = true;
}
HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR,
......@@ -1004,7 +1004,7 @@ BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length)
}
int
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout)
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, bool want_timeout)
{
return bmiBufferReceive(device, buffer, length, want_timeout);
}
......@@ -74,7 +74,7 @@ static INLINE void SetExtendedMboxWindowInfo(A_UINT16 Manfid, HIF_DEVICE_MBOX_IN
pInfo->GMboxSize = HIF_GMBOX_WIDTH;
break;
default:
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
}
......
......@@ -78,9 +78,9 @@ struct hif_device {
HTC_CALLBACKS htcCallbacks;
A_UINT8 *dma_buffer;
DL_LIST ScatterReqHead; /* scatter request list head */
A_BOOL scatter_enabled; /* scatter enabled flag */
A_BOOL is_suspend;
A_BOOL is_disabled;
bool scatter_enabled; /* scatter enabled flag */
bool is_suspend;
bool is_disabled;
atomic_t irqHandling;
HIF_DEVICE_POWER_CHANGE_TYPE powerConfig;
const struct sdio_device_id *id;
......
......@@ -46,7 +46,7 @@
*/
#define BUFFER_NEEDS_BOUNCE(buffer) (((unsigned long)(buffer) & 0x3) || !virt_addr_valid((buffer)))
#else
#define BUFFER_NEEDS_BOUNCE(buffer) (FALSE)
#define BUFFER_NEEDS_BOUNCE(buffer) (false)
#endif
/* ATHENV */
......@@ -164,7 +164,7 @@ __HIFReadWrite(HIF_DEVICE *device,
int status = A_OK;
int ret;
A_UINT8 *tbuffer;
A_BOOL bounced = FALSE;
bool bounced = false;
AR_DEBUG_ASSERT(device != NULL);
AR_DEBUG_ASSERT(device->func != NULL);
......@@ -243,7 +243,7 @@ __HIFReadWrite(HIF_DEVICE *device,
/* copy the write data to the dma buffer */
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
memcpy(tbuffer, buffer, length);
bounced = TRUE;
bounced = true;
} else {
tbuffer = buffer;
}
......@@ -265,7 +265,7 @@ __HIFReadWrite(HIF_DEVICE *device,
AR_DEBUG_ASSERT(device->dma_buffer != NULL);
AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
tbuffer = device->dma_buffer;
bounced = TRUE;
bounced = true;
} else {
tbuffer = buffer;
}
......@@ -299,7 +299,7 @@ __HIFReadWrite(HIF_DEVICE *device,
("AR6000: SDIO bus operation failed! MMC stack returned : %d \n", ret));
status = A_ERROR;
}
} while (FALSE);
} while (false);
return status;
}
......@@ -725,7 +725,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
}
status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config);
if (status) {
device->scatter_enabled = FALSE;
device->scatter_enabled = false;
}
break;
case HIF_DEVICE_GET_OS_DEVICE:
......@@ -837,7 +837,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
device = getHifDevice(func);
device->id = id;
device->is_disabled = TRUE;
device->is_disabled = true;
spin_lock_init(&device->lock);
......@@ -848,7 +848,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
if (!nohifscattersupport) {
/* try to allow scatter operation on all instances,
* unless globally overridden */
device->scatter_enabled = TRUE;
device->scatter_enabled = true;
}
/* Initialize the bus requests to be used later */
......@@ -989,7 +989,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
sdio_release_host(device->func);
if (status == A_OK) {
device->is_disabled = TRUE;
device->is_disabled = true;
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
......@@ -1036,7 +1036,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
__FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret));
return A_ERROR;
}
device->is_disabled = FALSE;
device->is_disabled = false;
/* create async I/O thread */
if (!device->async_task) {
device->async_shutdown = 0;
......@@ -1086,10 +1086,10 @@ static int hifDeviceSuspend(struct device *dev)
device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n"));
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
device->is_suspend = TRUE; /* set true first for PowerStateChangeNotify(..) */
device->is_suspend = true; /* set true first for PowerStateChangeNotify(..) */
status = osdrvCallbacks.deviceSuspendHandler(device->claimedContext);
if (status != A_OK) {
device->is_suspend = FALSE;
device->is_suspend = false;
}
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));
......@@ -1115,7 +1115,7 @@ static int hifDeviceResume(struct device *dev)
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
if (status == A_OK) {
device->is_suspend = FALSE;
device->is_suspend = false;
}
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceResume\n"));
......@@ -1137,7 +1137,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
}
if (device->is_disabled) {
device->is_disabled = FALSE;
device->is_disabled = false;
} else {
status = hifDisableFunc(device, func);
}
......
......@@ -237,7 +237,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
}
if (pReq->TotalLength == 0) {
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -263,7 +263,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
status = A_OK;
}
} while (FALSE);
} while (false);
if (status && (request & HIF_ASYNCHRONOUS)) {
pReq->CompletionStatus = status;
......@@ -346,7 +346,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
status = A_OK;
} while (FALSE);
} while (false);
if (status) {
CleanupHIFScatterResources(device);
......
This diff is collapsed.
......@@ -75,8 +75,8 @@ typedef PREPACK struct _AR6K_GMBOX_CTRL_REGISTERS {
#define AR6K_REG_IO_BUFFER_SIZE 32
#define AR6K_MAX_REG_IO_BUFFERS 8
#define FROM_DMA_BUFFER TRUE
#define TO_DMA_BUFFER FALSE
#define FROM_DMA_BUFFER true
#define TO_DMA_BUFFER false
#define AR6K_SCATTER_ENTRIES_PER_REQ 16
#define AR6K_MAX_TRANSFER_SIZE_PER_SCATTER 16*1024
#define AR6K_SCATTER_REQS 4
......@@ -99,10 +99,10 @@ typedef struct AR6K_ASYNC_REG_IO_BUFFER {
typedef struct _AR6K_GMBOX_INFO {
void *pProtocolContext;
int (*pMessagePendingCallBack)(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes);
int (*pCreditsPendingCallback)(void *pContext, int NumCredits, A_BOOL CreditIRQEnabled);
int (*pCreditsPendingCallback)(void *pContext, int NumCredits, bool CreditIRQEnabled);
void (*pTargetFailureCallback)(void *pContext, int Status);
void (*pStateDumpCallback)(void *pContext);
A_BOOL CreditCountIRQEnabled;
bool CreditCountIRQEnabled;
} AR6K_GMBOX_INFO;
typedef struct _AR6K_DEVICE {
......@@ -124,21 +124,21 @@ typedef struct _AR6K_DEVICE {
int (*MessagePendingCallback)(void *Context,
A_UINT32 LookAheads[],
int NumLookAheads,
A_BOOL *pAsyncProc,
bool *pAsyncProc,
int *pNumPktsFetched);
HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode;
HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent;
A_BOOL HifAttached;
bool HifAttached;
HIF_DEVICE_IRQ_YIELD_PARAMS HifIRQYieldParams;
A_BOOL DSRCanYield;
bool DSRCanYield;
int CurrentDSRRecvCount;
HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo;
DL_LIST ScatterReqHead;
A_BOOL ScatterIsVirtual;
bool ScatterIsVirtual;
int MaxRecvBundleSize;
int MaxSendBundleSize;
AR6K_GMBOX_INFO GMboxInfo;
A_BOOL GMboxEnabled;
bool GMboxEnabled;
AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters;
int RecheckIRQStatusCnt;
} AR6K_DEVICE;
......@@ -162,15 +162,15 @@ void DevDumpRegisters(AR6K_DEVICE *pDev,
AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs);
#define DEV_STOP_RECV_ASYNC TRUE
#define DEV_STOP_RECV_SYNC FALSE
#define DEV_ENABLE_RECV_ASYNC TRUE
#define DEV_ENABLE_RECV_SYNC FALSE
int DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
int DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode);
#define DEV_STOP_RECV_ASYNC true
#define DEV_STOP_RECV_SYNC false
#define DEV_ENABLE_RECV_ASYNC true
#define DEV_ENABLE_RECV_SYNC false
int DevStopRecv(AR6K_DEVICE *pDev, bool ASyncMode);
int DevEnableRecv(AR6K_DEVICE *pDev, bool ASyncMode);
int DevEnableInterrupts(AR6K_DEVICE *pDev);
int DevDisableInterrupts(AR6K_DEVICE *pDev);
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending);
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,bool *pbIsRecvPending);
#define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask)))
#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length)
......@@ -178,7 +178,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec
static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) {
A_UINT32 paddedLength;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
bool sync = (pPacket->Completion == NULL) ? true : false;
int status;
/* adjust the length to be a multiple of block size if appropriate */
......@@ -186,7 +186,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32
#if 0
if (paddedLength > pPacket->BufferLength) {
A_ASSERT(FALSE);
A_ASSERT(false);
if (pPacket->Completion != NULL) {
COMPLETE_HTC_PACKET(pPacket,A_EINVAL);
return A_OK;
......@@ -222,13 +222,13 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32
static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) {
A_UINT32 paddedLength;
int status;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
bool sync = (pPacket->Completion == NULL) ? true : false;
/* adjust the length to be a multiple of block size if appropriate */
paddedLength = DEV_CALC_RECV_PADDED_LEN(pDev, RecvLength);
if (paddedLength > pPacket->BufferLength) {
A_ASSERT(FALSE);
A_ASSERT(false);
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("DevRecvPacket, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n",
paddedLength,RecvLength,pPacket->BufferLength));
......@@ -272,7 +272,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32
*
*/
int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA);
int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA);
/* copy any READ data back into scatter list */
#define DEV_FINISH_SCATTER_OPERATION(pR) \
......@@ -309,11 +309,11 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer);
#define DEV_GET_MAX_BUNDLE_RECV_LENGTH(pDev) (pDev)->MaxRecvBundleSize
#define DEV_GET_MAX_BUNDLE_SEND_LENGTH(pDev) (pDev)->MaxSendBundleSize
#define DEV_SCATTER_READ TRUE
#define DEV_SCATTER_WRITE FALSE
#define DEV_SCATTER_ASYNC TRUE
#define DEV_SCATTER_SYNC FALSE
int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async);
#define DEV_SCATTER_READ true
#define DEV_SCATTER_WRITE false
#define DEV_SCATTER_ASYNC true
#define DEV_SCATTER_SYNC false
int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async);
#ifdef MBOXHW_UNIT_TEST
int DoMboxHWTest(AR6K_DEVICE *pDev);
......@@ -350,7 +350,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
#define DevNotifyGMboxTargetFailure(p)
static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
pDev->GMboxEnabled = FALSE;
pDev->GMboxEnabled = false;
return A_OK;
}
......@@ -379,8 +379,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle);
int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength);
int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength);
#define PROC_IO_ASYNC TRUE
#define PROC_IO_SYNC FALSE
#define PROC_IO_ASYNC true
#define PROC_IO_SYNC false
typedef enum GMBOX_IRQ_ACTION_TYPE {
GMBOX_ACTION_NONE = 0,
GMBOX_DISABLE_ALL,
......@@ -391,8 +391,8 @@ typedef enum GMBOX_IRQ_ACTION_TYPE {
GMBOX_CREDIT_IRQ_DISABLE,
} GMBOX_IRQ_ACTION_TYPE;
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, A_BOOL AsyncMode);
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits);
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode);
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits);
int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize);
int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes);
int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS);
......
......@@ -70,7 +70,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevPollMboxMsgRecv \n"));
while (TRUE) {
while (true) {
if (pDev->GetPendingEventsFunc != NULL) {
......@@ -304,7 +304,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
{
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context;
A_UINT32 lookAhead = 0;
A_BOOL otherInts = FALSE;
bool otherInts = false;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGetEventAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
......@@ -327,7 +327,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
}
}
if (pEvents->Events & HIF_OTHER_EVENTS) {
otherInts = TRUE;
otherInts = true;
}
} else {
/* standard interrupt table handling.... */
......@@ -349,7 +349,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
if (host_int_status) {
/* there are other interrupts to handle */
otherInts = TRUE;
otherInts = true;
}
}
......@@ -379,7 +379,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
}
}
} while (FALSE);
} while (false);
/* free this IO packet */
AR6KFreeIOPacket(pDev,pPacket);
......@@ -428,7 +428,7 @@ int DevCheckPendingRecvMsgsAsync(void *context)
/* there should be only 1 asynchronous request out at a time to read these registers
* so this should actually never happen */
status = A_NO_MEMORY;
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -453,7 +453,7 @@ int DevCheckPendingRecvMsgsAsync(void *context)
}
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,(" Async IO issued to get interrupt status...\n"));
} while (FALSE);
} while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevCheckPendingRecvMsgsAsync \n"));
......@@ -467,7 +467,7 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev)
}
/* process pending interrupts synchronously */
static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncProcessing)
static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing)
{
int status = A_OK;
A_UINT8 host_int_status = 0;
......@@ -591,7 +591,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
status = DevCheckGMboxInterrupts(pDev);
}
} while (FALSE);
} while (false);
do {
......@@ -603,7 +603,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
if ((0 == host_int_status) && (0 == lookAhead)) {
/* nothing to process, the caller can use this to break out of a loop */
*pDone = TRUE;
*pDone = true;
break;
}
......@@ -624,7 +624,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
if (!fetched) {
/* HTC could not pull any messages out due to lack of resources */
/* force DSR handler to ack the interrupt */
*pASyncProcessing = FALSE;
*pASyncProcessing = false;
pDev->RecheckIRQStatusCnt = 0;
}
}
......@@ -658,7 +658,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
}
}
} while (FALSE);
} while (false);
/* an optimization to bypass reading the IRQ status registers unecessarily which can re-wake
* the target, if upper layers determine that we are in a low-throughput mode, we can
......@@ -670,7 +670,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr
* messages from the mailbox before exiting the ISR routine. */
if (!(*pASyncProcessing) && (pDev->RecheckIRQStatusCnt == 0) && (pDev->GetPendingEventsFunc == NULL)) {
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("Bypassing IRQ Status re-check, forcing done \n"));
*pDone = TRUE;
*pDone = true;
}
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-ProcessPendingIRQs: (done:%d, async:%d) status=%d \n",
......@@ -685,8 +685,8 @@ int DevDsrHandler(void *context)
{
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context;
int status = A_OK;
A_BOOL done = FALSE;
A_BOOL asyncProc = FALSE;
bool done = false;
bool asyncProc = false;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDsrHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
......@@ -703,7 +703,7 @@ int DevDsrHandler(void *context)
if (HIF_DEVICE_IRQ_SYNC_ONLY == pDev->HifIRQProcessingMode) {
/* the HIF layer does not allow async IRQ processing, override the asyncProc flag */
asyncProc = FALSE;
asyncProc = false;
/* this will cause us to re-enter ProcessPendingIRQ() and re-read interrupt status registers.
* this has a nice side effect of blocking us until all async read requests are completed.
* This behavior is required on some HIF implementations that do not allow ASYNC
......
......@@ -74,7 +74,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n"));
}
static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode)
static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{
int status = A_OK;
AR6K_IRQ_ENABLE_REGISTERS regs;
......@@ -83,12 +83,12 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
LOCK_AR6K(pDev);
if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) {
pDev->GMboxInfo.CreditCountIRQEnabled = TRUE;
pDev->GMboxInfo.CreditCountIRQEnabled = true;
pDev->IrqEnableRegisters.counter_int_status_enable |=
COUNTER_INT_STATUS_ENABLE_BIT_SET(1 << AR6K_GMBOX_CREDIT_COUNTER);
pDev->IrqEnableRegisters.int_status_enable |= INT_STATUS_ENABLE_COUNTER_SET(0x01);
} else {
pDev->GMboxInfo.CreditCountIRQEnabled = FALSE;
pDev->GMboxInfo.CreditCountIRQEnabled = false;
pDev->IrqEnableRegisters.counter_int_status_enable &=
~(COUNTER_INT_STATUS_ENABLE_BIT_SET(1 << AR6K_GMBOX_CREDIT_COUNTER));
}
......@@ -105,7 +105,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -135,7 +135,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
AR6K_IRQ_ENABLE_REGS_SIZE,
HIF_WR_SYNC_BYTE_INC,
NULL);
} while (FALSE);
} while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
......@@ -155,7 +155,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
}
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode)
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{
int status = A_OK;
HTC_PACKET *pIOPacket = NULL;
......@@ -192,7 +192,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL
break;
case GMBOX_ACTION_NONE:
default:
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -211,7 +211,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -242,7 +242,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL
HIF_WR_SYNC_BYTE_FIX,
NULL);
} while (FALSE);
} while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
......@@ -264,7 +264,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL
void DevCleanupGMbox(AR6K_DEVICE *pDev)
{
if (pDev->GMboxEnabled) {
pDev->GMboxEnabled = FALSE;
pDev->GMboxEnabled = false;
GMboxProtocolUninstall(pDev);
}
}
......@@ -315,9 +315,9 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
break;
}
pDev->GMboxEnabled = TRUE;
pDev->GMboxEnabled = true;
} while (FALSE);
} while (false);
return status;
}
......@@ -388,7 +388,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
pDev->GMboxInfo.CreditCountIRQEnabled);
}
} while (FALSE);
} while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ, ("-DevCheckGMboxInterrupts (%d) \n",status));
......@@ -399,7 +399,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength)
{
A_UINT32 paddedLength;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
bool sync = (pPacket->Completion == NULL) ? true : false;
int status;
A_UINT32 address;
......@@ -438,13 +438,13 @@ int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength)
A_UINT32 paddedLength;
int status;
A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE;
bool sync = (pPacket->Completion == NULL) ? true : false;
/* adjust the length to be a multiple of block size if appropriate */
paddedLength = DEV_CALC_RECV_PADDED_LEN(pDev, ReadLength);
if (paddedLength > pPacket->BufferLength) {
A_ASSERT(FALSE);
A_ASSERT(false);
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("DevGMboxRead, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n",
paddedLength,ReadLength,pPacket->BufferLength));
......@@ -539,7 +539,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n"));
}
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits)
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits)
{
int status = A_OK;
HTC_PACKET *pIOPacket = NULL;
......@@ -552,7 +552,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -581,7 +581,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits
AR6K_REG_IO_BUFFER_SIZE,
HIF_RD_SYNC_BYTE_FIX,
NULL);
} while (FALSE);
} while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
......@@ -644,7 +644,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int
do {
/* on entry the caller provides the length of the lookahead buffer */
if (*pLookAheadBytes > sizeof(procRegs.rx_gmbox_lookahead_alias)) {
A_ASSERT(FALSE);
A_ASSERT(false);
status = A_EINVAL;
break;
}
......@@ -671,7 +671,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int
*pLookAheadBytes = bytes;
}
} while (FALSE);
} while (false);
return status;
}
......@@ -705,7 +705,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS)
break;
}
} while (FALSE);
} while (false);
if (!status) {
......
......@@ -190,7 +190,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
HTC_FREE_CONTROL_TX(target,pControlPacket);
}
} while (FALSE);
} while (false);
if (status) {
if (target != NULL) {
......@@ -260,7 +260,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
if ((pRdyMsg->Version2_0_Info.MessageID != HTC_MSG_READY_ID) ||
(pPacket->ActualLength < sizeof(HTC_READY_MSG))) {
/* this message is not valid */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
......@@ -268,7 +268,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
if (pRdyMsg->Version2_0_Info.CreditCount == 0 || pRdyMsg->Version2_0_Info.CreditSize == 0) {
/* this message is not valid */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
......@@ -320,10 +320,10 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
(" HTC bundling allowed. Max Msg Per HTC Bundle: %d\n", target->MaxMsgPerBundle));
if (DEV_GET_MAX_BUNDLE_SEND_LENGTH(&target->Device) != 0) {
target->SendBundlingEnabled = TRUE;
target->SendBundlingEnabled = true;
}
if (DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device) != 0) {
target->RecvBundlingEnabled = TRUE;
target->RecvBundlingEnabled = true;
}
if (!DEV_IS_LEN_BLOCK_ALIGNED(&target->Device,target->TargetCreditSize)) {
......@@ -331,7 +331,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
target->TargetCreditSize));
/* disallow send bundling since the credit size is not aligned to a block size
* the I/O block padding will spill into the next credit buffer which is fatal */
target->SendBundlingEnabled = FALSE;
target->SendBundlingEnabled = false;
}
}
......@@ -355,7 +355,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
break;
}
} while (FALSE);
} while (false);
if (pPacket != NULL) {
HTC_FREE_CONTROL_RX(target,pPacket);
......@@ -430,7 +430,7 @@ int HTCStart(HTC_HANDLE HTCHandle)
HTCStop(target);
}
} while (FALSE);
} while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Exit\n"));
return status;
......@@ -511,7 +511,7 @@ static void HTCReportFailure(void *Context)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
target->TargetFailure = TRUE;
target->TargetFailure = true;
if (target->HTCInitInfo.TargetFailure != NULL) {
/* let upper layer know, it needs to call HTCStop() */
......@@ -519,7 +519,7 @@ static void HTCReportFailure(void *Context)
}
}
A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
HTC_ENDPOINT_STAT_ACTION Action,
HTC_ENDPOINT_STATS *pStats)
......@@ -527,19 +527,19 @@ A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
#ifdef HTC_EP_STAT_PROFILING
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
A_BOOL clearStats = FALSE;
A_BOOL sample = FALSE;
bool clearStats = false;
bool sample = false;
switch (Action) {
case HTC_EP_STAT_SAMPLE :
sample = TRUE;
sample = true;
break;
case HTC_EP_STAT_SAMPLE_AND_CLEAR :
sample = TRUE;
clearStats = TRUE;
sample = true;
clearStats = true;
break;
case HTC_EP_STAT_CLEAR :
clearStats = TRUE;
clearStats = true;
break;
default:
break;
......@@ -565,9 +565,9 @@ A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
UNLOCK_HTC_RX(target);
UNLOCK_HTC_TX(target);
return TRUE;
return true;
#else
return FALSE;
return false;
#endif
}
......
......@@ -126,7 +126,7 @@ typedef struct _HTC_TARGET {
A_UINT32 OpStateFlags;
A_UINT32 RecvStateFlags;
HTC_ENDPOINT_ID EpWaitingForBuffers;
A_BOOL TargetFailure;
bool TargetFailure;
#ifdef HTC_CAPTURE_LAST_FRAME
HTC_FRAME_HDR LastFrameHdr; /* useful for debugging */
A_UINT8 LastTrailer[256];
......@@ -135,7 +135,7 @@ typedef struct _HTC_TARGET {
HTC_INIT_INFO HTCInitInfo;
A_UINT8 HTCTargetVersion;
int MaxMsgPerBundle; /* max messages per bundle for HTC */
A_BOOL SendBundlingEnabled; /* run time enable for send bundling (dynamic) */
bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */
int RecvBundlingEnabled; /* run time enable for recv bundling (dynamic) */
} HTC_TARGET;
......@@ -169,7 +169,7 @@ HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList);
int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket);
void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket);
int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched);
int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
int HTCSendSetupComplete(HTC_TARGET *target);
void HTCFlushRecvBuffers(HTC_TARGET *target);
......
This diff is collapsed.
......@@ -72,7 +72,7 @@ static void DoSendCompletion(HTC_ENDPOINT *pEndpoint,
} while (!HTC_QUEUE_EMPTY(pQueueToIndicate));
}
} while (FALSE);
} while (false);
}
......@@ -116,11 +116,11 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket)
{
int status;
A_BOOL sync = FALSE;
bool sync = false;
if (pPacket->Completion == NULL) {
/* mark that this request was synchronously issued */
sync = TRUE;
sync = true;
}
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
......@@ -160,7 +160,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+GetHTCSendPackets \n"));
/* loop until we can grab as many packets out of the queue as we can */
while (TRUE) {
while (true) {
sendFlags = 0;
/* get packet at head, but don't remove it */
......@@ -320,7 +320,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
int i, packetsInScatterReq;
unsigned int transferLength;
HTC_PACKET *pPacket;
A_BOOL done = FALSE;
bool done = false;
int bundlesSent = 0;
int totalPktsInBundle = 0;
HTC_TARGET *target = pEndpoint->target;
......@@ -361,7 +361,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
pPacket = HTC_GET_PKT_AT_HEAD(pQueue);
if (pPacket == NULL) {
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -400,7 +400,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
if (NULL == pPacket) {
/* can't bundle */
done = TRUE;
done = true;
break;
}
......@@ -571,7 +571,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
}
}
} while (FALSE);
} while (false);
if (result != HTC_SEND_QUEUE_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("-HTCTrySend: \n"));
......@@ -602,7 +602,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
/* now drain the endpoint TX queue for transmission as long as we have enough
* credits */
while (TRUE) {
while (true) {
if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) == 0) {
break;
......@@ -623,7 +623,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
bundlesSent = 0;
pktsInBundles = 0;
while (TRUE) {
while (true) {
/* try to send a bundle on each pass */
if ((target->SendBundlingEnabled) &&
......@@ -758,7 +758,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
int i;
HTC_ENDPOINT *pEndpoint;
int totalCredits = 0;
A_BOOL doDist = FALSE;
bool doDist = false;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCProcessCreditRpt, Credit Report Entries:%d \n", NumEntries));
......@@ -767,7 +767,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
for (i = 0; i < NumEntries; i++, pRpt++) {
if (pRpt->EndpointID >= ENDPOINT_MAX) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
......@@ -807,7 +807,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
* will handle giving out credits back to the endpoints */
pEndpoint->CreditDist.TxCreditsToDist += pRpt->Credits;
/* flag that we have to do the distribution */
doDist = TRUE;
doDist = true;
}
/* refresh tx depth for distribution function that will recover these credits
......@@ -945,7 +945,7 @@ void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG
HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
/* not in use.. */
return;
}
......@@ -956,14 +956,14 @@ void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG
/* HTC API to indicate activity to the credit distribution function */
void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
A_BOOL Active)
bool Active)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
A_BOOL doDist = FALSE;
bool doDist = false;
if (pEndpoint->ServiceID == 0) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
/* not in use.. */
return;
}
......@@ -974,13 +974,13 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
if (!(pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE)) {
/* mark active now */
pEndpoint->CreditDist.DistFlags |= HTC_EP_ACTIVE;
doDist = TRUE;
doDist = true;
}
} else {
if (pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE) {
/* mark inactive now */
pEndpoint->CreditDist.DistFlags &= ~HTC_EP_ACTIVE;
doDist = TRUE;
doDist = true;
}
}
......@@ -1005,19 +1005,19 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
}
}
A_BOOL HTCIsEndpointActive(HTC_HANDLE HTCHandle,
bool HTCIsEndpointActive(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
return FALSE;
return false;
}
if (pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE) {
return TRUE;
return true;
}
return FALSE;
return false;
}
......@@ -26,7 +26,7 @@ void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket)
{
/* not implemented
* we do not send control TX frames during normal runtime, only during setup */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
}
/* callback when a control message arrives on this endpoint */
......@@ -111,7 +111,7 @@ int HTCSendSetupComplete(HTC_TARGET *target)
/* send the message */
status = HTCIssueSend(target,pSendPacket);
} while (FALSE);
} while (false);
if (pSendPacket != NULL) {
HTC_FREE_CONTROL_TX(target,pSendPacket);
......@@ -151,7 +151,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
pSendPacket = HTC_ALLOC_CONTROL_TX(target);
if (NULL == pSendPacket) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
status = A_NO_MEMORY;
break;
}
......@@ -200,7 +200,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
if ((pResponseMsg->MessageID != HTC_MSG_CONNECT_SERVICE_RESPONSE_ID) ||
(pRecvPacket->ActualLength < sizeof(HTC_CONNECT_SERVICE_RESPONSE_MSG))) {
/* this message is not valid */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
......@@ -236,12 +236,12 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
status = A_EPROTO;
if (assignedEndpoint >= ENDPOINT_MAX) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
if (0 == maxMsgSize) {
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
......@@ -249,7 +249,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
pEndpoint->Id = assignedEndpoint;
if (pEndpoint->ServiceID != 0) {
/* endpoint already in use! */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
......@@ -275,7 +275,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
* since the host will actually issue smaller messages in the Send path */
if (pConnectReq->MaxSendMsgSize > maxMsgSize) {
/* can't be larger than the maximum the target can support */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
pEndpoint->CreditDist.TxCreditsPerMaxMsg = pConnectReq->MaxSendMsgSize / target->TargetCreditSize;
......@@ -292,7 +292,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
status = A_OK;
} while (FALSE);
} while (false);
if (pSendPacket != NULL) {
HTC_FREE_CONTROL_TX(target,pSendPacket);
......@@ -360,7 +360,7 @@ static void HTCDefaultCreditInit(void *Context,
if (creditsPerEndpoint < pCurEpDist->TxCreditsPerMaxMsg) {
/* too many endpoints and not enough credits */
AR_DEBUG_ASSERT(FALSE);
AR_DEBUG_ASSERT(false);
break;
}
/* our minimum is set for at least 1 max message */
......
......@@ -188,10 +188,10 @@ extern "C" {
ar6000_dbglog_event((ar), (dropped), (buffer), (length));
#define A_WMI_STREAM_TX_ACTIVE(devt,trafficClass) \
ar6000_indicate_tx_activity((devt),(trafficClass), TRUE)
ar6000_indicate_tx_activity((devt),(trafficClass), true)
#define A_WMI_STREAM_TX_INACTIVE(devt,trafficClass) \
ar6000_indicate_tx_activity((devt),(trafficClass), FALSE)
ar6000_indicate_tx_activity((devt),(trafficClass), false)
#define A_WMI_Ac2EndpointID(devht, ac)\
ar6000_ac2_endpoint_id((devht), (ac))
......
......@@ -108,7 +108,7 @@ aggr_recv_delba_req_evt(void * cntxt, A_UINT8 tid);
* callback may be called to deliver frames in order.
*/
void
aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu, void **osbuf);
aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf);
/*
......
......@@ -126,7 +126,7 @@ int
BMIRawRead(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
A_BOOL want_timeout);
bool want_timeout);
#ifdef __cplusplus
}
......
......@@ -73,12 +73,4 @@
#define A_PHY_ERROR 27 /* RX PHY error */
#define A_CONSUMED 28 /* Object was consumed */
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#endif /* __ATHDEFS_H__ */
......@@ -72,7 +72,7 @@ int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data
int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, A_UCHAR *data, A_UINT32 length);
int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset);
int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, bool waitForCompletion, bool coldReset);
void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType);
......
......@@ -153,9 +153,9 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
@return: A_OK
@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,
If Synchronous is set to false the call is fully asynchronous. On error or completion,
the registered send complete callback will be called.
If Synchronous is set to TRUE, the call will block until the packet is sent, if the
If Synchronous is set to true, the call will block until the packet is sent, if the
interface cannot send the packet within a 2 second timeout, the function will return
the failure code : A_EBUSY.
......@@ -166,7 +166,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......@@ -206,7 +206,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans);
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Receive an event packet from the HCI transport synchronously using polling
......@@ -217,7 +217,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL
@output:
@return: A_OK 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.
HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API.
This API will only capture HCI Event packets.
@example:
@see also: HCI_TransportEnableDisableAsyncRecv
......@@ -250,7 +250,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
#ifdef __cplusplus
}
......
......@@ -359,11 +359,11 @@ typedef int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device,
HIF_PENDING_EVENTS_INFO *pEvents,
void *AsyncContext);
#define HIF_MASK_RECV TRUE
#define HIF_UNMASK_RECV FALSE
#define HIF_MASK_RECV true
#define HIF_UNMASK_RECV false
/* function to mask recv events */
typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device,
A_BOOL Mask,
bool Mask,
void *AsyncContext);
......
......@@ -431,7 +431,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle);
@function name: HTCIndicateActivityChange
@input: HTCHandle - HTC handle
Endpoint - endpoint in which activity has changed
Active - TRUE if active, FALSE if it has become inactive
Active - true if active, false if it has become inactive
@output:
@return:
@notes: This triggers the registered credit distribution function to
......@@ -441,7 +441,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
A_BOOL Active);
bool Active);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Get endpoint statistics
......@@ -452,9 +452,9 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
@output:
pStats - statistics that were sampled (can be NULL if Action is HTC_EP_STAT_CLEAR)
@return: TRUE if statistics profiling is enabled, otherwise FALSE.
@return: true if statistics profiling is enabled, otherwise false.
@notes: Statistics is a compile-time option and this function may return FALSE
@notes: Statistics is a compile-time option and this function may return false
if HTC is not compiled with profiling.
The caller can specify the statistic "action" to take when sampling
......@@ -469,7 +469,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
HTC_ENDPOINT_STAT_ACTION Action,
HTC_ENDPOINT_STATS *pStats);
......@@ -538,12 +538,12 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu
@input: HTCHandle - HTC handle
Endpoint - endpoint to check for active state
@output:
@return: returns TRUE if Endpoint is Active
@return: returns true if Endpoint is Active
@notes:
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
A_BOOL HTCIsEndpointActive(HTC_HANDLE HTCHandle,
bool HTCIsEndpointActive(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint);
......@@ -566,7 +566,7 @@ void HTCEnableRecv(HTC_HANDLE HTCHandle);
void HTCDisableRecv(HTC_HANDLE HTCHandle);
int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
A_UINT32 TimeoutInMs,
A_BOOL *pbIsRecvPending);
bool *pbIsRecvPending);
#ifdef __cplusplus
}
......
......@@ -109,7 +109,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt);
bss_t *
wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid,
A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID);
A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID);
void
wlan_node_return (struct ieee80211_node_table *nt, bss_t *ni);
......
......@@ -71,7 +71,7 @@ HTC_ENDPOINT_ID wmi_get_control_ep(struct wmi_t * wmip);
void wmi_set_control_ep(struct wmi_t * wmip, HTC_ENDPOINT_ID eid);
A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, A_UINT8);
int wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf);
int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, A_BOOL bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,A_UINT8 metaVersion, void *pTxMetaS);
int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, bool bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,A_UINT8 metaVersion, void *pTxMetaS);
int wmi_dot3_2_dix(void *osbuf);
int wmi_dot11_hdr_remove (struct wmi_t *wmip, void *osbuf);
......@@ -80,7 +80,7 @@ int wmi_dot11_hdr_add(struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode);
int wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf);
int wmi_syncpoint(struct wmi_t *wmip);
int wmi_syncpoint_reset(struct wmi_t *wmip);
A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT32 layer2Priority, A_BOOL wmmEnabled);
A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT32 layer2Priority, bool wmmEnabled);
A_UINT8 wmi_determine_userPriority (A_UINT8 *pkt, A_UINT32 layer2Pri);
......@@ -122,7 +122,7 @@ int wmi_reconnect_cmd(struct wmi_t *wmip,
int wmi_disconnect_cmd(struct wmi_t *wmip);
int wmi_getrev_cmd(struct wmi_t *wmip);
int wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType,
A_BOOL forceFgScan, A_BOOL isLegacy,
u32 forceFgScan, u32 isLegacy,
A_UINT32 homeDwellTime, A_UINT32 forceScanInterval,
A_INT8 numChan, A_UINT16 *channelList);
int wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec,
......@@ -178,7 +178,7 @@ int wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie,
A_UINT32 source);
int wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask,
A_UINT16 tsr, A_BOOL rep, A_UINT16 size,
A_UINT16 tsr, bool rep, A_UINT16 size,
A_UINT32 valid);
int wmi_get_stats_cmd(struct wmi_t *wmip);
......@@ -201,9 +201,9 @@ int wmi_set_txPwr_cmd(struct wmi_t *wmip, A_UINT8 dbM);
int wmi_get_txPwr_cmd(struct wmi_t *wmip);
int wmi_addBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex, A_UINT8 *bssid);
int wmi_deleteBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex);
int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en);
int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, bool en);
int wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId,
A_BOOL set);
bool set);
int wmi_set_access_params_cmd(struct wmi_t *wmip, A_UINT8 ac, A_UINT16 txop,
A_UINT8 eCWmin, A_UINT8 eCWmax,
A_UINT8 aifsn);
......@@ -323,7 +323,7 @@ wmi_mcast_filter_cmd(struct wmi_t *wmip, A_UINT8 enable);
bss_t *
wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid,
A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID);
A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID);
void
......@@ -375,7 +375,7 @@ int
wmi_ap_set_mlme(struct wmi_t *wmip, A_UINT8 cmd, A_UINT8 *mac, A_UINT16 reason);
int
wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, A_BOOL flag);
wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, bool flag);
int
wmi_ap_conn_inact_time(struct wmi_t *wmip, A_UINT32 period);
......@@ -405,16 +405,16 @@ int
wmi_setup_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid);
int
wmi_delete_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid, A_BOOL uplink);
wmi_delete_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid, bool uplink);
int
wmi_allow_aggr_cmd(struct wmi_t *wmip, A_UINT16 tx_tidmask, A_UINT16 rx_tidmask);
int
wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, A_BOOL rxDot11Hdr, A_BOOL defragOnHost);
wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, bool rxDot11Hdr, bool defragOnHost);
int
wmi_set_thin_mode_cmd(struct wmi_t *wmip, A_BOOL bThinMode);
wmi_set_thin_mode_cmd(struct wmi_t *wmip, bool bThinMode);
int
wmi_set_wlan_conn_precedence_cmd(struct wmi_t *wmip, BT_WLAN_CONN_PRECEDENCE precedence);
......
......@@ -73,9 +73,9 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig,
AR6K_CONTROL_PKT_TAG);
/* issue synchronously */
status = HCI_TransportSendPkt(pConfig->pHCIDev,pPacket,TRUE);
status = HCI_TransportSendPkt(pConfig->pHCIDev,pPacket,true);
} while (FALSE);
} while (false);
if (pPacket != NULL) {
A_FREE(pPacket);
......@@ -113,7 +113,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig,
*pLength = pRecvPacket->ActualLength;
} while (FALSE);
} while (false);
if (pRecvPacket != NULL) {
A_FREE(pRecvPacket);
......@@ -132,7 +132,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
A_UINT8 *pBuffer = NULL;
A_UINT8 *pTemp;
int length;
A_BOOL commandComplete = FALSE;
bool commandComplete = false;
A_UINT8 opCodeBytes[2];
do {
......@@ -177,7 +177,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
if (pTemp[0] == HCI_CMD_COMPLETE_EVENT_CODE) {
if ((pTemp[HCI_EVENT_OPCODE_BYTE_LOW] == opCodeBytes[0]) &&
(pTemp[HCI_EVENT_OPCODE_BYTE_HI] == opCodeBytes[1])) {
commandComplete = TRUE;
commandComplete = true;
}
}
......@@ -200,7 +200,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
pBuffer = NULL;
}
} while (FALSE);
} while (false);
if (pBuffer != NULL) {
A_FREE(pBuffer);
......@@ -265,7 +265,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig)
("AR3K Config: Baud changed to %d for AR6K\n", pConfig->AR3KBaudRate));
}
} while (FALSE);
} while (false);
if (pBufferToFree != NULL) {
A_FREE(pBufferToFree);
......@@ -467,7 +467,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
}
/* disable asynchronous recv while we issue commands and receive events synchronously */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE);
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,false);
if (status) {
break;
}
......@@ -507,13 +507,13 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig)
}
/* re-enable asynchronous recv */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE);
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,true);
if (status) {
break;
}
} while (FALSE);
} while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuration Complete (status = %d) \n",status));
......@@ -536,7 +536,7 @@ int AR3KConfigureExit(void *config)
}
/* disable asynchronous recv while we issue commands and receive events synchronously */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE);
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,false);
if (status) {
break;
}
......@@ -550,13 +550,13 @@ int AR3KConfigureExit(void *config)
}
/* re-enable asynchronous recv */
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE);
status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,true);
if (status) {
break;
}
} while (FALSE);
} while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleanup Complete (status = %d) \n",status));
......
......@@ -54,7 +54,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
A_UINT32 Rom_Version;
A_UINT32 Build_Version;
extern A_BOOL BDADDR;
extern bool BDADDR;
int getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code);
int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig);
......@@ -118,7 +118,7 @@ int AthPSInitialize(AR3K_CONFIG_INFO *hdev)
remove_wait_queue(&PsCompleteEvent,&wait);
return A_ERROR;
}
wait_event_interruptible(PsCompleteEvent,(PSTagMode == FALSE));
wait_event_interruptible(PsCompleteEvent,(PSTagMode == false));
set_current_state(TASK_RUNNING);
remove_wait_queue(&PsCompleteEvent,&wait);
......@@ -157,7 +157,7 @@ int PSSendOps(void *arg)
#else
device = hdev;
firmwareDev = &device->dev;
AthEnableSyncCommandOp(TRUE);
AthEnableSyncCommandOp(true);
#endif /* HCI_TRANSPORT_SDIO */
/* First verify if the controller is an FPGA or ASIC, so depending on the device type the PS file to be written will be different.
*/
......@@ -326,7 +326,7 @@ int PSSendOps(void *arg)
}
}
#ifdef HCI_TRANSPORT_SDIO
if(BDADDR == FALSE)
if(BDADDR == false)
if(hdev->bdaddr[0] !=0x00 ||
hdev->bdaddr[1] !=0x00 ||
hdev->bdaddr[2] !=0x00 ||
......@@ -368,8 +368,8 @@ int PSSendOps(void *arg)
}
complete:
#ifndef HCI_TRANSPORT_SDIO
AthEnableSyncCommandOp(FALSE);
PSTagMode = FALSE;
AthEnableSyncCommandOp(false);
PSTagMode = false;
wake_up_interruptible(&PsCompleteEvent);
#endif /* HCI_TRANSPORT_SDIO */
if(NULL != HciCmdList) {
......@@ -399,13 +399,13 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig,
return A_ERROR;
}
Hci_log("COM Write -->",pHCICommand,CmdLength);
PSAcked = FALSE;
PSAcked = false;
if(PSHciWritepacket(pConfig,pHCICommand,CmdLength) == 0) {
/* If the controller is not available, return Error */
return A_ERROR;
}
//add_timer(&psCmdTimer);
wait_event_interruptible(HciEvent,(PSAcked == TRUE));
wait_event_interruptible(HciEvent,(PSAcked == true));
if(NULL != HciEventpacket) {
*ppEventBuffer = HciEventpacket;
*ppBufferToFree = HciEventpacket;
......
......@@ -102,7 +102,7 @@ typedef struct tRamPatch
typedef struct ST_PS_DATA_FORMAT {
enum eType eDataType;
A_BOOL bIsArray;
bool bIsArray;
}ST_PS_DATA_FORMAT;
typedef struct ST_READ_STATUS {
......@@ -120,7 +120,7 @@ static A_UINT32 Tag_Count = 0;
/* Stores the number of patch commands */
static A_UINT32 Patch_Count = 0;
static A_UINT32 Total_tag_lenght = 0;
A_BOOL BDADDR = FALSE;
bool BDADDR = false;
A_UINT32 StartTagId;
tPsTagEntry PsTagEntry[RAMPS_MAX_PS_TAGS_PER_FILE];
......@@ -663,12 +663,12 @@ int AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen)
{
int status;
int i;
A_BOOL BDADDR_Present = FALSE;
bool BDADDR_Present = false;
Tag_Count = 0;
Total_tag_lenght = 0;
BDADDR = FALSE;
BDADDR = false;
status = A_ERROR;
......@@ -689,7 +689,7 @@ int AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen)
else{
for(i=0; i<Tag_Count; i++){
if(PsTagEntry[i].TagId == 1){
BDADDR_Present = TRUE;
BDADDR_Present = true;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("BD ADDR is present in Patch File \r\n"));
}
......@@ -907,7 +907,7 @@ static int AthPSCreateHCICommand(A_UCHAR Opcode, A_UINT32 Param1,PSCmdPacket *PS
case PS_WRITE:
for(i=0;i< Param1;i++){
if(PsTagEntry[i].TagId ==1)
BDADDR = TRUE;
BDADDR = true;
HCI_PS_Command = (A_UCHAR *) A_MALLOC(PsTagEntry[i].TagLen+HCI_COMMAND_HEADER);
if(HCI_PS_Command == NULL){
......
......@@ -53,7 +53,7 @@
#define A_UINT32 unsigned long
#define A_UINT16 unsigned short
#define A_UINT8 unsigned char
#define A_BOOL unsigned char
#define bool unsigned char
#endif /* A_UINT32 */
#define ATH_DEBUG_ERR (1 << 0)
......@@ -62,8 +62,8 @@
#define FALSE 0
#define TRUE 1
#define false 0
#define true 1
#ifndef A_MALLOC
#define A_MALLOC(size) kmalloc((size),GFP_KERNEL)
......
......@@ -47,7 +47,7 @@
static ATH_DEBUG_MODULE_DBG_INFO *g_pModuleInfoHead = NULL;
static A_MUTEX_T g_ModuleListLock;
static A_BOOL g_ModuleDebugInit = FALSE;
static bool g_ModuleDebugInit = false;
#ifdef ATH_DEBUG_MODULE
......@@ -399,7 +399,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, A_INT32 wait_msecs, A_UINT32 Ta
#define AR6002_RESET_CONTROL_ADDRESS 0x00004000
#define AR6003_RESET_CONTROL_ADDRESS 0x00004000
/* reset device */
int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset)
int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, bool waitForCompletion, bool coldReset)
{
int status = A_OK;
A_UINT32 address;
......@@ -470,7 +470,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitF
#endif
// Workaroud END
} while (FALSE);
} while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
......@@ -619,7 +619,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType)
#endif
}
} while (FALSE);
} while (false);
}
......@@ -679,7 +679,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
}
}
} while (FALSE);
} while (false);
return status;
}
......@@ -967,7 +967,7 @@ void a_module_debug_support_init(void)
}
A_MUTEX_INIT(&g_ModuleListLock);
g_pModuleInfoHead = NULL;
g_ModuleDebugInit = TRUE;
g_ModuleDebugInit = true;
A_REGISTER_MODULE_DEBUG_INFO(misc);
}
......@@ -980,7 +980,7 @@ void a_module_debug_support_cleanup(void)
return;
}
g_ModuleDebugInit = FALSE;
g_ModuleDebugInit = false;
A_MUTEX_LOCK(&g_ModuleListLock);
......@@ -1020,7 +1020,7 @@ int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
4);
} while (FALSE);
} while (false);
return status;
}
......
......@@ -136,7 +136,7 @@ static void ar6000_credit_init(void *Context,
if (pCredInfo->CurrentFreeCredits <= 0) {
AR_DEBUG_PRINTF(ATH_LOG_INF, ("Not enough credits (%d) to do credit distributions \n", TotalCredits));
A_ASSERT(FALSE);
A_ASSERT(false);
return;
}
......@@ -382,7 +382,7 @@ static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo,
/* return what we can get */
credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek);
} while (FALSE);
} while (false);
/* did we find some credits? */
if (credits) {
......
......@@ -29,7 +29,7 @@
#include <linux/earlysuspend.h>
#endif
A_BOOL enable_mmc_host_detect_change = FALSE;
bool enable_mmc_host_detect_change = false;
static void ar6000_enable_mmchost_detect_change(int enable);
......@@ -336,21 +336,21 @@ void android_module_exit(void)
}
#ifdef CONFIG_PM
void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent)
void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
{
if (
#ifdef CONFIG_HAS_EARLYSUSPEND
screen_is_off &&
#endif
skb && ar->arConnected) {
A_BOOL needWake = FALSE;
bool needWake = false;
if (isEvent) {
if (A_NETBUF_LEN(skb) >= sizeof(A_UINT16)) {
A_UINT16 cmd = *(const A_UINT16 *)A_NETBUF_DATA(skb);
switch (cmd) {
case WMI_CONNECT_EVENTID:
case WMI_DISCONNECT_EVENTID:
needWake = TRUE;
needWake = true;
break;
default:
/* dont wake lock the system for other event */
......@@ -365,7 +365,7 @@ void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL i
case 0x888e: /* EAPOL */
case 0x88c7: /* RSN_PREAUTH */
case 0x88b4: /* WAPI */
needWake = TRUE;
needWake = true;
break;
case 0x0806: /* ARP is not important to hold wake lock */
default:
......
......@@ -37,7 +37,7 @@ extern unsigned int wmitimeout;
extern wait_queue_head_t arEvent;
#ifdef ANDROID_ENV
extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent);
extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent);
#endif
#undef ATH_MODULE_NAME
#define ATH_MODULE_NAME pm
......@@ -60,7 +60,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(pm,
int ar6000_exit_cut_power_state(AR_SOFTC_T *ar);
#ifdef CONFIG_PM
static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, A_BOOL asleep)
static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, bool asleep)
{
char buf[128];
union iwreq_data wrqu;
......@@ -76,7 +76,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
if (ar->arWowState!= WLAN_WOW_STATE_NONE) {
A_UINT16 fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period;
A_UINT16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {TRUE, FALSE};
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false};
ar->arWowState = WLAN_WOW_STATE_NONE;
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n"));
......@@ -102,7 +102,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == A_OK) {
}
#endif
ar6k_send_asleep_event_to_app(ar, FALSE);
ar6k_send_asleep_event_to_app(ar, false);
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Resume WoW successfully\n"));
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("WoW does not invoked. skip resume"));
......@@ -125,8 +125,8 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
int status;
WMI_ADD_WOW_PATTERN_CMD addWowCmd = { .filter = { 0 } };
WMI_DEL_WOW_PATTERN_CMD delWowCmd;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {FALSE, TRUE};
WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = TRUE,
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {false, true};
WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = true,
.hostReqDelay = 500 };/*500 ms delay*/
if (ar->arWowState!= WLAN_WOW_STATE_NONE) {
......@@ -185,7 +185,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar)
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to enable wow mode\n"));
}
ar6k_send_asleep_event_to_app(ar, TRUE);
ar6k_send_asleep_event_to_app(ar, true);
status = wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode);
if (status != A_OK) {
......@@ -234,7 +234,7 @@ int ar6000_suspend_ev(void *context)
case WLAN_SUSPEND_DEEP_SLEEP:
/* fall through */
default:
status = ar6000_update_wlan_pwr_state(ar, WLAN_DISABLED, TRUE);
status = ar6000_update_wlan_pwr_state(ar, WLAN_DISABLED, true);
if (ar->arWlanPowerState==WLAN_POWER_STATE_ON ||
ar->arWlanPowerState==WLAN_POWER_STATE_WOW) {
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState));
......@@ -261,7 +261,7 @@ int ar6000_resume_ev(void *context)
case WLAN_POWER_STATE_CUT_PWR:
/* fall through */
case WLAN_POWER_STATE_DEEP_SLEEP:
ar6000_update_wlan_pwr_state(ar, WLAN_ENABLED, TRUE);
ar6000_update_wlan_pwr_state(ar, WLAN_ENABLED, true);
AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Resume for %d mode pwr %d\n", __func__, powerState, ar->arWlanPowerState));
break;
case WLAN_POWER_STATE_ON:
......@@ -273,7 +273,7 @@ int ar6000_resume_ev(void *context)
return A_OK;
}
void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent)
void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent)
{
if (ar->arWowState!=WLAN_WOW_STATE_NONE) {
if (ar->arWowState==WLAN_WOW_STATE_SUSPENDING) {
......@@ -376,7 +376,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
#ifdef ANDROID_ENV
/* Wait for WMI ready event */
A_UINT32 timeleft = wait_event_interruptible_timeout(arEvent,
(ar->arWmiReady == TRUE), wmitimeout * HZ);
(ar->arWmiReady == true), wmitimeout * HZ);
if (!timeleft || signal_pending(current)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000 : Failed to get wmi ready \n"));
status = A_ERROR;
......@@ -395,7 +395,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
if (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) {
break;
}
ar6000_stop_endpoint(ar->arNetDev, TRUE, FALSE);
ar6000_stop_endpoint(ar->arNetDev, true, false);
config = HIF_DEVICE_POWER_CUT;
status = HIFConfigureDevice(ar->arHifDevice,
......@@ -436,8 +436,8 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
}
fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period;
hostSleepMode.awake = TRUE;
hostSleepMode.asleep = FALSE;
hostSleepMode.awake = true;
hostSleepMode.asleep = false;
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != A_OK) {
break;
......@@ -471,7 +471,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
}
}
} else if (state == WLAN_DISABLED){
WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = FALSE };
WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = false };
/* Already in deep sleep state.. exit */
if (ar->arWlanPowerState != WLAN_POWER_STATE_ON) {
......@@ -485,7 +485,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{
/* Disconnect from the AP and disable foreground scanning */
AR6000_SPIN_LOCK(&ar->arLock, 0);
if (ar->arConnected == TRUE || ar->arConnectPending == TRUE) {
if (ar->arConnected == true || ar->arConnectPending == true) {
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
wmi_disconnect_cmd(ar->arWmi);
} else {
......@@ -510,8 +510,8 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
wmi_powermode_cmd(ar->arWmi, REC_POWER);
#endif
hostSleepMode.awake = FALSE;
hostSleepMode.asleep = TRUE;
hostSleepMode.awake = false;
hostSleepMode.asleep = true;
if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!=A_OK) {
break;
}
......@@ -537,14 +537,14 @@ 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, A_BOOL pmEvent)
ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent)
{
int status = A_OK;
A_UINT16 powerState, oldPowerState;
AR6000_WLAN_STATE oldstate = ar->arWlanState;
A_BOOL wlanOff = ar->arWlanOff;
bool wlanOff = ar->arWlanOff;
#ifdef CONFIG_PM
A_BOOL btOff = ar->arBTOff;
bool btOff = ar->arBTOff;
#endif /* CONFIG_PM */
if ((state!=WLAN_DISABLED && state!=WLAN_ENABLED)) {
......@@ -578,7 +578,7 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO
}
#ifdef CONFIG_PM
else if (pmEvent && wlanOff) {
A_BOOL allowCutPwr = ((!ar->arBTSharing) || btOff);
bool allowCutPwr = ((!ar->arBTSharing) || btOff);
if ((powerState==WLAN_POWER_STATE_CUT_PWR) && (!allowCutPwr)) {
/* Come out of cut power */
ar6000_setup_cut_power_state(ar, WLAN_ENABLED);
......@@ -591,10 +591,10 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO
powerState = WLAN_POWER_STATE_DEEP_SLEEP;
#ifdef CONFIG_PM
if (pmEvent) { /* disable due to suspend */
A_BOOL suspendCutPwr = (ar->arSuspendConfig == WLAN_SUSPEND_CUT_PWR ||
bool suspendCutPwr = (ar->arSuspendConfig == WLAN_SUSPEND_CUT_PWR ||
(ar->arSuspendConfig == WLAN_SUSPEND_WOW &&
ar->arWow2Config==WLAN_SUSPEND_CUT_PWR));
A_BOOL suspendCutIfBtOff = ((ar->arSuspendConfig ==
bool suspendCutIfBtOff = ((ar->arSuspendConfig ==
WLAN_SUSPEND_CUT_PWR_IF_BT_OFF ||
(ar->arSuspendConfig == WLAN_SUSPEND_WOW &&
ar->arWow2Config==WLAN_SUSPEND_CUT_PWR_IF_BT_OFF)) &&
......@@ -654,13 +654,13 @@ int
ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable)
{
#ifdef CONFIG_PM
A_BOOL off = (enable == 0);
bool off = (enable == 0);
int status;
if (ar->arBTOff == off) {
return A_OK;
}
ar->arBTOff = off;
status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, FALSE);
status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false);
return status;
#else
return A_OK;
......@@ -671,12 +671,12 @@ int
ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state)
{
int status;
A_BOOL off = (state == WLAN_DISABLED);
bool off = (state == WLAN_DISABLED);
if (ar->arWlanOff == off) {
return A_OK;
}
ar->arWlanOff = off;
status = ar6000_update_wlan_pwr_state(ar, state, FALSE);
status = ar6000_update_wlan_pwr_state(ar, state, false);
return status;
}
......
......@@ -60,7 +60,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
busy->length = pPacket->ActualLength + HTC_HEADER_LEN;
busy->currPtr = HTC_HEADER_LEN;
arRaw->read_buffer_available[streamID] = TRUE;
arRaw->read_buffer_available[streamID] = true;
//AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("raw read cb: 0x%X 0x%X \n", busy->currPtr,busy->length);
up(&arRaw->raw_htc_read_sem[streamID]);
......@@ -102,7 +102,7 @@ ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket)
A_ASSERT(pPacket->pBuffer == (free->data + HTC_HEADER_LEN));
free->length = 0;
arRaw->write_buffer_available[streamID] = TRUE;
arRaw->write_buffer_available[streamID] = true;
up(&arRaw->raw_htc_write_sem[streamID]);
/* Signal the waiting process */
......@@ -161,7 +161,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
AR_DEBUG_PRINTF(ATH_DEBUG_HTC_RAW,("HTC RAW : stream ID: %d, endpoint: %d\n",
StreamID, arRawStream2EndpointID(ar,StreamID)));
} while (FALSE);
} while (false);
return status;
}
......@@ -241,8 +241,8 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
memset(buffer, 0, sizeof(raw_htc_buffer));
}
arRaw->read_buffer_available[streamID] = FALSE;
arRaw->write_buffer_available[streamID] = TRUE;
arRaw->read_buffer_available[streamID] = false;
arRaw->write_buffer_available[streamID] = true;
}
if (status) {
......@@ -267,7 +267,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar)
return -EIO;
}
(ar)->arRawIfInit = TRUE;
(ar)->arRawIfInit = true;
return 0;
}
......@@ -278,7 +278,7 @@ int ar6000_htc_raw_close(AR_SOFTC_T *ar)
HTCStop(ar->arHtcTarget);
/* reset the device */
ar6000_reset_device(ar->arHifDevice, ar->arTargetType, TRUE, FALSE);
ar6000_reset_device(ar->arHifDevice, ar->arTargetType, true, false);
/* Initialize the BMI component */
BMIInit();
......@@ -300,9 +300,9 @@ get_filled_buffer(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID)
}
}
if (busy->length) {
arRaw->read_buffer_available[StreamID] = TRUE;
arRaw->read_buffer_available[StreamID] = true;
} else {
arRaw->read_buffer_available[StreamID] = FALSE;
arRaw->read_buffer_available[StreamID] = false;
}
return busy;
......@@ -361,7 +361,7 @@ ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID,
//AR_DEBUG_PRINTF(ATH_DEBUG_HTC_RAW,("raw read ioctl: ep for packet:%d \n", busy->HTCPacket.Endpoint));
HTCAddReceivePkt(ar->arHtcTarget, &busy->HTCPacket);
}
arRaw->read_buffer_available[StreamID] = FALSE;
arRaw->read_buffer_available[StreamID] = false;
up(&arRaw->raw_htc_read_sem[StreamID]);
return length;
......@@ -382,9 +382,9 @@ get_free_buffer(AR_SOFTC_T *ar, HTC_ENDPOINT_ID StreamID)
}
}
if (!free->length) {
arRaw->write_buffer_available[StreamID] = TRUE;
arRaw->write_buffer_available[StreamID] = true;
} else {
arRaw->write_buffer_available[StreamID] = FALSE;
arRaw->write_buffer_available[StreamID] = false;
}
return free;
......@@ -447,7 +447,7 @@ ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID,
HTCSendPkt(ar->arHtcTarget,&free->HTCPacket);
arRaw->write_buffer_available[StreamID] = FALSE;
arRaw->write_buffer_available[StreamID] = false;
up(&arRaw->raw_htc_write_sem[StreamID]);
return length;
......
......@@ -157,7 +157,7 @@ static int btpal_send_frame(struct sk_buff *skb)
kfree_skb(skb);
return 0;
default:
A_ASSERT(FALSE);
A_ASSERT(false);
kfree_skb(skb);
return 0;
}
......@@ -178,7 +178,7 @@ static int btpal_send_frame(struct sk_buff *skb)
{
PRIN_LOG("HCI command");
if (ar->arWmiReady == FALSE)
if (ar->arWmiReady == false)
{
PRIN_LOG("WMI not ready ");
break;
......@@ -195,7 +195,7 @@ static int btpal_send_frame(struct sk_buff *skb)
void *osbuf;
PRIN_LOG("ACL data");
if (ar->arWmiReady == FALSE)
if (ar->arWmiReady == false)
{
PRIN_LOG("WMI not ready");
break;
......@@ -229,7 +229,7 @@ static int btpal_send_frame(struct sk_buff *skb)
}
txSkb = NULL;
}
} while (FALSE);
} while (false);
if (txSkb != NULL) {
PRIN_LOG("Free skb");
......@@ -302,7 +302,7 @@ static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo)
PRIN_LOG("Normal mode enabled");
bt_set_bit(pHciPalInfo->ulFlags, HCI_NORMAL_MODE);
} while (FALSE);
} while (false);
if (status) {
bt_cleanup_hci_pal(pHciPalInfo);
......@@ -328,22 +328,22 @@ void ar6k_cleanup_hci_pal(void *ar_p)
/****************************
* Register HCI device
****************************/
static A_BOOL ar6k_pal_transport_ready(void *pHciPal)
static bool ar6k_pal_transport_ready(void *pHciPal)
{
ar6k_hci_pal_info_t *pHciPalInfo = (ar6k_hci_pal_info_t *)pHciPal;
PRIN_LOG("HCI device transport ready");
if(pHciPalInfo == NULL)
return FALSE;
return false;
if (hci_register_dev(pHciPalInfo->hdev) < 0) {
PRIN_LOG("Can't register HCI device");
hci_free_dev(pHciPalInfo->hdev);
return FALSE;
return false;
}
PRIN_LOG("HCI device registered");
pHciPalInfo->ulFlags |= HCI_REGISTERED;
return TRUE;
return true;
}
/**************************************************
......@@ -351,11 +351,11 @@ static A_BOOL ar6k_pal_transport_ready(void *pHciPal)
* packet is received. Pass the packet to bluetooth
* stack via hci_recv_frame.
**************************************************/
A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
bool ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
{
struct sk_buff *skb = (struct sk_buff *)osbuf;
ar6k_hci_pal_info_t *pHciPalInfo;
A_BOOL success = FALSE;
bool success = false;
A_UINT8 btType = 0;
pHciPalInfo = (ar6k_hci_pal_info_t *)pHciPal;
......@@ -391,8 +391,8 @@ A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf)
PRIN_LOG("HCI PAL: Indicated RCV of type:%d, Length:%d \n",HCI_EVENT_PKT, skb->len);
}
PRIN_LOG("hci recv success");
success = TRUE;
}while(FALSE);
success = true;
}while(false);
return success;
}
......@@ -435,7 +435,7 @@ int ar6k_setup_hci_pal(void *ar_p)
ar6k_pal_config.fpar6k_pal_recv_pkt = ar6k_pal_recv_pkt;
register_pal_cb(&ar6k_pal_config);
ar6k_pal_transport_ready(ar->hcipal_info);
} while (FALSE);
} while (false);
if (status) {
ar6k_cleanup_hci_pal(ar);
......
......@@ -183,7 +183,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type)
}
static int
ar6k_set_cipher(AR_SOFTC_T *ar, A_UINT32 cipher, A_BOOL ucast)
ar6k_set_cipher(AR_SOFTC_T *ar, A_UINT32 cipher, bool ucast)
{
A_UINT8 *ar_cipher = ucast ? &ar->arPairwiseCrypto :
&ar->arGroupCrypto;
......@@ -249,7 +249,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready yet\n", __func__));
return -EIO;
}
......@@ -269,7 +269,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
return -EINVAL;
}
if(ar->arSkipScan == TRUE &&
if(ar->arSkipScan == true &&
((sme->channel && sme->channel->center_freq == 0) ||
(sme->bssid && !sme->bssid[0] && !sme->bssid[1] && !sme->bssid[2] &&
!sme->bssid[3] && !sme->bssid[4] && !sme->bssid[5])))
......@@ -302,10 +302,10 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
}
}
if(ar->arConnected == TRUE &&
if(ar->arConnected == true &&
ar->arSsidLen == sme->ssid_len &&
!A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) {
reconnect_flag = TRUE;
reconnect_flag = true;
status = wmi_reconnect_cmd(ar->arWmi,
ar->arReqBssid,
ar->arChannelHint);
......@@ -422,7 +422,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
}
ar->arConnectCtrlFlags &= ~CONNECT_DO_WPA_OFFLOAD;
ar->arConnectPending = TRUE;
ar->arConnectPending = true;
return 0;
}
......@@ -560,7 +560,7 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel,
return;
}
if (FALSE == ar->arConnected) {
if (false == ar->arConnected) {
/* inform connect result to cfg80211 */
cfg80211_connect_result(ar->arNetDev, bssid,
assocReqIe, assocReqLen,
......@@ -583,7 +583,7 @@ ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: reason=%u\n", __func__, reason_code));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -608,7 +608,7 @@ ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev,
A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
ar->arSsidLen = 0;
if (ar->arSkipScan == FALSE) {
if (ar->arSkipScan == false) {
A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid));
}
......@@ -644,7 +644,7 @@ ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason,
}
}
if(FALSE == ar->arConnected) {
if(false == ar->arConnected) {
if(NO_NETWORK_AVAIL == reason) {
/* connect cmd failed */
cfg80211_connect_result(ar->arNetDev, bssid,
......@@ -730,7 +730,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -768,7 +768,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
forceFgScan = 1;
}
if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, FALSE, \
if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \
0, 0, 0, NULL) != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__));
ret = -EIO;
......@@ -819,7 +819,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s:\n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -907,7 +907,7 @@ ar6k_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -946,7 +946,7 @@ ar6k_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -986,7 +986,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1030,7 +1030,7 @@ ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1045,7 +1045,7 @@ ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev,
}
void
ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, A_BOOL ismcast)
ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, bool ismcast)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,
("%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast));
......@@ -1062,7 +1062,7 @@ ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, A_UINT32 changed)
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: changed 0x%x\n", __func__, changed));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1100,7 +1100,7 @@ ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting typ
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type 0x%x, dbm %d\n", __func__, type, dbm));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1110,13 +1110,13 @@ ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting typ
return -EIO;
}
ar->arTxPwrSet = FALSE;
ar->arTxPwrSet = false;
switch(type) {
case NL80211_TX_POWER_AUTOMATIC:
return 0;
case NL80211_TX_POWER_LIMITED:
ar->arTxPwr = ar_dbm = dbm;
ar->arTxPwrSet = TRUE;
ar->arTxPwrSet = true;
break;
default:
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type 0x%x not supported\n", __func__, type));
......@@ -1135,7 +1135,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1145,7 +1145,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
return -EIO;
}
if((ar->arConnected == TRUE)) {
if((ar->arConnected == true)) {
ar->arTxPwr = 0;
if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) {
......@@ -1175,7 +1175,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: pmgmt %d, timeout %d\n", __func__, pmgmt, timeout));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1237,7 +1237,7 @@ ar6k_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type %u\n", __func__, type));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1273,7 +1273,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......@@ -1346,7 +1346,7 @@ ar6k_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__));
if(ar->arWmiReady == FALSE) {
if(ar->arWmiReady == false) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__));
return -EIO;
}
......
......@@ -266,7 +266,7 @@ request_4byte_write(int offset, A_UINT32 data)
* Check whether or not an EEPROM request that was started
* earlier has completed yet.
*/
static A_BOOL
static bool
request_in_progress(void)
{
A_UINT32 regval;
......
......@@ -39,15 +39,15 @@
HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket,
int MaxPollMS);
int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
extern HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks;
......
......@@ -77,8 +77,8 @@ typedef struct {
void *pHCIDev; /* HCI bridge device */
HCI_TRANSPORT_PROPERTIES HCIProps; /* HCI bridge props */
struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */
A_BOOL HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/
A_BOOL HciRegistered; /* HCI device registered with stack */
bool HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/
bool HciRegistered; /* HCI device registered with stack */
HTC_PACKET_QUEUE HTCPacketStructHead;
A_UINT8 *pHTCStructAlloc;
spinlock_t BridgeLock;
......@@ -109,7 +109,7 @@ AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo;
static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo);
static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
HCI_TRANSPORT_PACKET_TYPE Type,
struct sk_buff *skb);
static struct sk_buff *bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length);
......@@ -310,7 +310,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
/* Make sure both AR6K and AR3K have power management enabled */
if (ar3kconfig.PwrMgmtEnabled) {
status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, TRUE);
status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, true);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to enable TLPM for AR6K! \n"));
}
......@@ -318,7 +318,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
status = bt_register_hci(pHcidevInfo);
} while (FALSE);
} while (false);
return status;
}
......@@ -419,7 +419,7 @@ static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket)
skb = NULL;
}
} while (FALSE);
} while (false);
FreeHTCStruct(pHcidevInfo,pPacket);
......@@ -544,7 +544,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
status = A_ERROR;
}
} while (FALSE);
} while (false);
if (status) {
if (pHcidevInfo != NULL) {
......@@ -656,10 +656,10 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
HCI_ACL_TYPE, /* send every thing out as ACL */
htc_tag);
HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,FALSE);
HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,false);
pPacket = NULL;
} while (FALSE);
} while (false);
return status;
}
......@@ -747,7 +747,7 @@ static int bt_send_frame(struct sk_buff *skb)
kfree_skb(skb);
return 0;
default:
A_ASSERT(FALSE);
A_ASSERT(false);
kfree_skb(skb);
return 0;
}
......@@ -802,11 +802,11 @@ static int bt_send_frame(struct sk_buff *skb)
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("HCI Bridge: type:%d, Total Length:%d Bytes \n",
type, txSkb->len));
status = HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,FALSE);
status = HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,false);
pPacket = NULL;
txSkb = NULL;
} while (FALSE);
} while (false);
if (txSkb != NULL) {
kfree_skb(txSkb);
......@@ -902,9 +902,9 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
pHciDev->destruct = bt_destruct;
pHciDev->owner = THIS_MODULE;
/* driver is running in normal BT mode */
pHcidevInfo->HciNormalMode = TRUE;
pHcidevInfo->HciNormalMode = true;
} while (FALSE);
} while (false);
if (status) {
bt_cleanup_hci(pHcidevInfo);
......@@ -918,7 +918,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
int err;
if (pHcidevInfo->HciRegistered) {
pHcidevInfo->HciRegistered = FALSE;
pHcidevInfo->HciRegistered = false;
clear_bit(HCI_RUNNING, &pHcidevInfo->pBtStackHCIDev->flags);
clear_bit(HCI_UP, &pHcidevInfo->pBtStackHCIDev->flags);
clear_bit(HCI_INIT, &pHcidevInfo->pBtStackHCIDev->flags);
......@@ -944,28 +944,28 @@ static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n"));
A_ASSERT(pHcidevInfo->pBtStackHCIDev != NULL);
/* mark that we are registered */
pHcidevInfo->HciRegistered = TRUE;
pHcidevInfo->HciRegistered = true;
if ((err = hci_register_dev(pHcidevInfo->pBtStackHCIDev)) < 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to register with bluetooth %d\n",err));
pHcidevInfo->HciRegistered = FALSE;
pHcidevInfo->HciRegistered = false;
status = A_ERROR;
break;
}
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: HCI registered \n"));
} while (FALSE);
} while (false);
return status;
}
static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
HCI_TRANSPORT_PACKET_TYPE Type,
struct sk_buff *skb)
{
A_UINT8 btType;
int len;
A_BOOL success = FALSE;
bool success = false;
BT_HCI_EVENT_HEADER *pEvent;
do {
......@@ -984,7 +984,7 @@ static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
break;
default:
btType = 0;
A_ASSERT(FALSE);
A_ASSERT(false);
break;
}
......@@ -1015,9 +1015,9 @@ static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
("HCI Bridge: Indicated RCV of type:%d, Length:%d \n",btType,len));
}
success = TRUE;
success = true;
} while (FALSE);
} while (false);
return success;
}
......@@ -1051,26 +1051,26 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
}
static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo)
{
A_ASSERT(FALSE);
A_ASSERT(false);
return A_ERROR;
}
static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo,
HCI_TRANSPORT_PACKET_TYPE Type,
struct sk_buff *skb)
{
A_ASSERT(FALSE);
return FALSE;
A_ASSERT(false);
return false;
}
static struct sk_buff* bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length)
{
A_ASSERT(FALSE);
A_ASSERT(false);
return NULL;
}
static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb)
{
A_ASSERT(FALSE);
A_ASSERT(false);
}
#endif // } CONFIG_BLUEZ_HCI_BRIDGE
......
......@@ -104,7 +104,7 @@ struct USER_SAVEDKEYS {
struct ieee80211req_key ucast_ik;
struct ieee80211req_key bcast_ik;
CRYPTO_TYPE keyType;
A_BOOL keyOk;
bool keyOk;
};
#endif
......@@ -412,7 +412,7 @@ struct ar_hb_chlng_resp {
A_TIMER timer;
A_UINT32 frequency;
A_UINT32 seqNum;
A_BOOL outstanding;
bool outstanding;
A_UINT8 missCnt;
A_UINT8 missThres;
};
......@@ -456,8 +456,8 @@ typedef struct ar6_raw_htc {
wait_queue_head_t raw_htc_write_queue[HTC_RAW_STREAM_NUM_MAX];
raw_htc_buffer raw_htc_read_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_READ_BUFFERS_NUM];
raw_htc_buffer raw_htc_write_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_WRITE_BUFFERS_NUM];
A_BOOL write_buffer_available[HTC_RAW_STREAM_NUM_MAX];
A_BOOL read_buffer_available[HTC_RAW_STREAM_NUM_MAX];
bool write_buffer_available[HTC_RAW_STREAM_NUM_MAX];
bool read_buffer_available[HTC_RAW_STREAM_NUM_MAX];
} AR_RAW_HTC_T;
typedef struct ar6_softc {
......@@ -466,9 +466,9 @@ typedef struct ar6_softc {
int arTxPending[ENDPOINT_MAX];
int arTotalTxDataPending;
A_UINT8 arNumDataEndPts;
A_BOOL arWmiEnabled;
A_BOOL arWmiReady;
A_BOOL arConnected;
bool arWmiEnabled;
bool arWmiReady;
bool arConnected;
HTC_HANDLE arHtcTarget;
void *arHifDevice;
spinlock_t arLock;
......@@ -495,14 +495,14 @@ typedef struct ar6_softc {
A_UINT32 arTargetType;
A_INT8 arRssi;
A_UINT8 arTxPwr;
A_BOOL arTxPwrSet;
bool arTxPwrSet;
A_INT32 arBitRate;
struct net_device_stats arNetStats;
struct iw_statistics arIwStats;
A_INT8 arNumChannels;
A_UINT16 arChannelList[32];
A_UINT32 arRegCode;
A_BOOL statsUpdatePending;
bool statsUpdatePending;
TARGET_STATS arTargetStats;
A_INT8 arMaxRetries;
A_UINT8 arPhyCapability;
......@@ -527,13 +527,13 @@ typedef struct ar6_softc {
A_UINT32 arRateMask;
A_UINT8 arSkipScan;
A_UINT16 arBeaconInterval;
A_BOOL arConnectPending;
A_BOOL arWmmEnabled;
bool arConnectPending;
bool arWmmEnabled;
struct ar_hb_chlng_resp arHBChallengeResp;
A_UINT8 arKeepaliveConfigured;
A_UINT32 arMgmtFilter;
HTC_ENDPOINT_ID arAc2EpMapping[WMM_NUM_AC];
A_BOOL arAcStreamActive[WMM_NUM_AC];
bool arAcStreamActive[WMM_NUM_AC];
A_UINT8 arAcStreamPriMap[WMM_NUM_AC];
A_UINT8 arHiAcStreamActivePri;
A_UINT8 arEp2AcMapping[ENDPOINT_MAX];
......@@ -541,12 +541,12 @@ typedef struct ar6_softc {
#ifdef HTC_RAW_INTERFACE
AR_RAW_HTC_T *arRawHtc;
#endif
A_BOOL arNetQueueStopped;
A_BOOL arRawIfInit;
bool arNetQueueStopped;
bool arRawIfInit;
int arDeviceIndex;
COMMON_CREDIT_STATE_INFO arCreditStateInfo;
A_BOOL arWMIControlEpFull;
A_BOOL dbgLogFetchInProgress;
bool arWMIControlEpFull;
bool dbgLogFetchInProgress;
A_UCHAR log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE];
A_UINT32 log_cnt;
A_UINT32 dbglog_init_done;
......@@ -565,7 +565,7 @@ typedef struct ar6_softc {
struct ieee80211req_key ap_mode_bkey; /* AP mode */
A_NETBUF_QUEUE_T mcastpsq; /* power save q for Mcast frames */
A_MUTEX_T mcastpsqLock;
A_BOOL DTIMExpired; /* flag to indicate DTIM expired */
bool DTIMExpired; /* flag to indicate DTIM expired */
A_UINT8 intra_bss; /* enable/disable intra bss data forward */
void *aggr_cntxt;
#ifndef EXPORT_HCI_BRIDGE_INTERFACE
......@@ -581,7 +581,7 @@ typedef struct ar6_softc {
A_UINT16 arRTS;
A_UINT16 arACS; /* AP mode - Auto Channel Selection */
HTC_PACKET_QUEUE amsdu_rx_buffer_queue;
A_BOOL bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */
bool bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */
A_TIMER disconnect_timer;
A_UINT8 rxMetaVersion;
#ifdef WAPI_ENABLE
......@@ -597,11 +597,11 @@ typedef struct ar6_softc {
struct ar_key keys[WMI_MAX_KEY_INDEX + 1];
#endif /* ATH6K_CONFIG_CFG80211 */
A_UINT16 arWlanPowerState;
A_BOOL arWlanOff;
bool arWlanOff;
#ifdef CONFIG_PM
A_UINT16 arWowState;
A_BOOL arBTOff;
A_BOOL arBTSharing;
bool arBTOff;
bool arBTSharing;
A_UINT16 arSuspendConfig;
A_UINT16 arWlanOffConfig;
A_UINT16 arWow2Config;
......@@ -611,7 +611,7 @@ typedef struct ar6_softc {
#define AR_MCAST_FILTER_MAC_ADDR_SIZE 4
A_UINT8 mcast_filters[MAC_MAX_FILTERS_PER_LIST][AR_MCAST_FILTER_MAC_ADDR_SIZE];
A_UINT8 bdaddr[6];
A_BOOL scanSpecificSsid;
bool scanSpecificSsid;
#ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT
void *arApDev;
#endif
......@@ -704,7 +704,7 @@ int ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar);
void ar6000_TxDataCleanup(AR_SOFTC_T *ar);
int ar6000_acl_data_tx(struct sk_buff *skb, struct net_device *dev);
void ar6000_restart_endpoint(struct net_device *dev);
void ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglogs);
void ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs);
#ifdef HTC_RAW_INTERFACE
......
......@@ -26,7 +26,7 @@
/* transmit packet reserve offset */
#define TX_PACKET_RSV_OFFSET 32
/* pal specific config structure */
typedef A_BOOL (*ar6k_pal_recv_pkt_t)(void *pHciPalInfo, void *skb);
typedef bool (*ar6k_pal_recv_pkt_t)(void *pHciPalInfo, void *skb);
typedef struct ar6k_pal_config_s
{
ar6k_pal_recv_pkt_t fpar6k_pal_recv_pkt;
......
......@@ -41,7 +41,7 @@ void ar6000_disconnect_event(struct ar6_softc *ar, A_UINT8 reason,
A_UINT8 *bssid, A_UINT8 assocRespLen,
A_UINT8 *assocInfo, A_UINT16 protocolReasonStatus);
void ar6000_tkip_micerr_event(struct ar6_softc *ar, A_UINT8 keyid,
A_BOOL ismcast);
bool ismcast);
void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps);
void ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList);
void ar6000_regDomain_event(struct ar6_softc *ar, A_UINT32 regCode);
......@@ -79,7 +79,7 @@ void ar6000_gpio_ack_rx(void);
A_INT32 rssi_compensation_calc_tcmd(A_UINT32 freq, A_INT32 rssi, A_UINT32 totalPkt);
A_INT16 rssi_compensation_calc(struct ar6_softc *ar, A_INT16 rssi);
A_INT16 rssi_compensation_reverse_calc(struct ar6_softc *ar, A_INT16 rssi, A_BOOL Above);
A_INT16 rssi_compensation_reverse_calc(struct ar6_softc *ar, A_INT16 rssi, bool Above);
void ar6000_dbglog_init_done(struct ar6_softc *ar);
......@@ -115,7 +115,7 @@ int ar6000_dbglog_get_debug_logs(struct ar6_softc *ar);
void ar6000_peer_event(void *devt, A_UINT8 eventCode, A_UINT8 *bssid);
void ar6000_indicate_tx_activity(void *devt, A_UINT8 trafficClass, A_BOOL Active);
void ar6000_indicate_tx_activity(void *devt, A_UINT8 trafficClass, bool Active);
HTC_ENDPOINT_ID ar6000_ac2_endpoint_id ( void * devt, A_UINT8 ac);
A_UINT8 ar6000_endpoint_id2_ac (void * devt, HTC_ENDPOINT_ID ep );
......@@ -171,7 +171,7 @@ void ap_wapi_rekey_event(struct ar6_softc *ar, A_UINT8 type, A_UINT8 *mac);
#endif
int ar6000_connect_to_ap(struct ar6_softc *ar);
int ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL suspending);
int ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool suspending);
int ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state);
int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state);
......@@ -179,7 +179,7 @@ int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state);
int ar6000_suspend_ev(void *context);
int ar6000_resume_ev(void *context);
int ar6000_power_change_ev(void *context, A_UINT32 config);
void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, A_BOOL isEvent);
void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent);
#endif
void ar6000_pm_init(void);
......
......@@ -531,7 +531,7 @@ typedef enum {
* UINT32 cmd (AR6000_XIOCTL_WMI_STARTSCAN)
* UINT8 scanType
* UINT8 scanConnected
* A_BOOL forceFgScan
* u32 forceFgScan
* uses: WMI_START_SCAN_CMDID
*/
......@@ -643,7 +643,7 @@ typedef enum {
* arguments:
* UINT8 cmd (AR6000_XIOCTL_WMI_GET_KEEPALIVE)
* UINT8 keepaliveInterval
* A_BOOL configured
* u32 configured
* uses: WMI_GET_KEEPALIVE_CMDID
*/
......@@ -1134,7 +1134,7 @@ typedef struct ar6000_dbglog_module_config_s {
A_UINT32 valid;
A_UINT16 mmask;
A_UINT16 tsr;
A_BOOL rep;
u32 rep;
A_UINT16 size;
} DBGLOG_MODULE_CONFIG;
......
......@@ -44,7 +44,6 @@ typedef u_int16_t A_UINT16;
typedef u_int32_t A_UINT32;
typedef u_int64_t A_UINT64;
typedef int A_BOOL;
typedef char A_CHAR;
typedef unsigned char A_UCHAR;
typedef unsigned long A_ATH_TIMER;
......
......@@ -39,7 +39,7 @@ void ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason,
A_UINT8 *bssid, A_UINT8 assocRespLen,
A_UINT8 *assocInfo, A_UINT16 protocolReasonStatus);
void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, A_BOOL ismcast);
void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, bool ismcast);
#endif /* _AR6K_CFG80211_H_ */
......
......@@ -28,15 +28,15 @@
extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous);
extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket,
int MaxPollMS);
extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud);
extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
#define HCI_TransportAttach(HTCHandle, pInfo) \
......
......@@ -116,7 +116,7 @@ typedef spinlock_t A_MUTEX_T;
#define A_MUTEX_INIT(mutex) spin_lock_init(mutex)
#define A_MUTEX_LOCK(mutex) spin_lock_bh(mutex)
#define A_MUTEX_UNLOCK(mutex) spin_unlock_bh(mutex)
#define A_IS_MUTEX_VALID(mutex) TRUE /* okay to return true, since A_MUTEX_DELETE does nothing */
#define A_IS_MUTEX_VALID(mutex) true /* okay to return true, since A_MUTEX_DELETE does nothing */
#define A_MUTEX_DELETE(mutex) /* spin locks are not kernel resources so nothing to free.. */
/* Get current time in ms adding a constant offset (in ms) */
......@@ -247,7 +247,7 @@ typedef struct sk_buff_head A_NETBUF_QUEUE_T;
#define A_NETBUF_QUEUE_SIZE(q) \
a_netbuf_queue_size(q)
#define A_NETBUF_QUEUE_EMPTY(q) \
(a_netbuf_queue_empty(q) ? TRUE : FALSE)
(a_netbuf_queue_empty(q) ? true : false)
/*
* Network buffer support
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ typedef enum {
typedef struct {
void *osbuf;
A_BOOL is_amsdu;
bool is_amsdu;
A_UINT16 seq_no;
}OSBUF_HOLD_Q;
......@@ -74,9 +74,9 @@ typedef struct {
#endif
typedef struct {
A_BOOL aggr; /* is it ON or OFF */
A_BOOL progress; /* TRUE when frames have arrived after a timer start */
A_BOOL timerMon; /* TRUE if the timer started for the sake of this TID */
bool aggr; /* is it ON or OFF */
bool progress; /* true when frames have arrived after a timer start */
bool timerMon; /* true if the timer started for the sake of this TID */
A_UINT16 win_sz; /* negotiated window size */
A_UINT16 seq_next; /* Next seq no, in current window */
A_UINT32 hold_q_sz; /* Num of frames that can be held in hold q */
......
......@@ -73,7 +73,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
A_MEMZERO(p_aggr, sizeof(AGGR_INFO));
p_aggr->aggr_sz = AGGR_SZ_DEFAULT;
A_INIT_TIMER(&p_aggr->timer, aggr_timeout, p_aggr);
p_aggr->timerScheduled = FALSE;
p_aggr->timerScheduled = false;
A_NETBUF_QUEUE_INIT(&p_aggr->freeQ);
p_aggr->netbuf_allocator = netbuf_allocator;
......@@ -81,13 +81,13 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
for(i = 0; i < NUM_OF_TIDS; i++) {
rxtid = AGGR_GET_RXTID(p_aggr, i);
rxtid->aggr = FALSE;
rxtid->progress = FALSE;
rxtid->timerMon = FALSE;
rxtid->aggr = false;
rxtid->progress = false;
rxtid->timerMon = false;
A_NETBUF_QUEUE_INIT(&rxtid->q);
A_MUTEX_INIT(&rxtid->lock);
}
}while(FALSE);
}while(false);
A_PRINTF("going out of aggr_init..status %s\n",
(status == A_OK) ? "OK":"Error");
......@@ -115,9 +115,9 @@ aggr_delete_tid_state(AGGR_INFO *p_aggr, A_UINT8 tid)
aggr_deque_frms(p_aggr, tid, 0, ALL_SEQNO);
}
rxtid->aggr = FALSE;
rxtid->progress = FALSE;
rxtid->timerMon = FALSE;
rxtid->aggr = false;
rxtid->progress = false;
rxtid->timerMon = false;
rxtid->win_sz = 0;
rxtid->seq_next = 0;
rxtid->hold_q_sz = 0;
......@@ -142,7 +142,7 @@ aggr_module_destroy(void *cntxt)
if(p_aggr) {
if(p_aggr->timerScheduled) {
A_UNTIMEOUT(&p_aggr->timer);
p_aggr->timerScheduled = FALSE;
p_aggr->timerScheduled = false;
}
for(i = 0; i < NUM_OF_TIDS; i++) {
......@@ -249,7 +249,7 @@ aggr_recv_addba_req_evt(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_UINT8 win_s
A_ASSERT(0);
}
rxtid->aggr = TRUE;
rxtid->aggr = true;
}
void
......@@ -426,7 +426,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf)
}
void
aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu, void **osbuf)
aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf)
{
AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt;
RXTID *rxtid;
......@@ -536,17 +536,17 @@ aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu
aggr_deque_frms(p_aggr, tid, 0, CONTIGUOUS_SEQNO);
if(p_aggr->timerScheduled) {
rxtid->progress = TRUE;
rxtid->progress = true;
}else{
for(idx=0 ; idx<rxtid->hold_q_sz ; idx++) {
if(rxtid->hold_q[idx].osbuf) {
/* there is a frame in the queue and no timer so
* start a timer to ensure that the frame doesn't remain
* stuck forever. */
p_aggr->timerScheduled = TRUE;
p_aggr->timerScheduled = true;
A_TIMEOUT_MS(&p_aggr->timer, AGGR_RX_TIMEOUT, 0);
rxtid->progress = FALSE;
rxtid->timerMon = TRUE;
rxtid->progress = false;
rxtid->timerMon = true;
break;
}
}
......@@ -588,9 +588,9 @@ aggr_timeout(A_ATH_TIMER arg)
rxtid = AGGR_GET_RXTID(p_aggr, i);
stats = AGGR_GET_RXTID_STATS(p_aggr, i);
if(rxtid->aggr == FALSE ||
rxtid->timerMon == FALSE ||
rxtid->progress == TRUE) {
if(rxtid->aggr == false ||
rxtid->timerMon == false ||
rxtid->progress == true) {
continue;
}
// dequeue all frames in for this tid
......@@ -599,25 +599,25 @@ aggr_timeout(A_ATH_TIMER arg)
aggr_deque_frms(p_aggr, i, 0, ALL_SEQNO);
}
p_aggr->timerScheduled = FALSE;
p_aggr->timerScheduled = false;
// determine whether a new timer should be started.
for(i = 0; i < NUM_OF_TIDS; i++) {
rxtid = AGGR_GET_RXTID(p_aggr, i);
if(rxtid->aggr == TRUE && rxtid->hold_q) {
if(rxtid->aggr == true && rxtid->hold_q) {
for(j = 0 ; j < rxtid->hold_q_sz ; j++)
{
if(rxtid->hold_q[j].osbuf)
{
p_aggr->timerScheduled = TRUE;
rxtid->timerMon = TRUE;
rxtid->progress = FALSE;
p_aggr->timerScheduled = true;
rxtid->timerMon = true;
rxtid->progress = false;
break;
}
}
if(j >= rxtid->hold_q_sz) {
rxtid->timerMon = FALSE;
rxtid->timerMon = false;
}
}
}
......
......@@ -151,7 +151,7 @@ wlan_setup_node(struct ieee80211_node_table *nt, bss_t *ni,
#ifdef THREAD_X
if (!nt->isTimerArmed) {
A_TIMEOUT_MS(&nt->nt_inact_timer, timeoutValue, 0);
nt->isTimerArmed = TRUE;
nt->isTimerArmed = true;
}
#endif
......@@ -299,7 +299,7 @@ wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt)
#ifdef THREAD_X
A_INIT_TIMER(&nt->nt_inact_timer, wlan_node_timeout, nt);
nt->isTimerArmed = FALSE;
nt->isTimerArmed = false;
#endif
nt->nt_wmip = wmip;
nt->nt_nodeAge = WLAN_NODE_INACT_TIMEOUT_MSEC;
......@@ -326,7 +326,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt)
{
#ifdef THREAD_X
bss_t *bss, *nextBss;
A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = FALSE;
A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = false;
wmi_get_current_bssid(nt->nt_wmip, myBssid);
......@@ -379,7 +379,7 @@ wlan_node_timeout (A_ATH_TIMER arg)
{
struct ieee80211_node_table *nt = (struct ieee80211_node_table *)arg;
bss_t *bss, *nextBss;
A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = FALSE;
A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = false;
A_UINT32 timeoutValue = 0;
timeoutValue = nt->nt_nodeAge;
......@@ -406,7 +406,7 @@ wlan_node_timeout (A_ATH_TIMER arg)
* Re-arm timer, only when we have a bss other than
* current bss AND it is not aged-out.
*/
reArmTimer = TRUE;
reArmTimer = true;
}
}
bss = nextBss;
......@@ -432,7 +432,7 @@ wlan_node_table_cleanup(struct ieee80211_node_table *nt)
bss_t *
wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid,
A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID)
A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID)
{
bss_t *ni = NULL;
A_UCHAR *pIESsid = NULL;
......@@ -447,22 +447,22 @@ wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid,
if (0x00 == memcmp (pSsid, &pIESsid[2], ssidLength)) {
//
// Step 2.1 : Check MatchSSID is TRUE, if so, return Matched SSID
// Step 2.1 : Check MatchSSID is true, if so, return Matched SSID
// Profile, otherwise check whether WPA2 or WPA
//
if (TRUE == bMatchSSID) {
if (true == bMatchSSID) {
ieee80211_node_incref (ni); /* mark referenced */
IEEE80211_NODE_UNLOCK (nt);
return ni;
}
// Step 2 : if SSID matches, check WPA or WPA2
if (TRUE == bIsWPA2 && NULL != ni->ni_cie.ie_rsn) {
if (true == bIsWPA2 && NULL != ni->ni_cie.ie_rsn) {
ieee80211_node_incref (ni); /* mark referenced */
IEEE80211_NODE_UNLOCK (nt);
return ni;
}
if (FALSE == bIsWPA2 && NULL != ni->ni_cie.ie_wpa) {
if (false == bIsWPA2 && NULL != ni->ni_cie.ie_wpa) {
ieee80211_node_incref(ni); /* mark referenced */
IEEE80211_NODE_UNLOCK (nt);
return ni;
......
......@@ -101,7 +101,7 @@ int
wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie)
{
A_UINT8 *frm, *efrm;
A_UINT8 elemid_ssid = FALSE;
A_UINT8 elemid_ssid = false;
frm = buf;
efrm = (A_UINT8 *) (frm + framelen);
......@@ -134,7 +134,7 @@ wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie)
case IEEE80211_ELEMID_SSID:
if (!elemid_ssid) {
cie->ie_ssid = frm;
elemid_ssid = TRUE;
elemid_ssid = true;
}
break;
case IEEE80211_ELEMID_RATES:
......
This diff is collapsed.
......@@ -60,8 +60,8 @@ typedef struct sq_threshold_params_s {
#define A_NUM_BANDS 2
struct wmi_t {
A_BOOL wmi_ready;
A_BOOL wmi_numQoSStream;
bool wmi_ready;
bool wmi_numQoSStream;
A_UINT16 wmi_streamExistsForAC[WMM_NUM_AC];
A_UINT8 wmi_fatPipeExists;
void *wmi_devt;
......@@ -80,7 +80,7 @@ struct wmi_t {
SQ_THRESHOLD_PARAMS wmi_SqThresholdParams[SIGNAL_QUALITY_METRICS_NUM_MAX];
CRYPTO_TYPE wmi_pair_crypto_type;
CRYPTO_TYPE wmi_grp_crypto_type;
A_BOOL wmi_is_wmm_enabled;
bool wmi_is_wmm_enabled;
A_UINT8 wmi_ht_allowed[A_NUM_BANDS];
A_UINT8 wmi_traffic_class;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment