Commit ff4e065d authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Remove typedef for _FLASH2X_SECTION_VAL and reference directly.

This patch removes typedef for _FLASH2X_SECTION_VAL,
and changes the name of the enum to bcm_flash2x_section_val.
In addition, any calls to typedefs FLASH2X_SECTION_VAL
are changed to reference the enum directly.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0becebb1
...@@ -371,8 +371,8 @@ struct bcm_mini_adapter { ...@@ -371,8 +371,8 @@ struct bcm_mini_adapter {
PFLASH2X_VENDORSPECIFIC_INFO psFlash2xVendorInfo; PFLASH2X_VENDORSPECIFIC_INFO psFlash2xVendorInfo;
UINT uiFlashBaseAdd; /* Flash start address */ UINT uiFlashBaseAdd; /* Flash start address */
UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */ UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */
FLASH2X_SECTION_VAL eActiveISO; /* Active ISO section val */ enum bcm_flash2x_section_val eActiveISO; /* Active ISO section val */
FLASH2X_SECTION_VAL eActiveDSD; /* Active DSD val chosen before f/w download */ enum bcm_flash2x_section_val eActiveDSD; /* Active DSD val chosen before f/w download */
UINT uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */ UINT uiActiveDSDOffsetAtFwDld; /* For accessing Active DSD chosen before f/w download */
UINT uiFlashLayoutMajorVersion; UINT uiFlashLayoutMajorVersion;
UINT uiFlashLayoutMinorVersion; UINT uiFlashLayoutMinorVersion;
......
...@@ -1644,7 +1644,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1644,7 +1644,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
break; break;
case IOCTL_BCM_SET_ACTIVE_SECTION: { case IOCTL_BCM_SET_ACTIVE_SECTION: {
FLASH2X_SECTION_VAL eFlash2xSectionVal = 0; enum bcm_flash2x_section_val eFlash2xSectionVal = 0;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SET_ACTIVE_SECTION Called"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SET_ACTIVE_SECTION Called");
if (IsFlash2x(Adapter) != TRUE) { if (IsFlash2x(Adapter) != TRUE) {
...@@ -1799,7 +1799,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1799,7 +1799,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
case IOCTL_BCM_SELECT_DSD: { case IOCTL_BCM_SELECT_DSD: {
UINT SectOfset = 0; UINT SectOfset = 0;
FLASH2X_SECTION_VAL eFlash2xSectionVal; enum bcm_flash2x_section_val eFlash2xSectionVal;
eFlash2xSectionVal = NO_SECTION_VAL; eFlash2xSectionVal = NO_SECTION_VAL;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SELECT_DSD Called"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_SELECT_DSD Called");
......
...@@ -129,7 +129,7 @@ struct bcm_bulk_wrm_buffer { ...@@ -129,7 +129,7 @@ struct bcm_bulk_wrm_buffer {
unsigned long Values[1]; unsigned long Values[1];
}; };
typedef enum _FLASH2X_SECTION_VAL { enum bcm_flash2x_section_val {
NO_SECTION_VAL = 0, /* no section is chosen when absolute offset is given for RD/WR */ NO_SECTION_VAL = 0, /* no section is chosen when absolute offset is given for RD/WR */
ISO_IMAGE1, ISO_IMAGE1,
ISO_IMAGE2, ISO_IMAGE2,
...@@ -146,13 +146,13 @@ typedef enum _FLASH2X_SECTION_VAL { ...@@ -146,13 +146,13 @@ typedef enum _FLASH2X_SECTION_VAL {
ISO_IMAGE2_PART2, ISO_IMAGE2_PART2,
ISO_IMAGE2_PART3, ISO_IMAGE2_PART3,
TOTAL_SECTIONS TOTAL_SECTIONS
} FLASH2X_SECTION_VAL; };
/* /*
* Structure used for READ/WRITE Flash Map2.x * Structure used for READ/WRITE Flash Map2.x
*/ */
struct bcm_flash2x_readwrite { struct bcm_flash2x_readwrite {
FLASH2X_SECTION_VAL Section; /* which section has to be read/written */ enum bcm_flash2x_section_val Section; /* which section has to be read/written */
u32 offset; /* Offset within Section. */ u32 offset; /* Offset within Section. */
u32 numOfBytes; /* NOB from the offset */ u32 numOfBytes; /* NOB from the offset */
u32 bVerify; u32 bVerify;
...@@ -167,8 +167,8 @@ struct bcm_flash2x_readwrite { ...@@ -167,8 +167,8 @@ struct bcm_flash2x_readwrite {
*/ */
struct bcm_flash2x_copy_section { struct bcm_flash2x_copy_section {
FLASH2X_SECTION_VAL SrcSection; enum bcm_flash2x_section_val SrcSection;
FLASH2X_SECTION_VAL DstSection; enum bcm_flash2x_section_val DstSection;
u32 offset; u32 offset;
u32 numOfBytes; u32 numOfBytes;
}; };
......
...@@ -161,14 +161,14 @@ INT BeceemNVMWrite( ...@@ -161,14 +161,14 @@ INT BeceemNVMWrite(
INT BcmInitNVM(struct bcm_mini_adapter *Adapter); INT BcmInitNVM(struct bcm_mini_adapter *Adapter);
INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize); INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize);
BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section); BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section);
INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap); INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap);
INT BcmFlash2xBulkWrite( INT BcmFlash2xBulkWrite(
struct bcm_mini_adapter *Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlashSectionVal, enum bcm_flash2x_section_val eFlashSectionVal,
UINT uiOffset, UINT uiOffset,
UINT uiNumBytes, UINT uiNumBytes,
UINT bVerify); UINT bVerify);
...@@ -176,24 +176,24 @@ INT BcmFlash2xBulkWrite( ...@@ -176,24 +176,24 @@ INT BcmFlash2xBulkWrite(
INT BcmFlash2xBulkRead( INT BcmFlash2xBulkRead(
struct bcm_mini_adapter *Adapter, struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlashSectionVal, enum bcm_flash2x_section_val eFlashSectionVal,
UINT uiOffsetWithinSectionVal, UINT uiOffsetWithinSectionVal,
UINT uiNumBytes); UINT uiNumBytes);
INT BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); INT BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal);
INT BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal); INT BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectVal);
INT BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter); INT BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
INT BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter); INT BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
INT BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section sCopySectStrut); INT BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section sCopySectStrut);
INT BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); INT BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal);
INT BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal); INT BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal);
INT validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite); INT validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite);
INT IsFlash2x(struct bcm_mini_adapter *Adapter); INT IsFlash2x(struct bcm_mini_adapter *Adapter);
INT BcmCopySection(struct bcm_mini_adapter *Adapter, INT BcmCopySection(struct bcm_mini_adapter *Adapter,
FLASH2X_SECTION_VAL SrcSection, enum bcm_flash2x_section_val SrcSection,
FLASH2X_SECTION_VAL DstSection, enum bcm_flash2x_section_val DstSection,
UINT offset, UINT offset,
UINT numOfBytes); UINT numOfBytes);
......
...@@ -14,25 +14,25 @@ static int BcmGetNvmSize(struct bcm_mini_adapter *Adapter); ...@@ -14,25 +14,25 @@ static int BcmGetNvmSize(struct bcm_mini_adapter *Adapter);
static unsigned int BcmGetFlashSize(struct bcm_mini_adapter *Adapter); static unsigned int BcmGetFlashSize(struct bcm_mini_adapter *Adapter);
static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter); static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter);
static int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal);
static B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset); static B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset);
static int IsSectionWritable(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL Section); static int IsSectionWritable(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val Section);
static int IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section); static int IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section);
static int ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd); static int ReadDSDPriority(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val dsd);
static int ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd); static int ReadDSDSignature(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val dsd);
static int ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso); static int ReadISOPriority(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val iso);
static int ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso); static int ReadISOSignature(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val iso);
static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal);
static int CorruptISOSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal); static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal);
static int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned int uiSectAlignAddr); static int SaveHeaderIfPresent(struct bcm_mini_adapter *Adapter, PUCHAR pBuff, unsigned int uiSectAlignAddr);
static int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, PUINT pBuff, static int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, PUINT pBuff,
FLASH2X_SECTION_VAL eFlash2xSectionVal, enum bcm_flash2x_section_val eFlash2xSectionVal,
unsigned int uiOffset, unsigned int uiNumBytes); unsigned int uiOffset, unsigned int uiNumBytes);
static FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter); static enum bcm_flash2x_section_val getHighestPriDSD(struct bcm_mini_adapter *Adapter);
static FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter); static enum bcm_flash2x_section_val getHighestPriISO(struct bcm_mini_adapter *Adapter);
static int BeceemFlashBulkRead( static int BeceemFlashBulkRead(
struct bcm_mini_adapter *Adapter, struct bcm_mini_adapter *Adapter,
...@@ -2413,7 +2413,7 @@ static int ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) ...@@ -2413,7 +2413,7 @@ static int ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo)
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static int IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section) static int IsSectionExistInVendorInfo(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section)
{ {
return (Adapter->uiVendorExtnFlag && return (Adapter->uiVendorExtnFlag &&
(Adapter->psFlash2xVendorInfo->VendorSection[section].AccessFlags & FLASH2X_SECTION_PRESENT) && (Adapter->psFlash2xVendorInfo->VendorSection[section].AccessFlags & FLASH2X_SECTION_PRESENT) &&
...@@ -2660,14 +2660,14 @@ static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter) ...@@ -2660,14 +2660,14 @@ static NVM_TYPE BcmGetNvmType(struct bcm_mini_adapter *Adapter)
/* /*
* BcmGetSectionValStartOffset - this will calculate the section's starting offset if section val is given * BcmGetSectionValStartOffset - this will calculate the section's starting offset if section val is given
* @Adapter : Drivers Private Data structure * @Adapter : Drivers Private Data structure
* @eFlashSectionVal : Flash secion value defined in enum FLASH2X_SECTION_VAL * @eFlashSectionVal : Flash secion value defined in enum bcm_flash2x_section_val
* *
* Return value:- * Return value:-
* On success it return the start offset of the provided section val * On success it return the start offset of the provided section val
* On Failure -returns STATUS_FAILURE * On Failure -returns STATUS_FAILURE
*/ */
int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal)
{ {
/* /*
* Considering all the section for which end offset can be calculated or directly given * Considering all the section for which end offset can be calculated or directly given
...@@ -2752,14 +2752,14 @@ int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTIO ...@@ -2752,14 +2752,14 @@ int BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTIO
/* /*
* BcmGetSectionValEndOffset - this will calculate the section's Ending offset if section val is given * BcmGetSectionValEndOffset - this will calculate the section's Ending offset if section val is given
* @Adapter : Drivers Private Data structure * @Adapter : Drivers Private Data structure
* @eFlashSectionVal : Flash secion value defined in enum FLASH2X_SECTION_VAL * @eFlashSectionVal : Flash secion value defined in enum bcm_flash2x_section_val
* *
* Return value:- * Return value:-
* On success it return the end offset of the provided section val * On success it return the end offset of the provided section val
* On Failure -returns STATUS_FAILURE * On Failure -returns STATUS_FAILURE
*/ */
int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal)
{ {
int SectEndOffset = 0; int SectEndOffset = 0;
...@@ -2837,7 +2837,7 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_ ...@@ -2837,7 +2837,7 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_
* BcmFlash2xBulkRead:- Read API for Flash Map 2.x . * BcmFlash2xBulkRead:- Read API for Flash Map 2.x .
* @Adapter :Driver Private Data Structure * @Adapter :Driver Private Data Structure
* @pBuffer : Buffer where data has to be put after reading * @pBuffer : Buffer where data has to be put after reading
* @eFlashSectionVal :Flash Section Val defined in FLASH2X_SECTION_VAL * @eFlashSectionVal :Flash Section Val defined in enum bcm_flash2x_section_val
* @uiOffsetWithinSectionVal :- Offset with in provided section * @uiOffsetWithinSectionVal :- Offset with in provided section
* @uiNumBytes : Number of Bytes for Read * @uiNumBytes : Number of Bytes for Read
* *
...@@ -2847,7 +2847,7 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_ ...@@ -2847,7 +2847,7 @@ int BcmGetSectionValEndOffset(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_
int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter, int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlash2xSectionVal, enum bcm_flash2x_section_val eFlash2xSectionVal,
unsigned int uiOffsetWithinSectionVal, unsigned int uiOffsetWithinSectionVal,
unsigned int uiNumBytes) unsigned int uiNumBytes)
{ {
...@@ -2898,7 +2898,7 @@ int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter, ...@@ -2898,7 +2898,7 @@ int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter,
* BcmFlash2xBulkWrite :-API for Writing on the Flash Map 2.x. * BcmFlash2xBulkWrite :-API for Writing on the Flash Map 2.x.
* @Adapter :Driver Private Data Structure * @Adapter :Driver Private Data Structure
* @pBuffer : Buffer From where data has to taken for writing * @pBuffer : Buffer From where data has to taken for writing
* @eFlashSectionVal :Flash Section Val defined in FLASH2X_SECTION_VAL * @eFlashSectionVal :Flash Section Val defined in enum bcm_flash2x_section_val
* @uiOffsetWithinSectionVal :- Offset with in provided section * @uiOffsetWithinSectionVal :- Offset with in provided section
* @uiNumBytes : Number of Bytes for Write * @uiNumBytes : Number of Bytes for Write
* *
...@@ -2909,7 +2909,7 @@ int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter, ...@@ -2909,7 +2909,7 @@ int BcmFlash2xBulkRead(struct bcm_mini_adapter *Adapter,
int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter, int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter,
PUINT pBuffer, PUINT pBuffer,
FLASH2X_SECTION_VAL eFlash2xSectVal, enum bcm_flash2x_section_val eFlash2xSectVal,
unsigned int uiOffset, unsigned int uiOffset,
unsigned int uiNumBytes, unsigned int uiNumBytes,
unsigned int bVerify) unsigned int bVerify)
...@@ -2971,7 +2971,7 @@ int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter, ...@@ -2971,7 +2971,7 @@ int BcmFlash2xBulkWrite(struct bcm_mini_adapter *Adapter,
static int BcmGetActiveDSD(struct bcm_mini_adapter *Adapter) static int BcmGetActiveDSD(struct bcm_mini_adapter *Adapter)
{ {
FLASH2X_SECTION_VAL uiHighestPriDSD = 0; enum bcm_flash2x_section_val uiHighestPriDSD = 0;
uiHighestPriDSD = getHighestPriDSD(Adapter); uiHighestPriDSD = getHighestPriDSD(Adapter);
Adapter->eActiveDSD = uiHighestPriDSD; Adapter->eActiveDSD = uiHighestPriDSD;
...@@ -3102,8 +3102,8 @@ static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMa ...@@ -3102,8 +3102,8 @@ static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMa
int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap) int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap)
{ {
PFLASH2X_CS_INFO psFlash2xCSInfo = Adapter->psFlash2xCSInfo; PFLASH2X_CS_INFO psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
FLASH2X_SECTION_VAL uiHighestPriDSD = 0; enum bcm_flash2x_section_val uiHighestPriDSD = 0;
FLASH2X_SECTION_VAL uiHighestPriISO = 0; enum bcm_flash2x_section_val uiHighestPriISO = 0;
BOOLEAN SetActiveDSDDone = FALSE; BOOLEAN SetActiveDSDDone = FALSE;
BOOLEAN SetActiveISODone = FALSE; BOOLEAN SetActiveISODone = FALSE;
...@@ -3349,7 +3349,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl ...@@ -3349,7 +3349,7 @@ int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_fl
* *
*/ */
int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectVal) int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectVal)
{ {
unsigned int SectImagePriority = 0; unsigned int SectImagePriority = 0;
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
...@@ -3532,7 +3532,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eF ...@@ -3532,7 +3532,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eF
int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section sCopySectStrut) int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section sCopySectStrut)
{ {
PCHAR Buff = NULL; PCHAR Buff = NULL;
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;
BOOLEAN IsThisHeaderSector = FALSE; BOOLEAN IsThisHeaderSector = FALSE;
...@@ -3813,7 +3813,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section ...@@ -3813,7 +3813,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
* Failure :-Return negative error code * Failure :-Return negative error code
*/ */
int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal)
{ {
int Status = STATUS_SUCCESS; int Status = STATUS_SUCCESS;
...@@ -3841,7 +3841,7 @@ int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL e ...@@ -3841,7 +3841,7 @@ int BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL e
* Failure :-Return negative error code * Failure :-Return negative error code
*/ */
int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlashSectionVal) int BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal)
{ {
unsigned int uiSignature = 0; unsigned int uiSignature = 0;
unsigned int uiOffset = 0; unsigned int uiOffset = 0;
...@@ -4021,8 +4021,8 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter) ...@@ -4021,8 +4021,8 @@ static int GetFlashBaseAddr(struct bcm_mini_adapter *Adapter)
*/ */
int BcmCopySection(struct bcm_mini_adapter *Adapter, int BcmCopySection(struct bcm_mini_adapter *Adapter,
FLASH2X_SECTION_VAL SrcSection, enum bcm_flash2x_section_val SrcSection,
FLASH2X_SECTION_VAL DstSection, enum bcm_flash2x_section_val DstSection,
unsigned int offset, unsigned int offset,
unsigned int numOfBytes) unsigned int numOfBytes)
{ {
...@@ -4264,7 +4264,7 @@ static int BcmDoChipSelect(struct bcm_mini_adapter *Adapter, unsigned int offset ...@@ -4264,7 +4264,7 @@ static int BcmDoChipSelect(struct bcm_mini_adapter *Adapter, unsigned int offset
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
int ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd) int ReadDSDSignature(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val dsd)
{ {
unsigned int uiDSDsig = 0; unsigned int uiDSDsig = 0;
/* unsigned int sigoffsetInMap = 0; /* unsigned int sigoffsetInMap = 0;
...@@ -4289,7 +4289,7 @@ int ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd) ...@@ -4289,7 +4289,7 @@ int ReadDSDSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd)
return uiDSDsig; return uiDSDsig;
} }
int ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd) int ReadDSDPriority(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val dsd)
{ {
/* unsigned int priOffsetInMap = 0 ; */ /* unsigned int priOffsetInMap = 0 ; */
unsigned int uiDSDPri = STATUS_FAILURE; unsigned int uiDSDPri = STATUS_FAILURE;
...@@ -4312,11 +4312,11 @@ int ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd) ...@@ -4312,11 +4312,11 @@ int ReadDSDPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL dsd)
return uiDSDPri; return uiDSDPri;
} }
FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter) enum bcm_flash2x_section_val getHighestPriDSD(struct bcm_mini_adapter *Adapter)
{ {
int DSDHighestPri = STATUS_FAILURE; int DSDHighestPri = STATUS_FAILURE;
int DsdPri = 0; int DsdPri = 0;
FLASH2X_SECTION_VAL HighestPriDSD = 0; enum bcm_flash2x_section_val HighestPriDSD = 0;
if (IsSectionWritable(Adapter, DSD2)) { if (IsSectionWritable(Adapter, DSD2)) {
DSDHighestPri = ReadDSDPriority(Adapter, DSD2); DSDHighestPri = ReadDSDPriority(Adapter, DSD2);
...@@ -4344,7 +4344,7 @@ FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter) ...@@ -4344,7 +4344,7 @@ FLASH2X_SECTION_VAL getHighestPriDSD(struct bcm_mini_adapter *Adapter)
return HighestPriDSD; return HighestPriDSD;
} }
int ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso) int ReadISOSignature(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val iso)
{ {
unsigned int uiISOsig = 0; unsigned int uiISOsig = 0;
/* unsigned int sigoffsetInMap = 0; /* unsigned int sigoffsetInMap = 0;
...@@ -4367,7 +4367,7 @@ int ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso) ...@@ -4367,7 +4367,7 @@ int ReadISOSignature(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso)
return uiISOsig; return uiISOsig;
} }
int ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso) int ReadISOPriority(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val iso)
{ {
unsigned int ISOPri = STATUS_FAILURE; unsigned int ISOPri = STATUS_FAILURE;
if (IsSectionWritable(Adapter, iso)) { if (IsSectionWritable(Adapter, iso)) {
...@@ -4386,11 +4386,11 @@ int ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso) ...@@ -4386,11 +4386,11 @@ int ReadISOPriority(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL iso)
return ISOPri; return ISOPri;
} }
FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter) enum bcm_flash2x_section_val getHighestPriISO(struct bcm_mini_adapter *Adapter)
{ {
int ISOHighestPri = STATUS_FAILURE; int ISOHighestPri = STATUS_FAILURE;
int ISOPri = 0; int ISOPri = 0;
FLASH2X_SECTION_VAL HighestPriISO = NO_SECTION_VAL; enum bcm_flash2x_section_val HighestPriISO = NO_SECTION_VAL;
if (IsSectionWritable(Adapter, ISO_IMAGE2)) { if (IsSectionWritable(Adapter, ISO_IMAGE2)) {
ISOHighestPri = ReadISOPriority(Adapter, ISO_IMAGE2); ISOHighestPri = ReadISOPriority(Adapter, ISO_IMAGE2);
...@@ -4412,7 +4412,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter) ...@@ -4412,7 +4412,7 @@ FLASH2X_SECTION_VAL getHighestPriISO(struct bcm_mini_adapter *Adapter)
int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter,
PUINT pBuff, PUINT pBuff,
FLASH2X_SECTION_VAL eFlash2xSectionVal, enum bcm_flash2x_section_val eFlash2xSectionVal,
unsigned int uiOffset, unsigned int uiOffset,
unsigned int uiNumBytes) unsigned int uiNumBytes)
{ {
...@@ -4468,7 +4468,7 @@ int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter, ...@@ -4468,7 +4468,7 @@ int WriteToFlashWithoutSectorErase(struct bcm_mini_adapter *Adapter,
return Status; return Status;
} }
BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section) BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section)
{ {
BOOLEAN SectionPresent = FALSE; BOOLEAN SectionPresent = FALSE;
...@@ -4523,7 +4523,7 @@ BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_ ...@@ -4523,7 +4523,7 @@ BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_
return SectionPresent; return SectionPresent;
} }
int IsSectionWritable(struct bcm_mini_adapter *Adapter, 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;
...@@ -4546,7 +4546,7 @@ int IsSectionWritable(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL Sect ...@@ -4546,7 +4546,7 @@ int IsSectionWritable(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL Sect
return Status; return Status;
} }
static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal)
{ {
PUCHAR pBuff = NULL; PUCHAR pBuff = NULL;
unsigned int sig = 0; unsigned int sig = 0;
...@@ -4608,7 +4608,7 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL e ...@@ -4608,7 +4608,7 @@ static int CorruptDSDSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL e
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
static int CorruptISOSig(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL eFlash2xSectionVal) static int CorruptISOSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal)
{ {
PUCHAR pBuff = NULL; PUCHAR pBuff = NULL;
unsigned int sig = 0; unsigned int sig = 0;
......
...@@ -89,7 +89,7 @@ INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg) ...@@ -89,7 +89,7 @@ INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg)
// //
//------------------------------------------------------------------ //------------------------------------------------------------------
INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes) UINT offset, UINT numOfBytes)
{ {
return STATUS_FAILURE; return STATUS_FAILURE;
...@@ -114,7 +114,7 @@ INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL S ...@@ -114,7 +114,7 @@ INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL S
// STATUS_SUCCESS/STATUS_FAILURE // STATUS_SUCCESS/STATUS_FAILURE
// //
//------------------------------------------------------------------ //------------------------------------------------------------------
INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes, BOOLEAN bVerify) UINT offset, UINT numOfBytes, BOOLEAN bVerify)
{ {
return STATUS_FAILURE; return STATUS_FAILURE;
...@@ -138,7 +138,7 @@ INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL ...@@ -138,7 +138,7 @@ INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL
// STATUS_SUCCESS/STATUS_FAILURE // STATUS_SUCCESS/STATUS_FAILURE
// //
//------------------------------------------------------------------ //------------------------------------------------------------------
INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes) UINT offset, UINT numOfBytes)
{ {
return STATUS_FAILURE; return STATUS_FAILURE;
......
...@@ -8,11 +8,11 @@ INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendo ...@@ -8,11 +8,11 @@ INT vendorextnGetSectionInfo(PVOID pContext,PFLASH2X_VENDORSPECIFIC_INFO pVendo
INT vendorextnExit(struct bcm_mini_adapter *Adapter); INT vendorextnExit(struct bcm_mini_adapter *Adapter);
INT vendorextnInit(struct bcm_mini_adapter *Adapter); INT vendorextnInit(struct bcm_mini_adapter *Adapter);
INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg); INT vendorextnIoctl(struct bcm_mini_adapter *Adapter, UINT cmd, ULONG arg);
INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnReadSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes); UINT offset, UINT numOfBytes);
INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnWriteSection(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes, BOOLEAN bVerify); UINT offset, UINT numOfBytes, BOOLEAN bVerify);
INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL SectionVal, INT vendorextnWriteSectionWithoutErase(PVOID pContext, PUCHAR pBuffer, enum bcm_flash2x_section_val SectionVal,
UINT offset, UINT numOfBytes); UINT offset, UINT numOfBytes);
#endif /* */ #endif /* */
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