Replace user-defined keyword TRUE with C defined true keyword. Signed-off-by: Lisa Nguyen <lisa@xxxxxxxxxxxxxxx> --- drivers/staging/bcm/Bcmchar.c | 128 +++++++++++++++--------------- drivers/staging/bcm/CmHost.c | 62 +++++++-------- drivers/staging/bcm/DDRInit.c | 10 +-- drivers/staging/bcm/HandleControlPacket.c | 26 +++--- drivers/staging/bcm/IPv6Protocol.c | 26 +++--- drivers/staging/bcm/InterfaceDld.c | 2 +- drivers/staging/bcm/InterfaceIdleMode.c | 6 +- drivers/staging/bcm/InterfaceInit.c | 56 ++++++------- drivers/staging/bcm/InterfaceIsr.c | 12 +-- drivers/staging/bcm/InterfaceMisc.c | 20 ++--- drivers/staging/bcm/InterfaceRx.c | 14 ++-- drivers/staging/bcm/InterfaceTx.c | 20 ++--- drivers/staging/bcm/LeakyBucket.c | 16 ++-- drivers/staging/bcm/Misc.c | 68 ++++++++-------- drivers/staging/bcm/PHSModule.c | 18 ++--- drivers/staging/bcm/Qos.c | 66 +++++++-------- drivers/staging/bcm/Transmit.c | 4 +- drivers/staging/bcm/Typedefs.h | 4 - drivers/staging/bcm/hostmibs.c | 2 +- drivers/staging/bcm/led_control.c | 14 ++-- drivers/staging/bcm/nvm.c | 114 +++++++++++++------------- 21 files changed, 342 insertions(+), 346 deletions(-) diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 4d7b5da..9fc20be 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -287,9 +287,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) struct bcm_rdm_buffer sRdmBuffer = {0}; PCHAR temp_buff = NULL; UINT uiTempVar = 0; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Device in Idle Mode, Blocking Rdms\n"); return -EACCES; @@ -345,9 +345,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) struct bcm_wrm_buffer sWrmBuffer = {0}; UINT uiTempVar = 0; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Device in Idle Mode, Blocking Wrms\n"); return -EACCES; @@ -401,9 +401,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) UINT uiOperation = 0; struct bcm_gpio_info gpio_info = {0}; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "GPIO Can't be set/clear in Low power Mode"); return -EACCES; @@ -479,9 +479,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) struct bcm_user_thread_req threadReq = {0}; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "User made LED thread InActive"); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "GPIO Can't be set/clear in Low power Mode"); Status = -EACCES; @@ -518,9 +518,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) UCHAR ucRead[4]; struct bcm_gpio_info gpio_info = {0}; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) return -EACCES; if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) @@ -555,9 +555,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) memset(pgpio_multi_info, 0, MAX_IDX * sizeof(struct bcm_gpio_multi_info)); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) return -EINVAL; if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) @@ -637,9 +637,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) struct bcm_gpio_multi_mode gpio_multi_mode[MAX_IDX]; struct bcm_gpio_multi_mode *pgpio_multi_mode = (struct bcm_gpio_multi_mode *)gpio_multi_mode; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) return -EINVAL; if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) @@ -871,8 +871,8 @@ cntrlEnd: return -EACCES; } - Adapter->bBinDownloaded = TRUE; - Adapter->bCfgDownloaded = TRUE; + Adapter->bBinDownloaded = true; + Adapter->bCfgDownloaded = true; atomic_set(&Adapter->CurrNumFreeTxDesc, 0); Adapter->CurrNumRecvDescs = 0; Adapter->downloadDDR = 0; @@ -901,7 +901,7 @@ cntrlEnd: wait_event_timeout(Adapter->ioctl_fw_dnld_wait_queue, Adapter->waiting_to_fw_download_done, timeout); Adapter->fw_download_process_pid = INVALID_PID; - Adapter->fw_download_done = TRUE; + Adapter->fw_download_done = true; atomic_set(&Adapter->CurrNumFreeTxDesc, 0); Adapter->CurrNumRecvDescs = 0; Adapter->PrevNumRecvDescs = 0; @@ -1047,7 +1047,7 @@ cntrlEnd: return -EFAULT; if (tracing_flag) - Adapter->pTarangs->MacTracingEnabled = TRUE; + Adapter->pTarangs->MacTracingEnabled = true; else Adapter->pTarangs->MacTracingEnabled = false; break; @@ -1106,9 +1106,9 @@ cntrlEnd: } case IOCTL_BCM_WAKE_UP_DEVICE_FROM_IDLE: - if ((false == Adapter->bTriedToWakeUpFromlowPowerMode) && (TRUE == Adapter->IdleMode)) { + if ((false == Adapter->bTriedToWakeUpFromlowPowerMode) && (true == Adapter->IdleMode)) { Adapter->usIdleModePattern = ABORT_IDLE_MODE; - Adapter->bWakeUpDevice = TRUE; + Adapter->bWakeUpDevice = true; wake_up(&Adapter->process_rx_cntrlpkt); } @@ -1120,9 +1120,9 @@ cntrlEnd: UINT uiTempVar = 0; PCHAR pvBuffer = NULL; - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "Device in Idle/Shutdown Mode, Blocking Wrms\n"); Status = -EACCES; @@ -1207,7 +1207,7 @@ cntrlEnd: if (copy_to_user(IoBuffer.OutputBuffer, &Adapter->uiSectorSize, sizeof(UINT))) return -EFAULT; } else { - if ((TRUE == Adapter->bShutStatus) || (TRUE == Adapter->IdleMode)) { + if ((true == Adapter->bShutStatus) || (true == Adapter->IdleMode)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Device is in Idle/Shutdown Mode\n"); return -EACCES; } @@ -1310,9 +1310,9 @@ cntrlEnd: if (IOCTL_BCM_NVM_READ == cmd) { down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1335,9 +1335,9 @@ cntrlEnd: } else { down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1345,7 +1345,7 @@ cntrlEnd: return -EACCES; } - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; if (IsFlash2x(Adapter)) { /* * New Requirement:- @@ -1410,7 +1410,7 @@ cntrlEnd: UINT ReadOffset = 0; void __user *OutPutBuff; - if (IsFlash2x(Adapter) != TRUE) { + if (IsFlash2x(Adapter) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; } @@ -1448,9 +1448,9 @@ cntrlEnd: } down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1501,7 +1501,7 @@ cntrlEnd: UINT WriteOffset = 0; UINT WriteBytes = 0; - if (IsFlash2x(Adapter) != TRUE) { + if (IsFlash2x(Adapter) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; } @@ -1555,9 +1555,9 @@ cntrlEnd: down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1620,9 +1620,9 @@ cntrlEnd: /* Reading the Flash Sectio Bit map */ down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1645,7 +1645,7 @@ cntrlEnd: enum bcm_flash2x_section_val eFlash2xSectionVal = 0; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SET_ACTIVE_SECTION Called"); - if (IsFlash2x(Adapter) != TRUE) { + if (IsFlash2x(Adapter) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; } @@ -1664,9 +1664,9 @@ cntrlEnd: down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1695,7 +1695,7 @@ cntrlEnd: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_COPY_SECTION Called"); Adapter->bAllDSDWriteAllow = false; - if (IsFlash2x(Adapter) != TRUE) { + if (IsFlash2x(Adapter) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; } @@ -1734,9 +1734,9 @@ cntrlEnd: down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); up(&Adapter->NVMRdmWrmLock); @@ -1779,7 +1779,7 @@ cntrlEnd: break; } - if (IsFlash2x(Adapter) == TRUE) { + if (IsFlash2x(Adapter) == true) { if (IoBuffer.OutputLength < sizeof(struct bcm_flash2x_cs_info)) return -EINVAL; @@ -1801,7 +1801,7 @@ cntrlEnd: eFlash2xSectionVal = NO_SECTION_VAL; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SELECT_DSD Called"); - if (IsFlash2x(Adapter) != TRUE) { + if (IsFlash2x(Adapter) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; } @@ -1832,7 +1832,7 @@ cntrlEnd: return -EINVAL; } - Adapter->bAllDSDWriteAllow = TRUE; + Adapter->bAllDSDWriteAllow = true; Adapter->ulFlashCalStart = SectOfset; Adapter->eActiveDSD = eFlash2xSectionVal; } @@ -1881,9 +1881,9 @@ cntrlEnd: } down(&Adapter->NVMRdmWrmLock); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Device is in Idle/Shutdown Mode\n"); kfree(pReadBuff); @@ -1891,7 +1891,7 @@ cntrlEnd: return -EACCES; } - Adapter->bFlashRawRead = TRUE; + Adapter->bFlashRawRead = true; while (NOB) { if (NOB > DEFAULT_BUFF_SIZE) diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c index 810a170f..d2bb898 100644 --- a/drivers/staging/bcm/CmHost.c +++ b/drivers/staging/bcm/CmHost.c @@ -194,7 +194,7 @@ CopyIpAddrToClassifier(struct bcm_classifier_rule *pstClassifierEntry, u8IpAddressLen -= nSizeOfIPAddressInBytes; } if (u8IpAddressLen == 0) - pstClassifierEntry->bDestIpValid = TRUE; + pstClassifierEntry->bDestIpValid = true; i++; } @@ -256,7 +256,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex]; if (pstClassifierEntry) { /* Store if Ipv6 */ - pstClassifierEntry->bIpv6Protocol = (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false; + pstClassifierEntry->bIpv6Protocol = (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? true : false; /* Destinaiton Port */ pstClassifierEntry->ucDestPortRangeLength = psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength / 4; @@ -301,7 +301,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength, psfCSType->cCPacketClassificationRule.u8IPDestinationAddress, (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? - TRUE : false, eDestIpAddress); + true : false, eDestIpAddress); /* Source Ip Address and Mask */ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Ip Source Parameters : "); @@ -309,7 +309,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru CopyIpAddrToClassifier(pstClassifierEntry, psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength, psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress, - (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false, + (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? true : false, eSrcIpAddress); /* TOS */ @@ -319,7 +319,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru pstClassifierEntry->ucTosLow = psfCSType->cCPacketClassificationRule.u8IPTypeOfService[0]; pstClassifierEntry->ucTosHigh = psfCSType->cCPacketClassificationRule.u8IPTypeOfService[1]; pstClassifierEntry->ucTosMask = psfCSType->cCPacketClassificationRule.u8IPTypeOfService[2]; - pstClassifierEntry->bTOSValid = TRUE; + pstClassifierEntry->bTOSValid = true; } if (psfCSType->cCPacketClassificationRule.u8Protocol == 0) { /* we didn't get protocol field filled in by the BS */ @@ -357,7 +357,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru pstClassifierEntry->usVLANID = ntohs(psfCSType->cCPacketClassificationRule.u16VLANID); pstClassifierEntry->usValidityBitMap = ntohs(psfCSType->cCPacketClassificationRule.u16ValidityBitMap); - pstClassifierEntry->bUsed = TRUE; + pstClassifierEntry->bUsed = true; } } @@ -444,7 +444,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer USHORT uVCID = Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value; UINT UGIValue = 0; - Adapter->PackInfo[uiSearchRuleIndex].bValid = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bValid = true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Search Rule Index = %d\n", uiSearchRuleIndex); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "%s: SFID= %x ", __func__, ntohl(psfLocalSet->u32SFID)); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Updating Queue %d", uiSearchRuleIndex); @@ -532,10 +532,10 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Classifier index =%d", i); if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority) - Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority = true; if (psfCSType->cCPacketClassificationRule.u8ClassifierRulePriority) - Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bClassifierPriority = true; if (ucDsxType == DSA_ACK) { eClassifierAction = eAddClassifier; @@ -690,7 +690,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer sPhsRule.PHSModifiedNumPackets = 0; sPhsRule.PHSErrorNumPackets = 0; - /* bPHSRuleAssociated = TRUE; */ + /* bPHSRuleAssociated = true; */ /* Store The PHS Rule for this classifier */ PhsUpdateClassifierRule( @@ -719,7 +719,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer memcpy(sPhsRule.u8PHSF, psfCSType->cPhsRule.u8PHSF, MAX_PHS_LENGTHS); memcpy(sPhsRule.u8PHSM, psfCSType->cPhsRule.u8PHSM, MAX_PHS_LENGTHS); sPhsRule.u8RefCnt = 0; - sPhsRule.bUnclassifiedPHSRule = TRUE; + sPhsRule.bUnclassifiedPHSRule = true; sPhsRule.PHSModifiedBytes = 0; sPhsRule.PHSModifiedNumPackets = 0; sPhsRule.PHSErrorNumPackets = 0; @@ -1699,14 +1699,14 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to pstAddIndication->u8Direction; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "bValid:0x%X ", pstAddIndication->sfActiveSet.bValid); - if (pstAddIndication->sfActiveSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = TRUE; + if (pstAddIndication->sfActiveSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = true; - if (pstAddIndication->sfAuthorizedSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = TRUE; + if (pstAddIndication->sfAuthorizedSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = true; - if (pstAddIndication->sfAdmittedSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE; + if (pstAddIndication->sfAdmittedSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = true; if (pstAddIndication->sfActiveSet.bValid == false) { Adapter->PackInfo[uiSearchRuleIndex].bActive = false; @@ -1717,7 +1717,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to psfLocalSet = &pstAddIndication->sfAuthorizedSet; } else { psfLocalSet = &pstAddIndication->sfActiveSet; - Adapter->PackInfo[uiSearchRuleIndex].bActive = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bActive = true; } if (!psfLocalSet) { @@ -1744,7 +1744,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to /* *(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID; */ memcpy((((PUCHAR)pvBuffer)+1), &psfLocalSet->u32SFID, 4); - if (pstAddIndication->sfActiveSet.bValid == TRUE) { + if (pstAddIndication->sfActiveSet.bValid == true) { if (UPLINK_DIR == pstAddIndication->u8Direction) { if (!Adapter->LinkUpStatus) { netif_carrier_on(Adapter->dev); @@ -1803,14 +1803,14 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to if ((uiSearchRuleIndex < NO_OF_QUEUES)) { Adapter->PackInfo[uiSearchRuleIndex].ucDirection = pstChangeIndication->u8Direction; - if (pstChangeIndication->sfActiveSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = TRUE; + if (pstChangeIndication->sfActiveSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = true; - if (pstChangeIndication->sfAuthorizedSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = TRUE; + if (pstChangeIndication->sfAuthorizedSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = true; - if (pstChangeIndication->sfAdmittedSet.bValid == TRUE) - Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE; + if (pstChangeIndication->sfAdmittedSet.bValid == true) + Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = true; if (pstChangeIndication->sfActiveSet.bValid == false) { Adapter->PackInfo[uiSearchRuleIndex].bActive = false; @@ -1822,7 +1822,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to psfLocalSet = &pstChangeIndication->sfAuthorizedSet; } else { psfLocalSet = &pstChangeIndication->sfActiveSet; - Adapter->PackInfo[uiSearchRuleIndex].bActive = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bActive = true; } if (!psfLocalSet) { @@ -1885,7 +1885,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to kfree(pstAddIndication); return false; } - return TRUE; + return true; } int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user *user_buffer) @@ -1945,12 +1945,12 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "pHostInfo->QoSParamSet: 0x%x\n", pHostInfo->QoSParamSet); if (pHostInfo->QoSParamSet & 0x1) - Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bAuthorizedSet = true; if (pHostInfo->QoSParamSet & 0x2) - Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = true; if (pHostInfo->QoSParamSet & 0x4) { - Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = TRUE; - Adapter->PackInfo[uiSearchRuleIndex].bActive = TRUE; + Adapter->PackInfo[uiSearchRuleIndex].bActiveSet = true; + Adapter->PackInfo[uiSearchRuleIndex].bActive = true; } } } diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c index 9f7e30f..4b64d51 100644 --- a/drivers/staging/bcm/DDRInit.c +++ b/drivers/staging/bcm/DDRInit.c @@ -1095,7 +1095,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter) } } - Adapter->bDDRInitDone = TRUE; + Adapter->bDDRInitDone = true; return retval; } @@ -1126,7 +1126,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter) psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ; break; case DDR_133_MHZ: - bOverrideSelfRefresh = TRUE; + bOverrideSelfRefresh = true; psDDRSetting = asT3LP_DDRSetting133MHz; RegCount = ARRAY_SIZE(asT3LP_DDRSetting133MHz); RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ; @@ -1157,7 +1157,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter) psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ; break; case DDR_133_MHZ: - bOverrideSelfRefresh = TRUE; + bOverrideSelfRefresh = true; psDDRSetting = asT3LPB_DDRSetting133MHz; RegCount = ARRAY_SIZE(asT3LPB_DDRSetting133MHz); RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ; @@ -1165,7 +1165,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter) break; case DDR_160_MHZ: - bOverrideSelfRefresh = TRUE; + bOverrideSelfRefresh = true; psDDRSetting = asT3LPB_DDRSetting160MHz; RegCount = ARRAY_SIZE(asT3LPB_DDRSetting160MHz); RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_160MHZ; @@ -1218,7 +1218,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter) psDDRSetting += T3B_SKIP_CLOCK_PROGRAM_DUMP_100MHZ; break; case DDR_133_MHZ: - bOverrideSelfRefresh = TRUE; + bOverrideSelfRefresh = true; psDDRSetting = asT3B_DDRSetting133MHz; RegCount = ARRAY_SIZE(asT3B_DDRSetting133MHz); RegCount -= T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ; diff --git a/drivers/staging/bcm/HandleControlPacket.c b/drivers/staging/bcm/HandleControlPacket.c index 9b74768..617f725 100644 --- a/drivers/staging/bcm/HandleControlPacket.c +++ b/drivers/staging/bcm/HandleControlPacket.c @@ -17,7 +17,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk bool HighPriorityMessage = false; struct sk_buff *newPacket = NULL; char cntrl_msg_mask_bit = 0; - bool drop_pkt_flag = TRUE; + bool drop_pkt_flag = true; USHORT usStatus = *(PUSHORT)(skb->data); if (netif_msg_pktdata(Adapter)) @@ -29,10 +29,10 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "MAC Version Seems to be Non Multi-Classifier, rejected by Driver"); - HighPriorityMessage = TRUE; + HighPriorityMessage = true; break; case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP: - HighPriorityMessage = TRUE; + HighPriorityMessage = true; if (Adapter->LinkStatus == LINKUP_DONE) CmControlResponseMessage(Adapter, (skb->data + sizeof(USHORT))); @@ -41,12 +41,12 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk case STATUS_RSP: /* 0xA1 */ BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "LINK_CONTROL_RESP"); - HighPriorityMessage = TRUE; + HighPriorityMessage = true; LinkControlResponseMessage(Adapter, (skb->data + sizeof(USHORT))); break; case STATS_POINTER_RESP: /* 0xA6 */ - HighPriorityMessage = TRUE; + HighPriorityMessage = true; StatisticsResponse(Adapter, (skb->data + sizeof(USHORT))); break; case IDLE_MODE_STATUS: /* 0xA3 */ @@ -55,11 +55,11 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk "IDLE_MODE_STATUS Type Message Got from F/W"); InterfaceIdleModeRespond(Adapter, (PUINT)(skb->data + sizeof(USHORT))); - HighPriorityMessage = TRUE; + HighPriorityMessage = true; break; case AUTH_SS_HOST_MSG: - HighPriorityMessage = TRUE; + HighPriorityMessage = true; break; default: @@ -76,7 +76,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk if (Adapter->device_removed) break; - drop_pkt_flag = TRUE; + drop_pkt_flag = true; /* * There are cntrl msg from A0 to AC. It has been mapped to 0 to * C bit in the cntrl mask. @@ -93,7 +93,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk if (pTarang->RxCntrlMsgBitMask & (1 << cntrl_msg_mask_bit)) drop_pkt_flag = false; - if ((drop_pkt_flag == TRUE) || + if ((drop_pkt_flag == true) || (pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN) || ((pTarang->AppCtrlQueueLen > MAX_APP_QUEUE_LEN / 2) && @@ -174,17 +174,17 @@ int control_packet_handler(struct bcm_mini_adapter *Adapter /* pointer to adapte DBG_LVL_ALL, "Exiting\n"); return 0; } - if (TRUE == Adapter->bWakeUpDevice) { + if (true == Adapter->bWakeUpDevice) { Adapter->bWakeUpDevice = false; if ((false == Adapter->bTriedToWakeUpFromlowPowerMode) - && ((TRUE == Adapter->IdleMode) || - (TRUE == Adapter->bShutStatus))) { + && ((true == Adapter->IdleMode) || + (true == Adapter->bShutStatus))) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CP_CTRL_PKT, DBG_LVL_ALL, "Calling InterfaceAbortIdlemode\n"); /* * Adapter->bTriedToWakeUpFromlowPowerMode - * = TRUE; + * = true; */ InterfaceIdleModeWakeup(Adapter); } diff --git a/drivers/staging/bcm/IPv6Protocol.c b/drivers/staging/bcm/IPv6Protocol.c index 2ab5cfb..f569314 100644 --- a/drivers/staging/bcm/IPv6Protocol.c +++ b/drivers/staging/bcm/IPv6Protocol.c @@ -16,7 +16,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, if ((ppucPayload == NULL) || (*pusPayloadLength == 0) || (*bParseDone)) { - *bParseDone = TRUE; + *bParseDone = true; return NULL; } @@ -24,7 +24,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, pucPayloadPtr = *ppucPayload; if (!pucRetHeaderPtr || !pucPayloadPtr) { - *bParseDone = TRUE; + *bParseDone = true; return NULL; } @@ -89,7 +89,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nIPv6 Encrypted Security Payload Header"); - *bParseDone = TRUE; + *bParseDone = true; } break; @@ -97,26 +97,26 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nICMP Header"); - *bParseDone = TRUE; + *bParseDone = true; } break; case TCP_HEADER_TYPE: { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nTCP Header"); - *bParseDone = TRUE; + *bParseDone = true; } break; case UDP_HEADER_TYPE: { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "\nUDP Header"); - *bParseDone = TRUE; + *bParseDone = true; } break; default: { - *bParseDone = TRUE; + *bParseDone = true; } break; @@ -126,7 +126,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, if (*bParseDone == false) { if (*pusPayloadLength <= usNextHeaderOffset) { - *bParseDone = TRUE; + *bParseDone = true; } else { *pucNextHeader = *pucPayloadPtr; pucPayloadPtr += usNextHeaderOffset; @@ -273,7 +273,7 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, void *pcIpHeader, } } while (0); - if (bClassificationSucceed == TRUE) { + if (bClassificationSucceed == true) { int iMatchedSFQueueIndex = 0; iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); if (iMatchedSFQueueIndex >= NO_OF_QUEUES) { @@ -304,7 +304,7 @@ static bool MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule, if (uiCountIPSrcAddresses == 0) - return TRUE; + return true; /* First Convert the Ip Address in the packet to Host Endian order */ @@ -337,7 +337,7 @@ static bool MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "Ipv6 Src Ip Address Matched\n"); - return TRUE; + return true; } } } @@ -361,7 +361,7 @@ static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, if (uiCountIPDestinationAddresses == 0) - return TRUE; + return true; /* First Convert the Ip Address in the packet to Host Endian order */ @@ -394,7 +394,7 @@ static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL, "Ipv6 Destination Ip Address Matched\n"); - return TRUE; + return true; } } } diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index 301536b..174e29f 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -200,7 +200,7 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm if (retval) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "configuration file not downloaded properly"); else - Adapter->bCfgDownloaded = TRUE; + Adapter->bCfgDownloaded = true; return retval; } diff --git a/drivers/staging/bcm/InterfaceIdleMode.c b/drivers/staging/bcm/InterfaceIdleMode.c index 1432dba..38f4118 100644 --- a/drivers/staging/bcm/InterfaceIdleMode.c +++ b/drivers/staging/bcm/InterfaceIdleMode.c @@ -95,7 +95,7 @@ int InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int *pui wake_up(&Adapter->lowpower_mode_wait_queue); } else { - if (TRUE == Adapter->IdleMode) + if (true == Adapter->IdleMode) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Device is already in Idle mode...."); return status ; @@ -147,7 +147,7 @@ static int InterfaceAbortIdlemode(struct bcm_mini_adapter *Adapter, unsigned int struct bcm_interface_adapter *psInterfaceAdapter = Adapter->pvInterfaceAdapter; /* Abort Bus suspend if its already suspended */ - if ((TRUE == psInterfaceAdapter->bSuspended) && (TRUE == Adapter->bDoSuspend)) { + if ((true == psInterfaceAdapter->bSuspended) && (true == Adapter->bDoSuspend)) { status = usb_autopm_get_interface(psInterfaceAdapter->interface); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Bus got wakeup..Aborting Idle mode... status:%d \n", status); @@ -224,7 +224,7 @@ int InterfaceIdleModeWakeup(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Wake up already attempted.. ignoring\n"); } else { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Writing Low Power Mode Abort pattern to the Device\n"); - Adapter->bTriedToWakeUpFromlowPowerMode = TRUE; + Adapter->bTriedToWakeUpFromlowPowerMode = true; InterfaceAbortIdlemode(Adapter, Adapter->usIdleModePattern); } diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index 3acdb58..a1afe0c 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -46,7 +46,7 @@ static void InterfaceAdapterFree(struct bcm_interface_adapter *psIntfAdapter) msleep(100); } /* Free interrupt URB */ - /* psIntfAdapter->psAdapter->device_removed = TRUE; */ + /* psIntfAdapter->psAdapter->device_removed = true; */ usb_free_urb(psIntfAdapter->psInterruptUrb); /* Free transmit URBs */ @@ -74,26 +74,26 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter /* Program EP2 MAX_PKT_SIZE */ ulReg = ntohl(EP2_MPS_REG); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x128, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x128, 4, true); ulReg = ntohl(EP2_MPS); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x12C, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x12C, 4, true); ulReg = ntohl(EP2_CFG_REG); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE); - if (((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == TRUE) { + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, true); + if (((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == true) { ulReg = ntohl(EP2_CFG_INT); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, true); } else { /* USE BULK EP as TX in FS mode. */ ulReg = ntohl(EP2_CFG_BULK); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, true); } /* Program EP4 MAX_PKT_SIZE. */ ulReg = ntohl(EP4_MPS_REG); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x13C, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x13C, 4, true); ulReg = ntohl(EP4_MPS); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x140, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x140, 4, true); /* Program TX EP as interrupt(Alternate Setting) */ bytes = rdmalt(Adapter, 0x0F0110F8, (u32 *)&ulReg, sizeof(u32)); @@ -105,15 +105,15 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter ulReg |= 0x6; ulReg = ntohl(ulReg); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1CC, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1CC, 4, true); ulReg = ntohl(EP4_CFG_REG); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C8, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C8, 4, true); /* Program ISOCHRONOUS EP size to zero. */ ulReg = ntohl(ISO_MPS_REG); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D2, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D2, 4, true); ulReg = ntohl(ISO_MPS); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D6, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D6, 4, true); /* * Update EEPROM Version. @@ -121,24 +121,24 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter */ ReadBeceemEEPROM(Adapter, 0x1FC, (PUINT)&ulReg); ulReg &= 0x0101FFFF; - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1FC, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1FC, 4, true); /* Update length field if required. Also make the string NULL terminated. */ ReadBeceemEEPROM(Adapter, 0xA8, (PUINT)&ulReg); if ((ulReg&0x00FF0000)>>16 > 0x30) { ulReg = (ulReg&0xFF00FFFF)|(0x30<<16); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0xA8, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0xA8, 4, true); } ReadBeceemEEPROM(Adapter, 0x148, (PUINT)&ulReg); if ((ulReg&0x00FF0000)>>16 > 0x30) { ulReg = (ulReg&0xFF00FFFF)|(0x30<<16); - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x148, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x148, 4, true); } ulReg = 0; - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x122, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x122, 4, true); ulReg = 0; - BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C2, 4, TRUE); + BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C2, 4, true); } static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id) @@ -271,7 +271,7 @@ static void usbbcm_disconnect(struct usb_interface *intf) if (psAdapter->bDoSuspend) intf->needs_remote_wakeup = 0; - psAdapter->device_removed = TRUE ; + psAdapter->device_removed = true ; usb_set_intfdata(intf, NULL); InterfaceAdapterFree(psIntfAdapter); usb_put_dev(udev); @@ -322,7 +322,7 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n"); return status; } - if (TRUE == psIntfAdapter->psAdapter->fw_download_done) { + if (true == psIntfAdapter->psAdapter->fw_download_done) { if (StartInterruptUrb(psIntfAdapter)) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Cannot send interrupt in URB\n"); @@ -461,12 +461,12 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) /* T3B device will have EEPROM, check if EEPROM is proper and BCM16 can be done or not. */ BeceemEEPROMBulkRead(psIntfAdapter->psAdapter, &uiData, 0x0, 4); if (uiData == BECM) - bBcm16 = TRUE; + bBcm16 = true; dev_info(&psIntfAdapter->udev->dev, "number of alternate setting %d\n", psIntfAdapter->interface->num_altsetting); - if (bBcm16 == TRUE) { + if (bBcm16 == true) { /* selecting alternate setting one as a default setting for High Speed modem. */ if (psIntfAdapter->bHighSpeedDevice) retval = usb_set_interface(psIntfAdapter->udev, DEFAULT_SETTING_0, ALTERNATE_SETTING_1); @@ -481,7 +481,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) * If Modem is high speed device EP2 should be INT OUT End point * If Mode is FS then EP2 should be bulk end point */ - if (((psIntfAdapter->bHighSpeedDevice == TRUE) && (bcm_usb_endpoint_is_int_out(endpoint) == false)) + if (((psIntfAdapter->bHighSpeedDevice == true) && (bcm_usb_endpoint_is_int_out(endpoint) == false)) || ((psIntfAdapter->bHighSpeedDevice == false) && (bcm_usb_endpoint_is_bulk_out(endpoint) == false))) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Configuring the EEPROM\n"); @@ -506,7 +506,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) UINT _uiData = ntohl(EP2_CFG_INT); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Reverting Bulk to INT as it is in Full Speed mode.\n"); - BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (PUCHAR)&_uiData, 0x136, 4, TRUE); + BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (PUCHAR)&_uiData, 0x136, 4, true); } } else { usedIntOutForBulkTransfer = EP4 ; @@ -616,17 +616,17 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message) { struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf); - psIntfAdapter->bSuspended = TRUE; + psIntfAdapter->bSuspended = true; - if (TRUE == psIntfAdapter->bPreparingForBusSuspend) { + if (true == psIntfAdapter->bPreparingForBusSuspend) { psIntfAdapter->bPreparingForBusSuspend = false; if (psIntfAdapter->psAdapter->LinkStatus == LINKUP_DONE) { - psIntfAdapter->psAdapter->IdleMode = TRUE ; + psIntfAdapter->psAdapter->IdleMode = true ; BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Host Entered in PMU Idle Mode.\n"); } else { - psIntfAdapter->psAdapter->bShutStatus = TRUE; + psIntfAdapter->psAdapter->bShutStatus = true; BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Host Entered in PMU Shutdown Mode.\n"); } diff --git a/drivers/staging/bcm/InterfaceIsr.c b/drivers/staging/bcm/InterfaceIsr.c index b4ad1a0..4b41a58 100644 --- a/drivers/staging/bcm/InterfaceIsr.c +++ b/drivers/staging/bcm/InterfaceIsr.c @@ -11,13 +11,13 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) pr_info(PFX "%s: interrupt status %d\n", Adapter->dev->name, status); - if(Adapter->device_removed == TRUE) + if(Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Device has Got Removed."); return ; } - if(((Adapter->bPreparingForLowPowerMode == TRUE) && (Adapter->bDoSuspend == TRUE)) || + if(((Adapter->bPreparingForLowPowerMode == true) && (Adapter->bDoSuspend == true)) || psIntfAdapter->bSuspended || psIntfAdapter->bPreparingForBusSuspend) { @@ -41,7 +41,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) { atomic_set(&Adapter->CurrNumFreeTxDesc, (psIntfAdapter->ulInterruptData[1] & 0xFF00) >> 8); - atomic_set (&Adapter->uiMBupdate, TRUE); + atomic_set (&Adapter->uiMBupdate, true); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "TX mailbox contains %d", atomic_read(&Adapter->CurrNumFreeTxDesc)); } @@ -62,7 +62,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) } if(false == Adapter->waiting_to_fw_download_done) { - Adapter->waiting_to_fw_download_done = TRUE; + Adapter->waiting_to_fw_download_done = true; wake_up(&Adapter->ioctl_fw_dnld_wait_queue); } if(!atomic_read(&Adapter->TxPktAvail)) @@ -88,7 +88,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) case -EPIPE: { BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint has got halted/stalled...need to clear this"); - Adapter->bEndPointHalted = TRUE ; + Adapter->bEndPointHalted = true ; wake_up(&Adapter->tx_packet_wait_queue); urb->status = STATUS_SUCCESS ; return; @@ -159,7 +159,7 @@ int StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter) BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status); if(status == -EPIPE) { - psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; + psIntfAdapter->psAdapter->bEndPointHalted = true ; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); } } diff --git a/drivers/staging/bcm/InterfaceMisc.c b/drivers/staging/bcm/InterfaceMisc.c index 4173fd7..d31b20ff 100644 --- a/drivers/staging/bcm/InterfaceMisc.c +++ b/drivers/staging/bcm/InterfaceMisc.c @@ -10,21 +10,21 @@ int InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter, if (!psIntfAdapter) return -EINVAL; - if (psIntfAdapter->psAdapter->device_removed == TRUE) { + if (psIntfAdapter->psAdapter->device_removed == true) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Device got removed"); return -ENODEV; } - if ((psIntfAdapter->psAdapter->StopAllXaction == TRUE) && (psIntfAdapter->psAdapter->chip_id >= T3LPB)) { + if ((psIntfAdapter->psAdapter->StopAllXaction == true) && (psIntfAdapter->psAdapter->chip_id >= T3LPB)) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, RDM, DBG_LVL_ALL, "Currently Xaction is not allowed on the bus"); return -EACCES; } - if (psIntfAdapter->bSuspended == TRUE || psIntfAdapter->bPreparingForBusSuspend == TRUE) { + if (psIntfAdapter->bSuspended == true || psIntfAdapter->bPreparingForBusSuspend == true) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, RDM, DBG_LVL_ALL, "Bus is in suspended states hence RDM not allowed.."); return -EACCES; } - psIntfAdapter->psAdapter->DeviceAccess = TRUE; + psIntfAdapter->psAdapter->DeviceAccess = true; bytes = usb_control_msg(psIntfAdapter->udev, usb_rcvctrlpipe(psIntfAdapter->udev, 0), @@ -37,7 +37,7 @@ int InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter, 5000); if (-ENODEV == bytes) - psIntfAdapter->psAdapter->device_removed = TRUE; + psIntfAdapter->psAdapter->device_removed = true; if (bytes < 0) BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, RDM, DBG_LVL_ALL, "RDM failed status :%d", bytes); @@ -58,22 +58,22 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter, if (!psIntfAdapter) return -EINVAL; - if (psIntfAdapter->psAdapter->device_removed == TRUE) { + if (psIntfAdapter->psAdapter->device_removed == true) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0, "Device got removed"); return -ENODEV; } - if ((psIntfAdapter->psAdapter->StopAllXaction == TRUE) && (psIntfAdapter->psAdapter->chip_id >= T3LPB)) { + if ((psIntfAdapter->psAdapter->StopAllXaction == true) && (psIntfAdapter->psAdapter->chip_id >= T3LPB)) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "Currently Xaction is not allowed on the bus..."); return -EACCES; } - if (psIntfAdapter->bSuspended == TRUE || psIntfAdapter->bPreparingForBusSuspend == TRUE) { + if (psIntfAdapter->bSuspended == true || psIntfAdapter->bPreparingForBusSuspend == true) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "Bus is in suspended states hence RDM not allowed.."); return -EACCES; } - psIntfAdapter->psAdapter->DeviceAccess = TRUE; + psIntfAdapter->psAdapter->DeviceAccess = true; retval = usb_control_msg(psIntfAdapter->udev, usb_sndctrlpipe(psIntfAdapter->udev, 0), @@ -86,7 +86,7 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter, 5000); if (-ENODEV == retval) - psIntfAdapter->psAdapter->device_removed = TRUE; + psIntfAdapter->psAdapter->device_removed = true; if (retval < 0) { BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "WRM failed status :%d", retval); diff --git a/drivers/staging/bcm/InterfaceRx.c b/drivers/staging/bcm/InterfaceRx.c index f2973f5..e394acd 100644 --- a/drivers/staging/bcm/InterfaceRx.c +++ b/drivers/staging/bcm/InterfaceRx.c @@ -23,7 +23,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter) { index = atomic_read(&psIntfAdapter->uCurrRcb); pRcb = &psIntfAdapter->asUsbRcb[index]; - pRcb->bUsed = TRUE; + pRcb->bUsed = true; pRcb->psIntfAdapter= psIntfAdapter; BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "Got Rx desc %d used %d", index, atomic_read(&psIntfAdapter->uNumRcbUsed)); @@ -52,8 +52,8 @@ static void read_bulk_callback(struct urb *urb) pr_info(PFX "%s: rx urb status %d length %d\n", Adapter->dev->name, urb->status, urb->actual_length); - if((Adapter->device_removed == TRUE) || - (TRUE == Adapter->bEndPointHalted) || + if((Adapter->device_removed == true) || + (true == Adapter->bEndPointHalted) || (0 == urb->actual_length) ) { @@ -66,7 +66,7 @@ static void read_bulk_callback(struct urb *urb) { if(urb->status == -EPIPE) { - Adapter->bEndPointHalted = TRUE ; + Adapter->bEndPointHalted = true ; wake_up(&Adapter->tx_packet_wait_queue); } else @@ -217,7 +217,7 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us //if this return value is because of pipe halt. need to clear this. if(retval == -EPIPE) { - psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; + psIntfAdapter->psAdapter->bEndPointHalted = true ; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); } @@ -236,7 +236,7 @@ Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapter Cont -Return: TRUE - If Rx was successful. +Return: true - If Rx was successful. Other - If an error occurred. */ @@ -259,6 +259,6 @@ bool InterfaceRx (struct bcm_interface_adapter *psIntfAdapter) ReceiveRcb(psIntfAdapter, pRcb); RxDescCount--; } - return TRUE; + return true; } diff --git a/drivers/staging/bcm/InterfaceTx.c b/drivers/staging/bcm/InterfaceTx.c index 4d81bc7..6c09b6c 100644 --- a/drivers/staging/bcm/InterfaceTx.c +++ b/drivers/staging/bcm/InterfaceTx.c @@ -17,7 +17,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) { if(urb->status == -EPIPE) { - psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; + psIntfAdapter->psAdapter->bEndPointHalted = true ; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); } else @@ -31,14 +31,14 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) - if(TRUE == psAdapter->bPreparingForLowPowerMode) + if(true == psAdapter->bPreparingForLowPowerMode) { if(((pControlMsg->szData[0] == GO_TO_IDLE_MODE_PAYLOAD) && (pControlMsg->szData[1] == TARGET_CAN_GO_TO_IDLE_MODE))) { - bpowerDownMsg = TRUE ; + bpowerDownMsg = true ; //This covers the bus err while Idle Request msg sent down. if(urb->status != STATUS_SUCCESS) { @@ -52,7 +52,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) if(psAdapter->bDoSuspend == false) { - psAdapter->IdleMode = TRUE; + psAdapter->IdleMode = true; //since going in Idle mode completed hence making this var false; psAdapter->bPreparingForLowPowerMode = false ; @@ -78,10 +78,10 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) goto err_exit; } - bpowerDownMsg = TRUE ; + bpowerDownMsg = true ; if(psAdapter->bDoSuspend == false) { - psAdapter->bShutStatus = TRUE; + psAdapter->bShutStatus = true; //since going in shutdown mode completed hence making this var false; psAdapter->bPreparingForLowPowerMode = false ; BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Host Entered in shutdown Mode State..."); @@ -94,7 +94,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) { //issuing bus suspend request BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Issuing the Bus suspend request to USB stack"); - psIntfAdapter->bPreparingForBusSuspend = TRUE; + psIntfAdapter->bPreparingForBusSuspend = true; schedule_work(&psIntfAdapter->usbSuspendWork); } @@ -117,7 +117,7 @@ static struct bcm_usb_tcb *GetBulkOutTcb(struct bcm_interface_adapter *psIntfAda { index = atomic_read(&psIntfAdapter->uCurrTcb); pTcb = &psIntfAdapter->asUsbTcb[index]; - pTcb->bUsed = TRUE; + pTcb->bUsed = true; pTcb->psIntfAdapter= psIntfAdapter; BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Got Tx desc %d used %d", index, atomic_read(&psIntfAdapter->uNumTcbUsed)); @@ -146,7 +146,7 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_u BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Sending Bulk out packet\n"); //For T3B,INT OUT end point will be used as bulk out end point - if((psIntfAdapter->psAdapter->chip_id == T3B) && (psIntfAdapter->bHighSpeedDevice == TRUE)) + if((psIntfAdapter->psAdapter->chip_id == T3B) && (psIntfAdapter->bHighSpeedDevice == true)) { usb_fill_int_urb(urb, psIntfAdapter->udev, psIntfAdapter->sBulkOut.bulk_out_pipe, @@ -172,7 +172,7 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_u BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "failed submitting write urb, error %d", retval); if(retval == -EPIPE) { - psIntfAdapter->psAdapter->bEndPointHalted = TRUE ; + psIntfAdapter->psAdapter->bEndPointHalted = true ; wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue); } } diff --git a/drivers/staging/bcm/LeakyBucket.c b/drivers/staging/bcm/LeakyBucket.c index b58fa18..93169e8 100644 --- a/drivers/staging/bcm/LeakyBucket.c +++ b/drivers/staging/bcm/LeakyBucket.c @@ -31,7 +31,7 @@ static VOID UpdateTokenCount(register struct bcm_mini_adapter *Adapter) do_gettimeofday(&tv); for (i = 0; i < NO_OF_QUEUES; i++) { - if (TRUE == Adapter->PackInfo[i].bValid && + if (true == Adapter->PackInfo[i].bValid && (1 == Adapter->PackInfo[i].ucDirection)) { liCurrentTime = ((tv.tv_sec- Adapter->PackInfo[i].stLastUpdateTokenAt.tv_sec)*1000 + @@ -198,7 +198,7 @@ static VOID CheckAndSendPacketFromIndex(struct bcm_mini_adapter *Adapter, struct pkt has not been send out hence setting the pending flag indicating the host to send it out first next iteration. */ - psSF->uiPendedLast = TRUE; + psSF->uiPendedLast = true; spin_unlock_bh(&psSF->SFQueueLock); } } else { @@ -250,7 +250,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) UINT uiPrevTotalCount = 0; int iIndex = 0; - bool exit_flag = TRUE; + bool exit_flag = true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "=====>"); @@ -258,7 +258,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Got NULL Adapter"); return; } - if (Adapter->device_removed == TRUE) { + if (Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device removed"); return; } @@ -274,7 +274,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) uiPrevTotalCount = atomic_read(&Adapter->TotalPacketCount); for (iIndex = HiPriority; iIndex >= 0; iIndex--) { - if (!uiPrevTotalCount || (TRUE == Adapter->device_removed)) + if (!uiPrevTotalCount || (true == Adapter->device_removed)) break; if (Adapter->PackInfo[iIndex].bValid && @@ -287,10 +287,10 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) } while (uiPrevTotalCount > 0 && !Adapter->device_removed) { - exit_flag = TRUE; + exit_flag = true; /* second iteration to parse non-pending queues */ for (iIndex = HiPriority; iIndex >= 0; iIndex--) { - if (!uiPrevTotalCount || (TRUE == Adapter->device_removed)) + if (!uiPrevTotalCount || (true == Adapter->device_removed)) break; if (Adapter->PackInfo[iIndex].bValid && @@ -307,7 +307,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "In Idle Mode\n"); break; } - if (exit_flag == TRUE) + if (exit_flag == true) break; } /* end of inner while loop */ diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c index 7b2fa0f..3d75a84 100644 --- a/drivers/staging/bcm/Misc.c +++ b/drivers/staging/bcm/Misc.c @@ -52,7 +52,7 @@ int InitAdapter(struct bcm_mini_adapter *psAdapter) init_waitqueue_head(&psAdapter->process_read_wait_queue); init_waitqueue_head(&psAdapter->ioctl_fw_dnld_wait_queue); init_waitqueue_head(&psAdapter->lowpower_mode_wait_queue); - psAdapter->waiting_to_fw_download_done = TRUE; + psAdapter->waiting_to_fw_download_done = true; psAdapter->fw_download_done = false; default_wimax_protocol_initialize(psAdapter); @@ -234,7 +234,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) pLinkReq = (struct bcm_link_request *)ioBuffer; pLeader = (struct bcm_leader *)ioBuffer; /* ioBuffer Contains sw_Status and Payload */ - if (Adapter->bShutStatus == TRUE && + if (Adapter->bShutStatus == true && pLinkReq->szData[0] == LINK_DOWN_REQ_PAYLOAD && pLinkReq->szData[1] == LINK_SYNC_UP_SUBTYPE) { @@ -253,12 +253,12 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) return STATUS_FAILURE; } - if (Adapter->bShutStatus == TRUE) { + if (Adapter->bShutStatus == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "SYNC UP IN SHUTDOWN..Device WakeUp\n"); if (Adapter->bTriedToWakeUpFromlowPowerMode == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Waking up for the First Time..\n"); Adapter->usIdleModePattern = ABORT_SHUTDOWN_MODE; /* change it to 1 for current support. */ - Adapter->bWakeUpDevice = TRUE; + Adapter->bWakeUpDevice = true; wake_up(&Adapter->process_rx_cntrlpkt); Status = wait_event_interruptible_timeout(Adapter->lowpower_mode_wait_queue, !Adapter->bShutStatus, (5 * HZ)); @@ -275,7 +275,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) } } - if (Adapter->IdleMode == TRUE) { + if (Adapter->IdleMode == true) { /* BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Device is in Idle mode ... hence\n"); */ if (pLeader->Status == LINK_UP_CONTROL_REQ || pLeader->Status == 0x80 || pLeader->Status == CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ) { @@ -293,11 +293,11 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) Adapter->usIdleModePattern = ABORT_IDLE_MODE; } - /*Setting bIdleMode_tx_from_host to TRUE to indicate LED control thread to represent + /*Setting bIdleMode_tx_from_host to true to indicate LED control thread to represent * the wake up from idlemode is from host */ - /* Adapter->LEDInfo.bIdleMode_tx_from_host = TRUE; */ - Adapter->bWakeUpDevice = TRUE; + /* Adapter->LEDInfo.bIdleMode_tx_from_host = true; */ + Adapter->bWakeUpDevice = true; wake_up(&Adapter->process_rx_cntrlpkt); /* We should not send DREG message down while in idlemode. */ @@ -373,7 +373,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) Adapter->PackInfo[HiPriority].uiCurrentPacketsOnHost++; atomic_inc(&Adapter->TotalPacketCount); spin_unlock_bh(&Adapter->PackInfo[HiPriority].SFQueueLock); - Adapter->PackInfo[HiPriority].bValid = TRUE; + Adapter->PackInfo[HiPriority].bValid = true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "CurrBytesOnHost: %x bValid: %x", Adapter->PackInfo[HiPriority].uiCurrentBytesOnHost, @@ -416,7 +416,7 @@ void LinkMessage(struct bcm_mini_adapter *Adapter) pstLinkRequest->szData[1] = LINK_SYNC_UP_SUBTYPE; pstLinkRequest->Leader.Status = LINK_UP_CONTROL_REQ; pstLinkRequest->Leader.PLength = sizeof(ULONG); - Adapter->bSyncUpRequestSent = TRUE; + Adapter->bSyncUpRequestSent = true; } else if (Adapter->LinkStatus == PHY_SYNC_ACHIVED && Adapter->AutoLinkUp) { pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC); @@ -607,10 +607,10 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter) if (stIdleResponse.szData[1] == TARGET_CAN_GO_TO_IDLE_MODE) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "ACKING IDLE MODE !!!!!!!!!"); down(&Adapter->rdmwrmsync); - Adapter->bPreparingForLowPowerMode = TRUE; + Adapter->bPreparingForLowPowerMode = true; up(&Adapter->rdmwrmsync); /* Killing all URBS. */ - if (Adapter->bDoSuspend == TRUE) + if (Adapter->bDoSuspend == true) Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); } else { Adapter->bPreparingForLowPowerMode = false; @@ -797,7 +797,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter) } /* killing all submitted URBs. */ - psIntfAdapter->psAdapter->StopAllXaction = TRUE; + psIntfAdapter->psAdapter->StopAllXaction = true; Bcm_kill_all_URBs(psIntfAdapter); /* Reset the UMA-B Device */ if (ps_adapter->chip_id >= T3LPB) { @@ -940,7 +940,7 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter) ps_adapter->syscfgBefFwDld = value; if ((value & 0x60) == 0) - ps_adapter->bFlashBoot = TRUE; + ps_adapter->bFlashBoot = true; } reset_card_proc(ps_adapter); @@ -1031,7 +1031,7 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter) goto OUT; } - ps_adapter->fw_download_done = TRUE; + ps_adapter->fw_download_done = true; mdelay(10); OUT: @@ -1097,12 +1097,12 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) Adapter->AutoSyncup = false; } else { pr_info(DRV_NAME ": AutoSyncup is Enabled\n"); - Adapter->AutoSyncup = TRUE; + Adapter->AutoSyncup = true; } if (ntohl(Adapter->pstargetparams->HostDrvrConfig6) & AUTO_LINKUP_ENABLE) { pr_info(DRV_NAME ": Enabling autolink up"); - Adapter->AutoLinkUp = TRUE; + Adapter->AutoLinkUp = true; } else { pr_info(DRV_NAME ": Disabling autolink up"); Adapter->AutoLinkUp = false; @@ -1114,7 +1114,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) pr_info(DRV_NAME ": Power Save Mode: %lx\n", Adapter->ulPowerSaveMode); if (ntohl(Adapter->pstargetparams->HostDrvrConfig6) & AUTO_FIRM_DOWNLOAD) { pr_info(DRV_NAME ": Enabling Auto Firmware Download\n"); - Adapter->AutoFirmDld = TRUE; + Adapter->AutoFirmDld = true; } else { pr_info(DRV_NAME ": Disabling Auto Firmware Download\n"); Adapter->AutoFirmDld = false; @@ -1128,8 +1128,8 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) pr_info(DRV_NAME ": PMU MODE: %x", Adapter->PmuMode); if ((uiHostDrvrCfg6 >> HOST_BUS_SUSPEND_BIT) & (0x01)) { - Adapter->bDoSuspend = TRUE; - pr_info(DRV_NAME ": Making DoSuspend TRUE as per configFile"); + Adapter->bDoSuspend = true; + pr_info(DRV_NAME ": Making DoSuspend true as per configFile"); } uiEEPROMFlag = ntohl(Adapter->pstargetparams->m_u32EEPROMFlag); @@ -1153,7 +1153,7 @@ static void doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter) reporting_mode = ntohl(psAdapter->pstargetparams->m_u32PowerSavingModeOptions) & 0x02; psAdapter->bIsAutoCorrectEnabled = !((char)(psAdapter->ulPowerSaveMode >> 3) & 0x1); - if (reporting_mode == TRUE) { + if (reporting_mode == true) { BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "can't do suspen/resume as reporting mode is enable"); psAdapter->bDoSuspend = false; } @@ -1226,9 +1226,9 @@ int wrmWithLock(struct bcm_mini_adapter *Adapter, unsigned int uiAddress, PCHAR int status = STATUS_SUCCESS; down(&Adapter->rdmwrmsync); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { status = -EACCES; goto exit; @@ -1246,9 +1246,9 @@ int wrmaltWithLock(struct bcm_mini_adapter *Adapter, unsigned int uiAddress, uns down(&Adapter->rdmwrmsync); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { iRetVal = -EACCES; goto exit; @@ -1265,9 +1265,9 @@ int rdmaltWithLock(struct bcm_mini_adapter *Adapter, unsigned int uiAddress, uns int uiRetVal = STATUS_SUCCESS; down(&Adapter->rdmwrmsync); - if ((Adapter->IdleMode == TRUE) || - (Adapter->bShutStatus == TRUE) || - (Adapter->bPreparingForLowPowerMode == TRUE)) { + if ((Adapter->IdleMode == true) || + (Adapter->bShutStatus == true) || + (Adapter->bPreparingForLowPowerMode == true)) { uiRetVal = -EACCES; goto exit; @@ -1368,10 +1368,10 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter) if (stShutdownResponse.szData[2] == SHUTDOWN_ACK_FROM_DRIVER) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "ACKING SHUTDOWN MODE !!!!!!!!!"); down(&Adapter->rdmwrmsync); - Adapter->bPreparingForLowPowerMode = TRUE; + Adapter->bPreparingForLowPowerMode = true; up(&Adapter->rdmwrmsync); /* Killing all URBS. */ - if (Adapter->bDoSuspend == TRUE) + if (Adapter->bDoSuspend == true) Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); } else { Adapter->bPreparingForLowPowerMode = false; @@ -1559,7 +1559,7 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter) Adapter->IdleMode = false; Adapter->LinkUpStatus = false; - ClearTargetDSXBuffer(Adapter, 0, TRUE); + ClearTargetDSXBuffer(Adapter, 0, true); /* Delete All Classifier Rules */ for (i = 0; i < HiPriority; i++) @@ -1567,7 +1567,7 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter) flush_all_queues(Adapter); - if (Adapter->TimerActive == TRUE) + if (Adapter->TimerActive == true) Adapter->TimerActive = false; memset(Adapter->astFragmentedPktClassifierTable, 0, sizeof(struct bcm_fragmented_packet_info) * MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES); diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 892ebc6..68f613b 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -264,7 +264,7 @@ void DumpFullPacket(UCHAR *pBuf, UINT nPktLen) * pPhsdeviceExtension - ptr to Device extension containing PHS Classifier rules and PHS Rules , RX, TX buffer etc * * Returns: - * TRUE(1) -If allocation of memory was successful. + * true(1) -If allocation of memory was successful. * FALSE -If allocation of memory fails. */ int phs_init(struct bcm_phs_extension *pPhsdeviceExtension, struct bcm_mini_adapter *Adapter) @@ -805,7 +805,7 @@ static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule) if (!psPhsRule->u8PHSFLength) /* If any part of PHSF is valid then Rule contains valid PHSF */ return false; - return TRUE; + return true; } else return false; } @@ -893,7 +893,7 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid, IN B_UINT16 uiC /* Check for a free entry in SFID table */ for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) { if (!psServiceFlowTable->stSFList[iSfIndex].bUsed) { - bFreeEntryFound = TRUE; + bFreeEntryFound = true; break; } } @@ -906,7 +906,7 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid, IN B_UINT16 uiC eActiveClassifierRuleContext, u8AssociatedPHSI); if (uiStatus == PHS_SUCCESS) { /* Add entry at free index to the SF */ - psServiceFlowTable->stSFList[iSfIndex].bUsed = TRUE; + psServiceFlowTable->stSFList[iSfIndex].bUsed = true; psServiceFlowTable->stSFList[iSfIndex].uiVcid = uiVcid; } @@ -1034,7 +1034,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, * The Classifier already exists in the old rules table * Lets replace the old classifier with the new one. */ - bFreeEntryFound = TRUE; + bFreeEntryFound = true; } } @@ -1048,7 +1048,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, psClassifierRules = &psaClassifiertable->stOldPhsRulesList[iClassifierIndex]; if (!psClassifierRules->bUsed) { - bFreeEntryFound = TRUE; + bFreeEntryFound = true; break; } } @@ -1080,7 +1080,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, return ERR_PHSRULE_MEMALLOC_FAIL; } - psClassifierRules->bUsed = TRUE; + psClassifierRules->bUsed = true; psClassifierRules->uiClassifierRuleId = uiClsId; psClassifierRules->u8PHSI = psPhsRule->u8PHSI; psClassifierRules->bUnclassifiedPHSRule = psPhsRule->bUnclassifiedPHSRule; @@ -1141,7 +1141,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, pstClassifierEntry->pstPhsRule = pstAddPhsRule; } - pstClassifierEntry->bUsed = TRUE; + pstClassifierEntry->bUsed = true; pstClassifierEntry->u8PHSI = pstClassifierEntry->pstPhsRule->u8PHSI; pstClassifierEntry->uiClassifierRuleId = uiClsId; pstClassifierEntry->pstPhsRule->u8RefCnt++; @@ -1164,7 +1164,7 @@ static bool DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table * * Store the currently active rule into the old rules list * CreateClassifierPHSRule(uiClsId,psaClassifiertable,pstPhsRule,eOldClassifierRuleContext,pstPhsRule->u8PHSI); */ - return TRUE; + return true; } else return false; } diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c index a8dd9c3..ecab00b 100644 --- a/drivers/staging/bcm/Qos.c +++ b/drivers/staging/bcm/Qos.c @@ -22,7 +22,7 @@ static VOID PruneQueue(struct bcm_mini_adapter *Adapter, int iIndex); * Parameters - pstClassifierRule: Pointer to the packet info structure. * - ulSrcIP : Source IP address from the packet. * -* Returns - TRUE(If address matches) else FAIL . +* Returns - true(If address matches) else FAIL . *********************************************************************/ bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulSrcIP) { @@ -32,14 +32,14 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulSr ulSrcIP = ntohl(ulSrcIP); if (0 == pstClassifierRule->ucIPSourceAddressLength) - return TRUE; + return true; for (ucLoopIndex = 0; ucLoopIndex < (pstClassifierRule->ucIPSourceAddressLength); ucLoopIndex++) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Ip Address Mask:0x%x PacketIp:0x%x and Classification:0x%x", (UINT)pstClassifierRule->stSrcIpAddress.ulIpv4Mask[ucLoopIndex], (UINT)ulSrcIP, (UINT)pstClassifierRule->stSrcIpAddress.ulIpv6Addr[ucLoopIndex]); if ((pstClassifierRule->stSrcIpAddress.ulIpv4Mask[ucLoopIndex] & ulSrcIP) == (pstClassifierRule->stSrcIpAddress.ulIpv4Addr[ucLoopIndex] & pstClassifierRule->stSrcIpAddress.ulIpv4Mask[ucLoopIndex])) { - return TRUE; + return true; } } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Ip Address Not Matched"); @@ -56,7 +56,7 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulSr * Parameters - pstClassifierRule: Pointer to the packet info structure. * - ulDestIP : Destination IP address from the packet. * -* Returns - TRUE(If address matches) else FAIL . +* Returns - true(If address matches) else FAIL . *********************************************************************/ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulDestIP) { @@ -65,7 +65,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulD ulDestIP = ntohl(ulDestIP); if (0 == pstClassifierRule->ucIPDestinationAddressLength) - return TRUE; + return true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address 0x%x 0x%x 0x%x ", (UINT)ulDestIP, (UINT)pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex], (UINT)pstClassifierRule->stDestIpAddress.ulIpv4Addr[ucLoopIndex]); for (ucLoopIndex = 0; ucLoopIndex < (pstClassifierRule->ucIPDestinationAddressLength); ucLoopIndex++) @@ -73,7 +73,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulD if ((pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex] & ulDestIP) == (pstClassifierRule->stDestIpAddress.ulIpv4Addr[ucLoopIndex] & pstClassifierRule->stDestIpAddress.ulIpv4Mask[ucLoopIndex])) { - return TRUE; + return true; } } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address Not Matched"); @@ -89,18 +89,18 @@ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulD * Parameters - pstClassifierRule : Pointer to the packet info structure. * - ucTypeOfService: TOS from the packet. * -* Returns - TRUE(If address matches) else FAIL. +* Returns - true(If address matches) else FAIL. **************************************************************************/ bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucTypeOfService) { struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if (3 != pstClassifierRule->ucIPTypeOfServiceLength) - return TRUE; + return true; if (((pstClassifierRule->ucTosMask & ucTypeOfService) <= pstClassifierRule->ucTosHigh) && ((pstClassifierRule->ucTosMask & ucTypeOfService) >= pstClassifierRule->ucTosLow)) { - return TRUE; + return true; } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Type Of Service Not Matched"); return false; @@ -115,20 +115,20 @@ bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucTypeOfServi * Parameters - pstClassifierRule: Pointer to the packet info structure. * - ucProtocol : Protocol from the packet. * -* Returns - TRUE(If address matches) else FAIL. +* Returns - true(If address matches) else FAIL. ****************************************************************************/ bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtocol) { UCHAR ucLoopIndex = 0; struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if (0 == pstClassifierRule->ucProtocolLength) - return TRUE; + return true; for (ucLoopIndex = 0; ucLoopIndex < pstClassifierRule->ucProtocolLength; ucLoopIndex++) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol:0x%X Classification Protocol:0x%X", ucProtocol, pstClassifierRule->ucProtocol[ucLoopIndex]); if (pstClassifierRule->ucProtocol[ucLoopIndex] == ucProtocol) { - return TRUE; + return true; } } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Not Matched"); @@ -144,7 +144,7 @@ bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtoc * Parameters - pstClassifierRule: Pointer to the packet info structure. * - ushSrcPort : Source port from the packet. * -* Returns - TRUE(If address matches) else FAIL. +* Returns - true(If address matches) else FAIL. ***************************************************************************/ bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPort) { @@ -154,13 +154,13 @@ bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPo if (0 == pstClassifierRule->ucSrcPortRangeLength) - return TRUE; + return true; for (ucLoopIndex = 0; ucLoopIndex < pstClassifierRule->ucSrcPortRangeLength; ucLoopIndex++) { if (ushSrcPort <= pstClassifierRule->usSrcPortRangeHi[ucLoopIndex] && ushSrcPort >= pstClassifierRule->usSrcPortRangeLo[ucLoopIndex]) { - return TRUE; + return true; } } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Port: %x Not Matched ", ushSrcPort); @@ -176,7 +176,7 @@ bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPo * Parameters - pstClassifierRule: Pointer to the packet info structure. * - ushDestPort : Destination port from the packet. * -* Returns - TRUE(If address matches) else FAIL. +* Returns - true(If address matches) else FAIL. ***************************************************************************/ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDestPort) { @@ -184,7 +184,7 @@ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDest struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if (0 == pstClassifierRule->ucDestPortRangeLength) - return TRUE; + return true; for (ucLoopIndex = 0; ucLoopIndex < pstClassifierRule->ucDestPortRangeLength; ucLoopIndex++) { @@ -193,7 +193,7 @@ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDest if (ushDestPort <= pstClassifierRule->usDestPortRangeHi[ucLoopIndex] && ushDestPort >= pstClassifierRule->usDestPortRangeLo[ucLoopIndex]) { - return TRUE; + return true; } } BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dest Port: %x Not Matched", ushDestPort); @@ -280,7 +280,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, break; } while (0); - if (TRUE == bClassificationSucceed) + if (true == bClassificationSucceed) { int iMatchedSFQueueIndex = 0; iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); @@ -501,7 +501,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) { usCurrFragment = (ntohs(pIpHeader->frag_off) & IP_OFFSET); if ((ntohs(pIpHeader->frag_off) & IP_MF) || usCurrFragment) - bFragmentedPkt = TRUE; + bFragmentedPkt = true; if (bFragmentedPkt) { @@ -510,7 +510,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) if (pstClassifierRule) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "It is next Fragmented pkt"); - bClassificationSucceed = TRUE; + bClassificationSucceed = true; } if (!(ntohs(pIpHeader->frag_off) & IP_MF)) { @@ -605,7 +605,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) } while (0); } - if (bClassificationSucceed == TRUE) + if (bClassificationSucceed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "CF id : %d, SF ID is =%lu", pstClassifierRule->uiClassifierRuleIndex, pstClassifierRule->ulSFID); @@ -632,7 +632,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) { //First Fragment of Fragmented Packet. Create Frag CLS Entry struct bcm_fragmented_packet_info stFragPktInfo; - stFragPktInfo.bUsed = TRUE; + stFragPktInfo.bUsed = true; stFragPktInfo.ulSrcIpAddress = pIpHeader->saddr; stFragPktInfo.usIpIdentification = pIpHeader->id; stFragPktInfo.pstMatchedClassifierEntry = pstClassifierRule; @@ -654,7 +654,7 @@ static bool EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRul UINT i = 0; struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if (pstClassifierRule->ucEthCSSrcMACLen == 0) - return TRUE; + return true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s\n", __FUNCTION__); for (i = 0; i < MAC_ADDRESS_SIZE; i++) { @@ -663,7 +663,7 @@ static bool EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRul (Mac[i] & pstClassifierRule->au8EThCSSrcMACMask[i])) return false; } - return TRUE; + return true; } static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRule, PUCHAR Mac) @@ -671,7 +671,7 @@ static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRu UINT i = 0; struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if (pstClassifierRule->ucEthCSDestMACLen == 0) - return TRUE; + return true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s\n", __FUNCTION__); for (i = 0; i < MAC_ADDRESS_SIZE; i++) { @@ -680,7 +680,7 @@ static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRu (Mac[i] & pstClassifierRule->au8EThCSDestMACMask[i])) return false; } - return TRUE; + return true; } static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, struct sk_buff* skb, struct bcm_eth_packet_info *pstEthCsPktInfo) @@ -688,7 +688,7 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); if ((pstClassifierRule->ucEtherTypeLen == 0) || (pstClassifierRule->au8EthCSEtherType[0] == 0)) - return TRUE; + return true; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s SrcEtherType:%x CLS EtherType[0]:%x\n", __FUNCTION__, pstEthCsPktInfo->usEtherType, pstClassifierRule->au8EthCSEtherType[0]); if (pstClassifierRule->au8EthCSEtherType[0] == 1) @@ -696,7 +696,7 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s CLS EtherType[1]:%x EtherType[2]:%x\n", __FUNCTION__, pstClassifierRule->au8EthCSEtherType[1], pstClassifierRule->au8EthCSEtherType[2]); if (memcmp(&pstEthCsPktInfo->usEtherType, &pstClassifierRule->au8EthCSEtherType[1], 2) == 0) - return TRUE; + return true; else return false; } @@ -708,7 +708,7 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s EthCS DSAP:%x EtherType[2]:%x\n", __FUNCTION__, pstEthCsPktInfo->ucDSAP, pstClassifierRule->au8EthCSEtherType[2]); if (pstEthCsPktInfo->ucDSAP == pstClassifierRule->au8EthCSEtherType[2]) - return TRUE; + return true; else return false; @@ -736,7 +736,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xF000) >> 13; if ((uPriority >= pstClassifierRule->usUserPriority[0]) && (uPriority <= pstClassifierRule->usUserPriority[1])) - bClassificationSucceed = TRUE; + bClassificationSucceed = true; if (!bClassificationSucceed) return false; @@ -756,7 +756,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "%s Pkt VLANID %x Priority: %d\n", __FUNCTION__, usVLANID, uPriority); if (usVLANID == ((pstClassifierRule->usVLANID & 0xFFF0) >> 4)) - bClassificationSucceed = TRUE; + bClassificationSucceed = true; if (!bClassificationSucceed) return false; @@ -764,7 +764,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 Q VLAN ID Rule Matched\n"); - return TRUE; + return true; } diff --git a/drivers/staging/bcm/Transmit.c b/drivers/staging/bcm/Transmit.c index 2ed4836..1de2861 100644 --- a/drivers/staging/bcm/Transmit.c +++ b/drivers/staging/bcm/Transmit.c @@ -202,7 +202,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje } /* Check end point for halt/stall. */ - if (Adapter->bEndPointHalted == TRUE) { + if (Adapter->bEndPointHalted == true) { Bcm_clear_halt_of_endpoints(Adapter); Adapter->bEndPointHalted = false; StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); @@ -224,7 +224,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje if ((Adapter->IdleMode || Adapter->bShutStatus) && atomic_read(&Adapter->TotalPacketCount)) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Device in Low Power mode...waking up"); Adapter->usIdleModePattern = ABORT_IDLE_MODE; - Adapter->bWakeUpDevice = TRUE; + Adapter->bWakeUpDevice = true; wake_up(&Adapter->process_rx_cntrlpkt); } diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h index afbb7aa..5d2b32e 100644 --- a/drivers/staging/bcm/Typedefs.h +++ b/drivers/staging/bcm/Typedefs.h @@ -6,10 +6,6 @@ #define STATUS_SUCCESS 0 #define STATUS_FAILURE -1 - -#define TRUE 1 - - typedef long LONG; typedef void VOID; diff --git a/drivers/staging/bcm/hostmibs.c b/drivers/staging/bcm/hostmibs.c index e0b20a9..11a7ea7 100644 --- a/drivers/staging/bcm/hostmibs.c +++ b/drivers/staging/bcm/hostmibs.c @@ -26,7 +26,7 @@ int ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_m /* Copy the classifier Table */ for (nClassifierIndex = 0; nClassifierIndex < MAX_CLASSIFIERS; nClassifierIndex++) { - if (Adapter->astClassifierTable[nClassifierIndex].bUsed == TRUE) + if (Adapter->astClassifierTable[nClassifierIndex].bUsed == true) memcpy((void *) & pstHostMibs-> astClassifierTable[nClassifierIndex], (void *) & Adapter-> diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 0dbf610..48fd571 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -20,7 +20,7 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios) if (Status) return false; else - return TRUE; + return true; } static int LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLedIndex, @@ -31,7 +31,7 @@ static int LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe /* Check if num_of_time is -ve. If yes, blink led in infinite loop */ if (num_of_time < 0) { - bInfinite = TRUE; + bInfinite = true; num_of_time = 1; } while (num_of_time) { @@ -108,7 +108,7 @@ static int LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N int Status = STATUS_SUCCESS; int num_of_time = 0, num_of_time_tx = 0, num_of_time_rx = 0; UINT remDelay = 0; - bool bBlinkBothLED = TRUE; + bool bBlinkBothLED = true; /* UINT GPIO_num = DISABLE_GPIO_NUM; */ ulong timeout = 0; @@ -671,7 +671,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) GPIO_num = DISABLE_GPIO_NUM; - while (TRUE) { + while (true) { /* Wait till event is triggered */ if ((GPIO_num == DISABLE_GPIO_NUM) || @@ -700,7 +700,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) if (Adapter->LEDInfo.bLedInitDone == false) { LedGpioInit(Adapter); - Adapter->LEDInfo.bLedInitDone = TRUE; + Adapter->LEDInfo.bLedInitDone = true; } switch (Adapter->DriverState) { @@ -804,7 +804,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) } /* Turn off LED And WAKE-UP for Sendinf IDLE mode ACK */ Adapter->LEDInfo.bLedInitDone = false; - Adapter->LEDInfo.bIdle_led_off = TRUE; + Adapter->LEDInfo.bIdle_led_off = true; wake_up(&Adapter->LEDInfo.idleModeSyncEvent); GPIO_num = DISABLE_GPIO_NUM; break; @@ -860,7 +860,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) int InitLedSettings(struct bcm_mini_adapter *Adapter) { int Status = STATUS_SUCCESS; - bool bEnableThread = TRUE; + bool bEnableThread = true; UCHAR uiIndex = 0; /* diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index 017c347..3e85817 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -76,7 +76,7 @@ static UCHAR ReadEEPROMStatusRegister(struct bcm_mini_adapter *Adapter) value = 0; uiStatus = 0; rdmalt(Adapter, EEPROM_SPI_Q_STATUS1_REG, &uiStatus, sizeof(uiStatus)); - if (Adapter->device_removed == TRUE) { + if (Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Modem has got removed hence exiting...."); break; } @@ -150,7 +150,7 @@ int ReadBeceemEEPROMBulk(struct bcm_mini_adapter *Adapter, while (dwRetries != 0) { uiStatus = 0; rdmalt(Adapter, EEPROM_SPI_Q_STATUS1_REG, &uiStatus, sizeof(uiStatus)); - if (Adapter->device_removed == TRUE) { + if (Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Modem has got Removed.hence exiting from loop..."); return -ENODEV; } @@ -515,7 +515,7 @@ static unsigned int BcmGetEEPROMSize(struct bcm_mini_adapter *Adapter) * EEPROM may not be present or not programmed */ uiData = 0xBABEFACE; - if (BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&uiData, 0, 4, TRUE) == 0) { + if (BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&uiData, 0, 4, true) == 0) { uiData = 0; for (uiIndex = 2; uiIndex <= 256; uiIndex *= 2) { BeceemEEPROMBulkRead(Adapter, &uiData, uiIndex * 1024, 4); @@ -1661,7 +1661,7 @@ static int BeceemEEPROMWritePage(struct bcm_mini_adapter *Adapter, unsigned int uiStatus = 0; rdmalt(Adapter, EEPROM_SPI_Q_STATUS1_REG, &uiStatus, sizeof(uiStatus)); - if (Adapter->device_removed == TRUE) { + if (Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Modem got removed hence exiting from loop...."); return -ENODEV; } @@ -1683,7 +1683,7 @@ static int BeceemEEPROMWritePage(struct bcm_mini_adapter *Adapter, unsigned int uiEpromStatus = 0; while (uiRetries != 0) { uiEpromStatus = ReadEEPROMStatusRegister(Adapter); - if (Adapter->device_removed == TRUE) { + if (Adapter->device_removed == true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Modem has got removed hence exiting from loop..."); return -ENODEV; } @@ -1896,7 +1896,7 @@ int BeceemNVMWrite(struct bcm_mini_adapter *Adapter, value = 0; wrmalt(Adapter, 0x0f000C80, &value, sizeof(value)); - if (Adapter->bStatusWrite == TRUE) + if (Adapter->bStatusWrite == true) Status = BeceemFlashBulkWriteStatus(Adapter, pBuffer, uiFlashOffset, @@ -2013,7 +2013,7 @@ int BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter, unsigned int uiSectorS (PUINT)&sFlashCsInfo, Adapter->ulFlashControlSectionStart, sizeof(sFlashCsInfo), - TRUE); + true); } Restore: @@ -2440,7 +2440,7 @@ static VOID UpdateVendorInfo(struct bcm_mini_adapter *Adapter) continue; } - Adapter->uiVendorExtnFlag = TRUE; + Adapter->uiVendorExtnFlag = true; uiSizeSection = (Adapter->psFlash2xVendorInfo->VendorSection[i].OffsetFromZeroForSectionEnd - Adapter->psFlash2xVendorInfo->VendorSection[i].OffsetFromZeroForSectionStart); @@ -3036,7 +3036,7 @@ static int BcmGetActiveISO(struct bcm_mini_adapter *Adapter) * @uiOffset : Offset provided in the Flash * * Return Value:- - * Success:-TRUE , offset is writable + * Success:-true , offset is writable * Failure:-false, offset is RO * */ @@ -3060,7 +3060,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset permissionBits = uiWordOfSectorPermission & (0x3 << uiBitofSectorePermission); permissionBits = (permissionBits >> uiBitofSectorePermission) & 0x3; if (permissionBits == SECTOR_READWRITE_PERMISSION) - return TRUE; + return true; else return false; } @@ -3148,7 +3148,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE2) { psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_ACT; - SetActiveISODone = TRUE; + SetActiveISODone = true; } } @@ -3168,7 +3168,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE1) { psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_ACT; - SetActiveISODone = TRUE; + SetActiveISODone = true; } } @@ -3189,7 +3189,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl /* Means section is writable */ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD2)) { psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_ACT; - SetActiveDSDDone = TRUE; + SetActiveDSDDone = true; } } } @@ -3211,7 +3211,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl /* Means section is writable */ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD1)) { psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_ACT; - SetActiveDSDDone = TRUE; + SetActiveDSDDone = true; } } } @@ -3233,7 +3233,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl /* Means section is writable */ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD0)) { psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_ACT; - SetActiveDSDDone = TRUE; + SetActiveDSDDone = true; } } } @@ -3362,12 +3362,12 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti int HighestPriISO = 0; Status = IsSectionWritable(Adapter, eFlash2xSectVal); - if (Status != TRUE) { + if (Status != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Provided Section <%d> is not writable", eFlash2xSectVal); return STATUS_FAILURE; } - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; switch (eFlash2xSectVal) { case ISO_IMAGE1: case ISO_IMAGE2: @@ -3394,7 +3394,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti HighestPriISO, 0 + FIELD_OFFSET_IN_HEADER(struct bcm_iso_header *, ISOImagePriority), SIGNATURE_SIZE, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Priority has not been written properly"); Status = STATUS_FAILURE; @@ -3419,7 +3419,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti eFlash2xSectVal, 0 + FIELD_OFFSET_IN_HEADER(struct bcm_iso_header *, ISOImagePriority), SIGNATURE_SIZE, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Priority has not been written properly"); break; @@ -3455,7 +3455,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti HighestPriDSD, Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + FIELD_OFFSET_IN_HEADER(struct bcm_dsd_header *, DSDImagePriority), SIGNATURE_SIZE, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Priority has not been written properly"); break; @@ -3475,7 +3475,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti HighestPriDSD, Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + FIELD_OFFSET_IN_HEADER(struct bcm_dsd_header *, DSDImagePriority), SIGNATURE_SIZE, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Priority has not been written properly"); break; @@ -3495,7 +3495,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti eFlash2xSectVal, Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader + FIELD_OFFSET_IN_HEADER(struct bcm_dsd_header *, DSDImagePriority), SIGNATURE_SIZE, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Priority has not been written properly"); Status = STATUS_FAILURE; @@ -3614,7 +3614,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section uiReadOffsetWithinPart = 0; eISOWritePart = ISO_IMAGE2; uiWriteOffsetWithinPart = 0; - IsThisHeaderSector = TRUE; + IsThisHeaderSector = true; } else { uiReadOffsetWithinPart = uiReadOffsetWithinPart + Adapter->uiSectorSize; uiWriteOffsetWithinPart = uiWriteOffsetWithinPart + Adapter->uiSectorSize; @@ -3650,27 +3650,27 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section break; } - if (IsThisHeaderSector == TRUE) { + if (IsThisHeaderSector == true) { /* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */ memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE); for (i = 0; i < MAX_RW_SIZE; i++) *(Buff + sigOffset + i) = 0xFF; } - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; Status = BcmFlash2xBulkWrite(Adapter, (PUINT)Buff, eISOWritePart, uiWriteOffsetWithinPart, Adapter->uiSectorSize, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Write failed while copying ISO: Part: %x, OffsetWithinPart: %x\n", eISOWritePart, uiWriteOffsetWithinPart); break; } Adapter->bHeaderChangeAllowed = false; - if (IsThisHeaderSector == TRUE) { + if (IsThisHeaderSector == true) { WriteToFlashWithoutSectorErase(Adapter, SigBuff, eISOWritePart, @@ -3727,7 +3727,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section uiReadOffsetWithinPart = 0; eISOWritePart = ISO_IMAGE1; uiWriteOffsetWithinPart = 0; - IsThisHeaderSector = TRUE; + IsThisHeaderSector = true; } else { uiReadOffsetWithinPart = uiReadOffsetWithinPart + Adapter->uiSectorSize; uiWriteOffsetWithinPart = uiWriteOffsetWithinPart + Adapter->uiSectorSize; @@ -3763,27 +3763,27 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section break; } - if (IsThisHeaderSector == TRUE) { + if (IsThisHeaderSector == true) { /* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */ memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE); for (i = 0; i < MAX_RW_SIZE; i++) *(Buff + sigOffset + i) = 0xFF; } - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; Status = BcmFlash2xBulkWrite(Adapter, (PUINT)Buff, eISOWritePart, uiWriteOffsetWithinPart, Adapter->uiSectorSize, - TRUE); + true); if (Status) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Write failed while copying ISO: Part: %x, OffsetWithinPart: %x\n", eISOWritePart, uiWriteOffsetWithinPart); break; } Adapter->bHeaderChangeAllowed = false; - if (IsThisHeaderSector == TRUE) { + if (IsThisHeaderSector == true) { WriteToFlashWithoutSectorErase(Adapter, SigBuff, eISOWritePart, @@ -3885,9 +3885,9 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Restoring the signature"); - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; Adapter->bSigCorrupted = false; - BcmFlash2xBulkWrite(Adapter, &uiSignature, eFlashSectionVal, uiOffset, SIGNATURE_SIZE, TRUE); + BcmFlash2xBulkWrite(Adapter, &uiSignature, eFlashSectionVal, uiOffset, SIGNATURE_SIZE, true); Adapter->bHeaderChangeAllowed = false; return STATUS_SUCCESS; @@ -3899,7 +3899,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio * @Adapater :- Bcm Driver Private Data Structure * @psFlash2xReadWrite :-Flash2x Read/write structure pointer * - * Return values:-Return TRUE is request is valid else false. + * Return values:-Return true is request is valid else false. */ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite) @@ -3910,7 +3910,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 uiNumOfBytes = psFlash2xReadWrite->numOfBytes; - if (IsSectionExistInFlash(Adapter, psFlash2xReadWrite->Section) != TRUE) { + if (IsSectionExistInFlash(Adapter, psFlash2xReadWrite->Section) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%x> does not exixt in Flash", psFlash2xReadWrite->Section); return false; } @@ -3946,7 +3946,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 /* Checking the boundary condition */ if ((uiSectStartOffset + psFlash2xReadWrite->offset + uiNumOfBytes) <= uiSectEndOffset) - return TRUE; + return true; else { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Invalid Request...."); return false; @@ -3958,13 +3958,13 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 * Adapater :- Bcm Driver Private Data Structure * * Return value:- - * return TRUE if flah2.x of hgher version else return false. + * return true if flah2.x of hgher version else return false. */ int IsFlash2x(struct bcm_mini_adapter *Adapter) { if (Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER) - return TRUE; + return true; else return false; } @@ -4086,7 +4086,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, if (BytesToBeCopied > numOfBytes) BytesToBeCopied = numOfBytes; - Adapter->bHeaderChangeAllowed = TRUE; + Adapter->bHeaderChangeAllowed = true; do { Status = BcmFlash2xBulkRead(Adapter, (PUINT)pBuff, SrcSection , offset, BytesToBeCopied); @@ -4143,14 +4143,14 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned /* offset from the sector boundary having the header map */ offsetToProtect = Adapter->psFlash2xCSInfo->OffsetFromDSDStartForDSDHeader % Adapter->uiSectorSize; HeaderSizeToProtect = sizeof(struct bcm_dsd_header); - bHasHeader = TRUE; + bHasHeader = true; } if (uiSectAlignAddr == BcmGetSectionValStartOffset(Adapter, ISO_IMAGE1) || uiSectAlignAddr == BcmGetSectionValStartOffset(Adapter, ISO_IMAGE2)) { offsetToProtect = 0; HeaderSizeToProtect = sizeof(struct bcm_iso_header); - bHasHeader = TRUE; + bHasHeader = true; } /* If Header is present overwrite passed buffer with this */ if (bHasHeader && (Adapter->bHeaderChangeAllowed == false)) { @@ -4477,44 +4477,44 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se case ISO_IMAGE1: if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) && (IsNonCDLessDevice(Adapter) == false)) - SectionPresent = TRUE; + SectionPresent = true; break; case ISO_IMAGE2: if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) && (IsNonCDLessDevice(Adapter) == false)) - SectionPresent = TRUE; + SectionPresent = true; break; case DSD0: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForDSDStart != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case DSD1: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForDSD1Start != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case DSD2: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForDSD2Start != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case VSA0: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForVSAStart != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case VSA1: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForVSA1Start != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case VSA2: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForVSA2Start != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case SCSI: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForScsiFirmware != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; case CONTROL_SECTION: if (Adapter->psFlash2xCSInfo->OffsetFromZeroForControlSectionStart != UNINIT_PTR_IN_CS) - SectionPresent = TRUE; + SectionPresent = true; break; default: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section Does not exist in Flash 2.x"); @@ -4557,7 +4557,7 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect Adapter->bSigCorrupted = false; if (Adapter->bAllDSDWriteAllow == false) { - if (IsSectionWritable(Adapter, eFlash2xSectionVal) != TRUE) { + if (IsSectionWritable(Adapter, eFlash2xSectionVal) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Corrupt signature"); return SECTOR_IS_NOT_WRITABLE; } @@ -4581,7 +4581,7 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect *(pBuff + 12) = 0; if (sig == DSD_IMAGE_MAGIC_NUMBER) { - Adapter->bSigCorrupted = TRUE; + Adapter->bSigCorrupted = true; if (Adapter->ulFlashWriteSize == BYTE_WRITE_SUPPORT) { uiSectAlignAddr = uiOffset & ~(Adapter->uiSectorSize - 1); BlockStatus = BcmFlashUnProtectBlock(Adapter, uiSectAlignAddr, Adapter->uiSectorSize); @@ -4617,7 +4617,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect Adapter->bSigCorrupted = false; - if (IsSectionWritable(Adapter, eFlash2xSectionVal) != TRUE) { + if (IsSectionWritable(Adapter, eFlash2xSectionVal) != true) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Corrupt signature"); return SECTOR_IS_NOT_WRITABLE; } @@ -4639,7 +4639,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect *pBuff = 0; if (sig == ISO_IMAGE_MAGIC_NUMBER) { - Adapter->bSigCorrupted = TRUE; + Adapter->bSigCorrupted = true; WriteToFlashWithoutSectorErase(Adapter, (PUINT)pBuff, eFlash2xSectionVal, uiOffset, Adapter->ulFlashWriteSize); } else { @@ -4659,7 +4659,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect bool IsNonCDLessDevice(struct bcm_mini_adapter *Adapter) { if (Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG) - return TRUE; + return true; else return false; } -- 1.8.1.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel