Commit f70c8a91 authored by Lisa Nguyen's avatar Lisa Nguyen Committed by Greg Kroah-Hartman

staging: bcm: Replace FALSE with false

Replace user-defined type FALSE with C defined false keyword.
Signed-off-by: default avatarLisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3abd6f11
...@@ -119,7 +119,7 @@ static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size, ...@@ -119,7 +119,7 @@ static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size,
return -ENODEV; return -ENODEV;
} }
if (FALSE == Adapter->fw_download_done) if (false == Adapter->fw_download_done)
return -EACCES; return -EACCES;
down(&Adapter->RxAppControlQueuelock); down(&Adapter->RxAppControlQueuelock);
...@@ -180,7 +180,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -180,7 +180,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (Adapter->device_removed) if (Adapter->device_removed)
return -EFAULT; return -EFAULT;
if (FALSE == Adapter->fw_download_done) { if (false == Adapter->fw_download_done) {
switch (cmd) { switch (cmd) {
case IOCTL_MAC_ADDR_REQ: case IOCTL_MAC_ADDR_REQ:
case IOCTL_LINK_REQ: case IOCTL_LINK_REQ:
...@@ -425,7 +425,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -425,7 +425,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
uiOperation = gpio_info.uiGpioValue; uiOperation = gpio_info.uiGpioValue;
value = (1<<uiBit); value = (1<<uiBit);
if (IsReqGpioIsLedInNVM(Adapter, value) == FALSE) { if (IsReqGpioIsLedInNVM(Adapter, value) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to LED !!!", value); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to LED !!!", value);
Status = -EINVAL; Status = -EINVAL;
break; break;
...@@ -572,7 +572,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -572,7 +572,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (copy_from_user(&gpio_multi_info, IoBuffer.InputBuffer, IoBuffer.InputLength)) if (copy_from_user(&gpio_multi_info, IoBuffer.InputBuffer, IoBuffer.InputLength))
return -EFAULT; return -EFAULT;
if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_info[WIMAX_IDX].uiGPIOMask) == FALSE) { if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_info[WIMAX_IDX].uiGPIOMask) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!", "Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!",
pgpio_multi_info[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap); pgpio_multi_info[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap);
...@@ -665,7 +665,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -665,7 +665,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
} }
/* Validating the request */ /* Validating the request */
if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_mode[WIMAX_IDX].uiGPIOMask) == FALSE) { if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_mode[WIMAX_IDX].uiGPIOMask) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!", "Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!",
pgpio_multi_mode[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap); pgpio_multi_mode[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap);
...@@ -768,10 +768,10 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -768,10 +768,10 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (down_trylock(&Adapter->fw_download_sema)) if (down_trylock(&Adapter->fw_download_sema))
return -EBUSY; return -EBUSY;
Adapter->bBinDownloaded = FALSE; Adapter->bBinDownloaded = false;
Adapter->fw_download_process_pid = current->pid; Adapter->fw_download_process_pid = current->pid;
Adapter->bCfgDownloaded = FALSE; Adapter->bCfgDownloaded = false;
Adapter->fw_download_done = FALSE; Adapter->fw_download_done = false;
netif_carrier_off(Adapter->dev); netif_carrier_off(Adapter->dev);
netif_stop_queue(Adapter->dev); netif_stop_queue(Adapter->dev);
Status = reset_card_proc(Adapter); Status = reset_card_proc(Adapter);
...@@ -848,7 +848,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -848,7 +848,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) {
Adapter->DriverState = DRIVER_INIT; Adapter->DriverState = DRIVER_INIT;
Adapter->LEDInfo.bLedInitDone = FALSE; Adapter->LEDInfo.bLedInitDone = false;
wake_up(&Adapter->LEDInfo.notify_led_event); wake_up(&Adapter->LEDInfo.notify_led_event);
} }
} }
...@@ -900,7 +900,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -900,7 +900,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable to send interrupt...\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable to send interrupt...\n");
timeout = 5*HZ; timeout = 5*HZ;
Adapter->waiting_to_fw_download_done = FALSE; Adapter->waiting_to_fw_download_done = false;
wait_event_timeout(Adapter->ioctl_fw_dnld_wait_queue, wait_event_timeout(Adapter->ioctl_fw_dnld_wait_queue,
Adapter->waiting_to_fw_download_done, timeout); Adapter->waiting_to_fw_download_done, timeout);
Adapter->fw_download_process_pid = INVALID_PID; Adapter->fw_download_process_pid = INVALID_PID;
...@@ -1052,7 +1052,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1052,7 +1052,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (tracing_flag) if (tracing_flag)
Adapter->pTarangs->MacTracingEnabled = TRUE; Adapter->pTarangs->MacTracingEnabled = TRUE;
else else
Adapter->pTarangs->MacTracingEnabled = FALSE; Adapter->pTarangs->MacTracingEnabled = false;
break; break;
} }
...@@ -1109,7 +1109,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1109,7 +1109,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
} }
case IOCTL_BCM_WAKE_UP_DEVICE_FROM_IDLE: 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->usIdleModePattern = ABORT_IDLE_MODE;
Adapter->bWakeUpDevice = TRUE; Adapter->bWakeUpDevice = TRUE;
wake_up(&Adapter->process_rx_cntrlpkt); wake_up(&Adapter->process_rx_cntrlpkt);
...@@ -1168,7 +1168,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1168,7 +1168,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
break; break;
} }
if (pBulkBuffer->SwapEndian == FALSE) if (pBulkBuffer->SwapEndian == false)
Status = wrmWithLock(Adapter, (UINT)pBulkBuffer->Register, (PCHAR)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG)); Status = wrmWithLock(Adapter, (UINT)pBulkBuffer->Register, (PCHAR)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG));
else else
Status = wrmaltWithLock(Adapter, (UINT)pBulkBuffer->Register, (PUINT)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG)); Status = wrmaltWithLock(Adapter, (UINT)pBulkBuffer->Register, (PUINT)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG));
...@@ -1387,7 +1387,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1387,7 +1387,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
if (IsFlash2x(Adapter)) if (IsFlash2x(Adapter))
BcmFlash2xWriteSig(Adapter, Adapter->eActiveDSD); BcmFlash2xWriteSig(Adapter, Adapter->eActiveDSD);
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
up(&Adapter->NVMRdmWrmLock); up(&Adapter->NVMRdmWrmLock);
...@@ -1432,7 +1432,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1432,7 +1432,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "\nsFlash2xRead.bVerify :%x\n", sFlash2xRead.bVerify); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "\nsFlash2xRead.bVerify :%x\n", sFlash2xRead.bVerify);
/* This was internal to driver for raw read. now it has ben exposed to user space app. */ /* This was internal to driver for raw read. now it has ben exposed to user space app. */
if (validateFlash2xReadWrite(Adapter, &sFlash2xRead) == FALSE) if (validateFlash2xReadWrite(Adapter, &sFlash2xRead) == false)
return STATUS_FAILURE; return STATUS_FAILURE;
NOB = sFlash2xRead.numOfBytes; NOB = sFlash2xRead.numOfBytes;
...@@ -1510,7 +1510,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1510,7 +1510,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
} }
/* First make this False so that we can enable the Sector Permission Check in BeceemFlashBulkWrite */ /* First make this False so that we can enable the Sector Permission Check in BeceemFlashBulkWrite */
Adapter->bAllDSDWriteAllow = FALSE; Adapter->bAllDSDWriteAllow = false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_FLASH2X_SECTION_WRITE Called"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_FLASH2X_SECTION_WRITE Called");
...@@ -1531,7 +1531,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1531,7 +1531,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
return -EINVAL; return -EINVAL;
} }
if (validateFlash2xReadWrite(Adapter, &sFlash2xWrite) == FALSE) if (validateFlash2xReadWrite(Adapter, &sFlash2xWrite) == false)
return STATUS_FAILURE; return STATUS_FAILURE;
InputAddr = sFlash2xWrite.pDataBuff; InputAddr = sFlash2xWrite.pDataBuff;
...@@ -1686,7 +1686,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1686,7 +1686,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
case IOCTL_BCM_IDENTIFY_ACTIVE_SECTION: { case IOCTL_BCM_IDENTIFY_ACTIVE_SECTION: {
/* Right Now we are taking care of only DSD */ /* Right Now we are taking care of only DSD */
Adapter->bAllDSDWriteAllow = FALSE; Adapter->bAllDSDWriteAllow = false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_IDENTIFY_ACTIVE_SECTION called"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_IDENTIFY_ACTIVE_SECTION called");
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
} }
...@@ -1697,7 +1697,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1697,7 +1697,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_COPY_SECTION Called"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_COPY_SECTION Called");
Adapter->bAllDSDWriteAllow = FALSE; 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"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map");
return -EINVAL; return -EINVAL;
...@@ -1720,12 +1720,12 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1720,12 +1720,12 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "offset :%x", sCopySectStrut.offset); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "offset :%x", sCopySectStrut.offset);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "NOB :%x", sCopySectStrut.numOfBytes); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "NOB :%x", sCopySectStrut.numOfBytes);
if (IsSectionExistInFlash(Adapter, sCopySectStrut.SrcSection) == FALSE) { if (IsSectionExistInFlash(Adapter, sCopySectStrut.SrcSection) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Source Section<%x> does not exixt in Flash ", sCopySectStrut.SrcSection); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Source Section<%x> does not exixt in Flash ", sCopySectStrut.SrcSection);
return -EINVAL; return -EINVAL;
} }
if (IsSectionExistInFlash(Adapter, sCopySectStrut.DstSection) == FALSE) { if (IsSectionExistInFlash(Adapter, sCopySectStrut.DstSection) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Destinatio Section<%x> does not exixt in Flash ", sCopySectStrut.DstSection); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Destinatio Section<%x> does not exixt in Flash ", sCopySectStrut.DstSection);
return -EINVAL; return -EINVAL;
} }
...@@ -1924,7 +1924,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1924,7 +1924,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
OutPutBuff = OutPutBuff + ReadBytes; OutPutBuff = OutPutBuff + ReadBytes;
} }
} }
Adapter->bFlashRawRead = FALSE; Adapter->bFlashRawRead = false;
up(&Adapter->NVMRdmWrmLock); up(&Adapter->NVMRdmWrmLock);
kfree(pReadBuff); kfree(pReadBuff);
break; break;
......
...@@ -6,7 +6,7 @@ static INT bcm_open(struct net_device *dev) ...@@ -6,7 +6,7 @@ static INT bcm_open(struct net_device *dev)
{ {
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(dev);
if (Adapter->fw_download_done == FALSE) { if (Adapter->fw_download_done == false) {
pr_notice(PFX "%s: link up failed (download in progress)\n", pr_notice(PFX "%s: link up failed (download in progress)\n",
dev->name); dev->name);
return -EBUSY; return -EBUSY;
......
...@@ -256,7 +256,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru ...@@ -256,7 +256,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru
pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex]; pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
if (pstClassifierEntry) { if (pstClassifierEntry) {
/* Store if Ipv6 */ /* Store if Ipv6 */
pstClassifierEntry->bIpv6Protocol = (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : FALSE; pstClassifierEntry->bIpv6Protocol = (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false;
/* Destinaiton Port */ /* Destinaiton Port */
pstClassifierEntry->ucDestPortRangeLength = psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength / 4; pstClassifierEntry->ucDestPortRangeLength = psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength / 4;
...@@ -301,7 +301,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru ...@@ -301,7 +301,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru
psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength, psfCSType->cCPacketClassificationRule.u8IPDestinationAddressLength,
psfCSType->cCPacketClassificationRule.u8IPDestinationAddress, psfCSType->cCPacketClassificationRule.u8IPDestinationAddress,
(Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ?
TRUE : FALSE, eDestIpAddress); TRUE : false, eDestIpAddress);
/* Source Ip Address and Mask */ /* Source Ip Address and Mask */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Ip Source Parameters : "); 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 ...@@ -309,7 +309,7 @@ static inline VOID CopyClassifierRuleToSF(struct bcm_mini_adapter *Adapter, stru
CopyIpAddrToClassifier(pstClassifierEntry, CopyIpAddrToClassifier(pstClassifierEntry,
psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength, psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddressLength,
psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress, psfCSType->cCPacketClassificationRule.u8IPMaskedSourceAddress,
(Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : FALSE, (Adapter->PackInfo[uiSearchRuleIndex].ucIpVersion == IPV6) ? TRUE : false,
eSrcIpAddress); eSrcIpAddress);
/* TOS */ /* TOS */
...@@ -383,7 +383,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *Adapter, ...@@ -383,7 +383,7 @@ static inline VOID DeleteClassifierRuleFromSF(struct bcm_mini_adapter *Adapter,
u16PacketClassificationRuleIndex = Adapter->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex; u16PacketClassificationRuleIndex = Adapter->astClassifierTable[nClassifierIndex].uiClassifierRuleIndex;
pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex]; pstClassifierEntry = &Adapter->astClassifierTable[nClassifierIndex];
if (pstClassifierEntry) { if (pstClassifierEntry) {
pstClassifierEntry->bUsed = FALSE; pstClassifierEntry->bUsed = false;
pstClassifierEntry->uiClassifierRuleIndex = 0; pstClassifierEntry->uiClassifierRuleIndex = 0;
memset(pstClassifierEntry, 0, sizeof(struct bcm_classifier_rule)); memset(pstClassifierEntry, 0, sizeof(struct bcm_classifier_rule));
...@@ -685,7 +685,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer ...@@ -685,7 +685,7 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter *Adapter, /* <Pointer
memcpy(sPhsRule.u8PHSF, psfCSType->cPhsRule.u8PHSF, MAX_PHS_LENGTHS); memcpy(sPhsRule.u8PHSF, psfCSType->cPhsRule.u8PHSF, MAX_PHS_LENGTHS);
memcpy(sPhsRule.u8PHSM, psfCSType->cPhsRule.u8PHSM, MAX_PHS_LENGTHS); memcpy(sPhsRule.u8PHSM, psfCSType->cPhsRule.u8PHSM, MAX_PHS_LENGTHS);
sPhsRule.u8RefCnt = 0; sPhsRule.u8RefCnt = 0;
sPhsRule.bUnclassifiedPHSRule = FALSE; sPhsRule.bUnclassifiedPHSRule = false;
sPhsRule.PHSModifiedBytes = 0; sPhsRule.PHSModifiedBytes = 0;
sPhsRule.PHSModifiedNumPackets = 0; sPhsRule.PHSModifiedNumPackets = 0;
sPhsRule.PHSErrorNumPackets = 0; sPhsRule.PHSErrorNumPackets = 0;
...@@ -1577,7 +1577,7 @@ static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UIN ...@@ -1577,7 +1577,7 @@ static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UIN
ULONG idx, max_try; ULONG idx, max_try;
if ((Adapter->ulTotalTargetBuffersAvailable == 0) || (Adapter->ulFreeTargetBufferCnt == 0)) { if ((Adapter->ulTotalTargetBuffersAvailable == 0) || (Adapter->ulFreeTargetBufferCnt == 0)) {
ClearTargetDSXBuffer(Adapter, tid, FALSE); ClearTargetDSXBuffer(Adapter, tid, false);
return 0; return 0;
} }
...@@ -1590,7 +1590,7 @@ static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UIN ...@@ -1590,7 +1590,7 @@ static ULONG GetNextTargetBufferLocation(struct bcm_mini_adapter *Adapter, B_UIN
if (max_try == 0) { if (max_try == 0) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "\n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx ", Adapter->ulFreeTargetBufferCnt); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "\n GetNextTargetBufferLocation : Error No Free Target DSX Buffers FreeCnt : %lx ", Adapter->ulFreeTargetBufferCnt);
ClearTargetDSXBuffer(Adapter, tid, FALSE); ClearTargetDSXBuffer(Adapter, tid, false);
return 0; return 0;
} }
...@@ -1644,9 +1644,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1644,9 +1644,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
*/ */
pstAddIndication = RestoreCmControlResponseMessage(Adapter, pvBuffer); pstAddIndication = RestoreCmControlResponseMessage(Adapter, pvBuffer);
if (pstAddIndication == NULL) { if (pstAddIndication == NULL) {
ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication *)pvBuffer)->u16TID, FALSE); ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication *)pvBuffer)->u16TID, false);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Error in restoring Service Flow param structure from DSx message");
return FALSE; return false;
} }
DumpCmControlPacket(pstAddIndication); DumpCmControlPacket(pstAddIndication);
...@@ -1656,7 +1656,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1656,7 +1656,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
pLeader->Status = CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ; pLeader->Status = CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ;
pLeader->Vcid = 0; pLeader->Vcid = 0;
ClearTargetDSXBuffer(Adapter, pstAddIndication->u16TID, FALSE); ClearTargetDSXBuffer(Adapter, pstAddIndication->u16TID, false);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n", pstAddIndication->u16TID); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "### TID RECEIVED %d\n", pstAddIndication->u16TID);
switch (pstAddIndication->u8Type) { switch (pstAddIndication->u8Type) {
case DSA_REQ: case DSA_REQ:
...@@ -1708,9 +1708,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1708,9 +1708,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
if (pstAddIndication->sfAdmittedSet.bValid == TRUE) if (pstAddIndication->sfAdmittedSet.bValid == TRUE)
Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE; Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE;
if (pstAddIndication->sfActiveSet.bValid == FALSE) { if (pstAddIndication->sfActiveSet.bValid == false) {
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = false;
if (pstAddIndication->sfAdmittedSet.bValid) if (pstAddIndication->sfAdmittedSet.bValid)
psfLocalSet = &pstAddIndication->sfAdmittedSet; psfLocalSet = &pstAddIndication->sfAdmittedSet;
else if (pstAddIndication->sfAuthorizedSet.bValid) else if (pstAddIndication->sfAuthorizedSet.bValid)
...@@ -1722,8 +1722,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1722,8 +1722,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
if (!psfLocalSet) { if (!psfLocalSet) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "No set is valid\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "No set is valid\n");
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
Adapter->PackInfo[uiSearchRuleIndex].bValid = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bValid = false;
Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0; Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
kfree(pstAddIndication); kfree(pstAddIndication);
} else if (psfLocalSet->bValid && (pstAddIndication->u8CC == 0)) { } else if (psfLocalSet->bValid && (pstAddIndication->u8CC == 0)) {
...@@ -1759,15 +1759,15 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1759,15 +1759,15 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
} }
} }
} else { } else {
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
Adapter->PackInfo[uiSearchRuleIndex].bValid = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bValid = false;
Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0; Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
kfree(pstAddIndication); kfree(pstAddIndication);
} }
} else { } else {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "DSA ACK did not get valid SFID"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "DSA ACK did not get valid SFID");
kfree(pstAddIndication); kfree(pstAddIndication);
return FALSE; return false;
} }
} }
break; break;
...@@ -1812,9 +1812,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1812,9 +1812,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
if (pstChangeIndication->sfAdmittedSet.bValid == TRUE) if (pstChangeIndication->sfAdmittedSet.bValid == TRUE)
Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE; Adapter->PackInfo[uiSearchRuleIndex].bAdmittedSet = TRUE;
if (pstChangeIndication->sfActiveSet.bValid == FALSE) { if (pstChangeIndication->sfActiveSet.bValid == false) {
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActivateRequestSent = false;
if (pstChangeIndication->sfAdmittedSet.bValid) if (pstChangeIndication->sfAdmittedSet.bValid)
psfLocalSet = &pstChangeIndication->sfAdmittedSet; psfLocalSet = &pstChangeIndication->sfAdmittedSet;
...@@ -1827,8 +1827,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1827,8 +1827,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
if (!psfLocalSet) { if (!psfLocalSet) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "No set is valid\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "No set is valid\n");
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
Adapter->PackInfo[uiSearchRuleIndex].bValid = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bValid = false;
Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0; Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = 0;
kfree(pstAddIndication); kfree(pstAddIndication);
} else if (psfLocalSet->bValid && (pstChangeIndication->u8CC == 0)) { } else if (psfLocalSet->bValid && (pstChangeIndication->u8CC == 0)) {
...@@ -1847,7 +1847,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1847,7 +1847,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
} else { } else {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "DSC ACK did not get valid SFID"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "DSC ACK did not get valid SFID");
kfree(pstAddIndication); kfree(pstAddIndication);
return FALSE; return false;
} }
} }
break; break;
...@@ -1883,7 +1883,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to ...@@ -1883,7 +1883,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter *Adapter, /* <Pointer to
break; break;
default: default:
kfree(pstAddIndication); kfree(pstAddIndication);
return FALSE; return false;
} }
return TRUE; return TRUE;
} }
...@@ -1934,13 +1934,13 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer ...@@ -1934,13 +1934,13 @@ VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer
continue; continue;
} }
if (pHostInfo->RetainSF == FALSE) { if (pHostInfo->RetainSF == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Going to Delete SF"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "Going to Delete SF");
deleteSFBySfid(Adapter, uiSearchRuleIndex); deleteSFBySfid(Adapter, uiSearchRuleIndex);
} else { } else {
Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = ntohs(pHostInfo->VCID); Adapter->PackInfo[uiSearchRuleIndex].usVCID_Value = ntohs(pHostInfo->VCID);
Adapter->PackInfo[uiSearchRuleIndex].usCID = ntohs(pHostInfo->newCID); Adapter->PackInfo[uiSearchRuleIndex].usCID = ntohs(pHostInfo->newCID);
Adapter->PackInfo[uiSearchRuleIndex].bActive = FALSE; Adapter->PackInfo[uiSearchRuleIndex].bActive = false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "pHostInfo->QoSParamSet: 0x%x\n", pHostInfo->QoSParamSet); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, "pHostInfo->QoSParamSet: 0x%x\n", pHostInfo->QoSParamSet);
......
...@@ -1106,7 +1106,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter) ...@@ -1106,7 +1106,7 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter)
unsigned long ul_ddr_setting_load_addr = DDR_DUMP_INTERNAL_DEVICE_MEMORY; unsigned long ul_ddr_setting_load_addr = DDR_DUMP_INTERNAL_DEVICE_MEMORY;
UINT value = 0; UINT value = 0;
int retval = STATUS_SUCCESS; int retval = STATUS_SUCCESS;
bool bOverrideSelfRefresh = FALSE; bool bOverrideSelfRefresh = false;
switch (Adapter->chip_id) switch (Adapter->chip_id)
{ {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk_buff *skb) static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
{ {
struct bcm_tarang_data *pTarang = NULL; struct bcm_tarang_data *pTarang = NULL;
bool HighPriorityMessage = FALSE; bool HighPriorityMessage = false;
struct sk_buff *newPacket = NULL; struct sk_buff *newPacket = NULL;
CHAR cntrl_msg_mask_bit = 0; CHAR cntrl_msg_mask_bit = 0;
bool drop_pkt_flag = TRUE; bool drop_pkt_flag = TRUE;
...@@ -91,13 +91,13 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk ...@@ -91,13 +91,13 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk
* cntrl_msg_mask_bit); * cntrl_msg_mask_bit);
*/ */
if (pTarang->RxCntrlMsgBitMask & (1 << cntrl_msg_mask_bit)) if (pTarang->RxCntrlMsgBitMask & (1 << cntrl_msg_mask_bit))
drop_pkt_flag = FALSE; 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)
|| ((pTarang->AppCtrlQueueLen > || ((pTarang->AppCtrlQueueLen >
MAX_APP_QUEUE_LEN / 2) && MAX_APP_QUEUE_LEN / 2) &&
(HighPriorityMessage == FALSE))) { (HighPriorityMessage == false))) {
/* /*
* Assumption:- * Assumption:-
* 1. every tarang manages it own dropped pkt * 1. every tarang manages it own dropped pkt
...@@ -175,8 +175,8 @@ int control_packet_handler(struct bcm_mini_adapter *Adapter /* pointer to adapte ...@@ -175,8 +175,8 @@ int control_packet_handler(struct bcm_mini_adapter *Adapter /* pointer to adapte
return 0; return 0;
} }
if (TRUE == Adapter->bWakeUpDevice) { if (TRUE == Adapter->bWakeUpDevice) {
Adapter->bWakeUpDevice = FALSE; Adapter->bWakeUpDevice = false;
if ((FALSE == Adapter->bTriedToWakeUpFromlowPowerMode) if ((false == Adapter->bTriedToWakeUpFromlowPowerMode)
&& ((TRUE == Adapter->IdleMode) || && ((TRUE == Adapter->IdleMode) ||
(TRUE == Adapter->bShutStatus))) { (TRUE == Adapter->bShutStatus))) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
......
...@@ -29,7 +29,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, ...@@ -29,7 +29,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
} }
/* Get the Nextt Header Type */ /* Get the Nextt Header Type */
*bParseDone = FALSE; *bParseDone = false;
switch (*pucNextHeader) { switch (*pucNextHeader) {
...@@ -124,7 +124,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload, ...@@ -124,7 +124,7 @@ static UCHAR *GetNextIPV6ChainedHeader(UCHAR **ppucPayload,
} }
if (*bParseDone == FALSE) { if (*bParseDone == false) {
if (*pusPayloadLength <= usNextHeaderOffset) { if (*pusPayloadLength <= usNextHeaderOffset) {
*bParseDone = TRUE; *bParseDone = TRUE;
} else { } else {
...@@ -144,7 +144,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort, ...@@ -144,7 +144,7 @@ static UCHAR GetIpv6ProtocolPorts(UCHAR *pucPayload, USHORT *pusSrcPort,
USHORT *pusDestPort, USHORT usPayloadLength, UCHAR ucNextHeader) USHORT *pusDestPort, USHORT usPayloadLength, UCHAR ucNextHeader)
{ {
UCHAR *pIpv6HdrScanContext = pucPayload; UCHAR *pIpv6HdrScanContext = pucPayload;
bool bDone = FALSE; bool bDone = false;
UCHAR ucHeaderType = 0; UCHAR ucHeaderType = 0;
UCHAR *pucNextHeader = NULL; UCHAR *pucNextHeader = NULL;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -187,7 +187,7 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader, ...@@ -187,7 +187,7 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
USHORT ushSrcPort = 0; USHORT ushSrcPort = 0;
UCHAR ucNextProtocolAboveIP = 0; UCHAR ucNextProtocolAboveIP = 0;
struct bcm_ipv6_hdr *pstIpv6Header = NULL; struct bcm_ipv6_hdr *pstIpv6Header = NULL;
bool bClassificationSucceed = FALSE; bool bClassificationSucceed = false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
DBG_LVL_ALL, "IpVersion6 ==========>\n"); DBG_LVL_ALL, "IpVersion6 ==========>\n");
...@@ -277,10 +277,10 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader, ...@@ -277,10 +277,10 @@ USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
INT iMatchedSFQueueIndex = 0; INT iMatchedSFQueueIndex = 0;
iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
if (iMatchedSFQueueIndex >= NO_OF_QUEUES) { if (iMatchedSFQueueIndex >= NO_OF_QUEUES) {
bClassificationSucceed = FALSE; bClassificationSucceed = false;
} else { } else {
if (Adapter->PackInfo[iMatchedSFQueueIndex].bActive == FALSE) if (Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false)
bClassificationSucceed = FALSE; bClassificationSucceed = false;
} }
} }
...@@ -341,7 +341,7 @@ static bool MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule, ...@@ -341,7 +341,7 @@ static bool MatchSrcIpv6Address(struct bcm_classifier_rule *pstClassifierRule,
} }
} }
} }
return FALSE; return false;
} }
static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule,
...@@ -398,7 +398,7 @@ static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule, ...@@ -398,7 +398,7 @@ static bool MatchDestIpv6Address(struct bcm_classifier_rule *pstClassifierRule,
} }
} }
} }
return FALSE; return false;
} }
......
...@@ -166,7 +166,7 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm ...@@ -166,7 +166,7 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
} }
if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) {
Adapter->LEDInfo.bLedInitDone = FALSE; Adapter->LEDInfo.bLedInitDone = false;
Adapter->DriverState = DRIVER_INIT; Adapter->DriverState = DRIVER_INIT;
wake_up(&Adapter->LEDInfo.notify_led_event); wake_up(&Adapter->LEDInfo.notify_led_event);
} }
...@@ -214,7 +214,7 @@ int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_ ...@@ -214,7 +214,7 @@ int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_
* Firmware. Check for the Config file to be first to be sent from the * Firmware. Check for the Config file to be first to be sent from the
* Application * Application
*/ */
atomic_set(&Adapter->uiMBupdate, FALSE); atomic_set(&Adapter->uiMBupdate, false);
if (!Adapter->bCfgDownloaded && psFwInfo->u32StartingAddress != CONFIG_BEGIN_ADDR) { if (!Adapter->bCfgDownloaded && psFwInfo->u32StartingAddress != CONFIG_BEGIN_ADDR) {
/* Can't Download Firmware. */ /* Can't Download Firmware. */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Download the config File first\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Download the config File first\n");
......
...@@ -89,8 +89,8 @@ int InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int *pui ...@@ -89,8 +89,8 @@ int InterfaceIdleModeRespond(struct bcm_mini_adapter *Adapter, unsigned int *pui
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Device Up from Idle Mode"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, IDLE_MODE, DBG_LVL_ALL, "Device Up from Idle Mode");
/* Set Idle Mode Flag to False and Clear IdleMode reg. */ /* Set Idle Mode Flag to False and Clear IdleMode reg. */
Adapter->IdleMode = FALSE; Adapter->IdleMode = false;
Adapter->bTriedToWakeUpFromlowPowerMode = FALSE; Adapter->bTriedToWakeUpFromlowPowerMode = false;
wake_up(&Adapter->lowpower_mode_wait_queue); wake_up(&Adapter->lowpower_mode_wait_queue);
......
...@@ -332,7 +332,7 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter) ...@@ -332,7 +332,7 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
* now register the cntrl interface. * now register the cntrl interface.
* after downloading the f/w waiting for 5 sec to get the mailbox interrupt. * after downloading the f/w waiting for 5 sec to get the mailbox interrupt.
*/ */
psIntfAdapter->psAdapter->waiting_to_fw_download_done = FALSE; psIntfAdapter->psAdapter->waiting_to_fw_download_done = false;
value = wait_event_timeout(psIntfAdapter->psAdapter->ioctl_fw_dnld_wait_queue, value = wait_event_timeout(psIntfAdapter->psAdapter->ioctl_fw_dnld_wait_queue,
psIntfAdapter->psAdapter->waiting_to_fw_download_done, 5*HZ); psIntfAdapter->psAdapter->waiting_to_fw_download_done, 5*HZ);
...@@ -430,7 +430,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -430,7 +430,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
unsigned long value; unsigned long value;
int retval = 0; int retval = 0;
int usedIntOutForBulkTransfer = 0 ; int usedIntOutForBulkTransfer = 0 ;
bool bBcm16 = FALSE; bool bBcm16 = false;
UINT uiData = 0; UINT uiData = 0;
int bytes; int bytes;
...@@ -472,7 +472,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -472,7 +472,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
retval = usb_set_interface(psIntfAdapter->udev, DEFAULT_SETTING_0, ALTERNATE_SETTING_1); retval = usb_set_interface(psIntfAdapter->udev, DEFAULT_SETTING_0, ALTERNATE_SETTING_1);
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
"BCM16 is applicable on this dongle\n"); "BCM16 is applicable on this dongle\n");
if (retval || (psIntfAdapter->bHighSpeedDevice == FALSE)) { if (retval || (psIntfAdapter->bHighSpeedDevice == false)) {
usedIntOutForBulkTransfer = EP2 ; usedIntOutForBulkTransfer = EP2 ;
endpoint = &iface_desc->endpoint[EP2].desc; endpoint = &iface_desc->endpoint[EP2].desc;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
...@@ -481,8 +481,8 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -481,8 +481,8 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
* If Modem is high speed device EP2 should be INT OUT End point * 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 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))) { || ((psIntfAdapter->bHighSpeedDevice == false) && (bcm_usb_endpoint_is_bulk_out(endpoint) == false))) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
"Configuring the EEPROM\n"); "Configuring the EEPROM\n");
/* change the EP2, EP4 to INT OUT end point */ /* change the EP2, EP4 to INT OUT end point */
...@@ -501,7 +501,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -501,7 +501,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
} }
} }
if ((psIntfAdapter->bHighSpeedDevice == FALSE) && bcm_usb_endpoint_is_bulk_out(endpoint)) { if ((psIntfAdapter->bHighSpeedDevice == false) && bcm_usb_endpoint_is_bulk_out(endpoint)) {
/* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */ /* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */
UINT _uiData = ntohl(EP2_CFG_INT); UINT _uiData = ntohl(EP2_CFG_INT);
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
...@@ -513,7 +513,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter) ...@@ -513,7 +513,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
endpoint = &iface_desc->endpoint[EP4].desc; endpoint = &iface_desc->endpoint[EP4].desc;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
"Choosing AltSetting as a default setting.\n"); "Choosing AltSetting as a default setting.\n");
if (bcm_usb_endpoint_is_int_out(endpoint) == FALSE) { if (bcm_usb_endpoint_is_int_out(endpoint) == false) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
"Dongle does not have BCM16 Fix.\n"); "Dongle does not have BCM16 Fix.\n");
/* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */ /* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */
...@@ -619,7 +619,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message) ...@@ -619,7 +619,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
psIntfAdapter->bSuspended = TRUE; psIntfAdapter->bSuspended = TRUE;
if (TRUE == psIntfAdapter->bPreparingForBusSuspend) { if (TRUE == psIntfAdapter->bPreparingForBusSuspend) {
psIntfAdapter->bPreparingForBusSuspend = FALSE; psIntfAdapter->bPreparingForBusSuspend = false;
if (psIntfAdapter->psAdapter->LinkStatus == LINKUP_DONE) { if (psIntfAdapter->psAdapter->LinkStatus == LINKUP_DONE) {
psIntfAdapter->psAdapter->IdleMode = TRUE ; psIntfAdapter->psAdapter->IdleMode = TRUE ;
...@@ -631,7 +631,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message) ...@@ -631,7 +631,7 @@ static int InterfaceSuspend(struct usb_interface *intf, pm_message_t message)
"Host Entered in PMU Shutdown Mode.\n"); "Host Entered in PMU Shutdown Mode.\n");
} }
} }
psIntfAdapter->psAdapter->bPreparingForLowPowerMode = FALSE; psIntfAdapter->psAdapter->bPreparingForLowPowerMode = false;
/* Signaling the control pkt path */ /* Signaling the control pkt path */
wake_up(&psIntfAdapter->psAdapter->lowpower_mode_wait_queue); wake_up(&psIntfAdapter->psAdapter->lowpower_mode_wait_queue);
...@@ -644,7 +644,7 @@ static int InterfaceResume(struct usb_interface *intf) ...@@ -644,7 +644,7 @@ static int InterfaceResume(struct usb_interface *intf)
struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf); struct bcm_interface_adapter *psIntfAdapter = usb_get_intfdata(intf);
mdelay(100); mdelay(100);
psIntfAdapter->bSuspended = FALSE; psIntfAdapter->bSuspended = false;
StartInterruptUrb(psIntfAdapter); StartInterruptUrb(psIntfAdapter);
InterfaceRx(psIntfAdapter); InterfaceRx(psIntfAdapter);
......
...@@ -60,7 +60,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -60,7 +60,7 @@ static void read_int_callback(struct urb *urb/*, struct pt_regs *regs*/)
psIntfAdapter->psAdapter->downloadDDR +=1; psIntfAdapter->psAdapter->downloadDDR +=1;
wake_up(&Adapter->tx_packet_wait_queue); wake_up(&Adapter->tx_packet_wait_queue);
} }
if(FALSE == Adapter->waiting_to_fw_download_done) 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); wake_up(&Adapter->ioctl_fw_dnld_wait_queue);
...@@ -147,11 +147,11 @@ INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter) ...@@ -147,11 +147,11 @@ INT StartInterruptUrb(struct bcm_interface_adapter *psIntfAdapter)
{ {
INT status = 0; INT status = 0;
if( FALSE == psIntfAdapter->psAdapter->device_removed && if( false == psIntfAdapter->psAdapter->device_removed &&
FALSE == psIntfAdapter->psAdapter->bEndPointHalted && false == psIntfAdapter->psAdapter->bEndPointHalted &&
FALSE == psIntfAdapter->bSuspended && false == psIntfAdapter->bSuspended &&
FALSE == psIntfAdapter->bPreparingForBusSuspend && false == psIntfAdapter->bPreparingForBusSuspend &&
FALSE == psIntfAdapter->psAdapter->StopAllXaction) false == psIntfAdapter->psAdapter->StopAllXaction)
{ {
status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC); status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
if (status) if (status)
......
...@@ -44,7 +44,7 @@ int InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter, ...@@ -44,7 +44,7 @@ int InterfaceRDM(struct bcm_interface_adapter *psIntfAdapter,
else else
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, RDM, DBG_LVL_ALL, "RDM sent %d", bytes); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, RDM, DBG_LVL_ALL, "RDM sent %d", bytes);
psIntfAdapter->psAdapter->DeviceAccess = FALSE; psIntfAdapter->psAdapter->DeviceAccess = false;
return bytes; return bytes;
} }
...@@ -90,10 +90,10 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter, ...@@ -90,10 +90,10 @@ int InterfaceWRM(struct bcm_interface_adapter *psIntfAdapter,
if (retval < 0) { if (retval < 0) {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "WRM failed status :%d", retval); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "WRM failed status :%d", retval);
psIntfAdapter->psAdapter->DeviceAccess = FALSE; psIntfAdapter->psAdapter->DeviceAccess = false;
return retval; return retval;
} else { } else {
psIntfAdapter->psAdapter->DeviceAccess = FALSE; psIntfAdapter->psAdapter->DeviceAccess = false;
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "WRM sent %d", retval); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_OTHERS, WRM, DBG_LVL_ALL, "WRM sent %d", retval);
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -211,7 +211,7 @@ void putUsbSuspend(struct work_struct *work) ...@@ -211,7 +211,7 @@ void putUsbSuspend(struct work_struct *work)
psIntfAdapter = container_of(work, struct bcm_interface_adapter, usbSuspendWork); psIntfAdapter = container_of(work, struct bcm_interface_adapter, usbSuspendWork);
intf = psIntfAdapter->interface; intf = psIntfAdapter->interface;
if (psIntfAdapter->bSuspended == FALSE) if (psIntfAdapter->bSuspended == false)
usb_autopm_put_interface(intf); usb_autopm_put_interface(intf);
} }
...@@ -19,7 +19,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter) ...@@ -19,7 +19,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter)
UINT index = 0; UINT index = 0;
if((atomic_read(&psIntfAdapter->uNumRcbUsed) < MAXIMUM_USB_RCB) && if((atomic_read(&psIntfAdapter->uNumRcbUsed) < MAXIMUM_USB_RCB) &&
(psIntfAdapter->psAdapter->StopAllXaction == FALSE)) (psIntfAdapter->psAdapter->StopAllXaction == false))
{ {
index = atomic_read(&psIntfAdapter->uCurrRcb); index = atomic_read(&psIntfAdapter->uCurrRcb);
pRcb = &psIntfAdapter->asUsbRcb[index]; pRcb = &psIntfAdapter->asUsbRcb[index];
...@@ -38,7 +38,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter) ...@@ -38,7 +38,7 @@ GetBulkInRcb(struct bcm_interface_adapter *psIntfAdapter)
static void read_bulk_callback(struct urb *urb) static void read_bulk_callback(struct urb *urb)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
bool bHeaderSupressionEnabled = FALSE; bool bHeaderSupressionEnabled = false;
int QueueIndex = NO_OF_QUEUES + 1; int QueueIndex = NO_OF_QUEUES + 1;
UINT uiIndex=0; UINT uiIndex=0;
int process_done = 1; int process_done = 1;
...@@ -57,7 +57,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -57,7 +57,7 @@ static void read_bulk_callback(struct urb *urb)
(0 == urb->actual_length) (0 == urb->actual_length)
) )
{ {
pRcb->bUsed = FALSE; pRcb->bUsed = false;
atomic_dec(&psIntfAdapter->uNumRcbUsed); atomic_dec(&psIntfAdapter->uNumRcbUsed);
return; return;
} }
...@@ -73,7 +73,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -73,7 +73,7 @@ static void read_bulk_callback(struct urb *urb)
{ {
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL,"Rx URB has got cancelled. status :%d", urb->status); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL,"Rx URB has got cancelled. status :%d", urb->status);
} }
pRcb->bUsed = FALSE; pRcb->bUsed = false;
atomic_dec(&psIntfAdapter->uNumRcbUsed); atomic_dec(&psIntfAdapter->uNumRcbUsed);
urb->status = STATUS_SUCCESS ; urb->status = STATUS_SUCCESS ;
return ; return ;
...@@ -192,7 +192,7 @@ static void read_bulk_callback(struct urb *urb) ...@@ -192,7 +192,7 @@ static void read_bulk_callback(struct urb *urb)
} }
} }
Adapter->PrevNumRecvDescs++; Adapter->PrevNumRecvDescs++;
pRcb->bUsed = FALSE; pRcb->bUsed = false;
atomic_dec(&psIntfAdapter->uNumRcbUsed); atomic_dec(&psIntfAdapter->uNumRcbUsed);
} }
...@@ -205,10 +205,10 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us ...@@ -205,10 +205,10 @@ static int ReceiveRcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_us
psIntfAdapter->udev, psIntfAdapter->sBulkIn.bulk_in_endpointAddr), psIntfAdapter->udev, psIntfAdapter->sBulkIn.bulk_in_endpointAddr),
urb->transfer_buffer, BCM_USB_MAX_READ_LENGTH, read_bulk_callback, urb->transfer_buffer, BCM_USB_MAX_READ_LENGTH, read_bulk_callback,
pRcb); pRcb);
if(FALSE == psIntfAdapter->psAdapter->device_removed && if(false == psIntfAdapter->psAdapter->device_removed &&
FALSE == psIntfAdapter->psAdapter->bEndPointHalted && false == psIntfAdapter->psAdapter->bEndPointHalted &&
FALSE == psIntfAdapter->bSuspended && false == psIntfAdapter->bSuspended &&
FALSE == psIntfAdapter->bPreparingForBusSuspend) false == psIntfAdapter->bPreparingForBusSuspend)
{ {
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
...@@ -253,7 +253,7 @@ bool InterfaceRx (struct bcm_interface_adapter *psIntfAdapter) ...@@ -253,7 +253,7 @@ bool InterfaceRx (struct bcm_interface_adapter *psIntfAdapter)
if(pRcb == NULL) if(pRcb == NULL)
{ {
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_PRINTK, 0, 0, "Unable to get Rcb pointer"); BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_PRINTK, 0, 0, "Unable to get Rcb pointer");
return FALSE; return false;
} }
//atomic_inc(&psIntfAdapter->uNumRcbUsed); //atomic_inc(&psIntfAdapter->uNumRcbUsed);
ReceiveRcb(psIntfAdapter, pRcb); ReceiveRcb(psIntfAdapter, pRcb);
......
...@@ -7,7 +7,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -7,7 +7,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
struct bcm_interface_adapter *psIntfAdapter = pTcb->psIntfAdapter; struct bcm_interface_adapter *psIntfAdapter = pTcb->psIntfAdapter;
struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer; struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer;
struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ; struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ;
bool bpowerDownMsg = FALSE ; bool bpowerDownMsg = false ;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
if (unlikely(netif_msg_tx_done(Adapter))) if (unlikely(netif_msg_tx_done(Adapter)))
...@@ -26,7 +26,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -26,7 +26,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
} }
} }
pTcb->bUsed = FALSE; pTcb->bUsed = false;
atomic_dec(&psIntfAdapter->uNumTcbUsed); atomic_dec(&psIntfAdapter->uNumTcbUsed);
...@@ -42,7 +42,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -42,7 +42,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
//This covers the bus err while Idle Request msg sent down. //This covers the bus err while Idle Request msg sent down.
if(urb->status != STATUS_SUCCESS) if(urb->status != STATUS_SUCCESS)
{ {
psAdapter->bPreparingForLowPowerMode = FALSE ; psAdapter->bPreparingForLowPowerMode = false ;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Idle Mode Request msg failed to reach to Modem"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Idle Mode Request msg failed to reach to Modem");
//Signalling the cntrl pkt path in Ioctl //Signalling the cntrl pkt path in Ioctl
wake_up(&psAdapter->lowpower_mode_wait_queue); wake_up(&psAdapter->lowpower_mode_wait_queue);
...@@ -50,11 +50,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -50,11 +50,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
goto err_exit; goto err_exit;
} }
if(psAdapter->bDoSuspend == FALSE) if(psAdapter->bDoSuspend == false)
{ {
psAdapter->IdleMode = TRUE; psAdapter->IdleMode = TRUE;
//since going in Idle mode completed hence making this var false; //since going in Idle mode completed hence making this var false;
psAdapter->bPreparingForLowPowerMode = FALSE ; psAdapter->bPreparingForLowPowerMode = false ;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in Idle Mode State..."); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL, "Host Entered in Idle Mode State...");
//Signalling the cntrl pkt path in Ioctl //Signalling the cntrl pkt path in Ioctl
...@@ -70,7 +70,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -70,7 +70,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
//This covers the bus err while shutdown Request msg sent down. //This covers the bus err while shutdown Request msg sent down.
if(urb->status != STATUS_SUCCESS) if(urb->status != STATUS_SUCCESS)
{ {
psAdapter->bPreparingForLowPowerMode = FALSE ; psAdapter->bPreparingForLowPowerMode = false ;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Shutdown Request Msg failed to reach to Modem"); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Shutdown Request Msg failed to reach to Modem");
//Signalling the cntrl pkt path in Ioctl //Signalling the cntrl pkt path in Ioctl
wake_up(&psAdapter->lowpower_mode_wait_queue); wake_up(&psAdapter->lowpower_mode_wait_queue);
...@@ -79,11 +79,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) ...@@ -79,11 +79,11 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
} }
bpowerDownMsg = TRUE ; bpowerDownMsg = TRUE ;
if(psAdapter->bDoSuspend == FALSE) if(psAdapter->bDoSuspend == false)
{ {
psAdapter->bShutStatus = TRUE; psAdapter->bShutStatus = TRUE;
//since going in shutdown mode completed hence making this var false; //since going in shutdown mode completed hence making this var false;
psAdapter->bPreparingForLowPowerMode = FALSE ; psAdapter->bPreparingForLowPowerMode = false ;
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Host Entered in shutdown Mode State..."); BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"Host Entered in shutdown Mode State...");
//Signalling the cntrl pkt path in Ioctl //Signalling the cntrl pkt path in Ioctl
wake_up(&psAdapter->lowpower_mode_wait_queue); wake_up(&psAdapter->lowpower_mode_wait_queue);
...@@ -113,7 +113,7 @@ static struct bcm_usb_tcb *GetBulkOutTcb(struct bcm_interface_adapter *psIntfAda ...@@ -113,7 +113,7 @@ static struct bcm_usb_tcb *GetBulkOutTcb(struct bcm_interface_adapter *psIntfAda
UINT index = 0; UINT index = 0;
if((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) && if((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) &&
(psIntfAdapter->psAdapter->StopAllXaction ==FALSE)) (psIntfAdapter->psAdapter->StopAllXaction ==false))
{ {
index = atomic_read(&psIntfAdapter->uCurrTcb); index = atomic_read(&psIntfAdapter->uCurrTcb);
pTcb = &psIntfAdapter->asUsbTcb[index]; pTcb = &psIntfAdapter->asUsbTcb[index];
...@@ -161,10 +161,10 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_u ...@@ -161,10 +161,10 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_u
} }
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; /* For DMA transfer */ urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; /* For DMA transfer */
if(FALSE == psIntfAdapter->psAdapter->device_removed && if(false == psIntfAdapter->psAdapter->device_removed &&
FALSE == psIntfAdapter->psAdapter->bEndPointHalted && false == psIntfAdapter->psAdapter->bEndPointHalted &&
FALSE == psIntfAdapter->bSuspended && false == psIntfAdapter->bSuspended &&
FALSE == psIntfAdapter->bPreparingForBusSuspend) false == psIntfAdapter->bPreparingForBusSuspend)
{ {
retval = usb_submit_urb(urb, GFP_ATOMIC); retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval) if (retval)
......
...@@ -82,7 +82,7 @@ static ULONG GetSFTokenCount(struct bcm_mini_adapter *Adapter, struct bcm_packet ...@@ -82,7 +82,7 @@ static ULONG GetSFTokenCount(struct bcm_mini_adapter *Adapter, struct bcm_packet
return 0; return 0;
} }
if (FALSE != psSF->bValid && psSF->ucDirection) { if (false != psSF->bValid && psSF->ucDirection) {
if (0 != psSF->uiCurrentTokenCount) { if (0 != psSF->uiCurrentTokenCount) {
return psSF->uiCurrentTokenCount; return psSF->uiCurrentTokenCount;
} else { } else {
...@@ -188,7 +188,7 @@ static VOID CheckAndSendPacketFromIndex(struct bcm_mini_adapter *Adapter, struct ...@@ -188,7 +188,7 @@ static VOID CheckAndSendPacketFromIndex(struct bcm_mini_adapter *Adapter, struct
spin_unlock_bh(&psSF->SFQueueLock); spin_unlock_bh(&psSF->SFQueueLock);
Status = SendPacketFromQueue(Adapter, psSF, QueuePacket); Status = SendPacketFromQueue(Adapter, psSF, QueuePacket);
psSF->uiPendedLast = FALSE; psSF->uiPendedLast = false;
} else { } else {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "For Queue: %zd\n", psSF-Adapter->PackInfo); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "For Queue: %zd\n", psSF-Adapter->PackInfo);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "\nAvailable Tokens = %d required = %d\n", BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "\nAvailable Tokens = %d required = %d\n",
...@@ -299,7 +299,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter) ...@@ -299,7 +299,7 @@ VOID transmit_packets(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling CheckAndSendPacketFromIndex.."); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_PACKETS, DBG_LVL_ALL, "Calling CheckAndSendPacketFromIndex..");
CheckAndSendPacketFromIndex(Adapter, &Adapter->PackInfo[iIndex]); CheckAndSendPacketFromIndex(Adapter, &Adapter->PackInfo[iIndex]);
uiPrevTotalCount--; uiPrevTotalCount--;
exit_flag = FALSE; exit_flag = false;
} }
} }
......
...@@ -53,7 +53,7 @@ int InitAdapter(struct bcm_mini_adapter *psAdapter) ...@@ -53,7 +53,7 @@ int InitAdapter(struct bcm_mini_adapter *psAdapter)
init_waitqueue_head(&psAdapter->ioctl_fw_dnld_wait_queue); init_waitqueue_head(&psAdapter->ioctl_fw_dnld_wait_queue);
init_waitqueue_head(&psAdapter->lowpower_mode_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; psAdapter->fw_download_done = false;
default_wimax_protocol_initialize(psAdapter); default_wimax_protocol_initialize(psAdapter);
for (i = 0; i < MAX_CNTRL_PKTS; i++) { for (i = 0; i < MAX_CNTRL_PKTS; i++) {
...@@ -255,7 +255,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) ...@@ -255,7 +255,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer)
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"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "SYNC UP IN SHUTDOWN..Device WakeUp\n");
if (Adapter->bTriedToWakeUpFromlowPowerMode == FALSE) { if (Adapter->bTriedToWakeUpFromlowPowerMode == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Waking up for the First Time..\n"); 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->usIdleModePattern = ABORT_SHUTDOWN_MODE; /* change it to 1 for current support. */
Adapter->bWakeUpDevice = TRUE; Adapter->bWakeUpDevice = TRUE;
...@@ -346,7 +346,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer) ...@@ -346,7 +346,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer)
pktlen = pLeader->PLength; pktlen = pLeader->PLength;
Status = StoreCmControlResponseMessage(Adapter, pucAddIndication, &pktlen); Status = StoreCmControlResponseMessage(Adapter, pucAddIndication, &pktlen);
if (Status != 1) { if (Status != 1) {
ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication_alt *)pucAddIndication)->u16TID, FALSE); ClearTargetDSXBuffer(Adapter, ((struct bcm_add_indication_alt *)pucAddIndication)->u16TID, false);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, " Error Restoring The DSX Control Packet. Dsx Buffers on Target may not be Setup Properly "); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, " Error Restoring The DSX Control Packet. Dsx Buffers on Target may not be Setup Properly ");
return STATUS_FAILURE; return STATUS_FAILURE;
} }
...@@ -499,7 +499,7 @@ void LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuff ...@@ -499,7 +499,7 @@ void LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuff
Adapter->bETHCSEnabled = *(pucBuffer+4) & ETH_CS_MASK; Adapter->bETHCSEnabled = *(pucBuffer+4) & ETH_CS_MASK;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Received In LinkUp Ack : %x\n", Adapter->bPHSEnabled); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "PHS Support Status Received In LinkUp Ack : %x\n", Adapter->bPHSEnabled);
if ((FALSE == Adapter->bShutStatus) && (FALSE == Adapter->IdleMode)) { if ((false == Adapter->bShutStatus) && (false == Adapter->IdleMode)) {
if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) {
Adapter->DriverState = NORMAL_OPERATION; Adapter->DriverState = NORMAL_OPERATION;
wake_up(&Adapter->LEDInfo.notify_led_event); wake_up(&Adapter->LEDInfo.notify_led_event);
...@@ -517,8 +517,8 @@ void LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuff ...@@ -517,8 +517,8 @@ void LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuff
Adapter->LinkUpStatus = 0; Adapter->LinkUpStatus = 0;
Adapter->LinkStatus = 0; Adapter->LinkStatus = 0;
Adapter->usBestEffortQueueIndex = INVALID_QUEUE_INDEX; Adapter->usBestEffortQueueIndex = INVALID_QUEUE_INDEX;
Adapter->bTriedToWakeUpFromlowPowerMode = FALSE; Adapter->bTriedToWakeUpFromlowPowerMode = false;
Adapter->IdleMode = FALSE; Adapter->IdleMode = false;
beceem_protocol_reset(Adapter); beceem_protocol_reset(Adapter);
break; break;
...@@ -578,7 +578,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -578,7 +578,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
stIdleResponse.szData[1] = TARGET_CAN_NOT_GO_TO_IDLE_MODE; /* NACK- device access is going on. */ stIdleResponse.szData[1] = TARGET_CAN_NOT_GO_TO_IDLE_MODE; /* NACK- device access is going on. */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "HOST IS NACKING Idle mode To F/W!!!!!!!!"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "HOST IS NACKING Idle mode To F/W!!!!!!!!");
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
} else { } else {
stIdleResponse.szData[1] = TARGET_CAN_GO_TO_IDLE_MODE; /* 2; Idle ACK */ stIdleResponse.szData[1] = TARGET_CAN_GO_TO_IDLE_MODE; /* 2; Idle ACK */
Adapter->StatisticsPointer = 0; Adapter->StatisticsPointer = 0;
...@@ -613,7 +613,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -613,7 +613,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
if (Adapter->bDoSuspend == TRUE) if (Adapter->bDoSuspend == TRUE)
Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
} else { } else {
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
} }
if (!NVMAccess) if (!NVMAccess)
...@@ -626,7 +626,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -626,7 +626,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
status = CopyBufferToControlPacket(Adapter, &stIdleResponse); status = CopyBufferToControlPacket(Adapter, &stIdleResponse);
if ((status != STATUS_SUCCESS)) { if ((status != STATUS_SUCCESS)) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "fail to send the Idle mode Request\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "fail to send the Idle mode Request\n");
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
} }
do_gettimeofday(&tv); do_gettimeofday(&tv);
...@@ -651,8 +651,8 @@ void DumpPackInfo(struct bcm_mini_adapter *Adapter) ...@@ -651,8 +651,8 @@ void DumpPackInfo(struct bcm_mini_adapter *Adapter)
for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) { for (uiLoopIndex = 0; uiLoopIndex < NO_OF_QUEUES; uiLoopIndex++) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "*********** Showing Details Of Queue %d***** ******", uiLoopIndex); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "*********** Showing Details Of Queue %d***** ******", uiLoopIndex);
if (FALSE == Adapter->PackInfo[uiLoopIndex].bValid) { if (false == Adapter->PackInfo[uiLoopIndex].bValid) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "bValid is FALSE for %X index\n", uiLoopIndex); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "bValid is false for %X index\n", uiLoopIndex);
continue; continue;
} }
...@@ -783,7 +783,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter) ...@@ -783,7 +783,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
int bytes; int bytes;
psIntfAdapter = ((struct bcm_interface_adapter *)(ps_adapter->pvInterfaceAdapter)); psIntfAdapter = ((struct bcm_interface_adapter *)(ps_adapter->pvInterfaceAdapter));
ps_adapter->bDDRInitDone = FALSE; ps_adapter->bDDRInitDone = false;
if (ps_adapter->chip_id >= T3LPB) { if (ps_adapter->chip_id >= T3LPB) {
/* SYS_CFG register is write protected hence for modifying this reg value, it should be read twice before */ /* SYS_CFG register is write protected hence for modifying this reg value, it should be read twice before */
...@@ -803,7 +803,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter) ...@@ -803,7 +803,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
if (ps_adapter->chip_id >= T3LPB) { if (ps_adapter->chip_id >= T3LPB) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Resetting UMA-B\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Resetting UMA-B\n");
retval = usb_reset_device(psIntfAdapter->udev); retval = usb_reset_device(psIntfAdapter->udev);
psIntfAdapter->psAdapter->StopAllXaction = FALSE; psIntfAdapter->psAdapter->StopAllXaction = false;
if (retval != STATUS_SUCCESS) { if (retval != STATUS_SUCCESS) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Reset failed with ret value :%d", retval); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Reset failed with ret value :%d", retval);
...@@ -888,7 +888,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter) ...@@ -888,7 +888,7 @@ int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
wrmalt(ps_adapter, 0x0f01186c, &uiResetValue, sizeof(uiResetValue)); wrmalt(ps_adapter, 0x0f01186c, &uiResetValue, sizeof(uiResetValue));
err_exit: err_exit:
psIntfAdapter->psAdapter->StopAllXaction = FALSE; psIntfAdapter->psAdapter->StopAllXaction = false;
return retval; return retval;
} }
...@@ -968,7 +968,7 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter) ...@@ -968,7 +968,7 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter)
return -EIO; return -EIO;
} }
if (FALSE == ps_adapter->AutoFirmDld) { if (false == ps_adapter->AutoFirmDld) {
BCM_DEBUG_PRINT(ps_adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "AutoFirmDld Disabled in CFG File..\n"); BCM_DEBUG_PRINT(ps_adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "AutoFirmDld Disabled in CFG File..\n");
/* If Auto f/w download is disable, register the control interface, */ /* If Auto f/w download is disable, register the control interface, */
/* register the control interface after the mailbox. */ /* register the control interface after the mailbox. */
...@@ -1094,7 +1094,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) ...@@ -1094,7 +1094,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter)
if (ntohl(Adapter->pstargetparams->m_u32PhyParameter2) & AUTO_SYNC_DISABLE) { if (ntohl(Adapter->pstargetparams->m_u32PhyParameter2) & AUTO_SYNC_DISABLE) {
pr_info(DRV_NAME ": AutoSyncup is Disabled\n"); pr_info(DRV_NAME ": AutoSyncup is Disabled\n");
Adapter->AutoSyncup = FALSE; Adapter->AutoSyncup = false;
} else { } else {
pr_info(DRV_NAME ": AutoSyncup is Enabled\n"); pr_info(DRV_NAME ": AutoSyncup is Enabled\n");
Adapter->AutoSyncup = TRUE; Adapter->AutoSyncup = TRUE;
...@@ -1105,7 +1105,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) ...@@ -1105,7 +1105,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter)
Adapter->AutoLinkUp = TRUE; Adapter->AutoLinkUp = TRUE;
} else { } else {
pr_info(DRV_NAME ": Disabling autolink up"); pr_info(DRV_NAME ": Disabling autolink up");
Adapter->AutoLinkUp = FALSE; Adapter->AutoLinkUp = false;
} }
/* Setting the DDR Setting.. */ /* Setting the DDR Setting.. */
Adapter->DDRSetting = (ntohl(Adapter->pstargetparams->HostDrvrConfig6) >> 8)&0x0F; Adapter->DDRSetting = (ntohl(Adapter->pstargetparams->HostDrvrConfig6) >> 8)&0x0F;
...@@ -1117,7 +1117,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter) ...@@ -1117,7 +1117,7 @@ void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter)
Adapter->AutoFirmDld = TRUE; Adapter->AutoFirmDld = TRUE;
} else { } else {
pr_info(DRV_NAME ": Disabling Auto Firmware Download\n"); pr_info(DRV_NAME ": Disabling Auto Firmware Download\n");
Adapter->AutoFirmDld = FALSE; Adapter->AutoFirmDld = false;
} }
uiHostDrvrCfg6 = ntohl(Adapter->pstargetparams->HostDrvrConfig6); uiHostDrvrCfg6 = ntohl(Adapter->pstargetparams->HostDrvrConfig6);
Adapter->bMipsConfig = (uiHostDrvrCfg6>>20)&0x01; Adapter->bMipsConfig = (uiHostDrvrCfg6>>20)&0x01;
...@@ -1155,21 +1155,21 @@ static void doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter) ...@@ -1155,21 +1155,21 @@ static void doPowerAutoCorrection(struct bcm_mini_adapter *psAdapter)
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"); 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; psAdapter->bDoSuspend = false;
} }
if (psAdapter->bIsAutoCorrectEnabled && (psAdapter->chip_id >= T3LPB)) { if (psAdapter->bIsAutoCorrectEnabled && (psAdapter->chip_id >= T3LPB)) {
/* If reporting mode is enable, switch PMU to PMC */ /* If reporting mode is enable, switch PMU to PMC */
{ {
psAdapter->ulPowerSaveMode = DEVICE_POWERSAVE_MODE_AS_PMU_CLOCK_GATING; psAdapter->ulPowerSaveMode = DEVICE_POWERSAVE_MODE_AS_PMU_CLOCK_GATING;
psAdapter->bDoSuspend = FALSE; psAdapter->bDoSuspend = false;
} }
/* clearing space bit[15..12] */ /* clearing space bit[15..12] */
psAdapter->pstargetparams->HostDrvrConfig6 &= ~(htonl((0xF << 12))); psAdapter->pstargetparams->HostDrvrConfig6 &= ~(htonl((0xF << 12)));
/* placing the power save mode option */ /* placing the power save mode option */
psAdapter->pstargetparams->HostDrvrConfig6 |= htonl((psAdapter->ulPowerSaveMode << 12)); psAdapter->pstargetparams->HostDrvrConfig6 |= htonl((psAdapter->ulPowerSaveMode << 12));
} else if (psAdapter->bIsAutoCorrectEnabled == FALSE) { } else if (psAdapter->bIsAutoCorrectEnabled == false) {
/* remove the autocorrect disable bit set before dumping. */ /* remove the autocorrect disable bit set before dumping. */
psAdapter->ulPowerSaveMode &= ~(1 << 3); psAdapter->ulPowerSaveMode &= ~(1 << 3);
psAdapter->pstargetparams->HostDrvrConfig6 &= ~(htonl(1 << 15)); psAdapter->pstargetparams->HostDrvrConfig6 &= ~(htonl(1 << 15));
...@@ -1302,8 +1302,8 @@ static void HandleShutDownModeWakeup(struct bcm_mini_adapter *Adapter) ...@@ -1302,8 +1302,8 @@ static void HandleShutDownModeWakeup(struct bcm_mini_adapter *Adapter)
wake_up(&Adapter->LEDInfo.notify_led_event); wake_up(&Adapter->LEDInfo.notify_led_event);
} }
Adapter->bTriedToWakeUpFromlowPowerMode = FALSE; Adapter->bTriedToWakeUpFromlowPowerMode = false;
Adapter->bShutStatus = FALSE; Adapter->bShutStatus = false;
wake_up(&Adapter->lowpower_mode_wait_queue); wake_up(&Adapter->lowpower_mode_wait_queue);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "<====\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "<====\n");
} }
...@@ -1341,7 +1341,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -1341,7 +1341,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "Device Access is going on NACK the Shut Down MODE\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "Device Access is going on NACK the Shut Down MODE\n");
stShutdownResponse.szData[2] = SHUTDOWN_NACK_FROM_DRIVER; /* NACK- device access is going on. */ stShutdownResponse.szData[2] = SHUTDOWN_NACK_FROM_DRIVER; /* NACK- device access is going on. */
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
} else { } else {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "Sending SHUTDOWN MODE ACK\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "Sending SHUTDOWN MODE ACK\n");
stShutdownResponse.szData[2] = SHUTDOWN_ACK_FROM_DRIVER; /* ShutDown ACK */ stShutdownResponse.szData[2] = SHUTDOWN_ACK_FROM_DRIVER; /* ShutDown ACK */
...@@ -1374,7 +1374,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -1374,7 +1374,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
if (Adapter->bDoSuspend == TRUE) if (Adapter->bDoSuspend == TRUE)
Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); Bcm_kill_all_URBs((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
} else { } else {
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
} }
if (!NVMAccess) if (!NVMAccess)
...@@ -1387,7 +1387,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter) ...@@ -1387,7 +1387,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
Status = CopyBufferToControlPacket(Adapter, &stShutdownResponse); Status = CopyBufferToControlPacket(Adapter, &stShutdownResponse);
if ((Status != STATUS_SUCCESS)) { if ((Status != STATUS_SUCCESS)) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "fail to send the Idle mode Request\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "fail to send the Idle mode Request\n");
Adapter->bPreparingForLowPowerMode = FALSE; Adapter->bPreparingForLowPowerMode = false;
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
} }
} }
...@@ -1430,11 +1430,11 @@ void ResetCounters(struct bcm_mini_adapter *Adapter) ...@@ -1430,11 +1430,11 @@ void ResetCounters(struct bcm_mini_adapter *Adapter)
Adapter->LinkStatus = 0; Adapter->LinkStatus = 0;
atomic_set(&Adapter->cntrlpktCnt, 0); atomic_set(&Adapter->cntrlpktCnt, 0);
atomic_set(&Adapter->TotalPacketCount, 0); atomic_set(&Adapter->TotalPacketCount, 0);
Adapter->fw_download_done = FALSE; Adapter->fw_download_done = false;
Adapter->LinkStatus = 0; Adapter->LinkStatus = 0;
Adapter->AutoLinkUp = FALSE; Adapter->AutoLinkUp = false;
Adapter->IdleMode = FALSE; Adapter->IdleMode = false;
Adapter->bShutStatus = FALSE; Adapter->bShutStatus = false;
} }
struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIP) struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIP)
...@@ -1521,7 +1521,7 @@ void update_per_sf_desc_cnts(struct bcm_mini_adapter *Adapter) ...@@ -1521,7 +1521,7 @@ void update_per_sf_desc_cnts(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Invalid VCID : %x\n", Adapter->PackInfo[iIndex].usVCID_Value); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Invalid VCID : %x\n", Adapter->PackInfo[iIndex].usVCID_Value);
} }
} }
atomic_set(&Adapter->uiMBupdate, FALSE); atomic_set(&Adapter->uiMBupdate, false);
} }
void flush_queue(struct bcm_mini_adapter *Adapter, unsigned int iQIndex) void flush_queue(struct bcm_mini_adapter *Adapter, unsigned int iQIndex)
...@@ -1557,8 +1557,8 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter) ...@@ -1557,8 +1557,8 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter)
netif_carrier_off(Adapter->dev); netif_carrier_off(Adapter->dev);
netif_stop_queue(Adapter->dev); netif_stop_queue(Adapter->dev);
Adapter->IdleMode = FALSE; Adapter->IdleMode = false;
Adapter->LinkUpStatus = FALSE; Adapter->LinkUpStatus = false;
ClearTargetDSXBuffer(Adapter, 0, TRUE); ClearTargetDSXBuffer(Adapter, 0, TRUE);
/* Delete All Classifier Rules */ /* Delete All Classifier Rules */
...@@ -1568,7 +1568,7 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter) ...@@ -1568,7 +1568,7 @@ static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter)
flush_all_queues(Adapter); flush_all_queues(Adapter);
if (Adapter->TimerActive == TRUE) if (Adapter->TimerActive == TRUE)
Adapter->TimerActive = FALSE; Adapter->TimerActive = false;
memset(Adapter->astFragmentedPktClassifierTable, 0, sizeof(struct bcm_fragmented_packet_info) * MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES); memset(Adapter->astFragmentedPktClassifierTable, 0, sizeof(struct bcm_fragmented_packet_info) * MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES);
......
...@@ -569,7 +569,7 @@ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid) ...@@ -569,7 +569,7 @@ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid)
memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex], 0, sizeof(struct bcm_phs_classifier_entry)); memset(&pstClassifierRulesTable->stOldPhsRulesList[nClsidIndex], 0, sizeof(struct bcm_phs_classifier_entry));
} }
} }
pstServiceFlowEntry->bUsed = FALSE; pstServiceFlowEntry->bUsed = false;
pstServiceFlowEntry->uiVcid = 0; pstServiceFlowEntry->uiVcid = 0;
} }
...@@ -793,21 +793,21 @@ static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule) ...@@ -793,21 +793,21 @@ static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule)
if (psPhsRule) { if (psPhsRule) {
if (!psPhsRule->u8PHSI) { if (!psPhsRule->u8PHSI) {
/* PHSI is not valid */ /* PHSI is not valid */
return FALSE; return false;
} }
if (!psPhsRule->u8PHSS) { if (!psPhsRule->u8PHSS) {
/* PHSS Is Undefined */ /* PHSS Is Undefined */
return FALSE; return false;
} }
/* Check if PHSF is defines for the PHS Rule */ /* Check if PHSF is defines for the PHS Rule */
if (!psPhsRule->u8PHSFLength) /* If any part of PHSF is valid then Rule contains valid PHSF */ if (!psPhsRule->u8PHSFLength) /* If any part of PHSF is valid then Rule contains valid PHSF */
return FALSE; return false;
return TRUE; return TRUE;
} else } else
return FALSE; return false;
} }
UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable, UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable,
...@@ -888,7 +888,7 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid, IN B_UINT16 uiC ...@@ -888,7 +888,7 @@ static UINT CreateSFToClassifierRuleMapping(IN B_UINT16 uiVcid, IN B_UINT16 uiC
struct bcm_phs_classifier_table *psaClassifiertable = NULL; struct bcm_phs_classifier_table *psaClassifiertable = NULL;
UINT uiStatus = 0; UINT uiStatus = 0;
int iSfIndex; int iSfIndex;
bool bFreeEntryFound = FALSE; bool bFreeEntryFound = false;
/* Check for a free entry in SFID table */ /* Check for a free entry in SFID table */
for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) { for (iSfIndex = 0; iSfIndex < MAX_SERVICEFLOWS; iSfIndex++) {
...@@ -1009,7 +1009,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1009,7 +1009,7 @@ static UINT CreateClassifierPHSRule(IN B_UINT16 uiClsId,
B_UINT8 u8AssociatedPHSI) B_UINT8 u8AssociatedPHSI)
{ {
UINT iClassifierIndex = 0; UINT iClassifierIndex = 0;
bool bFreeEntryFound = FALSE; bool bFreeEntryFound = false;
struct bcm_phs_classifier_entry *psClassifierRules = NULL; struct bcm_phs_classifier_entry *psClassifierRules = NULL;
UINT nStatus = PHS_SUCCESS; UINT nStatus = PHS_SUCCESS;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -1102,7 +1102,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1102,7 +1102,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
{ {
struct bcm_phs_rule *pstAddPhsRule = NULL; struct bcm_phs_rule *pstAddPhsRule = NULL;
UINT nPhsRuleIndex = 0; UINT nPhsRuleIndex = 0;
bool bPHSRuleOrphaned = FALSE; bool bPHSRuleOrphaned = false;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
psPhsRule->u8RefCnt = 0; psPhsRule->u8RefCnt = 0;
...@@ -1124,7 +1124,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1124,7 +1124,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
} }
/* Step 2.a PHS Rule Does Not Exist .Create New PHS Rule for uiClsId */ /* Step 2.a PHS Rule Does Not Exist .Create New PHS Rule for uiClsId */
if (FALSE == bPHSRuleOrphaned) { if (false == bPHSRuleOrphaned) {
pstClassifierEntry->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule), GFP_KERNEL); pstClassifierEntry->pstPhsRule = kmalloc(sizeof(struct bcm_phs_rule), GFP_KERNEL);
if (NULL == pstClassifierEntry->pstPhsRule) if (NULL == pstClassifierEntry->pstPhsRule)
...@@ -1153,7 +1153,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId, ...@@ -1153,7 +1153,7 @@ static UINT UpdateClassifierPHSRule(IN B_UINT16 uiClsId,
static bool DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule) static bool DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *psaClassifiertable, struct bcm_phs_rule *pstPhsRule)
{ {
if (pstPhsRule == NULL) if (pstPhsRule == NULL)
return FALSE; return false;
if (pstPhsRule->u8RefCnt) if (pstPhsRule->u8RefCnt)
pstPhsRule->u8RefCnt--; pstPhsRule->u8RefCnt--;
...@@ -1166,7 +1166,7 @@ static bool DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table * ...@@ -1166,7 +1166,7 @@ static bool DerefPhsRule(IN B_UINT16 uiClsId, struct bcm_phs_classifier_table *
*/ */
return TRUE; return TRUE;
} else } else
return FALSE; return false;
} }
void DumpPhsRules(struct bcm_phs_extension *pDeviceExtension) void DumpPhsRules(struct bcm_phs_extension *pDeviceExtension)
......
...@@ -43,7 +43,7 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulSr ...@@ -43,7 +43,7 @@ bool MatchSrcIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulSr
} }
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Ip Address Not Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Ip Address Not Matched");
return FALSE; return false;
} }
...@@ -77,7 +77,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulD ...@@ -77,7 +77,7 @@ bool MatchDestIpAddress(struct bcm_classifier_rule *pstClassifierRule, ULONG ulD
} }
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address Not Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Ip Address Not Matched");
return FALSE; return false;
} }
...@@ -103,7 +103,7 @@ bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucTypeOfServi ...@@ -103,7 +103,7 @@ bool MatchTos(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucTypeOfServi
return TRUE; return TRUE;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Type Of Service Not Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Type Of Service Not Matched");
return FALSE; return false;
} }
...@@ -132,7 +132,7 @@ bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtoc ...@@ -132,7 +132,7 @@ bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtoc
} }
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Not Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Not Matched");
return FALSE; return false;
} }
...@@ -164,7 +164,7 @@ bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPo ...@@ -164,7 +164,7 @@ bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPo
} }
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Port: %x Not Matched ", ushSrcPort); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Src Port: %x Not Matched ", ushSrcPort);
return FALSE; return false;
} }
...@@ -197,7 +197,7 @@ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDest ...@@ -197,7 +197,7 @@ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDest
} }
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dest Port: %x Not Matched", ushDestPort); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dest Port: %x Not Matched", ushDestPort);
return FALSE; return false;
} }
/** /**
@ingroup tx_functions @ingroup tx_functions
...@@ -209,7 +209,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -209,7 +209,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
struct bcm_classifier_rule *pstClassifierRule) struct bcm_classifier_rule *pstClassifierRule)
{ {
struct bcm_transport_header *xprt_hdr = NULL; struct bcm_transport_header *xprt_hdr = NULL;
bool bClassificationSucceed = FALSE; bool bClassificationSucceed = false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "========>"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "========>");
...@@ -223,7 +223,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -223,7 +223,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
//Checking classifier validity //Checking classifier validity
if (!pstClassifierRule->bUsed || pstClassifierRule->ucDirection == DOWNLINK_DIR) if (!pstClassifierRule->bUsed || pstClassifierRule->ucDirection == DOWNLINK_DIR)
{ {
bClassificationSucceed = FALSE; bClassificationSucceed = false;
break; break;
} }
...@@ -233,17 +233,17 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -233,17 +233,17 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
//**************Checking IP header parameter**************************// //**************Checking IP header parameter**************************//
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Trying to match Source IP Address"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Trying to match Source IP Address");
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchSrcIpAddress(pstClassifierRule, iphd->saddr))) MatchSrcIpAddress(pstClassifierRule, iphd->saddr)))
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source IP Address Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source IP Address Matched");
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchDestIpAddress(pstClassifierRule, iphd->daddr))) MatchDestIpAddress(pstClassifierRule, iphd->daddr)))
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination IP Address Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination IP Address Matched");
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchTos(pstClassifierRule, iphd->tos))) MatchTos(pstClassifierRule, iphd->tos)))
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Match failed\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Match failed\n");
...@@ -251,7 +251,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -251,7 +251,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "TOS Matched");
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchProtocol(pstClassifierRule, iphd->protocol))) MatchProtocol(pstClassifierRule, iphd->protocol)))
break; break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Matched"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Matched");
...@@ -263,7 +263,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -263,7 +263,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source Port %04x", BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source Port %04x",
(iphd->protocol == UDP) ? xprt_hdr->uhdr.source : xprt_hdr->thdr.source); (iphd->protocol == UDP) ? xprt_hdr->uhdr.source : xprt_hdr->thdr.source);
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchSrcPort(pstClassifierRule, MatchSrcPort(pstClassifierRule,
ntohs((iphd->protocol == UDP) ? ntohs((iphd->protocol == UDP) ?
xprt_hdr->uhdr.source : xprt_hdr->thdr.source)))) xprt_hdr->uhdr.source : xprt_hdr->thdr.source))))
...@@ -273,7 +273,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -273,7 +273,7 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Port %04x", BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Destination Port %04x",
(iphd->protocol == UDP) ? xprt_hdr->uhdr.dest : (iphd->protocol == UDP) ? xprt_hdr->uhdr.dest :
xprt_hdr->thdr.dest); xprt_hdr->thdr.dest);
if (FALSE == (bClassificationSucceed = if (false == (bClassificationSucceed =
MatchDestPort(pstClassifierRule, MatchDestPort(pstClassifierRule,
ntohs((iphd->protocol == UDP) ? ntohs((iphd->protocol == UDP) ?
xprt_hdr->uhdr.dest : xprt_hdr->thdr.dest)))) xprt_hdr->uhdr.dest : xprt_hdr->thdr.dest))))
...@@ -286,13 +286,13 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter, ...@@ -286,13 +286,13 @@ static USHORT IpVersion4(struct bcm_mini_adapter *Adapter,
iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID); iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
if (iMatchedSFQueueIndex >= NO_OF_QUEUES) if (iMatchedSFQueueIndex >= NO_OF_QUEUES)
{ {
bClassificationSucceed = FALSE; bClassificationSucceed = false;
} }
else else
{ {
if (FALSE == Adapter->PackInfo[iMatchedSFQueueIndex].bActive) if (false == Adapter->PackInfo[iMatchedSFQueueIndex].bActive)
{ {
bClassificationSucceed = FALSE; bClassificationSucceed = false;
} }
} }
} }
...@@ -451,7 +451,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -451,7 +451,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
struct iphdr *pIpHeader = NULL; struct iphdr *pIpHeader = NULL;
INT uiSfIndex = 0; INT uiSfIndex = 0;
USHORT usIndex = Adapter->usBestEffortQueueIndex; USHORT usIndex = Adapter->usBestEffortQueueIndex;
bool bFragmentedPkt = FALSE, bClassificationSucceed = FALSE; bool bFragmentedPkt = false, bClassificationSucceed = false;
USHORT usCurrFragment = 0; USHORT usCurrFragment = 0;
struct bcm_tcp_header *pTcpHeader; struct bcm_tcp_header *pTcpHeader;
...@@ -529,16 +529,16 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -529,16 +529,16 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
//to classify the packet until match found //to classify the packet until match found
do do
{ {
if (FALSE == Adapter->astClassifierTable[uiLoopIndex].bUsed) if (false == Adapter->astClassifierTable[uiLoopIndex].bUsed)
{ {
bClassificationSucceed = FALSE; bClassificationSucceed = false;
break; break;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Adapter->PackInfo[%d].bvalid=True\n", uiLoopIndex); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Adapter->PackInfo[%d].bvalid=True\n", uiLoopIndex);
if (0 == Adapter->astClassifierTable[uiLoopIndex].ucDirection) if (0 == Adapter->astClassifierTable[uiLoopIndex].ucDirection)
{ {
bClassificationSucceed = FALSE;//cannot be processed for classification. bClassificationSucceed = false;//cannot be processed for classification.
break; // it is a down link connection break; // it is a down link connection
} }
...@@ -556,7 +556,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -556,7 +556,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
if (eEthUnsupportedFrame == stEthCsPktInfo.eNwpktEthFrameType) if (eEthUnsupportedFrame == stEthCsPktInfo.eNwpktEthFrameType)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a Valid Supported Ethernet Frame\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a Valid Supported Ethernet Frame\n");
bClassificationSucceed = FALSE; bClassificationSucceed = false;
break; break;
} }
...@@ -577,7 +577,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -577,7 +577,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
if (eEthOtherFrame != stEthCsPktInfo.eNwpktEthFrameType) if (eEthOtherFrame != stEthCsPktInfo.eNwpktEthFrameType)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a 802.3 Ethernet Frame... hence not allowed over non-ETH CS SF\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a 802.3 Ethernet Frame... hence not allowed over non-ETH CS SF\n");
bClassificationSucceed = FALSE; bClassificationSucceed = false;
break; break;
} }
} }
...@@ -590,7 +590,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -590,7 +590,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
if (stEthCsPktInfo.eNwpktIPFrameType == eNonIPPacket) if (stEthCsPktInfo.eNwpktIPFrameType == eNonIPPacket)
{ {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet is Not an IP Packet\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet is Not an IP Packet\n");
bClassificationSucceed = FALSE; bClassificationSucceed = false;
break; break;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dump IP Header :\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Dump IP Header :\n");
...@@ -636,7 +636,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb) ...@@ -636,7 +636,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
stFragPktInfo.ulSrcIpAddress = pIpHeader->saddr; stFragPktInfo.ulSrcIpAddress = pIpHeader->saddr;
stFragPktInfo.usIpIdentification = pIpHeader->id; stFragPktInfo.usIpIdentification = pIpHeader->id;
stFragPktInfo.pstMatchedClassifierEntry = pstClassifierRule; stFragPktInfo.pstMatchedClassifierEntry = pstClassifierRule;
stFragPktInfo.bOutOfOrderFragment = FALSE; stFragPktInfo.bOutOfOrderFragment = false;
AddFragIPClsEntry(Adapter, &stFragPktInfo); AddFragIPClsEntry(Adapter, &stFragPktInfo);
} }
...@@ -661,7 +661,7 @@ static bool EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRul ...@@ -661,7 +661,7 @@ static bool EthCSMatchSrcMACAddress(struct bcm_classifier_rule *pstClassifierRul
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "SRC MAC[%x] = %x ClassifierRuleSrcMAC = %x Mask : %x\n", i, Mac[i], pstClassifierRule->au8EThCSSrcMAC[i], pstClassifierRule->au8EThCSSrcMACMask[i]); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "SRC MAC[%x] = %x ClassifierRuleSrcMAC = %x Mask : %x\n", i, Mac[i], pstClassifierRule->au8EThCSSrcMAC[i], pstClassifierRule->au8EThCSSrcMACMask[i]);
if ((pstClassifierRule->au8EThCSSrcMAC[i] & pstClassifierRule->au8EThCSSrcMACMask[i]) != if ((pstClassifierRule->au8EThCSSrcMAC[i] & pstClassifierRule->au8EThCSSrcMACMask[i]) !=
(Mac[i] & pstClassifierRule->au8EThCSSrcMACMask[i])) (Mac[i] & pstClassifierRule->au8EThCSSrcMACMask[i]))
return FALSE; return false;
} }
return TRUE; return TRUE;
} }
...@@ -678,7 +678,7 @@ static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRu ...@@ -678,7 +678,7 @@ static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRu
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "SRC MAC[%x] = %x ClassifierRuleSrcMAC = %x Mask : %x\n", i, Mac[i], pstClassifierRule->au8EThCSDestMAC[i], pstClassifierRule->au8EThCSDestMACMask[i]); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "SRC MAC[%x] = %x ClassifierRuleSrcMAC = %x Mask : %x\n", i, Mac[i], pstClassifierRule->au8EThCSDestMAC[i], pstClassifierRule->au8EThCSDestMACMask[i]);
if ((pstClassifierRule->au8EThCSDestMAC[i] & pstClassifierRule->au8EThCSDestMACMask[i]) != if ((pstClassifierRule->au8EThCSDestMAC[i] & pstClassifierRule->au8EThCSDestMACMask[i]) !=
(Mac[i] & pstClassifierRule->au8EThCSDestMACMask[i])) (Mac[i] & pstClassifierRule->au8EThCSDestMACMask[i]))
return FALSE; return false;
} }
return TRUE; return TRUE;
} }
...@@ -698,29 +698,29 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, ...@@ -698,29 +698,29 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule,
if (memcmp(&pstEthCsPktInfo->usEtherType, &pstClassifierRule->au8EthCSEtherType[1], 2) == 0) if (memcmp(&pstEthCsPktInfo->usEtherType, &pstClassifierRule->au8EthCSEtherType[1], 2) == 0)
return TRUE; return TRUE;
else else
return FALSE; return false;
} }
if (pstClassifierRule->au8EthCSEtherType[0] == 2) if (pstClassifierRule->au8EthCSEtherType[0] == 2)
{ {
if (eEth802LLCFrame != pstEthCsPktInfo->eNwpktEthFrameType) if (eEth802LLCFrame != pstEthCsPktInfo->eNwpktEthFrameType)
return FALSE; return false;
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]); 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]) if (pstEthCsPktInfo->ucDSAP == pstClassifierRule->au8EthCSEtherType[2])
return TRUE; return TRUE;
else else
return FALSE; return false;
} }
return FALSE; return false;
} }
static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, struct sk_buff* skb, struct bcm_eth_packet_info *pstEthCsPktInfo) static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, struct sk_buff* skb, struct bcm_eth_packet_info *pstEthCsPktInfo)
{ {
bool bClassificationSucceed = FALSE; bool bClassificationSucceed = false;
USHORT usVLANID; USHORT usVLANID;
B_UINT8 uPriority = 0; B_UINT8 uPriority = 0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -731,7 +731,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s ...@@ -731,7 +731,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s
if (pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID)) if (pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID))
{ {
if (pstEthCsPktInfo->eNwpktEthFrameType != eEth802QVLANFrame) if (pstEthCsPktInfo->eNwpktEthFrameType != eEth802QVLANFrame)
return FALSE; return false;
uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xF000) >> 13; uPriority = (ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xF000) >> 13;
...@@ -739,17 +739,17 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s ...@@ -739,17 +739,17 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s
bClassificationSucceed = TRUE; bClassificationSucceed = TRUE;
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 D User Priority Rule Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 D User Priority Rule Matched\n");
bClassificationSucceed = FALSE; bClassificationSucceed = false;
if (pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_VLANID_VALID)) if (pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_VLANID_VALID))
{ {
if (pstEthCsPktInfo->eNwpktEthFrameType != eEth802QVLANFrame) if (pstEthCsPktInfo->eNwpktEthFrameType != eEth802QVLANFrame)
return FALSE; return false;
usVLANID = ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xFFF; usVLANID = ntohs(*(USHORT *)(skb->data + sizeof(struct bcm_eth_header))) & 0xFFF;
...@@ -759,7 +759,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s ...@@ -759,7 +759,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s
bClassificationSucceed = TRUE; bClassificationSucceed = TRUE;
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 Q VLAN ID Rule Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 Q VLAN ID Rule Matched\n");
...@@ -773,21 +773,21 @@ static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff* s ...@@ -773,21 +773,21 @@ static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff* s
struct bcm_classifier_rule *pstClassifierRule, struct bcm_classifier_rule *pstClassifierRule,
B_UINT8 EthCSCupport) B_UINT8 EthCSCupport)
{ {
bool bClassificationSucceed = FALSE; bool bClassificationSucceed = false;
bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule, ((struct bcm_eth_header *)(skb->data))->au8SourceAddress); bClassificationSucceed = EthCSMatchSrcMACAddress(pstClassifierRule, ((struct bcm_eth_header *)(skb->data))->au8SourceAddress);
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS SrcMAC Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS SrcMAC Matched\n");
bClassificationSucceed = EthCSMatchDestMACAddress(pstClassifierRule, ((struct bcm_eth_header *)(skb->data))->au8DestinationAddress); bClassificationSucceed = EthCSMatchDestMACAddress(pstClassifierRule, ((struct bcm_eth_header *)(skb->data))->au8DestinationAddress);
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS DestMAC Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS DestMAC Matched\n");
//classify on ETHType/802.2SAP TLV //classify on ETHType/802.2SAP TLV
bClassificationSucceed = EthCSMatchEThTypeSAP(pstClassifierRule, skb, pstEthCsPktInfo); bClassificationSucceed = EthCSMatchEThTypeSAP(pstClassifierRule, skb, pstEthCsPktInfo);
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS EthType/802.2SAP Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS EthType/802.2SAP Matched\n");
...@@ -795,7 +795,7 @@ static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff* s ...@@ -795,7 +795,7 @@ static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff* s
bClassificationSucceed = EthCSMatchVLANRules(pstClassifierRule, skb, pstEthCsPktInfo); bClassificationSucceed = EthCSMatchVLANRules(pstClassifierRule, skb, pstEthCsPktInfo);
if (!bClassificationSucceed) if (!bClassificationSucceed)
return FALSE; return false;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 VLAN Rules Matched\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "ETH CS 802.1 VLAN Rules Matched\n");
return bClassificationSucceed; return bClassificationSucceed;
......
...@@ -84,7 +84,7 @@ int SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket) ...@@ -84,7 +84,7 @@ int SendControlPacket(struct bcm_mini_adapter *Adapter, char *pControlPacket)
int SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USHORT Vcid) int SetupNextSend(struct bcm_mini_adapter *Adapter, struct sk_buff *Packet, USHORT Vcid)
{ {
int status = 0; int status = 0;
bool bHeaderSupressionEnabled = FALSE; bool bHeaderSupressionEnabled = false;
B_UINT16 uiClassifierRuleID; B_UINT16 uiClassifierRuleID;
u16 QueueIndex = skb_get_queue_mapping(Packet); u16 QueueIndex = skb_get_queue_mapping(Packet);
struct bcm_leader Leader = {0}; struct bcm_leader Leader = {0};
...@@ -204,7 +204,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje ...@@ -204,7 +204,7 @@ int tx_pkt_handler(struct bcm_mini_adapter *Adapter /**< pointer to adapter obje
/* Check end point for halt/stall. */ /* Check end point for halt/stall. */
if (Adapter->bEndPointHalted == TRUE) { if (Adapter->bEndPointHalted == TRUE) {
Bcm_clear_halt_of_endpoints(Adapter); Bcm_clear_halt_of_endpoints(Adapter);
Adapter->bEndPointHalted = FALSE; Adapter->bEndPointHalted = false;
StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter)); StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define STATUS_SUCCESS 0 #define STATUS_SUCCESS 0
#define STATUS_FAILURE -1 #define STATUS_FAILURE -1
#define FALSE 0
#define TRUE 1 #define TRUE 1
......
...@@ -18,7 +18,7 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios) ...@@ -18,7 +18,7 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios)
INT Status; INT Status;
Status = (Adapter->gpioBitMap & gpios) ^ gpios; Status = (Adapter->gpioBitMap & gpios) ^ gpios;
if (Status) if (Status)
return FALSE; return false;
else else
return TRUE; return TRUE;
} }
...@@ -27,7 +27,7 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe ...@@ -27,7 +27,7 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe
ULONG timeout, INT num_of_time, enum bcm_led_events currdriverstate) ULONG timeout, INT num_of_time, enum bcm_led_events currdriverstate)
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
bool bInfinite = FALSE; bool bInfinite = false;
/* Check if num_of_time is -ve. If yes, blink led in infinite loop */ /* Check if num_of_time is -ve. If yes, blink led in infinite loop */
if (num_of_time < 0) { if (num_of_time < 0) {
...@@ -67,7 +67,7 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe ...@@ -67,7 +67,7 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe
currdriverstate != Adapter->DriverState || currdriverstate != Adapter->DriverState ||
kthread_should_stop(), kthread_should_stop(),
msecs_to_jiffies(timeout)); msecs_to_jiffies(timeout));
if (bInfinite == FALSE) if (bInfinite == false)
num_of_time--; num_of_time--;
} }
return Status; return Status;
...@@ -120,7 +120,7 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N ...@@ -120,7 +120,7 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
num_of_time_tx = ScaleRateofTransfer((ULONG)rate_of_transfer_tx); num_of_time_tx = ScaleRateofTransfer((ULONG)rate_of_transfer_tx);
num_of_time_rx = ScaleRateofTransfer((ULONG)rate_of_transfer_rx); num_of_time_rx = ScaleRateofTransfer((ULONG)rate_of_transfer_rx);
while ((Adapter->device_removed == FALSE)) { while ((Adapter->device_removed == false)) {
timeout = 50; timeout = 50;
/* /*
* Blink Tx and Rx LED when both Tx and Rx is * Blink Tx and Rx LED when both Tx and Rx is
...@@ -499,10 +499,10 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter, ...@@ -499,10 +499,10 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
/* Read the GPIO numbers from EEPROM */ /* Read the GPIO numbers from EEPROM */
Status = ReadLEDInformationFromEEPROM(Adapter, GPIO_Array); Status = ReadLEDInformationFromEEPROM(Adapter, GPIO_Array);
if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH) { if (Status == STATUS_IMAGE_CHECKSUM_MISMATCH) {
*bEnableThread = FALSE; *bEnableThread = false;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} else if (Status) { } else if (Status) {
*bEnableThread = FALSE; *bEnableThread = false;
return Status; return Status;
} }
...@@ -561,7 +561,7 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter, ...@@ -561,7 +561,7 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
uiNum_of_LED_Type++; uiNum_of_LED_Type++;
} }
if (uiNum_of_LED_Type >= NUM_OF_LEDS) if (uiNum_of_LED_Type >= NUM_OF_LEDS)
*bEnableThread = FALSE; *bEnableThread = false;
return Status; return Status;
} }
...@@ -602,7 +602,7 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter) ...@@ -602,7 +602,7 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
DBG_LVL_ALL, "LED Thread: WRM Failed\n"); DBG_LVL_ALL, "LED Thread: WRM Failed\n");
Adapter->LEDInfo.bIdle_led_off = FALSE; Adapter->LEDInfo.bIdle_led_off = false;
} }
static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_tx, static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_tx,
...@@ -660,7 +660,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -660,7 +660,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
UCHAR dummyIndex = 0; UCHAR dummyIndex = 0;
/* currdriverstate = Adapter->DriverState; */ /* currdriverstate = Adapter->DriverState; */
Adapter->LEDInfo.bIdleMode_tx_from_host = FALSE; Adapter->LEDInfo.bIdleMode_tx_from_host = false;
/* /*
* Wait till event is triggered * Wait till event is triggered
...@@ -698,7 +698,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -698,7 +698,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
if (GPIO_num != DISABLE_GPIO_NUM) if (GPIO_num != DISABLE_GPIO_NUM)
TURN_OFF_LED(1 << GPIO_num, uiLedIndex); TURN_OFF_LED(1 << GPIO_num, uiLedIndex);
if (Adapter->LEDInfo.bLedInitDone == FALSE) { if (Adapter->LEDInfo.bLedInitDone == false) {
LedGpioInit(Adapter); LedGpioInit(Adapter);
Adapter->LEDInfo.bLedInitDone = TRUE; Adapter->LEDInfo.bLedInitDone = TRUE;
} }
...@@ -757,7 +757,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -757,7 +757,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
UCHAR uiLEDTx = 0; UCHAR uiLEDTx = 0;
UCHAR uiLEDRx = 0; UCHAR uiLEDRx = 0;
currdriverstate = NORMAL_OPERATION; currdriverstate = NORMAL_OPERATION;
Adapter->LEDInfo.bIdle_led_off = FALSE; Adapter->LEDInfo.bIdle_led_off = false;
BcmGetGPIOPinInfo(Adapter, &GPIO_num_tx, BcmGetGPIOPinInfo(Adapter, &GPIO_num_tx,
&GPIO_num_rx, &uiLEDTx, &uiLEDRx, &GPIO_num_rx, &uiLEDTx, &uiLEDRx,
...@@ -803,7 +803,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -803,7 +803,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
} }
/* Turn off LED And WAKE-UP for Sendinf IDLE mode ACK */ /* Turn off LED And WAKE-UP for Sendinf IDLE mode ACK */
Adapter->LEDInfo.bLedInitDone = FALSE; Adapter->LEDInfo.bLedInitDone = false;
Adapter->LEDInfo.bIdle_led_off = TRUE; Adapter->LEDInfo.bIdle_led_off = TRUE;
wake_up(&Adapter->LEDInfo.idleModeSyncEvent); wake_up(&Adapter->LEDInfo.idleModeSyncEvent);
GPIO_num = DISABLE_GPIO_NUM; GPIO_num = DISABLE_GPIO_NUM;
...@@ -830,7 +830,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -830,7 +830,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
currdriverstate = LED_THREAD_INACTIVE; currdriverstate = LED_THREAD_INACTIVE;
Adapter->LEDInfo.led_thread_running = Adapter->LEDInfo.led_thread_running =
BCM_LED_THREAD_RUNNING_INACTIVELY; BCM_LED_THREAD_RUNNING_INACTIVELY;
Adapter->LEDInfo.bLedInitDone = FALSE; Adapter->LEDInfo.bLedInitDone = false;
/* disable ALL LED */ /* disable ALL LED */
for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) { for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num
...@@ -841,7 +841,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter) ...@@ -841,7 +841,7 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
case LED_THREAD_ACTIVE: case LED_THREAD_ACTIVE:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
DBG_LVL_ALL, "Activating LED thread again..."); DBG_LVL_ALL, "Activating LED thread again...");
if (Adapter->LinkUpStatus == FALSE) if (Adapter->LinkUpStatus == false)
Adapter->DriverState = NO_NETWORK_ENTRY; Adapter->DriverState = NO_NETWORK_ENTRY;
else else
Adapter->DriverState = NORMAL_OPERATION; Adapter->DriverState = NORMAL_OPERATION;
...@@ -899,7 +899,7 @@ int InitLedSettings(struct bcm_mini_adapter *Adapter) ...@@ -899,7 +899,7 @@ int InitLedSettings(struct bcm_mini_adapter *Adapter)
init_waitqueue_head(&Adapter->LEDInfo.idleModeSyncEvent); init_waitqueue_head(&Adapter->LEDInfo.idleModeSyncEvent);
Adapter->LEDInfo.led_thread_running = Adapter->LEDInfo.led_thread_running =
BCM_LED_THREAD_RUNNING_ACTIVELY; BCM_LED_THREAD_RUNNING_ACTIVELY;
Adapter->LEDInfo.bIdle_led_off = FALSE; Adapter->LEDInfo.bIdle_led_off = false;
Adapter->LEDInfo.led_cntrl_threadid = Adapter->LEDInfo.led_cntrl_threadid =
kthread_run((int (*)(void *)) LEDControlThread, kthread_run((int (*)(void *)) LEDControlThread,
Adapter, "led_control_thread"); Adapter, "led_control_thread");
......
...@@ -1084,11 +1084,11 @@ static int BeceemFlashBulkWrite(struct bcm_mini_adapter *Adapter, ...@@ -1084,11 +1084,11 @@ static int BeceemFlashBulkWrite(struct bcm_mini_adapter *Adapter,
* for DSD calibration, allow it without checking of sector permission * for DSD calibration, allow it without checking of sector permission
*/ */
if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == FALSE)) { if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == false)) {
index = 0; index = 0;
uiTemp = uiNumSectTobeRead; uiTemp = uiNumSectTobeRead;
while (uiTemp) { while (uiTemp) {
if (IsOffsetWritable(Adapter, uiOffsetFromSectStart + index * Adapter->uiSectorSize) == FALSE) { if (IsOffsetWritable(Adapter, uiOffsetFromSectStart + index * Adapter->uiSectorSize) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Sector Starting at offset <0X%X> is not writable", BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Sector Starting at offset <0X%X> is not writable",
(uiOffsetFromSectStart + index * Adapter->uiSectorSize)); (uiOffsetFromSectStart + index * Adapter->uiSectorSize));
Status = SECTOR_IS_NOT_WRITABLE; Status = SECTOR_IS_NOT_WRITABLE;
...@@ -1265,11 +1265,11 @@ static int BeceemFlashBulkWriteStatus(struct bcm_mini_adapter *Adapter, ...@@ -1265,11 +1265,11 @@ static int BeceemFlashBulkWriteStatus(struct bcm_mini_adapter *Adapter,
uiNumSectTobeRead++; uiNumSectTobeRead++;
} }
if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == FALSE)) { if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == false)) {
index = 0; index = 0;
uiTemp = uiNumSectTobeRead; uiTemp = uiNumSectTobeRead;
while (uiTemp) { while (uiTemp) {
if (IsOffsetWritable(Adapter, uiOffsetFromSectStart + index * Adapter->uiSectorSize) == FALSE) { if (IsOffsetWritable(Adapter, uiOffsetFromSectStart + index * Adapter->uiSectorSize) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Sector Starting at offset <0X%x> is not writable", BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Sector Starting at offset <0X%x> is not writable",
(uiOffsetFromSectStart + index * Adapter->uiSectorSize)); (uiOffsetFromSectStart + index * Adapter->uiSectorSize));
Status = SECTOR_IS_NOT_WRITABLE; Status = SECTOR_IS_NOT_WRITABLE;
...@@ -1525,7 +1525,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter, ...@@ -1525,7 +1525,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter,
if (memcmp(&pBuffer[uiIndex], &auiData[0], MAX_RW_SIZE)) { if (memcmp(&pBuffer[uiIndex], &auiData[0], MAX_RW_SIZE)) {
/* re-write */ /* re-write */
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, MAX_RW_SIZE, FALSE); BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, MAX_RW_SIZE, false);
mdelay(3); mdelay(3);
BeceemEEPROMBulkRead(Adapter, &auiData[0], uiOffset, MAX_RW_SIZE); BeceemEEPROMBulkRead(Adapter, &auiData[0], uiOffset, MAX_RW_SIZE);
...@@ -1539,7 +1539,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter, ...@@ -1539,7 +1539,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter,
BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4); BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4);
if (uiData != pBuffer[uiIndex]) { if (uiData != pBuffer[uiIndex]) {
/* re-write */ /* re-write */
BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, 4, FALSE); BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, 4, false);
mdelay(3); mdelay(3);
BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4); BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4);
if (uiData != pBuffer[uiIndex]) if (uiData != pBuffer[uiIndex])
...@@ -1819,7 +1819,7 @@ int BeceemNVMRead(struct bcm_mini_adapter *Adapter, ...@@ -1819,7 +1819,7 @@ int BeceemNVMRead(struct bcm_mini_adapter *Adapter,
#endif #endif
if (Adapter->eNVMType == NVM_FLASH) { if (Adapter->eNVMType == NVM_FLASH) {
if (Adapter->bFlashRawRead == FALSE) { if (Adapter->bFlashRawRead == false) {
if (IsSectionExistInVendorInfo(Adapter, Adapter->eActiveDSD)) if (IsSectionExistInVendorInfo(Adapter, Adapter->eActiveDSD))
return vendorextnReadSection(Adapter, (PUCHAR)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes); return vendorextnReadSection(Adapter, (PUCHAR)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes);
...@@ -2425,7 +2425,7 @@ static VOID UpdateVendorInfo(struct bcm_mini_adapter *Adapter) ...@@ -2425,7 +2425,7 @@ static VOID UpdateVendorInfo(struct bcm_mini_adapter *Adapter)
B_UINT32 i = 0; B_UINT32 i = 0;
unsigned int uiSizeSection = 0; unsigned int uiSizeSection = 0;
Adapter->uiVendorExtnFlag = FALSE; Adapter->uiVendorExtnFlag = false;
for (i = 0; i < TOTAL_SECTIONS; i++) for (i = 0; i < TOTAL_SECTIONS; i++)
Adapter->psFlash2xVendorInfo->VendorSection[i].OffsetFromZeroForSectionStart = UNINIT_PTR_IN_CS; Adapter->psFlash2xVendorInfo->VendorSection[i].OffsetFromZeroForSectionStart = UNINIT_PTR_IN_CS;
...@@ -2685,12 +2685,12 @@ int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash ...@@ -2685,12 +2685,12 @@ int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash
switch (eFlashSectionVal) { switch (eFlashSectionVal) {
case ISO_IMAGE1: case ISO_IMAGE1:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start); SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start);
break; break;
case ISO_IMAGE2: case ISO_IMAGE2:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start); SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start);
break; break;
case DSD0: case DSD0:
...@@ -2770,12 +2770,12 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x ...@@ -2770,12 +2770,12 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x
switch (eFlash2xSectionVal) { switch (eFlash2xSectionVal) {
case ISO_IMAGE1: case ISO_IMAGE1:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End); SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End);
break; break;
case ISO_IMAGE2: case ISO_IMAGE2:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End); SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End);
break; break;
case DSD0: case DSD0:
...@@ -3037,7 +3037,7 @@ static int BcmGetActiveISO(struct bcm_mini_adapter *Adapter) ...@@ -3037,7 +3037,7 @@ static int BcmGetActiveISO(struct bcm_mini_adapter *Adapter)
* *
* Return Value:- * Return Value:-
* Success:-TRUE , offset is writable * Success:-TRUE , offset is writable
* Failure:-FALSE, offset is RO * Failure:-false, offset is RO
* *
*/ */
...@@ -3062,7 +3062,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset ...@@ -3062,7 +3062,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset
if (permissionBits == SECTOR_READWRITE_PERMISSION) if (permissionBits == SECTOR_READWRITE_PERMISSION)
return TRUE; return TRUE;
else else
return FALSE; return false;
} }
static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMap) static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMap)
...@@ -3105,13 +3105,13 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3105,13 +3105,13 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
struct bcm_flash2x_cs_info *psFlash2xCSInfo = Adapter->psFlash2xCSInfo; struct bcm_flash2x_cs_info *psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
enum bcm_flash2x_section_val uiHighestPriDSD = 0; enum bcm_flash2x_section_val uiHighestPriDSD = 0;
enum bcm_flash2x_section_val uiHighestPriISO = 0; enum bcm_flash2x_section_val uiHighestPriISO = 0;
bool SetActiveDSDDone = FALSE; bool SetActiveDSDDone = false;
bool SetActiveISODone = FALSE; bool SetActiveISODone = false;
/* For 1.x map all the section except DSD0 will be shown as not present /* For 1.x map all the section except DSD0 will be shown as not present
* This part will be used by calibration tool to detect the number of DSD present in Flash. * This part will be used by calibration tool to detect the number of DSD present in Flash.
*/ */
if (IsFlash2x(Adapter) == FALSE) { if (IsFlash2x(Adapter) == false) {
psFlash2xBitMap->ISO_IMAGE2 = 0; psFlash2xBitMap->ISO_IMAGE2 = 0;
psFlash2xBitMap->ISO_IMAGE1 = 0; psFlash2xBitMap->ISO_IMAGE1 = 0;
psFlash2xBitMap->DSD0 = FLASH2X_SECTION_VALID | FLASH2X_SECTION_ACT | FLASH2X_SECTION_PRESENT; /* 0xF; 0000(Reseved)1(Active)0(RW)1(valid)1(present) */ psFlash2xBitMap->DSD0 = FLASH2X_SECTION_VALID | FLASH2X_SECTION_ACT | FLASH2X_SECTION_PRESENT; /* 0xF; 0000(Reseved)1(Active)0(RW)1(valid)1(present) */
...@@ -3143,10 +3143,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3143,10 +3143,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_VALID;
/* Calculation for extrating the Access permission */ /* Calculation for extrating the Access permission */
if (IsSectionWritable(Adapter, ISO_IMAGE2) == FALSE) if (IsSectionWritable(Adapter, ISO_IMAGE2) == false)
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_RO; psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_RO;
if (SetActiveISODone == FALSE && uiHighestPriISO == ISO_IMAGE2) { if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE2) {
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_ACT; psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_ACT;
SetActiveISODone = TRUE; SetActiveISODone = TRUE;
} }
...@@ -3163,10 +3163,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3163,10 +3163,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_VALID;
/* Calculation for extrating the Access permission */ /* Calculation for extrating the Access permission */
if (IsSectionWritable(Adapter, ISO_IMAGE1) == FALSE) if (IsSectionWritable(Adapter, ISO_IMAGE1) == false)
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_RO; psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_RO;
if (SetActiveISODone == FALSE && uiHighestPriISO == ISO_IMAGE1) { if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE1) {
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_ACT; psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_ACT;
SetActiveISODone = TRUE; SetActiveISODone = TRUE;
} }
...@@ -3183,11 +3183,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3183,11 +3183,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_VALID;
/* Calculation for extrating the Access permission */ /* Calculation for extrating the Access permission */
if (IsSectionWritable(Adapter, DSD2) == FALSE) { if (IsSectionWritable(Adapter, DSD2) == false) {
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_RO; psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_RO;
} else { } else {
/* Means section is writable */ /* Means section is writable */
if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD2)) { if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD2)) {
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_ACT; psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_ACT;
SetActiveDSDDone = TRUE; SetActiveDSDDone = TRUE;
} }
...@@ -3205,11 +3205,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3205,11 +3205,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_VALID;
/* Calculation for extrating the Access permission */ /* Calculation for extrating the Access permission */
if (IsSectionWritable(Adapter, DSD1) == FALSE) { if (IsSectionWritable(Adapter, DSD1) == false) {
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_RO; psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_RO;
} else { } else {
/* Means section is writable */ /* Means section is writable */
if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD1)) { if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD1)) {
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_ACT; psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_ACT;
SetActiveDSDDone = TRUE; SetActiveDSDDone = TRUE;
} }
...@@ -3227,11 +3227,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3227,11 +3227,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_VALID;
/* Setting Access permission */ /* Setting Access permission */
if (IsSectionWritable(Adapter, DSD0) == FALSE) { if (IsSectionWritable(Adapter, DSD0) == false) {
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_RO; psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_RO;
} else { } else {
/* Means section is writable */ /* Means section is writable */
if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD0)) { if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD0)) {
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_ACT; psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_ACT;
SetActiveDSDDone = TRUE; SetActiveDSDDone = TRUE;
} }
...@@ -3249,7 +3249,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3249,7 +3249,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_VALID;
/* Calculation for extrating the Access permission */ /* Calculation for extrating the Access permission */
if (IsSectionWritable(Adapter, VSA0) == FALSE) if (IsSectionWritable(Adapter, VSA0) == false)
psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_RO; psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_RO;
/* By Default section is Active */ /* By Default section is Active */
...@@ -3267,7 +3267,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3267,7 +3267,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_VALID;
/* Checking For Access permission */ /* Checking For Access permission */
if (IsSectionWritable(Adapter, VSA1) == FALSE) if (IsSectionWritable(Adapter, VSA1) == false)
psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_RO; psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_RO;
/* By Default section is Active */ /* By Default section is Active */
...@@ -3285,7 +3285,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3285,7 +3285,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_VALID; psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_VALID;
/* Checking For Access permission */ /* Checking For Access permission */
if (IsSectionWritable(Adapter, VSA2) == FALSE) if (IsSectionWritable(Adapter, VSA2) == false)
psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_RO; psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_RO;
/* By Default section is Active */ /* By Default section is Active */
...@@ -3303,7 +3303,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3303,7 +3303,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->SCSI |= FLASH2X_SECTION_VALID; psFlash2xBitMap->SCSI |= FLASH2X_SECTION_VALID;
/* Checking For Access permission */ /* Checking For Access permission */
if (IsSectionWritable(Adapter, SCSI) == FALSE) if (IsSectionWritable(Adapter, SCSI) == false)
psFlash2xBitMap->SCSI |= FLASH2X_SECTION_RO; psFlash2xBitMap->SCSI |= FLASH2X_SECTION_RO;
/* By Default section is Active */ /* By Default section is Active */
...@@ -3321,7 +3321,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3321,7 +3321,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_VALID; psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_VALID;
/* Checking For Access permission */ /* Checking For Access permission */
if (IsSectionWritable(Adapter, CONTROL_SECTION) == FALSE) if (IsSectionWritable(Adapter, CONTROL_SECTION) == false)
psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_RO; psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_RO;
/* By Default section is Active */ /* By Default section is Active */
...@@ -3517,7 +3517,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti ...@@ -3517,7 +3517,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
break; break;
} }
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
return Status; return Status;
} }
...@@ -3536,7 +3536,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section ...@@ -3536,7 +3536,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
enum bcm_flash2x_section_val eISOReadPart = 0, eISOWritePart = 0; enum bcm_flash2x_section_val eISOReadPart = 0, eISOWritePart = 0;
unsigned int uiReadOffsetWithinPart = 0, uiWriteOffsetWithinPart = 0; unsigned int uiReadOffsetWithinPart = 0, uiWriteOffsetWithinPart = 0;
unsigned int uiTotalDataToCopy = 0; unsigned int uiTotalDataToCopy = 0;
bool IsThisHeaderSector = FALSE; bool IsThisHeaderSector = false;
unsigned int sigOffset = 0; unsigned int sigOffset = 0;
unsigned int ISOLength = 0; unsigned int ISOLength = 0;
unsigned int Status = STATUS_SUCCESS; unsigned int Status = STATUS_SUCCESS;
...@@ -3669,14 +3669,14 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section ...@@ -3669,14 +3669,14 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
break; break;
} }
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
if (IsThisHeaderSector == TRUE) { if (IsThisHeaderSector == TRUE) {
WriteToFlashWithoutSectorErase(Adapter, WriteToFlashWithoutSectorErase(Adapter,
SigBuff, SigBuff,
eISOWritePart, eISOWritePart,
sigOffset, sigOffset,
MAX_RW_SIZE); MAX_RW_SIZE);
IsThisHeaderSector = FALSE; IsThisHeaderSector = false;
} }
/* subtracting the written Data */ /* subtracting the written Data */
uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize; uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize;
...@@ -3782,7 +3782,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section ...@@ -3782,7 +3782,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
break; break;
} }
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
if (IsThisHeaderSector == TRUE) { if (IsThisHeaderSector == TRUE) {
WriteToFlashWithoutSectorErase(Adapter, WriteToFlashWithoutSectorErase(Adapter,
SigBuff, SigBuff,
...@@ -3790,7 +3790,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section ...@@ -3790,7 +3790,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
sigOffset, sigOffset,
MAX_RW_SIZE); MAX_RW_SIZE);
IsThisHeaderSector = FALSE; IsThisHeaderSector = false;
} }
/* subtracting the written Data */ /* subtracting the written Data */
...@@ -3848,13 +3848,13 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio ...@@ -3848,13 +3848,13 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio
unsigned int uiOffset = 0; unsigned int uiOffset = 0;
/* struct bcm_dsd_header dsdHeader = {0}; */ /* struct bcm_dsd_header dsdHeader = {0}; */
if (Adapter->bSigCorrupted == FALSE) { if (Adapter->bSigCorrupted == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Signature is not corrupted by driver, hence not restoring\n"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Signature is not corrupted by driver, hence not restoring\n");
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
if (Adapter->bAllDSDWriteAllow == FALSE) { if (Adapter->bAllDSDWriteAllow == false) {
if (IsSectionWritable(Adapter, eFlashSectionVal) == FALSE) { if (IsSectionWritable(Adapter, eFlashSectionVal) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Write signature"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Write signature");
return SECTOR_IS_NOT_WRITABLE; return SECTOR_IS_NOT_WRITABLE;
} }
...@@ -3886,9 +3886,9 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio ...@@ -3886,9 +3886,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"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Restoring the signature");
Adapter->bHeaderChangeAllowed = TRUE; Adapter->bHeaderChangeAllowed = TRUE;
Adapter->bSigCorrupted = FALSE; Adapter->bSigCorrupted = false;
BcmFlash2xBulkWrite(Adapter, &uiSignature, eFlashSectionVal, uiOffset, SIGNATURE_SIZE, TRUE); BcmFlash2xBulkWrite(Adapter, &uiSignature, eFlashSectionVal, uiOffset, SIGNATURE_SIZE, TRUE);
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
...@@ -3899,7 +3899,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio ...@@ -3899,7 +3899,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio
* @Adapater :- Bcm Driver Private Data Structure * @Adapater :- Bcm Driver Private Data Structure
* @psFlash2xReadWrite :-Flash2x Read/write structure pointer * @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) int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite)
...@@ -3912,7 +3912,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 ...@@ -3912,7 +3912,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2
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); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%x> does not exixt in Flash", psFlash2xReadWrite->Section);
return FALSE; return false;
} }
uiSectStartOffset = BcmGetSectionValStartOffset(Adapter, psFlash2xReadWrite->Section); uiSectStartOffset = BcmGetSectionValStartOffset(Adapter, psFlash2xReadWrite->Section);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Start offset :%x ,section :%d\n", uiSectStartOffset, psFlash2xReadWrite->Section); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Start offset :%x ,section :%d\n", uiSectStartOffset, psFlash2xReadWrite->Section);
...@@ -3949,7 +3949,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2 ...@@ -3949,7 +3949,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2
return TRUE; return TRUE;
else { else {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Invalid Request...."); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Invalid Request....");
return FALSE; return false;
} }
} }
...@@ -3966,7 +3966,7 @@ int IsFlash2x(struct bcm_mini_adapter *Adapter) ...@@ -3966,7 +3966,7 @@ int IsFlash2x(struct bcm_mini_adapter *Adapter)
if (Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER) if (Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER)
return TRUE; return TRUE;
else else
return FALSE; return false;
} }
/* /*
...@@ -3986,7 +3986,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter) ...@@ -3986,7 +3986,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter)
* For All Valid Flash Versions... except 1.1, take the value from FlashBaseAddr * For All Valid Flash Versions... except 1.1, take the value from FlashBaseAddr
* In case of Raw Read... use the default value * In case of Raw Read... use the default value
*/ */
if (Adapter->uiFlashLayoutMajorVersion && (Adapter->bFlashRawRead == FALSE) && if (Adapter->uiFlashLayoutMajorVersion && (Adapter->bFlashRawRead == false) &&
!((Adapter->uiFlashLayoutMajorVersion == 1) && (Adapter->uiFlashLayoutMinorVersion == 1))) !((Adapter->uiFlashLayoutMajorVersion == 1) && (Adapter->uiFlashLayoutMinorVersion == 1)))
uiBaseAddr = Adapter->uiFlashBaseAdd; uiBaseAddr = Adapter->uiFlashBaseAdd;
else else
...@@ -3996,7 +3996,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter) ...@@ -3996,7 +3996,7 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter)
* For All Valid Flash Versions... except 1.1, take the value from FlashBaseAddr * For All Valid Flash Versions... except 1.1, take the value from FlashBaseAddr
* In case of Raw Read... use the default value * In case of Raw Read... use the default value
*/ */
if (Adapter->uiFlashLayoutMajorVersion && (Adapter->bFlashRawRead == FALSE) && if (Adapter->uiFlashLayoutMajorVersion && (Adapter->bFlashRawRead == false) &&
!((Adapter->uiFlashLayoutMajorVersion == 1) && (Adapter->uiFlashLayoutMinorVersion == 1))) !((Adapter->uiFlashLayoutMajorVersion == 1) && (Adapter->uiFlashLayoutMinorVersion == 1)))
uiBaseAddr = Adapter->uiFlashBaseAdd | FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT; uiBaseAddr = Adapter->uiFlashBaseAdd | FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT;
else else
...@@ -4094,7 +4094,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, ...@@ -4094,7 +4094,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Read failed at offset :%d for NOB :%d", SrcSection, BytesToBeCopied); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Read failed at offset :%d for NOB :%d", SrcSection, BytesToBeCopied);
break; break;
} }
Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pBuff, DstSection, offset, BytesToBeCopied, FALSE); Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pBuff, DstSection, offset, BytesToBeCopied, false);
if (Status) { if (Status) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Write failed at offset :%d for NOB :%d", DstSection, BytesToBeCopied); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Write failed at offset :%d for NOB :%d", DstSection, BytesToBeCopied);
break; break;
...@@ -4110,7 +4110,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, ...@@ -4110,7 +4110,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter,
} while (numOfBytes > 0); } while (numOfBytes > 0);
kfree(pBuff); kfree(pBuff);
Adapter->bHeaderChangeAllowed = FALSE; Adapter->bHeaderChangeAllowed = false;
return Status; return Status;
} }
...@@ -4129,7 +4129,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter, ...@@ -4129,7 +4129,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter,
int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned int uiOffset) int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned int uiOffset)
{ {
unsigned int offsetToProtect = 0, HeaderSizeToProtect = 0; unsigned int offsetToProtect = 0, HeaderSizeToProtect = 0;
bool bHasHeader = FALSE; bool bHasHeader = false;
PUCHAR pTempBuff = NULL; PUCHAR pTempBuff = NULL;
unsigned int uiSectAlignAddr = 0; unsigned int uiSectAlignAddr = 0;
unsigned int sig = 0; unsigned int sig = 0;
...@@ -4153,7 +4153,7 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned ...@@ -4153,7 +4153,7 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned
bHasHeader = TRUE; bHasHeader = TRUE;
} }
/* If Header is present overwrite passed buffer with this */ /* If Header is present overwrite passed buffer with this */
if (bHasHeader && (Adapter->bHeaderChangeAllowed == FALSE)) { if (bHasHeader && (Adapter->bHeaderChangeAllowed == false)) {
pTempBuff = kzalloc(HeaderSizeToProtect, GFP_KERNEL); pTempBuff = kzalloc(HeaderSizeToProtect, GFP_KERNEL);
if (!pTempBuff) { if (!pTempBuff) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory allocation failed");
...@@ -4172,13 +4172,13 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned ...@@ -4172,13 +4172,13 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned
sig = ntohl(sig); sig = ntohl(sig);
if ((sig & 0xFF000000) != CORRUPTED_PATTERN) { if ((sig & 0xFF000000) != CORRUPTED_PATTERN) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Desired pattern is not at sig offset. Hence won't restore"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Desired pattern is not at sig offset. Hence won't restore");
Adapter->bSigCorrupted = FALSE; Adapter->bSigCorrupted = false;
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, " Corrupted sig is :%X", sig); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, " Corrupted sig is :%X", sig);
*((PUINT)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(struct bcm_dsd_header *, DSDImageMagicNumber))) = htonl(DSD_IMAGE_MAGIC_NUMBER); *((PUINT)(pBuff + offsetToProtect + FIELD_OFFSET_IN_HEADER(struct bcm_dsd_header *, DSDImageMagicNumber))) = htonl(DSD_IMAGE_MAGIC_NUMBER);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Restoring the signature in Header Write only"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "Restoring the signature in Header Write only");
Adapter->bSigCorrupted = FALSE; Adapter->bSigCorrupted = false;
} }
return STATUS_SUCCESS; return STATUS_SUCCESS;
...@@ -4471,17 +4471,17 @@ int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, ...@@ -4471,17 +4471,17 @@ int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter,
bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section) bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section)
{ {
bool SectionPresent = FALSE; bool SectionPresent = false;
switch (section) { switch (section) {
case ISO_IMAGE1: case ISO_IMAGE1:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectionPresent = TRUE; SectionPresent = TRUE;
break; break;
case ISO_IMAGE2: case ISO_IMAGE2:
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) && if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) &&
(IsNonCDLessDevice(Adapter) == FALSE)) (IsNonCDLessDevice(Adapter) == false))
SectionPresent = TRUE; SectionPresent = TRUE;
break; break;
case DSD0: case DSD0:
...@@ -4518,7 +4518,7 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se ...@@ -4518,7 +4518,7 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se
break; break;
default: default:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section Does not exist in Flash 2.x"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section Does not exist in Flash 2.x");
SectionPresent = FALSE; SectionPresent = false;
} }
return SectionPresent; return SectionPresent;
...@@ -4527,17 +4527,17 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se ...@@ -4527,17 +4527,17 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se
int IsSectionWritable(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val Section) int IsSectionWritable(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val Section)
{ {
int offset = STATUS_FAILURE; int offset = STATUS_FAILURE;
int Status = FALSE; int Status = false;
if (IsSectionExistInFlash(Adapter, Section) == FALSE) { if (IsSectionExistInFlash(Adapter, Section) == false) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section <%d> does not exixt", Section); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section <%d> does not exixt", Section);
return FALSE; return false;
} }
offset = BcmGetSectionValStartOffset(Adapter, Section); offset = BcmGetSectionValStartOffset(Adapter, Section);
if (offset == INVALID_OFFSET) { if (offset == INVALID_OFFSET) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%d> does not exixt", Section); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%d> does not exixt", Section);
return FALSE; return false;
} }
if (IsSectionExistInVendorInfo(Adapter, Section)) if (IsSectionExistInVendorInfo(Adapter, Section))
...@@ -4555,8 +4555,8 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect ...@@ -4555,8 +4555,8 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect
unsigned int BlockStatus = 0; unsigned int BlockStatus = 0;
unsigned int uiSectAlignAddr = 0; unsigned int uiSectAlignAddr = 0;
Adapter->bSigCorrupted = FALSE; Adapter->bSigCorrupted = false;
if (Adapter->bAllDSDWriteAllow == 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"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Corrupt signature");
return SECTOR_IS_NOT_WRITABLE; return SECTOR_IS_NOT_WRITABLE;
...@@ -4615,7 +4615,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect ...@@ -4615,7 +4615,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect
unsigned int sig = 0; unsigned int sig = 0;
unsigned int uiOffset = 0; unsigned int uiOffset = 0;
Adapter->bSigCorrupted = FALSE; 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"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Corrupt signature");
...@@ -4661,5 +4661,5 @@ bool IsNonCDLessDevice(struct bcm_mini_adapter *Adapter) ...@@ -4661,5 +4661,5 @@ bool IsNonCDLessDevice(struct bcm_mini_adapter *Adapter)
if (Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG) if (Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG)
return TRUE; return TRUE;
else else
return FALSE; return false;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment