From 1071a134d0822663f497a1dda4866cffa7df4e36 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 2 Feb 2011 14:05:47 -0800 Subject: [PATCH] staging: ath6kl: Remove A_BOOL and TRUE/FALSE Use kernel bool and true/false. Signed-off-by: Joe Perches Signed-off-by: Greg Kroah-Hartman --- .../staging/ath6kl/bmi/include/bmi_internal.h | 4 +- drivers/staging/ath6kl/bmi/src/bmi.c | 28 +- .../ath6kl/hif/common/hif_sdio_common.h | 2 +- .../sdio/linux_sdio/include/hif_internal.h | 6 +- .../ath6kl/hif/sdio/linux_sdio/src/hif.c | 28 +- .../hif/sdio/linux_sdio/src/hif_scatter.c | 6 +- drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 88 ++--- drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 62 ++-- .../staging/ath6kl/htc2/AR6000/ar6k_events.c | 32 +- .../staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 44 +-- .../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 96 ++--- drivers/staging/ath6kl/htc2/htc.c | 36 +- drivers/staging/ath6kl/htc2/htc_internal.h | 6 +- drivers/staging/ath6kl/htc2/htc_recv.c | 84 ++--- drivers/staging/ath6kl/htc2/htc_send.c | 46 +-- drivers/staging/ath6kl/htc2/htc_services.c | 20 +- drivers/staging/ath6kl/include/a_drv_api.h | 4 +- .../staging/ath6kl/include/aggr_recv_api.h | 2 +- drivers/staging/ath6kl/include/bmi.h | 2 +- .../staging/ath6kl/include/common/athdefs.h | 8 - drivers/staging/ath6kl/include/common_drv.h | 2 +- .../ath6kl/include/hci_transport_api.h | 12 +- drivers/staging/ath6kl/include/hif.h | 6 +- drivers/staging/ath6kl/include/htc_api.h | 16 +- drivers/staging/ath6kl/include/wlan_api.h | 2 +- drivers/staging/ath6kl/include/wmi_api.h | 22 +- drivers/staging/ath6kl/miscdrv/ar3kconfig.c | 26 +- .../ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 16 +- .../ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 12 +- .../ath6kl/miscdrv/ar3kps/ar3kpsparser.h | 6 +- drivers/staging/ath6kl/miscdrv/common_drv.c | 16 +- drivers/staging/ath6kl/miscdrv/credit_dist.c | 4 +- .../staging/ath6kl/os/linux/ar6000_android.c | 10 +- drivers/staging/ath6kl/os/linux/ar6000_drv.c | 252 ++++++------- drivers/staging/ath6kl/os/linux/ar6000_pm.c | 56 +-- .../staging/ath6kl/os/linux/ar6000_raw_if.c | 26 +- drivers/staging/ath6kl/os/linux/ar6k_pal.c | 28 +- drivers/staging/ath6kl/os/linux/cfg80211.c | 56 +-- drivers/staging/ath6kl/os/linux/eeprom.c | 2 +- .../ath6kl/os/linux/export_hci_transport.c | 6 +- drivers/staging/ath6kl/os/linux/hci_bridge.c | 58 +-- .../ath6kl/os/linux/include/ar6000_drv.h | 46 +-- .../ath6kl/os/linux/include/ar6k_pal.h | 2 +- .../ath6kl/os/linux/include/ar6xapi_linux.h | 10 +- .../ath6kl/os/linux/include/athdrv_linux.h | 6 +- .../ath6kl/os/linux/include/athtypes_linux.h | 1 - .../ath6kl/os/linux/include/cfg80211.h | 2 +- .../os/linux/include/export_hci_transport.h | 6 +- .../ath6kl/os/linux/include/osapi_linux.h | 4 +- drivers/staging/ath6kl/os/linux/ioctl.c | 350 +++++++++--------- .../staging/ath6kl/os/linux/wireless_ext.c | 112 +++--- .../staging/ath6kl/reorder/aggr_rx_internal.h | 8 +- drivers/staging/ath6kl/reorder/rcv_aggr.c | 48 +-- drivers/staging/ath6kl/wlan/src/wlan_node.c | 20 +- .../ath6kl/wlan/src/wlan_recv_beacon.c | 4 +- drivers/staging/ath6kl/wmi/wmi.c | 84 ++--- drivers/staging/ath6kl/wmi/wmi_host.h | 6 +- 57 files changed, 969 insertions(+), 978 deletions(-) diff --git a/drivers/staging/ath6kl/bmi/include/bmi_internal.h b/drivers/staging/ath6kl/bmi/include/bmi_internal.h index 34e86f31eb94..c9839f437ac1 100644 --- a/drivers/staging/ath6kl/bmi/include/bmi_internal.h +++ b/drivers/staging/ath6kl/bmi/include/bmi_internal.h @@ -39,7 +39,7 @@ #define BMI_COMMUNICATION_TIMEOUT 100000 /* ------ Global Variable Declarations ------- */ -static A_BOOL bmiDone; +static bool bmiDone; int bmiBufferSend(HIF_DEVICE *device, @@ -50,6 +50,6 @@ int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, - A_BOOL want_timeout); + bool want_timeout); #endif diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c index 355e22bd505c..a29f60e0ce6c 100644 --- a/drivers/staging/ath6kl/bmi/src/bmi.c +++ b/drivers/staging/ath6kl/bmi/src/bmi.c @@ -53,7 +53,7 @@ and does not use the HTC protocol nor even DMA -- it is intentionally kept very simple. */ -static A_BOOL pendingEventsFuncCheck = FALSE; +static bool pendingEventsFuncCheck = false; static A_UINT32 *pBMICmdCredits; static A_UCHAR *pBMICmdBuf; #define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \ @@ -66,8 +66,8 @@ static A_UCHAR *pBMICmdBuf; void BMIInit(void) { - bmiDone = FALSE; - pendingEventsFuncCheck = FALSE; + bmiDone = false; + pendingEventsFuncCheck = false; /* * On some platforms, it's not possible to DMA to a static variable @@ -117,7 +117,7 @@ BMIDone(HIF_DEVICE *device) } AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device)); - bmiDone = TRUE; + bmiDone = true; cid = BMI_DONE; status = bmiBufferSend(device, (A_UCHAR *)&cid, sizeof(cid)); @@ -162,7 +162,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) } status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_ver, - sizeof(targ_info->target_ver), TRUE); + sizeof(targ_info->target_ver), true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Version from the device\n")); return A_ERROR; @@ -171,7 +171,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) if (targ_info->target_ver == TARGET_VERSION_SENTINAL) { /* Determine how many bytes are in the Target's targ_info */ status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_info_byte_count, - sizeof(targ_info->target_info_byte_count), TRUE); + sizeof(targ_info->target_info_byte_count), true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info Byte Count from the device\n")); return A_ERROR; @@ -186,7 +186,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info) /* Read the remainder of the targ_info */ status = bmiBufferReceive(device, ((A_UCHAR *)targ_info)+sizeof(targ_info->target_info_byte_count), - sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), TRUE); + sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info (%d bytes) from the device\n", targ_info->target_info_byte_count)); @@ -243,7 +243,7 @@ BMIReadMemory(HIF_DEVICE *device, AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n")); return A_ERROR; } - status = bmiBufferReceive(device, pBMICmdBuf, rxlen, TRUE); + status = bmiBufferReceive(device, pBMICmdBuf, rxlen, true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; @@ -357,7 +357,7 @@ BMIExecute(HIF_DEVICE *device, return A_ERROR; } - status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), FALSE); + status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), false); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; @@ -441,7 +441,7 @@ BMIReadSOCRegister(HIF_DEVICE *device, return A_ERROR; } - status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), TRUE); + status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; @@ -537,7 +537,7 @@ BMIrompatchInstall(HIF_DEVICE *device, return A_ERROR; } - status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), TRUE); + status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), true); if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n")); return A_ERROR; @@ -785,7 +785,7 @@ int bmiBufferReceive(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, - A_BOOL want_timeout) + bool want_timeout) { int status; A_UINT32 address; @@ -800,7 +800,7 @@ bmiBufferReceive(HIF_DEVICE *device, HIF_DEVICE_GET_PENDING_EVENTS_FUNC, &getPendingEventsFunc, sizeof(getPendingEventsFunc)); - pendingEventsFuncCheck = TRUE; + pendingEventsFuncCheck = true; } HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR, @@ -1004,7 +1004,7 @@ BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length) } int -BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout) +BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, bool want_timeout) { return bmiBufferReceive(device, buffer, length, want_timeout); } diff --git a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h index 0f4e913cb13b..299fd2583c7f 100644 --- a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h +++ b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h @@ -74,7 +74,7 @@ static INLINE void SetExtendedMboxWindowInfo(A_UINT16 Manfid, HIF_DEVICE_MBOX_IN pInfo->GMboxSize = HIF_GMBOX_WIDTH; break; default: - A_ASSERT(FALSE); + A_ASSERT(false); break; } } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h index f72ba6cf50c4..18713c2b2002 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h @@ -78,9 +78,9 @@ struct hif_device { HTC_CALLBACKS htcCallbacks; A_UINT8 *dma_buffer; DL_LIST ScatterReqHead; /* scatter request list head */ - A_BOOL scatter_enabled; /* scatter enabled flag */ - A_BOOL is_suspend; - A_BOOL is_disabled; + bool scatter_enabled; /* scatter enabled flag */ + bool is_suspend; + bool is_disabled; atomic_t irqHandling; HIF_DEVICE_POWER_CHANGE_TYPE powerConfig; const struct sdio_device_id *id; diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c index 26d8a7f30990..273aa6372d2a 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c @@ -46,7 +46,7 @@ */ #define BUFFER_NEEDS_BOUNCE(buffer) (((unsigned long)(buffer) & 0x3) || !virt_addr_valid((buffer))) #else -#define BUFFER_NEEDS_BOUNCE(buffer) (FALSE) +#define BUFFER_NEEDS_BOUNCE(buffer) (false) #endif /* ATHENV */ @@ -164,7 +164,7 @@ __HIFReadWrite(HIF_DEVICE *device, int status = A_OK; int ret; A_UINT8 *tbuffer; - A_BOOL bounced = FALSE; + bool bounced = false; AR_DEBUG_ASSERT(device != NULL); AR_DEBUG_ASSERT(device->func != NULL); @@ -243,7 +243,7 @@ __HIFReadWrite(HIF_DEVICE *device, /* copy the write data to the dma buffer */ AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE); memcpy(tbuffer, buffer, length); - bounced = TRUE; + bounced = true; } else { tbuffer = buffer; } @@ -265,7 +265,7 @@ __HIFReadWrite(HIF_DEVICE *device, AR_DEBUG_ASSERT(device->dma_buffer != NULL); AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE); tbuffer = device->dma_buffer; - bounced = TRUE; + bounced = true; } else { tbuffer = buffer; } @@ -299,7 +299,7 @@ __HIFReadWrite(HIF_DEVICE *device, ("AR6000: SDIO bus operation failed! MMC stack returned : %d \n", ret)); status = A_ERROR; } - } while (FALSE); + } while (false); return status; } @@ -725,7 +725,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode, } status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config); if (status) { - device->scatter_enabled = FALSE; + device->scatter_enabled = false; } break; case HIF_DEVICE_GET_OS_DEVICE: @@ -837,7 +837,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id device = getHifDevice(func); device->id = id; - device->is_disabled = TRUE; + device->is_disabled = true; spin_lock_init(&device->lock); @@ -848,7 +848,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id if (!nohifscattersupport) { /* try to allow scatter operation on all instances, * unless globally overridden */ - device->scatter_enabled = TRUE; + device->scatter_enabled = true; } /* Initialize the bus requests to be used later */ @@ -989,7 +989,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func) sdio_release_host(device->func); if (status == A_OK) { - device->is_disabled = TRUE; + device->is_disabled = true; } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n")); @@ -1036,7 +1036,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func) __FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret)); return A_ERROR; } - device->is_disabled = FALSE; + device->is_disabled = false; /* create async I/O thread */ if (!device->async_task) { device->async_shutdown = 0; @@ -1086,10 +1086,10 @@ static int hifDeviceSuspend(struct device *dev) device = getHifDevice(func); AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n")); if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) { - device->is_suspend = TRUE; /* set true first for PowerStateChangeNotify(..) */ + device->is_suspend = true; /* set true first for PowerStateChangeNotify(..) */ status = osdrvCallbacks.deviceSuspendHandler(device->claimedContext); if (status != A_OK) { - device->is_suspend = FALSE; + device->is_suspend = false; } } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n")); @@ -1115,7 +1115,7 @@ static int hifDeviceResume(struct device *dev) if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) { status = osdrvCallbacks.deviceResumeHandler(device->claimedContext); if (status == A_OK) { - device->is_suspend = FALSE; + device->is_suspend = false; } } AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceResume\n")); @@ -1137,7 +1137,7 @@ static void hifDeviceRemoved(struct sdio_func *func) } if (device->is_disabled) { - device->is_disabled = FALSE; + device->is_disabled = false; } else { status = hifDisableFunc(device, func); } diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c index 7ec1f4a92cdf..8d9aed7a8cea 100644 --- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c +++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c @@ -237,7 +237,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) } if (pReq->TotalLength == 0) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -263,7 +263,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq) status = A_OK; } - } while (FALSE); + } while (false); if (status && (request & HIF_ASYNCHRONOUS)) { pReq->CompletionStatus = status; @@ -346,7 +346,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO * status = A_OK; - } while (FALSE); + } while (false); if (status) { CleanupHIFScatterResources(device); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c index 6a410f1bae21..11311af07641 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c @@ -64,7 +64,7 @@ void DevCleanup(AR6K_DEVICE *pDev) if (pDev->HifAttached) { HIFDetachHTC(pDev->HIFDevice); - pDev->HifAttached = FALSE; + pDev->HifAttached = false; } DevCleanupVirtualScatterSupport(pDev); @@ -100,14 +100,14 @@ int DevSetup(AR6K_DEVICE *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; } @@ -128,7 +128,7 @@ int DevSetup(AR6K_DEVICE *pDev) blocksizes, sizeof(blocksizes)); if (status != A_OK) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -174,14 +174,14 @@ int DevSetup(AR6K_DEVICE *pDev) 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; @@ -203,12 +203,12 @@ int DevSetup(AR6K_DEVICE *pDev) status = DevSetupGMbox(pDev); - } while (FALSE); + } while (false); if (status) { if (pDev->HifAttached) { HIFDetachHTC(pDev->HIFDevice); - pDev->HifAttached = FALSE; + pDev->HifAttached = false; } } @@ -355,7 +355,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke /* 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; @@ -371,7 +371,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, if (NULL == pIOPacket) { status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -391,7 +391,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, EnableRecv ? HIF_UNMASK_RECV : HIF_MASK_RECV, NULL); - } while (FALSE); + } while (false); if (status && (pIOPacket != NULL)) { AR6KFreeIOPacket(pDev,pIOPacket); @@ -403,7 +403,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, A_BOOL EnableRecv, /* 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; @@ -430,7 +430,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_ if (NULL == pIOPacket) { status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -460,7 +460,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_ HIF_WR_SYNC_BYTE_INC, NULL); - } while (FALSE); + } while (false); if (status && (pIOPacket != NULL)) { AR6KFreeIOPacket(pDev,pIOPacket); @@ -470,25 +470,25 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, A_BOOL EnableRecv, A_ } -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; @@ -520,12 +520,12 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec if(!host_int_status) { status = A_OK; - *pbIsRecvPending = FALSE; + *pbIsRecvPending = false; break; } else { - *pbIsRecvPending = TRUE; + *pbIsRecvPending = true; } A_MDELAY(100); @@ -608,7 +608,7 @@ static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) 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; @@ -617,7 +617,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA) pDMABuffer = pReq->pScatterBounceBuffer; if (pDMABuffer == NULL) { - A_ASSERT(FALSE); + A_ASSERT(false); return A_EINVAL; } @@ -628,7 +628,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA) 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; } @@ -680,7 +680,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) } if (pReq->TotalLength == 0) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -719,7 +719,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) request, (request & HIF_ASYNCHRONOUS) ? pIOPacket : NULL); - } while (FALSE); + } while (false); if ((status != A_PENDING) && status && (request & HIF_ASYNCHRONOUS)) { if (pIOPacket != NULL) { @@ -804,7 +804,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) 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; @@ -876,7 +876,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) 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; @@ -1038,9 +1038,9 @@ static void AssembleBufferList(BUFFER_PROC_LIST *pList) } -#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; @@ -1056,11 +1056,11 @@ static void InitBuffers(A_BOOL Zero) } -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]; @@ -1070,7 +1070,7 @@ static A_BOOL CheckOneBuffer(A_UINT16 *pBuffer16, int Length) 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", @@ -1082,10 +1082,10 @@ static A_BOOL CheckOneBuffer(A_UINT16 *pBuffer16, int Length) 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 */ @@ -1176,7 +1176,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) 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; @@ -1283,7 +1283,7 @@ static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) } 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)); @@ -1324,7 +1324,7 @@ static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" Send/Recv success! mailbox : %d \n",mbox)); - } while (FALSE); + } while (false); return status; } @@ -1349,7 +1349,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev) g_MailboxAddrs, sizeof(g_MailboxAddrs)); if (status != A_OK) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -1358,7 +1358,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev) g_BlockSizes, sizeof(g_BlockSizes)); if (status != A_OK) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -1455,7 +1455,7 @@ int DoMboxHWTest(AR6K_DEVICE *pDev) } } - } while (FALSE); + } while (false); if (status == A_OK) { AR_DEBUG_PRINTF(ATH_PRINT_OUT_ZONE, (" DoMboxHWTest DONE - SUCCESS! - \n")); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h index 2eced101d162..a015da1322b5 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h @@ -75,8 +75,8 @@ typedef PREPACK struct _AR6K_GMBOX_CTRL_REGISTERS { #define AR6K_REG_IO_BUFFER_SIZE 32 #define AR6K_MAX_REG_IO_BUFFERS 8 -#define FROM_DMA_BUFFER TRUE -#define TO_DMA_BUFFER FALSE +#define FROM_DMA_BUFFER true +#define TO_DMA_BUFFER false #define AR6K_SCATTER_ENTRIES_PER_REQ 16 #define AR6K_MAX_TRANSFER_SIZE_PER_SCATTER 16*1024 #define AR6K_SCATTER_REQS 4 @@ -99,10 +99,10 @@ typedef struct AR6K_ASYNC_REG_IO_BUFFER { typedef struct _AR6K_GMBOX_INFO { void *pProtocolContext; int (*pMessagePendingCallBack)(void *pContext, A_UINT8 LookAheadBytes[], int ValidBytes); - int (*pCreditsPendingCallback)(void *pContext, int NumCredits, A_BOOL CreditIRQEnabled); + int (*pCreditsPendingCallback)(void *pContext, int NumCredits, bool CreditIRQEnabled); void (*pTargetFailureCallback)(void *pContext, int Status); void (*pStateDumpCallback)(void *pContext); - A_BOOL CreditCountIRQEnabled; + bool CreditCountIRQEnabled; } AR6K_GMBOX_INFO; typedef struct _AR6K_DEVICE { @@ -124,21 +124,21 @@ typedef struct _AR6K_DEVICE { int (*MessagePendingCallback)(void *Context, A_UINT32 LookAheads[], int NumLookAheads, - A_BOOL *pAsyncProc, + bool *pAsyncProc, int *pNumPktsFetched); HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode; HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent; - A_BOOL HifAttached; + bool HifAttached; HIF_DEVICE_IRQ_YIELD_PARAMS HifIRQYieldParams; - A_BOOL DSRCanYield; + bool DSRCanYield; int CurrentDSRRecvCount; HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo; DL_LIST ScatterReqHead; - A_BOOL ScatterIsVirtual; + bool ScatterIsVirtual; int MaxRecvBundleSize; int MaxSendBundleSize; AR6K_GMBOX_INFO GMboxInfo; - A_BOOL GMboxEnabled; + bool GMboxEnabled; AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters; int RecheckIRQStatusCnt; } AR6K_DEVICE; @@ -162,15 +162,15 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs); -#define DEV_STOP_RECV_ASYNC TRUE -#define DEV_STOP_RECV_SYNC FALSE -#define DEV_ENABLE_RECV_ASYNC TRUE -#define DEV_ENABLE_RECV_SYNC FALSE -int DevStopRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode); -int DevEnableRecv(AR6K_DEVICE *pDev, A_BOOL ASyncMode); +#define DEV_STOP_RECV_ASYNC true +#define DEV_STOP_RECV_SYNC false +#define DEV_ENABLE_RECV_ASYNC true +#define DEV_ENABLE_RECV_SYNC false +int DevStopRecv(AR6K_DEVICE *pDev, bool ASyncMode); +int DevEnableRecv(AR6K_DEVICE *pDev, bool ASyncMode); int DevEnableInterrupts(AR6K_DEVICE *pDev); int DevDisableInterrupts(AR6K_DEVICE *pDev); -int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRecvPending); +int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,bool *pbIsRecvPending); #define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask))) #define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) @@ -178,7 +178,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,A_UINT32 TimeoutInMs,A_BOOL *pbIsRec static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 SendLength) { A_UINT32 paddedLength; - A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; + bool sync = (pPacket->Completion == NULL) ? true : false; int status; /* adjust the length to be a multiple of block size if appropriate */ @@ -186,7 +186,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 #if 0 if (paddedLength > pPacket->BufferLength) { - A_ASSERT(FALSE); + A_ASSERT(false); if (pPacket->Completion != NULL) { COMPLETE_HTC_PACKET(pPacket,A_EINVAL); return A_OK; @@ -222,13 +222,13 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 RecvLength) { A_UINT32 paddedLength; int status; - A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; + bool sync = (pPacket->Completion == NULL) ? true : false; /* adjust the length to be a multiple of block size if appropriate */ paddedLength = DEV_CALC_RECV_PADDED_LEN(pDev, RecvLength); if (paddedLength > pPacket->BufferLength) { - A_ASSERT(FALSE); + A_ASSERT(false); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("DevRecvPacket, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n", paddedLength,RecvLength,pPacket->BufferLength)); @@ -272,7 +272,7 @@ static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 * */ -int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, A_BOOL FromDMA); +int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA); /* copy any READ data back into scatter list */ #define DEV_FINISH_SCATTER_OPERATION(pR) \ @@ -309,11 +309,11 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer); #define DEV_GET_MAX_BUNDLE_RECV_LENGTH(pDev) (pDev)->MaxRecvBundleSize #define DEV_GET_MAX_BUNDLE_SEND_LENGTH(pDev) (pDev)->MaxSendBundleSize -#define DEV_SCATTER_READ TRUE -#define DEV_SCATTER_WRITE FALSE -#define DEV_SCATTER_ASYNC TRUE -#define DEV_SCATTER_SYNC FALSE -int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, A_BOOL Read, A_BOOL Async); +#define DEV_SCATTER_READ true +#define DEV_SCATTER_WRITE false +#define DEV_SCATTER_ASYNC true +#define DEV_SCATTER_SYNC false +int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async); #ifdef MBOXHW_UNIT_TEST int DoMboxHWTest(AR6K_DEVICE *pDev); @@ -350,7 +350,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); #define DevNotifyGMboxTargetFailure(p) static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { - pDev->GMboxEnabled = FALSE; + pDev->GMboxEnabled = false; return A_OK; } @@ -379,8 +379,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength); int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength); -#define PROC_IO_ASYNC TRUE -#define PROC_IO_SYNC FALSE +#define PROC_IO_ASYNC true +#define PROC_IO_SYNC false typedef enum GMBOX_IRQ_ACTION_TYPE { GMBOX_ACTION_NONE = 0, GMBOX_DISABLE_ALL, @@ -391,8 +391,8 @@ typedef enum GMBOX_IRQ_ACTION_TYPE { GMBOX_CREDIT_IRQ_DISABLE, } GMBOX_IRQ_ACTION_TYPE; -int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, A_BOOL AsyncMode); -int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits); +int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode); +int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits); int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize); int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes); int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS); diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c index 1e3d6cd43554..92d89c0480c3 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c @@ -70,7 +70,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevPollMboxMsgRecv \n")); - while (TRUE) { + while (true) { if (pDev->GetPendingEventsFunc != NULL) { @@ -304,7 +304,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) { AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; A_UINT32 lookAhead = 0; - A_BOOL otherInts = FALSE; + bool otherInts = false; AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGetEventAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -327,7 +327,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) } } if (pEvents->Events & HIF_OTHER_EVENTS) { - otherInts = TRUE; + otherInts = true; } } else { /* standard interrupt table handling.... */ @@ -349,7 +349,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) if (host_int_status) { /* there are other interrupts to handle */ - otherInts = TRUE; + otherInts = true; } } @@ -379,7 +379,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) } } - } while (FALSE); + } while (false); /* free this IO packet */ AR6KFreeIOPacket(pDev,pPacket); @@ -428,7 +428,7 @@ int DevCheckPendingRecvMsgsAsync(void *context) /* there should be only 1 asynchronous request out at a time to read these registers * so this should actually never happen */ status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -453,7 +453,7 @@ int DevCheckPendingRecvMsgsAsync(void *context) } AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,(" Async IO issued to get interrupt status...\n")); - } while (FALSE); + } while (false); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevCheckPendingRecvMsgsAsync \n")); @@ -467,7 +467,7 @@ void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev) } /* process pending interrupts synchronously */ -static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncProcessing) +static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing) { int status = A_OK; A_UINT8 host_int_status = 0; @@ -591,7 +591,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr status = DevCheckGMboxInterrupts(pDev); } - } while (FALSE); + } while (false); do { @@ -603,7 +603,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr if ((0 == host_int_status) && (0 == lookAhead)) { /* nothing to process, the caller can use this to break out of a loop */ - *pDone = TRUE; + *pDone = true; break; } @@ -624,7 +624,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr if (!fetched) { /* HTC could not pull any messages out due to lack of resources */ /* force DSR handler to ack the interrupt */ - *pASyncProcessing = FALSE; + *pASyncProcessing = false; pDev->RecheckIRQStatusCnt = 0; } } @@ -658,7 +658,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr } } - } while (FALSE); + } while (false); /* an optimization to bypass reading the IRQ status registers unecessarily which can re-wake * the target, if upper layers determine that we are in a low-throughput mode, we can @@ -670,7 +670,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, A_BOOL *pDone, A_BOOL *pASyncPr * messages from the mailbox before exiting the ISR routine. */ if (!(*pASyncProcessing) && (pDev->RecheckIRQStatusCnt == 0) && (pDev->GetPendingEventsFunc == NULL)) { AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("Bypassing IRQ Status re-check, forcing done \n")); - *pDone = TRUE; + *pDone = true; } AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-ProcessPendingIRQs: (done:%d, async:%d) status=%d \n", @@ -685,8 +685,8 @@ int DevDsrHandler(void *context) { AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; int status = A_OK; - A_BOOL done = FALSE; - A_BOOL asyncProc = FALSE; + bool done = false; + bool asyncProc = false; AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDsrHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); @@ -703,7 +703,7 @@ int DevDsrHandler(void *context) if (HIF_DEVICE_IRQ_SYNC_ONLY == pDev->HifIRQProcessingMode) { /* the HIF layer does not allow async IRQ processing, override the asyncProc flag */ - asyncProc = FALSE; + asyncProc = false; /* this will cause us to re-enter ProcessPendingIRQ() and re-read interrupt status registers. * this has a nice side effect of blocking us until all async read requests are completed. * This behavior is required on some HIF implementations that do not allow ASYNC diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c index 74165765f5ea..b21c9fb88f81 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c @@ -74,7 +74,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n")); } -static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode) +static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = A_OK; AR6K_IRQ_ENABLE_REGISTERS regs; @@ -83,12 +83,12 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE LOCK_AR6K(pDev); if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) { - pDev->GMboxInfo.CreditCountIRQEnabled = TRUE; + pDev->GMboxInfo.CreditCountIRQEnabled = true; pDev->IrqEnableRegisters.counter_int_status_enable |= COUNTER_INT_STATUS_ENABLE_BIT_SET(1 << AR6K_GMBOX_CREDIT_COUNTER); pDev->IrqEnableRegisters.int_status_enable |= INT_STATUS_ENABLE_COUNTER_SET(0x01); } else { - pDev->GMboxInfo.CreditCountIRQEnabled = FALSE; + pDev->GMboxInfo.CreditCountIRQEnabled = false; pDev->IrqEnableRegisters.counter_int_status_enable &= ~(COUNTER_INT_STATUS_ENABLE_BIT_SET(1 << AR6K_GMBOX_CREDIT_COUNTER)); } @@ -105,7 +105,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE if (NULL == pIOPacket) { status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -135,7 +135,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE AR6K_IRQ_ENABLE_REGS_SIZE, HIF_WR_SYNC_BYTE_INC, NULL); - } while (FALSE); + } while (false); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, @@ -155,7 +155,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE } -int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL AsyncMode) +int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) { int status = A_OK; HTC_PACKET *pIOPacket = NULL; @@ -192,7 +192,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL break; case GMBOX_ACTION_NONE: default: - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -211,7 +211,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL if (NULL == pIOPacket) { status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -242,7 +242,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL HIF_WR_SYNC_BYTE_FIX, NULL); - } while (FALSE); + } while (false); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, @@ -264,7 +264,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, A_BOOL void DevCleanupGMbox(AR6K_DEVICE *pDev) { if (pDev->GMboxEnabled) { - pDev->GMboxEnabled = FALSE; + pDev->GMboxEnabled = false; GMboxProtocolUninstall(pDev); } } @@ -315,9 +315,9 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) break; } - pDev->GMboxEnabled = TRUE; + pDev->GMboxEnabled = true; - } while (FALSE); + } while (false); return status; } @@ -388,7 +388,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) pDev->GMboxInfo.CreditCountIRQEnabled); } - } while (FALSE); + } while (false); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ, ("-DevCheckGMboxInterrupts (%d) \n",status)); @@ -399,7 +399,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 WriteLength) { A_UINT32 paddedLength; - A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; + bool sync = (pPacket->Completion == NULL) ? true : false; int status; A_UINT32 address; @@ -438,13 +438,13 @@ int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, A_UINT32 ReadLength) A_UINT32 paddedLength; int status; - A_BOOL sync = (pPacket->Completion == NULL) ? TRUE : FALSE; + bool sync = (pPacket->Completion == NULL) ? true : false; /* adjust the length to be a multiple of block size if appropriate */ paddedLength = DEV_CALC_RECV_PADDED_LEN(pDev, ReadLength); if (paddedLength > pPacket->BufferLength) { - A_ASSERT(FALSE); + A_ASSERT(false); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("DevGMboxRead, Not enough space for padlen:%d recvlen:%d bufferlen:%d \n", paddedLength,ReadLength,pPacket->BufferLength)); @@ -539,7 +539,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n")); } -int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits) +int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits) { int status = A_OK; HTC_PACKET *pIOPacket = NULL; @@ -552,7 +552,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits if (NULL == pIOPacket) { status = A_NO_MEMORY; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -581,7 +581,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, A_BOOL AsyncMode, int *pCredits AR6K_REG_IO_BUFFER_SIZE, HIF_RD_SYNC_BYTE_FIX, NULL); - } while (FALSE); + } while (false); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, @@ -644,7 +644,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int do { /* on entry the caller provides the length of the lookahead buffer */ if (*pLookAheadBytes > sizeof(procRegs.rx_gmbox_lookahead_alias)) { - A_ASSERT(FALSE); + A_ASSERT(false); status = A_EINVAL; break; } @@ -671,7 +671,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, A_UINT8 *pLookAheadBuffer, int *pLookAheadBytes = bytes; } - } while (FALSE); + } while (false); return status; } @@ -705,7 +705,7 @@ int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) break; } - } while (FALSE); + } while (false); if (!status) { diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c index bdb8632dbe84..2a87a49a79e5 100644 --- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c +++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c @@ -58,8 +58,8 @@ 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; @@ -99,7 +99,7 @@ do { \ (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) { @@ -116,7 +116,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) int status; int credits; int creditPollCount = CREDIT_POLL_COUNT; - A_BOOL gotCredits = FALSE; + bool gotCredits = false; pProt->CreditsConsumed = 0; @@ -125,7 +125,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) 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; } @@ -150,7 +150,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) A_MDELAY(HCI_DELAY_PER_INTERVAL_MS); continue; } else { - gotCredits = TRUE; + gotCredits = true; } if (0 == credits) { @@ -178,7 +178,7 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) break; } - } while (FALSE); + } while (false); if (!status) { pProt->CreditsAvailable = pProt->CreditsMax; @@ -189,12 +189,12 @@ static int InitTxCreditState(GMBOX_PROTO_HCI_UART *pProt) 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: @@ -214,7 +214,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIR if (0 == Credits) { if (!CreditIRQEnabled) { /* enable credit IRQ */ - enableCreditIrq = TRUE; + enableCreditIrq = true; } break; } @@ -240,19 +240,19 @@ static int CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIR /* 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); @@ -267,7 +267,7 @@ static int CreditsAvailableCallback(void *pContext, int Credits, A_BOOL CreditIR } if (doPendingSends) { - HCITrySend(pProt, NULL, FALSE); + HCITrySend(pProt, NULL, false); } AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+CreditsAvailableCallback \n")); @@ -310,8 +310,8 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V 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) */ @@ -382,7 +382,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V 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, @@ -407,7 +407,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V /* 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; } @@ -418,7 +418,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V break; } - } while (FALSE); + } while (false); UNLOCK_HCI_RX(pProt); @@ -505,7 +505,7 @@ static int HCIUartMessagePending(void *pContext, A_UINT8 LookAheadBytes[], int V } } - } while (FALSE); + } while (false); /* check if we need to disable the reciever */ if (status || blockRecv) { @@ -553,7 +553,7 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) int credits; int retry = 100; - while (TRUE) { + while (true) { credits = 0; status = DevGMboxReadCreditCounter(pProt->pDev, PROC_IO_SYNC, &credits); if (status) { @@ -579,13 +579,13 @@ static int SeekCreditsSynch(GMBOX_PROTO_HCI_UART *pProt) 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")); @@ -608,14 +608,14 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S /* 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; } @@ -672,7 +672,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S break; default: status = A_EINVAL; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -756,7 +756,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S status = DevGMboxWrite(pProt->pDev,pPacket,transferLength); if (Synchronous) { - synchSendComplete = TRUE; + synchSendComplete = true; } else { pPacket = NULL; } @@ -765,7 +765,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S } - } while (FALSE); + } while (false); pProt->SendProcessCount--; A_ASSERT(pProt->SendProcessCount >= 0); @@ -775,7 +775,7 @@ static int HCITrySend(GMBOX_PROTO_HCI_UART *pProt, HTC_PACKET *pPacket, A_BOOL S 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 */ @@ -868,7 +868,7 @@ int GMboxProtocolInstall(AR6K_DEVICE *pDev) A_MUTEX_INIT(&pProtocol->HCIRxLock); A_MUTEX_INIT(&pProtocol->HCITxLock); - } while (FALSE); + } while (false); if (!status) { LOCK_AR6K(pDev); @@ -899,7 +899,7 @@ void GMboxProtocolUninstall(AR6K_DEVICE *pDev) if (pProtocol->HCIAttached) { A_ASSERT(pProtocol->HCIConfig.TransportRemoved != NULL); pProtocol->HCIConfig.TransportRemoved(pProtocol->HCIConfig.pContext); - pProtocol->HCIAttached = FALSE; + pProtocol->HCIAttached = false; } HCIUartCleanup(pProtocol); @@ -929,7 +929,7 @@ static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) pProt->HCIConfig.pContext); } - } while (FALSE); + } while (false); return status; } @@ -966,9 +966,9 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I 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); @@ -994,7 +994,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) UNLOCK_AR6K(pDev); return; } - pProtocol->HCIAttached = FALSE; + pProtocol->HCIAttached = false; UNLOCK_AR6K(pDev); HCI_TransportStop(HciTrans); @@ -1005,7 +1005,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE { 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")); @@ -1044,11 +1044,11 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE 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); @@ -1069,7 +1069,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE 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; @@ -1088,7 +1088,7 @@ void HCI_TransportStop(HCI_TRANSPORT_HANDLE HciTrans) AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportStop \n")); return; } - pProt->HCIStopped = TRUE; + pProt->HCIStopped = true; UNLOCK_AR6K(pProt->pDev); /* disable interrupts */ @@ -1110,7 +1110,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) 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 { @@ -1140,16 +1140,16 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans) } /* 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, @@ -1261,7 +1261,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud) 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; diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c index b24698ebbecb..3c831e0abe36 100644 --- a/drivers/staging/ath6kl/htc2/htc.c +++ b/drivers/staging/ath6kl/htc2/htc.c @@ -190,7 +190,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo) HTC_FREE_CONTROL_TX(target,pControlPacket); } - } while (FALSE); + } while (false); if (status) { if (target != NULL) { @@ -260,7 +260,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) if ((pRdyMsg->Version2_0_Info.MessageID != HTC_MSG_READY_ID) || (pPacket->ActualLength < sizeof(HTC_READY_MSG))) { /* this message is not valid */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_EPROTO; break; } @@ -268,7 +268,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) if (pRdyMsg->Version2_0_Info.CreditCount == 0 || pRdyMsg->Version2_0_Info.CreditSize == 0) { /* this message is not valid */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_EPROTO; break; } @@ -320,10 +320,10 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) (" HTC bundling allowed. Max Msg Per HTC Bundle: %d\n", target->MaxMsgPerBundle)); if (DEV_GET_MAX_BUNDLE_SEND_LENGTH(&target->Device) != 0) { - target->SendBundlingEnabled = TRUE; + target->SendBundlingEnabled = true; } if (DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device) != 0) { - target->RecvBundlingEnabled = TRUE; + target->RecvBundlingEnabled = true; } if (!DEV_IS_LEN_BLOCK_ALIGNED(&target->Device,target->TargetCreditSize)) { @@ -331,7 +331,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) target->TargetCreditSize)); /* disallow send bundling since the credit size is not aligned to a block size * the I/O block padding will spill into the next credit buffer which is fatal */ - target->SendBundlingEnabled = FALSE; + target->SendBundlingEnabled = false; } } @@ -355,7 +355,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) break; } - } while (FALSE); + } while (false); if (pPacket != NULL) { HTC_FREE_CONTROL_RX(target,pPacket); @@ -430,7 +430,7 @@ int HTCStart(HTC_HANDLE HTCHandle) HTCStop(target); } - } while (FALSE); + } while (false); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Exit\n")); return status; @@ -511,7 +511,7 @@ static void HTCReportFailure(void *Context) { HTC_TARGET *target = (HTC_TARGET *)Context; - target->TargetFailure = TRUE; + target->TargetFailure = true; if (target->HTCInitInfo.TargetFailure != NULL) { /* let upper layer know, it needs to call HTCStop() */ @@ -519,7 +519,7 @@ static void HTCReportFailure(void *Context) } } -A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, +bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_ENDPOINT_STAT_ACTION Action, HTC_ENDPOINT_STATS *pStats) @@ -527,19 +527,19 @@ A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, #ifdef HTC_EP_STAT_PROFILING HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); - A_BOOL clearStats = FALSE; - A_BOOL sample = FALSE; + bool clearStats = false; + bool sample = false; switch (Action) { case HTC_EP_STAT_SAMPLE : - sample = TRUE; + sample = true; break; case HTC_EP_STAT_SAMPLE_AND_CLEAR : - sample = TRUE; - clearStats = TRUE; + sample = true; + clearStats = true; break; case HTC_EP_STAT_CLEAR : - clearStats = TRUE; + clearStats = true; break; default: break; @@ -565,9 +565,9 @@ A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, UNLOCK_HTC_RX(target); UNLOCK_HTC_TX(target); - return TRUE; + return true; #else - return FALSE; + return false; #endif } diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h index 46364cba333a..48d2afefee0b 100644 --- a/drivers/staging/ath6kl/htc2/htc_internal.h +++ b/drivers/staging/ath6kl/htc2/htc_internal.h @@ -126,7 +126,7 @@ typedef struct _HTC_TARGET { A_UINT32 OpStateFlags; A_UINT32 RecvStateFlags; HTC_ENDPOINT_ID EpWaitingForBuffers; - A_BOOL TargetFailure; + bool TargetFailure; #ifdef HTC_CAPTURE_LAST_FRAME HTC_FRAME_HDR LastFrameHdr; /* useful for debugging */ A_UINT8 LastTrailer[256]; @@ -135,7 +135,7 @@ typedef struct _HTC_TARGET { HTC_INIT_INFO HTCInitInfo; A_UINT8 HTCTargetVersion; int MaxMsgPerBundle; /* max messages per bundle for HTC */ - A_BOOL SendBundlingEnabled; /* run time enable for send bundling (dynamic) */ + bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */ int RecvBundlingEnabled; /* run time enable for recv bundling (dynamic) */ } HTC_TARGET; @@ -169,7 +169,7 @@ HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList); int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); -int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched); +int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched); void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); int HTCSendSetupComplete(HTC_TARGET *target); void HTCFlushRecvBuffers(HTC_TARGET *target); diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c index b38211b8828b..fcbee0d15b5f 100644 --- a/drivers/staging/ath6kl/htc2/htc_recv.c +++ b/drivers/staging/ath6kl/htc2/htc_recv.c @@ -79,7 +79,7 @@ static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint, } while (!HTC_QUEUE_EMPTY(pQueueToIndicate)); } - } while (FALSE); + } while (false); } @@ -182,7 +182,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, 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; } @@ -363,7 +363,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, pPacket->pBuffer += HTC_HDR_LENGTH; pPacket->ActualLength -= HTC_HDR_LENGTH; - } while (FALSE); + } while (false); if (status) { /* dump the whole packet */ @@ -388,7 +388,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target, 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) { @@ -454,7 +454,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pE /******* 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); @@ -522,7 +522,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) 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)); @@ -554,7 +554,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) * 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); @@ -568,7 +568,7 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *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, @@ -617,14 +617,14 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) 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; } @@ -632,7 +632,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) pPacket = HTC_ALLOC_CONTROL_RX(target); if (pPacket == NULL) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_NO_MEMORY; break; } @@ -642,7 +642,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) pPacket->ActualLength = pHdr->PayloadLen + HTC_HDR_LENGTH; if (pPacket->ActualLength > pPacket->BufferLength) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_EPROTO; break; } @@ -672,7 +672,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) /* give the caller this control message packet, they are responsible to free */ *ppControlPacket = pPacket; - } while (FALSE); + } while (false); if (status) { if (pPacket != NULL) { @@ -698,7 +698,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, int i,j; int numMessages; int fullLength; - A_BOOL noRecycle; + bool noRecycle; /* lock RX while we assemble the packet buffers */ LOCK_HTC_RX(target); @@ -759,11 +759,11 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *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, @@ -776,7 +776,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, 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, @@ -888,9 +888,9 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) 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)); @@ -902,7 +902,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) } if (pScatterReq->CallerFlags & HTC_SCATTER_REQ_FLAGS_PARTIAL_BUNDLE) { - partialBundle = TRUE; + partialBundle = true; } DEV_FINISH_SCATTER_OPERATION(pScatterReq); @@ -956,7 +956,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) /* recycle failed recv */ HTC_RECYCLE_RX_PKT(target, pPacket, pEndpoint); /* set flag and continue processing the remaining scatter entries */ - procError = TRUE; + procError = true; } } @@ -975,7 +975,7 @@ static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq) HTCAsyncRecvCheckMorePackets(target, lookAheads, numLookAheads, - partialBundle ? FALSE : TRUE); + partialBundle ? false : true); } /* now drain the indication queue */ @@ -988,14 +988,14 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, 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); @@ -1004,7 +1004,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, 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", @@ -1094,7 +1094,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, 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)); @@ -1117,17 +1117,17 @@ static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint) } /* 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; @@ -1141,7 +1141,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu /* 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) { @@ -1150,14 +1150,14 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu } 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); @@ -1165,7 +1165,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu if (NumLookAheads > HTC_HOST_MAX_MSG_PER_BUNDLE) { status = A_EPROTO; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -1200,7 +1200,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu /* 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)) { @@ -1221,7 +1221,7 @@ int HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[], int Nu 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; } } @@ -1389,14 +1389,14 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) { 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; } @@ -1438,7 +1438,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) target->EpWaitingForBuffers)); target->RecvStateFlags &= ~HTC_RECV_WAIT_BUFFERS; target->EpWaitingForBuffers = ENDPOINT_MAX; - unblockRecv = TRUE; + unblockRecv = true; } } @@ -1449,7 +1449,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) DevEnableRecv(&target->Device,DEV_ENABLE_RECV_SYNC); } - } while (FALSE); + } while (false); return status; } @@ -1465,7 +1465,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) 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); @@ -1475,7 +1475,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) target->EpWaitingForBuffers)); target->RecvStateFlags &= ~HTC_RECV_WAIT_BUFFERS; target->EpWaitingForBuffers = ENDPOINT_MAX; - unblockRecv = TRUE; + unblockRecv = true; } UNLOCK_HTC_RX(target); @@ -1565,7 +1565,7 @@ int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle, 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); diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c index e645e2d3b434..a6b860a70532 100644 --- a/drivers/staging/ath6kl/htc2/htc_send.c +++ b/drivers/staging/ath6kl/htc2/htc_send.c @@ -72,7 +72,7 @@ static void DoSendCompletion(HTC_ENDPOINT *pEndpoint, } while (!HTC_QUEUE_EMPTY(pQueueToIndicate)); } - } while (FALSE); + } while (false); } @@ -116,11 +116,11 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket) { int status; - A_BOOL sync = FALSE; + bool sync = false; if (pPacket->Completion == NULL) { /* mark that this request was synchronously issued */ - sync = TRUE; + sync = true; } AR_DEBUG_PRINTF(ATH_DEBUG_SEND, @@ -160,7 +160,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+GetHTCSendPackets \n")); /* loop until we can grab as many packets out of the queue as we can */ - while (TRUE) { + while (true) { sendFlags = 0; /* get packet at head, but don't remove it */ @@ -320,7 +320,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, int i, packetsInScatterReq; unsigned int transferLength; HTC_PACKET *pPacket; - A_BOOL done = FALSE; + bool done = false; int bundlesSent = 0; int totalPktsInBundle = 0; HTC_TARGET *target = pEndpoint->target; @@ -361,7 +361,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, pPacket = HTC_GET_PKT_AT_HEAD(pQueue); if (pPacket == NULL) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -400,7 +400,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint, if (NULL == pPacket) { /* can't bundle */ - done = TRUE; + done = true; break; } @@ -571,7 +571,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, } } - } while (FALSE); + } while (false); if (result != HTC_SEND_QUEUE_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("-HTCTrySend: \n")); @@ -602,7 +602,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, /* now drain the endpoint TX queue for transmission as long as we have enough * credits */ - while (TRUE) { + while (true) { if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) == 0) { break; @@ -623,7 +623,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, bundlesSent = 0; pktsInBundles = 0; - while (TRUE) { + while (true) { /* try to send a bundle on each pass */ if ((target->SendBundlingEnabled) && @@ -758,7 +758,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt int i; HTC_ENDPOINT *pEndpoint; int totalCredits = 0; - A_BOOL doDist = FALSE; + bool doDist = false; AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCProcessCreditRpt, Credit Report Entries:%d \n", NumEntries)); @@ -767,7 +767,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt for (i = 0; i < NumEntries; i++, pRpt++) { if (pRpt->EndpointID >= ENDPOINT_MAX) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } @@ -807,7 +807,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt * will handle giving out credits back to the endpoints */ pEndpoint->CreditDist.TxCreditsToDist += pRpt->Credits; /* flag that we have to do the distribution */ - doDist = TRUE; + doDist = true; } /* refresh tx depth for distribution function that will recover these credits @@ -945,7 +945,7 @@ void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); /* not in use.. */ return; } @@ -956,14 +956,14 @@ void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG /* HTC API to indicate activity to the credit distribution function */ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, - A_BOOL Active) + bool Active) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; - A_BOOL doDist = FALSE; + bool doDist = false; if (pEndpoint->ServiceID == 0) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); /* not in use.. */ return; } @@ -974,13 +974,13 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, if (!(pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE)) { /* mark active now */ pEndpoint->CreditDist.DistFlags |= HTC_EP_ACTIVE; - doDist = TRUE; + doDist = true; } } else { if (pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE) { /* mark inactive now */ pEndpoint->CreditDist.DistFlags &= ~HTC_EP_ACTIVE; - doDist = TRUE; + doDist = true; } } @@ -1005,19 +1005,19 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, } } -A_BOOL HTCIsEndpointActive(HTC_HANDLE HTCHandle, +bool HTCIsEndpointActive(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint) { HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint]; if (pEndpoint->ServiceID == 0) { - return FALSE; + return false; } if (pEndpoint->CreditDist.DistFlags & HTC_EP_ACTIVE) { - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c index 63189b583618..5f01c2d19e1b 100644 --- a/drivers/staging/ath6kl/htc2/htc_services.c +++ b/drivers/staging/ath6kl/htc2/htc_services.c @@ -26,7 +26,7 @@ void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) { /* not implemented * we do not send control TX frames during normal runtime, only during setup */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); } /* callback when a control message arrives on this endpoint */ @@ -111,7 +111,7 @@ int HTCSendSetupComplete(HTC_TARGET *target) /* send the message */ status = HTCIssueSend(target,pSendPacket); - } while (FALSE); + } while (false); if (pSendPacket != NULL) { HTC_FREE_CONTROL_TX(target,pSendPacket); @@ -151,7 +151,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, pSendPacket = HTC_ALLOC_CONTROL_TX(target); if (NULL == pSendPacket) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_NO_MEMORY; break; } @@ -200,7 +200,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, if ((pResponseMsg->MessageID != HTC_MSG_CONNECT_SERVICE_RESPONSE_ID) || (pRecvPacket->ActualLength < sizeof(HTC_CONNECT_SERVICE_RESPONSE_MSG))) { /* this message is not valid */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); status = A_EPROTO; break; } @@ -236,12 +236,12 @@ int HTCConnectService(HTC_HANDLE HTCHandle, status = A_EPROTO; if (assignedEndpoint >= ENDPOINT_MAX) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } if (0 == maxMsgSize) { - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } @@ -249,7 +249,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, pEndpoint->Id = assignedEndpoint; if (pEndpoint->ServiceID != 0) { /* endpoint already in use! */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } @@ -275,7 +275,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, * since the host will actually issue smaller messages in the Send path */ if (pConnectReq->MaxSendMsgSize > maxMsgSize) { /* can't be larger than the maximum the target can support */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } pEndpoint->CreditDist.TxCreditsPerMaxMsg = pConnectReq->MaxSendMsgSize / target->TargetCreditSize; @@ -292,7 +292,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, status = A_OK; - } while (FALSE); + } while (false); if (pSendPacket != NULL) { HTC_FREE_CONTROL_TX(target,pSendPacket); @@ -360,7 +360,7 @@ static void HTCDefaultCreditInit(void *Context, if (creditsPerEndpoint < pCurEpDist->TxCreditsPerMaxMsg) { /* too many endpoints and not enough credits */ - AR_DEBUG_ASSERT(FALSE); + AR_DEBUG_ASSERT(false); break; } /* our minimum is set for at least 1 max message */ diff --git a/drivers/staging/ath6kl/include/a_drv_api.h b/drivers/staging/ath6kl/include/a_drv_api.h index 7d077c62ad70..5e098cb30f56 100644 --- a/drivers/staging/ath6kl/include/a_drv_api.h +++ b/drivers/staging/ath6kl/include/a_drv_api.h @@ -188,10 +188,10 @@ extern "C" { ar6000_dbglog_event((ar), (dropped), (buffer), (length)); #define A_WMI_STREAM_TX_ACTIVE(devt,trafficClass) \ - ar6000_indicate_tx_activity((devt),(trafficClass), TRUE) + ar6000_indicate_tx_activity((devt),(trafficClass), true) #define A_WMI_STREAM_TX_INACTIVE(devt,trafficClass) \ - ar6000_indicate_tx_activity((devt),(trafficClass), FALSE) + ar6000_indicate_tx_activity((devt),(trafficClass), false) #define A_WMI_Ac2EndpointID(devht, ac)\ ar6000_ac2_endpoint_id((devht), (ac)) diff --git a/drivers/staging/ath6kl/include/aggr_recv_api.h b/drivers/staging/ath6kl/include/aggr_recv_api.h index 0682bb4edcf1..d3140171ddc3 100644 --- a/drivers/staging/ath6kl/include/aggr_recv_api.h +++ b/drivers/staging/ath6kl/include/aggr_recv_api.h @@ -108,7 +108,7 @@ aggr_recv_delba_req_evt(void * cntxt, A_UINT8 tid); * callback may be called to deliver frames in order. */ void -aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu, void **osbuf); +aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf); /* diff --git a/drivers/staging/ath6kl/include/bmi.h b/drivers/staging/ath6kl/include/bmi.h index 9b45dc312319..931ac408e3a0 100644 --- a/drivers/staging/ath6kl/include/bmi.h +++ b/drivers/staging/ath6kl/include/bmi.h @@ -126,7 +126,7 @@ int BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, - A_BOOL want_timeout); + bool want_timeout); #ifdef __cplusplus } diff --git a/drivers/staging/ath6kl/include/common/athdefs.h b/drivers/staging/ath6kl/include/common/athdefs.h index c6ae9ba84b6b..255c7ddf3081 100644 --- a/drivers/staging/ath6kl/include/common/athdefs.h +++ b/drivers/staging/ath6kl/include/common/athdefs.h @@ -73,12 +73,4 @@ #define A_PHY_ERROR 27 /* RX PHY error */ #define A_CONSUMED 28 /* Object was consumed */ -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - #endif /* __ATHDEFS_H__ */ diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h index c6f0b2dc550a..8407c9f1627a 100644 --- a/drivers/staging/ath6kl/include/common_drv.h +++ b/drivers/staging/ath6kl/include/common_drv.h @@ -72,7 +72,7 @@ int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, A_UINT32 *address, A_UINT32 *data int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, A_UINT32 address, A_UCHAR *data, A_UINT32 length); -int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, A_BOOL waitForCompletion, A_BOOL coldReset); +int ar6000_reset_device(HIF_DEVICE *hifDevice, A_UINT32 TargetType, bool waitForCompletion, bool coldReset); void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, A_UINT32 TargetType); diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h index b611ab1cef4c..9b8b9aa39777 100644 --- a/drivers/staging/ath6kl/include/hci_transport_api.h +++ b/drivers/staging/ath6kl/include/hci_transport_api.h @@ -153,9 +153,9 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE @return: A_OK @notes: Caller must initialize packet using SET_HTC_PACKET_INFO_TX() and HCI_SET_PACKET_TYPE() macros to prepare the packet. - If Synchronous is set to FALSE the call is fully asynchronous. On error or completion, + If Synchronous is set to false the call is fully asynchronous. On error or completion, the registered send complete callback will be called. - If Synchronous is set to TRUE, the call will block until the packet is sent, if the + If Synchronous is set to true, the call will block until the packet is sent, if the interface cannot send the packet within a 2 second timeout, the function will return the failure code : A_EBUSY. @@ -166,7 +166,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); +int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -206,7 +206,7 @@ int HCI_TransportStart(HCI_TRANSPORT_HANDLE HciTrans); @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Receive an event packet from the HCI transport synchronously using polling @@ -217,7 +217,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL @output: @return: A_OK on success @notes: This API should be used only during HCI device initialization, the caller must call - HCI_TransportEnableDisableAsyncRecv with Enable=FALSE prior to using this API. + HCI_TransportEnableDisableAsyncRecv with Enable=false prior to using this API. This API will only capture HCI Event packets. @example: @see also: HCI_TransportEnableDisableAsyncRecv @@ -250,7 +250,7 @@ int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +int HCI_TransportEnablePowerMgmt(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); #ifdef __cplusplus } diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h index 331d98515678..6a4d27007051 100644 --- a/drivers/staging/ath6kl/include/hif.h +++ b/drivers/staging/ath6kl/include/hif.h @@ -359,11 +359,11 @@ typedef int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device, HIF_PENDING_EVENTS_INFO *pEvents, void *AsyncContext); -#define HIF_MASK_RECV TRUE -#define HIF_UNMASK_RECV FALSE +#define HIF_MASK_RECV true +#define HIF_UNMASK_RECV false /* function to mask recv events */ typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device, - A_BOOL Mask, + bool Mask, void *AsyncContext); diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h index 94040bff7896..d9d4e2e71963 100644 --- a/drivers/staging/ath6kl/include/htc_api.h +++ b/drivers/staging/ath6kl/include/htc_api.h @@ -431,7 +431,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle); @function name: HTCIndicateActivityChange @input: HTCHandle - HTC handle Endpoint - endpoint in which activity has changed - Active - TRUE if active, FALSE if it has become inactive + Active - true if active, false if it has become inactive @output: @return: @notes: This triggers the registered credit distribution function to @@ -441,7 +441,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle); +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, - A_BOOL Active); + bool Active); /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @desc: Get endpoint statistics @@ -452,9 +452,9 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, @output: pStats - statistics that were sampled (can be NULL if Action is HTC_EP_STAT_CLEAR) - @return: TRUE if statistics profiling is enabled, otherwise FALSE. + @return: true if statistics profiling is enabled, otherwise false. - @notes: Statistics is a compile-time option and this function may return FALSE + @notes: Statistics is a compile-time option and this function may return false if HTC is not compiled with profiling. The caller can specify the statistic "action" to take when sampling @@ -469,7 +469,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle, @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -A_BOOL HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, +bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_ENDPOINT_STAT_ACTION Action, HTC_ENDPOINT_STATS *pStats); @@ -538,12 +538,12 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueu @input: HTCHandle - HTC handle Endpoint - endpoint to check for active state @output: - @return: returns TRUE if Endpoint is Active + @return: returns true if Endpoint is Active @notes: @example: @see also: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -A_BOOL HTCIsEndpointActive(HTC_HANDLE HTCHandle, +bool HTCIsEndpointActive(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint); @@ -566,7 +566,7 @@ void HTCEnableRecv(HTC_HANDLE HTCHandle); void HTCDisableRecv(HTC_HANDLE HTCHandle); int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle, A_UINT32 TimeoutInMs, - A_BOOL *pbIsRecvPending); + bool *pbIsRecvPending); #ifdef __cplusplus } diff --git a/drivers/staging/ath6kl/include/wlan_api.h b/drivers/staging/ath6kl/include/wlan_api.h index 041df74e2db7..5114ff8bc179 100644 --- a/drivers/staging/ath6kl/include/wlan_api.h +++ b/drivers/staging/ath6kl/include/wlan_api.h @@ -109,7 +109,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt); bss_t * wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, - A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID); + A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID); void wlan_node_return (struct ieee80211_node_table *nt, bss_t *ni); diff --git a/drivers/staging/ath6kl/include/wmi_api.h b/drivers/staging/ath6kl/include/wmi_api.h index 0d7d0cca7726..ee2270663a37 100644 --- a/drivers/staging/ath6kl/include/wmi_api.h +++ b/drivers/staging/ath6kl/include/wmi_api.h @@ -71,7 +71,7 @@ HTC_ENDPOINT_ID wmi_get_control_ep(struct wmi_t * wmip); void wmi_set_control_ep(struct wmi_t * wmip, HTC_ENDPOINT_ID eid); A_UINT16 wmi_get_mapped_qos_queue(struct wmi_t *, A_UINT8); int wmi_dix_2_dot3(struct wmi_t *wmip, void *osbuf); -int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, A_BOOL bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,A_UINT8 metaVersion, void *pTxMetaS); +int wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, bool bMoreData, WMI_DATA_HDR_DATA_TYPE data_type,A_UINT8 metaVersion, void *pTxMetaS); int wmi_dot3_2_dix(void *osbuf); int wmi_dot11_hdr_remove (struct wmi_t *wmip, void *osbuf); @@ -80,7 +80,7 @@ int wmi_dot11_hdr_add(struct wmi_t *wmip, void *osbuf, NETWORK_TYPE mode); int wmi_data_hdr_remove(struct wmi_t *wmip, void *osbuf); int wmi_syncpoint(struct wmi_t *wmip); int wmi_syncpoint_reset(struct wmi_t *wmip); -A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT32 layer2Priority, A_BOOL wmmEnabled); +A_UINT8 wmi_implicit_create_pstream(struct wmi_t *wmip, void *osbuf, A_UINT32 layer2Priority, bool wmmEnabled); A_UINT8 wmi_determine_userPriority (A_UINT8 *pkt, A_UINT32 layer2Pri); @@ -122,7 +122,7 @@ int wmi_reconnect_cmd(struct wmi_t *wmip, int wmi_disconnect_cmd(struct wmi_t *wmip); int wmi_getrev_cmd(struct wmi_t *wmip); int wmi_startscan_cmd(struct wmi_t *wmip, WMI_SCAN_TYPE scanType, - A_BOOL forceFgScan, A_BOOL isLegacy, + u32 forceFgScan, u32 isLegacy, A_UINT32 homeDwellTime, A_UINT32 forceScanInterval, A_INT8 numChan, A_UINT16 *channelList); int wmi_scanparams_cmd(struct wmi_t *wmip, A_UINT16 fg_start_sec, @@ -178,7 +178,7 @@ int wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie, A_UINT32 source); int wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask, - A_UINT16 tsr, A_BOOL rep, A_UINT16 size, + A_UINT16 tsr, bool rep, A_UINT16 size, A_UINT32 valid); int wmi_get_stats_cmd(struct wmi_t *wmip); @@ -201,9 +201,9 @@ int wmi_set_txPwr_cmd(struct wmi_t *wmip, A_UINT8 dbM); int wmi_get_txPwr_cmd(struct wmi_t *wmip); int wmi_addBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex, A_UINT8 *bssid); int wmi_deleteBadAp_cmd(struct wmi_t *wmip, A_UINT8 apIndex); -int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en); +int wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, bool en); int wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId, - A_BOOL set); + bool set); int wmi_set_access_params_cmd(struct wmi_t *wmip, A_UINT8 ac, A_UINT16 txop, A_UINT8 eCWmin, A_UINT8 eCWmax, A_UINT8 aifsn); @@ -323,7 +323,7 @@ wmi_mcast_filter_cmd(struct wmi_t *wmip, A_UINT8 enable); bss_t * wmi_find_Ssidnode (struct wmi_t *wmip, A_UCHAR *pSsid, - A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID); + A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID); void @@ -375,7 +375,7 @@ int wmi_ap_set_mlme(struct wmi_t *wmip, A_UINT8 cmd, A_UINT8 *mac, A_UINT16 reason); int -wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, A_BOOL flag); +wmi_set_pvb_cmd(struct wmi_t *wmip, A_UINT16 aid, bool flag); int wmi_ap_conn_inact_time(struct wmi_t *wmip, A_UINT32 period); @@ -405,16 +405,16 @@ int wmi_setup_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid); int -wmi_delete_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid, A_BOOL uplink); +wmi_delete_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid, bool uplink); int wmi_allow_aggr_cmd(struct wmi_t *wmip, A_UINT16 tx_tidmask, A_UINT16 rx_tidmask); int -wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, A_BOOL rxDot11Hdr, A_BOOL defragOnHost); +wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, bool rxDot11Hdr, bool defragOnHost); int -wmi_set_thin_mode_cmd(struct wmi_t *wmip, A_BOOL bThinMode); +wmi_set_thin_mode_cmd(struct wmi_t *wmip, bool bThinMode); int wmi_set_wlan_conn_precedence_cmd(struct wmi_t *wmip, BT_WLAN_CONN_PRECEDENCE precedence); diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c index 4bdc48925ebc..f61dd44a2626 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c @@ -73,9 +73,9 @@ static int SendHCICommand(AR3K_CONFIG_INFO *pConfig, AR6K_CONTROL_PKT_TAG); /* issue synchronously */ - status = HCI_TransportSendPkt(pConfig->pHCIDev,pPacket,TRUE); + status = HCI_TransportSendPkt(pConfig->pHCIDev,pPacket,true); - } while (FALSE); + } while (false); if (pPacket != NULL) { A_FREE(pPacket); @@ -113,7 +113,7 @@ static int RecvHCIEvent(AR3K_CONFIG_INFO *pConfig, *pLength = pRecvPacket->ActualLength; - } while (FALSE); + } while (false); if (pRecvPacket != NULL) { A_FREE(pRecvPacket); @@ -132,7 +132,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, A_UINT8 *pBuffer = NULL; A_UINT8 *pTemp; int length; - A_BOOL commandComplete = FALSE; + bool commandComplete = false; A_UINT8 opCodeBytes[2]; do { @@ -177,7 +177,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, if (pTemp[0] == HCI_CMD_COMPLETE_EVENT_CODE) { if ((pTemp[HCI_EVENT_OPCODE_BYTE_LOW] == opCodeBytes[0]) && (pTemp[HCI_EVENT_OPCODE_BYTE_HI] == opCodeBytes[1])) { - commandComplete = TRUE; + commandComplete = true; } } @@ -200,7 +200,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, pBuffer = NULL; } - } while (FALSE); + } while (false); if (pBuffer != NULL) { A_FREE(pBuffer); @@ -265,7 +265,7 @@ static int AR3KConfigureHCIBaud(AR3K_CONFIG_INFO *pConfig) ("AR3K Config: Baud changed to %d for AR6K\n", pConfig->AR3KBaudRate)); } - } while (FALSE); + } while (false); if (pBufferToFree != NULL) { A_FREE(pBufferToFree); @@ -467,7 +467,7 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) } /* disable asynchronous recv while we issue commands and receive events synchronously */ - status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE); + status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,false); if (status) { break; } @@ -507,13 +507,13 @@ int AR3KConfigure(AR3K_CONFIG_INFO *pConfig) } /* re-enable asynchronous recv */ - status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE); + status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,true); if (status) { break; } - } while (FALSE); + } while (false); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Configuration Complete (status = %d) \n",status)); @@ -536,7 +536,7 @@ int AR3KConfigureExit(void *config) } /* disable asynchronous recv while we issue commands and receive events synchronously */ - status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,FALSE); + status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,false); if (status) { break; } @@ -550,13 +550,13 @@ int AR3KConfigureExit(void *config) } /* re-enable asynchronous recv */ - status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,TRUE); + status = HCI_TransportEnableDisableAsyncRecv(pConfig->pHCIDev,true); if (status) { break; } - } while (FALSE); + } while (false); AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("AR3K Config: Cleanup Complete (status = %d) \n",status)); diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c index e2a67fcfe3c8..e87f598a0ca0 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c @@ -54,7 +54,7 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, A_UINT32 Rom_Version; A_UINT32 Build_Version; -extern A_BOOL BDADDR; +extern bool BDADDR; int getDeviceType(AR3K_CONFIG_INFO *pConfig, A_UINT32 * code); int ReadVersionInfo(AR3K_CONFIG_INFO *pConfig); @@ -118,7 +118,7 @@ int AthPSInitialize(AR3K_CONFIG_INFO *hdev) remove_wait_queue(&PsCompleteEvent,&wait); return A_ERROR; } - wait_event_interruptible(PsCompleteEvent,(PSTagMode == FALSE)); + wait_event_interruptible(PsCompleteEvent,(PSTagMode == false)); set_current_state(TASK_RUNNING); remove_wait_queue(&PsCompleteEvent,&wait); @@ -157,7 +157,7 @@ int PSSendOps(void *arg) #else device = hdev; firmwareDev = &device->dev; - AthEnableSyncCommandOp(TRUE); + AthEnableSyncCommandOp(true); #endif /* HCI_TRANSPORT_SDIO */ /* First verify if the controller is an FPGA or ASIC, so depending on the device type the PS file to be written will be different. */ @@ -326,7 +326,7 @@ int PSSendOps(void *arg) } } #ifdef HCI_TRANSPORT_SDIO - if(BDADDR == FALSE) + if(BDADDR == false) if(hdev->bdaddr[0] !=0x00 || hdev->bdaddr[1] !=0x00 || hdev->bdaddr[2] !=0x00 || @@ -368,8 +368,8 @@ int PSSendOps(void *arg) } complete: #ifndef HCI_TRANSPORT_SDIO - AthEnableSyncCommandOp(FALSE); - PSTagMode = FALSE; + AthEnableSyncCommandOp(false); + PSTagMode = false; wake_up_interruptible(&PsCompleteEvent); #endif /* HCI_TRANSPORT_SDIO */ if(NULL != HciCmdList) { @@ -399,13 +399,13 @@ int SendHCICommandWaitCommandComplete(AR3K_CONFIG_INFO *pConfig, return A_ERROR; } Hci_log("COM Write -->",pHCICommand,CmdLength); - PSAcked = FALSE; + PSAcked = false; if(PSHciWritepacket(pConfig,pHCICommand,CmdLength) == 0) { /* If the controller is not available, return Error */ return A_ERROR; } //add_timer(&psCmdTimer); - wait_event_interruptible(HciEvent,(PSAcked == TRUE)); + wait_event_interruptible(HciEvent,(PSAcked == true)); if(NULL != HciEventpacket) { *ppEventBuffer = HciEventpacket; *ppBufferToFree = HciEventpacket; diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c index 5df17661c4a1..b3013c58d83a 100644 --- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c +++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c @@ -102,7 +102,7 @@ typedef struct tRamPatch typedef struct ST_PS_DATA_FORMAT { enum eType eDataType; - A_BOOL bIsArray; + bool bIsArray; }ST_PS_DATA_FORMAT; typedef struct ST_READ_STATUS { @@ -120,7 +120,7 @@ static A_UINT32 Tag_Count = 0; /* Stores the number of patch commands */ static A_UINT32 Patch_Count = 0; static A_UINT32 Total_tag_lenght = 0; -A_BOOL BDADDR = FALSE; +bool BDADDR = false; A_UINT32 StartTagId; tPsTagEntry PsTagEntry[RAMPS_MAX_PS_TAGS_PER_FILE]; @@ -663,12 +663,12 @@ int AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen) { int status; int i; - A_BOOL BDADDR_Present = FALSE; + bool BDADDR_Present = false; Tag_Count = 0; Total_tag_lenght = 0; - BDADDR = FALSE; + BDADDR = false; status = A_ERROR; @@ -689,7 +689,7 @@ int AthDoParsePS(A_UCHAR *srcbuffer, A_UINT32 srclen) else{ for(i=0; iCurrentFreeCredits <= 0) { AR_DEBUG_PRINTF(ATH_LOG_INF, ("Not enough credits (%d) to do credit distributions \n", TotalCredits)); - A_ASSERT(FALSE); + A_ASSERT(false); return; } @@ -382,7 +382,7 @@ static void SeekCredits(COMMON_CREDIT_STATE_INFO *pCredInfo, /* return what we can get */ credits = min(pCredInfo->CurrentFreeCredits,pEPDist->TxCreditsSeek); - } while (FALSE); + } while (false); /* did we find some credits? */ if (credits) { diff --git a/drivers/staging/ath6kl/os/linux/ar6000_android.c b/drivers/staging/ath6kl/os/linux/ar6000_android.c index ce1a94c38ff7..7759a3d8703f 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_android.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_android.c @@ -29,7 +29,7 @@ #include #endif -A_BOOL enable_mmc_host_detect_change = FALSE; +bool enable_mmc_host_detect_change = false; static void ar6000_enable_mmchost_detect_change(int enable); @@ -336,21 +336,21 @@ void android_module_exit(void) } #ifdef CONFIG_PM -void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent) +void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) { if ( #ifdef CONFIG_HAS_EARLYSUSPEND screen_is_off && #endif skb && ar->arConnected) { - A_BOOL needWake = FALSE; + bool needWake = false; if (isEvent) { if (A_NETBUF_LEN(skb) >= sizeof(A_UINT16)) { A_UINT16 cmd = *(const A_UINT16 *)A_NETBUF_DATA(skb); switch (cmd) { case WMI_CONNECT_EVENTID: case WMI_DISCONNECT_EVENTID: - needWake = TRUE; + needWake = true; break; default: /* dont wake lock the system for other event */ @@ -365,7 +365,7 @@ void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL i case 0x888e: /* EAPOL */ case 0x88c7: /* RSN_PREAUTH */ case 0x88b4: /* WAPI */ - needWake = TRUE; + needWake = true; break; case 0x0806: /* ARP is not important to hold wake lock */ default: diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 5a5e0852b9e7..5bf505ca4a2c 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c @@ -102,7 +102,7 @@ MODULE_LICENSE("Dual BSD/GPL"); #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; @@ -449,7 +449,7 @@ dbglog_get_debug_hdr_ptr(AR_SOFTC_T *ar) void ar6000_dbglog_init_done(AR_SOFTC_T *ar) { - ar->dbglog_init_done = TRUE; + ar->dbglog_init_done = true; } A_UINT32 @@ -540,7 +540,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) } /* block out others */ - ar->dbgLogFetchInProgress = TRUE; + ar->dbgLogFetchInProgress = true; AR6000_SPIN_UNLOCK(&ar->arLock, 0); @@ -592,7 +592,7 @@ ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar) } while (address != firstbuf); } - ar->dbgLogFetchInProgress = FALSE; + ar->dbgLogFetchInProgress = false; return A_OK; } @@ -757,12 +757,12 @@ aptcTimerHandler(unsigned long arg) 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); } @@ -818,7 +818,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj, if (index == MAX_AR6000) return 0; - if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, TRUE)) != A_OK) { + if ((BMIRawRead(ar->arHifDevice, (A_UCHAR*)buf, count, true)) != A_OK) { return 0; } @@ -994,7 +994,7 @@ ar6000_softmac_update(AR_SOFTC_T *ar, A_UCHAR *eeprom_data, size_t size) #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; @@ -1034,7 +1034,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A ar->arVersion.target_ver)); return A_ERROR; } - compressed = FALSE; + compressed = false; } #ifdef CONFIG_HOST_TCMD_SUPPORT @@ -1047,7 +1047,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A 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 @@ -1060,7 +1060,7 @@ ar6000_transfer_bin_file(AR_SOFTC_T *ar, AR6K_BIN_FILE file, A_UINT32 address, A AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unknown firmware revision: %d\n", ar->arVersion.target_ver)); return A_ERROR; } - compressed = FALSE; + compressed = false; } #endif break; @@ -1286,7 +1286,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode) AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Board Data download address: 0x%x\n", address)); /* Write EEPROM data to Target RAM */ - if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, FALSE)) != A_OK) { + if ((ar6000_transfer_bin_file(ar, AR6K_BOARD_DATA_FILE, address, false)) != A_OK) { return A_ERROR; } @@ -1296,7 +1296,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode) /* Transfer One time Programmable data */ AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); - status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, TRUE); + status = ar6000_transfer_bin_file(ar, AR6K_OTP_FILE, address, true); if (status == A_OK) { /* Execute the OTP code */ param = 0; @@ -1312,7 +1312,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode) /* Download Target firmware */ AR6K_DATA_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); - if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, TRUE)) != A_OK) { + if ((ar6000_transfer_bin_file(ar, AR6K_FIRMWARE_FILE, address, true)) != A_OK) { return A_ERROR; } @@ -1322,7 +1322,7 @@ ar6000_sysfs_bmi_get_config(AR_SOFTC_T *ar, A_UINT32 mode) /* Apply the patches */ AR6K_PATCH_DOWNLOAD_ADDRESS(address, ar->arVersion.target_ver); - if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, FALSE)) != A_OK) { + if ((ar6000_transfer_bin_file(ar, AR6K_PATCH_FILE, address, false)) != A_OK) { return A_ERROR; } @@ -1685,10 +1685,10 @@ ar6000_avail_ev(void *context, void *hif_handle) 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; @@ -1697,7 +1697,7 @@ ar6000_avail_ev(void *context, void *hif_handle) 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; @@ -1705,7 +1705,7 @@ ar6000_avail_ev(void *context, void *hif_handle) 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); @@ -1813,7 +1813,7 @@ ar6000_avail_ev(void *context, void *hif_handle) 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; @@ -1852,7 +1852,7 @@ static void ar6000_target_failure(void *Instance, int 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) { @@ -1873,7 +1873,7 @@ static void ar6000_target_failure(void *Instance, int Status) /* 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, @@ -1930,7 +1930,7 @@ ar6000_restart_endpoint(struct net_device *dev) } 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); @@ -1938,11 +1938,11 @@ ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglo 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) { @@ -1959,9 +1959,9 @@ ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglo 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. @@ -1972,14 +1972,14 @@ ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglo * 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; @@ -1995,11 +1995,11 @@ ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglo __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; } } @@ -2046,8 +2046,8 @@ ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglo * 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")); @@ -2082,7 +2082,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister) return; } - ar->bIsDestroyProgress = TRUE; + ar->bIsDestroyProgress = true; if (down_interruptible(&ar->arSem)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("%s(): down_interruptible failed \n", __func__)); @@ -2091,7 +2091,7 @@ ar6000_destroy(struct net_device *dev, unsigned int unregister) 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); @@ -2193,7 +2193,7 @@ static void ar6000_detect_error(unsigned long ptr) /* 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); @@ -2234,13 +2234,13 @@ void ar6000_init_profile_info(AR_SOFTC_T *ar) 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)); @@ -2250,12 +2250,12 @@ ar6000_init_control_info(AR_SOFTC_T *ar) 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)); @@ -2322,14 +2322,14 @@ ar6000_close(struct net_device *dev) #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; @@ -2389,7 +2389,7 @@ static int ar6000_connectservice(AR_SOFTC_T *ar, break; } - } while (FALSE); + } while (false); return status; } @@ -2480,7 +2480,7 @@ int ar6000_init(struct net_device *dev) #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__)); @@ -2632,7 +2632,7 @@ int ar6000_init(struct net_device *dev) status = ar6k_setup_hci_pal(ar); #endif - } while (FALSE); + } while (false); if (status) { ret = -EIO; @@ -2670,9 +2670,9 @@ int ar6000_init(struct net_device *dev) 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); @@ -2683,7 +2683,7 @@ int ar6000_init(struct net_device *dev) 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)); @@ -2708,7 +2708,7 @@ int ar6000_init(struct net_device *dev) } /* 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")); @@ -2893,7 +2893,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) 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 @@ -2920,7 +2920,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) do { - if (ar->arWmiReady == FALSE && bypasswmi == 0) { + if (ar->arWmiReady == false && bypasswmi == 0) { break; } @@ -2943,19 +2943,19 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) */ if (IEEE80211_IS_MULTICAST(datap->dstMac)) { A_UINT8 ctr=0; - A_BOOL qMcast=FALSE; + bool qMcast=false; for (ctr=0; ctrsta_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); @@ -2976,7 +2976,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) */ A_MUTEX_LOCK(&ar->mcastpsqLock); if(!A_NETBUF_QUEUE_EMPTY(&ar->mcastpsq)) { - bMoreData = TRUE; + bMoreData = true; } A_MUTEX_UNLOCK(&ar->mcastpsqLock); } @@ -2987,7 +2987,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) 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); @@ -3008,7 +3008,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) */ A_MUTEX_LOCK(&conn->psqLock); if (!A_NETBUF_QUEUE_EMPTY(&conn->psq)) { - bMoreData = TRUE; + bMoreData = true; } A_MUTEX_UNLOCK(&conn->psqLock); } @@ -3089,7 +3089,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) 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 */ @@ -3134,7 +3134,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) } } - } while (FALSE); + } while (false); /* did we succeed ? */ if ((ac == AC_NOT_MAPPED) && !checkAdHocPsMapping) { @@ -3171,7 +3171,7 @@ ar6000_data_tx(struct sk_buff *skb, struct net_device *dev) ar->arTotalTxDataPending++; } - } while (FALSE); + } while (false); AR6000_SPIN_UNLOCK(&ar->arLock, 0); @@ -3290,12 +3290,12 @@ applyAPTCHeuristics(AR_SOFTC_T *ar) 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; } } } @@ -3308,7 +3308,7 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPac { 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 { @@ -3325,10 +3325,10 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPac /* 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; } @@ -3339,11 +3339,11 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPac * 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; } @@ -3357,7 +3357,7 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPac 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 @@ -3369,15 +3369,15 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPac * 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() */ @@ -3396,11 +3396,11 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) 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); @@ -3445,18 +3445,18 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) { 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) { @@ -3465,7 +3465,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) } } 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 @@ -3497,7 +3497,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) ar6000_free_cookie(ar, ar_cookie); if (ar->arNetQueueStopped) { - ar->arNetQueueStopped = FALSE; + ar->arNetQueueStopped = false; } } @@ -3512,7 +3512,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) 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 */ @@ -3619,23 +3619,23 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) 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 @@ -3742,7 +3742,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) } } else { /* This frame is from a STA that is not associated*/ - A_ASSERT(FALSE); + A_ASSERT(false); } /* Drop NULL data frames here */ @@ -3753,7 +3753,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) } } - 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); @@ -3805,7 +3805,7 @@ ar6000_rx(void *Context, HTC_PACKET *pPacket) *((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; } } @@ -3870,7 +3870,7 @@ ar6000_deliver_frames_to_nw_stack(void *dev, void *osbuf) 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); /* @@ -3963,7 +3963,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) 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); @@ -3975,7 +3975,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) osBuf = pPacket->pPktContext; if (NULL == osBuf) { - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -4030,12 +4030,12 @@ static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpo 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; } @@ -4052,7 +4052,7 @@ static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpo /* set actual endpoint ID */ pPacket->Endpoint = Endpoint; - } while (FALSE); + } while (false); if (refillCount >= AR6000_AMSDU_REFILL_THRESHOLD) { ar6000_refill_amsdu_rxbufs(ar,refillCount); @@ -4082,7 +4082,7 @@ ar6000_get_iwstats(struct net_device * dev) 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; @@ -4132,13 +4132,13 @@ ar6000_get_iwstats(struct net_device * dev) 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; @@ -4178,7 +4178,7 @@ ar6000_ready_event(void *devt, A_UINT8 *datap, A_UINT8 phyCap, A_UINT32 sw_ver, 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 @@ -4280,7 +4280,7 @@ ar6000_connect_event(AR_SOFTC_T *ar, A_UINT16 channel, A_UINT8 *bssid, break; } skip_key: - ar->arConnected = TRUE; + ar->arConnected = true; return; } @@ -4450,7 +4450,7 @@ skip_key: #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; @@ -4487,8 +4487,8 @@ skip_key: /* 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 */ @@ -4654,15 +4654,15 @@ ar6000_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason, A_UINT8 *bssid, */ 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; } } @@ -4684,7 +4684,7 @@ ar6000_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason, A_UINT8 *bssid, * 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) { @@ -4696,7 +4696,7 @@ ar6000_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason, A_UINT8 *bssid, /* 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); @@ -4784,7 +4784,7 @@ ar6000_hci_event_rcv_evt(struct ar6_softc *ar, WMI_HCI_EVENT *cmd) 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); @@ -4850,7 +4850,7 @@ ar6000_neighborReport_event(AR_SOFTC_T *ar, int numAps, WMI_NEIGHBOR_INFO *info) } 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]; @@ -5028,7 +5028,7 @@ ar6000_targetStats_event(AR_SOFTC_T *ar, A_UINT8 *ptr, A_UINT32 len) pStats->arp_replied += pTarget->arpStats.arp_replied; if (ar->statsUpdatePending) { - ar->statsUpdatePending = FALSE; + ar->statsUpdatePending = false; wake_up(&arEvent); } } @@ -5065,7 +5065,7 @@ ar6000_hbChallengeResp_event(AR_SOFTC_T *ar, A_UINT32 cookie, A_UINT32 source) } 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; } } } @@ -5312,7 +5312,7 @@ ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid) wmiSendCmdNum++; - } while (FALSE); + } while (false); if (cookie != NULL) { /* got a structure to send it out on */ @@ -5347,7 +5347,7 @@ ar6000_control_tx(void *devt, void *osbuf, HTC_ENDPOINT_ID eid) } /* 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 ; @@ -5438,7 +5438,7 @@ ar6000_btcoex_config_event(struct ar6_softc *ar, A_UINT8 *ptr, A_UINT32 len) break; } if (ar->statsUpdatePending) { - ar->statsUpdatePending = FALSE; + ar->statsUpdatePending = false; wake_up(&arEvent); } } @@ -5453,7 +5453,7 @@ ar6000_btcoex_stats_event(struct ar6_softc *ar, A_UINT8 *ptr, A_UINT32 len) A_MEMCPY(&ar->arBtcoexStats, pBtcoexStats, sizeof(WMI_BTCOEX_STATS_EVENT)); if (ar->statsUpdatePending) { - ar->statsUpdatePending = FALSE; + ar->statsUpdatePending = false; wake_up(&arEvent); } @@ -5708,7 +5708,7 @@ ar6000_pmkid_list_event(void *devt, A_UINT8 numPMKID, WMI_PMKID *pmkidList, 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); @@ -5747,7 +5747,7 @@ void ar6000_pspoll_event(AR_SOFTC_T *ar,A_UINT8 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. @@ -5766,11 +5766,11 @@ void ar6000_dtimexpiry_event(AR_SOFTC_T *ar) 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)) { @@ -5784,7 +5784,7 @@ void ar6000_dtimexpiry_event(AR_SOFTC_T *ar) 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); @@ -5893,7 +5893,7 @@ rssi_compensation_calc(AR_SOFTC_T *ar, A_INT16 rssi) } 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; @@ -6091,11 +6091,11 @@ ar6000_ap_mode_profile_commit(struct ar6_softc *ar) 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; @@ -6108,7 +6108,7 @@ ar6000_connect_to_ap(struct ar6_softc *ar) /* 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) && @@ -6167,7 +6167,7 @@ ar6000_connect_to_ap(struct ar6_softc *ar) ar->arConnectCtrlFlags &= ~CONNECT_DO_WPA_OFFLOAD; - ar->arConnectPending = TRUE; + ar->arConnectPending = true; return status; } return A_ERROR; diff --git a/drivers/staging/ath6kl/os/linux/ar6000_pm.c b/drivers/staging/ath6kl/os/linux/ar6000_pm.c index fbac26429d84..a7a48292291c 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_pm.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_pm.c @@ -37,7 +37,7 @@ extern unsigned int wmitimeout; extern wait_queue_head_t arEvent; #ifdef ANDROID_ENV -extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent); +extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent); #endif #undef ATH_MODULE_NAME #define ATH_MODULE_NAME pm @@ -60,7 +60,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(pm, int ar6000_exit_cut_power_state(AR_SOFTC_T *ar); #ifdef CONFIG_PM -static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, A_BOOL asleep) +static void ar6k_send_asleep_event_to_app(AR_SOFTC_T *ar, bool asleep) { char buf[128]; union iwreq_data wrqu; @@ -76,7 +76,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar) if (ar->arWowState!= WLAN_WOW_STATE_NONE) { A_UINT16 fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period; A_UINT16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period; - WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {TRUE, FALSE}; + WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {true, false}; ar->arWowState = WLAN_WOW_STATE_NONE; if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n")); @@ -102,7 +102,7 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar) if (wmi_listeninterval_cmd(ar->arWmi, ar->arListenIntervalT, ar->arListenIntervalB) == A_OK) { } #endif - ar6k_send_asleep_event_to_app(ar, FALSE); + ar6k_send_asleep_event_to_app(ar, false); AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Resume WoW successfully\n")); } else { AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("WoW does not invoked. skip resume")); @@ -125,8 +125,8 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar) int status; WMI_ADD_WOW_PATTERN_CMD addWowCmd = { .filter = { 0 } }; WMI_DEL_WOW_PATTERN_CMD delWowCmd; - WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {FALSE, TRUE}; - WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = TRUE, + WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {false, true}; + WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = true, .hostReqDelay = 500 };/*500 ms delay*/ if (ar->arWowState!= WLAN_WOW_STATE_NONE) { @@ -185,7 +185,7 @@ static void ar6000_wow_suspend(AR_SOFTC_T *ar) if (status != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to enable wow mode\n")); } - ar6k_send_asleep_event_to_app(ar, TRUE); + ar6k_send_asleep_event_to_app(ar, true); status = wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode); if (status != A_OK) { @@ -234,7 +234,7 @@ wow_not_connected: case WLAN_SUSPEND_DEEP_SLEEP: /* fall through */ default: - status = ar6000_update_wlan_pwr_state(ar, WLAN_DISABLED, TRUE); + status = ar6000_update_wlan_pwr_state(ar, WLAN_DISABLED, true); if (ar->arWlanPowerState==WLAN_POWER_STATE_ON || ar->arWlanPowerState==WLAN_POWER_STATE_WOW) { AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("Strange suspend state for not wow mode %d", ar->arWlanPowerState)); @@ -261,7 +261,7 @@ int ar6000_resume_ev(void *context) case WLAN_POWER_STATE_CUT_PWR: /* fall through */ case WLAN_POWER_STATE_DEEP_SLEEP: - ar6000_update_wlan_pwr_state(ar, WLAN_ENABLED, TRUE); + ar6000_update_wlan_pwr_state(ar, WLAN_ENABLED, true); AR_DEBUG_PRINTF(ATH_DEBUG_PM,("%s:Resume for %d mode pwr %d\n", __func__, powerState, ar->arWlanPowerState)); break; case WLAN_POWER_STATE_ON: @@ -273,7 +273,7 @@ int ar6000_resume_ev(void *context) return A_OK; } -void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent) +void ar6000_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, bool isEvent) { if (ar->arWowState!=WLAN_WOW_STATE_NONE) { if (ar->arWowState==WLAN_WOW_STATE_SUSPENDING) { @@ -376,7 +376,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) #ifdef ANDROID_ENV /* Wait for WMI ready event */ A_UINT32 timeleft = wait_event_interruptible_timeout(arEvent, - (ar->arWmiReady == TRUE), wmitimeout * HZ); + (ar->arWmiReady == true), wmitimeout * HZ); if (!timeleft || signal_pending(current)) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("ar6000 : Failed to get wmi ready \n")); status = A_ERROR; @@ -395,7 +395,7 @@ ar6000_setup_cut_power_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) if (ar->arWlanPowerState == WLAN_POWER_STATE_CUT_PWR) { break; } - ar6000_stop_endpoint(ar->arNetDev, TRUE, FALSE); + ar6000_stop_endpoint(ar->arNetDev, true, false); config = HIF_DEVICE_POWER_CUT; status = HIFConfigureDevice(ar->arHifDevice, @@ -436,8 +436,8 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) } fg_start_period = (ar->scParams.fg_start_period==0) ? 1 : ar->scParams.fg_start_period; - hostSleepMode.awake = TRUE; - hostSleepMode.asleep = FALSE; + hostSleepMode.awake = true; + hostSleepMode.asleep = false; if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)) != A_OK) { break; @@ -471,7 +471,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) } } } else if (state == WLAN_DISABLED){ - WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = FALSE }; + WMI_SET_WOW_MODE_CMD wowMode = { .enable_wow = false }; /* Already in deep sleep state.. exit */ if (ar->arWlanPowerState != WLAN_POWER_STATE_ON) { @@ -485,7 +485,7 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) { /* Disconnect from the AP and disable foreground scanning */ AR6000_SPIN_LOCK(&ar->arLock, 0); - if (ar->arConnected == TRUE || ar->arConnectPending == TRUE) { + if (ar->arConnected == true || ar->arConnectPending == true) { AR6000_SPIN_UNLOCK(&ar->arLock, 0); wmi_disconnect_cmd(ar->arWmi); } else { @@ -510,8 +510,8 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) wmi_powermode_cmd(ar->arWmi, REC_POWER); #endif - hostSleepMode.awake = FALSE; - hostSleepMode.asleep = TRUE; + hostSleepMode.awake = false; + hostSleepMode.asleep = true; if ((status=wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode))!=A_OK) { break; } @@ -537,14 +537,14 @@ ar6000_setup_deep_sleep_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) } int -ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL pmEvent) +ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool pmEvent) { int status = A_OK; A_UINT16 powerState, oldPowerState; AR6000_WLAN_STATE oldstate = ar->arWlanState; - A_BOOL wlanOff = ar->arWlanOff; + bool wlanOff = ar->arWlanOff; #ifdef CONFIG_PM - A_BOOL btOff = ar->arBTOff; + bool btOff = ar->arBTOff; #endif /* CONFIG_PM */ if ((state!=WLAN_DISABLED && state!=WLAN_ENABLED)) { @@ -578,7 +578,7 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO } #ifdef CONFIG_PM else if (pmEvent && wlanOff) { - A_BOOL allowCutPwr = ((!ar->arBTSharing) || btOff); + bool allowCutPwr = ((!ar->arBTSharing) || btOff); if ((powerState==WLAN_POWER_STATE_CUT_PWR) && (!allowCutPwr)) { /* Come out of cut power */ ar6000_setup_cut_power_state(ar, WLAN_ENABLED); @@ -591,10 +591,10 @@ ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BO powerState = WLAN_POWER_STATE_DEEP_SLEEP; #ifdef CONFIG_PM if (pmEvent) { /* disable due to suspend */ - A_BOOL suspendCutPwr = (ar->arSuspendConfig == WLAN_SUSPEND_CUT_PWR || + bool suspendCutPwr = (ar->arSuspendConfig == WLAN_SUSPEND_CUT_PWR || (ar->arSuspendConfig == WLAN_SUSPEND_WOW && ar->arWow2Config==WLAN_SUSPEND_CUT_PWR)); - A_BOOL suspendCutIfBtOff = ((ar->arSuspendConfig == + bool suspendCutIfBtOff = ((ar->arSuspendConfig == WLAN_SUSPEND_CUT_PWR_IF_BT_OFF || (ar->arSuspendConfig == WLAN_SUSPEND_WOW && ar->arWow2Config==WLAN_SUSPEND_CUT_PWR_IF_BT_OFF)) && @@ -654,13 +654,13 @@ int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 enable) { #ifdef CONFIG_PM - A_BOOL off = (enable == 0); + bool off = (enable == 0); int status; if (ar->arBTOff == off) { return A_OK; } ar->arBTOff = off; - status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, FALSE); + status = ar6000_update_wlan_pwr_state(ar, ar->arWlanOff ? WLAN_DISABLED : WLAN_ENABLED, false); return status; #else return A_OK; @@ -671,12 +671,12 @@ int ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state) { int status; - A_BOOL off = (state == WLAN_DISABLED); + bool off = (state == WLAN_DISABLED); if (ar->arWlanOff == off) { return A_OK; } ar->arWlanOff = off; - status = ar6000_update_wlan_pwr_state(ar, state, FALSE); + status = ar6000_update_wlan_pwr_state(ar, state, false); return status; } diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c index 59e2af4f641e..6c03035051b6 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c @@ -60,7 +60,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket) busy->length = pPacket->ActualLength + HTC_HEADER_LEN; busy->currPtr = HTC_HEADER_LEN; - arRaw->read_buffer_available[streamID] = TRUE; + arRaw->read_buffer_available[streamID] = true; //AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("raw read cb: 0x%X 0x%X \n", busy->currPtr,busy->length); up(&arRaw->raw_htc_read_sem[streamID]); @@ -102,7 +102,7 @@ ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket) A_ASSERT(pPacket->pBuffer == (free->data + HTC_HEADER_LEN)); free->length = 0; - arRaw->write_buffer_available[streamID] = TRUE; + arRaw->write_buffer_available[streamID] = true; up(&arRaw->raw_htc_write_sem[streamID]); /* Signal the waiting process */ @@ -161,7 +161,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar, AR_DEBUG_PRINTF(ATH_DEBUG_HTC_RAW,("HTC RAW : stream ID: %d, endpoint: %d\n", StreamID, arRawStream2EndpointID(ar,StreamID))); - } while (FALSE); + } while (false); return status; } @@ -241,8 +241,8 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) memset(buffer, 0, sizeof(raw_htc_buffer)); } - arRaw->read_buffer_available[streamID] = FALSE; - arRaw->write_buffer_available[streamID] = TRUE; + arRaw->read_buffer_available[streamID] = false; + arRaw->write_buffer_available[streamID] = true; } if (status) { @@ -267,7 +267,7 @@ int ar6000_htc_raw_open(AR_SOFTC_T *ar) return -EIO; } - (ar)->arRawIfInit = TRUE; + (ar)->arRawIfInit = true; return 0; } @@ -278,7 +278,7 @@ int ar6000_htc_raw_close(AR_SOFTC_T *ar) HTCStop(ar->arHtcTarget); /* reset the device */ - ar6000_reset_device(ar->arHifDevice, ar->arTargetType, TRUE, FALSE); + ar6000_reset_device(ar->arHifDevice, ar->arTargetType, true, false); /* Initialize the BMI component */ BMIInit(); @@ -300,9 +300,9 @@ get_filled_buffer(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID) } } if (busy->length) { - arRaw->read_buffer_available[StreamID] = TRUE; + arRaw->read_buffer_available[StreamID] = true; } else { - arRaw->read_buffer_available[StreamID] = FALSE; + arRaw->read_buffer_available[StreamID] = false; } return busy; @@ -361,7 +361,7 @@ ssize_t ar6000_htc_raw_read(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID, //AR_DEBUG_PRINTF(ATH_DEBUG_HTC_RAW,("raw read ioctl: ep for packet:%d \n", busy->HTCPacket.Endpoint)); HTCAddReceivePkt(ar->arHtcTarget, &busy->HTCPacket); } - arRaw->read_buffer_available[StreamID] = FALSE; + arRaw->read_buffer_available[StreamID] = false; up(&arRaw->raw_htc_read_sem[StreamID]); return length; @@ -382,9 +382,9 @@ get_free_buffer(AR_SOFTC_T *ar, HTC_ENDPOINT_ID StreamID) } } if (!free->length) { - arRaw->write_buffer_available[StreamID] = TRUE; + arRaw->write_buffer_available[StreamID] = true; } else { - arRaw->write_buffer_available[StreamID] = FALSE; + arRaw->write_buffer_available[StreamID] = false; } return free; @@ -447,7 +447,7 @@ ssize_t ar6000_htc_raw_write(AR_SOFTC_T *ar, HTC_RAW_STREAM_ID StreamID, HTCSendPkt(ar->arHtcTarget,&free->HTCPacket); - arRaw->write_buffer_available[StreamID] = FALSE; + arRaw->write_buffer_available[StreamID] = false; up(&arRaw->raw_htc_write_sem[StreamID]); return length; diff --git a/drivers/staging/ath6kl/os/linux/ar6k_pal.c b/drivers/staging/ath6kl/os/linux/ar6k_pal.c index 5a0b373cd3e1..bca028afab6a 100644 --- a/drivers/staging/ath6kl/os/linux/ar6k_pal.c +++ b/drivers/staging/ath6kl/os/linux/ar6k_pal.c @@ -157,7 +157,7 @@ static int btpal_send_frame(struct sk_buff *skb) kfree_skb(skb); return 0; default: - A_ASSERT(FALSE); + A_ASSERT(false); kfree_skb(skb); return 0; } @@ -178,7 +178,7 @@ static int btpal_send_frame(struct sk_buff *skb) { PRIN_LOG("HCI command"); - if (ar->arWmiReady == FALSE) + if (ar->arWmiReady == false) { PRIN_LOG("WMI not ready "); break; @@ -195,7 +195,7 @@ static int btpal_send_frame(struct sk_buff *skb) void *osbuf; PRIN_LOG("ACL data"); - if (ar->arWmiReady == FALSE) + if (ar->arWmiReady == false) { PRIN_LOG("WMI not ready"); break; @@ -229,7 +229,7 @@ static int btpal_send_frame(struct sk_buff *skb) } txSkb = NULL; } - } while (FALSE); + } while (false); if (txSkb != NULL) { PRIN_LOG("Free skb"); @@ -302,7 +302,7 @@ static int bt_setup_hci_pal(ar6k_hci_pal_info_t *pHciPalInfo) PRIN_LOG("Normal mode enabled"); bt_set_bit(pHciPalInfo->ulFlags, HCI_NORMAL_MODE); - } while (FALSE); + } while (false); if (status) { bt_cleanup_hci_pal(pHciPalInfo); @@ -328,22 +328,22 @@ void ar6k_cleanup_hci_pal(void *ar_p) /**************************** * Register HCI device ****************************/ -static A_BOOL ar6k_pal_transport_ready(void *pHciPal) +static bool ar6k_pal_transport_ready(void *pHciPal) { ar6k_hci_pal_info_t *pHciPalInfo = (ar6k_hci_pal_info_t *)pHciPal; PRIN_LOG("HCI device transport ready"); if(pHciPalInfo == NULL) - return FALSE; + return false; if (hci_register_dev(pHciPalInfo->hdev) < 0) { PRIN_LOG("Can't register HCI device"); hci_free_dev(pHciPalInfo->hdev); - return FALSE; + return false; } PRIN_LOG("HCI device registered"); pHciPalInfo->ulFlags |= HCI_REGISTERED; - return TRUE; + return true; } /************************************************** @@ -351,11 +351,11 @@ static A_BOOL ar6k_pal_transport_ready(void *pHciPal) * packet is received. Pass the packet to bluetooth * stack via hci_recv_frame. **************************************************/ -A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf) +bool ar6k_pal_recv_pkt(void *pHciPal, void *osbuf) { struct sk_buff *skb = (struct sk_buff *)osbuf; ar6k_hci_pal_info_t *pHciPalInfo; - A_BOOL success = FALSE; + bool success = false; A_UINT8 btType = 0; pHciPalInfo = (ar6k_hci_pal_info_t *)pHciPal; @@ -391,8 +391,8 @@ A_BOOL ar6k_pal_recv_pkt(void *pHciPal, void *osbuf) PRIN_LOG("HCI PAL: Indicated RCV of type:%d, Length:%d \n",HCI_EVENT_PKT, skb->len); } PRIN_LOG("hci recv success"); - success = TRUE; - }while(FALSE); + success = true; + }while(false); return success; } @@ -435,7 +435,7 @@ int ar6k_setup_hci_pal(void *ar_p) ar6k_pal_config.fpar6k_pal_recv_pkt = ar6k_pal_recv_pkt; register_pal_cb(&ar6k_pal_config); ar6k_pal_transport_ready(ar->hcipal_info); - } while (FALSE); + } while (false); if (status) { ar6k_cleanup_hci_pal(ar); diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 936879e06c23..f03e4c108bd6 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c @@ -183,7 +183,7 @@ ar6k_set_auth_type(AR_SOFTC_T *ar, enum nl80211_auth_type auth_type) } static int -ar6k_set_cipher(AR_SOFTC_T *ar, A_UINT32 cipher, A_BOOL ucast) +ar6k_set_cipher(AR_SOFTC_T *ar, A_UINT32 cipher, bool ucast) { A_UINT8 *ar_cipher = ucast ? &ar->arPairwiseCrypto : &ar->arGroupCrypto; @@ -249,7 +249,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready yet\n", __func__)); return -EIO; } @@ -269,7 +269,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, return -EINVAL; } - if(ar->arSkipScan == TRUE && + if(ar->arSkipScan == true && ((sme->channel && sme->channel->center_freq == 0) || (sme->bssid && !sme->bssid[0] && !sme->bssid[1] && !sme->bssid[2] && !sme->bssid[3] && !sme->bssid[4] && !sme->bssid[5]))) @@ -302,10 +302,10 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, } } - if(ar->arConnected == TRUE && + if(ar->arConnected == true && ar->arSsidLen == sme->ssid_len && !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) { - reconnect_flag = TRUE; + reconnect_flag = true; status = wmi_reconnect_cmd(ar->arWmi, ar->arReqBssid, ar->arChannelHint); @@ -422,7 +422,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, } ar->arConnectCtrlFlags &= ~CONNECT_DO_WPA_OFFLOAD; - ar->arConnectPending = TRUE; + ar->arConnectPending = true; return 0; } @@ -560,7 +560,7 @@ ar6k_cfg80211_connect_event(AR_SOFTC_T *ar, A_UINT16 channel, return; } - if (FALSE == ar->arConnected) { + if (false == ar->arConnected) { /* inform connect result to cfg80211 */ cfg80211_connect_result(ar->arNetDev, bssid, assocReqIe, assocReqLen, @@ -583,7 +583,7 @@ ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: reason=%u\n", __func__, reason_code)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -608,7 +608,7 @@ ar6k_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, A_MEMZERO(ar->arSsid, sizeof(ar->arSsid)); ar->arSsidLen = 0; - if (ar->arSkipScan == FALSE) { + if (ar->arSkipScan == false) { A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); } @@ -644,7 +644,7 @@ ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason, } } - if(FALSE == ar->arConnected) { + if(false == ar->arConnected) { if(NO_NETWORK_AVAIL == reason) { /* connect cmd failed */ cfg80211_connect_result(ar->arNetDev, bssid, @@ -730,7 +730,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -768,7 +768,7 @@ ar6k_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, forceFgScan = 1; } - if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, FALSE, \ + if(wmi_startscan_cmd(ar->arWmi, WMI_LONG_SCAN, forceFgScan, false, \ 0, 0, 0, NULL) != A_OK) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: wmi_startscan_cmd failed\n", __func__)); ret = -EIO; @@ -819,7 +819,7 @@ ar6k_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s:\n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -907,7 +907,7 @@ ar6k_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -946,7 +946,7 @@ ar6k_cfg80211_get_key(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -986,7 +986,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1030,7 +1030,7 @@ ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1045,7 +1045,7 @@ ar6k_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, struct net_device *ndev, } void -ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, A_BOOL ismcast) +ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, bool ismcast) { AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: keyid %d, ismcast %d\n", __func__, keyid, ismcast)); @@ -1062,7 +1062,7 @@ ar6k_cfg80211_set_wiphy_params(struct wiphy *wiphy, A_UINT32 changed) AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: changed 0x%x\n", __func__, changed)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1100,7 +1100,7 @@ ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting typ AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type 0x%x, dbm %d\n", __func__, type, dbm)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1110,13 +1110,13 @@ ar6k_cfg80211_set_txpower(struct wiphy *wiphy, enum nl80211_tx_power_setting typ return -EIO; } - ar->arTxPwrSet = FALSE; + ar->arTxPwrSet = false; switch(type) { case NL80211_TX_POWER_AUTOMATIC: return 0; case NL80211_TX_POWER_LIMITED: ar->arTxPwr = ar_dbm = dbm; - ar->arTxPwrSet = TRUE; + ar->arTxPwrSet = true; break; default: AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type 0x%x not supported\n", __func__, type)); @@ -1135,7 +1135,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm) AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1145,7 +1145,7 @@ ar6k_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm) return -EIO; } - if((ar->arConnected == TRUE)) { + if((ar->arConnected == true)) { ar->arTxPwr = 0; if(wmi_get_txPwr_cmd(ar->arWmi) != A_OK) { @@ -1175,7 +1175,7 @@ ar6k_cfg80211_set_power_mgmt(struct wiphy *wiphy, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: pmgmt %d, timeout %d\n", __func__, pmgmt, timeout)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1237,7 +1237,7 @@ ar6k_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: type %u\n", __func__, type)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1273,7 +1273,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } @@ -1346,7 +1346,7 @@ ar6k_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: \n", __func__)); - if(ar->arWmiReady == FALSE) { + if(ar->arWmiReady == false) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("%s: Wmi not ready\n", __func__)); return -EIO; } diff --git a/drivers/staging/ath6kl/os/linux/eeprom.c b/drivers/staging/ath6kl/os/linux/eeprom.c index be77fb87ebf5..fd0e0837ad43 100644 --- a/drivers/staging/ath6kl/os/linux/eeprom.c +++ b/drivers/staging/ath6kl/os/linux/eeprom.c @@ -266,7 +266,7 @@ request_4byte_write(int offset, A_UINT32 data) * Check whether or not an EEPROM request that was started * earlier has completed yet. */ -static A_BOOL +static bool request_in_progress(void) { A_UINT32 regval; diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c index 03f4567eafcf..28823df23119 100644 --- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c +++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c @@ -39,15 +39,15 @@ HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); -int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); +int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); -int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, int MaxPollMS); int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); -int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); extern HCI_TRANSPORT_CALLBACKS ar6kHciTransCallbacks; diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c index 857ef8bc4fc6..6e77bff6ef63 100644 --- a/drivers/staging/ath6kl/os/linux/hci_bridge.c +++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c @@ -77,8 +77,8 @@ typedef struct { void *pHCIDev; /* HCI bridge device */ HCI_TRANSPORT_PROPERTIES HCIProps; /* HCI bridge props */ struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */ - A_BOOL HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/ - A_BOOL HciRegistered; /* HCI device registered with stack */ + bool HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/ + bool HciRegistered; /* HCI device registered with stack */ HTC_PACKET_QUEUE HTCPacketStructHead; A_UINT8 *pHTCStructAlloc; spinlock_t BridgeLock; @@ -109,7 +109,7 @@ AR6K_HCI_BRIDGE_INFO *g_pHcidevInfo; static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo); -static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb); static struct sk_buff *bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length); @@ -310,7 +310,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, /* Make sure both AR6K and AR3K have power management enabled */ if (ar3kconfig.PwrMgmtEnabled) { - status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, TRUE); + status = HCI_TransportEnablePowerMgmt(pHcidevInfo->pHCIDev, true); if (status) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to enable TLPM for AR6K! \n")); } @@ -318,7 +318,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle, status = bt_register_hci(pHcidevInfo); - } while (FALSE); + } while (false); return status; } @@ -419,7 +419,7 @@ static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) skb = NULL; } - } while (FALSE); + } while (false); FreeHTCStruct(pHcidevInfo,pPacket); @@ -544,7 +544,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) status = A_ERROR; } - } while (FALSE); + } while (false); if (status) { if (pHcidevInfo != NULL) { @@ -656,10 +656,10 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) HCI_ACL_TYPE, /* send every thing out as ACL */ htc_tag); - HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,FALSE); + HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,false); pPacket = NULL; - } while (FALSE); + } while (false); return status; } @@ -747,7 +747,7 @@ static int bt_send_frame(struct sk_buff *skb) kfree_skb(skb); return 0; default: - A_ASSERT(FALSE); + A_ASSERT(false); kfree_skb(skb); return 0; } @@ -802,11 +802,11 @@ static int bt_send_frame(struct sk_buff *skb) AR_DEBUG_PRINTF(ATH_DEBUG_HCI_SEND, ("HCI Bridge: type:%d, Total Length:%d Bytes \n", type, txSkb->len)); - status = HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,FALSE); + status = HCI_TransportSendPkt(pHcidevInfo->pHCIDev,pPacket,false); pPacket = NULL; txSkb = NULL; - } while (FALSE); + } while (false); if (txSkb != NULL) { kfree_skb(txSkb); @@ -902,9 +902,9 @@ static int bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) pHciDev->destruct = bt_destruct; pHciDev->owner = THIS_MODULE; /* driver is running in normal BT mode */ - pHcidevInfo->HciNormalMode = TRUE; + pHcidevInfo->HciNormalMode = true; - } while (FALSE); + } while (false); if (status) { bt_cleanup_hci(pHcidevInfo); @@ -918,7 +918,7 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) int err; if (pHcidevInfo->HciRegistered) { - pHcidevInfo->HciRegistered = FALSE; + pHcidevInfo->HciRegistered = false; clear_bit(HCI_RUNNING, &pHcidevInfo->pBtStackHCIDev->flags); clear_bit(HCI_UP, &pHcidevInfo->pBtStackHCIDev->flags); clear_bit(HCI_INIT, &pHcidevInfo->pBtStackHCIDev->flags); @@ -944,28 +944,28 @@ static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: registering HCI... \n")); A_ASSERT(pHcidevInfo->pBtStackHCIDev != NULL); /* mark that we are registered */ - pHcidevInfo->HciRegistered = TRUE; + pHcidevInfo->HciRegistered = true; if ((err = hci_register_dev(pHcidevInfo->pBtStackHCIDev)) < 0) { AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("HCI Bridge: failed to register with bluetooth %d\n",err)); - pHcidevInfo->HciRegistered = FALSE; + pHcidevInfo->HciRegistered = false; status = A_ERROR; break; } AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: HCI registered \n")); - } while (FALSE); + } while (false); return status; } -static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb) { A_UINT8 btType; int len; - A_BOOL success = FALSE; + bool success = false; BT_HCI_EVENT_HEADER *pEvent; do { @@ -984,7 +984,7 @@ static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, break; default: btType = 0; - A_ASSERT(FALSE); + A_ASSERT(false); break; } @@ -1015,9 +1015,9 @@ static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, ("HCI Bridge: Indicated RCV of type:%d, Length:%d \n",btType,len)); } - success = TRUE; + success = true; - } while (FALSE); + } while (false); return success; } @@ -1051,26 +1051,26 @@ static void bt_cleanup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) } static int bt_register_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) { - A_ASSERT(FALSE); + A_ASSERT(false); return A_ERROR; } -static A_BOOL bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, +static bool bt_indicate_recv(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, HCI_TRANSPORT_PACKET_TYPE Type, struct sk_buff *skb) { - A_ASSERT(FALSE); - return FALSE; + A_ASSERT(false); + return false; } static struct sk_buff* bt_alloc_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, int Length) { - A_ASSERT(FALSE); + A_ASSERT(false); return NULL; } static void bt_free_buffer(AR6K_HCI_BRIDGE_INFO *pHcidevInfo, struct sk_buff *skb) { - A_ASSERT(FALSE); + A_ASSERT(false); } #endif // } CONFIG_BLUEZ_HCI_BRIDGE diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h index 0dee74a17978..233a1d3cc8e1 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h @@ -104,7 +104,7 @@ struct USER_SAVEDKEYS { struct ieee80211req_key ucast_ik; struct ieee80211req_key bcast_ik; CRYPTO_TYPE keyType; - A_BOOL keyOk; + bool keyOk; }; #endif @@ -412,7 +412,7 @@ struct ar_hb_chlng_resp { A_TIMER timer; A_UINT32 frequency; A_UINT32 seqNum; - A_BOOL outstanding; + bool outstanding; A_UINT8 missCnt; A_UINT8 missThres; }; @@ -456,8 +456,8 @@ typedef struct ar6_raw_htc { wait_queue_head_t raw_htc_write_queue[HTC_RAW_STREAM_NUM_MAX]; raw_htc_buffer raw_htc_read_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_READ_BUFFERS_NUM]; raw_htc_buffer raw_htc_write_buffer[HTC_RAW_STREAM_NUM_MAX][RAW_HTC_WRITE_BUFFERS_NUM]; - A_BOOL write_buffer_available[HTC_RAW_STREAM_NUM_MAX]; - A_BOOL read_buffer_available[HTC_RAW_STREAM_NUM_MAX]; + bool write_buffer_available[HTC_RAW_STREAM_NUM_MAX]; + bool read_buffer_available[HTC_RAW_STREAM_NUM_MAX]; } AR_RAW_HTC_T; typedef struct ar6_softc { @@ -466,9 +466,9 @@ typedef struct ar6_softc { int arTxPending[ENDPOINT_MAX]; int arTotalTxDataPending; A_UINT8 arNumDataEndPts; - A_BOOL arWmiEnabled; - A_BOOL arWmiReady; - A_BOOL arConnected; + bool arWmiEnabled; + bool arWmiReady; + bool arConnected; HTC_HANDLE arHtcTarget; void *arHifDevice; spinlock_t arLock; @@ -495,14 +495,14 @@ typedef struct ar6_softc { A_UINT32 arTargetType; A_INT8 arRssi; A_UINT8 arTxPwr; - A_BOOL arTxPwrSet; + bool arTxPwrSet; A_INT32 arBitRate; struct net_device_stats arNetStats; struct iw_statistics arIwStats; A_INT8 arNumChannels; A_UINT16 arChannelList[32]; A_UINT32 arRegCode; - A_BOOL statsUpdatePending; + bool statsUpdatePending; TARGET_STATS arTargetStats; A_INT8 arMaxRetries; A_UINT8 arPhyCapability; @@ -527,13 +527,13 @@ typedef struct ar6_softc { A_UINT32 arRateMask; A_UINT8 arSkipScan; A_UINT16 arBeaconInterval; - A_BOOL arConnectPending; - A_BOOL arWmmEnabled; + bool arConnectPending; + bool arWmmEnabled; struct ar_hb_chlng_resp arHBChallengeResp; A_UINT8 arKeepaliveConfigured; A_UINT32 arMgmtFilter; HTC_ENDPOINT_ID arAc2EpMapping[WMM_NUM_AC]; - A_BOOL arAcStreamActive[WMM_NUM_AC]; + bool arAcStreamActive[WMM_NUM_AC]; A_UINT8 arAcStreamPriMap[WMM_NUM_AC]; A_UINT8 arHiAcStreamActivePri; A_UINT8 arEp2AcMapping[ENDPOINT_MAX]; @@ -541,12 +541,12 @@ typedef struct ar6_softc { #ifdef HTC_RAW_INTERFACE AR_RAW_HTC_T *arRawHtc; #endif - A_BOOL arNetQueueStopped; - A_BOOL arRawIfInit; + bool arNetQueueStopped; + bool arRawIfInit; int arDeviceIndex; COMMON_CREDIT_STATE_INFO arCreditStateInfo; - A_BOOL arWMIControlEpFull; - A_BOOL dbgLogFetchInProgress; + bool arWMIControlEpFull; + bool dbgLogFetchInProgress; A_UCHAR log_buffer[DBGLOG_HOST_LOG_BUFFER_SIZE]; A_UINT32 log_cnt; A_UINT32 dbglog_init_done; @@ -565,7 +565,7 @@ typedef struct ar6_softc { struct ieee80211req_key ap_mode_bkey; /* AP mode */ A_NETBUF_QUEUE_T mcastpsq; /* power save q for Mcast frames */ A_MUTEX_T mcastpsqLock; - A_BOOL DTIMExpired; /* flag to indicate DTIM expired */ + bool DTIMExpired; /* flag to indicate DTIM expired */ A_UINT8 intra_bss; /* enable/disable intra bss data forward */ void *aggr_cntxt; #ifndef EXPORT_HCI_BRIDGE_INTERFACE @@ -581,7 +581,7 @@ typedef struct ar6_softc { A_UINT16 arRTS; A_UINT16 arACS; /* AP mode - Auto Channel Selection */ HTC_PACKET_QUEUE amsdu_rx_buffer_queue; - A_BOOL bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */ + bool bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */ A_TIMER disconnect_timer; A_UINT8 rxMetaVersion; #ifdef WAPI_ENABLE @@ -597,11 +597,11 @@ typedef struct ar6_softc { struct ar_key keys[WMI_MAX_KEY_INDEX + 1]; #endif /* ATH6K_CONFIG_CFG80211 */ A_UINT16 arWlanPowerState; - A_BOOL arWlanOff; + bool arWlanOff; #ifdef CONFIG_PM A_UINT16 arWowState; - A_BOOL arBTOff; - A_BOOL arBTSharing; + bool arBTOff; + bool arBTSharing; A_UINT16 arSuspendConfig; A_UINT16 arWlanOffConfig; A_UINT16 arWow2Config; @@ -611,7 +611,7 @@ typedef struct ar6_softc { #define AR_MCAST_FILTER_MAC_ADDR_SIZE 4 A_UINT8 mcast_filters[MAC_MAX_FILTERS_PER_LIST][AR_MCAST_FILTER_MAC_ADDR_SIZE]; A_UINT8 bdaddr[6]; - A_BOOL scanSpecificSsid; + bool scanSpecificSsid; #ifdef CONFIG_AP_VIRTUAL_ADAPTER_SUPPORT void *arApDev; #endif @@ -704,7 +704,7 @@ int ar6000_dbglog_get_debug_logs(AR_SOFTC_T *ar); void ar6000_TxDataCleanup(AR_SOFTC_T *ar); int ar6000_acl_data_tx(struct sk_buff *skb, struct net_device *dev); void ar6000_restart_endpoint(struct net_device *dev); -void ar6000_stop_endpoint(struct net_device *dev, A_BOOL keepprofile, A_BOOL getdbglogs); +void ar6000_stop_endpoint(struct net_device *dev, bool keepprofile, bool getdbglogs); #ifdef HTC_RAW_INTERFACE diff --git a/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h b/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h index a9a29a624a10..b2ee6525cba0 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6k_pal.h @@ -26,7 +26,7 @@ /* transmit packet reserve offset */ #define TX_PACKET_RSV_OFFSET 32 /* pal specific config structure */ -typedef A_BOOL (*ar6k_pal_recv_pkt_t)(void *pHciPalInfo, void *skb); +typedef bool (*ar6k_pal_recv_pkt_t)(void *pHciPalInfo, void *skb); typedef struct ar6k_pal_config_s { ar6k_pal_recv_pkt_t fpar6k_pal_recv_pkt; diff --git a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h index 29fac6bad83a..014b7a4b0a1a 100644 --- a/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/ar6xapi_linux.h @@ -41,7 +41,7 @@ void ar6000_disconnect_event(struct ar6_softc *ar, A_UINT8 reason, A_UINT8 *bssid, A_UINT8 assocRespLen, A_UINT8 *assocInfo, A_UINT16 protocolReasonStatus); void ar6000_tkip_micerr_event(struct ar6_softc *ar, A_UINT8 keyid, - A_BOOL ismcast); + bool ismcast); void ar6000_bitrate_rx(void *devt, A_INT32 rateKbps); void ar6000_channelList_rx(void *devt, A_INT8 numChan, A_UINT16 *chanList); void ar6000_regDomain_event(struct ar6_softc *ar, A_UINT32 regCode); @@ -79,7 +79,7 @@ void ar6000_gpio_ack_rx(void); A_INT32 rssi_compensation_calc_tcmd(A_UINT32 freq, A_INT32 rssi, A_UINT32 totalPkt); A_INT16 rssi_compensation_calc(struct ar6_softc *ar, A_INT16 rssi); -A_INT16 rssi_compensation_reverse_calc(struct ar6_softc *ar, A_INT16 rssi, A_BOOL Above); +A_INT16 rssi_compensation_reverse_calc(struct ar6_softc *ar, A_INT16 rssi, bool Above); void ar6000_dbglog_init_done(struct ar6_softc *ar); @@ -115,7 +115,7 @@ int ar6000_dbglog_get_debug_logs(struct ar6_softc *ar); void ar6000_peer_event(void *devt, A_UINT8 eventCode, A_UINT8 *bssid); -void ar6000_indicate_tx_activity(void *devt, A_UINT8 trafficClass, A_BOOL Active); +void ar6000_indicate_tx_activity(void *devt, A_UINT8 trafficClass, bool Active); HTC_ENDPOINT_ID ar6000_ac2_endpoint_id ( void * devt, A_UINT8 ac); A_UINT8 ar6000_endpoint_id2_ac (void * devt, HTC_ENDPOINT_ID ep ); @@ -171,7 +171,7 @@ void ap_wapi_rekey_event(struct ar6_softc *ar, A_UINT8 type, A_UINT8 *mac); #endif int ar6000_connect_to_ap(struct ar6_softc *ar); -int ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, A_BOOL suspending); +int ar6000_update_wlan_pwr_state(struct ar6_softc *ar, AR6000_WLAN_STATE state, bool suspending); int ar6000_set_wlan_state(struct ar6_softc *ar, AR6000_WLAN_STATE state); int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state); @@ -179,7 +179,7 @@ int ar6000_set_bt_hw_state(struct ar6_softc *ar, A_UINT32 state); int ar6000_suspend_ev(void *context); int ar6000_resume_ev(void *context); int ar6000_power_change_ev(void *context, A_UINT32 config); -void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, A_BOOL isEvent); +void ar6000_check_wow_status(struct ar6_softc *ar, struct sk_buff *skb, bool isEvent); #endif void ar6000_pm_init(void); diff --git a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h index 53bbb4837d30..15b6b0832af4 100644 --- a/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/athdrv_linux.h @@ -531,7 +531,7 @@ typedef enum { * UINT32 cmd (AR6000_XIOCTL_WMI_STARTSCAN) * UINT8 scanType * UINT8 scanConnected - * A_BOOL forceFgScan + * u32 forceFgScan * uses: WMI_START_SCAN_CMDID */ @@ -643,7 +643,7 @@ typedef enum { * arguments: * UINT8 cmd (AR6000_XIOCTL_WMI_GET_KEEPALIVE) * UINT8 keepaliveInterval - * A_BOOL configured + * u32 configured * uses: WMI_GET_KEEPALIVE_CMDID */ @@ -1134,7 +1134,7 @@ typedef struct ar6000_dbglog_module_config_s { A_UINT32 valid; A_UINT16 mmask; A_UINT16 tsr; - A_BOOL rep; + u32 rep; A_UINT16 size; } DBGLOG_MODULE_CONFIG; diff --git a/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h b/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h index 9d9ecbb2a4d7..32bd29ba455d 100644 --- a/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/athtypes_linux.h @@ -44,7 +44,6 @@ typedef u_int16_t A_UINT16; typedef u_int32_t A_UINT32; typedef u_int64_t A_UINT64; -typedef int A_BOOL; typedef char A_CHAR; typedef unsigned char A_UCHAR; typedef unsigned long A_ATH_TIMER; diff --git a/drivers/staging/ath6kl/os/linux/include/cfg80211.h b/drivers/staging/ath6kl/os/linux/include/cfg80211.h index 4494410972fb..a32cdcdfd955 100644 --- a/drivers/staging/ath6kl/os/linux/include/cfg80211.h +++ b/drivers/staging/ath6kl/os/linux/include/cfg80211.h @@ -39,7 +39,7 @@ void ar6k_cfg80211_disconnect_event(AR_SOFTC_T *ar, A_UINT8 reason, A_UINT8 *bssid, A_UINT8 assocRespLen, A_UINT8 *assocInfo, A_UINT16 protocolReasonStatus); -void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, A_BOOL ismcast); +void ar6k_cfg80211_tkip_micerr_event(AR_SOFTC_T *ar, A_UINT8 keyid, bool ismcast); #endif /* _AR6K_CFG80211_H_ */ diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h index 49a5d3fece48..08a0700e470b 100644 --- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h +++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h @@ -28,15 +28,15 @@ extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); -extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, A_BOOL Synchronous); +extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); -extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, int MaxPollMS); extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, A_UINT32 Baud); -extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, A_BOOL Enable); +extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); #define HCI_TransportAttach(HTCHandle, pInfo) \ diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h index cdbda890939b..bf034cdfa893 100644 --- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h @@ -116,7 +116,7 @@ typedef spinlock_t A_MUTEX_T; #define A_MUTEX_INIT(mutex) spin_lock_init(mutex) #define A_MUTEX_LOCK(mutex) spin_lock_bh(mutex) #define A_MUTEX_UNLOCK(mutex) spin_unlock_bh(mutex) -#define A_IS_MUTEX_VALID(mutex) TRUE /* okay to return true, since A_MUTEX_DELETE does nothing */ +#define A_IS_MUTEX_VALID(mutex) true /* okay to return true, since A_MUTEX_DELETE does nothing */ #define A_MUTEX_DELETE(mutex) /* spin locks are not kernel resources so nothing to free.. */ /* Get current time in ms adding a constant offset (in ms) */ @@ -247,7 +247,7 @@ typedef struct sk_buff_head A_NETBUF_QUEUE_T; #define A_NETBUF_QUEUE_SIZE(q) \ a_netbuf_queue_size(q) #define A_NETBUF_QUEUE_EMPTY(q) \ - (a_netbuf_queue_empty(q) ? TRUE : FALSE) + (a_netbuf_queue_empty(q) ? true : false) /* * Network buffer support diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 9a508c48fc53..a120a5c3fc88 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c @@ -41,7 +41,7 @@ ar6000_ioctl_get_roam_tbl(struct net_device *dev, struct ifreq *rq) { AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -57,7 +57,7 @@ ar6000_ioctl_get_roam_data(struct net_device *dev, struct ifreq *rq) { AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -78,7 +78,7 @@ ar6000_ioctl_set_roam_ctrl(struct net_device *dev, char *userdata) WMI_SET_ROAM_CTRL_CMD cmd; A_UINT8 size = sizeof(cmd); - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -111,7 +111,7 @@ ar6000_ioctl_set_powersave_timers(struct net_device *dev, char *userdata) WMI_POWERSAVE_TIMERS_POLICY_CMD cmd; A_UINT8 size = sizeof(cmd); - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -140,7 +140,7 @@ ar6000_ioctl_set_qos_supp(struct net_device *dev, struct ifreq *rq) if ((dev->flags & IFF_UP) != IFF_UP) { return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -175,7 +175,7 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq) if ((dev->flags & IFF_UP) != IFF_UP) { return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -186,9 +186,9 @@ ar6000_ioctl_set_wmm(struct net_device *dev, struct ifreq *rq) } 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); @@ -216,7 +216,7 @@ ar6000_ioctl_set_txop(struct net_device *dev, struct ifreq *rq) if ((dev->flags & IFF_UP) != IFF_UP) { return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -247,7 +247,7 @@ ar6000_ioctl_get_rd(struct net_device *dev, struct ifreq *rq) 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; } @@ -268,7 +268,7 @@ ar6000_ioctl_set_country(struct net_device *dev, struct ifreq *rq) if ((dev->flags & IFF_UP) != IFF_UP) { return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -305,7 +305,7 @@ ar6000_ioctl_get_power_mode(struct net_device *dev, struct ifreq *rq) WMI_POWER_MODE_CMD power_mode; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -325,7 +325,7 @@ ar6000_ioctl_set_channelParams(struct net_device *dev, struct ifreq *rq) WMI_CHANNEL_PARAMS_CMD cmd, *cmdp; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -386,7 +386,7 @@ ar6000_ioctl_set_snr_threshold(struct net_device *dev, struct ifreq *rq) WMI_SNR_THRESHOLD_PARAMS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -420,7 +420,7 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq) A_INT32 i, j; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -462,9 +462,9 @@ ar6000_ioctl_set_rssi_threshold(struct net_device *dev, struct ifreq *rq) 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; @@ -495,7 +495,7 @@ ar6000_ioctl_set_lq_threshold(struct net_device *dev, struct ifreq *rq) WMI_LQ_THRESHOLD_PARAMS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -518,7 +518,7 @@ ar6000_ioctl_set_probedSsid(struct net_device *dev, struct ifreq *rq) WMI_PROBED_SSID_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -542,7 +542,7 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq) WMI_ADD_BAD_AP_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -578,7 +578,7 @@ ar6000_ioctl_create_qos(struct net_device *dev, struct ifreq *rq) WMI_CREATE_PSTREAM_CMD cmd; int ret; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -611,7 +611,7 @@ ar6000_ioctl_delete_qos(struct net_device *dev, struct ifreq *rq) WMI_DELETE_PSTREAM_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -641,7 +641,7 @@ ar6000_ioctl_get_qos_queue(struct net_device *dev, struct ifreq *rq) struct ar6000_queuereq qreq; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -673,7 +673,7 @@ ar6000_ioctl_tcmd_get_rx_report(struct net_device *dev, return -EBUSY; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -746,7 +746,7 @@ ar6000_ioctl_set_error_report_bitmask(struct net_device *dev, struct ifreq *rq) WMI_TARGET_ERROR_REPORT_BITMASK cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -766,7 +766,7 @@ ar6000_clear_target_stats(struct net_device *dev) TARGET_STATS *pStats = &ar->arTargetStats; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } AR6000_SPIN_LOCK(&ar->arLock, 0); @@ -786,7 +786,7 @@ ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq) 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))) { @@ -800,14 +800,14 @@ ar6000_ioctl_get_target_stats(struct net_device *dev, struct ifreq *rq) 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; @@ -834,7 +834,7 @@ ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq) 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), @@ -863,14 +863,14 @@ ar6000_ioctl_get_ap_stats(struct net_device *dev, struct ifreq *rq) 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; @@ -892,7 +892,7 @@ ar6000_ioctl_set_access_params(struct net_device *dev, struct ifreq *rq) WMI_SET_ACCESS_PARAMS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -918,7 +918,7 @@ ar6000_ioctl_set_disconnect_timeout(struct net_device *dev, struct ifreq *rq) WMI_DISC_TIMEOUT_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -943,7 +943,7 @@ ar6000_xioctl_set_voice_pkt_size(struct net_device *dev, char * userdata) WMI_SET_VOICE_PKT_SIZE_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -969,7 +969,7 @@ ar6000_xioctl_set_max_sp_len(struct net_device *dev, char * userdata) WMI_SET_MAX_SP_LEN_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -995,7 +995,7 @@ ar6000_xioctl_set_bt_status_cmd(struct net_device *dev, char * userdata) WMI_SET_BT_STATUS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1020,7 +1020,7 @@ ar6000_xioctl_set_bt_params_cmd(struct net_device *dev, char * userdata) WMI_SET_BT_PARAMS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1045,7 +1045,7 @@ ar6000_xioctl_set_btcoex_fe_ant_cmd(struct net_device * dev, char * userdata) 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))) { @@ -1069,7 +1069,7 @@ ar6000_xioctl_set_btcoex_colocated_bt_dev_cmd(struct net_device * dev, char * us WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1094,7 +1094,7 @@ ar6000_xioctl_set_btcoex_btinquiry_page_config_cmd(struct net_device * dev, cha WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1119,7 +1119,7 @@ ar6000_xioctl_set_btcoex_sco_config_cmd(struct net_device * dev, char * userdata WMI_SET_BTCOEX_SCO_CONFIG_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1145,7 +1145,7 @@ ar6000_xioctl_set_btcoex_a2dp_config_cmd(struct net_device * dev, WMI_SET_BTCOEX_A2DP_CONFIG_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1170,7 +1170,7 @@ ar6000_xioctl_set_btcoex_aclcoex_config_cmd(struct net_device * dev, char * user WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1195,7 +1195,7 @@ ar60000_xioctl_set_btcoex_debug_cmd(struct net_device * dev, char * userdata) WMI_SET_BTCOEX_DEBUG_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1220,7 +1220,7 @@ ar6000_xioctl_set_btcoex_bt_operating_status_cmd(struct net_device * dev, char * WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD cmd; int ret = 0; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1251,7 +1251,7 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char * userdata, 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))) { @@ -1267,9 +1267,9 @@ ar6000_xioctl_get_btcoex_config_cmd(struct net_device * dev, char * userdata, 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; @@ -1293,7 +1293,7 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char * userdata, str if (ar->bIsDestroyProgress) { return -EBUSY; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1311,9 +1311,9 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char * userdata, str 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; @@ -1333,16 +1333,16 @@ ar6000_xioctl_get_btcoex_stats_cmd(struct net_device * dev, char * userdata, str 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; } /* @@ -1355,7 +1355,7 @@ ar6000_gpio_intr_rx(A_UINT32 intr_mask, A_UINT32 input_values) { 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); } @@ -1369,7 +1369,7 @@ ar6000_gpio_data_rx(A_UINT32 reg_id, A_UINT32 value) { 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); } @@ -1381,7 +1381,7 @@ ar6000_gpio_data_rx(A_UINT32 reg_id, A_UINT32 value) void ar6000_gpio_ack_rx(void) { - gpio_ack_received = TRUE; + gpio_ack_received = true; wake_up(&arEvent); } @@ -1394,7 +1394,7 @@ ar6000_gpio_output_set(struct net_device *dev, { 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); } @@ -1404,7 +1404,7 @@ ar6000_gpio_input_get(struct net_device *dev) { 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); } @@ -1415,7 +1415,7 @@ ar6000_gpio_register_set(struct net_device *dev, { 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); } @@ -1425,7 +1425,7 @@ ar6000_gpio_register_get(struct net_device *dev, { 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); } @@ -1435,21 +1435,21 @@ ar6000_gpio_intr_ack(struct net_device *dev, { 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); } @@ -1462,7 +1462,7 @@ prof_count_rx(A_UINT32 addr, A_UINT32 count) { 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 */ @@ -1506,7 +1506,7 @@ ar6000_create_acl_data_osbuf(struct net_device *dev, A_UINT8 *userdata, void **p ret = A_EFAULT; break; } - } while(FALSE); + } while(false); if (ret == A_OK) { *p_osbuf = osbuf; @@ -1601,7 +1601,7 @@ ar6000_ioctl_ap_setparam(AR_SOFTC_T *ar, int param, int value) 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) { @@ -1622,15 +1622,15 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) 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; @@ -1639,10 +1639,10 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) 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", @@ -1665,19 +1665,19 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) 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; @@ -1692,19 +1692,19 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) 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; @@ -1716,7 +1716,7 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int value) } break; case IEEE80211_PARAM_COUNTERMEASURES: - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } wmi_set_tkip_countermeasures_cmd(ar->arWmi, value); @@ -1724,7 +1724,7 @@ ar6000_ioctl_setparam(AR_SOFTC_T *ar, int param, int 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 */ @@ -1742,7 +1742,7 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) 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)) ) { @@ -1834,7 +1834,7 @@ ar6000_ioctl_setkey(AR_SOFTC_T *ar, struct ieee80211req_key *ik) } #ifdef USER_KEYS - ar->user_saved_keys.keyOk = TRUE; + ar->user_saved_keys.keyOk = true; #endif return 0; @@ -1919,7 +1919,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { int param, value; int *ptr = (int *)rq->ifr_ifru.ifru_newname; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else { param = *ptr++; @@ -1931,7 +1931,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) { @@ -1950,7 +1950,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) { @@ -1988,7 +1988,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -2216,7 +2216,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; } @@ -2347,7 +2347,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -2361,7 +2361,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) goto ioctl_done; } - prof_count_available = FALSE; + prof_count_available = false; ret = prof_count_get(dev); if (ret != A_OK) { up(&ar->arSem); @@ -2398,7 +2398,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_POWER_MODE_CMD pwrModeCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&pwrModeCmd, userdata, sizeof(pwrModeCmd))) @@ -2417,7 +2417,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -2439,7 +2439,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_AP_PS_CMD apPsCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&apPsCmd, userdata, sizeof(apPsCmd))) @@ -2458,7 +2458,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_POWER_PARAMS_CMD pmParams; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&pmParams, userdata, sizeof(pmParams))) @@ -2484,7 +2484,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } 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))) @@ -2492,9 +2492,9 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -2517,7 +2517,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_LISTEN_INT_CMD listenCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&listenCmd, userdata, sizeof(listenCmd))) @@ -2540,7 +2540,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_BMISS_TIME_CMD bmissCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&bmissCmd, userdata, sizeof(bmissCmd))) @@ -2557,7 +2557,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_BSS_FILTER_CMD filt; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&filt, userdata, sizeof(filt))) @@ -2586,7 +2586,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } case AR6000_XIOCTL_WMI_CLR_RSSISNR: { - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } ret = wmi_clr_rssi_snr(ar->arWmi); @@ -2601,7 +2601,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_SET_LPREAMBLE_CMD setLpreambleCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&setLpreambleCmd, userdata, sizeof(setLpreambleCmd))) @@ -2625,7 +2625,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -2707,7 +2707,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; } @@ -2844,7 +2844,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -2881,7 +2881,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -2926,7 +2926,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -2969,7 +2969,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -3019,7 +3019,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -3099,7 +3099,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3121,7 +3121,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -3143,7 +3143,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -3169,7 +3169,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3194,7 +3194,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_BEACON_INT_CMD bIntvlCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&bIntvlCmd, userdata, sizeof(bIntvlCmd))) @@ -3216,7 +3216,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -3326,7 +3326,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3366,7 +3366,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -3395,7 +3395,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret = -EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -3443,7 +3443,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3461,7 +3461,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3509,7 +3509,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -3525,7 +3525,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -3545,7 +3545,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -3564,7 +3564,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -3583,7 +3583,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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, @@ -3605,7 +3605,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ret =-EBUSY; goto ioctl_done; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; goto ioctl_done; } @@ -3649,7 +3649,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; } @@ -3715,7 +3715,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3804,7 +3804,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_SET_IP_CMD setIP; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else if (copy_from_user(&setIP, userdata, sizeof(setIP))) @@ -3824,7 +3824,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3843,7 +3843,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3862,7 +3862,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3887,7 +3887,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) A_UINT8 pattern_data[WOW_PATTERN_SIZE]={0}; do { - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; break; } @@ -3916,7 +3916,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ret = -EIO; } - } while(FALSE); + } while(false); #undef WOW_PATTERN_SIZE #undef WOW_MASK_SIZE break; @@ -3925,7 +3925,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -3998,11 +3998,11 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) * 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))) @@ -4013,7 +4013,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } 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))) @@ -4026,7 +4026,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int 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, @@ -4048,7 +4048,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } 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) { @@ -4057,7 +4057,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } break; case AR6000_XIOCTL_WMI_ABORT_SCAN: - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } ret = wmi_abort_scan_cmd(ar->arWmi); @@ -4065,7 +4065,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4078,7 +4078,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } case AR6000_XIOCTL_AP_GET_STA_LIST: { - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } else { A_UINT8 i; @@ -4101,7 +4101,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4116,7 +4116,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4135,7 +4135,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4151,7 +4151,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } 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))) { @@ -4167,7 +4167,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4181,7 +4181,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4193,7 +4193,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4210,7 +4210,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4230,7 +4230,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { WMI_SET_TARGET_EVENT_REPORT_CMD evtCfgCmd; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { ret = -EIO; } if (copy_from_user(&evtCfgCmd, userdata, @@ -4244,7 +4244,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4317,7 +4317,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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; @@ -4331,7 +4331,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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; @@ -4345,7 +4345,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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; @@ -4357,7 +4357,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) @@ -4374,7 +4374,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) } 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))) @@ -4393,7 +4393,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4415,7 +4415,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4441,7 +4441,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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; @@ -4466,7 +4466,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))) @@ -4486,7 +4486,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) { @@ -4499,7 +4499,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int 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))) { @@ -4509,7 +4509,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int 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))) { @@ -4522,7 +4522,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 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))) { @@ -4535,7 +4535,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int 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))) { @@ -4548,7 +4548,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, 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))) { @@ -4574,7 +4574,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int 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; @@ -4620,7 +4620,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { 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))){ diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c index ea933d0d9392..eb964692649b 100644 --- a/drivers/staging/ath6kl/os/linux/wireless_ext.c +++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c @@ -429,7 +429,7 @@ ar6000_ioctl_giwscan(struct net_device *dev, return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -480,7 +480,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -532,7 +532,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, 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]))) @@ -592,13 +592,13 @@ ar6000_ioctl_siwessid(struct net_device *dev, * (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) { @@ -617,9 +617,9 @@ ar6000_ioctl_siwessid(struct net_device *dev, * 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); @@ -732,7 +732,7 @@ ar6000_ioctl_siwrate(struct net_device *dev, 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; @@ -765,7 +765,7 @@ ar6000_ioctl_giwrate(struct net_device *dev, 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; } @@ -792,7 +792,7 @@ ar6000_ioctl_giwrate(struct net_device *dev, 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; @@ -833,12 +833,12 @@ ar6000_ioctl_siwtxpow(struct net_device *dev, 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); @@ -879,7 +879,7 @@ ar6000_ioctl_giwtxpow(struct net_device *dev, return -EBUSY; } - if((ar->arWmiReady == TRUE) && (ar->arConnected == TRUE)) + if((ar->arWmiReady == true) && (ar->arConnected == true)) { ar->arTxPwr = 0; @@ -898,8 +898,8 @@ ar6000_ioctl_giwtxpow(struct net_device *dev, 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; @@ -946,7 +946,7 @@ ar6000_ioctl_siwretry(struct net_device *dev, 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){ @@ -1201,7 +1201,7 @@ ar6000_ioctl_siwgenie(struct net_device *dev, A_UINT8 wapi_ie[128]; #endif - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } #ifdef WAPI_ENABLE @@ -1230,7 +1230,7 @@ ar6000_ioctl_giwgenie(struct net_device *dev, { AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(dev); - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } erq->length = 0; @@ -1249,12 +1249,12 @@ ar6000_ioctl_siwauth(struct net_device *dev, { 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; } @@ -1264,7 +1264,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, param = data->flags & IW_AUTH_INDEX; value = data->value; - profChanged = TRUE; + profChanged = true; ret = 0; switch (param) { @@ -1277,7 +1277,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, ar->arAuthMode = WPA2_AUTH; } else { ret = -1; - profChanged = FALSE; + profChanged = false; } break; case IW_AUTH_CIPHER_PAIRWISE: @@ -1298,7 +1298,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, ar->arPairwiseCryptoLen = 13; } else { ret = -1; - profChanged = FALSE; + profChanged = false; } break; case IW_AUTH_CIPHER_GROUP: @@ -1319,7 +1319,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, ar->arGroupCryptoLen = 13; } else { ret = -1; - profChanged = FALSE; + profChanged = false; } break; case IW_AUTH_KEY_MGMT: @@ -1337,10 +1337,10 @@ ar6000_ioctl_siwauth(struct net_device *dev, 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; @@ -1355,7 +1355,7 @@ ar6000_ioctl_siwauth(struct net_device *dev, } if(ar->arDot11AuthMode == 0) { ret = -1; - profChanged = FALSE; + profChanged = false; } break; case IW_AUTH_WPA_ENABLED: @@ -1374,10 +1374,10 @@ ar6000_ioctl_siwauth(struct net_device *dev, } 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) { @@ -1394,11 +1394,11 @@ ar6000_ioctl_siwauth(struct net_device *dev, #endif default: ret = -1; - profChanged = FALSE; + profChanged = false; break; } - if (profChanged == TRUE) { + if (profChanged == true) { /* * profile has changed. Erase ssid to signal change */ @@ -1422,7 +1422,7 @@ ar6000_ioctl_giwauth(struct net_device *dev, A_UINT16 param; A_INT32 ret; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1553,7 +1553,7 @@ ar6000_ioctl_siwpmksa(struct net_device *dev, pmksa = (struct iw_pmksa *)extra; - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -1562,13 +1562,13 @@ ar6000_ioctl_siwpmksa(struct net_device *dev, 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; @@ -1671,7 +1671,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, } #ifdef USER_KEYS - ar->user_saved_keys.keyOk = FALSE; + ar->user_saved_keys.keyOk = false; #endif /* USER_KEYS */ index = erq->flags & IW_ENCODE_INDEX; @@ -1811,7 +1811,7 @@ ar6000_ioctl_siwencodeext(struct net_device *dev, 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 */ } @@ -1853,7 +1853,7 @@ static int ar6000_ioctl_siwpower(struct net_device *dev, 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; } @@ -1879,7 +1879,7 @@ static int ar6000_ioctl_giwpower(struct net_device *dev, 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; } @@ -2026,7 +2026,7 @@ ar6000_ioctl_giwfreq(struct net_device *dev, return -EINVAL; } } else { - if (ar->arConnected != TRUE) { + if (ar->arConnected != true) { return -EINVAL; } else { freq->m = ar->arBssChannel * 100000; @@ -2060,7 +2060,7 @@ ar6000_ioctl_siwmode(struct net_device *dev, /* * 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; } @@ -2190,7 +2190,7 @@ ar6000_ioctl_giwrange(struct net_device *dev, return -EBUSY; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -2349,7 +2349,7 @@ ar6000_ioctl_giwap(struct net_device *dev, return 0; } - if (ar->arConnected != TRUE) { + if (ar->arConnected != true) { return -EINVAL; } @@ -2383,7 +2383,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev, return -EIO; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -2404,7 +2404,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev, 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); @@ -2418,7 +2418,7 @@ ar6000_ioctl_siwmlme(struct net_device *dev, 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; @@ -2468,7 +2468,7 @@ ar6000_ioctl_siwscan(struct net_device *dev, return -EOPNOTSUPP; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -2510,14 +2510,14 @@ ar6000_ioctl_siwscan(struct net_device *dev, 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; } } } @@ -2526,13 +2526,13 @@ ar6000_ioctl_siwscan(struct net_device *dev, 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; } @@ -2595,7 +2595,7 @@ ar6000_ioctl_siwcommit(struct net_device *dev, return -EOPNOTSUPP; } - if (ar->arWmiReady == FALSE) { + if (ar->arWmiReady == false) { return -EIO; } @@ -2615,8 +2615,8 @@ ar6000_ioctl_siwcommit(struct net_device *dev, * 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)); diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h index 5dbf8f86f713..5f9bf9b4dc98 100644 --- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h +++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h @@ -61,7 +61,7 @@ typedef enum { typedef struct { void *osbuf; - A_BOOL is_amsdu; + bool is_amsdu; A_UINT16 seq_no; }OSBUF_HOLD_Q; @@ -74,9 +74,9 @@ typedef struct { #endif typedef struct { - A_BOOL aggr; /* is it ON or OFF */ - A_BOOL progress; /* TRUE when frames have arrived after a timer start */ - A_BOOL timerMon; /* TRUE if the timer started for the sake of this TID */ + bool aggr; /* is it ON or OFF */ + bool progress; /* true when frames have arrived after a timer start */ + bool timerMon; /* true if the timer started for the sake of this TID */ A_UINT16 win_sz; /* negotiated window size */ A_UINT16 seq_next; /* Next seq no, in current window */ A_UINT32 hold_q_sz; /* Num of frames that can be held in hold q */ diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c index d53ab15624da..48980d2bdf6a 100644 --- a/drivers/staging/ath6kl/reorder/rcv_aggr.c +++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c @@ -73,7 +73,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) A_MEMZERO(p_aggr, sizeof(AGGR_INFO)); p_aggr->aggr_sz = AGGR_SZ_DEFAULT; A_INIT_TIMER(&p_aggr->timer, aggr_timeout, p_aggr); - p_aggr->timerScheduled = FALSE; + p_aggr->timerScheduled = false; A_NETBUF_QUEUE_INIT(&p_aggr->freeQ); p_aggr->netbuf_allocator = netbuf_allocator; @@ -81,13 +81,13 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator) for(i = 0; i < NUM_OF_TIDS; i++) { rxtid = AGGR_GET_RXTID(p_aggr, i); - rxtid->aggr = FALSE; - rxtid->progress = FALSE; - rxtid->timerMon = FALSE; + rxtid->aggr = false; + rxtid->progress = false; + rxtid->timerMon = false; A_NETBUF_QUEUE_INIT(&rxtid->q); A_MUTEX_INIT(&rxtid->lock); } - }while(FALSE); + }while(false); A_PRINTF("going out of aggr_init..status %s\n", (status == A_OK) ? "OK":"Error"); @@ -115,9 +115,9 @@ aggr_delete_tid_state(AGGR_INFO *p_aggr, A_UINT8 tid) aggr_deque_frms(p_aggr, tid, 0, ALL_SEQNO); } - rxtid->aggr = FALSE; - rxtid->progress = FALSE; - rxtid->timerMon = FALSE; + rxtid->aggr = false; + rxtid->progress = false; + rxtid->timerMon = false; rxtid->win_sz = 0; rxtid->seq_next = 0; rxtid->hold_q_sz = 0; @@ -142,7 +142,7 @@ aggr_module_destroy(void *cntxt) if(p_aggr) { if(p_aggr->timerScheduled) { A_UNTIMEOUT(&p_aggr->timer); - p_aggr->timerScheduled = FALSE; + p_aggr->timerScheduled = false; } for(i = 0; i < NUM_OF_TIDS; i++) { @@ -249,7 +249,7 @@ aggr_recv_addba_req_evt(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_UINT8 win_s A_ASSERT(0); } - rxtid->aggr = TRUE; + rxtid->aggr = true; } void @@ -426,7 +426,7 @@ aggr_slice_amsdu(AGGR_INFO *p_aggr, RXTID *rxtid, void **osbuf) } void -aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu, void **osbuf) +aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, bool is_amsdu, void **osbuf) { AGGR_INFO *p_aggr = (AGGR_INFO *)cntxt; RXTID *rxtid; @@ -536,17 +536,17 @@ aggr_process_recv_frm(void *cntxt, A_UINT8 tid, A_UINT16 seq_no, A_BOOL is_amsdu aggr_deque_frms(p_aggr, tid, 0, CONTIGUOUS_SEQNO); if(p_aggr->timerScheduled) { - rxtid->progress = TRUE; + rxtid->progress = true; }else{ for(idx=0 ; idxhold_q_sz ; idx++) { if(rxtid->hold_q[idx].osbuf) { /* there is a frame in the queue and no timer so * start a timer to ensure that the frame doesn't remain * stuck forever. */ - p_aggr->timerScheduled = TRUE; + p_aggr->timerScheduled = true; A_TIMEOUT_MS(&p_aggr->timer, AGGR_RX_TIMEOUT, 0); - rxtid->progress = FALSE; - rxtid->timerMon = TRUE; + rxtid->progress = false; + rxtid->timerMon = true; break; } } @@ -588,9 +588,9 @@ aggr_timeout(A_ATH_TIMER arg) rxtid = AGGR_GET_RXTID(p_aggr, i); stats = AGGR_GET_RXTID_STATS(p_aggr, i); - if(rxtid->aggr == FALSE || - rxtid->timerMon == FALSE || - rxtid->progress == TRUE) { + if(rxtid->aggr == false || + rxtid->timerMon == false || + rxtid->progress == true) { continue; } // dequeue all frames in for this tid @@ -599,25 +599,25 @@ aggr_timeout(A_ATH_TIMER arg) aggr_deque_frms(p_aggr, i, 0, ALL_SEQNO); } - p_aggr->timerScheduled = FALSE; + p_aggr->timerScheduled = false; // determine whether a new timer should be started. for(i = 0; i < NUM_OF_TIDS; i++) { rxtid = AGGR_GET_RXTID(p_aggr, i); - if(rxtid->aggr == TRUE && rxtid->hold_q) { + if(rxtid->aggr == true && rxtid->hold_q) { for(j = 0 ; j < rxtid->hold_q_sz ; j++) { if(rxtid->hold_q[j].osbuf) { - p_aggr->timerScheduled = TRUE; - rxtid->timerMon = TRUE; - rxtid->progress = FALSE; + p_aggr->timerScheduled = true; + rxtid->timerMon = true; + rxtid->progress = false; break; } } if(j >= rxtid->hold_q_sz) { - rxtid->timerMon = FALSE; + rxtid->timerMon = false; } } } diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index 6ec4e48eb2fd..4cc45c08715d 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c @@ -151,7 +151,7 @@ wlan_setup_node(struct ieee80211_node_table *nt, bss_t *ni, #ifdef THREAD_X if (!nt->isTimerArmed) { A_TIMEOUT_MS(&nt->nt_inact_timer, timeoutValue, 0); - nt->isTimerArmed = TRUE; + nt->isTimerArmed = true; } #endif @@ -299,7 +299,7 @@ wlan_node_table_init(void *wmip, struct ieee80211_node_table *nt) #ifdef THREAD_X A_INIT_TIMER(&nt->nt_inact_timer, wlan_node_timeout, nt); - nt->isTimerArmed = FALSE; + nt->isTimerArmed = false; #endif nt->nt_wmip = wmip; nt->nt_nodeAge = WLAN_NODE_INACT_TIMEOUT_MSEC; @@ -326,7 +326,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt) { #ifdef THREAD_X bss_t *bss, *nextBss; - A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = FALSE; + A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = false; wmi_get_current_bssid(nt->nt_wmip, myBssid); @@ -379,7 +379,7 @@ wlan_node_timeout (A_ATH_TIMER arg) { struct ieee80211_node_table *nt = (struct ieee80211_node_table *)arg; bss_t *bss, *nextBss; - A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = FALSE; + A_UINT8 myBssid[IEEE80211_ADDR_LEN], reArmTimer = false; A_UINT32 timeoutValue = 0; timeoutValue = nt->nt_nodeAge; @@ -406,7 +406,7 @@ wlan_node_timeout (A_ATH_TIMER arg) * Re-arm timer, only when we have a bss other than * current bss AND it is not aged-out. */ - reArmTimer = TRUE; + reArmTimer = true; } } bss = nextBss; @@ -432,7 +432,7 @@ wlan_node_table_cleanup(struct ieee80211_node_table *nt) bss_t * wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, - A_UINT32 ssidLength, A_BOOL bIsWPA2, A_BOOL bMatchSSID) + A_UINT32 ssidLength, bool bIsWPA2, bool bMatchSSID) { bss_t *ni = NULL; A_UCHAR *pIESsid = NULL; @@ -447,22 +447,22 @@ wlan_find_Ssidnode (struct ieee80211_node_table *nt, A_UCHAR *pSsid, if (0x00 == memcmp (pSsid, &pIESsid[2], ssidLength)) { // - // Step 2.1 : Check MatchSSID is TRUE, if so, return Matched SSID + // Step 2.1 : Check MatchSSID is true, if so, return Matched SSID // Profile, otherwise check whether WPA2 or WPA // - if (TRUE == bMatchSSID) { + if (true == bMatchSSID) { ieee80211_node_incref (ni); /* mark referenced */ IEEE80211_NODE_UNLOCK (nt); return ni; } // Step 2 : if SSID matches, check WPA or WPA2 - if (TRUE == bIsWPA2 && NULL != ni->ni_cie.ie_rsn) { + if (true == bIsWPA2 && NULL != ni->ni_cie.ie_rsn) { ieee80211_node_incref (ni); /* mark referenced */ IEEE80211_NODE_UNLOCK (nt); return ni; } - if (FALSE == bIsWPA2 && NULL != ni->ni_cie.ie_wpa) { + if (false == bIsWPA2 && NULL != ni->ni_cie.ie_wpa) { ieee80211_node_incref(ni); /* mark referenced */ IEEE80211_NODE_UNLOCK (nt); return ni; diff --git a/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c b/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c index 2743c4cf604d..e9346bfe0dc4 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_recv_beacon.c @@ -101,7 +101,7 @@ int wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie) { A_UINT8 *frm, *efrm; - A_UINT8 elemid_ssid = FALSE; + A_UINT8 elemid_ssid = false; frm = buf; efrm = (A_UINT8 *) (frm + framelen); @@ -134,7 +134,7 @@ wlan_parse_beacon(A_UINT8 *buf, int framelen, struct ieee80211_common_ie *cie) case IEEE80211_ELEMID_SSID: if (!elemid_ssid) { cie->ie_ssid = frm; - elemid_ssid = TRUE; + elemid_ssid = true; } break; case IEEE80211_ELEMID_RATES: diff --git a/drivers/staging/ath6kl/wmi/wmi.c b/drivers/staging/ath6kl/wmi/wmi.c index c384bb2e956e..2b65c087542d 100644 --- a/drivers/staging/ath6kl/wmi/wmi.c +++ b/drivers/staging/ath6kl/wmi/wmi.c @@ -152,7 +152,7 @@ wmi_snrThresholdEvent_rx(struct wmi_t *wmip, A_UINT8 *datap, int len); 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 @@ -297,7 +297,7 @@ typedef PREPACK struct _iphdr { 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) @@ -495,7 +495,7 @@ int wmi_meta_add(struct wmi_t *wmip, void *osbuf, A_UINT8 *pVersion,void *pTxMet /* 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; @@ -531,7 +531,7 @@ wmi_data_hdr_add(struct wmi_t *wmip, void *osbuf, A_UINT8 msgType, A_BOOL bMoreD } -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; @@ -1232,7 +1232,7 @@ wmi_ready_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) 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); @@ -1295,7 +1295,7 @@ wmi_connect_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) { if(iswmmparam (pie)) { - wmip->wmi_is_wmm_enabled = TRUE; + wmip->wmi_is_wmm_enabled = true; } } break; @@ -1368,7 +1368,7 @@ wmi_disconnect_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) 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; @@ -1475,7 +1475,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) /* 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; @@ -1510,7 +1510,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) 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]))) { @@ -1529,7 +1529,7 @@ wmi_bssInfo_event_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) /* 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]))) { @@ -1820,7 +1820,7 @@ wmi_scanComplete_rx(struct wmi_t *wmip, A_UINT8 *datap, int len) 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; } @@ -2379,7 +2379,7 @@ wmi_cmd_send(struct wmi_t *wmip, void *osbuf, WMI_COMMAND_ID cmdId, * Only for OPT_TX_CMD, use BE endpoint. */ if (IS_OPT_TX_CMD(cmdId)) { - if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, FALSE, FALSE,0,NULL)) != A_OK) { + if ((status=wmi_data_hdr_add(wmip, osbuf, OPT_MSGTYPE, false, false,0,NULL)) != A_OK) { A_NETBUF_FREE(osbuf); return status; } @@ -2511,7 +2511,7 @@ wmi_disconnect_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) { @@ -2635,7 +2635,7 @@ wmi_probedSsid_cmd(struct wmi_t *wmip, A_UINT8 index, A_UINT8 flag, } if (flag & SPECIFIC_SSID_FLAG) { - is_probe_ssid = TRUE; + is_probe_ssid = true; } osbuf = A_NETBUF_ALLOC(sizeof(*cmd)); @@ -2950,7 +2950,7 @@ wmi_deleteKey_cmd(struct wmi_t *wmip, A_UINT8 keyIndex) 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; @@ -2959,7 +2959,7 @@ wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId, return A_EINVAL; } - if ((set == TRUE) && (pmkId == NULL)) { + if ((set == true) && (pmkId == NULL)) { return A_EINVAL; } @@ -2972,7 +2972,7 @@ wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId, 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 { @@ -2984,7 +2984,7 @@ wmi_setPmkid_cmd(struct wmi_t *wmip, A_UINT8 *bssid, A_UINT8 *pmkId, } 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; @@ -2997,7 +2997,7 @@ wmi_set_tkip_countermeasures_cmd(struct wmi_t *wmip, A_BOOL en) 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)); @@ -3178,7 +3178,7 @@ wmi_sync_point(struct wmi_t *wmip) dataSyncBufs[i].osbuf = NULL; } //end for - } while(FALSE); + } while(false); /* free up any resources left over (possibly due to an error) */ @@ -3451,40 +3451,40 @@ wmi_get_bitrate_cmd(struct wmi_t *wmip) } /* - * 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; @@ -3493,16 +3493,16 @@ wmi_is_bitrate_index_valid(struct wmi_t *wmip, A_INT32 rateIndex) 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; } @@ -3524,7 +3524,7 @@ wmi_validate_bitrate(struct wmi_t *wmip, A_INT32 rate, A_INT8 *rate_idx) } } - 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; } @@ -3548,7 +3548,7 @@ wmi_set_fixrates_cmd(struct wmi_t *wmip, A_UINT32 fixRatesMask) /* 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; } @@ -4081,7 +4081,7 @@ wmi_get_challenge_resp_cmd(struct wmi_t *wmip, A_UINT32 cookie, A_UINT32 source) int wmi_config_debug_module_cmd(struct wmi_t *wmip, A_UINT16 mmask, - A_UINT16 tsr, A_BOOL rep, A_UINT16 size, + A_UINT16 tsr, bool rep, A_UINT16 size, A_UINT32 valid) { void *osbuf; @@ -5382,7 +5382,7 @@ wmi_set_nodeage(struct wmi_t *wmip, A_UINT32 nodeAge) 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, @@ -6252,7 +6252,7 @@ wmi_wapi_rekey_event_rx(struct wmi_t *wmip, A_UINT8 *datap,int len) #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; @@ -6510,7 +6510,7 @@ 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) { void *osbuf; WMI_DELBA_REQ_CMD *cmd; @@ -6533,7 +6533,7 @@ wmi_delete_aggr_cmd(struct wmi_t *wmip, A_UINT8 tid, A_BOOL uplink) 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; @@ -6546,8 +6546,8 @@ wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, 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 */ @@ -6556,7 +6556,7 @@ wmi_set_rx_frame_format_cmd(struct wmi_t *wmip, A_UINT8 rxMetaVersion, 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; @@ -6569,7 +6569,7 @@ wmi_set_thin_mode_cmd(struct wmi_t *wmip, A_BOOL bThinMode) 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)); diff --git a/drivers/staging/ath6kl/wmi/wmi_host.h b/drivers/staging/ath6kl/wmi/wmi_host.h index 5c7f7d3c3ce1..c2a64019b0ed 100644 --- a/drivers/staging/ath6kl/wmi/wmi_host.h +++ b/drivers/staging/ath6kl/wmi/wmi_host.h @@ -60,8 +60,8 @@ typedef struct sq_threshold_params_s { #define A_NUM_BANDS 2 struct wmi_t { - A_BOOL wmi_ready; - A_BOOL wmi_numQoSStream; + bool wmi_ready; + bool wmi_numQoSStream; A_UINT16 wmi_streamExistsForAC[WMM_NUM_AC]; A_UINT8 wmi_fatPipeExists; void *wmi_devt; @@ -80,7 +80,7 @@ struct wmi_t { SQ_THRESHOLD_PARAMS wmi_SqThresholdParams[SIGNAL_QUALITY_METRICS_NUM_MAX]; CRYPTO_TYPE wmi_pair_crypto_type; CRYPTO_TYPE wmi_grp_crypto_type; - A_BOOL wmi_is_wmm_enabled; + bool wmi_is_wmm_enabled; A_UINT8 wmi_ht_allowed[A_NUM_BANDS]; A_UINT8 wmi_traffic_class; }; -- 2.20.1