[PATCH 3/3] Staging: vt6655: remove typedef BOOL

Charles Clément caratorn at gmail.com
Tue Jul 6 14:45:43 UTC 2010


Change variables to int type.

Signed-off-by: Charles Clément <caratorn at gmail.com>
---
 drivers/staging/vt6655/IEEE11h.c     |   17 ++---
 drivers/staging/vt6655/IEEE11h.h     |    4 +-
 drivers/staging/vt6655/aes_ccmp.c    |    4 +-
 drivers/staging/vt6655/aes_ccmp.h    |    2 +-
 drivers/staging/vt6655/baseband.c    |   16 ++--
 drivers/staging/vt6655/baseband.h    |   10 +-
 drivers/staging/vt6655/bssdb.c       |   26 ++----
 drivers/staging/vt6655/bssdb.h       |   45 +++++-------
 drivers/staging/vt6655/card.c        |   95 +++++++++---------------
 drivers/staging/vt6655/card.h        |   92 ++++++++---------------
 drivers/staging/vt6655/channel.c     |   14 ++--
 drivers/staging/vt6655/channel.h     |   10 +-
 drivers/staging/vt6655/datarate.c    |    4 +-
 drivers/staging/vt6655/datarate.h    |    2 +-
 drivers/staging/vt6655/device.h      |  135 +++++++++++++++++-----------------
 drivers/staging/vt6655/device_main.c |   52 ++++++++------
 drivers/staging/vt6655/dpc.c         |   69 ++++++------------
 drivers/staging/vt6655/dpc.h         |    6 +-
 drivers/staging/vt6655/hostap.c      |    2 +-
 drivers/staging/vt6655/iocmd.h       |   23 +++---
 drivers/staging/vt6655/key.c         |   64 ++++------------
 drivers/staging/vt6655/key.h         |   50 ++++---------
 drivers/staging/vt6655/mac.c         |   34 ++++----
 drivers/staging/vt6655/mac.h         |   30 ++++----
 drivers/staging/vt6655/power.c       |   21 +----
 drivers/staging/vt6655/power.h       |   18 +----
 drivers/staging/vt6655/rf.c          |   58 ++++++---------
 drivers/staging/vt6655/rf.h          |   20 ++---
 drivers/staging/vt6655/rxtx.c        |   64 ++++++++--------
 drivers/staging/vt6655/rxtx.h        |    8 +-
 drivers/staging/vt6655/srom.c        |    8 +-
 drivers/staging/vt6655/srom.h        |    8 +-
 drivers/staging/vt6655/tether.c      |    2 +-
 drivers/staging/vt6655/tether.h      |    2 +-
 drivers/staging/vt6655/ttype.h       |    2 -
 drivers/staging/vt6655/vntwifi.c     |   50 +++----------
 drivers/staging/vt6655/vntwifi.h     |   66 +++-------------
 drivers/staging/vt6655/wcmd.c        |   28 ++-----
 drivers/staging/vt6655/wcmd.h        |   17 +---
 drivers/staging/vt6655/wctl.c        |    7 +-
 drivers/staging/vt6655/wctl.h        |    6 +-
 drivers/staging/vt6655/wmgr.c        |   97 ++++++++-----------------
 drivers/staging/vt6655/wmgr.h        |   36 ++++------
 drivers/staging/vt6655/wpa.c         |   12 +---
 drivers/staging/vt6655/wpa.h         |   12 +---
 drivers/staging/vt6655/wpa2.c        |    2 +-
 drivers/staging/vt6655/wpactl.c      |    4 +-
 drivers/staging/vt6655/wpactl.h      |    2 +-
 drivers/staging/vt6655/wroute.c      |    5 +-
 drivers/staging/vt6655/wroute.h      |    3 +-
 50 files changed, 515 insertions(+), 849 deletions(-)

diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c
index 65f25d2..d2665e2 100644
--- a/drivers/staging/vt6655/IEEE11h.c
+++ b/drivers/staging/vt6655/IEEE11h.c
@@ -98,11 +98,11 @@ typedef struct _WLAN_FRAME_TPCREP {
 /*---------------------  Static Variables  --------------------------*/
 
 /*---------------------  Static Functions  --------------------------*/
-static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
+static int s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
 		unsigned int uLength)
 {
     size_t    uNumOfEIDs = 0;
-    BOOL    bResult = 1;
+    int bResult = 1;
 
     if (uLength <= WLAN_A3FR_MAXLEN) {
         memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
@@ -118,7 +118,8 @@ static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
 }
 
 
-static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned char byRate, unsigned char byRSSI)
+static int s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq,
+			unsigned char byRate, unsigned char byRSSI)
 {
     PWLAN_FRAME_TPCREP  pFrame;
     PSTxMgmtPacket      pTxPacket = NULL;
@@ -203,11 +204,7 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned
  * Return Value: None.
  *
 -*/
-BOOL
-IEEE11hbMgrRxAction (
-    void *pMgmtHandle,
-    void *pRxPacket
-    )
+int IEEE11hbMgrRxAction(void *pMgmtHandle, void *pRxPacket)
 {
     PSMgmtObject            pMgmt = (PSMgmtObject) pMgmtHandle;
     PWLAN_FRAME_ACTION      pAction = NULL;
@@ -266,9 +263,7 @@ IEEE11hbMgrRxAction (
 }
 
 
-BOOL IEEE11hbMSRRepTx (
-    void *pMgmtHandle
-    )
+int IEEE11hbMSRRepTx(void *pMgmtHandle)
 {
     PSMgmtObject            pMgmt = (PSMgmtObject) pMgmtHandle;
     PWLAN_FRAME_MSRREP      pMSRRep = (PWLAN_FRAME_MSRREP) (pMgmt->abyCurrentMSRRep + sizeof(STxMgmtPacket));
diff --git a/drivers/staging/vt6655/IEEE11h.h b/drivers/staging/vt6655/IEEE11h.h
index ae32498..ec70d57 100644
--- a/drivers/staging/vt6655/IEEE11h.h
+++ b/drivers/staging/vt6655/IEEE11h.h
@@ -45,8 +45,6 @@
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL IEEE11hbMSRRepTx (
-    void *pMgmtHandle
-    );
+int IEEE11hbMSRRepTx(void *pMgmtHandle);
 
 #endif // __IEEE11h_H__
diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c
index a9f5432..076448b 100644
--- a/drivers/staging/vt6655/aes_ccmp.c
+++ b/drivers/staging/vt6655/aes_ccmp.c
@@ -243,7 +243,7 @@ unsigned char abyRoundKey[16];
  * Return Value: MIC compare result
  *
  */
-BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize)
+int AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize)
 {
 unsigned char abyNonce[13];
 unsigned char MIC_IV[16];
@@ -260,7 +260,7 @@ unsigned char *pbyIV;
 unsigned char *pbyPayload;
 unsigned short wHLen = 22;
 unsigned short wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
-BOOL            bA4 = 0;
+int bA4 = 0;
 unsigned char byTmp;
 unsigned short wCnt;
 int             ii,jj,kk;
diff --git a/drivers/staging/vt6655/aes_ccmp.h b/drivers/staging/vt6655/aes_ccmp.h
index 5671db3..248f04d 100644
--- a/drivers/staging/vt6655/aes_ccmp.h
+++ b/drivers/staging/vt6655/aes_ccmp.h
@@ -41,6 +41,6 @@
 /*---------------------  Export Variables  --------------------------*/
 
 /*---------------------  Export Functions  --------------------------*/
-BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize);
+int AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, unsigned short wFrameSize);
 
 #endif //__AES_H__
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index d9d7f2f..4017a0d 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -1857,9 +1857,9 @@ BBvCaculateParameter (
     unsigned int cbBitCount;
     unsigned int cbUsCount = 0;
     unsigned int cbTmp;
-    BOOL bExtBit;
+    int bExtBit;
     unsigned char byPreambleType = pDevice->byPreambleType;
-    BOOL bCCK = pDevice->bCCK;
+    int bCCK = pDevice->bCCK;
 
     cbBitCount = cbFrameLength * 8;
     bExtBit = 0;
@@ -2015,7 +2015,7 @@ BBvCaculateParameter (
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
+int BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
 {
     unsigned short ww;
     unsigned char byValue;
@@ -2058,7 +2058,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
+int BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
 {
     unsigned short ww;
     unsigned char byValue;
@@ -2100,7 +2100,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
  * Return Value: 1 if all TestBits are set; 0 otherwise.
  *
  */
-BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
+int BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
 {
     unsigned char byOrgData;
 
@@ -2123,7 +2123,7 @@ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
  * Return Value: 1 if all TestBits are clear; 0 otherwise.
  *
  */
-BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
+int BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
 {
     unsigned char byOrgData;
 
@@ -2146,9 +2146,9 @@ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
  *
  */
 
-BOOL BBbVT3253Init (PSDevice pDevice)
+int BBbVT3253Init (PSDevice pDevice)
 {
-    BOOL       bResult = 1;
+    int bResult = 1;
     int        ii;
     unsigned long dwIoBase = pDevice->PortOffset;
     unsigned char byRFType = pDevice->byRFType;
diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h
index cc30340..c227119 100644
--- a/drivers/staging/vt6655/baseband.h
+++ b/drivers/staging/vt6655/baseband.h
@@ -137,19 +137,19 @@ BBvCaculateParameter (
     unsigned char *pbyPhySgn
     );
 
-BOOL BBbReadEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData);
-BOOL BBbWriteEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData);
+int BBbReadEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData);
+int BBbWriteEmbeded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData);
 
 void BBvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyBBRegs);
 void BBvLoopbackOn(PSDevice pDevice);
 void BBvLoopbackOff(PSDevice pDevice);
 void BBvSetShortSlotTime(PSDevice pDevice);
-BOOL BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
-BOOL BBbIsRegBitsOff(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
+int BBbIsRegBitsOn(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
+int BBbIsRegBitsOff(unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits);
 void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData);
 
 // VT3253 Baseband
-BOOL BBbVT3253Init(PSDevice pDevice);
+int BBbVT3253Init(PSDevice pDevice);
 void BBvSoftwareReset(unsigned long dwIoBase);
 void BBvPowerSaveModeON(unsigned long dwIoBase);
 void BBvPowerSaveModeOFF(unsigned long dwIoBase);
diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index ee8bbf8..6d53054 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -281,12 +281,7 @@ BSSpSearchBSSList(
  *
 -*/
 
-
-void
-BSSvClearBSSList(
-    void *hDeviceContext,
-    BOOL bKeepCurrBSSID
-    )
+void BSSvClearBSSList(void *hDeviceContext, int bKeepCurrBSSID)
 {
     PSDevice     pDevice = (PSDevice)hDeviceContext;
     PSMgmtObject    pMgmt = pDevice->pMgmt;
@@ -368,8 +363,7 @@ BSSpAddrIsInBSSList(
  *
 -*/
 
-BOOL
-BSSbInsertToBSSList (
+int BSSbInsertToBSSList(
     void *hDeviceContext,
     unsigned char *abyBSSIDAddr,
     QWORD qwTimestamp,
@@ -395,7 +389,7 @@ BSSbInsertToBSSList (
     PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
     PKnownBSS       pBSSList = NULL;
     unsigned int ii;
-    BOOL            bParsingQuiet = 0;
+    int bParsingQuiet = 0;
     PWLAN_IE_QUIET  pQuiet = NULL;
 
 
@@ -493,7 +487,7 @@ BSSbInsertToBSSList (
     if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == 1)) {
 
         PSKeyItem  pTransmitKey = NULL;
-        BOOL       bIs802_1x = 0;
+        int bIs802_1x = 0;
 
         for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) {
             if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) {
@@ -584,14 +578,13 @@ BSSbInsertToBSSList (
 -*/
 // TODO: input structure modify
 
-BOOL
-BSSbUpdateToBSSList (
+int BSSbUpdateToBSSList(
     void *hDeviceContext,
     QWORD qwTimestamp,
     unsigned short wBeaconInterval,
     unsigned short wCapInfo,
     unsigned char byCurrChannel,
-    BOOL bChannelHit,
+    int bChannelHit,
     PWLAN_IE_SSID pSSID,
     PWLAN_IE_SUPP_RATES pSuppRates,
     PWLAN_IE_SUPP_RATES pExtSuppRates,
@@ -611,7 +604,7 @@ BSSbUpdateToBSSList (
     PSMgmtObject    pMgmt = pDevice->pMgmt;
     PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
     long            ldBm;
-    BOOL            bParsingQuiet = 0;
+    int bParsingQuiet = 0;
     PWLAN_IE_QUIET  pQuiet = NULL;
 
 
@@ -762,8 +755,7 @@ BSSbUpdateToBSSList (
  *
 -*/
 
-BOOL
-BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,
+int BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,
 		unsigned int *puNodeIndex)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject) pMgmtObject;
@@ -1002,7 +994,7 @@ BSSvAddMulticastNode(
 -*/
  //2008-4-14 <add> by chester for led issue
  #ifdef FOR_LED_ON_NOTEBOOK
-BOOL cc = 0;
+int cc = 0;
 unsigned int status;
 #endif
 void
diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h
index b69af4d..ae7fe69 100644
--- a/drivers/staging/vt6655/bssdb.h
+++ b/drivers/staging/vt6655/bssdb.h
@@ -90,13 +90,13 @@ typedef enum _NDIS_802_11_NETWORK_TYPE
 
 
 typedef struct tagSERPObject {
-    BOOL    bERPExist;
+    int bERPExist;
     unsigned char byERP;
 }ERPObject, *PERPObject;
 
 
 typedef struct tagSRSNCapObject {
-    BOOL    bRSNCapExist;
+    int bRSNCapExist;
     unsigned short wRSNCap;
 }SRSNCapObject, *PSRSNCapObject;
 
@@ -104,7 +104,7 @@ typedef struct tagSRSNCapObject {
 #pragma pack(1)
 typedef struct tagKnownBSS {
     // BSS info
-    BOOL            bActive;
+    int bActive;
     unsigned char abyBSSID[WLAN_BSSID_LEN];
     unsigned int	uChannel;
     unsigned char abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
@@ -122,10 +122,10 @@ typedef struct tagKnownBSS {
     long            ldBmAverage[RSSI_STAT_COUNT];
     long            ldBmAverRange;
     //For any BSSID selection improvment
-    BOOL            bSelected;
+    int bSelected;
 
     //++ WPA informations
-    BOOL            bWPAValid;
+    int bWPAValid;
     unsigned char byGKType;
     unsigned char abyPKType[4];
     unsigned short wPKCount;
@@ -136,7 +136,7 @@ typedef struct tagKnownBSS {
     //--
 
     //++ WPA2 informations
-    BOOL            bWPA2Valid;
+    int bWPA2Valid;
     unsigned char byCSSGK;
     unsigned short wCSSPKCount;
     unsigned char abyCSSPK[4];
@@ -181,14 +181,14 @@ typedef enum tagNODE_STATE {
 // STA node info
 typedef struct tagKnownNodeDB {
     // STA info
-    BOOL            bActive;
+    int bActive;
     unsigned char abyMACAddr[WLAN_ADDR_LEN];
     unsigned char abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
     unsigned char abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
     unsigned short wTxDataRate;
-    BOOL            bShortPreamble;
-    BOOL            bERPExist;
-    BOOL            bShortSlotTime;
+    int bShortPreamble;
+    int bERPExist;
+    int bShortSlotTime;
     unsigned int	uInActiveCount;
     unsigned short wMaxBasicRate;     //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
     unsigned short wMaxSuppRate;      //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
@@ -202,15 +202,15 @@ typedef struct tagKnownNodeDB {
     unsigned short wListenInterval;
     unsigned short wAID;
     NODE_STATE      eNodeState;
-    BOOL            bPSEnable;
-    BOOL            bRxPSPoll;
+    int bPSEnable;
+    int bRxPSPoll;
     unsigned char byAuthSequence;
     unsigned long ulLastRxJiffer;
     unsigned char bySuppRate;
     unsigned long dwFlags;
     unsigned short wEnQueueCnt;
 
-    BOOL            bOnFly;
+    int bOnFly;
     unsigned long long       KeyRSC;
     unsigned char byKeyIndex;
     unsigned long dwKeyIndex;
@@ -221,7 +221,7 @@ typedef struct tagKnownNodeDB {
     unsigned char abyWepKey[WLAN_WEPMAX_KEYLEN];
     //
     // Auto rate fallback vars
-    BOOL            bIsInFallback;
+    int bIsInFallback;
     unsigned int	uAverageRSSI;
     unsigned int	uRateRecoveryTimeout;
     unsigned int	uRatePollTimeout;
@@ -257,14 +257,9 @@ BSSpAddrIsInBSSList(
     PWLAN_IE_SSID pSSID
     );
 
-void
-BSSvClearBSSList(
-    void *hDeviceContext,
-    BOOL bKeepCurrBSSID
-    );
+void BSSvClearBSSList(void *hDeviceContext, int bKeepCurrBSSID);
 
-BOOL
-BSSbInsertToBSSList(
+int BSSbInsertToBSSList(
     void *hDeviceContext,
     unsigned char *abyBSSIDAddr,
     QWORD qwTimestamp,
@@ -285,14 +280,13 @@ BSSbInsertToBSSList(
     );
 
 
-BOOL
-BSSbUpdateToBSSList(
+int BSSbUpdateToBSSList(
     void *hDeviceContext,
     QWORD qwTimestamp,
     unsigned short wBeaconInterval,
     unsigned short wCapInfo,
     unsigned char byCurrChannel,
-    BOOL bChannelHit,
+    int bChannelHit,
     PWLAN_IE_SSID pSSID,
     PWLAN_IE_SUPP_RATES pSuppRates,
     PWLAN_IE_SUPP_RATES pExtSuppRates,
@@ -308,8 +302,7 @@ BSSbUpdateToBSSList(
     );
 
 
-BOOL
-BSSDBbIsSTAInNodeDB(void *hDeviceContext, unsigned char *abyDstAddr,
+int BSSDBbIsSTAInNodeDB(void *hDeviceContext, unsigned char *abyDstAddr,
 		unsigned int *puNodeIndex);
 
 void
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index bdb0315..d39554e 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -369,7 +369,7 @@ s_vSetRSPINF (PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs,
  *
  */
 /*
-BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength)
+int CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     if (ePktType == PKT_TYPE_802_11_MNG) {
@@ -397,7 +397,7 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp
  * Return Value: 1 if short preamble; otherwise 0
  *
  */
-BOOL CARDbIsShortPreamble (void *pDeviceHandler)
+int CARDbIsShortPreamble(void *pDeviceHandler)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     if (pDevice->byPreambleType == 0) {
@@ -418,7 +418,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler)
  * Return Value: 1 if short slot time; otherwise 0
  *
  */
-BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
+int CARDbIsShorSlotTime(void *pDeviceHandler)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     return(pDevice->bShortSlotTime);
@@ -437,7 +437,9 @@ BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
  * Return Value: None.
  *
  */
-BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs)
+int CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType,
+		unsigned short wCapInfo, unsigned char byERPField,
+		void *pvSupportRateIEs, void *pvExtSupportRateIEs)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     unsigned char byCWMaxMin = 0;
@@ -624,7 +626,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne
  * Return Value: none
  *
  */
-BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF)
+int CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     QWORD       qwTSFOffset;
@@ -659,7 +661,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi
  * Return Value: 1 if succeed; otherwise 0
  *
  */
-BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
+int CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     unsigned int uBeaconInterval = 0;
@@ -713,7 +715,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
  * Return Value: 1 if all data packet complete; otherwise 0.
  *
  */
-BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
+int CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
 
@@ -771,7 +773,7 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
  * Return Value: 1 if success; 0 if failed.
  *
  */
-BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
+int CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
 
@@ -813,7 +815,7 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
  * Return Value: 1 if success; 0 if failed.
  *
  */
-BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
+int CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
 
@@ -882,10 +884,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
  * Return Value: 1 if succeed; otherwise 0
  *
  */
-BOOL CARDbSetTxDataRate(
-    void *pDeviceHandler,
-    unsigned short wDataRate
-    )
+int CARDbSetTxDataRate(void *pDeviceHandler, unsigned short wDataRate)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
 
@@ -907,10 +906,7 @@ BOOL CARDbSetTxDataRate(
  * Return Value: 1 if power down success; otherwise 0
  *
 -*/
-BOOL
-CARDbPowerDown(
-    void *pDeviceHandler
-    )
+int CARDbPowerDown(void *pDeviceHandler)
 {
     PSDevice        pDevice = (PSDevice)pDeviceHandler;
     unsigned int uIdx;
@@ -946,10 +942,10 @@ CARDbPowerDown(
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL CARDbRadioPowerOff (void *pDeviceHandler)
+int CARDbRadioPowerOff(void *pDeviceHandler)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
-    BOOL        bResult = 1;
+    int bResult = 1;
 
     if (pDevice->bRadioOff == 1)
         return 1;
@@ -995,10 +991,10 @@ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET);  //LED issue
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL CARDbRadioPowerOn (void *pDeviceHandler)
+int CARDbRadioPowerOn(void *pDeviceHandler)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
-    BOOL bResult = 1;
+    int bResult = 1;
 printk("chester power on\n");
     if (pDevice->bRadioControlOff == 1){
 if (pDevice->bHWRadioOff == 1) printk("chester bHWRadioOff\n");
@@ -1039,7 +1035,7 @@ MACvRegBitsOff(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
 
 
 
-BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID)
+int CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
 
@@ -1064,13 +1060,8 @@ BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID)
  * Return Value: none.
  *
 -*/
-BOOL
-CARDbAdd_PMKID_Candidate (
-    void *pDeviceHandler,
-    unsigned char *pbyBSSID,
-    BOOL             bRSNCapExist,
-    unsigned short wRSNCap
-    )
+int CARDbAdd_PMKID_Candidate(void *pDeviceHandler, unsigned char *pbyBSSID,
+				int bRSNCapExist, unsigned short wRSNCap)
 {
     PSDevice            pDevice = (PSDevice) pDeviceHandler;
     PPMKID_CANDIDATE    pCandidateList;
@@ -1139,18 +1130,14 @@ CARDpGetCurrentAddress (
  * Return Value: none.
  *
 -*/
-BOOL
-CARDbStartMeasure (
-    void *pDeviceHandler,
-    void *pvMeasureEIDs,
-    unsigned int uNumOfMeasureEIDs
-    )
+int CARDbStartMeasure(void *pDeviceHandler, void *pvMeasureEIDs,
+			unsigned int uNumOfMeasureEIDs)
 {
     PSDevice                pDevice = (PSDevice) pDeviceHandler;
     PWLAN_IE_MEASURE_REQ    pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs;
     QWORD                   qwCurrTSF;
     QWORD                   qwStartTSF;
-    BOOL                    bExpired = 1;
+    int bExpired = 1;
     unsigned short wDuration = 0;
 
     if ((pEID == NULL) ||
@@ -1266,16 +1253,11 @@ CARDbStartMeasure (
  * Return Value: none.
  *
 -*/
-BOOL
-CARDbChannelSwitch (
-    void *pDeviceHandler,
-    unsigned char byMode,
-    unsigned char byNewChannel,
-    unsigned char byCount
-    )
+int CARDbChannelSwitch(void *pDeviceHandler, unsigned char byMode,
+			unsigned char byNewChannel, unsigned char byCount)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
-    BOOL        bResult = 1;
+    int bResult = 1;
 
     if (byCount == 0) {
         bResult = set_channel(pDevice, byNewChannel);
@@ -1309,15 +1291,9 @@ CARDbChannelSwitch (
  * Return Value: none.
  *
 -*/
-BOOL
-CARDbSetQuiet (
-    void *pDeviceHandler,
-    BOOL             bResetQuiet,
-    unsigned char byQuietCount,
-    unsigned char byQuietPeriod,
-    unsigned short wQuietDuration,
-    unsigned short wQuietOffset
-    )
+int CARDbSetQuiet(void *pDeviceHandler, int bResetQuiet, unsigned char byQuietCount,
+			unsigned char byQuietPeriod, unsigned short wQuietDuration,
+			unsigned short wQuietOffset)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     unsigned int ii = 0;
@@ -1365,10 +1341,7 @@ CARDbSetQuiet (
  * Return Value: none.
  *
 -*/
-BOOL
-CARDbStartQuiet (
-    void *pDeviceHandler
-    )
+int CARDbStartQuiet(void *pDeviceHandler)
 {
     PSDevice    pDevice = (PSDevice) pDeviceHandler;
     unsigned int ii = 0;
@@ -1946,7 +1919,7 @@ void CARDvUpdateBasicTopRate (void *pDeviceHandler)
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
+int CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx)
 {
     PSDevice pDevice = (PSDevice) pDeviceHandler;
     unsigned short wRate = (unsigned short)(1<<wRateIdx);
@@ -1959,7 +1932,7 @@ BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
     return 1;
 }
 
-BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler)
+int CARDbIsOFDMinBasicRate(void *pDeviceHandler)
 {
     PSDevice pDevice = (PSDevice) pDeviceHandler;
     int ii;
@@ -2028,7 +2001,7 @@ void CARDvSetLoopbackMode (unsigned long dwIoBase, unsigned short wLoopbackMode)
  * Return Value: none
  *
  */
-BOOL CARDbSoftwareReset (void *pDeviceHandler)
+int CARDbSoftwareReset(void *pDeviceHandler)
 {
     PSDevice pDevice = (PSDevice) pDeviceHandler;
 
@@ -2092,7 +2065,7 @@ QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
+int CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF)
 {
     unsigned short ww;
     unsigned char byData;
diff --git a/drivers/staging/vt6655/card.h b/drivers/staging/vt6655/card.h
index 4c5a085..e295700 100644
--- a/drivers/staging/vt6655/card.h
+++ b/drivers/staging/vt6655/card.h
@@ -89,88 +89,62 @@ typedef enum _CARD_OP_MODE {
 void CARDvSetRSPINF(void *pDeviceHandler, CARD_PHY_TYPE ePHYType);
 void vUpdateIFS(void *pDeviceHandler);
 void CARDvUpdateBasicTopRate(void *pDeviceHandler);
-BOOL CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx);
-BOOL CARDbIsOFDMinBasicRate(void *pDeviceHandler);
+int CARDbAddBasicRate(void *pDeviceHandler, unsigned short wRateIdx);
+int CARDbIsOFDMinBasicRate(void *pDeviceHandler);
 void CARDvSetLoopbackMode(unsigned long dwIoBase, unsigned short wLoopbackMode);
-BOOL CARDbSoftwareReset(void *pDeviceHandler);
+int CARDbSoftwareReset(void *pDeviceHandler);
 void CARDvSetFirstNextTBTT(unsigned long dwIoBase, unsigned short wBeaconInterval);
 void CARDvUpdateNextTBTT(unsigned long dwIoBase, QWORD qwTSF, unsigned short wBeaconInterval);
-BOOL CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF);
+int CARDbGetCurrentTSF(unsigned long dwIoBase, PQWORD pqwCurrTSF);
 QWORD CARDqGetNextTBTT(QWORD qwTSF, unsigned short wBeaconInterval);
 QWORD CARDqGetTSFOffset(unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2);
-BOOL CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
+int CARDbSetTxPower(void *pDeviceHandler, unsigned long ulTxPower);
 unsigned char CARDbyGetPktType(void *pDeviceHandler);
 void CARDvSafeResetTx(void *pDeviceHandler);
 void CARDvSafeResetRx(void *pDeviceHandler);
 
 //xxx
-BOOL CARDbRadioPowerOff(void *pDeviceHandler);
-BOOL CARDbRadioPowerOn(void *pDeviceHandler);
-//BOOL CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength);
-BOOL CARDbIsShortPreamble(void *pDeviceHandler);
-BOOL CARDbIsShorSlotTime(void *pDeviceHandler);
-BOOL CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigned short wCapInfo, unsigned char byERPField, void *pvSupportRateIEs, void *pvExtSupportRateIEs);
-BOOL CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTimestamp, QWORD qwLocalTSF);
-BOOL CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
-BOOL CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
-BOOL CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval);
-BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
-
-BOOL
-CARDbPowerDown(
-    void *pDeviceHandler
-    );
+int CARDbRadioPowerOff(void *pDeviceHandler);
+int CARDbRadioPowerOn(void *pDeviceHandler);
+//int CARDbSendPacket(void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktType, unsigned int uLength);
+int CARDbIsShortPreamble(void *pDeviceHandler);
+int CARDbIsShorSlotTime(void *pDeviceHandler);
+int CARDbSetPhyParameter(void *pDeviceHandler, CARD_PHY_TYPE ePHYType,
+			unsigned short wCapInfo, unsigned char byERPField,
+			void *pvSupportRateIEs, void *pvExtSupportRateIEs);
+int CARDbUpdateTSF(void *pDeviceHandler, unsigned char byRxRate,
+		QWORD qwBSSTimestamp, QWORD qwLocalTSF);
+int CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
+int CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
+int CARDbSetBeaconPeriod(void *pDeviceHandler, unsigned short wBeaconInterval);
+int CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
 
-BOOL CARDbSetTxDataRate(
-    void *pDeviceHandler,
-    unsigned short wDataRate
-    );
+int CARDbPowerDown(void *pDeviceHandler);
 
+int CARDbSetTxDataRate(void *pDeviceHandler, unsigned short wDataRate);
 
-BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID);
 
-BOOL
-CARDbAdd_PMKID_Candidate (
-    void *pDeviceHandler,
-    unsigned char *pbyBSSID,
-    BOOL             bRSNCapExist,
-    unsigned short wRSNCap
-    );
+int CARDbRemoveKey(void *pDeviceHandler, unsigned char *pbyBSSID);
+
+int CARDbAdd_PMKID_Candidate(void *pDeviceHandler, unsigned char *pbyBSSID,
+			int bRSNCapExist, unsigned short wRSNCap);
 
 void *
 CARDpGetCurrentAddress (
     void *pDeviceHandler
     );
 
-BOOL
-CARDbStartMeasure (
-    void *pDeviceHandler,
-    void *pvMeasureEIDs,
-    unsigned int uNumOfMeasureEIDs
-    );
+int CARDbStartMeasure(void *pDeviceHandler, void *pvMeasureEIDs,
+			unsigned int uNumOfMeasureEIDs);
 
-BOOL
-CARDbChannelSwitch (
-    void *pDeviceHandler,
-    unsigned char byMode,
-    unsigned char byNewChannel,
-    unsigned char byCount
-    );
+int CARDbChannelSwitch(void *pDeviceHandler, unsigned char byMode,
+		unsigned char byNewChannel, unsigned char byCount);
 
-BOOL
-CARDbSetQuiet (
-    void *pDeviceHandler,
-    BOOL             bResetQuiet,
-    unsigned char byQuietCount,
-    unsigned char byQuietPeriod,
-    unsigned short wQuietDuration,
-    unsigned short wQuietOffset
-    );
+int CARDbSetQuiet(void *pDeviceHandler, int bResetQuiet, unsigned char byQuietCount,
+		unsigned char byQuietPeriod, unsigned short wQuietDuration,
+		unsigned short wQuietOffset);
 
-BOOL
-CARDbStartQuiet (
-    void *pDeviceHandler
-    );
+int CARDbStartQuiet(void *pDeviceHandler);
 
 void
 CARDvSetPowerConstraint (
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index 8788f43..131e1f4 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -373,9 +373,9 @@ static struct
  * 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56)
  */
 
-BOOL is_channel_valid(unsigned int ChannelIndex)
+int is_channel_valid(unsigned int ChannelIndex)
 {
-	BOOL    bValid;
+	int bValid;
 
 	bValid = 0;
 	/*
@@ -407,7 +407,7 @@ exit:
  *                          0x000000000000000F means channel 1,2,..15 are supported
  */
 
-BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable)
+int channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable)
 {
 	if (uCountryCodeIdx >= CCODE_MAX)
 		return 0;
@@ -420,7 +420,7 @@ BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTab
 void init_channel_table(void *pDeviceHandler)
 {
 	PSDevice    pDevice = (PSDevice) pDeviceHandler;
-	BOOL        bMultiBand = 0;
+	int bMultiBand = 0;
 	unsigned int ii;
 
 	for(ii = 1 ; ii<=CARD_MAX_CHANNEL_TBL ; ii++) {
@@ -525,10 +525,10 @@ unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIn
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
+int set_channel(void *pDeviceHandler, unsigned int uConnectionChannel)
 {
 	PSDevice pDevice = (PSDevice) pDeviceHandler;
-	BOOL bResult = 1;
+	int bResult = 1;
 
 
 	if (pDevice->byCurrentCh == uConnectionChannel) {
@@ -745,7 +745,7 @@ void set_country_IE(void *pDeviceHandler, void *pIE)
 	pIECountry->len += 3;
 }
 
-BOOL get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
+int get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
 		unsigned char *pbyChannelNumber, unsigned char *pbyMap)
 {
 
diff --git a/drivers/staging/vt6655/channel.h b/drivers/staging/vt6655/channel.h
index 0c82b44..bf705d6 100644
--- a/drivers/staging/vt6655/channel.h
+++ b/drivers/staging/vt6655/channel.h
@@ -31,23 +31,23 @@
 typedef struct tagSChannelTblElement {
     unsigned char byChannelNumber;
     unsigned int uFrequency;
-    BOOL    bValid;
+    int bValid;
     unsigned char byMAP;
 }SChannelTblElement, *PSChannelTblElement;
 
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL is_channel_valid(unsigned int CountryCode);
+int is_channel_valid(unsigned int CountryCode);
 void init_channel_table(void *pDeviceHandler);
 unsigned char get_channel_mapping(void *pDeviceHandler, unsigned char byChannelNumber, CARD_PHY_TYPE ePhyType);
-BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable);
+int channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTable);
 unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIndex);
-BOOL set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
+int set_channel(void *pDeviceHandler, unsigned int uConnectionChannel);
 void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE);
 unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs);
 void set_country_IE(void *pDeviceHandler, void *pIE);
-BOOL get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
+int get_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
 		unsigned char *pbyChannelNumber, unsigned char *pbyMap);
 void set_channel_map_info(void *pDeviceHandler, unsigned int uChannelIndex,
 		unsigned char byMap);
diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c
index 5d8f5f2..73f259b 100644
--- a/drivers/staging/vt6655/datarate.c
+++ b/drivers/staging/vt6655/datarate.c
@@ -199,7 +199,7 @@ RATEvParseMaxRate (
     void *pDeviceHandler,
     PWLAN_IE_SUPP_RATES pItemRates,
     PWLAN_IE_SUPP_RATES pItemExtRates,
-    BOOL bUpdateBasicRate,
+    int bUpdateBasicRate,
     unsigned short *pwMaxBasicRate,
     unsigned short *pwMaxSuppRate,
     unsigned short *pwSuppRate,
@@ -317,7 +317,7 @@ PSDevice        pDevice = (PSDevice) pDeviceHandler;
 unsigned short wIdxDownRate = 0;
 unsigned int ii;
 //unsigned long dwRateTable[MAX_RATE]  = {1,   2,   5,   11,  6,    9,    12,   18,  24,  36,  48,  54};
-BOOL bAutoRate[MAX_RATE] = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1};
+int bAutoRate[MAX_RATE] = {1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1};
 	unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
 	unsigned long dwThroughput = 0;
 	unsigned short wIdxUpRate = 0;
diff --git a/drivers/staging/vt6655/datarate.h b/drivers/staging/vt6655/datarate.h
index 307e441..1fb11a3 100644
--- a/drivers/staging/vt6655/datarate.h
+++ b/drivers/staging/vt6655/datarate.h
@@ -59,7 +59,7 @@ RATEvParseMaxRate(
     void *pDeviceHandler,
     PWLAN_IE_SUPP_RATES pItemRates,
     PWLAN_IE_SUPP_RATES pItemExtRates,
-    BOOL bUpdateBasicRate,
+    int bUpdateBasicRate,
     unsigned short *pwMaxBasicRate,
     unsigned short *pwMaxSuppRate,
     unsigned short *pwSuppRate,
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 77eaf76..5671b6f 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -279,7 +279,7 @@ typedef struct tagSPMKIDCandidateEvent {
 #define MAX_QUIET_COUNT     8
 
 typedef struct tagSQuietControl {
-    BOOL        bEnable;
+    int bEnable;
     unsigned long dwStartTime;
     unsigned char byPeriod;
     unsigned short wDuration;
@@ -326,7 +326,7 @@ typedef struct tagSDeFragControlBlock
     struct sk_buff* skb;
     unsigned char *pbyRxBuffer;
     unsigned int cbFrameLength;
-    BOOL            bInUse;
+    int bInUse;
 } SDeFragControlBlock, *PSDeFragControlBlock;
 
 
@@ -480,10 +480,10 @@ typedef struct __device_info {
 
     unsigned char byMaxPwrLevel;
     unsigned char byZoneType;
-    BOOL                        bZoneRegExist;
+    int bZoneRegExist;
    unsigned char byOriginalZonetype;
     unsigned char abyMacContext[MAC_MAX_CONTEXT_REG];
-    BOOL                        bLinkPass;          // link status: OK or fail
+    int bLinkPass;          // link status: OK or fail
     unsigned char abyCurrentNetAddr[ETH_ALEN];
 
     // Adapter statistics
@@ -505,7 +505,7 @@ typedef struct __device_info {
     unsigned char byAntennaCount;
     unsigned char byRxAntennaMode;
     unsigned char byTxAntennaMode;
-    BOOL                        bTxRxAntInv;
+    int bTxRxAntInv;
 
     unsigned char *pbyTmpBuff;
     unsigned int	uSIFS;    //Current SIFS
@@ -544,7 +544,7 @@ typedef struct __device_info {
     unsigned char byLongRetryLimit;
     CARD_OP_MODE                eOPMode;
     unsigned char byOpMode;
-    BOOL                        bBSSIDFilter;
+    int bBSSIDFilter;
     unsigned short wMaxTransmitMSDULifetime;
     unsigned char abyBSSID[ETH_ALEN];
     unsigned char abyDesireBSSID[ETH_ALEN];
@@ -556,51 +556,51 @@ typedef struct __device_info {
 
     unsigned long dwMaxReceiveLifetime;       // dot11MaxReceiveLifetime
 
-    BOOL                        bCCK;
-    BOOL                        bEncryptionEnable;
-    BOOL                        bLongHeader;
-    BOOL                        bShortSlotTime;
-    BOOL                        bProtectMode;
-    BOOL                        bNonERPPresent;
-    BOOL                        bBarkerPreambleMd;
+    int bCCK;
+    int bEncryptionEnable;
+    int bLongHeader;
+    int bShortSlotTime;
+    int bProtectMode;
+    int bNonERPPresent;
+    int bBarkerPreambleMd;
 
     unsigned char byERPFlag;
     unsigned short wUseProtectCntDown;
 
-    BOOL                        bRadioControlOff;
-    BOOL                        bRadioOff;
-    BOOL                    bEnablePSMode;
+    int bRadioControlOff;
+    int bRadioOff;
+    int bEnablePSMode;
     unsigned short wListenInterval;
-    BOOL                    bPWBitOn;
+    int bPWBitOn;
     WMAC_POWER_MODE         ePSMode;
 
 
     // GPIO Radio Control
     unsigned char byRadioCtl;
     unsigned char byGPIO;
-    BOOL                    bHWRadioOff;
-    BOOL                    bPrvActive4RadioOFF;
-    BOOL                    bGPIOBlockRead;
+    int bHWRadioOff;
+    int bPrvActive4RadioOFF;
+    int bGPIOBlockRead;
 
     // Beacon releated
     unsigned short wSeqCounter;
     unsigned short wBCNBufLen;
-    BOOL                    bBeaconBufReady;
-    BOOL                    bBeaconSent;
-    BOOL                    bIsBeaconBufReadySet;
+    int bBeaconBufReady;
+    int bBeaconSent;
+    int bIsBeaconBufReadySet;
     unsigned int	cbBeaconBufReadySetCnt;
-    BOOL                    bFixRate;
+    int bFixRate;
     unsigned char byCurrentCh;
     unsigned int	uScanTime;
 
     CMD_STATE               eCommandState;
 
     CMD_CODE                eCommand;
-    BOOL                    bBeaconTx;
+    int bBeaconTx;
 
-    BOOL                    bStopBeacon;
-    BOOL                    bStopDataPkt;
-    BOOL                    bStopTx0Pkt;
+    int bStopBeacon;
+    int bStopDataPkt;
+    int bStopTx0Pkt;
     unsigned int	uAutoReConnectTime;
 
     // 802.11 counter
@@ -609,18 +609,18 @@ typedef struct __device_info {
     unsigned int	uCmdDequeueIdx;
     unsigned int	uCmdEnqueueIdx;
     unsigned int	cbFreeCmdQueue;
-    BOOL                    bCmdRunning;
-    BOOL                    bCmdClear;
+    int bCmdRunning;
+    int bCmdClear;
 
 
 
-    BOOL                    bRoaming;
+    int bRoaming;
     //WOW
     unsigned char abyIPAddr[4];
 
     unsigned long ulTxPower;
     NDIS_802_11_WEP_STATUS  eEncryptionStatus;
-    BOOL                    bTransmitKey;
+    int bTransmitKey;
 //2007-0925-01<Add>by MikeLiu
 //mike add :save old Encryption
     NDIS_802_11_WEP_STATUS  eOldEncryptionStatus;
@@ -637,31 +637,31 @@ typedef struct __device_info {
     unsigned int	uKeyLength;
     unsigned char abyKey[WLAN_WEP232_KEYLEN];
 
-    BOOL                    bAES;
+    int bAES;
     unsigned char byCntMeasure;
 
     // for AP mode
     unsigned int	uAssocCount;
-    BOOL                    bMoreData;
+    int bMoreData;
 
     // QoS
-    BOOL                    bGrpAckPolicy;
+    int bGrpAckPolicy;
 
     // for OID_802_11_ASSOCIATION_INFORMATION
-    BOOL                    bAssocInfoSet;
+    int bAssocInfoSet;
 
 
     unsigned char byAutoFBCtrl;
 
-    BOOL                    bTxMICFail;
-    BOOL                    bRxMICFail;
+    int bTxMICFail;
+    int bRxMICFail;
 
 
     unsigned int	uRATEIdx;
 
 
     // For Update BaseBand VGA Gain Offset
-    BOOL                    bUpdateBBVGA;
+    int bUpdateBBVGA;
     unsigned int	uBBVGADiffCount;
     unsigned char byBBVGANew;
     unsigned char byBBVGACurrent;
@@ -672,7 +672,7 @@ typedef struct __device_info {
     unsigned char byBBPreEDIndex;
 
 
-    BOOL                    bRadioCmd;
+    int bRadioCmd;
     unsigned long dwDiagRefCount;
 
     // For FOE Tuning
@@ -713,12 +713,12 @@ typedef struct __device_info {
 #ifdef TxInSleep
      struct timer_list       sTimerTxData;
      unsigned long nTxDataTimeCout;
-     BOOL  fTxDataInSleep;
-     BOOL  IsTxDataTrigger;
+     int fTxDataInSleep;
+     int IsTxDataTrigger;
 #endif
 
 #ifdef WPA_SM_Transtatus
-    BOOL  fWPA_Authened;           //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
+    int fWPA_Authened;           //is WPA/WPA-PSK or WPA2/WPA2-PSK authen??
 #endif
     unsigned char byReAssocCount;   //mike add:re-association retry times!
     unsigned char byLinkWaitCount;
@@ -726,8 +726,8 @@ typedef struct __device_info {
 
     unsigned char abyNodeName[17];
 
-    BOOL                    bDiversityRegCtlON;
-    BOOL                    bDiversityEnable;
+    int bDiversityRegCtlON;
+    int bDiversityEnable;
     unsigned long ulDiversityNValue;
     unsigned long ulDiversityMValue;
     unsigned char byTMax;
@@ -763,12 +763,12 @@ typedef struct __device_info {
 
 
     // for 802.11h
-    BOOL                    b11hEnable;
+    int b11hEnable;
     unsigned char abyCountryCode[3];
     // for 802.11h DFS
     unsigned int	uNumOfMeasureEIDs;
     PWLAN_IE_MEASURE_REQ    pCurrMeasureEID;
-    BOOL                    bMeasureInProgress;
+    int bMeasureInProgress;
     unsigned char byOrgChannel;
     unsigned char byOrgRCR;
     unsigned long dwOrgMAR0;
@@ -777,50 +777,50 @@ typedef struct __device_info {
     unsigned char byCCAFraction;
     unsigned char abyRPIs[8];
     unsigned long dwRPIs[8];
-    BOOL                    bChannelSwitch;
+    int bChannelSwitch;
     unsigned char byNewChannel;
     unsigned char byChannelSwitchCount;
-    BOOL                    bQuietEnable;
-    BOOL                    bEnableFirstQuiet;
+    int bQuietEnable;
+    int bEnableFirstQuiet;
     unsigned char byQuietStartCount;
     unsigned int	uQuietEnqueue;
     unsigned long dwCurrentQuietEndTime;
     SQuietControl           sQuiet[MAX_QUIET_COUNT];
     // for 802.11h TPC
-    BOOL                    bCountryInfo5G;
-    BOOL                    bCountryInfo24G;
+    int bCountryInfo5G;
+    int bCountryInfo24G;
 
     unsigned short wBeaconInterval;
 
     //WPA supplicant deamon
 	struct net_device       *wpadev;
-	BOOL                    bWPADEVUp;
+	int bWPADEVUp;
     struct sk_buff          *skb;
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 /*
-        BOOL                 bwextstep0;
-        BOOL                 bwextstep1;
-        BOOL                 bwextstep2;
-        BOOL                 bwextstep3;
+        int bwextstep0;
+        int bwextstep1;
+        int bwextstep2;
+        int bwextstep3;
         */
         unsigned int	bwextcount;
-        BOOL                 bWPASuppWextEnabled;
+        int bWPASuppWextEnabled;
 #endif
 
     //--
 #ifdef HOSTAP
     // user space daemon: hostapd, is used for HOSTAP
-	BOOL                    bEnableHostapd;
-	BOOL                    bEnable8021x;
-	BOOL                    bEnableHostWEP;
+	int bEnableHostapd;
+	int bEnable8021x;
+	int bEnableHostWEP;
 	struct net_device       *apdev;
 	int (*tx_80211)(struct sk_buff *skb, struct net_device *dev);
 #endif
     unsigned int	uChannel;
-    BOOL                    bMACSuspend;
+    int bMACSuspend;
 
 	struct iw_statistics	wstats;		// wireless stats
-    BOOL                    bCommit;
+    int bCommit;
 
 } DEVICE_INFO, *PSDevice;
 
@@ -880,7 +880,8 @@ void	InitRxManagementQueue(PSDevice   pDevice);
 
 
 
-inline static BOOL device_get_ip(PSDevice pInfo) {
+inline static int device_get_ip(PSDevice pInfo)
+{
     struct in_device* in_dev=(struct in_device*) pInfo->dev->ip_ptr;
     struct in_ifaddr* ifa;
 
@@ -918,9 +919,9 @@ static inline PDEVICE_TD_INFO alloc_td_info(void) {
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex);
-BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF);
-int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter);
+int device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex);
+int device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF);
+int Config_FileOperation(PSDevice pDevice, int fwrite, unsigned char *Parameter);
 #endif
 
 
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index cb385b7..eeeb294 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -294,9 +294,9 @@ DEFINE_PCI_DEVICE_TABLE(vt6655_pci_id_table) = {
 
 
 static int  vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent);
-static BOOL vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice, PCHIP_INFO);
+static int vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice, PCHIP_INFO);
 static void device_free_info(PSDevice pDevice);
-static BOOL device_get_pci_info(PSDevice, struct pci_dev* pcid);
+static int device_get_pci_info(PSDevice, struct pci_dev* pcid);
 static void device_print_info(PSDevice pDevice);
 static struct net_device_stats *device_get_stats(struct net_device *dev);
 static void device_init_diversity_timer(PSDevice pDevice);
@@ -327,12 +327,12 @@ static void device_init_td1_ring(PSDevice pDevice);
 
 static int  device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev);
 //2008-0714<Add>by Mike Liu
-static BOOL device_release_WPADEV(PSDevice pDevice);
+static int device_release_WPADEV(PSDevice pDevice);
 
 static int  ethtool_ioctl(struct net_device *dev, void *useraddr);
 static int  device_rx_srv(PSDevice pDevice, unsigned int uIdx);
 static int  device_tx_srv(PSDevice pDevice, unsigned int uIdx);
-static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pDesc);
+static int device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pDesc);
 static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType);
 static void device_free_tx_buf(PSDevice pDevice, PSTxDesc pDesc);
 static void device_free_td0_ring(PSDevice pDevice);
@@ -386,7 +386,8 @@ device_set_int_opt(int *opt, int val, int min, int max, int def,char* name,char*
 }
 
 static void
-device_set_bool_opt(unsigned int *opt, int val,BOOL def,u32 flag, char* name,char* devname) {
+device_set_bool_opt(unsigned int *opt, int val, int def, u32 flag, char* name, char* devname)
+{
     (*opt)&=(~flag);
     if (val==-1)
         *opt|=(def ? flag : 0);
@@ -870,7 +871,7 @@ static void device_init_diversity_timer(PSDevice pDevice) {
 }
 
 
-static BOOL device_release_WPADEV(PSDevice pDevice)
+static int device_release_WPADEV(PSDevice pDevice)
 {
   viawget_wpa_header *wpahdr;
   int ii=0;
@@ -919,7 +920,7 @@ static const struct net_device_ops device_netdev_ops = {
 static int __devinit
 vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
 {
-    static BOOL bFirst = 1;
+    static int bFirst = 1;
     struct net_device*  dev = NULL;
     PCHIP_INFO  pChip_info = (PCHIP_INFO)ent->driver_data;
     PSDevice    pDevice;
@@ -1123,8 +1124,9 @@ static void device_print_info(PSDevice pDevice)
 
 }
 
-static BOOL __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice,
-    PCHIP_INFO pChip_info) {
+static int __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice,
+					PCHIP_INFO pChip_info)
+{
 
     PSDevice p;
 
@@ -1151,7 +1153,8 @@ static BOOL __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice,
     return 1;
 }
 
-static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
+static int device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid)
+{
 
     u16 pci_cmd;
     u8  b;
@@ -1266,7 +1269,8 @@ device_release_WPADEV(pDevice);
     }
 }
 
-static BOOL device_init_rings(PSDevice pDevice) {
+static int device_init_rings(PSDevice pDevice)
+{
     void*   vir_pool;
 
 
@@ -1624,7 +1628,8 @@ static int device_rx_srv(PSDevice pDevice, unsigned int uIdx) {
 }
 
 
-static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
+static int device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD)
+{
 
     PDEVICE_RD_INFO pRDInfo=pRD->pRDInfo;
 
@@ -1651,7 +1656,8 @@ static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
 
 
 
-BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
+int device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF)
+{
 
     pDeF->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
     if (pDeF->skb == NULL)
@@ -1666,7 +1672,7 @@ BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
 
 static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
     PSTxDesc                 pTD;
-    BOOL                     bFull = 0;
+    int bFull = 0;
     int                      works = 0;
     unsigned char byTsr0;
     unsigned char byTsr1;
@@ -2118,13 +2124,14 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
 
 
 
-BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex) {
+int device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeIndex)
+{
     PSMgmtObject    pMgmt = pDevice->pMgmt;
     PSTxDesc        pHeadTD, pLastTD;
     unsigned int cbFrameBodySize;
     unsigned int uMACfragNum;
     unsigned char byPktType;
-    BOOL            bNeedEncryption = 0;
+    int bNeedEncryption = 0;
     PSKeyItem       pTransmitKey = NULL;
     unsigned int cbHeaderSize;
     unsigned int ii;
@@ -2279,14 +2286,14 @@ static int  device_xmit(struct sk_buff *skb, struct net_device *dev) {
     unsigned int cbFrameBodySize;
     unsigned char byPktType;
     unsigned int cbHeaderSize;
-    BOOL            bNeedEncryption = 0;
+    int bNeedEncryption = 0;
     PSKeyItem       pTransmitKey = NULL;
     SKeyItem        STempKey;
     unsigned int ii;
-    BOOL            bTKIP_UseGTK = 0;
-    BOOL            bNeedDeAuth = 0;
+    int bTKIP_UseGTK = 0;
+    int bNeedDeAuth = 0;
     unsigned char *pbyBSSID;
-    BOOL            bNodeExist = 0;
+    int bNodeExist = 0;
 
 
 
@@ -2638,7 +2645,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
     unsigned char Packet_Type;           //802.1x Authentication
     unsigned char Descriptor_type;
     unsigned short Key_info;
-BOOL            bTxeapol_key = 0;
+	int bTxeapol_key = 0;
     Protocol_Version = skb->data[ETH_HLEN];
     Packet_Type = skb->data[ETH_HLEN+1];
     Descriptor_type = skb->data[ETH_HLEN+1+1+2];
@@ -2996,7 +3003,8 @@ static int Config_FileGetParameter(unsigned char *string,
  return 1;
 }
 
-int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter) {
+int Config_FileOperation(PSDevice pDevice, int fwrite, unsigned char *Parameter)
+{
     unsigned char *config_path = CONFIG_PATH;
     unsigned char *buffer = NULL;
     unsigned char tmpbuffer[20];
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index f3ee489..fecfc5e 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -85,28 +85,18 @@ s_vGetDASA(unsigned char *pbyRxBufferAddr, unsigned int *pcbHeaderSize,
 
 static void
 s_vProcessRxMACHeader(PSDevice pDevice, unsigned char *pbyRxBufferAddr,
-		unsigned int cbPacketSize, BOOL bIsWEP, BOOL bExtIV,
+		unsigned int cbPacketSize, int bIsWEP, int bExtIV,
 		unsigned int *pcbHeadSize);
 
-static BOOL s_bAPModeRxCtl(
-    PSDevice pDevice,
-    unsigned char *pbyFrame,
-    int      iSANodeIndex
-    );
+static int s_bAPModeRxCtl(PSDevice pDevice, unsigned char *pbyFrame, int iSANodeIndex);
 
 
 
-static BOOL s_bAPModeRxData (
-    PSDevice pDevice,
-    struct sk_buff* skb,
-    unsigned int FrameSize,
-    unsigned int cbHeaderOffset,
-    int      iSANodeIndex,
-    int      iDANodeIndex
-    );
+static int s_bAPModeRxData(PSDevice pDevice, struct sk_buff* skb, unsigned int FrameSize,
+			unsigned int cbHeaderOffset, int iSANodeIndex, int iDANodeIndex);
 
 
-static BOOL s_bHandleRxEncryption(
+static int s_bHandleRxEncryption(
     PSDevice     pDevice,
     unsigned char *pbyFrame,
     unsigned int FrameSize,
@@ -118,13 +108,13 @@ static BOOL s_bHandleRxEncryption(
     unsigned long *pdwRxTSC47_16
     );
 
-static BOOL s_bHostWepRxEncryption(
+static int s_bHostWepRxEncryption(
 
     PSDevice     pDevice,
     unsigned char *pbyFrame,
     unsigned int FrameSize,
     unsigned char *pbyRsr,
-    BOOL         bOnFly,
+    int bOnFly,
     PSKeyItem    pKey,
     unsigned char *pbyNewRsr,
     int *       pbExtIV,
@@ -154,7 +144,7 @@ static BOOL s_bHostWepRxEncryption(
 -*/
 static void
 s_vProcessRxMACHeader(PSDevice pDevice, unsigned char *pbyRxBufferAddr,
-		unsigned int cbPacketSize, BOOL bIsWEP, BOOL bExtIV,
+		unsigned int cbPacketSize, int bIsWEP, int bExtIV,
 		unsigned int *pcbHeadSize)
 {
     unsigned char *pbyRxBuffer;
@@ -312,12 +302,7 @@ void	MngWorkItem(void *Context)
 //PLICE_DEBUG<-
 
 
-
-BOOL
-device_receive_frame (
-    PSDevice pDevice,
-    PSRxDesc pCurrRD
-    )
+int device_receive_frame(PSDevice pDevice, PSRxDesc pCurrRD)
 {
 
     PDEVICE_RD_INFO  pRDInfo = pCurrRD->pRDInfo;
@@ -335,8 +320,8 @@ device_receive_frame (
     PQWORD          pqwTSFTime;
     unsigned short *pwFrameSize;
     unsigned char *pbyFrame;
-    BOOL            bDeFragRx = 0;
-    BOOL            bIsWEP = 0;
+    int bDeFragRx = 0;
+    int bIsWEP = 0;
     unsigned int cbHeaderOffset;
     unsigned int FrameSize;
     unsigned short wEtherType = 0;
@@ -344,7 +329,7 @@ device_receive_frame (
     int             iDANodeIndex = -1;
     unsigned int ii;
     unsigned int cbIVOffset;
-    BOOL            bExtIV = 0;
+    int bExtIV = 0;
     unsigned char *pbyRxSts;
     unsigned char *pbyRxRate;
     unsigned char *pbySQ;
@@ -358,7 +343,7 @@ device_receive_frame (
     long            ldBm = 0;
     long            ldBmThreshold = 0;
     PS802_11Header pMACHeader;
- BOOL            bRxeapol_key = 0;
+	int bRxeapol_key = 0;
 
 //    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- device_receive_frame---\n");
 
@@ -477,7 +462,7 @@ device_receive_frame (
 
 
     if (IS_FC_WEP(pbyFrame)) {
-        BOOL     bRxDecryOK = 0;
+        int bRxDecryOK = 0;
 
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n");
         bIsWEP = 1;
@@ -1018,11 +1003,7 @@ device_receive_frame (
 }
 
 
-static BOOL s_bAPModeRxCtl (
-    PSDevice pDevice,
-    unsigned char *pbyFrame,
-    int      iSANodeIndex
-    )
+static int s_bAPModeRxCtl(PSDevice pDevice, unsigned char *pbyFrame, int iSANodeIndex)
 {
     PS802_11Header      p802_11Header;
     CMD_STATUS          Status;
@@ -1142,7 +1123,7 @@ static BOOL s_bAPModeRxCtl (
 
 }
 
-static BOOL s_bHandleRxEncryption (
+static int s_bHandleRxEncryption(
     PSDevice     pDevice,
     unsigned char *pbyFrame,
     unsigned int FrameSize,
@@ -1288,12 +1269,12 @@ static BOOL s_bHandleRxEncryption (
 }
 
 
-static BOOL s_bHostWepRxEncryption (
+static int s_bHostWepRxEncryption(
     PSDevice     pDevice,
     unsigned char *pbyFrame,
     unsigned int FrameSize,
     unsigned char *pbyRsr,
-    BOOL         bOnFly,
+    int bOnFly,
     PSKeyItem    pKey,
     unsigned char *pbyNewRsr,
     int *       pbExtIV,
@@ -1419,18 +1400,12 @@ static BOOL s_bHostWepRxEncryption (
 
 
 
-static BOOL s_bAPModeRxData (
-    PSDevice pDevice,
-    struct sk_buff* skb,
-    unsigned int FrameSize,
-    unsigned int cbHeaderOffset,
-    int      iSANodeIndex,
-    int      iDANodeIndex
-    )
+static int s_bAPModeRxData(PSDevice pDevice, struct sk_buff* skb, unsigned int FrameSize,
+			unsigned int cbHeaderOffset, int iSANodeIndex, int iDANodeIndex)
 {
     PSMgmtObject        pMgmt = pDevice->pMgmt;
-    BOOL                bRelayAndForward = 0;
-    BOOL                bRelayOnly = 0;
+    int bRelayAndForward = 0;
+    int bRelayOnly = 0;
     unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
     unsigned short wAID;
 
diff --git a/drivers/staging/vt6655/dpc.h b/drivers/staging/vt6655/dpc.h
index e574963..656b3ba 100644
--- a/drivers/staging/vt6655/dpc.h
+++ b/drivers/staging/vt6655/dpc.h
@@ -41,11 +41,7 @@
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL
-device_receive_frame (
-    PSDevice pDevice,
-    PSRxDesc pCurrRD
-    );
+int device_receive_frame(PSDevice pDevice, PSRxDesc pCurrRD);
 
 void	MngWorkItem(void *Context);
 
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index bcb05bd..366a505 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -479,7 +479,7 @@ static int hostap_set_encryption(PSDevice pDevice,
 	int     ret = 0;
 	int     iNodeIndex = -1;
 	int     ii;
-	BOOL    bKeyTableFull = 0;
+	int bKeyTableFull = 0;
 	unsigned short wKeyCtl = 0;
 
 
diff --git a/drivers/staging/vt6655/iocmd.h b/drivers/staging/vt6655/iocmd.h
index 3deaafa..360a325 100644
--- a/drivers/staging/vt6655/iocmd.h
+++ b/drivers/staging/vt6655/iocmd.h
@@ -37,7 +37,6 @@
 #define DEF
 #endif
 
-//typedef int BOOL;
 //typedef uint32_t u32;
 //typedef uint16_t u16;
 //typedef uint8_t u8;
@@ -136,8 +135,8 @@ typedef struct tagSCmdBSSJoin {
     u16     wBBPType;
     u8	    ssid[SSID_MAXLEN + 2];
     u32	    uChannel;
-    BOOL    bPSEnable;
-    BOOL    bShareKeyAuth;
+    int bPSEnable;
+    int bShareKeyAuth;
 
 } SCmdBSSJoin, *PSCmdBSSJoin;
 
@@ -147,7 +146,7 @@ typedef struct tagSCmdBSSJoin {
 
 typedef struct tagSCmdZoneTypeSet {
 
- BOOL       bWrite;
+ int bWrite;
  WZONETYPE  ZoneType;
 
 } SCmdZoneTypeSet, *PSCmdZoneTypeSet;
@@ -158,7 +157,7 @@ typedef struct tagSWPAResult {
          u8 proto;
          u8 key_mgmt;
          u8 eap_type;
-         BOOL authenticated;
+         int authenticated;
 } SWPAResult, *PSWPAResult;
 #endif
 
@@ -169,7 +168,7 @@ typedef struct tagSCmdStartAP {
     u8	    ssid[SSID_MAXLEN + 2];
     u32	    uChannel;
     u32     uBeaconInt;
-    BOOL    bShareKeyAuth;
+    int bShareKeyAuth;
     u8      byBasicRate;
 
 } SCmdStartAP, *PSCmdStartAP;
@@ -177,10 +176,10 @@ typedef struct tagSCmdStartAP {
 
 typedef struct tagSCmdSetWEP {
 
-    BOOL    bEnableWep;
+    int bEnableWep;
     u8      byKeyIndex;
     u8      abyWepKey[WEP_NKEYS][WEP_KEYMAXLEN];
-    BOOL    bWepKeyAvailable[WEP_NKEYS];
+    int bWepKeyAvailable[WEP_NKEYS];
     u32     auWepKeyLength[WEP_NKEYS];
 
 } SCmdSetWEP, *PSCmdSetWEP;
@@ -200,7 +199,7 @@ typedef struct tagSBSSIDItem {
     u16	    wBeaconInterval;
     u16	    wCapInfo;        // for address of byNetType at align 4
 
-    BOOL    bWEPOn;
+    int bWEPOn;
     u32     uRSSI;
 
 } SBSSIDItem;
@@ -215,7 +214,7 @@ typedef struct tagSBSSIDList {
 
 typedef struct tagSCmdLinkStatus {
 
-    BOOL    bLink;
+    int bLink;
 	u16   wBSSType;
 	u8      byState;
     u8      abyBSSID[BSSID_LEN];
@@ -359,12 +358,12 @@ typedef struct tagSNodeItem {
     u16            wInActiveCount;
     u16            wEnQueueCnt;
     u16            wFlags;
-    BOOL           bPWBitOn;
+    int bPWBitOn;
     u8             byKeyIndex;
     u16            wWepKeyLength;
     u8            abyWepKey[WEP_KEYMAXLEN];
     // Auto rate fallback vars
-    BOOL           bIsInFallback;
+    int bIsInFallback;
     u32            uTxFailures;
     u32            uTxAttempts;
     u16            wFailureRatio;
diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
index b86ffc3..f6051ec 100644
--- a/drivers/staging/vt6655/key.c
+++ b/drivers/staging/vt6655/key.c
@@ -131,12 +131,8 @@ void KeyvInitTable (PSKeyManagement pTable, unsigned long dwIoBase)
  * Return Value: 1 if found otherwise 0
  *
  */
-BOOL KeybGetKey (
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyIndex,
-    PSKeyItem       *pKey
-    )
+int KeybGetKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+		unsigned long dwKeyIndex, PSKeyItem *pKey)
 {
     int i;
 
@@ -186,7 +182,7 @@ BOOL KeybGetKey (
  * Return Value: 1 if success otherwise 0
  *
  */
-BOOL KeybSetKey (
+int KeybSetKey (
     PSKeyManagement pTable,
     unsigned char *pbyBSSID,
     unsigned long dwKeyIndex,
@@ -359,12 +355,8 @@ BOOL KeybSetKey (
  * Return Value: 1 if success otherwise 0
  *
  */
-BOOL KeybRemoveKey (
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyIndex,
-    unsigned long dwIoBase
-    )
+int KeybRemoveKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwKeyIndex, unsigned long dwIoBase)
 {
     int  i;
 
@@ -432,11 +424,8 @@ BOOL KeybRemoveKey (
  * Return Value: 1 if success otherwise 0
  *
  */
-BOOL KeybRemoveAllKey (
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwIoBase
-    )
+int KeybRemoveAllKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwIoBase)
 {
     int  i,u;
 
@@ -514,12 +503,8 @@ void KeyvRemoveAllWEPKey (
  * Return Value: 1 if found otherwise 0
  *
  */
-BOOL KeybGetTransmitKey (
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyType,
-    PSKeyItem       *pKey
-    )
+int KeybGetTransmitKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwKeyType, PSKeyItem *pKey)
 {
     int i, ii;
 
@@ -594,10 +579,7 @@ BOOL KeybGetTransmitKey (
  * Return Value: 1 if found otherwise 0
  *
  */
-BOOL KeybCheckPairewiseKey (
-    PSKeyManagement pTable,
-    PSKeyItem       *pKey
-    )
+int KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey)
 {
     int i;
 
@@ -628,16 +610,9 @@ BOOL KeybCheckPairewiseKey (
  * Return Value: 1 if success otherwise 0
  *
  */
-BOOL KeybSetDefaultKey (
-    PSKeyManagement pTable,
-    unsigned long dwKeyIndex,
-    unsigned long uKeyLength,
-    PQWORD          pKeyRSC,
-    unsigned char *pbyKey,
-    unsigned char byKeyDecMode,
-    unsigned long dwIoBase,
-    unsigned char byLocalID
-    )
+int KeybSetDefaultKey(PSKeyManagement pTable, unsigned long dwKeyIndex, unsigned long uKeyLength,
+			PQWORD pKeyRSC, unsigned char *pbyKey, unsigned char byKeyDecMode,
+			unsigned long dwIoBase, unsigned char byLocalID)
 {
     unsigned int ii;
     PSKeyItem   pKey;
@@ -735,16 +710,9 @@ BOOL KeybSetDefaultKey (
  * Return Value: 1 if success otherwise 0
  *
  */
-BOOL KeybSetAllGroupKey (
-    PSKeyManagement pTable,
-    unsigned long dwKeyIndex,
-    unsigned long uKeyLength,
-    PQWORD          pKeyRSC,
-    unsigned char *pbyKey,
-    unsigned char byKeyDecMode,
-    unsigned long dwIoBase,
-    unsigned char byLocalID
-    )
+int KeybSetAllGroupKey(PSKeyManagement pTable, unsigned long dwKeyIndex, unsigned long uKeyLength,
+			PQWORD pKeyRSC, unsigned char *pbyKey, unsigned char byKeyDecMode,
+			unsigned long dwIoBase, unsigned char byLocalID)
 {
     int         i;
     unsigned int ii;
diff --git a/drivers/staging/vt6655/key.h b/drivers/staging/vt6655/key.h
index a1f09a4..bc67351 100644
--- a/drivers/staging/vt6655/key.h
+++ b/drivers/staging/vt6655/key.h
@@ -57,7 +57,7 @@
 
 typedef struct tagSKeyItem
 {
-    BOOL        bKeyValid;
+    int bKeyValid;
     unsigned long uKeyLength;
     unsigned char abyKey[MAX_KEY_LEN];
     QWORD       KeyRSC;
@@ -76,11 +76,11 @@ typedef struct tagSKeyTable
     SKeyItem    PairwiseKey;
     SKeyItem    GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
     unsigned long dwGTKeyIndex;            // GroupTransmitKey Index
-    BOOL        bInUse;
+    int bInUse;
     //2006-1116-01,<Modify> by NomadZhao
     //unsigned short wKeyCtl;
-    //BOOL      bSoftWEP;
-    BOOL        bSoftWEP;
+    //int bSoftWEP;
+    int bSoftWEP;
     unsigned short wKeyCtl;      // for address of wKeyCtl at align 4
 
     unsigned char byReserved1[6];
@@ -103,14 +103,10 @@ typedef struct tagSKeyManagement
 
 void KeyvInitTable(PSKeyManagement pTable, unsigned long dwIoBase);
 
-BOOL KeybGetKey(
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyIndex,
-    PSKeyItem       *pKey
-    );
+int KeybGetKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+		unsigned long dwKeyIndex, PSKeyItem *pKey);
 
-BOOL KeybSetKey(
+int KeybSetKey(
     PSKeyManagement pTable,
     unsigned char *pbyBSSID,
     unsigned long dwKeyIndex,
@@ -122,7 +118,7 @@ BOOL KeybSetKey(
     unsigned char byLocalID
     );
 
-BOOL KeybSetDefaultKey(
+int KeybSetDefaultKey(
     PSKeyManagement pTable,
     unsigned long dwKeyIndex,
     unsigned long uKeyLength,
@@ -133,30 +129,16 @@ BOOL KeybSetDefaultKey(
     unsigned char byLocalID
     );
 
-BOOL KeybRemoveKey(
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyIndex,
-    unsigned long dwIoBase
-    );
+int KeybRemoveKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwKeyIndex, unsigned long dwIoBase);
 
-BOOL KeybGetTransmitKey(
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwKeyType,
-    PSKeyItem       *pKey
-    );
+int KeybGetTransmitKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwKeyType, PSKeyItem *pKey);
 
-BOOL KeybCheckPairewiseKey(
-    PSKeyManagement pTable,
-    PSKeyItem       *pKey
-    );
+int KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey);
 
-BOOL KeybRemoveAllKey(
-    PSKeyManagement pTable,
-    unsigned char *pbyBSSID,
-    unsigned long dwIoBase
-    );
+int KeybRemoveAllKey(PSKeyManagement pTable, unsigned char *pbyBSSID,
+			unsigned long dwIoBase);
 
 void KeyvRemoveWEPKey(
     PSKeyManagement pTable,
@@ -169,7 +151,7 @@ void KeyvRemoveAllWEPKey(
     unsigned long dwIoBase
     );
 
-BOOL KeybSetAllGroupKey (
+int KeybSetAllGroupKey(
     PSKeyManagement pTable,
     unsigned long dwKeyIndex,
     unsigned long uKeyLength,
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index e311db6..2f8d99e 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -140,7 +140,7 @@ void MACvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyMacRegs)
  * Return Value: 1 if all test bits On; otherwise 0
  *
  */
-BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
+int MACbIsRegBitsOn(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
 {
     unsigned char byData;
 
@@ -163,7 +163,7 @@ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned c
  * Return Value: 1 if all test bits Off; otherwise 0
  *
  */
-BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
+int MACbIsRegBitsOff(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
 {
     unsigned char byData;
 
@@ -184,7 +184,7 @@ BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned
  * Return Value: 1 if interrupt is disable; otherwise 0
  *
  */
-BOOL MACbIsIntDisable (unsigned long dwIoBase)
+int MACbIsIntDisable(unsigned long dwIoBase)
 {
     unsigned long dwData;
 
@@ -559,7 +559,7 @@ void MACvSetLoopbackMode (unsigned long dwIoBase, unsigned char byLoopbackMode)
  * Return Value: 1 if in Loopback mode; otherwise 0
  *
  */
-BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
+int MACbIsInLoopbackMode(unsigned long dwIoBase)
 {
     unsigned char byOrgValue;
 
@@ -728,7 +728,7 @@ void MACvRestoreContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
  * Return Value: 1 if all values are the same; otherwise 0
  *
  */
-BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
+int MACbCompareContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf)
 {
     unsigned long dwData;
 
@@ -773,7 +773,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
  * Return Value: 1 if Reset Success; otherwise 0
  *
  */
-BOOL MACbSoftwareReset (unsigned long dwIoBase)
+int MACbSoftwareReset(unsigned long dwIoBase)
 {
     unsigned char byData;
     unsigned short ww;
@@ -806,10 +806,10 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
+int MACbSafeSoftwareReset(unsigned long dwIoBase)
 {
     unsigned char abyTmpRegData[MAC_MAX_CONTEXT_SIZE_PAGE0+MAC_MAX_CONTEXT_SIZE_PAGE1];
-    BOOL    bRetVal;
+    int bRetVal;
 
     // PATCH....
     // save some important register's value, then do
@@ -839,7 +839,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL MACbSafeRxOff (unsigned long dwIoBase)
+int MACbSafeRxOff(unsigned long dwIoBase)
 {
     unsigned short ww;
     unsigned long dwData;
@@ -900,7 +900,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL MACbSafeTxOff (unsigned long dwIoBase)
+int MACbSafeTxOff(unsigned long dwIoBase)
 {
     unsigned short ww;
     unsigned long dwData;
@@ -964,7 +964,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL MACbSafeStop (unsigned long dwIoBase)
+int MACbSafeStop(unsigned long dwIoBase)
 {
     MACvRegBitsOff(dwIoBase, MAC_REG_TCR, TCR_AUTOBCNTX);
 
@@ -999,7 +999,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL MACbShutdown (unsigned long dwIoBase)
+int MACbShutdown(unsigned long dwIoBase)
 {
     // disable MAC IMR
     MACvIntDisable(dwIoBase);
@@ -1319,10 +1319,10 @@ void MACvSetMISCFifo (unsigned long dwIoBase, unsigned short wOffset, unsigned l
 }
 
 
-BOOL MACbTxDMAOff (unsigned long dwIoBase, unsigned int idx)
+int MACbTxDMAOff(unsigned long dwIoBase, unsigned int idx)
 {
-unsigned char byData;
-unsigned int ww = 0;
+	unsigned char byData;
+	unsigned int ww = 0;
 
     if (idx == TYPE_TXDMA0) {
         VNSvOutPortB(dwIoBase + MAC_REG_TXDMACTL0+2, DMACTL_RUN);
@@ -1391,7 +1391,7 @@ void MACvEnableBusSusEn (unsigned long dwIoBase)
     }
 }
 
-BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
+int MACbFlushSYNCFifo(unsigned long dwIoBase)
 {
     unsigned char byOrgValue;
     unsigned int ww;
@@ -1415,7 +1415,7 @@ BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
     return 1;
 }
 
-BOOL MACbPSWakeup (unsigned long dwIoBase)
+int MACbPSWakeup(unsigned long dwIoBase)
 {
     unsigned char byOrgValue;
     unsigned int ww;
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index ad3459f..706c8d0 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -1077,10 +1077,10 @@
 extern unsigned short TxRate_iwconfig;//2008-5-8 <add> by chester
 void MACvReadAllRegs(unsigned long dwIoBase, unsigned char *pbyMacRegs);
 
-BOOL MACbIsRegBitsOn(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
-BOOL MACbIsRegBitsOff(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
+int MACbIsRegBitsOn(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
+int MACbIsRegBitsOff(unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits);
 
-BOOL MACbIsIntDisable(unsigned long dwIoBase);
+int MACbIsIntDisable(unsigned long dwIoBase);
 
 unsigned char MACbyReadMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx);
 void MACvWriteMultiAddr(unsigned long dwIoBase, unsigned int uByteIdx, unsigned char byData);
@@ -1103,20 +1103,20 @@ void MACvSetLongRetryLimit(unsigned long dwIoBase, unsigned char byRetryLimit);
 void MACvGetLongRetryLimit(unsigned long dwIoBase, unsigned char *pbyRetryLimit);
 
 void MACvSetLoopbackMode(unsigned long dwIoBase, unsigned char byLoopbackMode);
-BOOL MACbIsInLoopbackMode(unsigned long dwIoBase);
+int MACbIsInLoopbackMode(unsigned long dwIoBase);
 
 void MACvSetPacketFilter(unsigned long dwIoBase, unsigned short wFilterType);
 
 void MACvSaveContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
 void MACvRestoreContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
-BOOL MACbCompareContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
-
-BOOL MACbSoftwareReset(unsigned long dwIoBase);
-BOOL MACbSafeSoftwareReset(unsigned long dwIoBase);
-BOOL MACbSafeRxOff(unsigned long dwIoBase);
-BOOL MACbSafeTxOff(unsigned long dwIoBase);
-BOOL MACbSafeStop(unsigned long dwIoBase);
-BOOL MACbShutdown(unsigned long dwIoBase);
+int MACbCompareContext(unsigned long dwIoBase, unsigned char *pbyCxtBuf);
+
+int MACbSoftwareReset(unsigned long dwIoBase);
+int MACbSafeSoftwareReset(unsigned long dwIoBase);
+int MACbSafeRxOff(unsigned long dwIoBase);
+int MACbSafeTxOff(unsigned long dwIoBase);
+int MACbSafeStop(unsigned long dwIoBase);
+int MACbShutdown(unsigned long dwIoBase);
 void MACvInitialize(unsigned long dwIoBase);
 void MACvSetCurrRx0DescAddr(unsigned long dwIoBase, unsigned long dwCurrDescAddr);
 void MACvSetCurrRx1DescAddr(unsigned long dwIoBase, unsigned long dwCurrDescAddr);
@@ -1131,13 +1131,13 @@ void MACvOneShotTimer1MicroSec(unsigned long dwIoBase, unsigned int uDelayTime);
 
 void MACvSetMISCFifo(unsigned long dwIoBase, unsigned short wOffset, unsigned long dwData);
 
-BOOL MACbTxDMAOff (unsigned long dwIoBase, unsigned int idx);
+int MACbTxDMAOff(unsigned long dwIoBase, unsigned int idx);
 
 void MACvClearBusSusInd(unsigned long dwIoBase);
 void MACvEnableBusSusEn(unsigned long dwIoBase);
 
-BOOL MACbFlushSYNCFifo(unsigned long dwIoBase);
-BOOL MACbPSWakeup(unsigned long dwIoBase);
+int MACbFlushSYNCFifo(unsigned long dwIoBase);
+int MACbPSWakeup(unsigned long dwIoBase);
 
 void MACvSetKeyEntry(unsigned long dwIoBase, unsigned short wKeyCtl, unsigned int uEntryIdx,
 		unsigned int uKeyIdx, unsigned char *pbyAddr, unsigned long *pdwKey, unsigned char byLocalID);
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 877b51d..8fd505c 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -181,13 +181,8 @@ PSvDisablePowerSaving(
  *    0, if fail
 -*/
 
-
-BOOL
-PSbConsiderPowerDown(
-    void *hDeviceContext,
-    BOOL bCheckRxDMA,
-    BOOL bCheckCountToWakeUp
-    )
+int PSbConsiderPowerDown(void *hDeviceContext, int bCheckRxDMA,
+				int bCheckCountToWakeUp)
 {
     PSDevice        pDevice = (PSDevice)hDeviceContext;
     PSMgmtObject    pMgmt = pDevice->pMgmt;
@@ -296,10 +291,7 @@ PSvSendPSPOLL(
  *    None.
  *
 -*/
-BOOL
-PSbSendNullPacket(
-    void *hDeviceContext
-    )
+int PSbSendNullPacket(void *hDeviceContext)
 {
     PSDevice            pDevice = (PSDevice)hDeviceContext;
     PSTxMgmtPacket      pTxPacket = NULL;
@@ -382,15 +374,12 @@ PSbSendNullPacket(
  *
 -*/
 
-BOOL
-PSbIsNextTBTTWakeUp(
-    void *hDeviceContext
-    )
+int PSbIsNextTBTTWakeUp(void *hDeviceContext)
 {
 
     PSDevice         pDevice = (PSDevice)hDeviceContext;
     PSMgmtObject        pMgmt = pDevice->pMgmt;
-    BOOL                bWakeUp = 0;
+    int bWakeUp = 0;
 
     if (pMgmt->wListenInterval >= 2) {
         if (pMgmt->wCountToWakeUp == 0) {
diff --git a/drivers/staging/vt6655/power.h b/drivers/staging/vt6655/power.h
index 61196bc..9116984 100644
--- a/drivers/staging/vt6655/power.h
+++ b/drivers/staging/vt6655/power.h
@@ -48,12 +48,8 @@
 // PSDevice pDevice
 // PSDevice hDeviceContext
 
-BOOL
-PSbConsiderPowerDown(
-    void *hDeviceContext,
-    BOOL bCheckRxDMA,
-    BOOL bCheckCountToWakeUp
-    );
+int PSbConsiderPowerDown(void *hDeviceContext, int bCheckRxDMA,
+				int bCheckCountToWakeUp);
 
 void
 PSvDisablePowerSaving(
@@ -71,14 +67,8 @@ PSvSendPSPOLL(
     void *hDeviceContext
     );
 
-BOOL
-PSbSendNullPacket(
-    void *hDeviceContext
-    );
+int PSbSendNullPacket(void *hDeviceContext);
 
-BOOL
-PSbIsNextTBTTWakeUp(
-    void *hDeviceContext
-    );
+int PSbIsNextTBTTWakeUp(void *hDeviceContext);
 
 #endif //__POWER_H__
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index af43ddd..8379ded 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -474,10 +474,10 @@ const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = {
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL s_bAL7230Init (unsigned long dwIoBase)
+int s_bAL7230Init(unsigned long dwIoBase)
 {
     int     ii;
-    BOOL    bResult;
+    int bResult;
 
     bResult = 1;
 
@@ -517,9 +517,9 @@ BOOL s_bAL7230Init (unsigned long dwIoBase)
 }
 
 // Need to Pull PLLON low when writing channel registers through 3-wire interface
-BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
+int s_bAL7230SelectChannel(unsigned long dwIoBase, unsigned char byChannel)
 {
-    BOOL    bResult;
+    int bResult;
 
     bResult = 1;
 
@@ -622,7 +622,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
+int IFRFbWriteEmbeded(unsigned long dwIoBase, unsigned long dwData)
 {
     unsigned short ww;
     unsigned long dwValue;
@@ -684,10 +684,10 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL RFbAL2230Init (unsigned long dwIoBase)
+int RFbAL2230Init(unsigned long dwIoBase)
 {
     int     ii;
-    BOOL    bResult;
+    int bResult;
 
     bResult = 1;
 
@@ -734,9 +734,9 @@ MACvTimer0MicroSDelay(dwIoBase, 30); //delay 30 us
     return bResult;
 }
 
-BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
+int RFbAL2230SelectChannel(unsigned long dwIoBase, unsigned char byChannel)
 {
-    BOOL    bResult;
+    int bResult;
 
     bResult = 1;
 
@@ -807,11 +807,10 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL RFbInit (
-    PSDevice  pDevice
-    )
+int RFbInit(PSDevice  pDevice)
 {
-BOOL    bResult = 1;
+	int bResult = 1;
+
     switch (pDevice->byRFType) {
         case RF_AIROHA :
         case RF_AL2230S:
@@ -845,11 +844,9 @@ BOOL    bResult = 1;
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL RFbShutDown (
-    PSDevice  pDevice
-    )
+int RFbShutDown(PSDevice  pDevice)
 {
-BOOL    bResult = 1;
+	int bResult = 1;
 
     switch (pDevice->byRFType) {
         case RF_AIROHA7230 :
@@ -875,9 +872,10 @@ BOOL    bResult = 1;
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel)
+int RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel)
 {
-BOOL    bResult = 1;
+	int bResult = 1;
+
     switch (byRFType) {
 
         case RF_AIROHA :
@@ -911,7 +909,7 @@ BOOL    bResult = 1;
  * Return Value: None.
  *
  */
-BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel)
+int RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel)
 {
     int   ii;
     unsigned char byInitCount = 0;
@@ -996,13 +994,9 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL RFbSetPower (
-    PSDevice  pDevice,
-    unsigned int uRATE,
-    unsigned int uCH
-    )
+int RFbSetPower(PSDevice  pDevice, unsigned int uRATE, unsigned int uCH)
 {
-BOOL    bResult = 1;
+int bResult = 1;
 unsigned char byPwr = 0;
 unsigned char byDec = 0;
 unsigned char byPwrdBm = 0;
@@ -1135,13 +1129,9 @@ unsigned char byPwrdBm = 0;
  *
  */
 
-BOOL RFbRawSetPower (
-    PSDevice  pDevice,
-    unsigned char byPwr,
-    unsigned int uRATE
-    )
+int RFbRawSetPower(PSDevice  pDevice, unsigned char byPwr, unsigned int uRATE)
 {
-BOOL    bResult = 1;
+int bResult = 1;
 unsigned long dwMax7230Pwr = 0;
 
     if (byPwr >=  pDevice->byMaxPwrLevel) {
@@ -1232,9 +1222,9 @@ RFvRSSITodBm (
 
 // Post processing for the 11b/g and 11a.
 // for save time on changing Reg2,3,5,7,10,12,15
-BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel)
+int RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel)
 {
-    BOOL    bResult;
+    int bResult;
 
     bResult = 1;
 
diff --git a/drivers/staging/vt6655/rf.h b/drivers/staging/vt6655/rf.h
index c856571..6d1cf9a 100644
--- a/drivers/staging/vt6655/rf.h
+++ b/drivers/staging/vt6655/rf.h
@@ -76,18 +76,12 @@
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL IFRFbWriteEmbeded(unsigned long dwIoBase, unsigned long dwData);
-BOOL RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel);
-BOOL RFbInit (
-    PSDevice  pDevice
-    );
-BOOL RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel);
-BOOL RFbSetPower(PSDevice pDevice, unsigned int uRATE, unsigned int uCH);
-BOOL RFbRawSetPower(
-    PSDevice  pDevice,
-    unsigned char byPwr,
-    unsigned int uRATE
-    );
+int IFRFbWriteEmbeded(unsigned long dwIoBase, unsigned long dwData);
+int RFbSelectChannel(unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel);
+int RFbInit(PSDevice  pDevice);
+int RFvWriteWakeProgSyn(unsigned long dwIoBase, unsigned char byRFType, unsigned int uChannel);
+int RFbSetPower(PSDevice pDevice, unsigned int uRATE, unsigned int uCH);
+int RFbRawSetPower(PSDevice  pDevice, unsigned char byPwr, unsigned int uRATE);
 
 void
 RFvRSSITodBm(
@@ -97,7 +91,7 @@ RFvRSSITodBm(
     );
 
 //{{ RobertYu: 20050104
-BOOL RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel);
+int RFbAL7230SelectChannelPostProcess(unsigned long dwIoBase, unsigned char byOldChannel, unsigned char byNewChannel);
 //}} RobertYu
 
 #endif // __RF_H__
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index d77d60f..0c49b21 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -135,8 +135,8 @@ s_vFillRTSHead(
     unsigned char byPktType,
     void *           pvRTS,
     unsigned int	cbFrameLength,
-    BOOL             bNeedAck,
-    BOOL             bDisCRC,
+    int bNeedAck,
+    int bDisCRC,
     PSEthernetHeader psEthHeader,
     unsigned short wCurrentRate,
     unsigned char byFBOption
@@ -152,7 +152,7 @@ s_vGenerateTxParameter(
     void *           pvRTS,
     void *           pvCTS,
     unsigned int	cbFrameSize,
-    BOOL             bNeedACK,
+    int bNeedACK,
     unsigned int	uDMAIdx,
     PSEthernetHeader psEthHeader,
     unsigned short wCurrentRate
@@ -173,7 +173,7 @@ static void s_vFillFragParameter(
 static unsigned int
 s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyTxBufferAddr,
 	unsigned int cbFrameBodySize, unsigned int uDMAIdx, PSTxDesc pHeadTD,
-	PSEthernetHeader psEthHeader, unsigned char *pPacket, BOOL bNeedEncrypt,
+	PSEthernetHeader psEthHeader, unsigned char *pPacket, int bNeedEncrypt,
 	PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum);
 
 
@@ -185,7 +185,7 @@ s_uFillDataHead (
     void *   pTxDataHead,
     unsigned int cbFrameLength,
     unsigned int uDMAIdx,
-    BOOL     bNeedAck,
+    int bNeedAck,
     unsigned int uFragIdx,
     unsigned int cbLastFragmentSize,
     unsigned int uMACfragNum,
@@ -372,7 +372,7 @@ s_uGetTxRsvTime (
     unsigned char byPktType,
     unsigned int cbFrameLength,
     unsigned short wRate,
-    BOOL     bNeedAck
+    int bNeedAck
     )
 {
     unsigned int uDataTime, uAckTime;
@@ -446,14 +446,14 @@ s_uGetDataDuration (
     unsigned int cbFrameLength,
     unsigned char byPktType,
     unsigned short wRate,
-    BOOL     bNeedAck,
+    int bNeedAck,
     unsigned int uFragIdx,
     unsigned int cbLastFragmentSize,
     unsigned int uMACfragNum,
     unsigned char byFBOption
     )
 {
-    BOOL bLastFrag = 0;
+    int bLastFrag = 0;
     unsigned int uAckTime =0, uNextPktTime = 0;
 
 
@@ -617,7 +617,7 @@ s_uGetRTSCTSDuration (
     unsigned int cbFrameLength,
     unsigned char byPktType,
     unsigned short wRate,
-    BOOL bNeedAck,
+    int bNeedAck,
     unsigned char byFBOption
     )
 {
@@ -715,7 +715,7 @@ s_uFillDataHead (
     void *   pTxDataHead,
     unsigned int cbFrameLength,
     unsigned int uDMAIdx,
-    BOOL     bNeedAck,
+    int bNeedAck,
     unsigned int uFragIdx,
     unsigned int cbLastFragmentSize,
     unsigned int uMACfragNum,
@@ -846,8 +846,8 @@ s_vFillRTSHead (
     unsigned char byPktType,
     void *           pvRTS,
     unsigned int cbFrameLength,
-    BOOL             bNeedAck,
-    BOOL             bDisCRC,
+    int bNeedAck,
+    int bDisCRC,
     PSEthernetHeader psEthHeader,
     unsigned short wCurrentRate,
     unsigned char byFBOption
@@ -1041,8 +1041,8 @@ s_vFillCTSHead (
     unsigned char byPktType,
     void *   pvCTS,
     unsigned int cbFrameLength,
-    BOOL     bNeedAck,
-    BOOL     bDisCRC,
+    int bNeedAck,
+    int bDisCRC,
     unsigned short wCurrentRate,
     unsigned char byFBOption
     )
@@ -1148,7 +1148,7 @@ s_vGenerateTxParameter (
     void *           pvRTS,
     void *           pvCTS,
     unsigned int cbFrameSize,
-    BOOL             bNeedACK,
+    int bNeedACK,
     unsigned int uDMAIdx,
     PSEthernetHeader psEthHeader,
     unsigned short wCurrentRate
@@ -1156,7 +1156,7 @@ s_vGenerateTxParameter (
 {
     unsigned int cbMACHdLen = WLAN_HDR_ADDR3_LEN; //24
     unsigned short wFifoCtl;
-    BOOL bDisCRC = 0;
+    int bDisCRC = 0;
     unsigned char byFBOption = AUTO_FB_NONE;
 //    unsigned short wCurrentRate = pDevice->wCurrentRate;
 
@@ -1307,7 +1307,7 @@ s_vFillFragParameter(
 static unsigned int
 s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyTxBufferAddr,
 	unsigned int cbFrameBodySize, unsigned int uDMAIdx, PSTxDesc pHeadTD,
-	PSEthernetHeader psEthHeader, unsigned char *pPacket, BOOL bNeedEncrypt,
+	PSEthernetHeader psEthHeader, unsigned char *pPacket, int bNeedEncrypt,
 	PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum)
 {
     unsigned int cbMACHdLen;
@@ -1340,15 +1340,15 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
     unsigned long *pdwMIC_L;
     unsigned long *pdwMIC_R;
     unsigned long dwSafeMIC_L, dwSafeMIC_R; //Fix "Last Frag Size" < "MIC length".
-    BOOL           bMIC2Frag = 0;
+    int bMIC2Frag = 0;
     unsigned int uMICFragLen = 0;
     unsigned int uMACfragNum = 1;
     unsigned int uPadding = 0;
     unsigned int cbReqCount = 0;
 
-    BOOL           bNeedACK;
-    BOOL           bRTS;
-    BOOL           bIsAdhoc;
+    int bNeedACK;
+    int bRTS;
+    int bIsAdhoc;
     unsigned char *pbyType;
     PSTxDesc       ptdCurr;
     PSTxBufHead    psTxBufHd = (PSTxBufHead) pbyTxBufferAddr;
@@ -1362,7 +1362,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
     unsigned short wTxBufSize;   // FFinfo size
     unsigned int uTotalCopyLength = 0;
     unsigned char byFBOption = AUTO_FB_NONE;
-    BOOL           bIsWEP256 = 0;
+    int bIsWEP256 = 0;
     PSMgmtObject    pMgmt = pDevice->pMgmt;
 
 
@@ -2070,14 +2070,14 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
 
 void
 vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyTxBufferAddr,
-	BOOL bNeedEncrypt, unsigned int cbPayloadSize, unsigned int uDMAIdx,
+	int bNeedEncrypt, unsigned int cbPayloadSize, unsigned int uDMAIdx,
 	PSTxDesc pHeadTD, PSEthernetHeader psEthHeader, unsigned char *pPacket,
 	PSKeyItem pTransmitKey, unsigned int uNodeIndex, unsigned int *puMACfragNum,
 	unsigned int *pcbHeaderSize)
 {
     unsigned int wTxBufSize;       // FFinfo size
-    BOOL            bNeedACK;
-    BOOL            bIsAdhoc;
+    int bNeedACK;
+    int bIsAdhoc;
     unsigned short cbMacHdLen;
     PSTxBufHead     pTxBufHead = (PSTxBufHead) pbyTxBufferAddr;
 
@@ -2234,7 +2234,7 @@ vGenerateMACHeader (
     unsigned char *pbyBufferAddr,
     unsigned short wDuration,
     PSEthernetHeader psEthHeader,
-    BOOL             bNeedEncrypt,
+    int bNeedEncrypt,
     unsigned short wFragType,
     unsigned int uDMAIdx,
     unsigned int uFragIdx
@@ -2314,8 +2314,8 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
     PS802_11Header  pMACHeader;
     unsigned int cbHeaderSize;
     unsigned int cbFrameBodySize;
-    BOOL            bNeedACK;
-    BOOL            bIsPSPOLL = 0;
+    int bNeedACK;
+    int bIsPSPOLL = 0;
     PSTxBufHead     pTxBufHead;
     unsigned int cbFrameSize;
     unsigned int cbIVlen = 0;
@@ -2716,7 +2716,7 @@ cbGetFragCount (
     unsigned int cbMIClen = 0;
     unsigned int cbFCSlen = 4;
     unsigned int uMACfragNum = 1;
-    BOOL           bNeedACK;
+    int bNeedACK;
 
 
 
@@ -2798,8 +2798,8 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
     PS802_11Header  pMACHeader;
     unsigned int cbHeaderSize;
     unsigned int cbFrameBodySize;
-    BOOL            bNeedACK;
-    BOOL            bIsPSPOLL = 0;
+    int bNeedACK;
+    int bIsPSPOLL = 0;
     PSTxBufHead     pTxBufHead;
     unsigned int cbFrameSize;
     unsigned int cbIVlen = 0;
@@ -2822,7 +2822,7 @@ vDMA0_tx_80211(PSDevice  pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
     unsigned short wCurrentRate = RATE_1M;
     PUWLAN_80211HDR  p80211Header;
     unsigned int uNodeIndex = 0;
-    BOOL            bNodeExist = 0;
+    int bNodeExist = 0;
     SKeyItem        STempKey;
     PSKeyItem       pTransmitKey = NULL;
     unsigned char *pbyIVHead;
diff --git a/drivers/staging/vt6655/rxtx.h b/drivers/staging/vt6655/rxtx.h
index d488333..c1349eb 100644
--- a/drivers/staging/vt6655/rxtx.h
+++ b/drivers/staging/vt6655/rxtx.h
@@ -42,12 +42,12 @@
 /*
 void
 vGenerateMACHeader(PSDevice pDevice, unsigned long dwTxBufferAddr, unsigned char *pbySkbData,
-	unsigned int cbPacketSize, BOOL bDMA0Used, unsigned int *pcbHeadSize,
+	unsigned int cbPacketSize, int bDMA0Used, unsigned int *pcbHeadSize,
 	unsigned int *pcbAppendPayload);
 
 void
 vProcessRxMACHeader(PSDevice pDevice, unsigned long dwRxBufferAddr, unsigned int cbPacketSize,
-	BOOL bIsWEP, unsigned int *pcbHeadSize);
+	int bIsWEP, unsigned int *pcbHeadSize);
 */
 
 
@@ -57,7 +57,7 @@ vGenerateMACHeader (
     unsigned char *pbyBufferAddr,
     unsigned short wDuration,
     PSEthernetHeader psEthHeader,
-    BOOL             bNeedEncrypt,
+    int bNeedEncrypt,
     unsigned short wFragType,
     unsigned int uDMAIdx,
     unsigned int uFragIdx
@@ -75,7 +75,7 @@ cbGetFragCount(
 
 void
 vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktTyp, unsigned char *pbyTxBufferAddr,
-	BOOL bNeedEncrypt, unsigned int	cbPayloadSize, unsigned int uDMAIdx, PSTxDesc pHeadTD,
+	int bNeedEncrypt, unsigned int	cbPayloadSize, unsigned int uDMAIdx, PSTxDesc pHeadTD,
 	PSEthernetHeader psEthHeader, unsigned char *pPacket, PSKeyItem pTransmitKey,
 	unsigned int uNodeIndex, unsigned int *puMACfragNum, unsigned int *pcbHeaderSize);
 
diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c
index a48d0e9..1fba084 100644
--- a/drivers/staging/vt6655/srom.c
+++ b/drivers/staging/vt6655/srom.c
@@ -125,7 +125,7 @@ unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntO
  * Return Value: 1 if succeeded; 0 if failed.
  *
  */
-BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData)
+int SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData)
 {
     unsigned short wDelay, wNoACK;
     unsigned char byWait;
@@ -222,7 +222,7 @@ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsig
  * Return Value: 1 if all test bits on; otherwise 0
  *
  */
-BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
+int SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
 {
     unsigned char byOrgData;
 
@@ -245,7 +245,7 @@ BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsi
  * Return Value: 1 if all test bits off; otherwise 0
  *
  */
-BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
+int SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
 {
     unsigned char byOrgData;
 
@@ -389,7 +389,7 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId)
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL SROMbAutoLoad(unsigned long dwIoBase)
+int SROMbAutoLoad(unsigned long dwIoBase)
 {
     unsigned char byWait;
     int     ii;
diff --git a/drivers/staging/vt6655/srom.h b/drivers/staging/vt6655/srom.h
index 65a4b48..86374bd 100644
--- a/drivers/staging/vt6655/srom.h
+++ b/drivers/staging/vt6655/srom.h
@@ -136,13 +136,13 @@ typedef struct tagSSromReg {
 /*---------------------  Export Functions  --------------------------*/
 
 unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntOffset);
-BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData);
+int SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData);
 
 void SROMvRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits);
 void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byBits);
 
-BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
-BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
+int SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
+int SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits);
 
 void SROMvReadAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs);
 void SROMvWriteAllContents(unsigned long dwIoBase, unsigned char *pbyEepromRegs);
@@ -152,6 +152,6 @@ void SROMvWriteEtherAddress(unsigned long dwIoBase, unsigned char *pbyEtherAddre
 
 void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId);
 
-BOOL SROMbAutoLoad (unsigned long dwIoBase);
+int SROMbAutoLoad (unsigned long dwIoBase);
 
 #endif // __EEPROM_H__
diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c
index 36ba27e..8f45b1d 100644
--- a/drivers/staging/vt6655/tether.c
+++ b/drivers/staging/vt6655/tether.c
@@ -96,7 +96,7 @@ unsigned char ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr)
  * Return Value: 1 if ok; 0 if error.
  *
  */
-BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
+int ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength)
 {
     unsigned long dwCRC;
 
diff --git a/drivers/staging/vt6655/tether.h b/drivers/staging/vt6655/tether.h
index 337db66..b4d7004 100644
--- a/drivers/staging/vt6655/tether.h
+++ b/drivers/staging/vt6655/tether.h
@@ -195,7 +195,7 @@ S802_11Header, *PS802_11Header;
 
 unsigned char ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr);
 //unsigned char ETHbyGetHashIndexByCrc(unsigned char *pbyMultiAddr);
-BOOL ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength);
+int ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength);
 
 #endif // __TETHER_H__
 
diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h
index 2694793..37c8fba 100644
--- a/drivers/staging/vt6655/ttype.h
+++ b/drivers/staging/vt6655/ttype.h
@@ -37,8 +37,6 @@
 #define TxInSleep
 #endif
 
-typedef int             BOOL;
-
 //2007-0809-01<Add>by MikeLiu
 #ifndef  update_BssList
 #define update_BssList
diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c
index e74336b..2ddee42 100644
--- a/drivers/staging/vt6655/vntwifi.c
+++ b/drivers/staging/vt6655/vntwifi.c
@@ -358,11 +358,7 @@ VNTWIFIvSetEncryptionMode (
 
 
 
-BOOL
-VNTWIFIbConfigPhyMode (
-    void *pMgmtHandle,
-    CARD_PHY_TYPE ePhyType
-    )
+int VNTWIFIbConfigPhyMode(void *pMgmtHandle, CARD_PHY_TYPE ePhyType)
 {
     PSMgmtObject        pMgmt = (PSMgmtObject)pMgmtHandle;
 
@@ -494,7 +490,7 @@ void
 VNTWIFIvUpdateNodeTxCounter(
     void *pMgmtHandle,
     unsigned char *pbyDestAddress,
-    BOOL     bTxOk,
+    int bTxOk,
     unsigned short wRate,
     unsigned char *pbyTxFailCount
     )
@@ -597,11 +593,7 @@ VNTWIFIvGetTxRate(
     return;
 }
 
-unsigned char
-VNTWIFIbyGetKeyCypher(
-    void *pMgmtHandle,
-    BOOL     bGroupKey
-    )
+unsigned char VNTWIFIbyGetKeyCypher(void *pMgmtHandle, int bGroupKey)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject)pMgmtHandle;
 
@@ -614,11 +606,7 @@ VNTWIFIbyGetKeyCypher(
 
 
 /*
-BOOL
-VNTWIFIbInit(
-    void *pAdapterHandler,
-    void **pMgmtHandler
-    )
+int VNTWIFIbInit(void *pAdapterHandler, void **pMgmtHandler)
 {
 
     PSMgmtObject        pMgmt = NULL;
@@ -658,12 +646,7 @@ VNTWIFIbInit(
 
 
 
-BOOL
-VNTWIFIbSetPMKIDCache (
-    void *pMgmtObject,
-    unsigned long ulCount,
-    void *pPMKIDInfo
-    )
+int VNTWIFIbSetPMKIDCache(void *pMgmtObject, unsigned long ulCount, void *pPMKIDInfo)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject) pMgmtObject;
 
@@ -698,21 +681,16 @@ VNTWIFIwGetMaxSupportRate(
 }
 
 
-void
-VNTWIFIvSet11h (
-    void *pMgmtObject,
-    BOOL  b11hEnable
-    )
+void VNTWIFIvSet11h(void *pMgmtObject, int b11hEnable)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject) pMgmtObject;
 
     pMgmt->b11hEnable = b11hEnable;
 }
 
-BOOL
-VNTWIFIbMeasureReport(
+int VNTWIFIbMeasureReport(
     void *pMgmtObject,
-    BOOL  bEndOfReport,
+    int bEndOfReport,
     void *pvMeasureEID,
     unsigned char byReportMode,
     unsigned char byBasicMap,
@@ -769,11 +747,7 @@ VNTWIFIbMeasureReport(
 }
 
 
-BOOL
-VNTWIFIbChannelSwitch(
-    void *pMgmtObject,
-    unsigned char byNewChannel
-    )
+int VNTWIFIbChannelSwitch(void *pMgmtObject, unsigned char byNewChannel)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject) pMgmtObject;
 
@@ -785,11 +759,7 @@ VNTWIFIbChannelSwitch(
 }
 
 /*
-BOOL
-VNTWIFIbRadarPresent(
-    void *pMgmtObject,
-    unsigned char byChannel
-    )
+int VNTWIFIbRadarPresent(void *pMgmtObject, unsigned char byChannel)
 {
     PSMgmtObject    pMgmt = (PSMgmtObject) pMgmtObject;
     if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
diff --git a/drivers/staging/vt6655/vntwifi.h b/drivers/staging/vt6655/vntwifi.h
index d832f2d..dd98aa2 100644
--- a/drivers/staging/vt6655/vntwifi.h
+++ b/drivers/staging/vt6655/vntwifi.h
@@ -195,11 +195,7 @@ VNTWIFIvSetEncryptionMode (
     );
 
 
-BOOL
-VNTWIFIbConfigPhyMode(
-    void *pMgmtHandle,
-    CARD_PHY_TYPE ePhyType
-    );
+int VNTWIFIbConfigPhyMode(void *pMgmtHandle, CARD_PHY_TYPE ePhyType);
 
 void
 VNTWIFIbGetConfigPhyMode(
@@ -224,7 +220,7 @@ void
 VNTWIFIvUpdateNodeTxCounter(
     void *pMgmtHandle,
     unsigned char *pbyDestAddress,
-    BOOL     bTxOk,
+    int bTxOk,
     unsigned short wRate,
     unsigned char *pbyTxFailCount
     );
@@ -240,33 +236,15 @@ VNTWIFIvGetTxRate(
     unsigned char *pbyOFDMBasicRate
     );
 /*
-BOOL
-VNTWIFIbInit(
-    void *pAdapterHandler,
-    void **pMgmtHandler
-    );
+int VNTWIFIbInit(void *pAdapterHandler, void **pMgmtHandler);
 */
 
-unsigned char
-VNTWIFIbyGetKeyCypher(
-    void *pMgmtHandle,
-    BOOL     bGroupKey
-    );
-
+unsigned char VNTWIFIbyGetKeyCypher(void *pMgmtHandle, int bGroupKey);
 
 
+int VNTWIFIbSetPMKIDCache(void *pMgmtObject, unsigned long ulCount, void *pPMKIDInfo);
 
-BOOL
-VNTWIFIbSetPMKIDCache (
-    void *pMgmtObject,
-    unsigned long ulCount,
-    void *pPMKIDInfo
-    );
-
-BOOL
-VNTWIFIbCommandRunning (
-    void *pMgmtObject
-    );
+int VNTWIFIbCommandRunning(void *pMgmtObject);
 
 unsigned short
 VNTWIFIwGetMaxSupportRate(
@@ -274,34 +252,16 @@ VNTWIFIwGetMaxSupportRate(
     );
 
 // for 802.11h
-void
-VNTWIFIvSet11h (
-    void *pMgmtObject,
-    BOOL  b11hEnable
-    );
+void VNTWIFIvSet11h(void *pMgmtObject, int b11hEnable);
 
-BOOL
-VNTWIFIbMeasureReport(
-    void *pMgmtObject,
-    BOOL  bEndOfReport,
-    void *pvMeasureEID,
-    unsigned char byReportMode,
-    unsigned char byBasicMap,
-    unsigned char byCCAFraction,
-    unsigned char *pbyRPIs
-    );
+int VNTWIFIbMeasureReport(void *pMgmtObject, int bEndOfReport, void *pvMeasureEID,
+				unsigned char byReportMode, unsigned char byBasicMap,
+				unsigned char byCCAFraction, unsigned char *pbyRPIs);
+
+int VNTWIFIbChannelSwitch(void *pMgmtObject, unsigned char byNewChannel);
 
-BOOL
-VNTWIFIbChannelSwitch(
-    void *pMgmtObject,
-    unsigned char byNewChannel
-    );
 /*
-BOOL
-VNTWIFIbRadarPresent(
-    void *pMgmtObject,
-    unsigned char byChannel
-    );
+int VNTWIFIbRadarPresent(void *pMgmtObject, unsigned char byChannel);
 */
 
 #endif //__VNTWIFI_H__
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index 36b7aa7..67e684f 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -85,11 +85,7 @@ s_MgrMakeProbeRequest(
     );
 
 
-static
-BOOL
-s_bCommandComplete (
-    PSDevice pDevice
-    );
+static int s_bCommandComplete(PSDevice pDevice);
 
 /*---------------------  Export Variables  --------------------------*/
 
@@ -117,7 +113,7 @@ vAdHocBeaconStop(PSDevice  pDevice)
 {
 
     PSMgmtObject    pMgmt = &(pDevice->sMgmtObj);
-    BOOL            bStop;
+    int bStop;
 
     /*
      * temporarily stop Beacon packet for AdHoc Server
@@ -892,16 +888,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
 }
 
 
-static
-BOOL
-s_bCommandComplete (
-    PSDevice pDevice
-    )
+static int s_bCommandComplete(PSDevice pDevice)
 {
     PWLAN_IE_SSID pSSID;
-    BOOL          bRadioCmd = 0;
+    int bRadioCmd = 0;
     //unsigned short wDeAuthenReason = 0;
-    BOOL          bForceSCAN = 1;
+    int bForceSCAN = 1;
     PSMgmtObject  pMgmt = pDevice->pMgmt;
 
 
@@ -976,11 +968,7 @@ s_bCommandComplete (
 
 
 
-BOOL bScheduleCommand (
-    void *hDeviceContext,
-    CMD_CODE    eCommand,
-    unsigned char *pbyItem0
-    )
+int bScheduleCommand(void *hDeviceContext, CMD_CODE eCommand, unsigned char *pbyItem0)
 {
     PSDevice        pDevice = (PSDevice)hDeviceContext;
 
@@ -1057,9 +1045,7 @@ BOOL bScheduleCommand (
  * Return Value: 1 if success; otherwise 0
  *
  */
-BOOL bClearBSSID_SCAN (
-    void *hDeviceContext
-    )
+int bClearBSSID_SCAN(void *hDeviceContext)
 {
     PSDevice        pDevice = (PSDevice)hDeviceContext;
     unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
diff --git a/drivers/staging/vt6655/wcmd.h b/drivers/staging/vt6655/wcmd.h
index dccd009..97f1655 100644
--- a/drivers/staging/vt6655/wcmd.h
+++ b/drivers/staging/vt6655/wcmd.h
@@ -76,10 +76,10 @@ typedef enum tagCMD_STATUS {
 typedef struct tagCMD_ITEM {
     CMD_CODE eCmd;
     unsigned char abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-    BOOL     bNeedRadioOFF;
+    int bNeedRadioOFF;
     unsigned short wDeAuthenReason;
-    BOOL     bRadioCmd;
-    BOOL     bForceSCAN;
+    int bRadioCmd;
+    int bForceSCAN;
 } CMD_ITEM, *PCMD_ITEM;
 
 // Command state
@@ -119,16 +119,9 @@ vCommandTimer (
     void *hDeviceContext
     );
 
-BOOL bClearBSSID_SCAN(
-    void *hDeviceContext
-    );
+int bClearBSSID_SCAN(void *hDeviceContext);
 
-BOOL
-bScheduleCommand(
-    void *hDeviceContext,
-    CMD_CODE    eCommand,
-    unsigned char *pbyItem0
-    );
+int bScheduleCommand(void *hDeviceContext, CMD_CODE eCommand, unsigned char *pbyItem0);
 
 void
 vCommandTimerWait(
diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c
index 30c430f..2f32178 100644
--- a/drivers/staging/vt6655/wctl.c
+++ b/drivers/staging/vt6655/wctl.c
@@ -66,7 +66,7 @@
  *
  */
 
-BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader)
+int WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader)
 {
     unsigned int uIndex;
     unsigned int ii;
@@ -175,9 +175,10 @@ unsigned int ii;
  * Return Value: 1 if it is valid fragment packet and we have resource to defragment; otherwise 0
  *
  */
-BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV)
+int WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader,
+			unsigned int cbFrameLength, int bWEP, int bExtIV)
 {
-unsigned int uHeaderSize;
+	unsigned int uHeaderSize;
 
 
     if (bWEP == 1) {
diff --git a/drivers/staging/vt6655/wctl.h b/drivers/staging/vt6655/wctl.h
index f5255b1..d829bd0 100644
--- a/drivers/staging/vt6655/wctl.h
+++ b/drivers/staging/vt6655/wctl.h
@@ -97,9 +97,9 @@
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader);
-BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader,
-		unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV);
+int WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader);
+int WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader,
+		unsigned int cbFrameLength, int bWEP, int bExtIV);
 unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader);
 unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader);
 
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index 280a023..563f098 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -94,10 +94,7 @@ static int          msglevel                =MSG_LEVEL_INFO;
 
 /*---------------------  Static Functions  --------------------------*/
 //2008-8-4 <add> by chester
-static BOOL ChannelExceedZoneType(
-    PSDevice pDevice,
-    unsigned char byCurrChannel
-    );
+static int ChannelExceedZoneType(PSDevice pDevice, unsigned char byCurrChannel);
 
 // Association/diassociation functions
 static
@@ -135,14 +132,8 @@ s_MgrMakeReAssocRequest(
     PWLAN_IE_SUPP_RATES pCurrExtSuppRates
     );
 
-static
-void
-s_vMgrRxAssocResponse(
-    PSDevice pDevice,
-    PSMgmtObject pMgmt,
-    PSRxMgmtPacket pRxPacket,
-    BOOL bReAssocType
-    );
+static void s_vMgrRxAssocResponse(PSDevice pDevice, PSMgmtObject pMgmt,
+		PSRxMgmtPacket pRxPacket, int bReAssocType);
 
 static
 void
@@ -220,14 +211,8 @@ s_vMgrRxProbeResponse(
     );
 
 // beacon functions
-static
-void
-s_vMgrRxBeacon(
-    PSDevice pDevice,
-    PSMgmtObject pMgmt,
-    PSRxMgmtPacket pRxPacket,
-    BOOL bInScan
-    );
+static void s_vMgrRxBeacon(PSDevice pDevice, PSMgmtObject pMgmt, PSRxMgmtPacket pRxPacket,
+				int bInScan);
 
 static
 void
@@ -317,13 +302,8 @@ s_vMgrSynchBSS (
     );
 
 
-static BOOL
-s_bCipherMatch (
-    PKnownBSS                        pBSSNode,
-    NDIS_802_11_ENCRYPTION_STATUS    EncStatus,
-    unsigned char *pbyCCSPK,
-    unsigned char *pbyCCSGK
-    );
+static int s_bCipherMatch(PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus,
+				unsigned char *pbyCCSPK, unsigned char *pbyCCSGK);
 
  static void  Encyption_Rebuild(
     PSDevice pDevice,
@@ -996,7 +976,7 @@ s_vMgrRxAssocResponse(
     PSDevice pDevice,
     PSMgmtObject pMgmt,
     PSRxMgmtPacket pRxPacket,
-    BOOL bReAssocType
+    int bReAssocType
     )
 {
     WLAN_FR_ASSOCRESP   sFrame;
@@ -1826,13 +1806,9 @@ s_vMgrRxDeauthentication(
  *               True:exceed;
  *                False:normal case
 -*/
-static BOOL
-ChannelExceedZoneType(
-    PSDevice pDevice,
-    unsigned char byCurrChannel
-    )
+static int ChannelExceedZoneType(PSDevice pDevice, unsigned char byCurrChannel)
 {
-  BOOL exceed = 0;
+  int exceed = 0;
 
   switch(pDevice->byZoneType) {
   	case 0x00:                  //USA:1~11
@@ -1869,20 +1845,20 @@ s_vMgrRxBeacon(
     PSDevice pDevice,
     PSMgmtObject pMgmt,
     PSRxMgmtPacket pRxPacket,
-    BOOL bInScan
+    int bInScan
     )
 {
 
     PKnownBSS           pBSSList;
     WLAN_FR_BEACON      sFrame;
     QWORD               qwTSFOffset;
-    BOOL                bIsBSSIDEqual = 0;
-    BOOL                bIsSSIDEqual = 0;
-    BOOL                bTSFLargeDiff = 0;
-    BOOL                bTSFOffsetPostive = 0;
-    BOOL                bUpdateTSF = 0;
-    BOOL                bIsAPBeacon = 0;
-    BOOL                bIsChannelEqual = 0;
+    int bIsBSSIDEqual = 0;
+    int bIsSSIDEqual = 0;
+    int bTSFLargeDiff = 0;
+    int bTSFOffsetPostive = 0;
+    int bUpdateTSF = 0;
+    int bIsAPBeacon = 0;
+    int bIsChannelEqual = 0;
     unsigned int uLocateByteIndex;
     unsigned char byTIMBitOn = 0;
     unsigned short wAIDNumber = 0;
@@ -1894,8 +1870,8 @@ s_vMgrRxBeacon(
     unsigned char byCurrChannel = pRxPacket->byRxChannel;
     ERPObject           sERP;
     unsigned int uRateLen = WLAN_RATES_MAXLEN;
-    BOOL                bChannelHit = 0;
-    BOOL                bUpdatePhyParameter = 0;
+    int bChannelHit = 0;
+    int bUpdatePhyParameter = 0;
     unsigned char byIEChannel = 0;
 
 
@@ -2803,7 +2779,7 @@ vMgrJoinBSSBegin(
             // Add current BSS to Candidate list
             // This should only works for WPA2 BSS, and WPA2 BSS check must be done before.
             if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
-                BOOL bResult = bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj);
+                int bResult = bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj);
                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult);
                 if (bResult == 0) {
                     vFlush_PMKID_Candidate((void *)pDevice);
@@ -3155,8 +3131,8 @@ s_vMgrFormatTIM(
     unsigned char byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
     unsigned char byMap;
     unsigned int ii, jj;
-    BOOL        bStartFound = 0;
-    BOOL        bMulticast = 0;
+    int bStartFound = 0;
+    int bMulticast = 0;
     unsigned short wStartIndex = 0;
     unsigned short wEndIndex = 0;
 
@@ -4326,7 +4302,7 @@ s_vMgrRxProbeResponse(
     unsigned char byCurrChannel = pRxPacket->byRxChannel;
     ERPObject           sERP;
     unsigned char byIEChannel = 0;
-    BOOL bChannelHit = 1;
+    int bChannelHit = 1;
 
 
     memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP));
@@ -4543,7 +4519,7 @@ vMgrRxManagePacket(
      )
 {
     PSDevice    pDevice = (PSDevice)hDeviceContext;
-    BOOL        bInScan = 0;
+    int bInScan = 0;
     unsigned int uNodeIndex = 0;
     NODE_STATE  eNodeState = 0;
     CMD_STATUS  Status;
@@ -4684,11 +4660,7 @@ vMgrRxManagePacket(
  *    1 if success; 0 if failed.
  *
 -*/
-BOOL
-bMgrPrepareBeaconToSend(
-    void *hDeviceContext,
-    PSMgmtObject pMgmt
-    )
+int bMgrPrepareBeaconToSend(void *hDeviceContext, PSMgmtObject pMgmt)
 {
     PSDevice            pDevice = (PSDevice)hDeviceContext;
     PSTxMgmtPacket      pTxPacket;
@@ -4808,12 +4780,8 @@ s_vMgrLogStatus(
  * Return Value: none.
  *
 -*/
-BOOL
-bAdd_PMKID_Candidate (
-    void *hDeviceContext,
-    unsigned char *pbyBSSID,
-    PSRSNCapObject psRSNCapObj
-    )
+int bAdd_PMKID_Candidate(void *hDeviceContext, unsigned char *pbyBSSID,
+		PSRSNCapObject psRSNCapObj)
 {
     PSDevice         pDevice = (PSDevice)hDeviceContext;
     PPMKID_CANDIDATE pCandidateList;
@@ -4882,13 +4850,8 @@ vFlush_PMKID_Candidate (
     memset(&pDevice->gsPMKIDCandidate, 0, sizeof(SPMKIDCandidateEvent));
 }
 
-static BOOL
-s_bCipherMatch (
-    PKnownBSS                        pBSSNode,
-    NDIS_802_11_ENCRYPTION_STATUS    EncStatus,
-    unsigned char *pbyCCSPK,
-    unsigned char *pbyCCSGK
-    )
+static int s_bCipherMatch(PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus,
+				unsigned char *pbyCCSPK, unsigned char *pbyCCSGK)
 {
     unsigned char byMulticastCipher = KEY_CTL_INVALID;
     unsigned char byCipherMask = 0x00;
diff --git a/drivers/staging/vt6655/wmgr.h b/drivers/staging/vt6655/wmgr.h
index 31ff256..9197186 100644
--- a/drivers/staging/vt6655/wmgr.h
+++ b/drivers/staging/vt6655/wmgr.h
@@ -280,7 +280,7 @@ typedef struct tagSMgmtObject
     unsigned short wCurrAID;
     unsigned short wCurrATIMWindow;
     unsigned short wCurrBeaconPeriod;
-    BOOL                    bIsDS;
+    int bIsDS;
     unsigned char byERPContext;
 
     CMD_STATE               eCommandState;
@@ -301,7 +301,7 @@ typedef struct tagSMgmtObject
     unsigned short wWPAIELen;
 
     unsigned int	uAssocCount;
-    BOOL                    bMoreData;
+    int bMoreData;
 
     // Scan state vars
     WMAC_SCAN_STATE         eScanState;
@@ -317,13 +317,13 @@ typedef struct tagSMgmtObject
     // Privacy
     WMAC_AUTHENTICATION_MODE eAuthenMode;
     WMAC_ENCRYPTION_MODE    eEncryptionMode;
-    BOOL                    bShareKeyAlgorithm;
+    int bShareKeyAlgorithm;
     unsigned char abyChallenge[WLAN_CHALLENGE_LEN];
-    BOOL                    bPrivacyInvoked;
+    int bPrivacyInvoked;
 
     // Received beacon state vars
-    BOOL                    bInTIM;
-    BOOL                    bMulticastTIM;
+    int bInTIM;
+    int bMulticastTIM;
     unsigned char byDTIMCount;
     unsigned char byDTIMPeriod;
 
@@ -331,10 +331,10 @@ typedef struct tagSMgmtObject
     WMAC_POWER_MODE         ePSMode;
     unsigned short wListenInterval;
     unsigned short wCountToWakeUp;
-    BOOL                    bInTIMWake;
+    int bInTIMWake;
     unsigned char *pbyPSPacketPool;
     unsigned char byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN];
-    BOOL                    bRxBeaconInTBTTWake;
+    int bRxBeaconInTBTTWake;
     unsigned char abyPSTxMap[MAX_NODE_NUM + 1];
 
     // management command related
@@ -366,7 +366,7 @@ typedef struct tagSMgmtObject
 
     // WPA2 PMKID Cache
     SPMKIDCache             gsPMKIDCache;
-    BOOL                    bRoaming;
+    int bRoaming;
 
     // rate fall back vars
 
@@ -377,8 +377,8 @@ typedef struct tagSMgmtObject
 
 
     // for 802.11h
-    BOOL                    b11hEnable;
-    BOOL                    bSwitchChannel;
+    int b11hEnable;
+    int bSwitchChannel;
     unsigned char byNewChannel;
     PWLAN_IE_MEASURE_REP    pCurrMeasureEIDRep;
     unsigned int	uLengthOfRepEIDs;
@@ -480,19 +480,11 @@ vMgrDeAuthenBeginSta(
     PCMD_STATUS pStatus
     );
 
-BOOL
-bMgrPrepareBeaconToSend(
-    void *hDeviceContext,
-    PSMgmtObject pMgmt
-    );
+int bMgrPrepareBeaconToSend(void *hDeviceContext, PSMgmtObject pMgmt);
 
 
-BOOL
-bAdd_PMKID_Candidate (
-    void *hDeviceContext,
-    unsigned char *pbyBSSID,
-    PSRSNCapObject psRSNCapObj
-    );
+int bAdd_PMKID_Candidate(void *hDeviceContext, unsigned char *pbyBSSID,
+				PSRSNCapObject psRSNCapObj);
 
 void
 vFlush_PMKID_Candidate (
diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c
index 58eab08..0f76b1c 100644
--- a/drivers/staging/vt6655/wpa.c
+++ b/drivers/staging/vt6655/wpa.c
@@ -237,12 +237,7 @@ WPA_ParseRSN (
  * Return Value: none.
  *
 -*/
-BOOL
-WPA_SearchRSN (
-    unsigned char byCmd,
-    unsigned char byEncrypt,
-    PKnownBSS        pBSSList
-    )
+int WPA_SearchRSN(unsigned char byCmd, unsigned char byEncrypt, PKnownBSS pBSSList)
 {
     int ii;
     unsigned char byPKType = WPA_NONE;
@@ -297,10 +292,7 @@ WPA_SearchRSN (
  * Return Value: none.
  *
 -*/
-BOOL
-WPAb_Is_RSN (
-    PWLAN_IE_RSN_EXT pRSN
-    )
+int WPAb_Is_RSN(PWLAN_IE_RSN_EXT pRSN)
 {
     if (pRSN == NULL)
         return 0;
diff --git a/drivers/staging/vt6655/wpa.h b/drivers/staging/vt6655/wpa.h
index 99b2e0e..9c132ac 100644
--- a/drivers/staging/vt6655/wpa.h
+++ b/drivers/staging/vt6655/wpa.h
@@ -69,16 +69,8 @@ WPA_ParseRSN(
     PWLAN_IE_RSN_EXT pRSN
     );
 
-BOOL
-WPA_SearchRSN(
-    unsigned char byCmd,
-    unsigned char byEncrypt,
-    PKnownBSS        pBSSList
-    );
+int WPA_SearchRSN(unsigned char byCmd, unsigned char byEncrypt, PKnownBSS pBSSList);
 
-BOOL
-WPAb_Is_RSN(
-    PWLAN_IE_RSN_EXT pRSN
-    );
+int WPAb_Is_RSN(PWLAN_IE_RSN_EXT pRSN);
 
 #endif // __WPA_H__
diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c
index 292a7e2..27d1a63 100644
--- a/drivers/staging/vt6655/wpa2.c
+++ b/drivers/staging/vt6655/wpa2.c
@@ -116,7 +116,7 @@ WPA2vParseRSN (
     int                 i, j;
     unsigned short m = 0, n = 0;
     unsigned char *pbyOUI;
-    BOOL                bUseGK = 0;
+    int bUseGK = 0;
 
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len);
 
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index f2a7bda..3ad7163 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -199,7 +199,7 @@ int wpa_set_wpadev(PSDevice pDevice, int val)
  *
  */
 
- int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL  fcpfkernel)
+int wpa_set_keys(PSDevice pDevice, void *ctx, int fcpfkernel)
 {
     struct viawget_wpa_param *param=ctx;
     PSMgmtObject pMgmt = pDevice->pMgmt;
@@ -755,7 +755,7 @@ static int wpa_set_associate(PSDevice pDevice,
     unsigned char abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
     unsigned char abyWPAIE[64];
     int ret = 0;
-    BOOL bWepEnabled = 0;
+    int bWepEnabled = 0;
 
 	// set key type & algorithm
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise_suite = %d\n", param->u.wpa_associate.pairwise_suite);
diff --git a/drivers/staging/vt6655/wpactl.h b/drivers/staging/vt6655/wpactl.h
index 52bc7e3..1bcecde 100644
--- a/drivers/staging/vt6655/wpactl.h
+++ b/drivers/staging/vt6655/wpactl.h
@@ -64,7 +64,7 @@ typedef unsigned long long   NDIS_802_11_KEY_RSC;
 
 int wpa_set_wpadev(PSDevice pDevice, int val);
 int wpa_ioctl(PSDevice pDevice, struct iw_point *p);
-int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL  fcpfkernel);
+int wpa_set_keys(PSDevice pDevice, void *ctx, int fcpfkernel);
 
 #endif // __WPACL_H__
 
diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index e6442dc..dc48eb9 100644
--- a/drivers/staging/vt6655/wroute.c
+++ b/drivers/staging/vt6655/wroute.c
@@ -65,14 +65,15 @@ static int          msglevel                =MSG_LEVEL_INFO;
  * Return Value: 1 if packet duplicate; otherwise 0
  *
  */
-BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex)
+int ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen,
+		unsigned int uNodeIndex)
 {
     PSMgmtObject    pMgmt = pDevice->pMgmt;
     PSTxDesc        pHeadTD, pLastTD;
     unsigned int cbFrameBodySize;
     unsigned int uMACfragNum;
     unsigned char byPktType;
-    BOOL            bNeedEncryption = 0;
+    int bNeedEncryption = 0;
     SKeyItem        STempKey;
     PSKeyItem       pTransmitKey = NULL;
     unsigned int cbHeaderSize;
diff --git a/drivers/staging/vt6655/wroute.h b/drivers/staging/vt6655/wroute.h
index 79f3014..6be03ee 100644
--- a/drivers/staging/vt6655/wroute.h
+++ b/drivers/staging/vt6655/wroute.h
@@ -39,7 +39,8 @@
 
 /*---------------------  Export Functions  --------------------------*/
 
-BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex);
+int ROUTEbRelay(PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen,
+		unsigned int uNodeIndex);
 
 #endif // __WROUTE_H__
 
-- 
1.7.1.1




More information about the devel mailing list