Use kernel bool and true/false.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define BMI_COMMUNICATION_TIMEOUT 100000
/* ------ Global Variable Declarations ------- */
-static A_BOOL bmiDone;
+static bool bmiDone;
int
bmiBufferSend(HIF_DEVICE *device,
bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
- A_BOOL want_timeout);
+ bool want_timeout);
#endif
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 + \
void
BMIInit(void)
{
- bmiDone = FALSE;
- pendingEventsFuncCheck = FALSE;
+ bmiDone = false;
+ pendingEventsFuncCheck = false;
/*
* On some platforms, it's not possible to DMA to a static variable
}
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));
}
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;
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;
/* 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));
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;
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;
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;
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;
bmiBufferReceive(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
- A_BOOL want_timeout)
+ bool want_timeout)
{
int status;
A_UINT32 address;
HIF_DEVICE_GET_PENDING_EVENTS_FUNC,
&getPendingEventsFunc,
sizeof(getPendingEventsFunc));
- pendingEventsFuncCheck = TRUE;
+ pendingEventsFuncCheck = true;
}
HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR,
}
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);
}
pInfo->GMboxSize = HIF_GMBOX_WIDTH;
break;
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
}
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;
*/
#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 */
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);
/* 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;
}
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;
}
("AR6000: SDIO bus operation failed! MMC stack returned : %d \n", ret));
status = A_ERROR;
}
- } while (FALSE);
+ } while (false);
return status;
}
}
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:
device = getHifDevice(func);
device->id = id;
- device->is_disabled = TRUE;
+ device->is_disabled = true;
spin_lock_init(&device->lock);
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 */
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"));
__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;
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"));
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"));
}
if (device->is_disabled) {
- device->is_disabled = FALSE;
+ device->is_disabled = false;
} else {
status = hifDisableFunc(device, func);
}
}
if (pReq->TotalLength == 0) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
status = A_OK;
}
- } while (FALSE);
+ } while (false);
if (status && (request & HIF_ASYNCHRONOUS)) {
pReq->CompletionStatus = status;
status = A_OK;
- } while (FALSE);
+ } while (false);
if (status) {
CleanupHIFScatterResources(device);
if (pDev->HifAttached) {
HIFDetachHTC(pDev->HIFDevice);
- pDev->HifAttached = FALSE;
+ pDev->HifAttached = false;
}
DevCleanupVirtualScatterSupport(pDev);
break;
}
- pDev->HifAttached = TRUE;
+ pDev->HifAttached = true;
/* get the addresses for all 4 mailboxes */
status = HIFConfigureDevice(pDev->HIFDevice, HIF_DEVICE_GET_MBOX_ADDR,
&pDev->MailBoxInfo, sizeof(pDev->MailBoxInfo));
if (status != A_OK) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
blocksizes, sizeof(blocksizes));
if (status != A_OK) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
AR_DEBUG_PRINTF(ATH_DEBUG_WARN,
("HIF requests that DSR yield per %d RECV packets \n",
pDev->HifIRQYieldParams.RecvPacketYieldCount));
- pDev->DSRCanYield = TRUE;
+ pDev->DSRCanYield = true;
}
break;
case HIF_DEVICE_IRQ_ASYNC_SYNC:
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("HIF Interrupt processing is ASYNC and SYNC\n"));
break;
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
}
pDev->HifMaskUmaskRecvEvent = NULL;
status = DevSetupGMbox(pDev);
- } while (FALSE);
+ } while (false);
if (status) {
if (pDev->HifAttached) {
HIFDetachHTC(pDev->HIFDevice);
- pDev->HifAttached = FALSE;
+ pDev->HifAttached = false;
}
}
/* disable packet reception (used in case the host runs out of buffers)
* this is the "override" method when the HIF reports another methods to
* disable recv events */
-static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode)
+static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
int status = A_OK;
HTC_PACKET *pIOPacket = NULL;
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
EnableRecv ? HIF_UNMASK_RECV : HIF_MASK_RECV,
NULL);
- } while (FALSE);
+ } while (false);
if (status && (pIOPacket != NULL)) {
AR6KFreeIOPacket(pDev,pIOPacket);
/* disable packet reception (used in case the host runs out of buffers)
* this is the "normal" method using the interrupt enable registers through
* the host I/F */
-static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_BOOL AsyncMode)
+static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool AsyncMode)
{
int status = A_OK;
HTC_PACKET *pIOPacket = NULL;
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
HIF_WR_SYNC_BYTE_INC,
NULL);
- } while (FALSE);
+ } while (false);
if (status && (pIOPacket != NULL)) {
AR6KFreeIOPacket(pDev,pIOPacket);
}
-int DevStopRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
+int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode)
{
if (NULL == pDev->HifMaskUmaskRecvEvent) {
- return DevDoEnableDisableRecvNormal(pDev,FALSE,AsyncMode);
+ return DevDoEnableDisableRecvNormal(pDev,false,AsyncMode);
} else {
- return DevDoEnableDisableRecvOverride(pDev,FALSE,AsyncMode);
+ return DevDoEnableDisableRecvOverride(pDev,false,AsyncMode);
}
}
-int DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL AsyncMode)
+int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)
{
if (NULL == pDev->HifMaskUmaskRecvEvent) {
- return DevDoEnableDisableRecvNormal(pDev,TRUE,AsyncMode);
+ return DevDoEnableDisableRecvNormal(pDev,true,AsyncMode);
} else {
- return DevDoEnableDisableRecvOverride(pDev,TRUE,AsyncMode);
+ return DevDoEnableDisableRecvOverride(pDev,true,AsyncMode);
}
}
-int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending)
+int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,bool *pbIsRecvPending)
{
int status = A_OK;
A_UCHAR host_int_status = 0x0;
if(!host_int_status)
{
status = A_OK;
- *pbIsRecvPending = FALSE;
+ *pbIsRecvPending = false;
break;
}
else
{
- *pbIsRecvPending = TRUE;
+ *pbIsRecvPending = true;
}
A_MDELAY(100);
UNLOCK_AR6K(pDev);
}
-int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA)
+int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
{
A_UINT8 *pDMABuffer = NULL;
int i, remaining;
pDMABuffer = pReq->pScatterBounceBuffer;
if (pDMABuffer == NULL) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
return A_EINVAL;
}
length = min((int)pReq->ScatterList[i].Length, remaining);
if (length != (int)pReq->ScatterList[i].Length) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
/* there is a problem with the scatter list */
return A_EINVAL;
}
}
if (pReq->TotalLength == 0) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
request,
(request & HIF_ASYNCHRONOUS) ? pIOPacket : NULL);
- } while (FALSE);
+ } while (false);
if ((status != A_PENDING) && status && (request & HIF_ASYNCHRONOUS)) {
if (pIOPacket != NULL) {
pDev->HifScatterInfo.MaxScatterEntries = AR6K_SCATTER_ENTRIES_PER_REQ;
pDev->HifScatterInfo.MaxTransferSizePerScatterReq = AR6K_MAX_TRANSFER_SIZE_PER_SCATTER;
}
- pDev->ScatterIsVirtual = TRUE;
+ pDev->ScatterIsVirtual = true;
}
return status;
return status;
}
-int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async)
+int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async)
{
int status;
}
-#define FILL_ZERO TRUE
-#define FILL_COUNTING FALSE
-static void InitBuffers(A_BOOL Zero)
+#define FILL_ZERO true
+#define FILL_COUNTING false
+static void InitBuffers(bool Zero)
{
A_UINT16 *pBuffer16 = (A_UINT16 *)g_Buffer;
int i;
}
-static A_BOOL CheckOneBuffer(A_UINT16 *pBuffer16, int Length)
+static bool CheckOneBuffer(A_UINT16 *pBuffer16, int Length)
{
int i;
A_UINT16 startCount;
- A_BOOL success = TRUE;
+ bool success = true;
/* get the starting count */
startCount = pBuffer16[0];
for (i = 0; i < (Length / 2) ; i++,startCount++) {
/* target will invert all the data */
if ((A_UINT16)pBuffer16[i] != (A_UINT16)~startCount) {
- success = FALSE;
+ success = false;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Invalid Data Got:0x%X, Expecting:0x%X (offset:%d, total:%d) \n",
pBuffer16[i], ((A_UINT16)~startCount), i, Length));
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("0x%X 0x%X 0x%X 0x%X \n",
return success;
}
-static A_BOOL CheckBuffers(void)
+static bool CheckBuffers(void)
{
int i;
- A_BOOL success = TRUE;
+ bool success = true;
BUFFER_PROC_LIST checkList[BUFFER_PROC_LIST_DEPTH];
/* assemble the list */
A_UINT8 credits = 0;
A_UINT32 address;
- while (TRUE) {
+ while (true) {
/* Read the counter register to get credits, this auto-decrements */
address = COUNT_DEC_ADDRESS + (AR6K_MAILBOXES + mbox) * 4;
}
if (totalBytes != TEST_BYTES) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
} else {
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, ("Got all buffers on mbox:%d total recv :%d (w/Padding : %d) \n",
mbox, totalBytes, totalwPadding));
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" Send/Recv success! mailbox : %d \n",mbox));
- } while (FALSE);
+ } while (false);
return status;
}
g_MailboxAddrs, sizeof(g_MailboxAddrs));
if (status != A_OK) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
g_BlockSizes, sizeof(g_BlockSizes));
if (status != A_OK) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
}
}
- } while (FALSE);
+ } while (false);
if (status == A_OK) {
AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n"));
#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
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 {
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;
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)
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 */
#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;
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));
*
*/
-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) \
#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);
#define DevNotifyGMboxTargetFailure(p)
static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
- pDev->GMboxEnabled = FALSE;
+ pDev->GMboxEnabled = false;
return A_OK;
}
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,
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);
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevPollMboxMsgRecv \n"));
- while (TRUE) {
+ while (true) {
if (pDev->GetPendingEventsFunc != NULL) {
{
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));
}
}
if (pEvents->Events & HIF_OTHER_EVENTS) {
- otherInts = TRUE;
+ otherInts = true;
}
} else {
/* standard interrupt table handling.... */
if (host_int_status) {
/* there are other interrupts to handle */
- otherInts = TRUE;
+ otherInts = true;
}
}
}
}
- } while (FALSE);
+ } while (false);
/* free this IO packet */
AR6KFreeIOPacket(pDev,pPacket);
/* 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;
}
}
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"));
}
/* 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;
status = DevCheckGMboxInterrupts(pDev);
}
- } while (FALSE);
+ } while (false);
do {
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;
}
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;
}
}
}
}
- } 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
* 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",
{
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));
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
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;
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));
}
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
AR6K_IRQ_ENABLE_REGS_SIZE,
HIF_WR_SYNC_BYTE_INC,
NULL);
- } while (FALSE);
+ } while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
}
-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;
break;
case GMBOX_ACTION_NONE:
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
HIF_WR_SYNC_BYTE_FIX,
NULL);
- } while (FALSE);
+ } while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
void DevCleanupGMbox(AR6K_DEVICE *pDev)
{
if (pDev->GMboxEnabled) {
- pDev->GMboxEnabled = FALSE;
+ pDev->GMboxEnabled = false;
GMboxProtocolUninstall(pDev);
}
}
break;
}
- pDev->GMboxEnabled = TRUE;
+ pDev->GMboxEnabled = true;
- } while (FALSE);
+ } while (false);
return status;
}
pDev->GMboxInfo.CreditCountIRQEnabled);
}
- } while (FALSE);
+ } while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ, ("-DevCheckGMboxInterrupts (%d) \n",status));
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;
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));
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;
if (NULL == pIOPacket) {
status = A_NO_MEMORY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
AR6K_REG_IO_BUFFER_SIZE,
HIF_RD_SYNC_BYTE_FIX,
NULL);
- } while (FALSE);
+ } while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
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;
}
*pLookAheadBytes = bytes;
}
- } while (FALSE);
+ } while (false);
return status;
}
break;
}
- } while (FALSE);
+ } while (false);
if (!status) {
typedef struct {
HCI_TRANSPORT_CONFIG_INFO HCIConfig;
- A_BOOL HCIAttached;
- A_BOOL HCIStopped;
+ bool HCIAttached;
+ bool HCIStopped;
A_UINT32 RecvStateFlags;
A_UINT32 SendStateFlags;
HCI_TRANSPORT_PACKET_TYPE WaitBufferType;
(p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \
}
-static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous);
+static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous);
static void HCIUartCleanup(GMBOX_PROTO_HCI_UART *pProtocol)
{
int status;
int credits;
int creditPollCount = CREDIT_POLL_COUNT;
- A_BOOL gotCredits = FALSE;
+ bool gotCredits = false;
pProt->CreditsConsumed = 0;
if (pProt->CreditsMax != 0) {
/* we can only call this only once per target reset */
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HCI: InitTxCreditState - already called! \n"));
- A_ASSERT(FALSE);
+ A_ASSERT(false);
status = A_EINVAL;
break;
}
A_MDELAY(HCI_DELAY_PER_INTERVAL_MS);
continue;
} else {
- gotCredits = TRUE;
+ gotCredits = true;
}
if (0 == credits) {
break;
}
- } while (FALSE);
+ } while (false);
if (!status) {
pProt->CreditsAvailable = pProt->CreditsMax;
return status;
}
-static int CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIRQEnabled)
+static int CreditsAvailableCallback(void *pContext, int Credits, bool CreditIRQEnabled)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)pContext;
- A_BOOL enableCreditIrq = FALSE;
- A_BOOL disableCreditIrq = FALSE;
- A_BOOL doPendingSends = FALSE;
+ bool enableCreditIrq = false;
+ bool disableCreditIrq = false;
+ bool doPendingSends = false;
int status = A_OK;
/** this callback is called under 2 conditions:
if (0 == Credits) {
if (!CreditIRQEnabled) {
/* enable credit IRQ */
- enableCreditIrq = TRUE;
+ enableCreditIrq = true;
}
break;
}
/* we have enough credits to fullfill at least 1 packet waiting in the queue */
pProt->CreditsCurrentSeek = 0;
pProt->SendStateFlags &= ~HCI_SEND_WAIT_CREDITS;
- doPendingSends = TRUE;
+ doPendingSends = true;
if (CreditIRQEnabled) {
/* credit IRQ was enabled, we shouldn't need it anymore */
- disableCreditIrq = TRUE;
+ disableCreditIrq = true;
}
} else {
/* not enough credits yet, enable credit IRQ if we haven't already */
if (!CreditIRQEnabled) {
- enableCreditIrq = TRUE;
+ enableCreditIrq = true;
}
}
- } while (FALSE);
+ } while (false);
UNLOCK_HCI_TX(pProt);
}
if (doPendingSends) {
- HCITrySend(pProt, NULL, FALSE);
+ HCITrySend(pProt, NULL, false);
}
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+CreditsAvailableCallback \n"));
int status = A_OK;
int totalRecvLength = 0;
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
- A_BOOL recvRefillCalled = FALSE;
- A_BOOL blockRecv = FALSE;
+ bool recvRefillCalled = false;
+ bool blockRecv = false;
HTC_PACKET *pPacket = NULL;
/** caller guarantees that this is a fully block-able context (synch I/O is allowed) */
pktType));
/* check for refill handler */
if (pProt->HCIConfig.pHCIPktRecvRefill != NULL) {
- recvRefillCalled = TRUE;
+ recvRefillCalled = true;
UNLOCK_HCI_RX(pProt);
/* call the re-fill handler */
pProt->HCIConfig.pHCIPktRecvRefill(pProt->HCIConfig.pContext,
/* this is not an error, we simply need to mark that we are waiting for buffers.*/
pProt->RecvStateFlags |= HCI_RECV_WAIT_BUFFERS;
pProt->WaitBufferType = pktType;
- blockRecv = TRUE;
+ blockRecv = true;
break;
}
break;
}
- } while (FALSE);
+ } while (false);
UNLOCK_HCI_RX(pProt);
}
}
- } while (FALSE);
+ } while (false);
/* check if we need to disable the reciever */
if (status || blockRecv) {
int credits;
int retry = 100;
- while (TRUE) {
+ while (true) {
credits = 0;
status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits);
if (status) {
return status;
}
-static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL Synchronous)
+static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, bool Synchronous)
{
int status = A_OK;
int transferLength;
int creditsRequired, remainder;
A_UINT8 hciUartType;
- A_BOOL synchSendComplete = FALSE;
+ bool synchSendComplete = false;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCITrySend (pPacket:0x%lX) %s \n",(unsigned long)pPacket,
Synchronous ? "SYNC" :"ASYNC"));
/* in synchronous mode, the send queue can only hold 1 packet */
if (!HTC_QUEUE_EMPTY(&pProt->SendQueue)) {
status = A_EBUSY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
if (pProt->SendProcessCount > 1) {
/* another thread or task is draining the TX queues */
status = A_EBUSY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
break;
default:
status = A_EINVAL;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
status = DevGMboxWrite(pProt->pDev,pPacket,transferLength);
if (Synchronous) {
- synchSendComplete = TRUE;
+ synchSendComplete = true;
} else {
pPacket = NULL;
}
}
- } while (FALSE);
+ } while (false);
pProt->SendProcessCount--;
A_ASSERT(pProt->SendProcessCount >= 0);
A_ASSERT(pPacket != NULL);
if (!status && (!synchSendComplete)) {
status = A_EBUSY;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
LOCK_HCI_TX(pProt);
if (pPacket->ListLink.pNext != NULL) {
/* remove from the queue */
A_MUTEX_INIT(&pProtocol->HCIRxLock);
A_MUTEX_INIT(&pProtocol->HCITxLock);
- } while (FALSE);
+ } while (false);
if (!status) {
LOCK_AR6K(pDev);
if (pProtocol->HCIAttached) {
A_ASSERT(pProtocol->HCIConfig.TransportRemoved != NULL);
pProtocol->HCIConfig.TransportRemoved(pProtocol->HCIConfig.pContext);
- pProtocol->HCIAttached = FALSE;
+ pProtocol->HCIAttached = false;
}
HCIUartCleanup(pProtocol);
pProt->HCIConfig.pContext);
}
- } while (FALSE);
+ } while (false);
return status;
}
A_ASSERT(pProtocol->HCIConfig.pHCIPktRecv != NULL);
A_ASSERT(pProtocol->HCIConfig.pHCISendComplete != NULL);
- pProtocol->HCIAttached = TRUE;
+ pProtocol->HCIAttached = true;
- } while (FALSE);
+ } while (false);
UNLOCK_AR6K(pDev);
UNLOCK_AR6K(pDev);
return;
}
- pProtocol->HCIAttached = FALSE;
+ pProtocol->HCIAttached = false;
UNLOCK_AR6K(pDev);
HCI_TransportStop(HciTrans);
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
int status = A_OK;
- A_BOOL unblockRecv = FALSE;
+ bool unblockRecv = false;
HTC_PACKET *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n"));
pProt->WaitBufferType));
pProt->RecvStateFlags &= ~HCI_RECV_WAIT_BUFFERS;
pProt->WaitBufferType = HCI_PACKET_INVALID;
- unblockRecv = TRUE;
+ unblockRecv = true;
}
}
- } while (FALSE);
+ } while (false);
UNLOCK_HCI_RX(pProt);
return A_OK;
}
-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)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportStop \n"));
return;
}
- pProt->HCIStopped = TRUE;
+ pProt->HCIStopped = true;
UNLOCK_AR6K(pProt->pDev);
/* disable interrupts */
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportStart \n"));
/* set stopped in case we have a problem in starting */
- pProt->HCIStopped = TRUE;
+ pProt->HCIStopped = true;
do {
}
/* we made it */
- pProt->HCIStopped = FALSE;
+ pProt->HCIStopped = false;
- } while (FALSE);
+ } while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportStart \n"));
return status;
}
-int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable)
+int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enable)
{
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
return DevGMboxIRQAction(pProt->pDev,
return status;
}
-int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable)
+int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, bool Enable)
{
int status;
GMBOX_PROTO_HCI_UART *pProt = (GMBOX_PROTO_HCI_UART *)HciTrans;
HTC_FREE_CONTROL_TX(target,pControlPacket);
}
- } while (FALSE);
+ } while (false);
if (status) {
if (target != NULL) {
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;
}
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;
}
(" 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)) {
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;
}
}
break;
}
- } while (FALSE);
+ } while (false);
if (pPacket != NULL) {
HTC_FREE_CONTROL_RX(target,pPacket);
HTCStop(target);
}
- } while (FALSE);
+ } while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Exit\n"));
return status;
{
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() */
}
}
-A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
+bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
HTC_ENDPOINT_STAT_ACTION Action,
HTC_ENDPOINT_STATS *pStats)
#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;
UNLOCK_HTC_RX(target);
UNLOCK_HTC_TX(target);
- return TRUE;
+ return true;
#else
- return FALSE;
+ return false;
#endif
}
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];
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;
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);
} while (!HTC_QUEUE_EMPTY(pQueueToIndicate));
}
- } while (FALSE);
+ } while (false);
}
HTC_HOST_MAX_MSG_PER_BUNDLE) {
/* this should never happen, the target restricts the number
* of messages per bundle configured by the host */
- A_ASSERT(FALSE);
+ A_ASSERT(false);
status = A_EPROTO;
break;
}
pPacket->pBuffer += HTC_HDR_LENGTH;
pPacket->ActualLength -= HTC_HDR_LENGTH;
- } while (FALSE);
+ } while (false);
if (status) {
/* dump the whole packet */
static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
A_UINT32 NextLookAheads[],
int NumLookAheads,
- A_BOOL CheckMoreMsgs)
+ bool CheckMoreMsgs)
{
/* was there a lookahead for the next packet? */
if (NumLookAheads > 0) {
/******* at this point only 1 thread may enter ******/
- while (TRUE) {
+ while (true) {
/* transfer items from main recv queue to the local one so we can release the lock */
HTC_PACKET_QUEUE_TRANSFER_TO_TAIL(&recvCompletions, &pEndpoint->RecvIndicationQueue);
A_UINT32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
int status;
- A_BOOL checkMorePkts = TRUE;
+ bool checkMorePkts = true;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+HTCRecvCompleteHandler (pkt:0x%lX, status:%d, ep:%d) \n",
(unsigned long)pPacket, pPacket->Status, pPacket->Endpoint));
* It was fetched one message at a time. There may be other asynchronous reads queued behind this one.
* Do no issue another check for more packets since the last one in the series of requests
* will handle it */
- checkMorePkts = FALSE;
+ checkMorePkts = false;
}
DUMP_RECV_PKT_INFO(pPacket);
/* check for more recv packets before indicating */
HTCAsyncRecvCheckMorePackets(target,nextLookAheads,numLookAheads,checkMorePkts);
- } while (FALSE);
+ } while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
if (pHdr->EndpointID != ENDPOINT_0) {
/* unexpected endpoint number, should be zero */
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
if (status) {
/* bad message */
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
pPacket = HTC_ALLOC_CONTROL_RX(target);
if (pPacket == NULL) {
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
status = A_NO_MEMORY;
break;
}
pPacket->ActualLength = pHdr->PayloadLen + HTC_HDR_LENGTH;
if (pPacket->ActualLength > pPacket->BufferLength) {
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
status = A_EPROTO;
break;
}
/* give the caller this control message packet, they are responsible to free */
*ppControlPacket = pPacket;
- } while (FALSE);
+ } while (false);
if (status) {
if (pPacket != NULL) {
int i,j;
int numMessages;
int fullLength;
- A_BOOL noRecycle;
+ bool noRecycle;
/* lock RX while we assemble the packet buffers */
LOCK_HTC_RX(target);
/* reset flag, any packets allocated using the RecvAlloc() API cannot be recycled on cleanup,
* they must be explicitly returned */
- noRecycle = FALSE;
+ noRecycle = false;
if (pEndpoint->EpCallBacks.EpRecvAlloc != NULL) {
UNLOCK_HTC_RX(target);
- noRecycle = TRUE;
+ noRecycle = true;
/* user is using a per-packet allocation callback */
pPacket = pEndpoint->EpCallBacks.EpRecvAlloc(pEndpoint->EpCallBacks.pContext,
pEndpoint->Id,
INC_HTC_EP_STAT(pEndpoint,RxAllocThreshBytes,pHdr->PayloadLen);
/* threshold was hit, call the special recv allocation callback */
UNLOCK_HTC_RX(target);
- noRecycle = TRUE;
+ noRecycle = true;
/* user wants to allocate packets above a certain threshold */
pPacket = pEndpoint->EpCallBacks.EpRecvAllocThresh(pEndpoint->EpCallBacks.pContext,
pEndpoint->Id,
int numLookAheads = 0;
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
int status;
- A_BOOL partialBundle = FALSE;
+ bool partialBundle = false;
HTC_PACKET_QUEUE localRecvQueue;
- A_BOOL procError = FALSE;
+ bool procError = false;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCAsyncRecvScatterCompletion TotLen: %d Entries: %d\n",
pScatterReq->TotalLength, pScatterReq->ValidScatterEntries));
}
if (pScatterReq->CallerFlags & HTC_SCATTER_REQ_FLAGS_PARTIAL_BUNDLE) {
- partialBundle = TRUE;
+ partialBundle = true;
}
DEV_FINISH_SCATTER_OPERATION(pScatterReq);
/* recycle failed recv */
HTC_RECYCLE_RX_PKT(target, pPacket, pEndpoint);
/* set flag and continue processing the remaining scatter entries */
- procError = TRUE;
+ procError = true;
}
}
HTCAsyncRecvCheckMorePackets(target,
lookAheads,
numLookAheads,
- partialBundle ? FALSE : TRUE);
+ partialBundle ? false : true);
}
/* now drain the indication queue */
HTC_PACKET_QUEUE *pRecvPktQueue,
HTC_PACKET_QUEUE *pSyncCompletionQueue,
int *pNumPacketsFetched,
- A_BOOL PartialBundle)
+ bool PartialBundle)
{
int status = A_OK;
HIF_SCATTER_REQ *pScatterReq;
int i, totalLength;
int pktsToScatter;
HTC_PACKET *pPacket;
- A_BOOL asyncMode = (pSyncCompletionQueue == NULL) ? TRUE : FALSE;
+ bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false;
int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device);
pktsToScatter = HTC_PACKET_QUEUE_DEPTH(pRecvPktQueue);
if ((HTC_PACKET_QUEUE_DEPTH(pRecvPktQueue) - pktsToScatter) > 0) {
/* we were forced to split this bundle receive operation
* all packets in this partial bundle must have their lookaheads ignored */
- PartialBundle = TRUE;
+ PartialBundle = true;
/* this would only happen if the target ignored our max bundle limit */
AR_DEBUG_PRINTF(ATH_DEBUG_WARN,
("HTCIssueRecvPacketBundle : partial bundle detected num:%d , %d \n",
DEV_FREE_SCATTER_REQ(&target->Device, pScatterReq);
}
- } while (FALSE);
+ } while (false);
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCIssueRecvPacketBundle (status:%d) (fetched:%d) \n",
status,*pNumPacketsFetched));
}
/* callback when device layer or lookahead report parsing detects a pending message */
-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)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
int status = A_OK;
HTC_PACKET *pPacket;
HTC_ENDPOINT *pEndpoint;
- A_BOOL asyncProc = FALSE;
+ bool asyncProc = false;
A_UINT32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int pktsFetched;
HTC_PACKET_QUEUE recvPktQueue, syncCompletedPktsQueue;
- A_BOOL partialBundle;
+ bool partialBundle;
HTC_ENDPOINT_ID id;
int totalFetched = 0;
/* We use async mode to get the packets if the device layer supports it.
* The device layer interfaces with HIF in which HIF may have restrictions on
* how interrupts are processed */
- asyncProc = TRUE;
+ asyncProc = true;
}
if (pAsyncProc != NULL) {
}
if (NumLookAheads > HTC_HOST_MAX_MSG_PER_BUNDLE) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
return A_EPROTO;
}
/* on first entry copy the lookaheads into our temp array for processing */
A_MEMCPY(lookAheads, MsgLookAheads, (sizeof(A_UINT32)) * NumLookAheads);
- while (TRUE) {
+ while (true) {
/* reset packets queues */
INIT_HTC_PACKET_QUEUE(&recvPktQueue);
if (NumLookAheads > HTC_HOST_MAX_MSG_PER_BUNDLE) {
status = A_EPROTO;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
/* we've got packet buffers for all we can currently fetch,
* this count is not valid anymore */
NumLookAheads = 0;
- partialBundle = FALSE;
+ partialBundle = false;
/* now go fetch the list of HTC packets */
while (!HTC_QUEUE_EMPTY(&recvPktQueue)) {
if (HTC_PACKET_QUEUE_DEPTH(&recvPktQueue) != 0) {
/* we couldn't fetch all packets at one time, this creates a broken
* bundle */
- partialBundle = TRUE;
+ partialBundle = true;
}
}
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_ENDPOINT *pEndpoint;
- A_BOOL unblockRecv = FALSE;
+ bool unblockRecv = false;
int status = A_OK;
HTC_PACKET *pFirstPacket;
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
if (NULL == pFirstPacket) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
return A_EINVAL;
}
target->EpWaitingForBuffers));
target->RecvStateFlags &= ~HTC_RECV_WAIT_BUFFERS;
target->EpWaitingForBuffers = ENDPOINT_MAX;
- unblockRecv = TRUE;
+ unblockRecv = true;
}
}
DevEnableRecv(&target->Device,DEV_ENABLE_RECV_SYNC);
}
- } while (FALSE);
+ } while (false);
return status;
}
void HTCUnblockRecv(HTC_HANDLE HTCHandle)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- A_BOOL unblockRecv = FALSE;
+ bool unblockRecv = false;
LOCK_HTC_RX(target);
target->EpWaitingForBuffers));
target->RecvStateFlags &= ~HTC_RECV_WAIT_BUFFERS;
target->EpWaitingForBuffers = ENDPOINT_MAX;
- unblockRecv = TRUE;
+ unblockRecv = true;
}
UNLOCK_HTC_RX(target);
int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
A_UINT32 TimeoutInMs,
- A_BOOL *pbIsRecvPending)
+ bool *pbIsRecvPending)
{
int status = A_OK;
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
} while (!HTC_QUEUE_EMPTY(pQueueToIndicate));
}
- } while (FALSE);
+ } while (false);
}
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,
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 */
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;
pPacket = HTC_GET_PKT_AT_HEAD(pQueue);
if (pPacket == NULL) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
if (NULL == pPacket) {
/* can't bundle */
- done = TRUE;
+ done = true;
break;
}
}
}
- } while (FALSE);
+ } while (false);
if (result != HTC_SEND_QUEUE_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("-HTCTrySend: \n"));
/* 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;
bundlesSent = 0;
pktsInBundles = 0;
- while (TRUE) {
+ while (true) {
/* try to send a bundle on each pass */
if ((target->SendBundlingEnabled) &&
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));
for (i = 0; i < NumEntries; i++, pRpt++) {
if (pRpt->EndpointID >= ENDPOINT_MAX) {
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
break;
}
* 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
HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
/* not in use.. */
return;
}
/* 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;
}
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;
}
}
}
}
-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;
}
{
/* 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 */
/* send the message */
status = HTCIssueSend(target,pSendPacket);
- } while (FALSE);
+ } while (false);
if (pSendPacket != NULL) {
HTC_FREE_CONTROL_TX(target,pSendPacket);
pSendPacket = HTC_ALLOC_CONTROL_TX(target);
if (NULL == pSendPacket) {
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
status = A_NO_MEMORY;
break;
}
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;
}
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;
}
pEndpoint->Id = assignedEndpoint;
if (pEndpoint->ServiceID != 0) {
/* endpoint already in use! */
- AR_DEBUG_ASSERT(FALSE);
+ AR_DEBUG_ASSERT(false);
break;
}
* 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;
status = A_OK;
- } while (FALSE);
+ } while (false);
if (pSendPacket != NULL) {
HTC_FREE_CONTROL_TX(target,pSendPacket);
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 */
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))
* 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);
/*
BMIRawRead(HIF_DEVICE *device,
A_UCHAR *buffer,
A_UINT32 length,
- A_BOOL want_timeout);
+ bool want_timeout);
#ifdef __cplusplus
}
#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__ */
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);
@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.
@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);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@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
@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
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable);
+int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
#ifdef __cplusplus
}
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);
@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
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint,
- A_BOOL Active);
+ bool Active);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Get endpoint statistics
@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
@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);
@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);
void HTCDisableRecv(HTC_HANDLE HTCHandle);
int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
A_UINT32 TimeoutInMs,
- A_BOOL *pbIsRecvPending);
+ bool *pbIsRecvPending);
#ifdef __cplusplus
}
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);
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);
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);
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,
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);
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);
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
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);
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);
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);
*pLength = pRecvPacket->ActualLength;
- } while (FALSE);
+ } while (false);
if (pRecvPacket != NULL) {
A_FREE(pRecvPacket);
A_UINT8 *pBuffer = NULL;
A_UINT8 *pTemp;
int length;
- A_BOOL commandComplete = FALSE;
+ bool commandComplete = false;
A_UINT8 opCodeBytes[2];
do {
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;
}
}
pBuffer = NULL;
}
- } while (FALSE);
+ } while (false);
if (pBuffer != NULL) {
A_FREE(pBuffer);
("AR3K Config: Baud changed to %d for AR6K\n", pConfig->AR3KBaudRate));
}
- } while (FALSE);
+ } while (false);
if (pBufferToFree != NULL) {
A_FREE(pBufferToFree);
}
/* 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;
}
}
/* 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));
}
/* 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;
}
}
/* 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));
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);
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);
#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.
*/
}
}
#ifdef HCI_TRANSPORT_SDIO
- if(BDADDR == FALSE)
+ if(BDADDR == false)
if(hdev->bdaddr[0] !=0x00 ||
hdev->bdaddr[1] !=0x00 ||
hdev->bdaddr[2] !=0x00 ||
}
complete:
#ifndef HCI_TRANSPORT_SDIO
- AthEnableSyncCommandOp(FALSE);
- PSTagMode = FALSE;
+ AthEnableSyncCommandOp(false);
+ PSTagMode = false;
wake_up_interruptible(&PsCompleteEvent);
#endif /* HCI_TRANSPORT_SDIO */
if(NULL != HciCmdList) {
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;
typedef struct ST_PS_DATA_FORMAT {
enum eType eDataType;
- A_BOOL bIsArray;
+ bool bIsArray;
}ST_PS_DATA_FORMAT;
typedef struct ST_READ_STATUS {
/* 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];
{
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;
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"));
}
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){
#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)
-#define FALSE 0
-#define TRUE 1
+#define false 0
+#define true 1
#ifndef A_MALLOC
#define A_MALLOC(size) kmalloc((size),GFP_KERNEL)
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
#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;
#endif
// Workaroud END
- } while (FALSE);
+ } while (false);
if (status) {
AR_DEBUG_PRINTF(ATH_LOG_ERR, ("Failed to reset target \n"));
#endif
}
- } while (FALSE);
+ } while (false);
}
}
}
- } while (FALSE);
+ } while (false);
return status;
}
}
A_MUTEX_INIT(&g_ModuleListLock);
g_pModuleInfoHead = NULL;
- g_ModuleDebugInit = TRUE;
+ g_ModuleDebugInit = true;
A_REGISTER_MODULE_DEBUG_INFO(misc);
}
return;
}
- g_ModuleDebugInit = FALSE;
+ g_ModuleDebugInit = false;
A_MUTEX_LOCK(&g_ModuleListLock);
4);
- } while (FALSE);
+ } while (false);
return status;
}
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;
}
/* return what we can get */
credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek);
- } while (FALSE);
+ } while (false);
/* did we find some credits? */
if (credits) {
#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);
}
#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 */
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:
#define APTC_LOWER_THROUGHPUT_THRESHOLD 2000 /* Kbps */
typedef struct aptc_traffic_record {
- A_BOOL timerScheduled;
+ bool timerScheduled;
struct timeval samplingTS;
unsigned long bytesReceived;
unsigned long bytesTransmitted;
void
ar6000_dbglog_init_done(AR_SOFTC_T *ar)
{
- ar->dbglog_init_done = TRUE;
+ ar->dbglog_init_done = true;
}
A_UINT32
}
/* block out others */
- ar->dbgLogFetchInProgress = TRUE;
+ ar->dbgLogFetchInProgress = true;
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
} while (address != firstbuf);
}
- ar->dbgLogFetchInProgress = FALSE;
+ ar->dbgLogFetchInProgress = false;
return A_OK;
}
throughput = ((numbytes * 8)/APTC_TRAFFIC_SAMPLING_INTERVAL); /* Kbps */
if (throughput < APTC_LOWER_THROUGHPUT_THRESHOLD) {
/* Enable Sleep and delete the timer */
- A_ASSERT(ar->arWmiReady == TRUE);
+ A_ASSERT(ar->arWmiReady == true);
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
status = wmi_powermode_cmd(ar->arWmi, REC_POWER);
AR6000_SPIN_LOCK(&ar->arLock, 0);
A_ASSERT(status == A_OK);
- aptcTR.timerScheduled = FALSE;
+ aptcTR.timerScheduled = false;
} else {
A_TIMEOUT_MS(&aptcTimer, APTC_TRAFFIC_SAMPLING_INTERVAL, 0);
}
if (index == MAX_AR6000) return 0;
- if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, TRUE)) != A_OK) {
+ if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != A_OK) {
return 0;
}
#endif /* SOFTMAC_FILE_USED */
static int
-ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A_BOOL compressed)
+ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, bool compressed)
{
int status;
const char *filename;
ar->arVersion.target_ver));
return A_ERROR;
}
- compressed = FALSE;
+ compressed = false;
}
#ifdef CONFIG_HOST_TCMD_SUPPORT
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unknown firmware revision: %d\n", ar->arVersion.target_ver));
return A_ERROR;
}
- compressed = FALSE;
+ compressed = false;
}
#endif
#ifdef HTC_RAW_INTERFACE
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unknown firmware revision: %d\n", ar->arVersion.target_ver));
return A_ERROR;
}
- compressed = FALSE;
+ compressed = false;
}
#endif
break;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address));
/* Write EEPROM data to Target RAM */
- if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, FALSE)) != A_OK) {
+ if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != A_OK) {
return A_ERROR;
}
/* Transfer One time Programmable data */
AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
- status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, TRUE);
+ status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, true);
if (status == A_OK) {
/* Execute the OTP code */
param = 0;
/* Download Target firmware */
AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
- if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, TRUE)) != A_OK) {
+ if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != A_OK) {
return A_ERROR;
}
/* Apply the patches */
AR6K_PATCH_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver);
- if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, FALSE)) != A_OK) {
+ if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != A_OK) {
return A_ERROR;
}
ar->arDeviceIndex = device_index;
ar->arWlanPowerState = WLAN_POWER_STATE_ON;
- ar->arWlanOff = FALSE; /* We are in ON state */
+ ar->arWlanOff = false; /* We are in ON state */
#ifdef CONFIG_PM
ar->arWowState = WLAN_WOW_STATE_NONE;
- ar->arBTOff = TRUE; /* BT chip assumed to be OFF */
+ ar->arBTOff = true; /* BT chip assumed to be OFF */
ar->arBTSharing = WLAN_CONFIG_BT_SHARING;
ar->arWlanOffConfig = WLAN_CONFIG_WLAN_OFF;
ar->arSuspendConfig = WLAN_CONFIG_PM_SUSPEND;
A_INIT_TIMER(&ar->arHBChallengeResp.timer, ar6000_detect_error, dev);
ar->arHBChallengeResp.seqNum = 0;
- ar->arHBChallengeResp.outstanding = FALSE;
+ ar->arHBChallengeResp.outstanding = false;
ar->arHBChallengeResp.missCnt = 0;
ar->arHBChallengeResp.frequency = AR6000_HB_CHALLENGE_RESP_FREQ_DEFAULT;
ar->arHBChallengeResp.missThres = AR6000_HB_CHALLENGE_RESP_MISS_THRES_DEFAULT;
ar6000_init_control_info(ar);
init_waitqueue_head(&arEvent);
sema_init(&ar->arSem, 1);
- ar->bIsDestroyProgress = FALSE;
+ ar->bIsDestroyProgress = false;
INIT_HTC_PACKET_QUEUE(&ar->amsdu_rx_buffer_queue);
if (status != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000_avail: ar6000_init\n"));
}
- } while (FALSE);
+ } while (false);
if (status != A_OK) {
init_status = status;
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Instance;
WMI_TARGET_ERROR_REPORT_EVENT errEvent;
- static A_BOOL sip = FALSE;
+ static bool sip = false;
if (Status != A_OK) {
/* Report the error only once */
if (!sip) {
- sip = TRUE;
+ sip = true;
errEvent.errorVal = WMI_TARGET_COM_ERR |
WMI_TARGET_FATAL_ERR;
ar6000_send_event_to_app(ar, WMI_ERROR_REPORT_EVENTID,
}
void
-ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglogs)
+ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
netif_stop_queue(dev);
/* Disable the target and the interrupts associated with it */
- if (ar->arWmiReady == TRUE)
+ if (ar->arWmiReady == true)
{
if (!bypasswmi)
{
- if (ar->arConnected == TRUE || ar->arConnectPending == TRUE)
+ if (ar->arConnected == true || ar->arConnectPending == true)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("%s(): Disconnect\n", __func__));
if (!keepprofile) {
ar6000_dbglog_get_debug_logs(ar);
}
- ar->arWmiReady = FALSE;
+ ar->arWmiReady = false;
wmi_shutdown(ar->arWmi);
- ar->arWmiEnabled = FALSE;
+ ar->arWmiEnabled = false;
ar->arWmi = NULL;
/*
* After wmi_shudown all WMI events will be dropped.
* Sometimes disconnect_event will be received when the debug logs
* are collected.
*/
- if (ar->arConnected == TRUE || ar->arConnectPending == TRUE) {
+ if (ar->arConnected == true || ar->arConnectPending == true) {
if(ar->arNetworkType & AP_NETWORK) {
ar6000_disconnect_event(ar, DISCONNECT_CMD, bcast_mac, 0, NULL, 0);
} else {
ar6000_disconnect_event(ar, DISCONNECT_CMD, ar->arBssid, 0, NULL, 0);
}
- ar->arConnected = FALSE;
- ar->arConnectPending = FALSE;
+ ar->arConnected = false;
+ ar->arConnectPending = false;
}
#ifdef USER_KEYS
ar->user_savedkeys_stat = USER_SAVEDKEYS_STAT_INIT;
__func__, (unsigned long) ar, (unsigned long) ar->arWmi));
/* Shut down WMI if we have started it */
- if(ar->arWmiEnabled == TRUE)
+ if(ar->arWmiEnabled == true)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("%s(): Shut down WMI\n", __func__));
wmi_shutdown(ar->arWmi);
- ar->arWmiEnabled = FALSE;
+ ar->arWmiEnabled = false;
ar->arWmi = NULL;
}
}
* a debug session */
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,(" Attempting to reset target on instance destroy.... \n"));
if (ar->arHifDevice != NULL) {
- A_BOOL coldReset = (ar->arTargetType == TARGET_TYPE_AR6003) ? TRUE: FALSE;
- ar6000_reset_device(ar->arHifDevice, ar->arTargetType, TRUE, coldReset);
+ bool coldReset = (ar->arTargetType == TARGET_TYPE_AR6003) ? true: false;
+ ar6000_reset_device(ar->arHifDevice, ar->arTargetType, true, coldReset);
}
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,(" Host does not want target reset. \n"));
return;
}
- ar->bIsDestroyProgress = TRUE;
+ ar->bIsDestroyProgress = true;
if (down_interruptible(&ar->arSem)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s(): down_interruptible failed \n", __func__));
if (ar->arWlanPowerState != WLAN_POWER_STATE_CUT_PWR) {
/* only stop endpoint if we are not stop it in suspend_ev */
- ar6000_stop_endpoint(dev, FALSE, TRUE);
+ ar6000_stop_endpoint(dev, false, true);
} else {
/* clear up the platform power state before rmmod */
plat_setup_power(1,0);
/* Generate the sequence number for the next challenge */
ar->arHBChallengeResp.seqNum++;
- ar->arHBChallengeResp.outstanding = TRUE;
+ ar->arHBChallengeResp.outstanding = true;
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid));
A_MEMZERO(ar->arBssid, sizeof(ar->arBssid));
ar->arBssChannel = 0;
- ar->arConnected = FALSE;
+ ar->arConnected = false;
}
static void
ar6000_init_control_info(AR_SOFTC_T *ar)
{
- ar->arWmiEnabled = FALSE;
+ ar->arWmiEnabled = false;
ar6000_init_profile_info(ar);
ar->arDefTxKeyIndex = 0;
A_MEMZERO(ar->arWepKeyList, sizeof(ar->arWepKeyList));
ar->arVersion.host_ver = AR6K_SW_VERSION;
ar->arRssi = 0;
ar->arTxPwr = 0;
- ar->arTxPwrSet = FALSE;
+ ar->arTxPwrSet = false;
ar->arSkipScan = 0;
ar->arBeaconInterval = 0;
ar->arBitRate = 0;
ar->arMaxRetries = 0;
- ar->arWmmEnabled = TRUE;
+ ar->arWmmEnabled = true;
ar->intra_bss = 1;
ar->scan_triggered = 0;
A_MEMZERO(&ar->scParams, sizeof(ar->scParams));
#ifdef ATH6K_CONFIG_CFG80211
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 {
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
}
- if(ar->arWmiReady == TRUE) {
+ if(ar->arWmiReady == true) {
if (wmi_scanparams_cmd(ar->arWmi, 0xFFFF, 0,
0, 0, 0, 0, 0, 0, 0, 0) != A_OK) {
return -EIO;
break;
}
- } while (FALSE);
+ } while (false);
return status;
}
#endif
/* Indicate that WMI is enabled (although not ready yet) */
- ar->arWmiEnabled = TRUE;
+ ar->arWmiEnabled = true;
if ((ar->arWmi = wmi_init((void *) ar)) == NULL)
{
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s() Failed to initialize WMI.\n", __func__));
status = ar6k_setup_hci_pal(ar);
#endif
- } while (FALSE);
+ } while (false);
if (status) {
ret = -EIO;
status = HTCStart(ar->arHtcTarget);
if (status != A_OK) {
- if (ar->arWmiEnabled == TRUE) {
+ if (ar->arWmiEnabled == true) {
wmi_shutdown(ar->arWmi);
- ar->arWmiEnabled = FALSE;
+ ar->arWmiEnabled = false;
ar->arWmi = NULL;
}
ar6000_cookie_cleanup(ar);
if (!bypasswmi) {
/* Wait for Wmi event to be ready */
timeleft = wait_event_interruptible_timeout(arEvent,
- (ar->arWmiReady == TRUE), wmitimeout * HZ);
+ (ar->arWmiReady == true), wmitimeout * HZ);
if (ar->arVersion.abi_ver != AR6K_ABI_VERSION) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ABI Version mismatch: Host(0x%x), Target(0x%x)\n", AR6K_ABI_VERSION, ar->arVersion.abi_ver));
}
/* configure the device for rx dot11 header rules 0,0 are the default values
- * therefore this command can be skipped if the inputs are 0,FALSE,FALSE.Required
+ * therefore this command can be skipped if the inputs are 0,false,false.Required
if checksum offload is needed. Set RxMetaVersion to 2*/
if ((wmi_set_rx_frame_format_cmd(ar->arWmi,ar->rxMetaVersion, processDot11Hdr, processDot11Hdr)) != A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Unable to set the rx frame format.\n"));
A_UINT32 mapNo = 0;
int len;
struct ar_cookie *cookie;
- A_BOOL checkAdHocPsMapping = FALSE,bMoreData = FALSE;
+ bool checkAdHocPsMapping = false,bMoreData = false;
HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG;
A_UINT8 dot11Hdr = processDot11Hdr;
#ifdef CONFIG_PM
do {
- if (ar->arWmiReady == FALSE && bypasswmi == 0) {
+ if (ar->arWmiReady == false && bypasswmi == 0) {
break;
}
*/
if (IEEE80211_IS_MULTICAST(datap->dstMac)) {
A_UINT8 ctr=0;
- A_BOOL qMcast=FALSE;
+ bool qMcast=false;
for (ctr=0; ctr<AP_MAX_NUM_STA; ctr++) {
if (STA_IS_PWR_SLEEP((&ar->sta_list[ctr]))) {
- qMcast = TRUE;
+ qMcast = true;
}
}
if(qMcast) {
/* If this transmit is not because of a Dtim Expiry q it */
- if (ar->DTIMExpired == FALSE) {
- A_BOOL isMcastqEmpty = FALSE;
+ if (ar->DTIMExpired == false) {
+ bool isMcastqEmpty = false;
A_MUTEX_LOCK(&ar->mcastpsqLock);
isMcastqEmpty = A_NETBUF_QUEUE_EMPTY(&ar->mcastpsq);
*/
A_MUTEX_LOCK(&ar->mcastpsqLock);
if(!A_NETBUF_QUEUE_EMPTY(&ar->mcastpsq)) {
- bMoreData = TRUE;
+ bMoreData = true;
}
A_MUTEX_UNLOCK(&ar->mcastpsqLock);
}
if (STA_IS_PWR_SLEEP(conn)) {
/* If this transmit is not because of a PsPoll q it*/
if (!STA_IS_PS_POLLED(conn)) {
- A_BOOL isPsqEmpty = FALSE;
+ bool isPsqEmpty = false;
/* Queue the frames if the STA is sleeping */
A_MUTEX_LOCK(&conn->psqLock);
isPsqEmpty = A_NETBUF_QUEUE_EMPTY(&conn->psq);
*/
A_MUTEX_LOCK(&conn->psqLock);
if (!A_NETBUF_QUEUE_EMPTY(&conn->psq)) {
- bMoreData = TRUE;
+ bMoreData = true;
}
A_MUTEX_UNLOCK(&conn->psqLock);
}
if ((ar->arNetworkType == ADHOC_NETWORK) &&
ar->arIbssPsEnable && ar->arConnected) {
/* flag to check adhoc mapping once we take the lock below: */
- checkAdHocPsMapping = TRUE;
+ checkAdHocPsMapping = true;
} else {
/* get the stream mapping */
}
}
- } while (FALSE);
+ } while (false);
/* did we succeed ? */
if ((ac == AC_NOT_MAPPED) && !checkAdHocPsMapping) {
ar->arTotalTxDataPending++;
}
- } while (FALSE);
+ } while (false);
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
throughput = ((numbytes * 8) / duration);
if (throughput > APTC_UPPER_THROUGHPUT_THRESHOLD) {
/* Disable Sleep and schedule a timer */
- A_ASSERT(ar->arWmiReady == TRUE);
+ A_ASSERT(ar->arWmiReady == true);
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
status = wmi_powermode_cmd(ar->arWmi, MAX_PERF_POWER);
AR6000_SPIN_LOCK(&ar->arLock, 0);
A_TIMEOUT_MS(&aptcTimer, APTC_TRAFFIC_SAMPLING_INTERVAL, 0);
- aptcTR.timerScheduled = TRUE;
+ aptcTR.timerScheduled = true;
}
}
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP;
- A_BOOL stopNet = FALSE;
+ bool stopNet = false;
HTC_ENDPOINT_ID Endpoint = HTC_GET_ENDPOINT_FROM_PKT(pPacket);
do {
/* for endpoint ping testing drop Best Effort and Background */
if ((accessClass == WMM_AC_BE) || (accessClass == WMM_AC_BK)) {
action = HTC_SEND_FULL_DROP;
- stopNet = FALSE;
+ stopNet = false;
} else {
/* keep but stop the netqueues */
- stopNet = TRUE;
+ stopNet = true;
}
break;
}
* the only exception to this is during testing using endpointping */
AR6000_SPIN_LOCK(&ar->arLock, 0);
/* set flag to handle subsequent messages */
- ar->arWMIControlEpFull = TRUE;
+ ar->arWMIControlEpFull = true;
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("WMI Control Endpoint is FULL!!! \n"));
/* no need to stop the network */
- stopNet = FALSE;
+ stopNet = false;
break;
}
if (ar->arNetworkType == ADHOC_NETWORK) {
/* in adhoc mode, we cannot differentiate traffic priorities so there is no need to
* continue, however we should stop the network */
- stopNet = TRUE;
+ stopNet = true;
break;
}
/* the last MAX_HI_COOKIE_NUM "batch" of cookies are reserved for the highest
* HTC to drop the packet that overflowed */
action = HTC_SEND_FULL_DROP;
/* since we are dropping packets, no need to stop the network */
- stopNet = FALSE;
+ stopNet = false;
break;
}
- } while (FALSE);
+ } while (false);
if (stopNet) {
AR6000_SPIN_LOCK(&ar->arLock, 0);
- ar->arNetQueueStopped = TRUE;
+ ar->arNetQueueStopped = true;
AR6000_SPIN_UNLOCK(&ar->arLock, 0);
/* one of the data endpoints queues is getting full..need to stop network stack
* the queue will resume in ar6000_tx_complete() */
int status;
struct ar_cookie * ar_cookie;
HTC_ENDPOINT_ID eid;
- A_BOOL wakeEvent = FALSE;
+ bool wakeEvent = false;
struct sk_buff_head skb_queue;
HTC_PACKET *pPacket;
struct sk_buff *pktSkb;
- A_BOOL flushing = FALSE;
+ bool flushing = false;
skb_queue_head_init(&skb_queue);
{
if (ar->arWMIControlEpFull) {
/* since this packet completed, the WMI EP is no longer full */
- ar->arWMIControlEpFull = FALSE;
+ ar->arWMIControlEpFull = false;
}
if (ar->arTxPending[eid] == 0) {
- wakeEvent = TRUE;
+ wakeEvent = true;
}
}
if (status) {
if (status == A_ECANCELED) {
/* a packet was flushed */
- flushing = TRUE;
+ flushing = true;
}
AR6000_STAT_INC(ar, tx_errors);
if (status != A_NO_RESOURCE) {
}
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_TX,("OK\n"));
- flushing = FALSE;
+ flushing = false;
AR6000_STAT_INC(ar, tx_packets);
ar->arNetStats.tx_bytes += A_NETBUF_LEN(pktSkb);
#ifdef ADAPTIVE_POWER_THROUGHPUT_CONTROL
ar6000_free_cookie(ar, ar_cookie);
if (ar->arNetQueueStopped) {
- ar->arNetQueueStopped = FALSE;
+ ar->arNetQueueStopped = false;
}
}
A_NETBUF_FREE(pktSkb);
}
- if ((ar->arConnected == TRUE) || bypasswmi) {
+ if ((ar->arConnected == true) || bypasswmi) {
if (!flushing) {
/* don't wake the queue if we are flushing, other wise it will just
* keep queueing packets, which will keep failing */
if (status != A_OK) {
AR6000_STAT_INC(ar, rx_errors);
A_NETBUF_FREE(skb);
- } else if (ar->arWmiEnabled == TRUE) {
+ } else if (ar->arWmiEnabled == true) {
if (ept == ar->arControlEp) {
/*
* this is a wmi control msg
*/
#ifdef CONFIG_PM
- ar6000_check_wow_status(ar, skb, TRUE);
+ ar6000_check_wow_status(ar, skb, true);
#endif /* CONFIG_PM */
wmi_control_rx(ar->arWmi, skb);
} else {
WMI_DATA_HDR *dhdr = (WMI_DATA_HDR *)A_NETBUF_DATA(skb);
- A_BOOL is_amsdu;
+ bool is_amsdu;
A_UINT8 tid;
- A_BOOL is_acl_data_frame;
+ bool is_acl_data_frame;
is_acl_data_frame = WMI_DATA_HDR_GET_DATA_TYPE(dhdr) == WMI_DATA_HDR_DATA_TYPE_ACL;
#ifdef CONFIG_PM
- ar6000_check_wow_status(ar, NULL, FALSE);
+ ar6000_check_wow_status(ar, NULL, false);
#endif /* CONFIG_PM */
/*
* this is a wmi data packet
}
} else {
/* This frame is from a STA that is not associated*/
- A_ASSERT(FALSE);
+ A_ASSERT(false);
}
/* Drop NULL data frames here */
}
}
- is_amsdu = WMI_DATA_HDR_IS_AMSDU(dhdr) ? TRUE : FALSE;
+ is_amsdu = WMI_DATA_HDR_IS_AMSDU(dhdr) ? true : false;
tid = WMI_DATA_HDR_GET_UP(dhdr);
seq_no = WMI_DATA_HDR_GET_SEQNO(dhdr);
meta_type = WMI_DATA_HDR_GET_META(dhdr);
*((short *)A_NETBUF_DATA(skb)) = WMI_ACL_DATA_EVENTID;
/* send the data packet to PAL driver */
if(ar6k_pal_config_g.fpar6k_pal_recv_pkt) {
- if((*ar6k_pal_config_g.fpar6k_pal_recv_pkt)(ar->hcipal_info, skb) == TRUE)
+ if((*ar6k_pal_config_g.fpar6k_pal_recv_pkt)(ar->hcipal_info, skb) == true)
goto rx_done;
}
}
skb->dev = dev;
if ((skb->dev->flags & IFF_UP) == IFF_UP) {
#ifdef CONFIG_PM
- ar6000_check_wow_status((AR_SOFTC_T *)ar6k_priv(dev), skb, FALSE);
+ ar6000_check_wow_status((AR_SOFTC_T *)ar6k_priv(dev), skb, false);
#endif /* CONFIG_PM */
skb->protocol = eth_type_trans(skb, skb->dev);
/*
void *osBuf;
/* empty AMSDU buffer queue and free OS bufs */
- while (TRUE) {
+ while (true) {
AR6000_SPIN_LOCK(&ar->arLock, 0);
pPacket = HTC_PACKET_DEQUEUE(&ar->amsdu_rx_buffer_queue);
osBuf = pPacket->pPktContext;
if (NULL == osBuf) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
if (Length <= AR6000_BUFFER_SIZE) {
/* shouldn't be getting called on normal sized packets */
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
if (Length > AR6000_AMSDU_BUFFER_SIZE) {
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
/* set actual endpoint ID */
pPacket->Endpoint = Endpoint;
- } while (FALSE);
+ } while (false);
if (refillCount >= AR6000_AMSDU_REFILL_THRESHOLD) {
ar6000_refill_amsdu_rxbufs(ar,refillCount);
struct iw_statistics * pIwStats = &ar->arIwStats;
int rtnllocked;
- if (ar->bIsDestroyProgress || ar->arWmiReady == FALSE || ar->arWlanState == WLAN_DISABLED)
+ if (ar->bIsDestroyProgress || ar->arWmiReady == false || ar->arWlanState == WLAN_DISABLED)
{
pIwStats->status = 0;
pIwStats->qual.qual = 0;
break;
}
- ar->statsUpdatePending = TRUE;
+ ar->statsUpdatePending = true;
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
break;
}
- wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == FALSE, wmitimeout * HZ);
+ wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
if (signal_pending(current)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000 : WMI get stats timeout \n"));
break;
ar->arVersion.abi_ver = abi_ver;
/* Indicate to the waiting thread that the ready event was received */
- ar->arWmiReady = TRUE;
+ ar->arWmiReady = true;
wake_up(&arEvent);
#if WLAN_CONFIG_IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN
break;
}
skip_key:
- ar->arConnected = TRUE;
+ ar->arConnected = true;
return;
}
#ifdef USER_KEYS
if (ar->user_savedkeys_stat == USER_SAVEDKEYS_STAT_RUN &&
- ar->user_saved_keys.keyOk == TRUE)
+ ar->user_saved_keys.keyOk == true)
{
key_op_ctrl = KEY_OP_VALID_MASK & ~KEY_OP_INIT_TSC;
/* Update connect & link status atomically */
spin_lock_irqsave(&ar->arLock, flags);
- ar->arConnected = TRUE;
- ar->arConnectPending = FALSE;
+ ar->arConnected = true;
+ ar->arConnectPending = false;
netif_carrier_on(ar->arNetDev);
spin_unlock_irqrestore(&ar->arLock, flags);
/* reset the rx aggr state */
*/
if( reason == DISCONNECT_CMD)
{
- ar->arConnectPending = FALSE;
+ ar->arConnectPending = false;
if ((!ar->arUserBssFilter) && (ar->arWmiReady)) {
wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0);
}
} else {
- ar->arConnectPending = TRUE;
+ ar->arConnectPending = true;
if (((reason == ASSOC_FAILED) && (protocolReasonStatus == 0x11)) ||
((reason == ASSOC_FAILED) && (protocolReasonStatus == 0x0) && (reconnect_flag == 1))) {
- ar->arConnected = TRUE;
+ ar->arConnected = true;
return;
}
}
* Find the nodes based on SSID and remove it
* NOTE :: This case will not work out for Hidden-SSID
*/
- pWmiSsidnode = wmi_find_Ssidnode (ar->arWmi, ar->arSsid, ar->arSsidLen, FALSE, TRUE);
+ pWmiSsidnode = wmi_find_Ssidnode (ar->arWmi, ar->arSsid, ar->arSsidLen, false, true);
if (pWmiSsidnode)
{
/* Update connect & link status atomically */
spin_lock_irqsave(&ar->arLock, flags);
- ar->arConnected = FALSE;
+ ar->arConnected = false;
netif_carrier_off(ar->arNetDev);
spin_unlock_irqrestore(&ar->arLock, flags);
if(ar6k_pal_config_g.fpar6k_pal_recv_pkt)
{
/* pass the cmd packet to PAL driver */
- if((*ar6k_pal_config_g.fpar6k_pal_recv_pkt)(ar->hcipal_info, osbuf) == TRUE)
+ if((*ar6k_pal_config_g.fpar6k_pal_recv_pkt)(ar->hcipal_info, osbuf) == true)
return;
}
ar6000_deliver_frames_to_nw_stack(ar->arNetDev, osbuf);
}
void
-ar6000_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, A_BOOL ismcast)
+ar6000_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, bool ismcast)
{
static const char *tag = "MLME-MICHAELMICFAILURE.indication";
char buf[128];
pStats->arp_replied += pTarget->arpStats.arp_replied;
if (ar->statsUpdatePending) {
- ar->statsUpdatePending = FALSE;
+ ar->statsUpdatePending = false;
wake_up(&arEvent);
}
}
} else {
/* This would ignore the replys that come in after their due time */
if (cookie == ar->arHBChallengeResp.seqNum) {
- ar->arHBChallengeResp.outstanding = FALSE;
+ ar->arHBChallengeResp.outstanding = false;
}
}
}
wmiSendCmdNum++;
- } while (FALSE);
+ } while (false);
if (cookie != NULL) {
/* got a structure to send it out on */
}
/* indicate tx activity or inactivity on a WMI stream */
-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)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)devt;
HTC_ENDPOINT_ID eid ;
break;
}
if (ar->statsUpdatePending) {
- ar->statsUpdatePending = FALSE;
+ ar->statsUpdatePending = false;
wake_up(&arEvent);
}
}
A_MEMCPY(&ar->arBtcoexStats, pBtcoexStats, sizeof(WMI_BTCOEX_STATS_EVENT));
if (ar->statsUpdatePending) {
- ar->statsUpdatePending = FALSE;
+ ar->statsUpdatePending = false;
wake_up(&arEvent);
}
void ar6000_pspoll_event(AR_SOFTC_T *ar,A_UINT8 aid)
{
sta_t *conn=NULL;
- A_BOOL isPsqEmpty = FALSE;
+ bool isPsqEmpty = false;
conn = ieee80211_find_conn_for_aid(ar, aid);
void ar6000_dtimexpiry_event(AR_SOFTC_T *ar)
{
- A_BOOL isMcastQueued = FALSE;
+ bool isMcastQueued = false;
struct sk_buff *skb = NULL;
/* If there are no associated STAs, ignore the DTIM expiry event.
isMcastQueued = A_NETBUF_QUEUE_EMPTY(&ar->mcastpsq);
A_MUTEX_UNLOCK(&ar->mcastpsqLock);
- A_ASSERT(isMcastQueued == FALSE);
+ A_ASSERT(isMcastQueued == false);
/* Flush the mcast psq to the target */
/* Set the STA flag to DTIMExpired, so that the frame will go out */
- ar->DTIMExpired = TRUE;
+ ar->DTIMExpired = true;
A_MUTEX_LOCK(&ar->mcastpsqLock);
while (!A_NETBUF_QUEUE_EMPTY(&ar->mcastpsq)) {
A_MUTEX_UNLOCK(&ar->mcastpsqLock);
/* Reset the DTIMExpired flag back to 0 */
- ar->DTIMExpired = FALSE;
+ ar->DTIMExpired = false;
/* Clear the LSB of the BitMapCtl field of the TIM IE */
wmi_set_pvb_cmd(ar->arWmi, MCAST_AID, 0);
}
A_INT16
-rssi_compensation_reverse_calc(AR_SOFTC_T *ar, A_INT16 rssi, A_BOOL Above)
+rssi_compensation_reverse_calc(AR_SOFTC_T *ar, A_INT16 rssi, bool Above)
{
A_INT16 i;
p.groupCryptoLen = ar->arGroupCryptoLen;
p.ctrl_flags = ar->arConnectCtrlFlags;
- ar->arConnected = FALSE;
+ ar->arConnected = false;
wmi_ap_profile_commit(ar->arWmi, &p);
spin_lock_irqsave(&ar->arLock, flags);
- ar->arConnected = TRUE;
+ ar->arConnected = true;
netif_carrier_on(ar->arNetDev);
spin_unlock_irqrestore(&ar->arLock, flags);
ar->ap_profile_flag = 0;
/* The ssid length check prevents second "essid off" from the user,
to be treated as a connect cmd. The second "essid off" is ignored.
*/
- if((ar->arWmiReady == TRUE) && (ar->arSsidLen > 0) && ar->arNetworkType!=AP_NETWORK)
+ if((ar->arWmiReady == true) && (ar->arSsidLen > 0) && ar->arNetworkType!=AP_NETWORK)
{
int status;
if((ADHOC_NETWORK != ar->arNetworkType) &&
ar->arConnectCtrlFlags &= ~CONNECT_DO_WPA_OFFLOAD;
- ar->arConnectPending = TRUE;
+ ar->arConnectPending = true;
return status;
}
return A_ERROR;
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
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;
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"));
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"));
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) {
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) {
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));
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:
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) {
#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;
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,
}
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;
}
}
} 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) {
{
/* 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 {
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;
}
}
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)) {
}
#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);
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)) &&
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;
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;
}
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]);
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 */
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;
}
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) {
return -EIO;
}
- (ar)->arRawIfInit = TRUE;
+ (ar)->arRawIfInit = true;
return 0;
}
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();
}
}
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;
//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;
}
}
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;
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;
kfree_skb(skb);
return 0;
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
kfree_skb(skb);
return 0;
}
{
PRIN_LOG("HCI command");
- if (ar->arWmiReady == FALSE)
+ if (ar->arWmiReady == false)
{
PRIN_LOG("WMI not ready ");
break;
void *osbuf;
PRIN_LOG("ACL data");
- if (ar->arWmiReady == FALSE)
+ if (ar->arWmiReady == false)
{
PRIN_LOG("WMI not ready");
break;
}
txSkb = NULL;
}
- } while (FALSE);
+ } while (false);
if (txSkb != NULL) {
PRIN_LOG("Free skb");
PRIN_LOG("Normal mode enabled");
bt_set_bit(pHciPalInfo->ulFlags, HCI_NORMAL_MODE);
- } while (FALSE);
+ } while (false);
if (status) {
bt_cleanup_hci_pal(pHciPalInfo);
/****************************
* 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;
}
/**************************************************
* 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;
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;
}
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);
}
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;
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;
}
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])))
}
}
- 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);
}
ar->arConnectCtrlFlags &= ~CONNECT_DO_WPA_OFFLOAD;
- ar->arConnectPending = TRUE;
+ ar->arConnectPending = true;
return 0;
}
return;
}
- if (FALSE == ar->arConnected) {
+ if (false == ar->arConnected) {
/* inform connect result to cfg80211 */
cfg80211_connect_result(ar->arNetDev, bssid,
assocReqIe, assocReqLen,
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;
}
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));
}
}
}
- if(FALSE == ar->arConnected) {
+ if(false == ar->arConnected) {
if(NO_NETWORK_AVAIL == reason) {
/* connect cmd failed */
cfg80211_connect_result(ar->arNetDev, bssid,
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;
}
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;
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;
}
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;
}
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;
}
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;
}
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;
}
}
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));
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;
}
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;
}
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));
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;
}
return -EIO;
}
- if((ar->arConnected == TRUE)) {
+ if((ar->arConnected == true)) {
ar->arTxPwr = 0;
if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) {
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;
}
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;
}
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;
}
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;
}
* 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;
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;
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;
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);
/* 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"));
}
status = bt_register_hci(pHcidevInfo);
- } while (FALSE);
+ } while (false);
return status;
}
skb = NULL;
}
- } while (FALSE);
+ } while (false);
FreeHTCStruct(pHcidevInfo,pPacket);
status = A_ERROR;
}
- } while (FALSE);
+ } while (false);
if (status) {
if (pHcidevInfo != NULL) {
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;
}
kfree_skb(skb);
return 0;
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
kfree_skb(skb);
return 0;
}
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);
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);
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);
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 {
break;
default:
btType = 0;
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
("HCI Bridge: Indicated RCV of type:%d, Length:%d \n",btType,len));
}
- success = TRUE;
+ success = true;
- } while (FALSE);
+ } while (false);
return success;
}
}
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
struct ieee80211req_key ucast_ik;
struct ieee80211req_key bcast_ik;
CRYPTO_TYPE keyType;
- A_BOOL keyOk;
+ bool keyOk;
};
#endif
A_TIMER timer;
A_UINT32 frequency;
A_UINT32 seqNum;
- A_BOOL outstanding;
+ bool outstanding;
A_UINT8 missCnt;
A_UINT8 missThres;
};
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 {
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;
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;
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];
#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;
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
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
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;
#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
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
/* 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;
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);
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);
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 );
#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);
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);
* UINT32 cmd (AR6000_XIOCTL_WMI_STARTSCAN)
* UINT8 scanType
* UINT8 scanConnected
- * A_BOOL forceFgScan
+ * u32 forceFgScan
* uses: WMI_START_SCAN_CMDID
*/
* arguments:
* UINT8 cmd (AR6000_XIOCTL_WMI_GET_KEEPALIVE)
* UINT8 keepaliveInterval
- * A_BOOL configured
+ * u32 configured
* uses: WMI_GET_KEEPALIVE_CMDID
*/
A_UINT32 valid;
A_UINT16 mmask;
A_UINT16 tsr;
- A_BOOL rep;
+ u32 rep;
A_UINT16 size;
} DBGLOG_MODULE_CONFIG;
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;
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_ */
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) \
#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) */
#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
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_ROAM_CTRL_CMD cmd;
A_UINT8 size = sizeof(cmd);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_POWERSAVE_TIMERS_POLICY_CMD cmd;
A_UINT8 size = sizeof(cmd);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
}
if (cmd.status == WMI_WMM_ENABLED) {
- ar->arWmmEnabled = TRUE;
+ ar->arWmmEnabled = true;
} else {
- ar->arWmmEnabled = FALSE;
+ ar->arWmmEnabled = false;
}
ret = wmi_set_wmm_cmd(ar->arWmi, cmd.status);
if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
int ret = 0;
- if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == FALSE) {
+ if ((dev->flags & IFF_UP) != IFF_UP || ar->arWmiReady == false) {
return -EIO;
}
if ((dev->flags & IFF_UP) != IFF_UP) {
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_POWER_MODE_CMD power_mode;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_CHANNEL_PARAMS_CMD cmd, *cmdp;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SNR_THRESHOLD_PARAMS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
A_INT32 i, j;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (enablerssicompensation) {
for (i = 0; i < 6; i++)
- ar->rssi_map[i].rssi = rssi_compensation_reverse_calc(ar, ar->rssi_map[i].rssi, TRUE);
+ ar->rssi_map[i].rssi = rssi_compensation_reverse_calc(ar, ar->rssi_map[i].rssi, true);
for (i = 6; i < 12; i++)
- ar->rssi_map[i].rssi = rssi_compensation_reverse_calc(ar, ar->rssi_map[i].rssi, FALSE);
+ ar->rssi_map[i].rssi = rssi_compensation_reverse_calc(ar, ar->rssi_map[i].rssi, false);
}
cmd.thresholdAbove1_Val = ar->rssi_map[0].rssi;
WMI_LQ_THRESHOLD_PARAMS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_PROBED_SSID_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_ADD_BAD_AP_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_CREATE_PSTREAM_CMD cmd;
int ret;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_DELETE_PSTREAM_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
struct ar6000_queuereq qreq;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return -EBUSY;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_TARGET_ERROR_REPORT_BITMASK cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
TARGET_STATS *pStats = &ar->arTargetStats;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
AR6000_SPIN_LOCK(&ar->arLock, 0);
if (ar->bIsDestroyProgress) {
return -EBUSY;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (copy_from_user(&cmd, rq->ifr_data, sizeof(cmd))) {
return -EBUSY;
}
- ar->statsUpdatePending = TRUE;
+ ar->statsUpdatePending = true;
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
up(&ar->arSem);
return -EIO;
}
- wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == FALSE, wmitimeout * HZ);
+ wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
if (signal_pending(current)) {
ret = -EINTR;
WMI_AP_MODE_STAT *pStats = &ar->arAPStats;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (copy_from_user(&action, (char *)((unsigned int*)rq->ifr_data + 1),
return -ERESTARTSYS;
}
- ar->statsUpdatePending = TRUE;
+ ar->statsUpdatePending = true;
if(wmi_get_stats_cmd(ar->arWmi) != A_OK) {
up(&ar->arSem);
return -EIO;
}
- wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == FALSE, wmitimeout * HZ);
+ wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
if (signal_pending(current)) {
ret = -EINTR;
WMI_SET_ACCESS_PARAMS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_DISC_TIMEOUT_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_VOICE_PKT_SIZE_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_MAX_SP_LEN_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BT_STATUS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BT_PARAMS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_FE_ANT_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_SCO_CONFIG_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_A2DP_CONFIG_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_DEBUG_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD cmd;
int ret = 0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (ar->bIsDestroyProgress) {
return -EBUSY;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
if (copy_from_user(&btcoexConfig.configCmd, userdata, sizeof(AR6000_BTCOEX_CONFIG))) {
return -EIO;
}
- ar->statsUpdatePending = TRUE;
+ ar->statsUpdatePending = true;
- wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == FALSE, wmitimeout * HZ);
+ wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
if (signal_pending(current)) {
ret = -EINTR;
if (ar->bIsDestroyProgress) {
return -EBUSY;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return -EIO;
}
- ar->statsUpdatePending = TRUE;
+ ar->statsUpdatePending = true;
- wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == FALSE, wmitimeout * HZ);
+ wait_event_interruptible_timeout(arEvent, ar->statsUpdatePending == false, wmitimeout * HZ);
if (signal_pending(current)) {
ret = -EINTR;
struct ar6000_gpio_intr_wait_cmd_s gpio_intr_results;
/* gpio_reg_results and gpio_data_available are protected by arSem */
static struct ar6000_gpio_register_cmd_s gpio_reg_results;
-static A_BOOL gpio_data_available; /* Requested GPIO data available */
-static A_BOOL gpio_intr_available; /* GPIO interrupt info available */
-static A_BOOL gpio_ack_received; /* GPIO ack was received */
+static bool gpio_data_available; /* Requested GPIO data available */
+static bool gpio_intr_available; /* GPIO interrupt info available */
+static bool gpio_ack_received; /* GPIO ack was received */
/* Host-side initialization for General Purpose I/O support */
void ar6000_gpio_init(void)
{
- gpio_intr_available = FALSE;
- gpio_data_available = FALSE;
- gpio_ack_received = FALSE;
+ gpio_intr_available = false;
+ gpio_data_available = false;
+ gpio_ack_received = false;
}
/*
{
gpio_intr_results.intr_mask = intr_mask;
gpio_intr_results.input_values = input_values;
- *((volatile A_BOOL *)&gpio_intr_available) = TRUE;
+ *((volatile bool *)&gpio_intr_available) = true;
wake_up(&arEvent);
}
{
gpio_reg_results.gpioreg_id = reg_id;
gpio_reg_results.value = value;
- *((volatile A_BOOL *)&gpio_data_available) = TRUE;
+ *((volatile bool *)&gpio_data_available) = true;
wake_up(&arEvent);
}
void
ar6000_gpio_ack_rx(void)
{
- gpio_ack_received = TRUE;
+ gpio_ack_received = true;
wake_up(&arEvent);
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- gpio_ack_received = FALSE;
+ gpio_ack_received = false;
return wmi_gpio_output_set(ar->arWmi,
set_mask, clear_mask, enable_mask, disable_mask);
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- *((volatile A_BOOL *)&gpio_data_available) = FALSE;
+ *((volatile bool *)&gpio_data_available) = false;
return wmi_gpio_input_get(ar->arWmi);
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- gpio_ack_received = FALSE;
+ gpio_ack_received = false;
return wmi_gpio_register_set(ar->arWmi, gpioreg_id, value);
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- *((volatile A_BOOL *)&gpio_data_available) = FALSE;
+ *((volatile bool *)&gpio_data_available) = false;
return wmi_gpio_register_get(ar->arWmi, gpioreg_id);
}
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- gpio_intr_available = FALSE;
+ gpio_intr_available = false;
return wmi_gpio_intr_ack(ar->arWmi, ack_mask);
}
#endif /* CONFIG_HOST_GPIO_SUPPORT */
#if defined(CONFIG_TARGET_PROFILE_SUPPORT)
static struct prof_count_s prof_count_results;
-static A_BOOL prof_count_available; /* Requested GPIO data available */
+static bool prof_count_available; /* Requested GPIO data available */
static int
prof_count_get(struct net_device *dev)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- *((volatile A_BOOL *)&prof_count_available) = FALSE;
+ *((volatile bool *)&prof_count_available) = false;
return wmi_prof_count_get_cmd(ar->arWmi);
}
{
prof_count_results.addr = addr;
prof_count_results.count = count;
- *((volatile A_BOOL *)&prof_count_available) = TRUE;
+ *((volatile bool *)&prof_count_available) = true;
wake_up(&arEvent);
}
#endif /* CONFIG_TARGET_PROFILE_SUPPORT */
ret = A_EFAULT;
break;
}
- } while(FALSE);
+ } while(false);
if (ret == A_OK) {
*p_osbuf = osbuf;
int
ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value)
{
- A_BOOL profChanged = FALSE;
+ bool profChanged = false;
int ret=0;
if(ar->arNextMode == AP_NETWORK) {
switch (value) {
case WPA_MODE_WPA1:
ar->arAuthMode = WPA_AUTH;
- profChanged = TRUE;
+ profChanged = true;
break;
case WPA_MODE_WPA2:
ar->arAuthMode = WPA2_AUTH;
- profChanged = TRUE;
+ profChanged = true;
break;
case WPA_MODE_NONE:
ar->arAuthMode = NONE_AUTH;
- profChanged = TRUE;
+ profChanged = true;
break;
}
break;
case IEEE80211_AUTH_WPA_PSK:
if (WPA_AUTH == ar->arAuthMode) {
ar->arAuthMode = WPA_PSK_AUTH;
- profChanged = TRUE;
+ profChanged = true;
} else if (WPA2_AUTH == ar->arAuthMode) {
ar->arAuthMode = WPA2_PSK_AUTH;
- profChanged = TRUE;
+ profChanged = true;
} else {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Error - Setting PSK "\
"mode when WPA param was set to %d\n",
switch (value) {
case IEEE80211_CIPHER_AES_CCM:
ar->arPairwiseCrypto = AES_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_TKIP:
ar->arPairwiseCrypto = TKIP_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_WEP:
ar->arPairwiseCrypto = WEP_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_NONE:
ar->arPairwiseCrypto = NONE_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
}
break;
switch (value) {
case IEEE80211_CIPHER_AES_CCM:
ar->arGroupCrypto = AES_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_TKIP:
ar->arGroupCrypto = TKIP_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_WEP:
ar->arGroupCrypto = WEP_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
case IEEE80211_CIPHER_NONE:
ar->arGroupCrypto = NONE_CRYPT;
- profChanged = TRUE;
+ profChanged = true;
break;
}
break;
}
break;
case IEEE80211_PARAM_COUNTERMEASURES:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
wmi_set_tkip_countermeasures_cmd(ar->arWmi, value);
default:
break;
}
- if ((ar->arNextMode != AP_NETWORK) && (profChanged == TRUE)) {
+ if ((ar->arNextMode != AP_NETWORK) && (profChanged == true)) {
/*
* profile has changed. Erase ssid to signal change
*/
CRYPTO_TYPE keyType = NONE_CRYPT;
#ifdef USER_KEYS
- ar->user_saved_keys.keyOk = FALSE;
+ ar->user_saved_keys.keyOk = false;
#endif
if ( (0 == memcmp(ik->ik_macaddr, null_mac, IEEE80211_ADDR_LEN)) ||
(0 == memcmp(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN)) ) {
}
#ifdef USER_KEYS
- ar->user_saved_keys.keyOk = TRUE;
+ ar->user_saved_keys.keyOk = true;
#endif
return 0;
{
int param, value;
int *ptr = (int *)rq->ifr_ifru.ifru_newname;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else {
param = *ptr++;
case IEEE80211_IOCTL_SETKEY:
{
struct ieee80211req_key keydata;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&keydata, userdata,
sizeof(struct ieee80211req_key))) {
case IEEE80211_IOCTL_SETMLME:
{
struct ieee80211req_mlme mlme;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&mlme, userdata,
sizeof(struct ieee80211req_mlme))) {
case IEEE80211_IOCTL_ADDPMKID:
{
struct ieee80211req_addpmkid req;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&req, userdata, sizeof(struct ieee80211req_addpmkid))) {
ret = -EFAULT;
case AR6000_XIOCTL_HTC_RAW_CLOSE:
if (arRawIfEnabled(ar)) {
ret = ar6000_htc_raw_close(ar);
- arRawIfEnabled(ar) = FALSE;
+ arRawIfEnabled(ar) = false;
} else {
ret = A_ERROR;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
goto ioctl_done;
}
- prof_count_available = FALSE;
+ prof_count_available = false;
ret = prof_count_get(dev);
if (ret != A_OK) {
up(&ar->arSem);
{
WMI_POWER_MODE_CMD pwrModeCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&pwrModeCmd, userdata,
sizeof(pwrModeCmd)))
{
WMI_IBSS_PM_CAPS_CMD ibssPmCaps;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&ibssPmCaps, userdata,
sizeof(ibssPmCaps)))
{
WMI_AP_PS_CMD apPsCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&apPsCmd, userdata,
sizeof(apPsCmd)))
{
WMI_POWER_PARAMS_CMD pmParams;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&pmParams, userdata,
sizeof(pmParams)))
}
case AR6000_IOCTL_WMI_SETSCAN:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&ar->scParams, userdata,
sizeof(ar->scParams)))
ret = -EFAULT;
} else {
if (CAN_SCAN_IN_CONNECT(ar->scParams.scanCtrlFlags)) {
- ar->arSkipScan = FALSE;
+ ar->arSkipScan = false;
} else {
- ar->arSkipScan = TRUE;
+ ar->arSkipScan = true;
}
if (wmi_scanparams_cmd(ar->arWmi, ar->scParams.fg_start_period,
{
WMI_LISTEN_INT_CMD listenCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&listenCmd, userdata,
sizeof(listenCmd)))
{
WMI_BMISS_TIME_CMD bmissCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&bmissCmd, userdata,
sizeof(bmissCmd)))
{
WMI_BSS_FILTER_CMD filt;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&filt, userdata,
sizeof(filt)))
}
case AR6000_XIOCTL_WMI_CLR_RSSISNR:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
}
ret = wmi_clr_rssi_snr(ar->arWmi);
{
WMI_SET_LPREAMBLE_CMD setLpreambleCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setLpreambleCmd, userdata,
sizeof(setLpreambleCmd)))
case AR6000_XIOCTL_WMI_SET_RTS:
{
WMI_SET_RTS_CMD rtsCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&rtsCmd, userdata,
sizeof(rtsCmd)))
WMI_SET_ASSOC_INFO_CMD cmd;
A_UINT8 assocInfo[WMI_MAX_ASSOC_INFO_LEN];
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
break;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
{
WMI_SET_ADHOC_BSSID_CMD adhocBssid;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&adhocBssid, userdata,
sizeof(adhocBssid)))
WMI_SET_OPT_MODE_CMD optModeCmd;
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&optModeCmd, userdata,
sizeof(optModeCmd)))
WMI_OPT_TX_FRAME_CMD optTxFrmCmd;
A_UINT8 data[MAX_OPT_DATA_LEN];
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&optTxFrmCmd, userdata,
sizeof(optTxFrmCmd)))
{
WMI_SET_RETRY_LIMITS_CMD setRetryParams;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setRetryParams, userdata,
sizeof(setRetryParams)))
{
WMI_BEACON_INT_CMD bIntvlCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&bIntvlCmd, userdata,
sizeof(bIntvlCmd)))
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
struct ieee80211req_authalg req;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&req, userdata,
sizeof(struct ieee80211req_authalg)))
{
WMI_START_SCAN_CMD setStartScanCmd, *cmdp;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setStartScanCmd, userdata,
sizeof(setStartScanCmd)))
WMI_FIX_RATES_CMD setFixRatesCmd;
int returnStatus;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setFixRatesCmd, userdata,
sizeof(setFixRatesCmd)))
ret = -EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
{
WMI_SET_AUTH_MODE_CMD setAuthMode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setAuthMode, userdata,
sizeof(setAuthMode)))
{
WMI_SET_REASSOC_MODE_CMD setReassocMode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setReassocMode, userdata,
sizeof(setReassocMode)))
case AR6000_XIOCTL_WMI_SET_KEEPALIVE:
{
WMI_SET_KEEPALIVE_CMD setKeepAlive;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&setKeepAlive, userdata,
case AR6000_XIOCTL_WMI_SET_PARAMS:
{
WMI_SET_PARAMS_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&cmd, userdata,
case AR6000_XIOCTL_WMI_SET_MCAST_FILTER:
{
WMI_SET_MCAST_FILTER_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&cmd, userdata,
case AR6000_XIOCTL_WMI_DEL_MCAST_FILTER:
{
WMI_SET_MCAST_FILTER_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&cmd, userdata,
case AR6000_XIOCTL_WMI_MCAST_FILTER:
{
WMI_MCAST_FILTER_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&cmd, userdata,
ret =-EBUSY;
goto ioctl_done;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
A_UINT8 appIeInfo[IEEE80211_APPIE_FRAME_MAX_LEN];
A_UINT32 fType,ieLen;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
}
{
A_UINT32 wsc_status;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
goto ioctl_done;
} else if (copy_from_user(&wsc_status, userdata, sizeof(A_UINT32)))
{
WMI_SET_IP_CMD setIP;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setIP, userdata,
sizeof(setIP)))
{
WMI_SET_HOST_SLEEP_MODE_CMD setHostSleepMode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setHostSleepMode, userdata,
sizeof(setHostSleepMode)))
{
WMI_SET_WOW_MODE_CMD setWowMode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&setWowMode, userdata,
sizeof(setWowMode)))
{
WMI_GET_WOW_LIST_CMD getWowList;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&getWowList, userdata,
sizeof(getWowList)))
A_UINT8 pattern_data[WOW_PATTERN_SIZE]={0};
do {
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
break;
}
{
ret = -EIO;
}
- } while(FALSE);
+ } while(false);
#undef WOW_PATTERN_SIZE
#undef WOW_MASK_SIZE
break;
{
WMI_DEL_WOW_PATTERN_CMD delWowPattern;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&delWowPattern, userdata,
sizeof(delWowPattern)))
* change using the stream ID as the traffic class */
ar6000_indicate_tx_activity(ar,
(A_UINT8)data.StreamID,
- data.Active ? TRUE : FALSE);
+ data.Active ? true : false);
}
break;
case AR6000_XIOCTL_WMI_SET_CONNECT_CTRL_FLAGS:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&connectCtrlFlags, userdata,
sizeof(connectCtrlFlags)))
}
break;
case AR6000_XIOCTL_WMI_SET_AKMP_PARAMS:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&akmpParams, userdata,
sizeof(WMI_SET_AKMP_PARAMS_CMD)))
}
break;
case AR6000_XIOCTL_WMI_SET_PMKID_LIST:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else {
if (copy_from_user(&pmkidInfo.numPMKID, userdata,
}
break;
case AR6000_XIOCTL_WMI_GET_PMKID_LIST:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else {
if (wmi_get_pmkid_list_cmd(ar->arWmi) != A_OK) {
}
break;
case AR6000_XIOCTL_WMI_ABORT_SCAN:
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
}
ret = wmi_abort_scan_cmd(ar->arWmi);
case AR6000_XIOCTL_AP_HIDDEN_SSID:
{
A_UINT8 hidden_ssid;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&hidden_ssid, userdata, sizeof(hidden_ssid))) {
ret = -EFAULT;
}
case AR6000_XIOCTL_AP_GET_STA_LIST:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else {
A_UINT8 i;
case AR6000_XIOCTL_AP_SET_NUM_STA:
{
A_UINT8 num_sta;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&num_sta, userdata, sizeof(num_sta))) {
ret = -EFAULT;
case AR6000_XIOCTL_AP_SET_ACL_POLICY:
{
A_UINT8 policy;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&policy, userdata, sizeof(policy))) {
ret = -EFAULT;
case AR6000_XIOCTL_AP_SET_ACL_MAC:
{
WMI_AP_ACL_MAC_CMD acl;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&acl, userdata, sizeof(acl))) {
ret = -EFAULT;
}
case AR6000_XIOCTL_AP_GET_ACL_LIST:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_AP_ACL *)rq->ifr_data, &ar->g_acl,
sizeof(WMI_AP_ACL))) {
case IEEE80211_IOCTL_GETWPAIE:
{
struct ieee80211req_wpaie wpaie;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&wpaie, userdata, sizeof(wpaie))) {
ret = -EFAULT;
case AR6000_XIOCTL_AP_CONN_INACT_TIME:
{
A_UINT32 period;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&period, userdata, sizeof(period))) {
ret = -EFAULT;
case AR6000_XIOCTL_AP_PROT_SCAN_TIME:
{
WMI_AP_PROT_SCAN_TIME_CMD bgscan;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&bgscan, userdata, sizeof(bgscan))) {
ret = -EFAULT;
case AR6000_XIOCTL_AP_SET_DTIM:
{
WMI_AP_SET_DTIM_CMD d;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&d, userdata, sizeof(d))) {
ret = -EFAULT;
{
WMI_SET_TARGET_EVENT_REPORT_CMD evtCfgCmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
}
if (copy_from_user(&evtCfgCmd, userdata,
case AR6000_XIOCTL_AP_INTRA_BSS_COMM:
{
A_UINT8 intra=0;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&intra, userdata, sizeof(intra))) {
ret = -EFAULT;
{
WMI_ADDBA_REQ_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
ret = -EFAULT;
{
WMI_DELBA_REQ_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
ret = -EFAULT;
{
WMI_ALLOW_AGGR_CMD cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
ret = -EFAULT;
case AR6000_XIOCTL_SET_HT_CAP:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&htCap, userdata,
sizeof(htCap)))
}
case AR6000_XIOCTL_SET_HT_OP:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&htOp, userdata,
sizeof(htOp)))
case AR6000_XIOCTL_ACL_DATA:
{
void *osbuf = NULL;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (ar6000_create_acl_data_osbuf(dev, (A_UINT8*)userdata, &osbuf) != A_OK) {
ret = -EIO;
A_UINT8 size;
size = sizeof(cmd->cmd_buf_sz);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(cmd, userdata, size)) {
ret = -EFAULT;
case AR6000_XIOCTL_WLAN_CONN_PRECEDENCE:
{
WMI_SET_BT_WLAN_CONN_PRECEDENCE cmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&cmd, userdata, sizeof(cmd))) {
ret = -EFAULT;
{
WMI_SET_TX_SELECT_RATES_CMD masks;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&masks, userdata,
sizeof(masks)))
WMI_AP_HIDDEN_SSID_CMD ssid;
ssid.hidden_ssid = ar->ap_hidden_ssid;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_AP_HIDDEN_SSID_CMD *)rq->ifr_data,
&ssid, sizeof(WMI_AP_HIDDEN_SSID_CMD))) {
WMI_AP_SET_COUNTRY_CMD cty;
A_MEMCPY(cty.countryCode, ar->ap_country_code, 3);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_AP_SET_COUNTRY_CMD *)rq->ifr_data,
&cty, sizeof(WMI_AP_SET_COUNTRY_CMD))) {
}
case AR6000_XIOCTL_AP_GET_WMODE:
{
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((A_UINT8 *)rq->ifr_data,
&ar->ap_wmode, sizeof(A_UINT8))) {
WMI_AP_SET_DTIM_CMD dtim;
dtim.dtim = ar->ap_dtim_period;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_AP_SET_DTIM_CMD *)rq->ifr_data,
&dtim, sizeof(WMI_AP_SET_DTIM_CMD))) {
WMI_BEACON_INT_CMD bi;
bi.beaconInterval = ar->ap_beacon_interval;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_BEACON_INT_CMD *)rq->ifr_data,
&bi, sizeof(WMI_BEACON_INT_CMD))) {
WMI_SET_RTS_CMD rts;
rts.threshold = ar->arRTS;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if(copy_to_user((WMI_SET_RTS_CMD *)rq->ifr_data,
&rts, sizeof(WMI_SET_RTS_CMD))) {
case AR6000_XIOCTL_AP_SET_11BG_RATESET:
{
WMI_AP_SET_11BG_RATESET_CMD rate;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&rate, userdata, sizeof(rate))) {
ret = -EFAULT;
{
WMI_SET_TX_SGI_PARAM_CMD SGICmd;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
ret = -EIO;
} else if (copy_from_user(&SGICmd, userdata,
sizeof(SGICmd))){
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
and we cannot scan during connect.
*/
if (data->flags) {
- if (ar->arSkipScan == TRUE &&
+ if (ar->arSkipScan == true &&
(ar->arChannelHint == 0 ||
(!ar->arReqBssid[0] && !ar->arReqBssid[1] && !ar->arReqBssid[2] &&
!ar->arReqBssid[3] && !ar->arReqBssid[4] && !ar->arReqBssid[5])))
* (2) essid off has been issued
*
*/
- if (ar->arWmiReady == TRUE) {
+ if (ar->arWmiReady == true) {
reconnect_flag = 0;
status = wmi_setPmkid_cmd(ar->arWmi, ar->arBssid, NULL, 0);
status = wmi_disconnect_cmd(ar->arWmi);
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));
}
if (!data->flags) {
* a reconnect cmd. Issue a reconnect only we are already
* connected.
*/
- if((ar->arConnected == TRUE) && (ar->arWmiReady == TRUE))
+ if((ar->arConnected == true) && (ar->arWmiReady == true))
{
- reconnect_flag = TRUE;
+ reconnect_flag = true;
status = wmi_reconnect_cmd(ar->arWmi,ar->arReqBssid,
ar->arChannelHint);
up(&ar->arSem);
return -EINVAL;
}
ar->arBitRate = kbps;
- if(ar->arWmiReady == TRUE)
+ if(ar->arWmiReady == true)
{
if (wmi_set_bitrate_cmd(ar->arWmi, kbps, -1, -1) != A_OK) {
return -EINVAL;
return -EIO;
}
- if ((ar->arNextMode != AP_NETWORK && !ar->arConnected) || ar->arWmiReady == FALSE) {
+ if ((ar->arNextMode != AP_NETWORK && !ar->arConnected) || ar->arWmiReady == false) {
rrq->value = 1000 * 1000;
return 0;
}
connected - return the value stored in the device structure */
if (!ret) {
if (ar->arBitRate == -1) {
- rrq->fixed = TRUE;
+ rrq->fixed = true;
rrq->value = 0;
} else {
rrq->value = ar->arBitRate * 1000;
return -EOPNOTSUPP;
}
ar->arTxPwr= dbM = rrq->value;
- ar->arTxPwrSet = TRUE;
+ ar->arTxPwrSet = true;
} else {
ar->arTxPwr = dbM = 0;
- ar->arTxPwrSet = FALSE;
+ ar->arTxPwrSet = false;
}
- if(ar->arWmiReady == TRUE)
+ if(ar->arWmiReady == true)
{
AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_TX,("Set tx pwr cmd %d dbM\n", dbM));
wmi_set_txPwr_cmd(ar->arWmi, dbM);
return -EBUSY;
}
- if((ar->arWmiReady == TRUE) && (ar->arConnected == TRUE))
+ if((ar->arWmiReady == true) && (ar->arConnected == true))
{
ar->arTxPwr = 0;
then return value stored in the device structure */
if (!ret) {
- if (ar->arTxPwrSet == TRUE) {
- rrq->fixed = TRUE;
+ if (ar->arTxPwrSet == true) {
+ rrq->fixed = true;
}
rrq->value = ar->arTxPwr;
rrq->flags = IW_TXPOW_DBM;
if ( !(rrq->value >= WMI_MIN_RETRIES) || !(rrq->value <= WMI_MAX_RETRIES)) {
return - EINVAL;
}
- if(ar->arWmiReady == TRUE)
+ if(ar->arWmiReady == true)
{
if (wmi_set_retry_limits_cmd(ar->arWmi, DATA_FRAMETYPE, WMM_AC_BE,
rrq->value, 0) != A_OK){
A_UINT8 wapi_ie[128];
#endif
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
#ifdef WAPI_ENABLE
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
erq->length = 0;
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
- A_BOOL profChanged;
+ bool profChanged;
A_UINT16 param;
A_INT32 ret;
A_INT32 value;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
param = data->flags & IW_AUTH_INDEX;
value = data->value;
- profChanged = TRUE;
+ profChanged = true;
ret = 0;
switch (param) {
ar->arAuthMode = WPA2_AUTH;
} else {
ret = -1;
- profChanged = FALSE;
+ profChanged = false;
}
break;
case IW_AUTH_CIPHER_PAIRWISE:
ar->arPairwiseCryptoLen = 13;
} else {
ret = -1;
- profChanged = FALSE;
+ profChanged = false;
}
break;
case IW_AUTH_CIPHER_GROUP:
ar->arGroupCryptoLen = 13;
} else {
ret = -1;
- profChanged = FALSE;
+ profChanged = false;
}
break;
case IW_AUTH_KEY_MGMT:
break;
case IW_AUTH_TKIP_COUNTERMEASURES:
wmi_set_tkip_countermeasures_cmd(ar->arWmi, value);
- profChanged = FALSE;
+ profChanged = false;
break;
case IW_AUTH_DROP_UNENCRYPTED:
- profChanged = FALSE;
+ profChanged = false;
break;
case IW_AUTH_80211_AUTH_ALG:
ar->arDot11AuthMode = 0;
}
if(ar->arDot11AuthMode == 0) {
ret = -1;
- profChanged = FALSE;
+ profChanged = false;
}
break;
case IW_AUTH_WPA_ENABLED:
}
break;
case IW_AUTH_RX_UNENCRYPTED_EAPOL:
- profChanged = FALSE;
+ profChanged = false;
break;
case IW_AUTH_ROAMING_CONTROL:
- profChanged = FALSE;
+ profChanged = false;
break;
case IW_AUTH_PRIVACY_INVOKED:
if (!value) {
#endif
default:
ret = -1;
- profChanged = FALSE;
+ profChanged = false;
break;
}
- if (profChanged == TRUE) {
+ if (profChanged == true) {
/*
* profile has changed. Erase ssid to signal change
*/
A_UINT16 param;
A_INT32 ret;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
pmksa = (struct iw_pmksa *)extra;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
switch (pmksa->cmd) {
case IW_PMKSA_ADD:
- status = wmi_setPmkid_cmd(ar->arWmi, (A_UINT8*)pmksa->bssid.sa_data, pmksa->pmkid, TRUE);
+ status = wmi_setPmkid_cmd(ar->arWmi, (A_UINT8*)pmksa->bssid.sa_data, pmksa->pmkid, true);
break;
case IW_PMKSA_REMOVE:
- status = wmi_setPmkid_cmd(ar->arWmi, (A_UINT8*)pmksa->bssid.sa_data, pmksa->pmkid, FALSE);
+ status = wmi_setPmkid_cmd(ar->arWmi, (A_UINT8*)pmksa->bssid.sa_data, pmksa->pmkid, false);
break;
case IW_PMKSA_FLUSH:
- if (ar->arConnected == TRUE) {
+ if (ar->arConnected == true) {
status = wmi_setPmkid_cmd(ar->arWmi, ar->arBssid, NULL, 0);
}
break;
}
#ifdef USER_KEYS
- ar->user_saved_keys.keyOk = FALSE;
+ ar->user_saved_keys.keyOk = false;
#endif /* USER_KEYS */
index = erq->flags & IW_ENCODE_INDEX;
memcpy(&ar->user_saved_keys.ucast_ik, &ik,
sizeof(struct ieee80211req_key));
}
- ar->user_saved_keys.keyOk = TRUE;
+ ar->user_saved_keys.keyOk = true;
#endif /* USER_KEYS */
}
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_POWER_MODE power_mode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev);
WMI_POWER_MODE power_mode;
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return -EINVAL;
}
} else {
- if (ar->arConnected != TRUE) {
+ if (ar->arConnected != true) {
return -EINVAL;
} else {
freq->m = ar->arBssChannel * 100000;
/*
* clear SSID during mode switch in connected state
*/
- if(!(ar->arNetworkType == (((*mode) == IW_MODE_INFRA) ? INFRA_NETWORK : ADHOC_NETWORK)) && (ar->arConnected == TRUE) ){
+ if(!(ar->arNetworkType == (((*mode) == IW_MODE_INFRA) ? INFRA_NETWORK : ADHOC_NETWORK)) && (ar->arConnected == true) ){
A_MEMZERO(ar->arSsid, sizeof(ar->arSsid));
ar->arSsidLen = 0;
}
return -EBUSY;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return 0;
}
- if (ar->arConnected != TRUE) {
+ if (ar->arConnected != true) {
return -EINVAL;
}
return -EIO;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
case IW_MLME_DEAUTH:
/* fall through */
case IW_MLME_DISASSOC:
- if ((ar->arConnected != TRUE) ||
+ if ((ar->arConnected != true) ||
(memcmp(ar->arBssid, mlme.addr.sa_data, 6) != 0)) {
up(&ar->arSem);
wmi_disconnect_cmd(ar->arWmi);
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));
}
break;
return -EOPNOTSUPP;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
return -EIO;
if (wmi_probedSsid_cmd(ar->arWmi, 1, SPECIFIC_SSID_FLAG, req.essid_len, req.essid) != A_OK)
return -EIO;
- ar->scanSpecificSsid = TRUE;
+ ar->scanSpecificSsid = true;
}
else
{
if (ar->scanSpecificSsid) {
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK)
return -EIO;
- ar->scanSpecificSsid = FALSE;
+ ar->scanSpecificSsid = false;
}
}
}
if (ar->scanSpecificSsid) {
if (wmi_probedSsid_cmd(ar->arWmi, 1, DISABLE_SSID_FLAG, 0, NULL) != A_OK)
return -EIO;
- ar->scanSpecificSsid = FALSE;
+ ar->scanSpecificSsid = false;
}
}
#endif
#endif /* ANDROID_ENV */
- if (wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, FALSE, FALSE, \
+ if (wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, false, false, \
0, 0, 0, NULL) != A_OK) {
ret = -EIO;
}
return -EOPNOTSUPP;
}
- if (ar->arWmiReady == FALSE) {
+ if (ar->arWmiReady == false) {
return -EIO;
}
* update the host driver association state for the STA|IBSS mode.
*/
if (ar->arNetworkType != AP_NETWORK && ar->arNextMode == AP_NETWORK) {
- ar->arConnectPending = FALSE;
- ar->arConnected = FALSE;
+ ar->arConnectPending = false;
+ ar->arConnected = false;
/* Stop getting pkts from upper stack */
netif_stop_queue(ar->arNetDev);
A_MEMZERO(ar->arBssid, sizeof(ar->arBssid));
typedef struct {
void *osbuf;
- A_BOOL is_amsdu;
+ bool is_amsdu;
A_UINT16 seq_no;
}OSBUF_HOLD_Q;
#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 */
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;
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");
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;
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++) {
A_ASSERT(0);
}
- rxtid->aggr = TRUE;
+ rxtid->aggr = true;
}
void
}
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;
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;
}
}
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
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;
}
}
}
#ifdef THREAD_X
if (!nt->isTimerArmed) {
A_TIMEOUT_MS(&nt->nt_inact_timer, timeoutValue, 0);
- nt->isTimerArmed = TRUE;
+ nt->isTimerArmed = true;
}
#endif
#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;
{
#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);
{
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;
* 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;
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;
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;
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);
case IEEE80211_ELEMID_SSID:
if (!elemid_ssid) {
cie->ie_ssid = frm;
- elemid_ssid = TRUE;
+ elemid_ssid = true;
}
break;
case IEEE80211_ELEMID_RATES:
static int
wmi_lqThresholdEvent_rx(struct wmi_t *wmip, A_UINT8 *datap, int len);
-static A_BOOL
+static bool
wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex);
static int
static A_INT16 rssi_event_value = 0;
static A_INT16 snr_event_value = 0;
-A_BOOL is_probe_ssid = FALSE;
+bool is_probe_ssid = false;
void *
wmi_init(void *devt)
/* Adds a WMI data header */
int
-wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, A_BOOL bMoreData,
+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)
{
WMI_DATA_HDR *dtHdr;
}
-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 *datap;
A_UINT8 trafficClass = WMM_AC_BE;
return A_EINVAL;
}
A_DPRINTF(DBG_WMI, (DBGFMT "Enter\n", DBGARG));
- wmip->wmi_ready = TRUE;
+ wmip->wmi_ready = true;
A_WMI_READY_EVENT(wmip->wmi_devt, ev->macaddr, ev->phyCapability,
ev->sw_version, ev->abi_version);
{
if(iswmmparam (pie))
{
- wmip->wmi_is_wmm_enabled = TRUE;
+ wmip->wmi_is_wmm_enabled = true;
}
}
break;
A_MEMZERO(wmip->wmi_bssid, sizeof(wmip->wmi_bssid));
- wmip->wmi_is_wmm_enabled = FALSE;
+ wmip->wmi_is_wmm_enabled = false;
wmip->wmi_pair_crypto_type = NONE_CRYPT;
wmip->wmi_grp_crypto_type = NONE_CRYPT;
/* In case of hidden AP, beacon will not have ssid,
* but a directed probe response will have it,
* so cache the probe-resp-ssid if already present. */
- if ((TRUE == is_probe_ssid) && (BEACON_FTYPE == bih->frameType))
+ if ((true == is_probe_ssid) && (BEACON_FTYPE == bih->frameType))
{
A_UCHAR *ie_ssid;
beacon_ssid_len = buf[SSID_IE_LEN_INDEX];
/* If ssid is cached for this hidden AP, then change buffer len accordingly. */
- if ((TRUE == is_probe_ssid) && (BEACON_FTYPE == bih->frameType) &&
+ if ((true == is_probe_ssid) && (BEACON_FTYPE == bih->frameType) &&
(0 != cached_ssid_len) &&
(0 == beacon_ssid_len || (cached_ssid_len > beacon_ssid_len && 0 == buf[SSID_IE_LEN_INDEX + 1])))
{
/* In case of hidden AP, beacon will not have ssid,
* but a directed probe response will have it,
* so place the cached-ssid(probe-resp) in the bssinfo. */
- if ((TRUE == is_probe_ssid) && (BEACON_FTYPE == bih->frameType) &&
+ if ((true == is_probe_ssid) && (BEACON_FTYPE == bih->frameType) &&
(0 != cached_ssid_len) &&
(0 == beacon_ssid_len || (beacon_ssid_len && 0 == buf[SSID_IE_LEN_INDEX + 1])))
{
wlan_refresh_inactive_nodes(&wmip->wmi_scan_table);
}
A_WMI_SCANCOMPLETE_EVENT(wmip->wmi_devt, (int) ev->status);
- is_probe_ssid = FALSE;
+ is_probe_ssid = false;
return A_OK;
}
* Only for OPT_TX_CMD, use BE endpoint.
*/
if (IS_OPT_TX_CMD(cmdId)) {
- if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, FALSE, FALSE,0,NULL)) != A_OK) {
+ if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != A_OK) {
A_NETBUF_FREE(osbuf);
return status;
}
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)
{
}
if (flag & SPECIFIC_SSID_FLAG) {
- is_probe_ssid = TRUE;
+ is_probe_ssid = true;
}
osbuf = A_NETBUF_ALLOC(sizeof(*cmd));
int
wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId,
- A_BOOL set)
+ bool set)
{
void *osbuf;
WMI_SET_PMKID_CMD *cmd;
return A_EINVAL;
}
- if ((set == TRUE) && (pmkId == NULL)) {
+ if ((set == true) && (pmkId == NULL)) {
return A_EINVAL;
}
cmd = (WMI_SET_PMKID_CMD *)(A_NETBUF_DATA(osbuf));
A_MEMCPY(cmd->bssid, bssid, sizeof(cmd->bssid));
- if (set == TRUE) {
+ if (set == true) {
A_MEMCPY(cmd->pmkid, pmkId, sizeof(cmd->pmkid));
cmd->enable = PMKID_ENABLE;
} else {
}
int
-wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en)
+wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, bool en)
{
void *osbuf;
WMI_SET_TKIP_COUNTERMEASURES_CMD *cmd;
A_NETBUF_PUT(osbuf, sizeof(*cmd));
cmd = (WMI_SET_TKIP_COUNTERMEASURES_CMD *)(A_NETBUF_DATA(osbuf));
- cmd->cm_en = (en == TRUE)? WMI_TKIP_CM_ENABLE : WMI_TKIP_CM_DISABLE;
+ cmd->cm_en = (en == true)? WMI_TKIP_CM_ENABLE : WMI_TKIP_CM_DISABLE;
return (wmi_cmd_send(wmip, osbuf, WMI_SET_TKIP_COUNTERMEASURES_CMDID,
NO_SYNC_WMIFLAG));
dataSyncBufs[i].osbuf = NULL;
} //end for
- } while(FALSE);
+ } while(false);
/* free up any resources left over (possibly due to an error) */
}
/*
- * Returns TRUE iff the given rate index is legal in the current PHY mode.
+ * Returns true iff the given rate index is legal in the current PHY mode.
*/
-A_BOOL
+bool
wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex)
{
WMI_PHY_MODE phyMode = (WMI_PHY_MODE) wmip->wmi_phyMode;
- A_BOOL isValid = TRUE;
+ bool isValid = true;
switch(phyMode) {
case WMI_11A_MODE:
if (wmip->wmi_ht_allowed[A_BAND_5GHZ]){
if ((rateIndex < MODE_A_SUPPORT_RATE_START) || (rateIndex > MODE_GHT20_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
} else {
if ((rateIndex < MODE_A_SUPPORT_RATE_START) || (rateIndex > MODE_A_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
}
break;
case WMI_11B_MODE:
if ((rateIndex < MODE_B_SUPPORT_RATE_START) || (rateIndex > MODE_B_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
break;
case WMI_11GONLY_MODE:
if (wmip->wmi_ht_allowed[A_BAND_24GHZ]){
if ((rateIndex < MODE_GONLY_SUPPORT_RATE_START) || (rateIndex > MODE_GHT20_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
} else {
if ((rateIndex < MODE_GONLY_SUPPORT_RATE_START) || (rateIndex > MODE_GONLY_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
}
break;
case WMI_11AG_MODE:
if (wmip->wmi_ht_allowed[A_BAND_24GHZ]){
if ((rateIndex < MODE_G_SUPPORT_RATE_START) || (rateIndex > MODE_GHT20_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
} else {
if ((rateIndex < MODE_G_SUPPORT_RATE_START) || (rateIndex > MODE_G_SUPPORT_RATE_STOP)) {
- isValid = FALSE;
+ isValid = false;
}
}
break;
default:
- A_ASSERT(FALSE);
+ A_ASSERT(false);
break;
}
}
}
- if(wmi_is_bitrate_index_valid(wmip, (A_INT32) i) != TRUE) {
+ if(wmi_is_bitrate_index_valid(wmip, (A_INT32) i) != true) {
return A_EINVAL;
}
/* Make sure all rates in the mask are valid in the current PHY mode */
for(rateIndex = 0; rateIndex < MAX_NUMBER_OF_SUPPORT_RATES; rateIndex++) {
if((1 << rateIndex) & (A_UINT32)fixRatesMask) {
- if(wmi_is_bitrate_index_valid(wmip, rateIndex) != TRUE) {
+ if(wmi_is_bitrate_index_valid(wmip, rateIndex) != true) {
A_DPRINTF(DBG_WMI, (DBGFMT "Set Fix Rates command failed: Given rate is illegal in current PHY mode\n", DBGARG));
return A_EINVAL;
}
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)
{
void *osbuf;
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)
{
bss_t *node = NULL;
node = wlan_find_Ssidnode (&wmip->wmi_scan_table, pSsid,
#endif
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)
{
WMI_AP_SET_PVB_CMD *cmd;
void *osbuf = NULL;
}
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)
{
void *osbuf;
WMI_DELBA_REQ_CMD *cmd;
int
wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion,
- A_BOOL rxDot11Hdr, A_BOOL defragOnHost)
+ bool rxDot11Hdr, bool defragOnHost)
{
void *osbuf;
WMI_RX_FRAME_FORMAT_CMD *cmd;
A_NETBUF_PUT(osbuf, sizeof(*cmd));
cmd = (WMI_RX_FRAME_FORMAT_CMD *)(A_NETBUF_DATA(osbuf));
- cmd->dot11Hdr = (rxDot11Hdr==TRUE)? 1:0;
- cmd->defragOnHost = (defragOnHost==TRUE)? 1:0;
+ cmd->dot11Hdr = (rxDot11Hdr==true)? 1:0;
+ cmd->defragOnHost = (defragOnHost==true)? 1:0;
cmd->metaVersion = rxMetaVersion; /* */
/* Delete the local aggr state, on host */
int
-wmi_set_thin_mode_cmd(struct wmi_t *wmip, A_BOOL bThinMode)
+wmi_set_thin_mode_cmd(struct wmi_t *wmip, bool bThinMode)
{
void *osbuf;
WMI_SET_THIN_MODE_CMD *cmd;
A_NETBUF_PUT(osbuf, sizeof(*cmd));
cmd = (WMI_SET_THIN_MODE_CMD *)(A_NETBUF_DATA(osbuf));
- cmd->enable = (bThinMode==TRUE)? 1:0;
+ cmd->enable = (bThinMode==true)? 1:0;
/* Delete the local aggr state, on host */
return (wmi_cmd_send(wmip, osbuf, WMI_SET_THIN_MODE_CMDID, NO_SYNC_WMIFLAG));
#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;
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;
};