|
@@ -1084,11 +1084,11 @@ static int BeceemFlashBulkWrite(struct bcm_mini_adapter *Adapter,
|
|
|
* for DSD calibration, allow it without checking of sector permission
|
|
|
*/
|
|
|
|
|
|
- if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == FALSE)) {
|
|
|
+ if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == false)) {
|
|
|
index = 0;
|
|
|
uiTemp = uiNumSectTobeRead;
|
|
|
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",
|
|
|
(uiOffsetFromSectStart + index * Adapter->uiSectorSize));
|
|
|
Status = SECTOR_IS_NOT_WRITABLE;
|
|
@@ -1265,11 +1265,11 @@ static int BeceemFlashBulkWriteStatus(struct bcm_mini_adapter *Adapter,
|
|
|
uiNumSectTobeRead++;
|
|
|
}
|
|
|
|
|
|
- if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == FALSE)) {
|
|
|
+ if (IsFlash2x(Adapter) && (Adapter->bAllDSDWriteAllow == false)) {
|
|
|
index = 0;
|
|
|
uiTemp = uiNumSectTobeRead;
|
|
|
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",
|
|
|
(uiOffsetFromSectStart + index * Adapter->uiSectorSize));
|
|
|
Status = SECTOR_IS_NOT_WRITABLE;
|
|
@@ -1525,7 +1525,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter,
|
|
|
|
|
|
if (memcmp(&pBuffer[uiIndex], &auiData[0], MAX_RW_SIZE)) {
|
|
|
/* re-write */
|
|
|
- BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, MAX_RW_SIZE, FALSE);
|
|
|
+ BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, MAX_RW_SIZE, false);
|
|
|
mdelay(3);
|
|
|
BeceemEEPROMBulkRead(Adapter, &auiData[0], uiOffset, MAX_RW_SIZE);
|
|
|
|
|
@@ -1539,7 +1539,7 @@ static int BeceemEEPROMReadBackandVerify(struct bcm_mini_adapter *Adapter,
|
|
|
BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4);
|
|
|
if (uiData != pBuffer[uiIndex]) {
|
|
|
/* re-write */
|
|
|
- BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, 4, FALSE);
|
|
|
+ BeceemEEPROMBulkWrite(Adapter, (PUCHAR)(pBuffer + uiIndex), uiOffset, 4, false);
|
|
|
mdelay(3);
|
|
|
BeceemEEPROMBulkRead(Adapter, &uiData, uiOffset, 4);
|
|
|
if (uiData != pBuffer[uiIndex])
|
|
@@ -1819,7 +1819,7 @@ int BeceemNVMRead(struct bcm_mini_adapter *Adapter,
|
|
|
#endif
|
|
|
|
|
|
if (Adapter->eNVMType == NVM_FLASH) {
|
|
|
- if (Adapter->bFlashRawRead == FALSE) {
|
|
|
+ if (Adapter->bFlashRawRead == false) {
|
|
|
if (IsSectionExistInVendorInfo(Adapter, Adapter->eActiveDSD))
|
|
|
return vendorextnReadSection(Adapter, (PUCHAR)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes);
|
|
|
|
|
@@ -2425,7 +2425,7 @@ static VOID UpdateVendorInfo(struct bcm_mini_adapter *Adapter)
|
|
|
B_UINT32 i = 0;
|
|
|
unsigned int uiSizeSection = 0;
|
|
|
|
|
|
- Adapter->uiVendorExtnFlag = FALSE;
|
|
|
+ Adapter->uiVendorExtnFlag = false;
|
|
|
|
|
|
for (i = 0; i < TOTAL_SECTIONS; i++)
|
|
|
Adapter->psFlash2xVendorInfo->VendorSection[i].OffsetFromZeroForSectionStart = UNINIT_PTR_IN_CS;
|
|
@@ -2685,12 +2685,12 @@ int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash
|
|
|
switch (eFlashSectionVal) {
|
|
|
case ISO_IMAGE1:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start);
|
|
|
break;
|
|
|
case ISO_IMAGE2:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectStartOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start);
|
|
|
break;
|
|
|
case DSD0:
|
|
@@ -2770,12 +2770,12 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x
|
|
|
switch (eFlash2xSectionVal) {
|
|
|
case ISO_IMAGE1:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage1Part1End);
|
|
|
break;
|
|
|
case ISO_IMAGE2:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectEndOffset = (Adapter->psFlash2xCSInfo->OffsetISOImage2Part1End);
|
|
|
break;
|
|
|
case DSD0:
|
|
@@ -3037,7 +3037,7 @@ static int BcmGetActiveISO(struct bcm_mini_adapter *Adapter)
|
|
|
*
|
|
|
* Return Value:-
|
|
|
* 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
|
|
|
if (permissionBits == SECTOR_READWRITE_PERMISSION)
|
|
|
return TRUE;
|
|
|
else
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMap)
|
|
@@ -3105,13 +3105,13 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
struct bcm_flash2x_cs_info *psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
|
|
|
enum bcm_flash2x_section_val uiHighestPriDSD = 0;
|
|
|
enum bcm_flash2x_section_val uiHighestPriISO = 0;
|
|
|
- bool SetActiveDSDDone = FALSE;
|
|
|
- bool SetActiveISODone = FALSE;
|
|
|
+ bool SetActiveDSDDone = false;
|
|
|
+ bool SetActiveISODone = false;
|
|
|
|
|
|
/* 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.
|
|
|
*/
|
|
|
- if (IsFlash2x(Adapter) == FALSE) {
|
|
|
+ if (IsFlash2x(Adapter) == false) {
|
|
|
psFlash2xBitMap->ISO_IMAGE2 = 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) */
|
|
@@ -3143,10 +3143,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Calculation for extrating the Access permission */
|
|
|
- if (IsSectionWritable(Adapter, ISO_IMAGE2) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, ISO_IMAGE2) == false)
|
|
|
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
- if (SetActiveISODone == FALSE && uiHighestPriISO == ISO_IMAGE2) {
|
|
|
+ if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE2) {
|
|
|
psFlash2xBitMap->ISO_IMAGE2 |= FLASH2X_SECTION_ACT;
|
|
|
SetActiveISODone = TRUE;
|
|
|
}
|
|
@@ -3163,10 +3163,10 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Calculation for extrating the Access permission */
|
|
|
- if (IsSectionWritable(Adapter, ISO_IMAGE1) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, ISO_IMAGE1) == false)
|
|
|
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
- if (SetActiveISODone == FALSE && uiHighestPriISO == ISO_IMAGE1) {
|
|
|
+ if (SetActiveISODone == false && uiHighestPriISO == ISO_IMAGE1) {
|
|
|
psFlash2xBitMap->ISO_IMAGE1 |= FLASH2X_SECTION_ACT;
|
|
|
SetActiveISODone = TRUE;
|
|
|
}
|
|
@@ -3183,11 +3183,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Calculation for extrating the Access permission */
|
|
|
- if (IsSectionWritable(Adapter, DSD2) == FALSE) {
|
|
|
+ if (IsSectionWritable(Adapter, DSD2) == false) {
|
|
|
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_RO;
|
|
|
} else {
|
|
|
/* Means section is writable */
|
|
|
- if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD2)) {
|
|
|
+ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD2)) {
|
|
|
psFlash2xBitMap->DSD2 |= FLASH2X_SECTION_ACT;
|
|
|
SetActiveDSDDone = TRUE;
|
|
|
}
|
|
@@ -3205,11 +3205,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Calculation for extrating the Access permission */
|
|
|
- if (IsSectionWritable(Adapter, DSD1) == FALSE) {
|
|
|
+ if (IsSectionWritable(Adapter, DSD1) == false) {
|
|
|
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_RO;
|
|
|
} else {
|
|
|
/* Means section is writable */
|
|
|
- if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD1)) {
|
|
|
+ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD1)) {
|
|
|
psFlash2xBitMap->DSD1 |= FLASH2X_SECTION_ACT;
|
|
|
SetActiveDSDDone = TRUE;
|
|
|
}
|
|
@@ -3227,11 +3227,11 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Setting Access permission */
|
|
|
- if (IsSectionWritable(Adapter, DSD0) == FALSE) {
|
|
|
+ if (IsSectionWritable(Adapter, DSD0) == false) {
|
|
|
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_RO;
|
|
|
} else {
|
|
|
/* Means section is writable */
|
|
|
- if ((SetActiveDSDDone == FALSE) && (uiHighestPriDSD == DSD0)) {
|
|
|
+ if ((SetActiveDSDDone == false) && (uiHighestPriDSD == DSD0)) {
|
|
|
psFlash2xBitMap->DSD0 |= FLASH2X_SECTION_ACT;
|
|
|
SetActiveDSDDone = TRUE;
|
|
|
}
|
|
@@ -3249,7 +3249,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Calculation for extrating the Access permission */
|
|
|
- if (IsSectionWritable(Adapter, VSA0) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, VSA0) == false)
|
|
|
psFlash2xBitMap->VSA0 |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
/* By Default section is Active */
|
|
@@ -3267,7 +3267,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Checking For Access permission */
|
|
|
- if (IsSectionWritable(Adapter, VSA1) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, VSA1) == false)
|
|
|
psFlash2xBitMap->VSA1 |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
/* By Default section is Active */
|
|
@@ -3285,7 +3285,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Checking For Access permission */
|
|
|
- if (IsSectionWritable(Adapter, VSA2) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, VSA2) == false)
|
|
|
psFlash2xBitMap->VSA2 |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
/* By Default section is Active */
|
|
@@ -3303,7 +3303,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->SCSI |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Checking For Access permission */
|
|
|
- if (IsSectionWritable(Adapter, SCSI) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, SCSI) == false)
|
|
|
psFlash2xBitMap->SCSI |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
/* By Default section is Active */
|
|
@@ -3321,7 +3321,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
|
|
|
psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_VALID;
|
|
|
|
|
|
/* Checking For Access permission */
|
|
|
- if (IsSectionWritable(Adapter, CONTROL_SECTION) == FALSE)
|
|
|
+ if (IsSectionWritable(Adapter, CONTROL_SECTION) == false)
|
|
|
psFlash2xBitMap->CONTROL_SECTION |= FLASH2X_SECTION_RO;
|
|
|
|
|
|
/* By Default section is Active */
|
|
@@ -3517,7 +3517,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- Adapter->bHeaderChangeAllowed = FALSE;
|
|
|
+ Adapter->bHeaderChangeAllowed = false;
|
|
|
return Status;
|
|
|
}
|
|
|
|
|
@@ -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;
|
|
|
unsigned int uiReadOffsetWithinPart = 0, uiWriteOffsetWithinPart = 0;
|
|
|
unsigned int uiTotalDataToCopy = 0;
|
|
|
- bool IsThisHeaderSector = FALSE;
|
|
|
+ bool IsThisHeaderSector = false;
|
|
|
unsigned int sigOffset = 0;
|
|
|
unsigned int ISOLength = 0;
|
|
|
unsigned int Status = STATUS_SUCCESS;
|
|
@@ -3669,14 +3669,14 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- Adapter->bHeaderChangeAllowed = FALSE;
|
|
|
+ Adapter->bHeaderChangeAllowed = false;
|
|
|
if (IsThisHeaderSector == TRUE) {
|
|
|
WriteToFlashWithoutSectorErase(Adapter,
|
|
|
SigBuff,
|
|
|
eISOWritePart,
|
|
|
sigOffset,
|
|
|
MAX_RW_SIZE);
|
|
|
- IsThisHeaderSector = FALSE;
|
|
|
+ IsThisHeaderSector = false;
|
|
|
}
|
|
|
/* subtracting the written Data */
|
|
|
uiTotalDataToCopy = uiTotalDataToCopy - Adapter->uiSectorSize;
|
|
@@ -3782,7 +3782,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- Adapter->bHeaderChangeAllowed = FALSE;
|
|
|
+ Adapter->bHeaderChangeAllowed = false;
|
|
|
if (IsThisHeaderSector == TRUE) {
|
|
|
WriteToFlashWithoutSectorErase(Adapter,
|
|
|
SigBuff,
|
|
@@ -3790,7 +3790,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
|
|
|
sigOffset,
|
|
|
MAX_RW_SIZE);
|
|
|
|
|
|
- IsThisHeaderSector = FALSE;
|
|
|
+ IsThisHeaderSector = false;
|
|
|
}
|
|
|
|
|
|
/* subtracting the written Data */
|
|
@@ -3848,13 +3848,13 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio
|
|
|
unsigned int uiOffset = 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");
|
|
|
return STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
|
- if (Adapter->bAllDSDWriteAllow == FALSE) {
|
|
|
- if (IsSectionWritable(Adapter, eFlashSectionVal) == FALSE) {
|
|
|
+ if (Adapter->bAllDSDWriteAllow == false) {
|
|
|
+ if (IsSectionWritable(Adapter, eFlashSectionVal) == false) {
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Write signature");
|
|
|
return SECTOR_IS_NOT_WRITABLE;
|
|
|
}
|
|
@@ -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");
|
|
|
|
|
|
Adapter->bHeaderChangeAllowed = TRUE;
|
|
|
- Adapter->bSigCorrupted = FALSE;
|
|
|
+ Adapter->bSigCorrupted = false;
|
|
|
BcmFlash2xBulkWrite(Adapter, &uiSignature, eFlashSectionVal, uiOffset, SIGNATURE_SIZE, TRUE);
|
|
|
- Adapter->bHeaderChangeAllowed = FALSE;
|
|
|
+ Adapter->bHeaderChangeAllowed = false;
|
|
|
|
|
|
return STATUS_SUCCESS;
|
|
|
}
|
|
@@ -3899,7 +3899,7 @@ int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sectio
|
|
|
* @Adapater :- Bcm Driver Private Data Structure
|
|
|
* @psFlash2xReadWrite :-Flash2x Read/write structure pointer
|
|
|
*
|
|
|
- * Return values:-Return TRUE is request is valid else FALSE.
|
|
|
+ * Return values:-Return TRUE is request is valid else false.
|
|
|
*/
|
|
|
|
|
|
int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite)
|
|
@@ -3912,7 +3912,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2
|
|
|
|
|
|
if (IsSectionExistInFlash(Adapter, psFlash2xReadWrite->Section) != TRUE) {
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%x> does not exixt in Flash", psFlash2xReadWrite->Section);
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|
|
|
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);
|
|
@@ -3949,7 +3949,7 @@ int validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2
|
|
|
return TRUE;
|
|
|
else {
|
|
|
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)
|
|
|
if (Adapter->uiFlashLayoutMajorVersion >= FLASH_2X_MAJOR_NUMBER)
|
|
|
return TRUE;
|
|
|
else
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -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
|
|
|
* 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)))
|
|
|
uiBaseAddr = Adapter->uiFlashBaseAdd;
|
|
|
else
|
|
@@ -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
|
|
|
* 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)))
|
|
|
uiBaseAddr = Adapter->uiFlashBaseAdd | FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT;
|
|
|
else
|
|
@@ -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);
|
|
|
break;
|
|
|
}
|
|
|
- Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pBuff, DstSection, offset, BytesToBeCopied, FALSE);
|
|
|
+ Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pBuff, DstSection, offset, BytesToBeCopied, false);
|
|
|
if (Status) {
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Write failed at offset :%d for NOB :%d", DstSection, BytesToBeCopied);
|
|
|
break;
|
|
@@ -4110,7 +4110,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter,
|
|
|
} while (numOfBytes > 0);
|
|
|
|
|
|
kfree(pBuff);
|
|
|
- Adapter->bHeaderChangeAllowed = FALSE;
|
|
|
+ Adapter->bHeaderChangeAllowed = false;
|
|
|
|
|
|
return Status;
|
|
|
}
|
|
@@ -4129,7 +4129,7 @@ int BcmCopySection(struct bcm_mini_adapter *Adapter,
|
|
|
int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned int uiOffset)
|
|
|
{
|
|
|
unsigned int offsetToProtect = 0, HeaderSizeToProtect = 0;
|
|
|
- bool bHasHeader = FALSE;
|
|
|
+ bool bHasHeader = false;
|
|
|
PUCHAR pTempBuff = NULL;
|
|
|
unsigned int uiSectAlignAddr = 0;
|
|
|
unsigned int sig = 0;
|
|
@@ -4153,7 +4153,7 @@ int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned
|
|
|
bHasHeader = TRUE;
|
|
|
}
|
|
|
/* If Header is present overwrite passed buffer with this */
|
|
|
- if (bHasHeader && (Adapter->bHeaderChangeAllowed == FALSE)) {
|
|
|
+ if (bHasHeader && (Adapter->bHeaderChangeAllowed == false)) {
|
|
|
pTempBuff = kzalloc(HeaderSizeToProtect, GFP_KERNEL);
|
|
|
if (!pTempBuff) {
|
|
|
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
|
|
|
sig = ntohl(sig);
|
|
|
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");
|
|
|
- Adapter->bSigCorrupted = FALSE;
|
|
|
+ Adapter->bSigCorrupted = false;
|
|
|
return STATUS_SUCCESS;
|
|
|
}
|
|
|
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);
|
|
|
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;
|
|
@@ -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 SectionPresent = FALSE;
|
|
|
+ bool SectionPresent = false;
|
|
|
|
|
|
switch (section) {
|
|
|
case ISO_IMAGE1:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage1Part1Start != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectionPresent = TRUE;
|
|
|
break;
|
|
|
case ISO_IMAGE2:
|
|
|
if ((Adapter->psFlash2xCSInfo->OffsetISOImage2Part1Start != UNINIT_PTR_IN_CS) &&
|
|
|
- (IsNonCDLessDevice(Adapter) == FALSE))
|
|
|
+ (IsNonCDLessDevice(Adapter) == false))
|
|
|
SectionPresent = TRUE;
|
|
|
break;
|
|
|
case DSD0:
|
|
@@ -4518,7 +4518,7 @@ bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_se
|
|
|
break;
|
|
|
default:
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section Does not exist in Flash 2.x");
|
|
|
- SectionPresent = FALSE;
|
|
|
+ SectionPresent = false;
|
|
|
}
|
|
|
|
|
|
return SectionPresent;
|
|
@@ -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 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);
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
offset = BcmGetSectionValStartOffset(Adapter, Section);
|
|
|
if (offset == INVALID_OFFSET) {
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section<%d> does not exixt", Section);
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
if (IsSectionExistInVendorInfo(Adapter, Section))
|
|
@@ -4555,8 +4555,8 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect
|
|
|
unsigned int BlockStatus = 0;
|
|
|
unsigned int uiSectAlignAddr = 0;
|
|
|
|
|
|
- Adapter->bSigCorrupted = FALSE;
|
|
|
- if (Adapter->bAllDSDWriteAllow == FALSE) {
|
|
|
+ Adapter->bSigCorrupted = false;
|
|
|
+ if (Adapter->bAllDSDWriteAllow == false) {
|
|
|
if (IsSectionWritable(Adapter, eFlash2xSectionVal) != TRUE) {
|
|
|
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Section is not Writable...Hence can't Corrupt signature");
|
|
|
return SECTOR_IS_NOT_WRITABLE;
|
|
@@ -4615,7 +4615,7 @@ static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_sect
|
|
|
unsigned int sig = 0;
|
|
|
unsigned int uiOffset = 0;
|
|
|
|
|
|
- Adapter->bSigCorrupted = FALSE;
|
|
|
+ Adapter->bSigCorrupted = false;
|
|
|
|
|
|
if (IsSectionWritable(Adapter, eFlash2xSectionVal) != TRUE) {
|
|
|
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)
|
|
|
if (Adapter->psFlash2xCSInfo->IsCDLessDeviceBootSig == NON_CDLESS_DEVICE_BOOT_SIG)
|
|
|
return TRUE;
|
|
|
else
|
|
|
- return FALSE;
|
|
|
+ return false;
|
|
|
}
|