aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Clément <caratorn@gmail.com>2010-08-01 11:15:48 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-02 21:17:12 -0400
commit1b12068a804711ae2f4fd2876d5706542c1d7ad9 (patch)
treedc4c9d82a09a452b273f90a4f58bd62388ab7dd3
parent93a94c42b1b4f455314230e6b343bc6a23f26854 (diff)
Staging: vt6655: replace TRUE with in kernel true
Signed-off-by: Charles Clément <caratorn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/vt6655/80211mgr.c8
-rw-r--r--drivers/staging/vt6655/IEEE11h.c10
-rw-r--r--drivers/staging/vt6655/aes_ccmp.c4
-rw-r--r--drivers/staging/vt6655/baseband.c22
-rw-r--r--drivers/staging/vt6655/bssdb.c98
-rw-r--r--drivers/staging/vt6655/card.c146
-rw-r--r--drivers/staging/vt6655/channel.c170
-rw-r--r--drivers/staging/vt6655/datarate.c8
-rw-r--r--drivers/staging/vt6655/device.h2
-rw-r--r--drivers/staging/vt6655/device_cfg.h4
-rw-r--r--drivers/staging/vt6655/device_main.c124
-rw-r--r--drivers/staging/vt6655/dpc.c70
-rw-r--r--drivers/staging/vt6655/hostap.c26
-rw-r--r--drivers/staging/vt6655/ioctl.c56
-rw-r--r--drivers/staging/vt6655/iwctl.c58
-rw-r--r--drivers/staging/vt6655/key.c90
-rw-r--r--drivers/staging/vt6655/mac.c50
-rw-r--r--drivers/staging/vt6655/power.c14
-rw-r--r--drivers/staging/vt6655/rf.c74
-rw-r--r--drivers/staging/vt6655/rxtx.c88
-rw-r--r--drivers/staging/vt6655/srom.c12
-rw-r--r--drivers/staging/vt6655/tether.c4
-rw-r--r--drivers/staging/vt6655/ttype.h3
-rw-r--r--drivers/staging/vt6655/vntwifi.c32
-rw-r--r--drivers/staging/vt6655/wcmd.c64
-rw-r--r--drivers/staging/vt6655/wctl.c16
-rw-r--r--drivers/staging/vt6655/wmgr.c216
-rw-r--r--drivers/staging/vt6655/wpa.c8
-rw-r--r--drivers/staging/vt6655/wpa2.c16
-rw-r--r--drivers/staging/vt6655/wpactl.c24
-rw-r--r--drivers/staging/vt6655/wroute.c12
31 files changed, 761 insertions, 768 deletions
diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c
index 9156a0bacdd2..1ed0f260b162 100644
--- a/drivers/staging/vt6655/80211mgr.c
+++ b/drivers/staging/vt6655/80211mgr.c
@@ -179,7 +179,7 @@ vMgrDecodeBeacon(
179 break; 179 break;
180 case WLAN_EID_RSN_WPA: 180 case WLAN_EID_RSN_WPA:
181 if (pFrame->pRSNWPA == NULL) { 181 if (pFrame->pRSNWPA == NULL) {
182 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) 182 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
183 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; 183 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
184 } 184 }
185 break; 185 break;
@@ -404,7 +404,7 @@ vMgrDecodeAssocRequest(
404 break; 404 break;
405 case WLAN_EID_RSN_WPA: 405 case WLAN_EID_RSN_WPA:
406 if (pFrame->pRSNWPA == NULL) { 406 if (pFrame->pRSNWPA == NULL) {
407 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) 407 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
408 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; 408 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
409 } 409 }
410 break; 410 break;
@@ -584,7 +584,7 @@ vMgrDecodeReassocRequest(
584 break; 584 break;
585 case WLAN_EID_RSN_WPA: 585 case WLAN_EID_RSN_WPA:
586 if (pFrame->pRSNWPA == NULL) { 586 if (pFrame->pRSNWPA == NULL) {
587 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) 587 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
588 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; 588 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
589 } 589 }
590 break; 590 break;
@@ -779,7 +779,7 @@ vMgrDecodeProbeResponse(
779 break; 779 break;
780 case WLAN_EID_RSN_WPA: 780 case WLAN_EID_RSN_WPA:
781 if (pFrame->pRSNWPA == NULL) { 781 if (pFrame->pRSNWPA == NULL) {
782 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) 782 if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
783 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; 783 pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
784 } 784 }
785 break; 785 break;
diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c
index 35dd1aaadb22..121682234cd2 100644
--- a/drivers/staging/vt6655/IEEE11h.c
+++ b/drivers/staging/vt6655/IEEE11h.c
@@ -102,7 +102,7 @@ static BOOL s_bRxMSRReq(PSMgmtObject pMgmt, PWLAN_FRAME_MSRREQ pMSRReq,
102 unsigned int uLength) 102 unsigned int uLength)
103{ 103{
104 size_t uNumOfEIDs = 0; 104 size_t uNumOfEIDs = 0;
105 BOOL bResult = TRUE; 105 BOOL bResult = true;
106 106
107 if (uLength <= WLAN_A3FR_MAXLEN) { 107 if (uLength <= WLAN_A3FR_MAXLEN) {
108 memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength); 108 memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength);
@@ -177,7 +177,7 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned
177 pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN; 177 pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN;
178 if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) 178 if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
179 return (FALSE); 179 return (FALSE);
180 return (TRUE); 180 return (true);
181// return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP))); 181// return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP)));
182 182
183} 183}
@@ -260,9 +260,9 @@ IEEE11hbMgrRxAction (
260 pAction->byCategory |= 0x80; 260 pAction->byCategory |= 0x80;
261 261
262 //return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, uLength)); 262 //return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, uLength));
263 return (TRUE); 263 return (true);
264 } 264 }
265 return (TRUE); 265 return (true);
266} 266}
267 267
268 268
@@ -298,7 +298,7 @@ BOOL IEEE11hbMSRRepTx (
298 pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN; 298 pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN;
299 if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) 299 if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING)
300 return (FALSE); 300 return (FALSE);
301 return (TRUE); 301 return (true);
302// return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength)); 302// return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength));
303 303
304} 304}
diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c
index 7198f21bce46..c56a4093b226 100644
--- a/drivers/staging/vt6655/aes_ccmp.c
+++ b/drivers/staging/vt6655/aes_ccmp.c
@@ -269,7 +269,7 @@ int ii,jj,kk;
269 pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; 269 pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
270 if ( WLAN_GET_FC_TODS(*(unsigned short *)pbyFrame) && 270 if ( WLAN_GET_FC_TODS(*(unsigned short *)pbyFrame) &&
271 WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) { 271 WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) {
272 bA4 = TRUE; 272 bA4 = true;
273 pbyIV += 6; // 6 is 802.11 address4 273 pbyIV += 6; // 6 is 802.11 address4
274 wHLen += 6; 274 wHLen += 6;
275 wPayloadSize -= 6; 275 wPayloadSize -= 6;
@@ -394,7 +394,7 @@ int ii,jj,kk;
394 //-------------------------------------------- 394 //--------------------------------------------
395 395
396 if ( !memcmp(abyMIC,abyTmp,8) ) { 396 if ( !memcmp(abyMIC,abyTmp,8) ) {
397 return TRUE; 397 return true;
398 } else { 398 } else {
399 return FALSE; 399 return FALSE;
400 } 400 }
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index b2f73271db20..39ec064bfb6a 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -1740,13 +1740,13 @@ s_vChangeAntenna (
1740#endif 1740#endif
1741 if ( pDevice->dwRxAntennaSel == 0) { 1741 if ( pDevice->dwRxAntennaSel == 0) {
1742 pDevice->dwRxAntennaSel=1; 1742 pDevice->dwRxAntennaSel=1;
1743 if (pDevice->bTxRxAntInv == TRUE) 1743 if (pDevice->bTxRxAntInv == true)
1744 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A); 1744 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A);
1745 else 1745 else
1746 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B); 1746 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B);
1747 } else { 1747 } else {
1748 pDevice->dwRxAntennaSel=0; 1748 pDevice->dwRxAntennaSel=0;
1749 if (pDevice->bTxRxAntInv == TRUE) 1749 if (pDevice->bTxRxAntInv == true)
1750 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B); 1750 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B);
1751 else 1751 else
1752 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A); 1752 BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A);
@@ -1900,7 +1900,7 @@ BBvCaculateParameter (
1900 if (cbTmp != cbBitCount) { 1900 if (cbTmp != cbBitCount) {
1901 cbUsCount ++; 1901 cbUsCount ++;
1902 if ((cbBitCount - cbTmp) <= 3) 1902 if ((cbBitCount - cbTmp) <= 3)
1903 bExtBit = TRUE; 1903 bExtBit = true;
1904 } 1904 }
1905 if (byPreambleType == 1) 1905 if (byPreambleType == 1)
1906 *pbyPhySgn = 0x0b; 1906 *pbyPhySgn = 0x0b;
@@ -2012,7 +2012,7 @@ BBvCaculateParameter (
2012 * Out: 2012 * Out:
2013 * pbyData - data read 2013 * pbyData - data read
2014 * 2014 *
2015 * Return Value: TRUE if succeeded; FALSE if failed. 2015 * Return Value: true if succeeded; FALSE if failed.
2016 * 2016 *
2017 */ 2017 */
2018BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData) 2018BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData)
@@ -2040,7 +2040,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
2040 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n"); 2040 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n");
2041 return FALSE; 2041 return FALSE;
2042 } 2042 }
2043 return TRUE; 2043 return true;
2044} 2044}
2045 2045
2046 2046
@@ -2055,7 +2055,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
2055 * Out: 2055 * Out:
2056 * none 2056 * none
2057 * 2057 *
2058 * Return Value: TRUE if succeeded; FALSE if failed. 2058 * Return Value: true if succeeded; FALSE if failed.
2059 * 2059 *
2060 */ 2060 */
2061BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData) 2061BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData)
@@ -2082,7 +2082,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
2082 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n"); 2082 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n");
2083 return FALSE; 2083 return FALSE;
2084 } 2084 }
2085 return TRUE; 2085 return true;
2086} 2086}
2087 2087
2088 2088
@@ -2097,7 +2097,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
2097 * Out: 2097 * Out:
2098 * none 2098 * none
2099 * 2099 *
2100 * Return Value: TRUE if all TestBits are set; FALSE otherwise. 2100 * Return Value: true if all TestBits are set; FALSE otherwise.
2101 * 2101 *
2102 */ 2102 */
2103BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) 2103BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
@@ -2120,7 +2120,7 @@ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
2120 * Out: 2120 * Out:
2121 * none 2121 * none
2122 * 2122 *
2123 * Return Value: TRUE if all TestBits are clear; FALSE otherwise. 2123 * Return Value: true if all TestBits are clear; FALSE otherwise.
2124 * 2124 *
2125 */ 2125 */
2126BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) 2126BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits)
@@ -2142,13 +2142,13 @@ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
2142 * Out: 2142 * Out:
2143 * none 2143 * none
2144 * 2144 *
2145 * Return Value: TRUE if succeeded; FALSE if failed. 2145 * Return Value: true if succeeded; FALSE if failed.
2146 * 2146 *
2147 */ 2147 */
2148 2148
2149BOOL BBbVT3253Init (PSDevice pDevice) 2149BOOL BBbVT3253Init (PSDevice pDevice)
2150{ 2150{
2151 BOOL bResult = TRUE; 2151 BOOL bResult = true;
2152 int ii; 2152 int ii;
2153 unsigned long dwIoBase = pDevice->PortOffset; 2153 unsigned long dwIoBase = pDevice->PortOffset;
2154 unsigned char byRFType = pDevice->byRFType; 2154 unsigned char byRFType = pDevice->byRFType;
diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c
index bcee662185a6..47f411c61d01 100644
--- a/drivers/staging/vt6655/bssdb.c
+++ b/drivers/staging/vt6655/bssdb.c
@@ -173,7 +173,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
173 ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || 173 ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
174 ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) 174 ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))
175 ) { 175 ) {
176 pCurrBSS->bSelected = TRUE; 176 pCurrBSS->bSelected = true;
177 return(pCurrBSS); 177 return(pCurrBSS);
178 } 178 }
179 } 179 }
@@ -182,7 +182,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
182 ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || 182 ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
183 ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) 183 ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))
184 ) { 184 ) {
185 pCurrBSS->bSelected = TRUE; 185 pCurrBSS->bSelected = true;
186 return(pCurrBSS); 186 return(pCurrBSS);
187 } 187 }
188 } 188 }
@@ -225,7 +225,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
225 } 225 }
226/* 226/*
227 if (pMgmt->eAuthenMode < WMAC_AUTH_WPA) { 227 if (pMgmt->eAuthenMode < WMAC_AUTH_WPA) {
228 if (pCurrBSS->bWPAValid == TRUE) { 228 if (pCurrBSS->bWPAValid == true) {
229 // WPA AP will reject connection of station without WPA enable. 229 // WPA AP will reject connection of station without WPA enable.
230 continue; 230 continue;
231 } 231 }
@@ -254,7 +254,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE;
254 } 254 }
255 } 255 }
256 if (pSelect != NULL) { 256 if (pSelect != NULL) {
257 pSelect->bSelected = TRUE; 257 pSelect->bSelected = true;
258/* 258/*
259 if (pDevice->bRoaming == FALSE) { 259 if (pDevice->bRoaming == FALSE) {
260 // Einsn Add @20070907 260 // Einsn Add @20070907
@@ -321,7 +321,7 @@ BSSvClearBSSList(
321 * search BSS list by BSSID & SSID if matched 321 * search BSS list by BSSID & SSID if matched
322 * 322 *
323 * Return Value: 323 * Return Value:
324 * TRUE if found. 324 * true if found.
325 * 325 *
326-*/ 326-*/
327PKnownBSS 327PKnownBSS
@@ -363,7 +363,7 @@ BSSpAddrIsInBSSList(
363 * Insert a BSS set into known BSS list 363 * Insert a BSS set into known BSS list
364 * 364 *
365 * Return Value: 365 * Return Value:
366 * TRUE if success. 366 * true if success.
367 * 367 *
368-*/ 368-*/
369 369
@@ -412,7 +412,7 @@ BSSbInsertToBSSList (
412 return FALSE; 412 return FALSE;
413 } 413 }
414 // save the BSS info 414 // save the BSS info
415 pBSSList->bActive = TRUE; 415 pBSSList->bActive = true;
416 memcpy( pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN); 416 memcpy( pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN);
417 HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp)); 417 HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp));
418 LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp)); 418 LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp));
@@ -446,7 +446,7 @@ BSSbInsertToBSSList (
446 if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) { 446 if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
447 pBSSList->eNetworkTypeInUse = PHY_TYPE_11A; 447 pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
448 } else { 448 } else {
449 if (pBSSList->sERP.bERPExist == TRUE) { 449 if (pBSSList->sERP.bERPExist == true) {
450 pBSSList->eNetworkTypeInUse = PHY_TYPE_11G; 450 pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
451 } else { 451 } else {
452 pBSSList->eNetworkTypeInUse = PHY_TYPE_11B; 452 pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -462,7 +462,7 @@ BSSbInsertToBSSList (
462 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { 462 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
463 // assoc with BSS 463 // assoc with BSS
464 if (pBSSList == pMgmt->pCurrBSS) { 464 if (pBSSList == pMgmt->pCurrBSS) {
465 bParsingQuiet = TRUE; 465 bParsingQuiet = true;
466 } 466 }
467 } 467 }
468 468
@@ -489,25 +489,25 @@ BSSbInsertToBSSList (
489 } 489 }
490 } 490 }
491 491
492 if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) { 492 if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) {
493 493
494 PSKeyItem pTransmitKey = NULL; 494 PSKeyItem pTransmitKey = NULL;
495 BOOL bIs802_1x = FALSE; 495 BOOL bIs802_1x = FALSE;
496 496
497 for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) { 497 for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) {
498 if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) { 498 if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) {
499 bIs802_1x = TRUE; 499 bIs802_1x = true;
500 break; 500 break;
501 } 501 }
502 } 502 }
503 if ((bIs802_1x == TRUE) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) && 503 if ((bIs802_1x == true) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) &&
504 ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { 504 ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) {
505 505
506 bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj); 506 bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj);
507 507
508 if ((pDevice->bLinkPass == TRUE) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { 508 if ((pDevice->bLinkPass == true) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
509 if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) || 509 if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == true) ||
510 (KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == TRUE)) { 510 (KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == true)) {
511 pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList; 511 pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList;
512 pDevice->gsPMKIDCandidate.Version = 1; 512 pDevice->gsPMKIDCandidate.Version = 1;
513 513
@@ -527,19 +527,19 @@ BSSbInsertToBSSList (
527 } 527 }
528 528
529 if ((pIE_Country != NULL) && 529 if ((pIE_Country != NULL) &&
530 (pMgmt->b11hEnable == TRUE)) { 530 (pMgmt->b11hEnable == true)) {
531 set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse, 531 set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
532 pIE_Country); 532 pIE_Country);
533 } 533 }
534 534
535 if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { 535 if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
536 if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && 536 if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
537 (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { 537 (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
538 // valid EID 538 // valid EID
539 if (pQuiet == NULL) { 539 if (pQuiet == NULL) {
540 pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; 540 pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
541 CARDbSetQuiet( pMgmt->pAdapter, 541 CARDbSetQuiet( pMgmt->pAdapter,
542 TRUE, 542 true,
543 pQuiet->byQuietCount, 543 pQuiet->byQuietCount,
544 pQuiet->byQuietPeriod, 544 pQuiet->byQuietPeriod,
545 *((unsigned short *)pQuiet->abyQuietDuration), 545 *((unsigned short *)pQuiet->abyQuietDuration),
@@ -558,7 +558,7 @@ BSSbInsertToBSSList (
558 } 558 }
559 } 559 }
560 560
561 if ((bParsingQuiet == TRUE) && 561 if ((bParsingQuiet == true) &&
562 (pQuiet != NULL)) { 562 (pQuiet != NULL)) {
563 CARDbStartQuiet(pMgmt->pAdapter); 563 CARDbStartQuiet(pMgmt->pAdapter);
564 } 564 }
@@ -568,7 +568,7 @@ BSSbInsertToBSSList (
568 pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; 568 pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
569 memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); 569 memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
570 570
571 return TRUE; 571 return true;
572} 572}
573 573
574 574
@@ -578,7 +578,7 @@ BSSbInsertToBSSList (
578 * Update BSS set in known BSS list 578 * Update BSS set in known BSS list
579 * 579 *
580 * Return Value: 580 * Return Value:
581 * TRUE if success. 581 * true if success.
582 * 582 *
583-*/ 583-*/
584// TODO: input structure modify 584// TODO: input structure modify
@@ -646,7 +646,7 @@ BSSbUpdateToBSSList (
646 if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) { 646 if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) {
647 pBSSList->eNetworkTypeInUse = PHY_TYPE_11A; 647 pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
648 } else { 648 } else {
649 if (pBSSList->sERP.bERPExist == TRUE) { 649 if (pBSSList->sERP.bERPExist == true) {
650 pBSSList->eNetworkTypeInUse = PHY_TYPE_11G; 650 pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
651 } else { 651 } else {
652 pBSSList->eNetworkTypeInUse = PHY_TYPE_11B; 652 pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
@@ -663,7 +663,7 @@ BSSbUpdateToBSSList (
663 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { 663 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
664 // assoc with BSS 664 // assoc with BSS
665 if (pBSSList == pMgmt->pCurrBSS) { 665 if (pBSSList == pMgmt->pCurrBSS) {
666 bParsingQuiet = TRUE; 666 bParsingQuiet = true;
667 } 667 }
668 } 668 }
669 669
@@ -703,19 +703,19 @@ BSSbUpdateToBSSList (
703 } 703 }
704 704
705 if ((pIE_Country != NULL) && 705 if ((pIE_Country != NULL) &&
706 (pMgmt->b11hEnable == TRUE)) { 706 (pMgmt->b11hEnable == true)) {
707 set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse, 707 set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse,
708 pIE_Country); 708 pIE_Country);
709 } 709 }
710 710
711 if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { 711 if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) {
712 if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && 712 if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) &&
713 (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { 713 (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) {
714 // valid EID 714 // valid EID
715 if (pQuiet == NULL) { 715 if (pQuiet == NULL) {
716 pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; 716 pQuiet = (PWLAN_IE_QUIET)pIE_Quiet;
717 CARDbSetQuiet( pMgmt->pAdapter, 717 CARDbSetQuiet( pMgmt->pAdapter,
718 TRUE, 718 true,
719 pQuiet->byQuietCount, 719 pQuiet->byQuietCount,
720 pQuiet->byQuietPeriod, 720 pQuiet->byQuietPeriod,
721 *((unsigned short *)pQuiet->abyQuietDuration), 721 *((unsigned short *)pQuiet->abyQuietDuration),
@@ -734,7 +734,7 @@ BSSbUpdateToBSSList (
734 } 734 }
735 } 735 }
736 736
737 if ((bParsingQuiet == TRUE) && 737 if ((bParsingQuiet == true) &&
738 (pQuiet != NULL)) { 738 (pQuiet != NULL)) {
739 CARDbStartQuiet(pMgmt->pAdapter); 739 CARDbStartQuiet(pMgmt->pAdapter);
740 } 740 }
@@ -744,7 +744,7 @@ BSSbUpdateToBSSList (
744 pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; 744 pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
745 memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); 745 memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
746 746
747 return TRUE; 747 return true;
748} 748}
749 749
750 750
@@ -773,7 +773,7 @@ BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr,
773 if (pMgmt->sNodeDBTable[ii].bActive) { 773 if (pMgmt->sNodeDBTable[ii].bActive) {
774 if (!compare_ether_addr(abyDstAddr, pMgmt->sNodeDBTable[ii].abyMACAddr)) { 774 if (!compare_ether_addr(abyDstAddr, pMgmt->sNodeDBTable[ii].abyMACAddr)) {
775 *puNodeIndex = ii; 775 *puNodeIndex = ii;
776 return TRUE; 776 return true;
777 } 777 }
778 } 778 }
779 } 779 }
@@ -833,7 +833,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex)
833 } 833 }
834 834
835 memset(&pMgmt->sNodeDBTable[*puNodeIndex], 0, sizeof(KnownNodeDB)); 835 memset(&pMgmt->sNodeDBTable[*puNodeIndex], 0, sizeof(KnownNodeDB));
836 pMgmt->sNodeDBTable[*puNodeIndex].bActive = TRUE; 836 pMgmt->sNodeDBTable[*puNodeIndex].bActive = true;
837 pMgmt->sNodeDBTable[*puNodeIndex].uRatePollTimeout = FALLBACK_POLL_SECOND; 837 pMgmt->sNodeDBTable[*puNodeIndex].uRatePollTimeout = FALLBACK_POLL_SECOND;
838 // for AP mode PS queue 838 // for AP mode PS queue
839 skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue); 839 skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue);
@@ -902,7 +902,7 @@ BSSvUpdateAPNode(
902 902
903 memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); 903 memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
904 904
905 pMgmt->sNodeDBTable[0].bActive = TRUE; 905 pMgmt->sNodeDBTable[0].bActive = true;
906 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { 906 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
907 uRateLen = WLAN_RATES_MAXLEN_11B; 907 uRateLen = WLAN_RATES_MAXLEN_11B;
908 } 908 }
@@ -915,7 +915,7 @@ BSSvUpdateAPNode(
915 RATEvParseMaxRate((void *)pDevice, 915 RATEvParseMaxRate((void *)pDevice,
916 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 916 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
917 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, 917 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
918 TRUE, 918 true,
919 &(pMgmt->sNodeDBTable[0].wMaxBasicRate), 919 &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
920 &(pMgmt->sNodeDBTable[0].wMaxSuppRate), 920 &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
921 &(pMgmt->sNodeDBTable[0].wSuppRate), 921 &(pMgmt->sNodeDBTable[0].wSuppRate),
@@ -962,13 +962,13 @@ BSSvAddMulticastNode(
962 if (!pDevice->bEnableHostWEP) 962 if (!pDevice->bEnableHostWEP)
963 memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); 963 memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
964 memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN); 964 memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN);
965 pMgmt->sNodeDBTable[0].bActive = TRUE; 965 pMgmt->sNodeDBTable[0].bActive = true;
966 pMgmt->sNodeDBTable[0].bPSEnable = FALSE; 966 pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
967 skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue); 967 skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue);
968 RATEvParseMaxRate((void *)pDevice, 968 RATEvParseMaxRate((void *)pDevice,
969 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 969 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
970 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, 970 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
971 TRUE, 971 true,
972 &(pMgmt->sNodeDBTable[0].wMaxBasicRate), 972 &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
973 &(pMgmt->sNodeDBTable[0].wMaxSuppRate), 973 &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
974 &(pMgmt->sNodeDBTable[0].wSuppRate), 974 &(pMgmt->sNodeDBTable[0].wSuppRate),
@@ -1027,12 +1027,12 @@ BSSvSecondCallBack(
1027 //2008-4-14 <add> by chester for led issue 1027 //2008-4-14 <add> by chester for led issue
1028#ifdef FOR_LED_ON_NOTEBOOK 1028#ifdef FOR_LED_ON_NOTEBOOK
1029MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); 1029MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
1030if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){ 1030if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == true)))&&(cc==FALSE)){
1031cc=TRUE; 1031cc=true;
1032} 1032}
1033else if(cc==TRUE){ 1033else if(cc==true){
1034 1034
1035if(pDevice->bHWRadioOff == TRUE){ 1035if(pDevice->bHWRadioOff == true){
1036 if ( !(pDevice->byGPIO & GPIO0_DATA)) 1036 if ( !(pDevice->byGPIO & GPIO0_DATA))
1037//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) 1037//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
1038{if(status==1) goto start; 1038{if(status==1) goto start;
@@ -1085,11 +1085,11 @@ start:
1085 1085
1086{ 1086{
1087 pDevice->byReAssocCount++; 1087 pDevice->byReAssocCount++;
1088 if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != TRUE)) { //10 sec timeout 1088 if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) { //10 sec timeout
1089 printk("Re-association timeout!!!\n"); 1089 printk("Re-association timeout!!!\n");
1090 pDevice->byReAssocCount = 0; 1090 pDevice->byReAssocCount = 0;
1091 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1091 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1092 // if(pDevice->bWPASuppWextEnabled == TRUE) 1092 // if(pDevice->bWPASuppWextEnabled == true)
1093 { 1093 {
1094 union iwreq_data wrqu; 1094 union iwreq_data wrqu;
1095 memset(&wrqu, 0, sizeof (wrqu)); 1095 memset(&wrqu, 0, sizeof (wrqu));
@@ -1099,7 +1099,7 @@ start:
1099 } 1099 }
1100 #endif 1100 #endif
1101 } 1101 }
1102 else if(pDevice->bLinkPass == TRUE) 1102 else if(pDevice->bLinkPass == true)
1103 pDevice->byReAssocCount = 0; 1103 pDevice->byReAssocCount = 0;
1104} 1104}
1105 1105
@@ -1193,7 +1193,7 @@ start:
1193 if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) { 1193 if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) {
1194 if (!pDevice->bProtectMode) { 1194 if (!pDevice->bProtectMode) {
1195 MACvEnableProtectMD(pDevice->PortOffset); 1195 MACvEnableProtectMD(pDevice->PortOffset);
1196 pDevice->bProtectMode = TRUE; 1196 pDevice->bProtectMode = true;
1197 } 1197 }
1198 } 1198 }
1199 else { 1199 else {
@@ -1213,7 +1213,7 @@ start:
1213 } 1213 }
1214 else { 1214 else {
1215 if (!pDevice->bShortSlotTime) { 1215 if (!pDevice->bShortSlotTime) {
1216 pDevice->bShortSlotTime = TRUE; 1216 pDevice->bShortSlotTime = true;
1217 BBvSetShortSlotTime(pDevice); 1217 BBvSetShortSlotTime(pDevice);
1218 vUpdateIFS((void *)pDevice); 1218 vUpdateIFS((void *)pDevice);
1219 } 1219 }
@@ -1224,7 +1224,7 @@ start:
1224 if (uLongPreambleSTACnt > 0) { 1224 if (uLongPreambleSTACnt > 0) {
1225 if (!pDevice->bBarkerPreambleMd) { 1225 if (!pDevice->bBarkerPreambleMd) {
1226 MACvEnableBarkerPreambleMd(pDevice->PortOffset); 1226 MACvEnableBarkerPreambleMd(pDevice->PortOffset);
1227 pDevice->bBarkerPreambleMd = TRUE; 1227 pDevice->bBarkerPreambleMd = true;
1228 } 1228 }
1229 } 1229 }
1230 else { 1230 else {
@@ -1240,7 +1240,7 @@ start:
1240 // Check if any STA in PS mode, enable DTIM multicast deliver 1240 // Check if any STA in PS mode, enable DTIM multicast deliver
1241 if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { 1241 if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
1242 if (uSleepySTACnt > 0) 1242 if (uSleepySTACnt > 0)
1243 pMgmt->sNodeDBTable[0].bPSEnable = TRUE; 1243 pMgmt->sNodeDBTable[0].bPSEnable = true;
1244 else 1244 else
1245 pMgmt->sNodeDBTable[0].bPSEnable = FALSE; 1245 pMgmt->sNodeDBTable[0].bPSEnable = FALSE;
1246 } 1246 }
@@ -1274,7 +1274,7 @@ start:
1274 pMgmt->eCurrState = WMAC_STATE_IDLE; 1274 pMgmt->eCurrState = WMAC_STATE_IDLE;
1275 netif_stop_queue(pDevice->dev); 1275 netif_stop_queue(pDevice->dev);
1276 pDevice->bLinkPass = FALSE; 1276 pDevice->bLinkPass = FALSE;
1277 pDevice->bRoaming = TRUE; 1277 pDevice->bRoaming = true;
1278 DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount); 1278 DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount);
1279 if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { 1279 if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
1280 wpahdr = (viawget_wpa_header *)pDevice->skb->data; 1280 wpahdr = (viawget_wpa_header *)pDevice->skb->data;
@@ -1291,7 +1291,7 @@ start:
1291 pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); 1291 pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz);
1292 }; 1292 };
1293 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1293 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1294 // if(pDevice->bWPASuppWextEnabled == TRUE) 1294 // if(pDevice->bWPASuppWextEnabled == true)
1295 { 1295 {
1296 union iwreq_data wrqu; 1296 union iwreq_data wrqu;
1297 memset(&wrqu, 0, sizeof (wrqu)); 1297 memset(&wrqu, 0, sizeof (wrqu));
@@ -1307,7 +1307,7 @@ start:
1307 pDevice->uAutoReConnectTime++; 1307 pDevice->uAutoReConnectTime++;
1308 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1308 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1309 //network manager support need not do Roaming scan??? 1309 //network manager support need not do Roaming scan???
1310 if(pDevice->bWPASuppWextEnabled ==TRUE) 1310 if(pDevice->bWPASuppWextEnabled ==true)
1311 pDevice->uAutoReConnectTime = 0; 1311 pDevice->uAutoReConnectTime = 0;
1312 #endif 1312 #endif
1313 } 1313 }
@@ -1686,7 +1686,7 @@ RxCnt = pDevice->scStatistic.RxFcsErrCnt +
1686TxOkRatio = (TxCnt < 6) ? 4000:((pDevice->scStatistic.TxNoRetryOkCount * 4000) / TxCnt); 1686TxOkRatio = (TxCnt < 6) ? 4000:((pDevice->scStatistic.TxNoRetryOkCount * 4000) / TxCnt);
1687RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt); 1687RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt);
1688//decide link quality 1688//decide link quality
1689if(pDevice->bLinkPass !=TRUE) 1689if(pDevice->bLinkPass !=true)
1690{ 1690{
1691 // printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n"); 1691 // printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n");
1692 pDevice->scStatistic.LinkQuality = 0; 1692 pDevice->scStatistic.LinkQuality = 0;
diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c
index c9f0d7a2b1ae..a0dc1ffc2a17 100644
--- a/drivers/staging/vt6655/card.c
+++ b/drivers/staging/vt6655/card.c
@@ -365,7 +365,7 @@ s_vSetRSPINF (PSDevice pDevice, CARD_PHY_TYPE ePHYType, void *pvSupportRateIEs,
365 * Out: 365 * Out:
366 * none 366 * none
367 * 367 *
368 * Return Value: TRUE if succeeded; FALSE if failed. 368 * Return Value: true if succeeded; FALSE if failed.
369 * 369 *
370 */ 370 */
371/* 371/*
@@ -380,7 +380,7 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp
380 return TXbTD1Send(pDevice, pPacket, uLength); 380 return TXbTD1Send(pDevice, pPacket, uLength);
381 } 381 }
382 382
383 return (TRUE); 383 return (true);
384} 384}
385*/ 385*/
386 386
@@ -394,7 +394,7 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp
394 * Out: 394 * Out:
395 * none 395 * none
396 * 396 *
397 * Return Value: TRUE if short preamble; otherwise FALSE 397 * Return Value: true if short preamble; otherwise FALSE
398 * 398 *
399 */ 399 */
400BOOL CARDbIsShortPreamble (void *pDeviceHandler) 400BOOL CARDbIsShortPreamble (void *pDeviceHandler)
@@ -403,7 +403,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler)
403 if (pDevice->byPreambleType == 0) { 403 if (pDevice->byPreambleType == 0) {
404 return(FALSE); 404 return(FALSE);
405 } 405 }
406 return(TRUE); 406 return(true);
407} 407}
408 408
409/* 409/*
@@ -415,7 +415,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler)
415 * Out: 415 * Out:
416 * none 416 * none
417 * 417 *
418 * Return Value: TRUE if short slot time; otherwise FALSE 418 * Return Value: true if short slot time; otherwise FALSE
419 * 419 *
420 */ 420 */
421BOOL CARDbIsShorSlotTime (void *pDeviceHandler) 421BOOL CARDbIsShorSlotTime (void *pDeviceHandler)
@@ -587,7 +587,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne
587 pDevice->bySlot = bySlot; 587 pDevice->bySlot = bySlot;
588 VNSvOutPortB(pDevice->PortOffset + MAC_REG_SLOT, pDevice->bySlot); 588 VNSvOutPortB(pDevice->PortOffset + MAC_REG_SLOT, pDevice->bySlot);
589 if (pDevice->bySlot == C_SLOT_SHORT) { 589 if (pDevice->bySlot == C_SLOT_SHORT) {
590 pDevice->bShortSlotTime = TRUE; 590 pDevice->bShortSlotTime = true;
591 } else { 591 } else {
592 pDevice->bShortSlotTime = FALSE; 592 pDevice->bShortSlotTime = FALSE;
593 } 593 }
@@ -605,7 +605,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne
605 s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates); 605 s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates);
606 pDevice->eCurrentPHYType = ePHYType; 606 pDevice->eCurrentPHYType = ePHYType;
607 // set for NDIS OID_802_11SUPPORTED_RATES 607 // set for NDIS OID_802_11SUPPORTED_RATES
608 return (TRUE); 608 return (true);
609} 609}
610 610
611/* 611/*
@@ -641,7 +641,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi
641 VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset)); 641 VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset));
642 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN); 642 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN);
643 } 643 }
644 return(TRUE); 644 return(true);
645} 645}
646 646
647 647
@@ -656,7 +656,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi
656 * Out: 656 * Out:
657 * none 657 * none
658 * 658 *
659 * Return Value: TRUE if succeed; otherwise FALSE 659 * Return Value: true if succeed; otherwise FALSE
660 * 660 *
661 */ 661 */
662BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval) 662BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
@@ -695,7 +695,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
695 VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); 695 VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT));
696 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); 696 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN);
697 697
698 return(TRUE); 698 return(true);
699} 699}
700 700
701 701
@@ -710,7 +710,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval)
710 * Out: 710 * Out:
711 * none 711 * none
712 * 712 *
713 * Return Value: TRUE if all data packet complete; otherwise FALSE. 713 * Return Value: true if all data packet complete; otherwise FALSE.
714 * 714 *
715 */ 715 */
716BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) 716BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
@@ -719,19 +719,19 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
719 719
720 720
721 if (ePktType == PKT_TYPE_802_11_ALL) { 721 if (ePktType == PKT_TYPE_802_11_ALL) {
722 pDevice->bStopBeacon = TRUE; 722 pDevice->bStopBeacon = true;
723 pDevice->bStopTx0Pkt = TRUE; 723 pDevice->bStopTx0Pkt = true;
724 pDevice->bStopDataPkt = TRUE; 724 pDevice->bStopDataPkt = true;
725 } else if (ePktType == PKT_TYPE_802_11_BCN) { 725 } else if (ePktType == PKT_TYPE_802_11_BCN) {
726 pDevice->bStopBeacon = TRUE; 726 pDevice->bStopBeacon = true;
727 } else if (ePktType == PKT_TYPE_802_11_MNG) { 727 } else if (ePktType == PKT_TYPE_802_11_MNG) {
728 pDevice->bStopTx0Pkt = TRUE; 728 pDevice->bStopTx0Pkt = true;
729 } else if (ePktType == PKT_TYPE_802_11_DATA) { 729 } else if (ePktType == PKT_TYPE_802_11_DATA) {
730 pDevice->bStopDataPkt = TRUE; 730 pDevice->bStopDataPkt = true;
731 } 731 }
732 732
733 if (pDevice->bStopBeacon == TRUE) { 733 if (pDevice->bStopBeacon == true) {
734 if (pDevice->bIsBeaconBufReadySet == TRUE) { 734 if (pDevice->bIsBeaconBufReadySet == true) {
735 if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) { 735 if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) {
736 pDevice->cbBeaconBufReadySetCnt ++; 736 pDevice->cbBeaconBufReadySetCnt ++;
737 return(FALSE); 737 return(FALSE);
@@ -742,19 +742,19 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
742 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); 742 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
743 } 743 }
744 // wait all TD0 complete 744 // wait all TD0 complete
745 if (pDevice->bStopTx0Pkt == TRUE) { 745 if (pDevice->bStopTx0Pkt == true) {
746 if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){ 746 if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){
747 return(FALSE); 747 return(FALSE);
748 } 748 }
749 } 749 }
750 // wait all Data TD complete 750 // wait all Data TD complete
751 if (pDevice->bStopDataPkt == TRUE) { 751 if (pDevice->bStopDataPkt == true) {
752 if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ 752 if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){
753 return(FALSE); 753 return(FALSE);
754 } 754 }
755 } 755 }
756 756
757 return(TRUE); 757 return(true);
758} 758}
759 759
760 760
@@ -768,7 +768,7 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
768 * Out: 768 * Out:
769 * none 769 * none
770 * 770 *
771 * Return Value: TRUE if success; FALSE if failed. 771 * Return Value: true if success; FALSE if failed.
772 * 772 *
773 */ 773 */
774BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) 774BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
@@ -789,12 +789,12 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
789 } 789 }
790 790
791 if ((pDevice->bStopBeacon == FALSE) && 791 if ((pDevice->bStopBeacon == FALSE) &&
792 (pDevice->bBeaconBufReady == TRUE) && 792 (pDevice->bBeaconBufReady == true) &&
793 (pDevice->eOPMode == OP_MODE_ADHOC)) { 793 (pDevice->eOPMode == OP_MODE_ADHOC)) {
794 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); 794 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX);
795 } 795 }
796 796
797 return(TRUE); 797 return(true);
798} 798}
799 799
800 800
@@ -810,7 +810,7 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
810 * Out: 810 * Out:
811 * none 811 * none
812 * 812 *
813 * Return Value: TRUE if success; FALSE if failed. 813 * Return Value: true if success; FALSE if failed.
814 * 814 *
815 */ 815 */
816BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode) 816BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
@@ -837,14 +837,14 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
837 } else { 837 } else {
838 if (is_zero_ether_addr(pDevice->abyBSSID) == FALSE) { 838 if (is_zero_ether_addr(pDevice->abyBSSID) == FALSE) {
839 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); 839 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
840 pDevice->bBSSIDFilter = TRUE; 840 pDevice->bBSSIDFilter = true;
841 pDevice->byRxMode |= RCR_BSSID; 841 pDevice->byRxMode |= RCR_BSSID;
842 } 842 }
843 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode ); 843 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode );
844 } 844 }
845 // Adopt BSS state in Adapter Device Object 845 // Adopt BSS state in Adapter Device Object
846 pDevice->eOPMode = eOPMode; 846 pDevice->eOPMode = eOPMode;
847 return(TRUE); 847 return(true);
848} 848}
849 849
850 850
@@ -858,7 +858,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
858 * Out: 858 * Out:
859 * none 859 * none
860 * 860 *
861 * Return Value: TRUE if success; FALSE if failed. 861 * Return Value: true if success; FALSE if failed.
862 * 862 *
863 */ 863 */
864 864
@@ -879,7 +879,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e
879 * Out: 879 * Out:
880 * none 880 * none
881 * 881 *
882 * Return Value: TRUE if succeed; otherwise FALSE 882 * Return Value: true if succeed; otherwise FALSE
883 * 883 *
884 */ 884 */
885BOOL CARDbSetTxDataRate( 885BOOL CARDbSetTxDataRate(
@@ -890,7 +890,7 @@ BOOL CARDbSetTxDataRate(
890 PSDevice pDevice = (PSDevice) pDeviceHandler; 890 PSDevice pDevice = (PSDevice) pDeviceHandler;
891 891
892 pDevice->wCurrentRate = wDataRate; 892 pDevice->wCurrentRate = wDataRate;
893 return(TRUE); 893 return(true);
894} 894}
895 895
896/*+ 896/*+
@@ -904,7 +904,7 @@ BOOL CARDbSetTxDataRate(
904 * Out: 904 * Out:
905 * none 905 * none
906 * 906 *
907 * Return Value: TRUE if power down success; otherwise FALSE 907 * Return Value: true if power down success; otherwise FALSE
908 * 908 *
909-*/ 909-*/
910BOOL 910BOOL
@@ -917,7 +917,7 @@ CARDbPowerDown(
917 917
918 // check if already in Doze mode 918 // check if already in Doze mode
919 if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS)) 919 if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS))
920 return TRUE; 920 return true;
921 921
922 // Froce PSEN on 922 // Froce PSEN on
923 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); 923 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
@@ -931,7 +931,7 @@ CARDbPowerDown(
931 931
932 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); 932 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
933 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Go to Doze ZZZZZZZZZZZZZZZ\n"); 933 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Go to Doze ZZZZZZZZZZZZZZZ\n");
934 return TRUE; 934 return true;
935} 935}
936 936
937/* 937/*
@@ -943,16 +943,16 @@ CARDbPowerDown(
943 * Out: 943 * Out:
944 * none 944 * none
945 * 945 *
946 * Return Value: TRUE if success; otherwise FALSE 946 * Return Value: true if success; otherwise FALSE
947 * 947 *
948 */ 948 */
949BOOL CARDbRadioPowerOff (void *pDeviceHandler) 949BOOL CARDbRadioPowerOff (void *pDeviceHandler)
950{ 950{
951 PSDevice pDevice = (PSDevice) pDeviceHandler; 951 PSDevice pDevice = (PSDevice) pDeviceHandler;
952 BOOL bResult = TRUE; 952 BOOL bResult = true;
953 953
954 if (pDevice->bRadioOff == TRUE) 954 if (pDevice->bRadioOff == true)
955 return TRUE; 955 return true;
956 956
957 957
958 switch (pDevice->byRFType) { 958 switch (pDevice->byRFType) {
@@ -975,7 +975,7 @@ BOOL CARDbRadioPowerOff (void *pDeviceHandler)
975 975
976 BBvSetDeepSleep(pDevice->PortOffset, pDevice->byLocalID); 976 BBvSetDeepSleep(pDevice->PortOffset, pDevice->byLocalID);
977 977
978 pDevice->bRadioOff = TRUE; 978 pDevice->bRadioOff = true;
979 //2007-0409-03,<Add> by chester 979 //2007-0409-03,<Add> by chester
980printk("chester power off\n"); 980printk("chester power off\n");
981MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue 981MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
@@ -992,23 +992,23 @@ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
992 * Out: 992 * Out:
993 * none 993 * none
994 * 994 *
995 * Return Value: TRUE if success; otherwise FALSE 995 * Return Value: true if success; otherwise FALSE
996 * 996 *
997 */ 997 */
998BOOL CARDbRadioPowerOn (void *pDeviceHandler) 998BOOL CARDbRadioPowerOn (void *pDeviceHandler)
999{ 999{
1000 PSDevice pDevice = (PSDevice) pDeviceHandler; 1000 PSDevice pDevice = (PSDevice) pDeviceHandler;
1001 BOOL bResult = TRUE; 1001 BOOL bResult = true;
1002printk("chester power on\n"); 1002printk("chester power on\n");
1003 if (pDevice->bRadioControlOff == TRUE){ 1003 if (pDevice->bRadioControlOff == true){
1004if (pDevice->bHWRadioOff == TRUE) printk("chester bHWRadioOff\n"); 1004if (pDevice->bHWRadioOff == true) printk("chester bHWRadioOff\n");
1005if (pDevice->bRadioControlOff == TRUE) printk("chester bRadioControlOff\n"); 1005if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n");
1006 return FALSE;} 1006 return FALSE;}
1007 1007
1008 if (pDevice->bRadioOff == FALSE) 1008 if (pDevice->bRadioOff == FALSE)
1009 { 1009 {
1010printk("chester pbRadioOff\n"); 1010printk("chester pbRadioOff\n");
1011return TRUE;} 1011return true;}
1012 1012
1013 BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID); 1013 BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID);
1014 1014
@@ -1044,7 +1044,7 @@ BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID)
1044 PSDevice pDevice = (PSDevice) pDeviceHandler; 1044 PSDevice pDevice = (PSDevice) pDeviceHandler;
1045 1045
1046 KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset); 1046 KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset);
1047 return (TRUE); 1047 return (true);
1048} 1048}
1049 1049
1050 1050
@@ -1093,18 +1093,18 @@ CARDbAdd_PMKID_Candidate (
1093 for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { 1093 for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
1094 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; 1094 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii];
1095 if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) { 1095 if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) {
1096 if ((bRSNCapExist == TRUE) && (wRSNCap & BIT0)) { 1096 if ((bRSNCapExist == true) && (wRSNCap & BIT0)) {
1097 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; 1097 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
1098 } else { 1098 } else {
1099 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); 1099 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
1100 } 1100 }
1101 return TRUE; 1101 return true;
1102 } 1102 }
1103 } 1103 }
1104 1104
1105 // New Candidate 1105 // New Candidate
1106 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates]; 1106 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates];
1107 if ((bRSNCapExist == TRUE) && (wRSNCap & BIT0)) { 1107 if ((bRSNCapExist == true) && (wRSNCap & BIT0)) {
1108 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; 1108 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
1109 } else { 1109 } else {
1110 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); 1110 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -1112,7 +1112,7 @@ CARDbAdd_PMKID_Candidate (
1112 memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN); 1112 memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN);
1113 pDevice->gsPMKIDCandidate.NumCandidates++; 1113 pDevice->gsPMKIDCandidate.NumCandidates++;
1114 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); 1114 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
1115 return TRUE; 1115 return true;
1116} 1116}
1117 1117
1118void * 1118void *
@@ -1150,15 +1150,15 @@ CARDbStartMeasure (
1150 PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs; 1150 PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs;
1151 QWORD qwCurrTSF; 1151 QWORD qwCurrTSF;
1152 QWORD qwStartTSF; 1152 QWORD qwStartTSF;
1153 BOOL bExpired = TRUE; 1153 BOOL bExpired = true;
1154 unsigned short wDuration = 0; 1154 unsigned short wDuration = 0;
1155 1155
1156 if ((pEID == NULL) || 1156 if ((pEID == NULL) ||
1157 (uNumOfMeasureEIDs == 0)) { 1157 (uNumOfMeasureEIDs == 0)) {
1158 return (TRUE); 1158 return (true);
1159 } 1159 }
1160 CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF); 1160 CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF);
1161 if (pDevice->bMeasureInProgress == TRUE) { 1161 if (pDevice->bMeasureInProgress == true) {
1162 pDevice->bMeasureInProgress = FALSE; 1162 pDevice->bMeasureInProgress = FALSE;
1163 VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR); 1163 VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR);
1164 MACvSelectPage1(pDevice->PortOffset); 1164 MACvSelectPage1(pDevice->PortOffset);
@@ -1240,7 +1240,7 @@ CARDbStartMeasure (
1240 } else { 1240 } else {
1241 // all measure start time expired we should complete action 1241 // all measure start time expired we should complete action
1242 VNTWIFIbMeasureReport( pDevice->pMgmt, 1242 VNTWIFIbMeasureReport( pDevice->pMgmt,
1243 TRUE, 1243 true,
1244 NULL, 1244 NULL,
1245 0, 1245 0,
1246 pDevice->byBasicMap, 1246 pDevice->byBasicMap,
@@ -1248,7 +1248,7 @@ CARDbStartMeasure (
1248 pDevice->abyRPIs 1248 pDevice->abyRPIs
1249 ); 1249 );
1250 } 1250 }
1251 return (TRUE); 1251 return (true);
1252} 1252}
1253 1253
1254 1254
@@ -1275,7 +1275,7 @@ CARDbChannelSwitch (
1275 ) 1275 )
1276{ 1276{
1277 PSDevice pDevice = (PSDevice) pDeviceHandler; 1277 PSDevice pDevice = (PSDevice) pDeviceHandler;
1278 BOOL bResult = TRUE; 1278 BOOL bResult = true;
1279 1279
1280 if (byCount == 0) { 1280 if (byCount == 0) {
1281 bResult = set_channel(pDevice, byNewChannel); 1281 bResult = set_channel(pDevice, byNewChannel);
@@ -1287,7 +1287,7 @@ CARDbChannelSwitch (
1287 } 1287 }
1288 pDevice->byChannelSwitchCount = byCount; 1288 pDevice->byChannelSwitchCount = byCount;
1289 pDevice->byNewChannel = byNewChannel; 1289 pDevice->byNewChannel = byNewChannel;
1290 pDevice->bChannelSwitch = TRUE; 1290 pDevice->bChannelSwitch = true;
1291 if (byMode == 1) { 1291 if (byMode == 1) {
1292 bResult=CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL); 1292 bResult=CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL);
1293 } 1293 }
@@ -1322,7 +1322,7 @@ CARDbSetQuiet (
1322 PSDevice pDevice = (PSDevice) pDeviceHandler; 1322 PSDevice pDevice = (PSDevice) pDeviceHandler;
1323 unsigned int ii = 0; 1323 unsigned int ii = 0;
1324 1324
1325 if (bResetQuiet == TRUE) { 1325 if (bResetQuiet == true) {
1326 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN)); 1326 MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
1327 for(ii=0;ii<MAX_QUIET_COUNT;ii++) { 1327 for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
1328 pDevice->sQuiet[ii].bEnable = FALSE; 1328 pDevice->sQuiet[ii].bEnable = FALSE;
@@ -1333,7 +1333,7 @@ CARDbSetQuiet (
1333 pDevice->byQuietStartCount = byQuietCount; 1333 pDevice->byQuietStartCount = byQuietCount;
1334 } 1334 }
1335 if (pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable == FALSE) { 1335 if (pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable == FALSE) {
1336 pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = TRUE; 1336 pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = true;
1337 pDevice->sQuiet[pDevice->uQuietEnqueue].byPeriod = byQuietPeriod; 1337 pDevice->sQuiet[pDevice->uQuietEnqueue].byPeriod = byQuietPeriod;
1338 pDevice->sQuiet[pDevice->uQuietEnqueue].wDuration = wQuietDuration; 1338 pDevice->sQuiet[pDevice->uQuietEnqueue].wDuration = wQuietDuration;
1339 pDevice->sQuiet[pDevice->uQuietEnqueue].dwStartTime = (unsigned long) byQuietCount; 1339 pDevice->sQuiet[pDevice->uQuietEnqueue].dwStartTime = (unsigned long) byQuietCount;
@@ -1347,7 +1347,7 @@ CARDbSetQuiet (
1347 } else { 1347 } else {
1348 // we can not handle Quiet EID more 1348 // we can not handle Quiet EID more
1349 } 1349 }
1350 return (TRUE); 1350 return (true);
1351} 1351}
1352 1352
1353 1353
@@ -1379,7 +1379,7 @@ CARDbStartQuiet (
1379 unsigned long dwDuration = 0; 1379 unsigned long dwDuration = 0;
1380 1380
1381 for(ii=0;ii<MAX_QUIET_COUNT;ii++) { 1381 for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
1382 if ((pDevice->sQuiet[ii].bEnable == TRUE) && 1382 if ((pDevice->sQuiet[ii].bEnable == true) &&
1383 (dwStartTime > pDevice->sQuiet[ii].dwStartTime)) { 1383 (dwStartTime > pDevice->sQuiet[ii].dwStartTime)) {
1384 dwStartTime = pDevice->sQuiet[ii].dwStartTime; 1384 dwStartTime = pDevice->sQuiet[ii].dwStartTime;
1385 uCurrentQuietIndex = ii; 1385 uCurrentQuietIndex = ii;
@@ -1402,7 +1402,7 @@ CARDbStartQuiet (
1402 pDevice->bEnableFirstQuiet = FALSE; 1402 pDevice->bEnableFirstQuiet = FALSE;
1403 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN)); 1403 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN));
1404 } else { 1404 } else {
1405 pDevice->bEnableFirstQuiet = TRUE; 1405 pDevice->bEnableFirstQuiet = true;
1406 } 1406 }
1407 MACvSelectPage0(pDevice->PortOffset); 1407 MACvSelectPage0(pDevice->PortOffset);
1408 } else { 1408 } else {
@@ -1426,7 +1426,7 @@ CARDbStartQuiet (
1426 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_QUIETRPT); 1426 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_QUIETRPT);
1427 MACvSelectPage0(pDevice->PortOffset); 1427 MACvSelectPage0(pDevice->PortOffset);
1428 } 1428 }
1429 pDevice->bQuietEnable = TRUE; 1429 pDevice->bQuietEnable = true;
1430 pDevice->dwCurrentQuietEndTime = pDevice->sQuiet[uCurrentQuietIndex].dwStartTime; 1430 pDevice->dwCurrentQuietEndTime = pDevice->sQuiet[uCurrentQuietIndex].dwStartTime;
1431 pDevice->dwCurrentQuietEndTime += pDevice->sQuiet[uCurrentQuietIndex].wDuration; 1431 pDevice->dwCurrentQuietEndTime += pDevice->sQuiet[uCurrentQuietIndex].wDuration;
1432 if (pDevice->sQuiet[uCurrentQuietIndex].byPeriod == 0) { 1432 if (pDevice->sQuiet[uCurrentQuietIndex].byPeriod == 0) {
@@ -1441,14 +1441,14 @@ CARDbStartQuiet (
1441 if (pDevice->dwCurrentQuietEndTime > 0x80010000) { 1441 if (pDevice->dwCurrentQuietEndTime > 0x80010000) {
1442 // decreament all time to avoid wrap around 1442 // decreament all time to avoid wrap around
1443 for(ii=0;ii<MAX_QUIET_COUNT;ii++) { 1443 for(ii=0;ii<MAX_QUIET_COUNT;ii++) {
1444 if (pDevice->sQuiet[ii].bEnable == TRUE) { 1444 if (pDevice->sQuiet[ii].bEnable == true) {
1445 pDevice->sQuiet[ii].dwStartTime -= 0x80000000; 1445 pDevice->sQuiet[ii].dwStartTime -= 0x80000000;
1446 } 1446 }
1447 } 1447 }
1448 pDevice->dwCurrentQuietEndTime -= 0x80000000; 1448 pDevice->dwCurrentQuietEndTime -= 0x80000000;
1449 } 1449 }
1450 } 1450 }
1451 return (TRUE); 1451 return (true);
1452} 1452}
1453 1453
1454/* 1454/*
@@ -1475,11 +1475,11 @@ CARDvSetPowerConstraint (
1475 PSDevice pDevice = (PSDevice) pDeviceHandler; 1475 PSDevice pDevice = (PSDevice) pDeviceHandler;
1476 1476
1477 if (byChannel > CB_MAX_CHANNEL_24G) { 1477 if (byChannel > CB_MAX_CHANNEL_24G) {
1478 if (pDevice->bCountryInfo5G == TRUE) { 1478 if (pDevice->bCountryInfo5G == true) {
1479 pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower; 1479 pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower;
1480 } 1480 }
1481 } else { 1481 } else {
1482 if (pDevice->bCountryInfo24G == TRUE) { 1482 if (pDevice->bCountryInfo24G == true) {
1483 pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower; 1483 pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower;
1484 } 1484 }
1485 } 1485 }
@@ -1943,7 +1943,7 @@ void CARDvUpdateBasicTopRate (void *pDeviceHandler)
1943 * Out: 1943 * Out:
1944 * none 1944 * none
1945 * 1945 *
1946 * Return Value: TRUE if succeeded; FALSE if failed. 1946 * Return Value: true if succeeded; FALSE if failed.
1947 * 1947 *
1948 */ 1948 */
1949BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx) 1949BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
@@ -1956,7 +1956,7 @@ BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx)
1956 //Determines the highest basic rate. 1956 //Determines the highest basic rate.
1957 CARDvUpdateBasicTopRate((void *)pDevice); 1957 CARDvUpdateBasicTopRate((void *)pDevice);
1958 1958
1959 return(TRUE); 1959 return(true);
1960} 1960}
1961 1961
1962BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler) 1962BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler)
@@ -1966,7 +1966,7 @@ BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler)
1966 1966
1967 for (ii = RATE_54M; ii >= RATE_6M; ii --) { 1967 for (ii = RATE_54M; ii >= RATE_6M; ii --) {
1968 if ((pDevice->wBasicRate) & ((unsigned short)(1<<ii))) 1968 if ((pDevice->wBasicRate) & ((unsigned short)(1<<ii)))
1969 return TRUE; 1969 return true;
1970 } 1970 }
1971 return FALSE; 1971 return FALSE;
1972} 1972}
@@ -2036,7 +2036,7 @@ BOOL CARDbSoftwareReset (void *pDeviceHandler)
2036 if (!MACbSafeSoftwareReset(pDevice->PortOffset)) 2036 if (!MACbSafeSoftwareReset(pDevice->PortOffset))
2037 return FALSE; 2037 return FALSE;
2038 2038
2039 return TRUE; 2039 return true;
2040} 2040}
2041 2041
2042 2042
@@ -2089,7 +2089,7 @@ QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2)
2089 * Out: 2089 * Out:
2090 * qwCurrTSF - Current TSF counter 2090 * qwCurrTSF - Current TSF counter
2091 * 2091 *
2092 * Return Value: TRUE if success; otherwise FALSE 2092 * Return Value: true if success; otherwise FALSE
2093 * 2093 *
2094 */ 2094 */
2095BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF) 2095BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
@@ -2108,7 +2108,7 @@ BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF)
2108 VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF)); 2108 VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF));
2109 VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF)); 2109 VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF));
2110 2110
2111 return(TRUE); 2111 return(true);
2112} 2112}
2113 2113
2114 2114
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index 15aab95bb8d8..ca2fa04262e0 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -38,62 +38,62 @@ static int msglevel = MSG_LEVEL_INFO;
38static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] = 38static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] =
39{ 39{
40 {0, 0, FALSE, 0}, 40 {0, 0, FALSE, 0},
41 {1, 2412, TRUE, 0}, 41 {1, 2412, true, 0},
42 {2, 2417, TRUE, 0}, 42 {2, 2417, true, 0},
43 {3, 2422, TRUE, 0}, 43 {3, 2422, true, 0},
44 {4, 2427, TRUE, 0}, 44 {4, 2427, true, 0},
45 {5, 2432, TRUE, 0}, 45 {5, 2432, true, 0},
46 {6, 2437, TRUE, 0}, 46 {6, 2437, true, 0},
47 {7, 2442, TRUE, 0}, 47 {7, 2442, true, 0},
48 {8, 2447, TRUE, 0}, 48 {8, 2447, true, 0},
49 {9, 2452, TRUE, 0}, 49 {9, 2452, true, 0},
50 {10, 2457, TRUE, 0}, 50 {10, 2457, true, 0},
51 {11, 2462, TRUE, 0}, 51 {11, 2462, true, 0},
52 {12, 2467, TRUE, 0}, 52 {12, 2467, true, 0},
53 {13, 2472, TRUE, 0}, 53 {13, 2472, true, 0},
54 {14, 2484, TRUE, 0}, 54 {14, 2484, true, 0},
55 {183, 4915, TRUE, 0}, 55 {183, 4915, true, 0},
56 {184, 4920, TRUE, 0}, 56 {184, 4920, true, 0},
57 {185, 4925, TRUE, 0}, 57 {185, 4925, true, 0},
58 {187, 4935, TRUE, 0}, 58 {187, 4935, true, 0},
59 {188, 4940, TRUE, 0}, 59 {188, 4940, true, 0},
60 {189, 4945, TRUE, 0}, 60 {189, 4945, true, 0},
61 {192, 4960, TRUE, 0}, 61 {192, 4960, true, 0},
62 {196, 4980, TRUE, 0}, 62 {196, 4980, true, 0},
63 {7, 5035, TRUE, 0}, 63 {7, 5035, true, 0},
64 {8, 5040, TRUE, 0}, 64 {8, 5040, true, 0},
65 {9, 5045, TRUE, 0}, 65 {9, 5045, true, 0},
66 {11, 5055, TRUE, 0}, 66 {11, 5055, true, 0},
67 {12, 5060, TRUE, 0}, 67 {12, 5060, true, 0},
68 {16, 5080, TRUE, 0}, 68 {16, 5080, true, 0},
69 {34, 5170, TRUE, 0}, 69 {34, 5170, true, 0},
70 {36, 5180, TRUE, 0}, 70 {36, 5180, true, 0},
71 {38, 5190, TRUE, 0}, 71 {38, 5190, true, 0},
72 {40, 5200, TRUE, 0}, 72 {40, 5200, true, 0},
73 {42, 5210, TRUE, 0}, 73 {42, 5210, true, 0},
74 {44, 5220, TRUE, 0}, 74 {44, 5220, true, 0},
75 {46, 5230, TRUE, 0}, 75 {46, 5230, true, 0},
76 {48, 5240, TRUE, 0}, 76 {48, 5240, true, 0},
77 {52, 5260, TRUE, 0}, 77 {52, 5260, true, 0},
78 {56, 5280, TRUE, 0}, 78 {56, 5280, true, 0},
79 {60, 5300, TRUE, 0}, 79 {60, 5300, true, 0},
80 {64, 5320, TRUE, 0}, 80 {64, 5320, true, 0},
81 {100, 5500, TRUE, 0}, 81 {100, 5500, true, 0},
82 {104, 5520, TRUE, 0}, 82 {104, 5520, true, 0},
83 {108, 5540, TRUE, 0}, 83 {108, 5540, true, 0},
84 {112, 5560, TRUE, 0}, 84 {112, 5560, true, 0},
85 {116, 5580, TRUE, 0}, 85 {116, 5580, true, 0},
86 {120, 5600, TRUE, 0}, 86 {120, 5600, true, 0},
87 {124, 5620, TRUE, 0}, 87 {124, 5620, true, 0},
88 {128, 5640, TRUE, 0}, 88 {128, 5640, true, 0},
89 {132, 5660, TRUE, 0}, 89 {132, 5660, true, 0},
90 {136, 5680, TRUE, 0}, 90 {136, 5680, true, 0},
91 {140, 5700, TRUE, 0}, 91 {140, 5700, true, 0},
92 {149, 5745, TRUE, 0}, 92 {149, 5745, true, 0},
93 {153, 5765, TRUE, 0}, 93 {153, 5765, true, 0},
94 {157, 5785, TRUE, 0}, 94 {157, 5785, true, 0},
95 {161, 5805, TRUE, 0}, 95 {161, 5805, true, 0},
96 {165, 5825, TRUE, 0} 96 {165, 5825, true, 0}
97}; 97};
98 98
99/************************************************************************ 99/************************************************************************
@@ -365,7 +365,7 @@ static struct
365 * 15 = 4.9G channel 183 365 * 15 = 4.9G channel 183
366 * 16 = 4.9G channel 184 366 * 16 = 4.9G channel 184
367 * ..... 367 * .....
368 * Output: TRUE if the specified 5GHz band is allowed to be used, 368 * Output: true if the specified 5GHz band is allowed to be used,
369 * FALSE otherwise. 369 * FALSE otherwise.
370 * 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22) 370 * 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22)
371 * 371 *
@@ -414,7 +414,7 @@ BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTab
414 414
415 memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); 415 memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL);
416 416
417 return (TRUE); 417 return (true);
418} 418}
419 419
420void init_channel_table(void *pDeviceHandler) 420void init_channel_table(void *pDeviceHandler)
@@ -440,14 +440,14 @@ void init_channel_table(void *pDeviceHandler)
440 case RF_UW2452 : 440 case RF_UW2452 :
441 case RF_NOTHING : 441 case RF_NOTHING :
442 default : 442 default :
443 bMultiBand = TRUE; 443 bMultiBand = true;
444 break; 444 break;
445 } 445 }
446 446
447 if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == TRUE)) { 447 if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == true)) {
448 if (bMultiBand == TRUE) { 448 if (bMultiBand == true) {
449 for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) { 449 for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
450 sChannelTbl[ii+1].bValid = TRUE; 450 sChannelTbl[ii+1].bValid = true;
451 pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1]; 451 pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
452 pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1]; 452 pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
453 } 453 }
@@ -459,17 +459,17 @@ void init_channel_table(void *pDeviceHandler)
459 for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) { 459 for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) {
460 //2008-8-4 <add> by chester 460 //2008-8-4 <add> by chester
461 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { 461 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
462 sChannelTbl[ii+1].bValid = TRUE; 462 sChannelTbl[ii+1].bValid = true;
463 pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1]; 463 pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
464 pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1]; 464 pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
465 } 465 }
466 } 466 }
467 } 467 }
468 } else if (pDevice->byZoneType <= CCODE_MAX) { 468 } else if (pDevice->byZoneType <= CCODE_MAX) {
469 if (bMultiBand == TRUE) { 469 if (bMultiBand == true) {
470 for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) { 470 for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) {
471 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { 471 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
472 sChannelTbl[ii+1].bValid = TRUE; 472 sChannelTbl[ii+1].bValid = true;
473 pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; 473 pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
474 pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; 474 pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
475 } 475 }
@@ -477,7 +477,7 @@ void init_channel_table(void *pDeviceHandler)
477 } else { 477 } else {
478 for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) { 478 for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) {
479 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { 479 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
480 sChannelTbl[ii+1].bValid = TRUE; 480 sChannelTbl[ii+1].bValid = true;
481 pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; 481 pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
482 pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; 482 pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
483 } 483 }
@@ -522,13 +522,13 @@ unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIn
522 * @pDeviceHandler: The adapter to be set 522 * @pDeviceHandler: The adapter to be set
523 * @uConnectionChannel: Channel to be set 523 * @uConnectionChannel: Channel to be set
524 * 524 *
525 * Return Value: TRUE if succeeded; FALSE if failed. 525 * Return Value: true if succeeded; FALSE if failed.
526 * 526 *
527 */ 527 */
528BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel) 528BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
529{ 529{
530 PSDevice pDevice = (PSDevice) pDeviceHandler; 530 PSDevice pDevice = (PSDevice) pDeviceHandler;
531 BOOL bResult = TRUE; 531 BOOL bResult = true;
532 532
533 533
534 if (pDevice->byCurrentCh == uConnectionChannel) { 534 if (pDevice->byCurrentCh == uConnectionChannel) {
@@ -563,7 +563,7 @@ BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel)
563 bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel); 563 bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel);
564 564
565 // Init Synthesizer Table 565 // Init Synthesizer Table
566 if (pDevice->bEnablePSMode == TRUE) 566 if (pDevice->bEnablePSMode == true)
567 RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel); 567 RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel);
568 568
569 569
@@ -617,13 +617,13 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
617 uNumOfCountryInfo /= 3; 617 uNumOfCountryInfo /= 3;
618 618
619 if (ePHYType == PHY_TYPE_11A) { 619 if (ePHYType == PHY_TYPE_11A) {
620 pDevice->bCountryInfo5G = TRUE; 620 pDevice->bCountryInfo5G = true;
621 for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CARD_MAX_CHANNEL_TBL ; ii++) { 621 for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CARD_MAX_CHANNEL_TBL ; ii++) {
622 sChannelTbl[ii].bValid = FALSE; 622 sChannelTbl[ii].bValid = FALSE;
623 } 623 }
624 step = 4; 624 step = 4;
625 } else { 625 } else {
626 pDevice->bCountryInfo24G = TRUE; 626 pDevice->bCountryInfo24G = true;
627 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { 627 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
628 sChannelTbl[ii].bValid = FALSE; 628 sChannelTbl[ii].bValid = FALSE;
629 } 629 }
@@ -636,7 +636,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE)
636 for(ii = 0 ; ii < uNumOfCountryInfo ; ii++) { 636 for(ii = 0 ; ii < uNumOfCountryInfo ; ii++) {
637 for(uu = 0 ; uu < pIE_Country->abyCountryInfo[ii*3+1] ; uu++) { 637 for(uu = 0 ; uu < pIE_Country->abyCountryInfo[ii*3+1] ; uu++) {
638 byCh = get_channel_mapping(pDevice, (unsigned char)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType); 638 byCh = get_channel_mapping(pDevice, (unsigned char)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType);
639 sChannelTbl[byCh].bValid = TRUE; 639 sChannelTbl[byCh].bValid = true;
640 pDevice->abyRegPwr[byCh] = pIE_Country->abyCountryInfo[ii*3+2]; 640 pDevice->abyRegPwr[byCh] = pIE_Country->abyCountryInfo[ii*3+2];
641 } 641 }
642 } 642 }
@@ -668,18 +668,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
668 byLen = 2; 668 byLen = 2;
669 // lower band 669 // lower band
670 byCount = 0; 670 byCount = 0;
671 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == TRUE) { 671 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == true) {
672 for (ii = 28 ; ii < 36 ; ii+= 2) { 672 for (ii = 28 ; ii < 36 ; ii+= 2) {
673 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { 673 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
674 byCount++; 674 byCount++;
675 } 675 }
676 } 676 }
677 *pbyChTupple++ = 34; 677 *pbyChTupple++ = 34;
678 *pbyChTupple++ = byCount; 678 *pbyChTupple++ = byCount;
679 byLen += 2; 679 byLen += 2;
680 } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == TRUE) { 680 } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == true) {
681 for (ii = 29 ; ii < 36 ; ii+= 2) { 681 for (ii = 29 ; ii < 36 ; ii+= 2) {
682 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { 682 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
683 byCount++; 683 byCount++;
684 } 684 }
685 } 685 }
@@ -689,9 +689,9 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
689 } 689 }
690 // middle band 690 // middle band
691 byCount = 0; 691 byCount = 0;
692 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == TRUE) { 692 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == true) {
693 for (ii = 36 ; ii < 40 ; ii++) { 693 for (ii = 36 ; ii < 40 ; ii++) {
694 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { 694 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
695 byCount++; 695 byCount++;
696 } 696 }
697 } 697 }
@@ -701,18 +701,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs)
701 } 701 }
702 // higher band 702 // higher band
703 byCount = 0; 703 byCount = 0;
704 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == TRUE) { 704 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == true) {
705 for (ii = 40 ; ii < 51 ; ii++) { 705 for (ii = 40 ; ii < 51 ; ii++) {
706 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { 706 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
707 byCount++; 707 byCount++;
708 } 708 }
709 } 709 }
710 *pbyChTupple++ = 100; 710 *pbyChTupple++ = 100;
711 *pbyChTupple++ = byCount; 711 *pbyChTupple++ = byCount;
712 byLen += 2; 712 byLen += 2;
713 } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == TRUE) { 713 } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == true) {
714 for (ii = 51 ; ii < 56 ; ii++) { 714 for (ii = 51 ; ii < 56 ; ii++) {
715 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { 715 if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) {
716 byCount++; 716 byCount++;
717 } 717 }
718 } 718 }
@@ -784,7 +784,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
784 784
785 if (ePHYType == PHY_TYPE_11A) { 785 if (ePHYType == PHY_TYPE_11A) {
786 for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) { 786 for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) {
787 if (sChannelTbl[ii].bValid == TRUE) { 787 if (sChannelTbl[ii].bValid == true) {
788 if (byOptionChannel == 0) { 788 if (byOptionChannel == 0) {
789 byOptionChannel = (unsigned char) ii; 789 byOptionChannel = (unsigned char) ii;
790 } 790 }
@@ -798,7 +798,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
798 } else { 798 } else {
799 byOptionChannel = 0; 799 byOptionChannel = 0;
800 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { 800 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
801 if (sChannelTbl[ii].bValid == TRUE) { 801 if (sChannelTbl[ii].bValid == true) {
802 if (sChannelTbl[ii].byMAP == 0) { 802 if (sChannelTbl[ii].byMAP == 0) {
803 aiWeight[ii] += 100; 803 aiWeight[ii] += 100;
804 } else if (sChannelTbl[ii].byMAP & 0x01) { 804 } else if (sChannelTbl[ii].byMAP & 0x01) {
@@ -825,7 +825,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType)
825 } 825 }
826 } 826 }
827 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { 827 for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) {
828 if ((sChannelTbl[ii].bValid == TRUE) && 828 if ((sChannelTbl[ii].bValid == true) &&
829 (aiWeight[ii] > aiWeight[byOptionChannel])) { 829 (aiWeight[ii] > aiWeight[byOptionChannel])) {
830 byOptionChannel = (unsigned char) ii; 830 byOptionChannel = (unsigned char) ii;
831 } 831 }
diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c
index dea9599e37fd..5efc724824b7 100644
--- a/drivers/staging/vt6655/datarate.c
+++ b/drivers/staging/vt6655/datarate.c
@@ -233,7 +233,7 @@ unsigned int uRateLen;
233 for (ii = 0; ii < uRateLen; ii++) { 233 for (ii = 0; ii < uRateLen; ii++) {
234 byRate = (unsigned char)(pItemRates->abyRates[ii]); 234 byRate = (unsigned char)(pItemRates->abyRates[ii]);
235 if (WLAN_MGMT_IS_BASICRATE(byRate) && 235 if (WLAN_MGMT_IS_BASICRATE(byRate) &&
236 (bUpdateBasicRate == TRUE)) { 236 (bUpdateBasicRate == true)) {
237 // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate 237 // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate
238 CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); 238 CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate));
239 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); 239 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate));
@@ -317,7 +317,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler;
317unsigned short wIdxDownRate = 0; 317unsigned short wIdxDownRate = 0;
318unsigned int ii; 318unsigned int ii;
319//unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54}; 319//unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54};
320BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; 320BOOL bAutoRate[MAX_RATE] = {true,true,true,true,FALSE,FALSE,true,true,true,true,true,true};
321 unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; 321 unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
322 unsigned long dwThroughput = 0; 322 unsigned long dwThroughput = 0;
323 unsigned short wIdxUpRate = 0; 323 unsigned short wIdxUpRate = 0;
@@ -346,7 +346,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T
346 346
347 for(ii=0;ii<MAX_RATE;ii++) { 347 for(ii=0;ii<MAX_RATE;ii++) {
348 if (psNodeDBTable->wSuppRate & (0x0001<<ii)) { 348 if (psNodeDBTable->wSuppRate & (0x0001<<ii)) {
349 if (bAutoRate[ii] == TRUE) { 349 if (bAutoRate[ii] == true) {
350 wIdxUpRate = (unsigned short) ii; 350 wIdxUpRate = (unsigned short) ii;
351 } 351 }
352 } else { 352 } else {
@@ -372,7 +372,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T
372 for(ii = psNodeDBTable->wTxDataRate; ii > 0;) { 372 for(ii = psNodeDBTable->wTxDataRate; ii > 0;) {
373 ii--; 373 ii--;
374 if ( (dwThroughputTbl[ii] > dwThroughput) && 374 if ( (dwThroughputTbl[ii] > dwThroughput) &&
375 (bAutoRate[ii]==TRUE) ) { 375 (bAutoRate[ii]==true) ) {
376 dwThroughput = dwThroughputTbl[ii]; 376 dwThroughput = dwThroughputTbl[ii];
377 wIdxDownRate = (unsigned short) ii; 377 wIdxDownRate = (unsigned short) ii;
378 } 378 }
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index a05b46e781f2..ada29749b03c 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -888,7 +888,7 @@ inline static BOOL device_get_ip(PSDevice pInfo) {
888 ifa=(struct in_ifaddr*) in_dev->ifa_list; 888 ifa=(struct in_ifaddr*) in_dev->ifa_list;
889 if (ifa!=NULL) { 889 if (ifa!=NULL) {
890 memcpy(pInfo->abyIPAddr,&ifa->ifa_address,4); 890 memcpy(pInfo->abyIPAddr,&ifa->ifa_address,4);
891 return TRUE; 891 return true;
892 } 892 }
893 } 893 }
894 return FALSE; 894 return FALSE;
diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h
index d1e9c1930bdb..8a070c638fc1 100644
--- a/drivers/staging/vt6655/device_cfg.h
+++ b/drivers/staging/vt6655/device_cfg.h
@@ -43,10 +43,6 @@ struct _version {
43#define FALSE (0) 43#define FALSE (0)
44#endif 44#endif
45 45
46#ifndef TRUE
47#define TRUE (!(FALSE))
48#endif
49
50#define VID_TABLE_SIZE 64 46#define VID_TABLE_SIZE 64
51#define MCAST_TABLE_SIZE 64 47#define MCAST_TABLE_SIZE 64
52#define MCAM_SIZE 32 48#define MCAM_SIZE 32
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index d498442f14e6..4f9d0a57790e 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -396,7 +396,7 @@ device_set_bool_opt(unsigned int *opt, int val,BOOL def,u32 flag, char* name,cha
396 *opt|=(def ? flag : 0); 396 *opt|=(def ? flag : 0);
397 } else { 397 } else {
398 DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n", 398 DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n",
399 devname,name , val ? "TRUE" : "FALSE"); 399 devname,name , val ? "true" : "FALSE");
400 *opt|=(val ? flag : 0); 400 *opt|=(val ? flag : 0);
401 } 401 }
402} 402}
@@ -452,7 +452,7 @@ device_set_options(PSDevice pDevice) {
452 pDevice->b11hEnable = (pDevice->sOpts.flags & DEVICE_FLAGS_80211h_MODE) ? 1 : 0; 452 pDevice->b11hEnable = (pDevice->sOpts.flags & DEVICE_FLAGS_80211h_MODE) ? 1 : 0;
453 pDevice->bDiversityRegCtlON = (pDevice->sOpts.flags & DEVICE_FLAGS_DiversityANT) ? 1 : 0; 453 pDevice->bDiversityRegCtlON = (pDevice->sOpts.flags & DEVICE_FLAGS_DiversityANT) ? 1 : 0;
454 pDevice->uConnectionRate = pDevice->sOpts.data_rate; 454 pDevice->uConnectionRate = pDevice->sOpts.data_rate;
455 if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = TRUE; 455 if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true;
456 pDevice->byBBType = pDevice->sOpts.bbp_type; 456 pDevice->byBBType = pDevice->sOpts.bbp_type;
457 pDevice->byPacketType = pDevice->byBBType; 457 pDevice->byPacketType = pDevice->byBBType;
458 458
@@ -460,7 +460,7 @@ device_set_options(PSDevice pDevice) {
460 pDevice->byAutoFBCtrl = AUTO_FB_0; 460 pDevice->byAutoFBCtrl = AUTO_FB_0;
461 //pDevice->byAutoFBCtrl = AUTO_FB_1; 461 //pDevice->byAutoFBCtrl = AUTO_FB_1;
462//PLICE_DEBUG<- 462//PLICE_DEBUG<-
463pDevice->bUpdateBBVGA = TRUE; 463pDevice->bUpdateBBVGA = true;
464 pDevice->byFOETuning = 0; 464 pDevice->byFOETuning = 0;
465 pDevice->wCTSDuration = 0; 465 pDevice->wCTSDuration = 0;
466 pDevice->byPreambleType = 0; 466 pDevice->byPreambleType = 0;
@@ -498,7 +498,7 @@ static void s_vCompleteCurrentMeasure (PSDevice pDevice, unsigned char byResult)
498 498
499 if (pDevice->uNumOfMeasureEIDs == 0) { 499 if (pDevice->uNumOfMeasureEIDs == 0) {
500 VNTWIFIbMeasureReport( pDevice->pMgmt, 500 VNTWIFIbMeasureReport( pDevice->pMgmt,
501 TRUE, 501 true,
502 pDevice->pCurrMeasureEID, 502 pDevice->pCurrMeasureEID,
503 byResult, 503 byResult,
504 pDevice->byBasicMap, 504 pDevice->byBasicMap,
@@ -542,7 +542,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
542 // Do MACbSoftwareReset in MACvInitialize 542 // Do MACbSoftwareReset in MACvInitialize
543 MACbSoftwareReset(pDevice->PortOffset); 543 MACbSoftwareReset(pDevice->PortOffset);
544 // force CCK 544 // force CCK
545 pDevice->bCCK = TRUE; 545 pDevice->bCCK = true;
546 pDevice->bAES = FALSE; 546 pDevice->bAES = FALSE;
547 pDevice->bProtectMode = FALSE; //Only used in 11g type, sync with ERP IE 547 pDevice->bProtectMode = FALSE; //Only used in 11g type, sync with ERP IE
548 pDevice->bNonERPPresent = FALSE; 548 pDevice->bNonERPPresent = FALSE;
@@ -572,7 +572,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
572 // Get Antena 572 // Get Antena
573 byValue = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); 573 byValue = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
574 if (byValue & EEP_ANTINV) 574 if (byValue & EEP_ANTINV)
575 pDevice->bTxRxAntInv = TRUE; 575 pDevice->bTxRxAntInv = true;
576 else 576 else
577 pDevice->bTxRxAntInv = FALSE; 577 pDevice->bTxRxAntInv = FALSE;
578#ifdef PLICE_DEBUG 578#ifdef PLICE_DEBUG
@@ -597,7 +597,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
597 pDevice->byTxAntennaMode = ANT_B; 597 pDevice->byTxAntennaMode = ANT_B;
598 pDevice->dwTxAntennaSel = 1; 598 pDevice->dwTxAntennaSel = 1;
599 pDevice->dwRxAntennaSel = 1; 599 pDevice->dwRxAntennaSel = 1;
600 if (pDevice->bTxRxAntInv == TRUE) 600 if (pDevice->bTxRxAntInv == true)
601 pDevice->byRxAntennaMode = ANT_A; 601 pDevice->byRxAntennaMode = ANT_A;
602 else 602 else
603 pDevice->byRxAntennaMode = ANT_B; 603 pDevice->byRxAntennaMode = ANT_B;
@@ -607,7 +607,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
607 if((byValue1&0x08)==0) 607 if((byValue1&0x08)==0)
608 pDevice->bDiversityEnable = FALSE;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50); 608 pDevice->bDiversityEnable = FALSE;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50);
609 else 609 else
610 pDevice->bDiversityEnable = TRUE; 610 pDevice->bDiversityEnable = true;
611#ifdef PLICE_DEBUG 611#ifdef PLICE_DEBUG
612 //printk("aux |main antenna: RxAntennaMode is %d\n",pDevice->byRxAntennaMode); 612 //printk("aux |main antenna: RxAntennaMode is %d\n",pDevice->byRxAntennaMode);
613#endif 613#endif
@@ -618,13 +618,13 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA);
618 pDevice->dwRxAntennaSel = 0; 618 pDevice->dwRxAntennaSel = 0;
619 if (byValue & EEP_ANTENNA_AUX) { 619 if (byValue & EEP_ANTENNA_AUX) {
620 pDevice->byTxAntennaMode = ANT_A; 620 pDevice->byTxAntennaMode = ANT_A;
621 if (pDevice->bTxRxAntInv == TRUE) 621 if (pDevice->bTxRxAntInv == true)
622 pDevice->byRxAntennaMode = ANT_B; 622 pDevice->byRxAntennaMode = ANT_B;
623 else 623 else
624 pDevice->byRxAntennaMode = ANT_A; 624 pDevice->byRxAntennaMode = ANT_A;
625 } else { 625 } else {
626 pDevice->byTxAntennaMode = ANT_B; 626 pDevice->byTxAntennaMode = ANT_B;
627 if (pDevice->bTxRxAntInv == TRUE) 627 if (pDevice->bTxRxAntInv == true)
628 pDevice->byRxAntennaMode = ANT_A; 628 pDevice->byRxAntennaMode = ANT_A;
629 else 629 else
630 pDevice->byRxAntennaMode = ANT_B; 630 pDevice->byRxAntennaMode = ANT_B;
@@ -792,21 +792,21 @@ else
792 MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); 792 MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
793//2008-4-14 <add> by chester for led issue 793//2008-4-14 <add> by chester for led issue
794 #ifdef FOR_LED_ON_NOTEBOOK 794 #ifdef FOR_LED_ON_NOTEBOOK
795if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = TRUE;} 795if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = true;}
796if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;} 796if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;}
797 797
798 } 798 }
799 if ( (pDevice->bRadioControlOff == TRUE)) { 799 if ( (pDevice->bRadioControlOff == true)) {
800 CARDbRadioPowerOff(pDevice); 800 CARDbRadioPowerOff(pDevice);
801 } 801 }
802else CARDbRadioPowerOn(pDevice); 802else CARDbRadioPowerOn(pDevice);
803#else 803#else
804 if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) || 804 if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) ||
805 ( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) { 805 ( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {
806 pDevice->bHWRadioOff = TRUE; 806 pDevice->bHWRadioOff = true;
807 } 807 }
808 } 808 }
809 if ((pDevice->bHWRadioOff == TRUE) || (pDevice->bRadioControlOff == TRUE)) { 809 if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) {
810 CARDbRadioPowerOff(pDevice); 810 CARDbRadioPowerOff(pDevice);
811 } 811 }
812 812
@@ -876,7 +876,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
876 int ii=0; 876 int ii=0;
877 // wait_queue_head_t Set_wait; 877 // wait_queue_head_t Set_wait;
878 //send device close to wpa_supplicnat layer 878 //send device close to wpa_supplicnat layer
879 if (pDevice->bWPADEVUp==TRUE) { 879 if (pDevice->bWPADEVUp==true) {
880 wpahdr = (viawget_wpa_header *)pDevice->skb->data; 880 wpahdr = (viawget_wpa_header *)pDevice->skb->data;
881 wpahdr->type = VIAWGET_DEVICECLOSE_MSG; 881 wpahdr->type = VIAWGET_DEVICECLOSE_MSG;
882 wpahdr->resp_ie_len = 0; 882 wpahdr->resp_ie_len = 0;
@@ -893,7 +893,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
893 //wait release WPADEV 893 //wait release WPADEV
894 // init_waitqueue_head(&Set_wait); 894 // init_waitqueue_head(&Set_wait);
895 // wait_event_timeout(Set_wait, ((pDevice->wpadev==NULL)&&(pDevice->skb == NULL)),5*HZ); //1s wait 895 // wait_event_timeout(Set_wait, ((pDevice->wpadev==NULL)&&(pDevice->skb == NULL)),5*HZ); //1s wait
896 while((pDevice->bWPADEVUp==TRUE)) { 896 while((pDevice->bWPADEVUp==true)) {
897 set_current_state(TASK_UNINTERRUPTIBLE); 897 set_current_state(TASK_UNINTERRUPTIBLE);
898 schedule_timeout (HZ/20); //wait 50ms 898 schedule_timeout (HZ/20); //wait 50ms
899 ii++; 899 ii++;
@@ -901,7 +901,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice)
901 break; 901 break;
902 } 902 }
903 }; 903 };
904 return TRUE; 904 return true;
905} 905}
906 906
907 907
@@ -919,7 +919,7 @@ static const struct net_device_ops device_netdev_ops = {
919static int __devinit 919static int __devinit
920vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) 920vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
921{ 921{
922 static BOOL bFirst = TRUE; 922 static BOOL bFirst = true;
923 struct net_device* dev = NULL; 923 struct net_device* dev = NULL;
924 PCHIP_INFO pChip_info = (PCHIP_INFO)ent->driver_data; 924 PCHIP_INFO pChip_info = (PCHIP_INFO)ent->driver_data;
925 PSDevice pDevice; 925 PSDevice pDevice;
@@ -1148,7 +1148,7 @@ static BOOL __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice,
1148 1148
1149 spin_lock_init(&((*ppDevice)->lock)); 1149 spin_lock_init(&((*ppDevice)->lock));
1150 1150
1151 return TRUE; 1151 return true;
1152} 1152}
1153 1153
1154static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) { 1154static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
@@ -1214,7 +1214,7 @@ static BOOL device_get_pci_info(PSDevice pDevice, struct pci_dev* pcid) {
1214 } 1214 }
1215 } 1215 }
1216#endif 1216#endif
1217 return TRUE; 1217 return true;
1218} 1218}
1219 1219
1220static void device_free_info(PSDevice pDevice) { 1220static void device_free_info(PSDevice pDevice) {
@@ -1361,7 +1361,7 @@ static BOOL device_init_rings(PSDevice pDevice) {
1361 pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ; 1361 pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ;
1362 1362
1363 1363
1364 return TRUE; 1364 return true;
1365} 1365}
1366 1366
1367static void device_free_rings(PSDevice pDevice) { 1367static void device_free_rings(PSDevice pDevice) {
@@ -1646,7 +1646,7 @@ static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) {
1646 pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz); 1646 pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz);
1647 pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma); 1647 pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma);
1648 1648
1649 return TRUE; 1649 return true;
1650} 1650}
1651 1651
1652 1652
@@ -1659,7 +1659,7 @@ BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) {
1659 ASSERT(pDeF->skb); 1659 ASSERT(pDeF->skb);
1660 pDeF->skb->dev = pDevice->dev; 1660 pDeF->skb->dev = pDevice->dev;
1661 1661
1662 return TRUE; 1662 return true;
1663} 1663}
1664 1664
1665 1665
@@ -1783,7 +1783,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
1783 // RESERV_AC0DMA reserved for relay 1783 // RESERV_AC0DMA reserved for relay
1784 1784
1785 if (AVAIL_TD(pDevice, uIdx) < RESERV_AC0DMA) { 1785 if (AVAIL_TD(pDevice, uIdx) < RESERV_AC0DMA) {
1786 bFull = TRUE; 1786 bFull = true;
1787 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]); 1787 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]);
1788 } 1788 }
1789 if (netif_queue_stopped(pDevice->dev) && (bFull==FALSE)){ 1789 if (netif_queue_stopped(pDevice->dev) && (bFull==FALSE)){
@@ -1994,7 +1994,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n");
1994 pDevice->byReAssocCount = 0; 1994 pDevice->byReAssocCount = 0;
1995 pDevice->bWPADEVUp = FALSE; 1995 pDevice->bWPADEVUp = FALSE;
1996 // Patch: if WEP key already set by iwconfig but device not yet open 1996 // Patch: if WEP key already set by iwconfig but device not yet open
1997 if ((pDevice->bEncryptionEnable == TRUE) && (pDevice->bTransmitKey == TRUE)) { 1997 if ((pDevice->bEncryptionEnable == true) && (pDevice->bTransmitKey == true)) {
1998 KeybSetDefaultKey(&(pDevice->sKey), 1998 KeybSetDefaultKey(&(pDevice->sKey),
1999 (unsigned long)(pDevice->byKeyIndex | (1 << 31)), 1999 (unsigned long)(pDevice->byKeyIndex | (1 << 31)),
2000 pDevice->uKeyLength, 2000 pDevice->uKeyLength,
@@ -2099,7 +2099,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
2099 return 0; 2099 return 0;
2100 } 2100 }
2101 2101
2102 if (pDevice->bStopTx0Pkt == TRUE) { 2102 if (pDevice->bStopTx0Pkt == true) {
2103 dev_kfree_skb_irq(skb); 2103 dev_kfree_skb_irq(skb);
2104 spin_unlock_irq(&pDevice->lock); 2104 spin_unlock_irq(&pDevice->lock);
2105 return 0; 2105 return 0;
@@ -2132,7 +2132,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
2132// unsigned char byKeyIndex = 0; 2132// unsigned char byKeyIndex = 0;
2133 2133
2134 2134
2135 if (pDevice->bStopTx0Pkt == TRUE) { 2135 if (pDevice->bStopTx0Pkt == true) {
2136 dev_kfree_skb_irq(skb); 2136 dev_kfree_skb_irq(skb);
2137 return FALSE; 2137 return FALSE;
2138 }; 2138 };
@@ -2205,15 +2205,15 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
2205 } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { 2205 } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
2206 byPktType = PK_TYPE_11A; 2206 byPktType = PK_TYPE_11A;
2207 } else { 2207 } else {
2208 if (pDevice->bProtectMode == TRUE) { 2208 if (pDevice->bProtectMode == true) {
2209 byPktType = PK_TYPE_11GB; 2209 byPktType = PK_TYPE_11GB;
2210 } else { 2210 } else {
2211 byPktType = PK_TYPE_11GA; 2211 byPktType = PK_TYPE_11GA;
2212 } 2212 }
2213 } 2213 }
2214 2214
2215 if (pDevice->bEncryptionEnable == TRUE) 2215 if (pDevice->bEncryptionEnable == true)
2216 bNeedEncryption = TRUE; 2216 bNeedEncryption = true;
2217 2217
2218 if (pDevice->bEnableHostWEP) { 2218 if (pDevice->bEnableHostWEP) {
2219 pTransmitKey = &STempKey; 2219 pTransmitKey = &STempKey;
@@ -2263,7 +2263,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
2263 MACvTransmit0(pDevice->PortOffset); 2263 MACvTransmit0(pDevice->PortOffset);
2264 2264
2265 2265
2266 return TRUE; 2266 return true;
2267} 2267}
2268 2268
2269//TYPE_AC0DMA data tx 2269//TYPE_AC0DMA data tx
@@ -2312,7 +2312,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2312 } 2312 }
2313 if (is_multicast_ether_addr((unsigned char *)(skb->data))) { 2313 if (is_multicast_ether_addr((unsigned char *)(skb->data))) {
2314 uNodeIndex = 0; 2314 uNodeIndex = 0;
2315 bNodeExist = TRUE; 2315 bNodeExist = true;
2316 if (pMgmt->sNodeDBTable[0].bPSEnable) { 2316 if (pMgmt->sNodeDBTable[0].bPSEnable) {
2317 skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb); 2317 skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb);
2318 pMgmt->sNodeDBTable[0].wEnQueueCnt++; 2318 pMgmt->sNodeDBTable[0].wEnQueueCnt++;
@@ -2341,7 +2341,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2341 }else { 2341 }else {
2342 pDevice->byPreambleType = PREAMBLE_LONG; 2342 pDevice->byPreambleType = PREAMBLE_LONG;
2343 } 2343 }
2344 bNodeExist = TRUE; 2344 bNodeExist = true;
2345 2345
2346 } 2346 }
2347 } 2347 }
@@ -2367,8 +2367,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2367 } 2367 }
2368 2368
2369 2369
2370 if (pDevice->bEncryptionEnable == TRUE) { 2370 if (pDevice->bEncryptionEnable == true) {
2371 bNeedEncryption = TRUE; 2371 bNeedEncryption = true;
2372 // get Transmit key 2372 // get Transmit key
2373 do { 2373 do {
2374 if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && 2374 if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
@@ -2377,8 +2377,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2377 // get pairwise key 2377 // get pairwise key
2378 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { 2378 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
2379 // get group key 2379 // get group key
2380 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { 2380 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
2381 bTKIP_UseGTK = TRUE; 2381 bTKIP_UseGTK = true;
2382 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); 2382 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
2383 break; 2383 break;
2384 } 2384 }
@@ -2395,7 +2395,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2395 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n"); 2395 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n");
2396 2396
2397 // get pairwise key 2397 // get pairwise key
2398 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) 2398 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == true)
2399 break; 2399 break;
2400 } 2400 }
2401 // get group key 2401 // get group key
@@ -2408,7 +2408,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2408 else 2408 else
2409 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); 2409 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode);
2410 } else { 2410 } else {
2411 bTKIP_UseGTK = TRUE; 2411 bTKIP_UseGTK = true;
2412 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); 2412 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
2413 } 2413 }
2414 } while(FALSE); 2414 } while(FALSE);
@@ -2416,7 +2416,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
2416 2416
2417 if (pDevice->bEnableHostWEP) { 2417 if (pDevice->bEnableHostWEP) {
2418 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex); 2418 DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex);
2419 if (pDevice->bEncryptionEnable == TRUE) { 2419 if (pDevice->bEncryptionEnable == true) {
2420 pTransmitKey = &STempKey; 2420 pTransmitKey = &STempKey;
2421 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; 2421 pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite;
2422 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; 2422 pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex;
@@ -2524,7 +2524,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
2524 } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { 2524 } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) {
2525 byPktType = PK_TYPE_11A; 2525 byPktType = PK_TYPE_11A;
2526 } else { 2526 } else {
2527 if (pDevice->bProtectMode == TRUE) { 2527 if (pDevice->bProtectMode == true) {
2528 byPktType = PK_TYPE_11GB; 2528 byPktType = PK_TYPE_11GB;
2529 } else { 2529 } else {
2530 byPktType = PK_TYPE_11GA; 2530 byPktType = PK_TYPE_11GA;
@@ -2535,7 +2535,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
2535// printk("FIX RATE:CurrentRate is %d"); 2535// printk("FIX RATE:CurrentRate is %d");
2536//#endif 2536//#endif
2537 2537
2538 if (bNeedEncryption == TRUE) { 2538 if (bNeedEncryption == true) {
2539 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); 2539 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType));
2540 if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { 2540 if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) {
2541 bNeedEncryption = FALSE; 2541 bNeedEncryption = FALSE;
@@ -2545,18 +2545,18 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
2545 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n"); 2545 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n");
2546 } 2546 }
2547 else { 2547 else {
2548 if (bTKIP_UseGTK == TRUE) { 2548 if (bTKIP_UseGTK == true) {
2549 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n"); 2549 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n");
2550 } 2550 }
2551 else { 2551 else {
2552 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); 2552 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
2553 bNeedEncryption = TRUE; 2553 bNeedEncryption = true;
2554 } 2554 }
2555 } 2555 }
2556 } 2556 }
2557 2557
2558 if (pDevice->byCntMeasure == 2) { 2558 if (pDevice->byCntMeasure == 2) {
2559 bNeedDeAuth = TRUE; 2559 bNeedDeAuth = true;
2560 pDevice->s802_11Counter.TKIPCounterMeasuresInvoked++; 2560 pDevice->s802_11Counter.TKIPCounterMeasuresInvoked++;
2561 } 2561 }
2562 2562
@@ -2564,7 +2564,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
2564 if ((uNodeIndex != 0) && 2564 if ((uNodeIndex != 0) &&
2565 (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) { 2565 (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) {
2566 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); 2566 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
2567 bNeedEncryption = TRUE; 2567 bNeedEncryption = true;
2568 } 2568 }
2569 } 2569 }
2570 } 2570 }
@@ -2646,11 +2646,11 @@ BOOL bTxeapol_key = FALSE;
2646 if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { 2646 if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) {
2647 if(((Protocol_Version==1) ||(Protocol_Version==2)) && 2647 if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
2648 (Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer 2648 (Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer
2649 bTxeapol_key = TRUE; 2649 bTxeapol_key = true;
2650 if((Descriptor_type==254)||(Descriptor_type==2)) { //WPA or RSN 2650 if((Descriptor_type==254)||(Descriptor_type==2)) { //WPA or RSN
2651 if(!(Key_info & BIT3) && //group-key challenge 2651 if(!(Key_info & BIT3) && //group-key challenge
2652 (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key 2652 (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key
2653 pDevice->fWPA_Authened = TRUE; 2653 pDevice->fWPA_Authened = true;
2654 if(Descriptor_type==254) 2654 if(Descriptor_type==254)
2655 printk("WPA "); 2655 printk("WPA ");
2656 else 2656 else
@@ -2700,7 +2700,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2700 2700
2701 if ((pDevice->dwIsr & ISR_RXDMA0) && 2701 if ((pDevice->dwIsr & ISR_RXDMA0) &&
2702 (pDevice->byLocalID != REV_ID_VT3253_B0) && 2702 (pDevice->byLocalID != REV_ID_VT3253_B0) &&
2703 (pDevice->bBSSIDFilter == TRUE)) { 2703 (pDevice->bBSSIDFilter == true)) {
2704 // update RSSI 2704 // update RSSI
2705 //BBbReadEmbeded(pDevice->PortOffset, 0x3E, &byRSSI); 2705 //BBbReadEmbeded(pDevice->PortOffset, 0x3E, &byRSSI);
2706 //pDevice->uCurrRSSI = byRSSI; 2706 //pDevice->uCurrRSSI = byRSSI;
@@ -2749,9 +2749,9 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2749 VNSvInPortD(pDevice->PortOffset + MAC_REG_MAR4, &(pDevice->dwOrgMAR4)); 2749 VNSvInPortD(pDevice->PortOffset + MAC_REG_MAR4, &(pDevice->dwOrgMAR4));
2750 MACvSelectPage0(pDevice->PortOffset); 2750 MACvSelectPage0(pDevice->PortOffset);
2751 //xxxx 2751 //xxxx
2752 // WCMDbFlushCommandQueue(pDevice->pMgmt, TRUE); 2752 // WCMDbFlushCommandQueue(pDevice->pMgmt, true);
2753 if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == TRUE) { 2753 if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == true) {
2754 pDevice->bMeasureInProgress = TRUE; 2754 pDevice->bMeasureInProgress = true;
2755 MACvSelectPage1(pDevice->PortOffset); 2755 MACvSelectPage1(pDevice->PortOffset);
2756 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY); 2756 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY);
2757 MACvSelectPage0(pDevice->PortOffset); 2757 MACvSelectPage0(pDevice->PortOffset);
@@ -2806,7 +2806,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2806 } 2806 }
2807 2807
2808 if (pDevice->dwIsr & ISR_TBTT) { 2808 if (pDevice->dwIsr & ISR_TBTT) {
2809 if (pDevice->bEnableFirstQuiet == TRUE) { 2809 if (pDevice->bEnableFirstQuiet == true) {
2810 pDevice->byQuietStartCount--; 2810 pDevice->byQuietStartCount--;
2811 if (pDevice->byQuietStartCount == 0) { 2811 if (pDevice->byQuietStartCount == 0) {
2812 pDevice->bEnableFirstQuiet = FALSE; 2812 pDevice->bEnableFirstQuiet = FALSE;
@@ -2815,7 +2815,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2815 MACvSelectPage0(pDevice->PortOffset); 2815 MACvSelectPage0(pDevice->PortOffset);
2816 } 2816 }
2817 } 2817 }
2818 if ((pDevice->bChannelSwitch == TRUE) && 2818 if ((pDevice->bChannelSwitch == true) &&
2819 (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) { 2819 (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) {
2820 pDevice->byChannelSwitchCount--; 2820 pDevice->byChannelSwitchCount--;
2821 if (pDevice->byChannelSwitchCount == 0) { 2821 if (pDevice->byChannelSwitchCount == 0) {
@@ -2832,7 +2832,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2832 if (pDevice->eOPMode == OP_MODE_ADHOC) { 2832 if (pDevice->eOPMode == OP_MODE_ADHOC) {
2833 //pDevice->bBeaconSent = FALSE; 2833 //pDevice->bBeaconSent = FALSE;
2834 } else { 2834 } else {
2835 if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == TRUE) && (pDevice->uCurrRSSI != 0)) { 2835 if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == true) && (pDevice->uCurrRSSI != 0)) {
2836 long ldBm; 2836 long ldBm;
2837 2837
2838 RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm); 2838 RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm);
@@ -2895,14 +2895,14 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
2895 if(pMgmt->byDTIMCount == 0) { 2895 if(pMgmt->byDTIMCount == 0) {
2896 // check if mutltcast tx bufferring 2896 // check if mutltcast tx bufferring
2897 pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1; 2897 pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1;
2898 pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; 2898 pMgmt->sNodeDBTable[0].bRxPSPoll = true;
2899 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); 2899 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
2900 } 2900 }
2901 } 2901 }
2902 } 2902 }
2903 pDevice->bBeaconSent = TRUE; 2903 pDevice->bBeaconSent = true;
2904 2904
2905 if (pDevice->bChannelSwitch == TRUE) { 2905 if (pDevice->bChannelSwitch == true) {
2906 pDevice->byChannelSwitchCount--; 2906 pDevice->byChannelSwitchCount--;
2907 if (pDevice->byChannelSwitchCount == 0) { 2907 if (pDevice->byChannelSwitchCount == 0) {
2908 pDevice->bChannelSwitch = FALSE; 2908 pDevice->bChannelSwitch = FALSE;
@@ -2993,7 +2993,7 @@ static int Config_FileGetParameter(unsigned char *string,
2993 source+=strlen(buf1); 2993 source+=strlen(buf1);
2994 2994
2995 memcpy(dest,source,source_len-strlen(buf1)); 2995 memcpy(dest,source,source_len-strlen(buf1));
2996 return TRUE; 2996 return true;
2997} 2997}
2998 2998
2999int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter) { 2999int Config_FileOperation(PSDevice pDevice,BOOL fwrite,unsigned char *Parameter) {
@@ -3042,7 +3042,7 @@ if(filp->f_op->read(filp, buffer, 1024, &filp->f_pos)<0) {
3042 goto error1; 3042 goto error1;
3043} 3043}
3044 3044
3045if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=TRUE) { 3045if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=true) {
3046 printk("get parameter error?\n"); 3046 printk("get parameter error?\n");
3047 result = -1; 3047 result = -1;
3048 goto error1; 3048 goto error1;
@@ -3565,7 +3565,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
3565 netif_stop_queue(pDevice->dev); 3565 netif_stop_queue(pDevice->dev);
3566 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 3566 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
3567 pMgmt->eScanType = WMAC_SCAN_ACTIVE; 3567 pMgmt->eScanType = WMAC_SCAN_ACTIVE;
3568 if(pDevice->bWPASuppWextEnabled !=TRUE) 3568 if(pDevice->bWPASuppWextEnabled !=true)
3569 #endif 3569 #endif
3570 bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); 3570 bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
3571 bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); 3571 bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
@@ -3708,7 +3708,7 @@ viawget_resume(struct pci_dev *pcid)
3708 spin_lock_irq(&pDevice->lock); 3708 spin_lock_irq(&pDevice->lock);
3709 MACvRestoreContext(pDevice->PortOffset, pDevice->abyMacContext); 3709 MACvRestoreContext(pDevice->PortOffset, pDevice->abyMacContext);
3710 device_init_registers(pDevice, DEVICE_INIT_DXPL); 3710 device_init_registers(pDevice, DEVICE_INIT_DXPL);
3711 if (pMgmt->sNodeDBTable[0].bActive == TRUE) { // Assoc with BSS 3711 if (pMgmt->sNodeDBTable[0].bActive == true) { // Assoc with BSS
3712 pMgmt->sNodeDBTable[0].bActive = FALSE; 3712 pMgmt->sNodeDBTable[0].bActive = FALSE;
3713 pDevice->bLinkPass = FALSE; 3713 pDevice->bLinkPass = FALSE;
3714 if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { 3714 if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c
index c7ffdea75490..c6ca3bb58a7d 100644
--- a/drivers/staging/vt6655/dpc.c
+++ b/drivers/staging/vt6655/dpc.c
@@ -413,7 +413,7 @@ device_receive_frame (
413 413
414 pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8); 414 pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8);
415//PLICE_DEBUG<- 415//PLICE_DEBUG<-
416 if (pDevice->bMeasureInProgress == TRUE) { 416 if (pDevice->bMeasureInProgress == true) {
417 if ((*pbyRsr & RSR_CRCOK) != 0) { 417 if ((*pbyRsr & RSR_CRCOK) != 0) {
418 pDevice->byBasicMap |= 0x01; 418 pDevice->byBasicMap |= 0x01;
419 } 419 }
@@ -470,7 +470,7 @@ device_receive_frame (
470 } 470 }
471 471
472 if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { 472 if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
473 if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == TRUE) { 473 if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == true) {
474 return FALSE; 474 return FALSE;
475 } 475 }
476 } 476 }
@@ -480,7 +480,7 @@ device_receive_frame (
480 BOOL bRxDecryOK = FALSE; 480 BOOL bRxDecryOK = FALSE;
481 481
482 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n"); 482 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n");
483 bIsWEP = TRUE; 483 bIsWEP = true;
484 if ((pDevice->bEnableHostWEP) && (iSANodeIndex >= 0)) { 484 if ((pDevice->bEnableHostWEP) && (iSANodeIndex >= 0)) {
485 pKey = &STempKey; 485 pKey = &STempKey;
486 pKey->byCipherSuite = pMgmt->sNodeDBTable[iSANodeIndex].byCipherSuite; 486 pKey->byCipherSuite = pMgmt->sNodeDBTable[iSANodeIndex].byCipherSuite;
@@ -629,7 +629,7 @@ device_receive_frame (
629 skb->protocol = htons(ETH_P_802_2); 629 skb->protocol = htons(ETH_P_802_2);
630 memset(skb->cb, 0, sizeof(skb->cb)); 630 memset(skb->cb, 0, sizeof(skb->cb));
631 netif_rx(skb); 631 netif_rx(skb);
632 return TRUE; 632 return true;
633 } 633 }
634 } 634 }
635 else { 635 else {
@@ -677,7 +677,7 @@ device_receive_frame (
677 if (wEtherType == ETH_P_PAE) { //Protocol Type in LLC-Header 677 if (wEtherType == ETH_P_PAE) { //Protocol Type in LLC-Header
678 if(((Protocol_Version==1) ||(Protocol_Version==2)) && 678 if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
679 (Packet_Type==3)) { //802.1x OR eapol-key challenge frame receive 679 (Packet_Type==3)) { //802.1x OR eapol-key challenge frame receive
680 bRxeapol_key = TRUE; 680 bRxeapol_key = true;
681 } 681 }
682 } 682 }
683 } 683 }
@@ -696,7 +696,7 @@ device_receive_frame (
696 } 696 }
697 } 697 }
698 else { 698 else {
699 if (pDevice->pMgmt->bInTIMWake == TRUE) { 699 if (pDevice->pMgmt->bInTIMWake == true) {
700 pDevice->pMgmt->bInTIMWake = FALSE; 700 pDevice->pMgmt->bInTIMWake = FALSE;
701 } 701 }
702 } 702 }
@@ -705,7 +705,7 @@ device_receive_frame (
705 // Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps 705 // Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps
706 if (pDevice->bDiversityEnable && (FrameSize>50) && 706 if (pDevice->bDiversityEnable && (FrameSize>50) &&
707 (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) && 707 (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
708 (pDevice->bLinkPass == TRUE)) { 708 (pDevice->bLinkPass == true)) {
709 //printk("device_receive_frame: RxRate is %d\n",*pbyRxRate); 709 //printk("device_receive_frame: RxRate is %d\n",*pbyRxRate);
710 BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0); 710 BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0);
711 } 711 }
@@ -732,7 +732,7 @@ device_receive_frame (
732 732
733 // ----------------------------------------------- 733 // -----------------------------------------------
734 734
735 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){ 735 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){
736 unsigned char abyMacHdr[24]; 736 unsigned char abyMacHdr[24];
737 737
738 // Only 802.1x packet incoming allowed 738 // Only 802.1x packet incoming allowed
@@ -747,7 +747,7 @@ device_receive_frame (
747 if (wEtherType == ETH_P_PAE) { 747 if (wEtherType == ETH_P_PAE) {
748 skb->dev = pDevice->apdev; 748 skb->dev = pDevice->apdev;
749 749
750 if (bIsWEP == TRUE) { 750 if (bIsWEP == true) {
751 // strip IV header(8) 751 // strip IV header(8)
752 memcpy(&abyMacHdr[0], (skb->data + 4), 24); 752 memcpy(&abyMacHdr[0], (skb->data + 4), 24);
753 memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24); 753 memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24);
@@ -761,7 +761,7 @@ device_receive_frame (
761 skb->protocol = htons(ETH_P_802_2); 761 skb->protocol = htons(ETH_P_802_2);
762 memset(skb->cb, 0, sizeof(skb->cb)); 762 memset(skb->cb, 0, sizeof(skb->cb));
763 netif_rx(skb); 763 netif_rx(skb);
764 return TRUE; 764 return true;
765 765
766} 766}
767 // check if 802.1x authorized 767 // check if 802.1x authorized
@@ -824,7 +824,7 @@ device_receive_frame (
824 824
825 825
826 if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) || 826 if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) ||
827 (pDevice->bRxMICFail == TRUE)) { 827 (pDevice->bRxMICFail == true)) {
828 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n"); 828 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
829 pDevice->bRxMICFail = FALSE; 829 pDevice->bRxMICFail = FALSE;
830 //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++; 830 //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++;
@@ -838,7 +838,7 @@ device_receive_frame (
838 //2008-0409-07, <Add> by Einsn Liu 838 //2008-0409-07, <Add> by Einsn Liu
839 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 839 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
840 //send event to wpa_supplicant 840 //send event to wpa_supplicant
841 //if(pDevice->bWPADevEnable == TRUE) 841 //if(pDevice->bWPADevEnable == true)
842 { 842 {
843 union iwreq_data wrqu; 843 union iwreq_data wrqu;
844 struct iw_michaelmicfailure ev; 844 struct iw_michaelmicfailure ev;
@@ -1014,7 +1014,7 @@ device_receive_frame (
1014 return FALSE; 1014 return FALSE;
1015 } 1015 }
1016 1016
1017 return TRUE; 1017 return true;
1018} 1018}
1019 1019
1020 1020
@@ -1048,7 +1048,7 @@ static BOOL s_bAPModeRxCtl (
1048 &Status 1048 &Status
1049 ); 1049 );
1050 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); 1050 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n");
1051 return TRUE; 1051 return true;
1052 }; 1052 };
1053 if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) { 1053 if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) {
1054 // send deassoc notification 1054 // send deassoc notification
@@ -1060,13 +1060,13 @@ static BOOL s_bAPModeRxCtl (
1060 &Status 1060 &Status
1061 ); 1061 );
1062 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); 1062 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n");
1063 return TRUE; 1063 return true;
1064 }; 1064 };
1065 1065
1066 if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) { 1066 if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) {
1067 // delcare received ps-poll event 1067 // delcare received ps-poll event
1068 if (IS_CTL_PSPOLL(pbyFrame)) { 1068 if (IS_CTL_PSPOLL(pbyFrame)) {
1069 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 1069 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true;
1070 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); 1070 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
1071 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n"); 1071 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n");
1072 } 1072 }
@@ -1075,7 +1075,7 @@ static BOOL s_bAPModeRxCtl (
1075 // if PW bit off, send out all PS bufferring packets. 1075 // if PW bit off, send out all PS bufferring packets.
1076 if (!IS_FC_POWERMGT(pbyFrame)) { 1076 if (!IS_FC_POWERMGT(pbyFrame)) {
1077 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; 1077 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
1078 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 1078 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true;
1079 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); 1079 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
1080 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n"); 1080 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n");
1081 } 1081 }
@@ -1083,15 +1083,15 @@ static BOOL s_bAPModeRxCtl (
1083 } 1083 }
1084 else { 1084 else {
1085 if (IS_FC_POWERMGT(pbyFrame)) { 1085 if (IS_FC_POWERMGT(pbyFrame)) {
1086 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = TRUE; 1086 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = true;
1087 // Once if STA in PS state, enable multicast bufferring 1087 // Once if STA in PS state, enable multicast bufferring
1088 pMgmt->sNodeDBTable[0].bPSEnable = TRUE; 1088 pMgmt->sNodeDBTable[0].bPSEnable = true;
1089 } 1089 }
1090 else { 1090 else {
1091 // clear all pending PS frame. 1091 // clear all pending PS frame.
1092 if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) { 1092 if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) {
1093 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; 1093 pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
1094 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 1094 pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true;
1095 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); 1095 bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL);
1096 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n"); 1096 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n");
1097 1097
@@ -1134,7 +1134,7 @@ static BOOL s_bAPModeRxCtl (
1134 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl ); 1134 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl );
1135 VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode)); 1135 VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode));
1136 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode ); 1136 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode );
1137 return TRUE; 1137 return true;
1138 } 1138 }
1139 } 1139 }
1140 } 1140 }
@@ -1184,7 +1184,7 @@ static BOOL s_bHandleRxEncryption (
1184 (pDevice->pMgmt->byCSSPK != KEY_CTL_NONE)) { 1184 (pDevice->pMgmt->byCSSPK != KEY_CTL_NONE)) {
1185 // unicast pkt use pairwise key 1185 // unicast pkt use pairwise key
1186 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n"); 1186 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n");
1187 if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == TRUE) { 1187 if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == true) {
1188 if (pDevice->pMgmt->byCSSPK == KEY_CTL_TKIP) 1188 if (pDevice->pMgmt->byCSSPK == KEY_CTL_TKIP)
1189 byDecMode = KEY_CTL_TKIP; 1189 byDecMode = KEY_CTL_TKIP;
1190 else if (pDevice->pMgmt->byCSSPK == KEY_CTL_CCMP) 1190 else if (pDevice->pMgmt->byCSSPK == KEY_CTL_CCMP)
@@ -1218,7 +1218,7 @@ static BOOL s_bHandleRxEncryption (
1218 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n"); 1218 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
1219 if (byDecMode == KEY_CTL_WEP) { 1219 if (byDecMode == KEY_CTL_WEP) {
1220// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; 1220// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
1221 } else if (pDevice->bLinkPass == TRUE) { 1221 } else if (pDevice->bLinkPass == true) {
1222// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; 1222// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
1223 } 1223 }
1224 return FALSE; 1224 return FALSE;
@@ -1226,7 +1226,7 @@ static BOOL s_bHandleRxEncryption (
1226 if (byDecMode != pKey->byCipherSuite) { 1226 if (byDecMode != pKey->byCipherSuite) {
1227 if (byDecMode == KEY_CTL_WEP) { 1227 if (byDecMode == KEY_CTL_WEP) {
1228// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; 1228// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
1229 } else if (pDevice->bLinkPass == TRUE) { 1229 } else if (pDevice->bLinkPass == true) {
1230// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; 1230// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
1231 } 1231 }
1232 *pKeyOut = NULL; 1232 *pKeyOut = NULL;
@@ -1235,7 +1235,7 @@ static BOOL s_bHandleRxEncryption (
1235 if (byDecMode == KEY_CTL_WEP) { 1235 if (byDecMode == KEY_CTL_WEP) {
1236 // handle WEP 1236 // handle WEP
1237 if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || 1237 if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
1238 (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE)) { 1238 (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true)) {
1239 // Software WEP 1239 // Software WEP
1240 // 1. 3253A 1240 // 1. 3253A
1241 // 2. WEP 256 1241 // 2. WEP 256
@@ -1283,8 +1283,8 @@ static BOOL s_bHandleRxEncryption (
1283 }// end of TKIP/AES 1283 }// end of TKIP/AES
1284 1284
1285 if ((*(pbyIV+3) & 0x20) != 0) 1285 if ((*(pbyIV+3) & 0x20) != 0)
1286 *pbExtIV = TRUE; 1286 *pbExtIV = true;
1287 return TRUE; 1287 return true;
1288} 1288}
1289 1289
1290 1290
@@ -1333,7 +1333,7 @@ static BOOL s_bHostWepRxEncryption (
1333 if (byDecMode != pKey->byCipherSuite) { 1333 if (byDecMode != pKey->byCipherSuite) {
1334 if (byDecMode == KEY_CTL_WEP) { 1334 if (byDecMode == KEY_CTL_WEP) {
1335// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; 1335// pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++;
1336 } else if (pDevice->bLinkPass == TRUE) { 1336 } else if (pDevice->bLinkPass == true) {
1337// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; 1337// pDevice->s802_11Counter.DecryptFailureCount.QuadPart++;
1338 } 1338 }
1339 return FALSE; 1339 return FALSE;
@@ -1343,7 +1343,7 @@ static BOOL s_bHostWepRxEncryption (
1343 // handle WEP 1343 // handle WEP
1344 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n"); 1344 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n");
1345 if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || 1345 if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
1346 (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE) || 1346 (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true) ||
1347 (bOnFly == FALSE)) { 1347 (bOnFly == FALSE)) {
1348 // Software WEP 1348 // Software WEP
1349 // 1. 3253A 1349 // 1. 3253A
@@ -1413,8 +1413,8 @@ static BOOL s_bHostWepRxEncryption (
1413 }// end of TKIP/AES 1413 }// end of TKIP/AES
1414 1414
1415 if ((*(pbyIV+3) & 0x20) != 0) 1415 if ((*(pbyIV+3) & 0x20) != 0)
1416 *pbExtIV = TRUE; 1416 *pbExtIV = true;
1417 return TRUE; 1417 return true;
1418} 1418}
1419 1419
1420 1420
@@ -1461,7 +1461,7 @@ static BOOL s_bAPModeRxData (
1461 } 1461 }
1462 } 1462 }
1463 else { 1463 else {
1464 bRelayAndForward = TRUE; 1464 bRelayAndForward = true;
1465 } 1465 }
1466 } 1466 }
1467 else { 1467 else {
@@ -1480,10 +1480,10 @@ static BOOL s_bAPModeRxData (
1480 pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; 1480 pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7];
1481 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n", 1481 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n",
1482 iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]); 1482 iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]);
1483 return TRUE; 1483 return true;
1484 } 1484 }
1485 else { 1485 else {
1486 bRelayOnly = TRUE; 1486 bRelayOnly = true;
1487 } 1487 }
1488 } 1488 }
1489 }; 1489 };
@@ -1505,6 +1505,6 @@ static BOOL s_bAPModeRxData (
1505 if (pDevice->uAssocCount == 0) 1505 if (pDevice->uAssocCount == 0)
1506 return FALSE; 1506 return FALSE;
1507 1507
1508 return TRUE; 1508 return true;
1509} 1509}
1510 1510
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c
index ef3639449646..865e0f64d95a 100644
--- a/drivers/staging/vt6655/hostap.c
+++ b/drivers/staging/vt6655/hostap.c
@@ -328,7 +328,7 @@ static int hostap_get_info_sta(PSDevice pDevice,
328 * pDevice - 328 * pDevice -
329 * param - 329 * param -
330 * Out: 330 * Out:
331 * TURE, FALSE 331 * true, FALSE
332 * 332 *
333 * Return Value: 333 * Return Value:
334 * 334 *
@@ -520,7 +520,7 @@ static int hostap_set_encryption(PSDevice pDevice,
520 520
521 if (param->u.crypt.alg == WPA_ALG_NONE) { 521 if (param->u.crypt.alg == WPA_ALG_NONE) {
522 522
523 if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == TRUE) { 523 if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) {
524 if (KeybRemoveKey(&(pDevice->sKey), 524 if (KeybRemoveKey(&(pDevice->sKey),
525 param->sta_addr, 525 param->sta_addr,
526 pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex, 526 pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex,
@@ -556,7 +556,7 @@ static int hostap_set_encryption(PSDevice pDevice,
556 dwKeyIndex = (unsigned long)(param->u.crypt.idx); 556 dwKeyIndex = (unsigned long)(param->u.crypt.idx);
557 if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) { 557 if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) {
558 pDevice->byKeyIndex = (unsigned char)dwKeyIndex; 558 pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
559 pDevice->bTransmitKey = TRUE; 559 pDevice->bTransmitKey = true;
560 dwKeyIndex |= (1 << 31); 560 dwKeyIndex |= (1 << 31);
561 } 561 }
562 562
@@ -583,18 +583,18 @@ static int hostap_set_encryption(PSDevice pDevice,
583 (unsigned char *)abyKey, 583 (unsigned char *)abyKey,
584 KEY_CTL_WEP, 584 KEY_CTL_WEP,
585 pDevice->PortOffset, 585 pDevice->PortOffset,
586 pDevice->byLocalID) == TRUE) { 586 pDevice->byLocalID) == true) {
587 587
588 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; 588 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
589 589
590 } else { 590 } else {
591 // Key Table Full 591 // Key Table Full
592 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; 592 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE;
593 bKeyTableFull = TRUE; 593 bKeyTableFull = true;
594 } 594 }
595 } 595 }
596 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 596 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
597 pDevice->bEncryptionEnable = TRUE; 597 pDevice->bEncryptionEnable = true;
598 pMgmt->byCSSPK = KEY_CTL_WEP; 598 pMgmt->byCSSPK = KEY_CTL_WEP;
599 pMgmt->byCSSGK = KEY_CTL_WEP; 599 pMgmt->byCSSGK = KEY_CTL_WEP;
600 pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = KEY_CTL_WEP; 600 pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = KEY_CTL_WEP;
@@ -640,7 +640,7 @@ static int hostap_set_encryption(PSDevice pDevice,
640 byKeyDecMode, 640 byKeyDecMode,
641 pDevice->PortOffset, 641 pDevice->PortOffset,
642 pDevice->byLocalID); 642 pDevice->byLocalID);
643 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; 643 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
644 644
645 } else { 645 } else {
646 dwKeyIndex |= (1 << 30); // set pairwise key 646 dwKeyIndex |= (1 << 30); // set pairwise key
@@ -652,20 +652,20 @@ static int hostap_set_encryption(PSDevice pDevice,
652 (unsigned char *)abyKey, 652 (unsigned char *)abyKey,
653 byKeyDecMode, 653 byKeyDecMode,
654 pDevice->PortOffset, 654 pDevice->PortOffset,
655 pDevice->byLocalID) == TRUE) { 655 pDevice->byLocalID) == true) {
656 656
657 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; 657 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true;
658 658
659 } else { 659 } else {
660 // Key Table Full 660 // Key Table Full
661 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; 661 pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE;
662 bKeyTableFull = TRUE; 662 bKeyTableFull = true;
663 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n"); 663 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n");
664 } 664 }
665 665
666 } 666 }
667 667
668 if (bKeyTableFull == TRUE) { 668 if (bKeyTableFull == true) {
669 wKeyCtl &= 0x7F00; // clear all key control filed 669 wKeyCtl &= 0x7F00; // clear all key control filed
670 wKeyCtl |= (byKeyDecMode << 4); 670 wKeyCtl |= (byKeyDecMode << 4);
671 wKeyCtl |= (byKeyDecMode); 671 wKeyCtl |= (byKeyDecMode);
@@ -686,7 +686,7 @@ static int hostap_set_encryption(PSDevice pDevice,
686 ); 686 );
687 687
688 // set wep key 688 // set wep key
689 pDevice->bEncryptionEnable = TRUE; 689 pDevice->bEncryptionEnable = true;
690 pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = byKeyDecMode; 690 pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = byKeyDecMode;
691 pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = dwKeyIndex; 691 pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = dwKeyIndex;
692 pMgmt->sNodeDBTable[iNodeIndex].dwTSC47_16 = 0; 692 pMgmt->sNodeDBTable[iNodeIndex].dwTSC47_16 = 0;
diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c
index 94c981b7cff0..e0812af27106 100644
--- a/drivers/staging/vt6655/ioctl.c
+++ b/drivers/staging/vt6655/ioctl.c
@@ -99,8 +99,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
99 memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN); 99 memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN);
100 } 100 }
101 101
102 if (pDevice->bMACSuspend == TRUE) { 102 if (pDevice->bMACSuspend == true) {
103 if (pDevice->bRadioOff == TRUE) 103 if (pDevice->bRadioOff == true)
104 CARDbRadioPowerOn(pDevice); 104 CARDbRadioPowerOn(pDevice);
105 vMgrTimerInit(pDevice); 105 vMgrTimerInit(pDevice);
106 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); 106 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -130,7 +130,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
130 break; 130 break;
131 }; 131 };
132 132
133 if(sZoneTypeCmd.bWrite==TRUE) { 133 if(sZoneTypeCmd.bWrite==true) {
134 //////write zonetype 134 //////write zonetype
135 if(sZoneTypeCmd.ZoneType == ZoneType_USA) { 135 if(sZoneTypeCmd.ZoneType == ZoneType_USA) {
136 //set to USA 136 //set to USA
@@ -174,8 +174,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
174 174
175 case WLAN_CMD_BSS_JOIN: 175 case WLAN_CMD_BSS_JOIN:
176 176
177 if (pDevice->bMACSuspend == TRUE) { 177 if (pDevice->bMACSuspend == true) {
178 if (pDevice->bRadioOff == TRUE) 178 if (pDevice->bRadioOff == true)
179 CARDbRadioPowerOn(pDevice); 179 CARDbRadioPowerOn(pDevice);
180 vMgrTimerInit(pDevice); 180 vMgrTimerInit(pDevice);
181 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); 181 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -199,7 +199,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
199 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; 199 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
200 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n"); 200 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n");
201 } 201 }
202 if (sJoinCmd.bPSEnable == TRUE) { 202 if (sJoinCmd.bPSEnable == true) {
203 pDevice->ePSMode = WMAC_POWER_FAST; 203 pDevice->ePSMode = WMAC_POWER_FAST;
204// pDevice->ePSMode = WMAC_POWER_MAX; 204// pDevice->ePSMode = WMAC_POWER_MAX;
205 pMgmt->wListenInterval = 2; 205 pMgmt->wListenInterval = 2;
@@ -211,8 +211,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
211 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n"); 211 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n");
212 } 212 }
213 213
214 if (sJoinCmd.bShareKeyAuth == TRUE){ 214 if (sJoinCmd.bShareKeyAuth == true){
215 pMgmt->bShareKeyAlgorithm = TRUE; 215 pMgmt->bShareKeyAlgorithm = true;
216 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); 216 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
217 } 217 }
218 else { 218 else {
@@ -235,7 +235,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
235 result = -EFAULT; 235 result = -EFAULT;
236 break; 236 break;
237 }; 237 };
238 if (sWEPCmd.bEnableWep != TRUE) { 238 if (sWEPCmd.bEnableWep != true) {
239 pDevice->bEncryptionEnable = FALSE; 239 pDevice->bEncryptionEnable = FALSE;
240 pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; 240 pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
241 MACvDisableDefaultKey(pDevice->PortOffset); 241 MACvDisableDefaultKey(pDevice->PortOffset);
@@ -264,8 +264,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
264 } 264 }
265 } 265 }
266 pDevice->byKeyIndex = sWEPCmd.byKeyIndex; 266 pDevice->byKeyIndex = sWEPCmd.byKeyIndex;
267 pDevice->bTransmitKey = TRUE; 267 pDevice->bTransmitKey = true;
268 pDevice->bEncryptionEnable = TRUE; 268 pDevice->bEncryptionEnable = true;
269 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 269 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
270 270
271 break; 271 break;
@@ -286,8 +286,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
286 sLinkStatus.byState = ADHOC_STARTED; 286 sLinkStatus.byState = ADHOC_STARTED;
287 287
288 sLinkStatus.uChannel = pMgmt->uCurrChannel; 288 sLinkStatus.uChannel = pMgmt->uCurrChannel;
289 if (pDevice->bLinkPass == TRUE) { 289 if (pDevice->bLinkPass == true) {
290 sLinkStatus.bLink = TRUE; 290 sLinkStatus.bLink = true;
291 pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; 291 pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
292 memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len); 292 memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len);
293 memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); 293 memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
@@ -353,7 +353,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
353 pList->sBSSIDList[ii].byNetType = ADHOC; 353 pList->sBSSIDList[ii].byNetType = ADHOC;
354 } 354 }
355 if (WLAN_GET_CAP_INFO_PRIVACY(pBSS->wCapInfo)) { 355 if (WLAN_GET_CAP_INFO_PRIVACY(pBSS->wCapInfo)) {
356 pList->sBSSIDList[ii].bWEPOn = TRUE; 356 pList->sBSSIDList[ii].bWEPOn = true;
357 } 357 }
358 else { 358 else {
359 pList->sBSSIDList[ii].bWEPOn = FALSE; 359 pList->sBSSIDList[ii].bWEPOn = FALSE;
@@ -400,7 +400,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
400 del_timer(&pDevice->sTimerCommand); 400 del_timer(&pDevice->sTimerCommand);
401 del_timer(&pMgmt->sTimerSecondCallback); 401 del_timer(&pMgmt->sTimerSecondCallback);
402 pDevice->bCmdRunning = FALSE; 402 pDevice->bCmdRunning = FALSE;
403 pDevice->bMACSuspend = TRUE; 403 pDevice->bMACSuspend = true;
404 MACvIntDisable(pDevice->PortOffset); 404 MACvIntDisable(pDevice->PortOffset);
405 spin_unlock_irq(&pDevice->lock); 405 spin_unlock_irq(&pDevice->lock);
406 406
@@ -410,8 +410,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
410 410
411 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n"); 411 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n");
412 412
413 if (pDevice->bMACSuspend == TRUE) { 413 if (pDevice->bMACSuspend == true) {
414 if (pDevice->bRadioOff == TRUE) 414 if (pDevice->bRadioOff == true)
415 CARDbRadioPowerOn(pDevice); 415 CARDbRadioPowerOn(pDevice);
416 vMgrTimerInit(pDevice); 416 vMgrTimerInit(pDevice);
417 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); 417 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -458,7 +458,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
458 }; 458 };
459 459
460 if (sValue.dwValue == 1) { 460 if (sValue.dwValue == 1) {
461 pDevice->bEnable8021x = TRUE; 461 pDevice->bEnable8021x = true;
462 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n"); 462 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n");
463 } 463 }
464 else { 464 else {
@@ -478,7 +478,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
478 }; 478 };
479 479
480 if (sValue.dwValue == 1) { 480 if (sValue.dwValue == 1) {
481 pDevice->bEnableHostWEP = TRUE; 481 pDevice->bEnableHostWEP = true;
482 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n"); 482 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n");
483 } 483 }
484 else { 484 else {
@@ -498,7 +498,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
498 if (sValue.dwValue == 1) { 498 if (sValue.dwValue == 1) {
499 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); 499 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n");
500 memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN); 500 memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN);
501 pDevice->bWPADEVUp = TRUE; 501 pDevice->bWPADEVUp = true;
502 } 502 }
503 else { 503 else {
504 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n"); 504 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n");
@@ -510,7 +510,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
510 case WLAN_CMD_AP_START: 510 case WLAN_CMD_AP_START:
511 511
512 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n"); 512 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n");
513 if (pDevice->bRadioOff == TRUE) { 513 if (pDevice->bRadioOff == true) {
514 CARDbRadioPowerOn(pDevice); 514 CARDbRadioPowerOn(pDevice);
515 vMgrTimerInit(pDevice); 515 vMgrTimerInit(pDevice);
516 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); 516 MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE);
@@ -554,8 +554,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
554 else 554 else
555 pMgmt->wIBSSBeaconPeriod = 100; 555 pMgmt->wIBSSBeaconPeriod = 100;
556 556
557 if (sStartAPCmd.bShareKeyAuth == TRUE){ 557 if (sStartAPCmd.bShareKeyAuth == true){
558 pMgmt->bShareKeyAlgorithm = TRUE; 558 pMgmt->bShareKeyAlgorithm = true;
559 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); 559 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n");
560 } 560 }
561 else { 561 else {
@@ -679,7 +679,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
679 break; 679 break;
680 } 680 }
681 681
682if(wpa_Result.authenticated==TRUE) { 682if(wpa_Result.authenticated==true) {
683 #ifdef SndEvt_ToAPI 683 #ifdef SndEvt_ToAPI
684 { 684 {
685 union iwreq_data wrqu; 685 union iwreq_data wrqu;
@@ -692,7 +692,7 @@ if(wpa_Result.authenticated==TRUE) {
692 wireless_send_event(pDevice->dev, IWEVCUSTOM, &wrqu, pItemSSID->abySSID); 692 wireless_send_event(pDevice->dev, IWEVCUSTOM, &wrqu, pItemSSID->abySSID);
693 } 693 }
694 #endif 694 #endif
695 pDevice->fWPA_Authened = TRUE; //is successful peer to wpa_Result.authenticated? 695 pDevice->fWPA_Authened = true; //is successful peer to wpa_Result.authenticated?
696} 696}
697 697
698 //printk("get private wpa_supplicant announce WPA SM\n"); 698 //printk("get private wpa_supplicant announce WPA SM\n");
@@ -700,7 +700,7 @@ if(wpa_Result.authenticated==TRUE) {
700 //printk("wpa-->proto=%d\n",wpa_Result.proto); 700 //printk("wpa-->proto=%d\n",wpa_Result.proto);
701 //printk("wpa-->key-mgmt=%d\n",wpa_Result.key_mgmt); 701 //printk("wpa-->key-mgmt=%d\n",wpa_Result.key_mgmt);
702 //printk("wpa-->eap_type=%d\n",wpa_Result.eap_type); 702 //printk("wpa-->eap_type=%d\n",wpa_Result.eap_type);
703 //printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==TRUE)?"TRUE":"FALSE"); 703 //printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==true)?"true":"FALSE");
704 704
705 pReq->wResult = 0; 705 pReq->wResult = 0;
706 break; 706 break;
@@ -728,7 +728,7 @@ vConfigWEPKey (
728 memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN); 728 memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN);
729 memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength); 729 memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength);
730 730
731 pDevice->bWepKeyAvailable[dwKeyIndex] = TRUE; 731 pDevice->bWepKeyAvailable[dwKeyIndex] = true;
732 pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength; 732 pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength;
733 733
734 MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex, 734 MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex,
@@ -736,7 +736,7 @@ vConfigWEPKey (
736 736
737 if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) { 737 if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) {
738 for(ii=0; ii<MAX_GROUP_KEY; ii++) { 738 for(ii=0; ii<MAX_GROUP_KEY; ii++) {
739 if ((pDevice->bWepKeyAvailable[ii] == TRUE) && 739 if ((pDevice->bWepKeyAvailable[ii] == true) &&
740 (pDevice->auWepKeyLength[ii] == WLAN_WEP232_KEYLEN)) { 740 (pDevice->auWepKeyLength[ii] == WLAN_WEP232_KEYLEN)) {
741 pDevice->uCurrentWEPMode = TX_WEP_SW232; 741 pDevice->uCurrentWEPMode = TX_WEP_SW232;
742 MACvDisableDefaultKey(pDevice->PortOffset); 742 MACvDisableDefaultKey(pDevice->PortOffset);
diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c
index 6a713e27727a..7aca978cbd0d 100644
--- a/drivers/staging/vt6655/iwctl.c
+++ b/drivers/staging/vt6655/iwctl.c
@@ -99,7 +99,7 @@ struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
99 else 99 else
100 pDevice->scStatistic.LinkQuality = (96-pDevice->byCurrSQ)*100/76; 100 pDevice->scStatistic.LinkQuality = (96-pDevice->byCurrSQ)*100/76;
101 } 101 }
102 if(pDevice->bLinkPass !=TRUE) 102 if(pDevice->bLinkPass !=true)
103 pDevice->scStatistic.LinkQuality = 0; 103 pDevice->scStatistic.LinkQuality = 0;
104 #endif 104 #endif
105 if(pDevice->scStatistic.LinkQuality > 100) 105 if(pDevice->scStatistic.LinkQuality > 100)
@@ -426,7 +426,7 @@ int iwctl_siwfreq(struct net_device *dev,
426 pDevice->uChannel = channel; 426 pDevice->uChannel = channel;
427 //2007-0207-04,<Add> by EinsnLiu 427 //2007-0207-04,<Add> by EinsnLiu
428 //Make change effect at once 428 //Make change effect at once
429 pDevice->bCommit = TRUE; 429 pDevice->bCommit = true;
430 } 430 }
431 } 431 }
432 432
@@ -489,7 +489,7 @@ int iwctl_siwmode(struct net_device *dev,
489 if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) { 489 if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) {
490 pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA; 490 pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;
491 if (pDevice->flags & DEVICE_FLAGS_OPENED) { 491 if (pDevice->flags & DEVICE_FLAGS_OPENED) {
492 pDevice->bCommit = TRUE; 492 pDevice->bCommit = true;
493 } 493 }
494 } 494 }
495 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n"); 495 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n");
@@ -499,7 +499,7 @@ int iwctl_siwmode(struct net_device *dev,
499 if (pMgmt->eConfigMode != WMAC_CONFIG_ESS_STA) { 499 if (pMgmt->eConfigMode != WMAC_CONFIG_ESS_STA) {
500 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; 500 pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
501 if (pDevice->flags & DEVICE_FLAGS_OPENED) { 501 if (pDevice->flags & DEVICE_FLAGS_OPENED) {
502 pDevice->bCommit = TRUE; 502 pDevice->bCommit = true;
503 } 503 }
504 } 504 }
505 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n"); 505 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n");
@@ -513,7 +513,7 @@ int iwctl_siwmode(struct net_device *dev,
513 if (pMgmt->eConfigMode != WMAC_CONFIG_AP) { 513 if (pMgmt->eConfigMode != WMAC_CONFIG_AP) {
514 pMgmt->eConfigMode = WMAC_CONFIG_AP; 514 pMgmt->eConfigMode = WMAC_CONFIG_AP;
515 if (pDevice->flags & DEVICE_FLAGS_OPENED) { 515 if (pDevice->flags & DEVICE_FLAGS_OPENED) {
516 pDevice->bCommit = TRUE; 516 pDevice->bCommit = true;
517 } 517 }
518 } 518 }
519 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n"); 519 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n");
@@ -701,7 +701,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
701 else { 701 else {
702 memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6); 702 memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
703 //2008-0409-05, <Add> by Einsn Liu 703 //2008-0409-05, <Add> by Einsn Liu
704 if((pDevice->bLinkPass == TRUE) && 704 if((pDevice->bLinkPass == true) &&
705 (memcmp(pMgmt->abyDesireBSSID, pMgmt->abyCurrBSSID, 6)== 0)){ 705 (memcmp(pMgmt->abyDesireBSSID, pMgmt->abyCurrBSSID, 6)== 0)){
706 return rc; 706 return rc;
707 } 707 }
@@ -728,7 +728,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
728 } 728 }
729 729
730 if (pDevice->flags & DEVICE_FLAGS_OPENED) { 730 if (pDevice->flags & DEVICE_FLAGS_OPENED) {
731 pDevice->bCommit = TRUE; 731 pDevice->bCommit = true;
732 } 732 }
733 } 733 }
734 return rc; 734 return rc;
@@ -848,7 +848,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
848 PRINT_K("set essid to 'any' \n"); 848 PRINT_K("set essid to 'any' \n");
849 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 849 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
850 //Unknown desired AP,so here need not associate?? 850 //Unknown desired AP,so here need not associate??
851 //if(pDevice->bWPASuppWextEnabled == TRUE) { 851 //if(pDevice->bWPASuppWextEnabled == true) {
852 return 0; 852 return 0;
853 // } 853 // }
854 #endif 854 #endif
@@ -868,7 +868,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
868 printk("set essid to %s \n",pItemSSID->abySSID); 868 printk("set essid to %s \n",pItemSSID->abySSID);
869 //2008-0409-05, <Add> by Einsn Liu 869 //2008-0409-05, <Add> by Einsn Liu
870 len=(pItemSSID->len > ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len)?pItemSSID->len:((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len; 870 len=(pItemSSID->len > ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len)?pItemSSID->len:((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len;
871 if((pDevice->bLinkPass == TRUE) && 871 if((pDevice->bLinkPass == true) &&
872 (memcmp(pItemSSID->abySSID,((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,len)==0)) 872 (memcmp(pItemSSID->abySSID,((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,len)==0))
873 return 0; 873 return 0;
874 874
@@ -881,7 +881,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
881#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 881#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
882 //Wext wil order another command of siwap to link with desired AP, 882 //Wext wil order another command of siwap to link with desired AP,
883 //so here need not associate?? 883 //so here need not associate??
884 if(pDevice->bWPASuppWextEnabled == TRUE) { 884 if(pDevice->bWPASuppWextEnabled == true) {
885 /*******search if in hidden ssid mode ****/ 885 /*******search if in hidden ssid mode ****/
886 { 886 {
887 PKnownBSS pCurr = NULL; 887 PKnownBSS pCurr = NULL;
@@ -927,7 +927,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) {
927 } 927 }
928 928
929 if (pDevice->flags & DEVICE_FLAGS_OPENED) { 929 if (pDevice->flags & DEVICE_FLAGS_OPENED) {
930 pDevice->bCommit = TRUE; 930 pDevice->bCommit = true;
931 } 931 }
932 932
933 933
@@ -1033,7 +1033,7 @@ int iwctl_siwrate(struct net_device *dev,
1033 // Fixed mode 1033 // Fixed mode
1034 // One rate, fixed 1034 // One rate, fixed
1035 printk("Rate Fix\n"); 1035 printk("Rate Fix\n");
1036 pDevice->bFixRate = TRUE; 1036 pDevice->bFixRate = true;
1037 if ((pDevice->byBBType == BB_TYPE_11B)&& (brate > 3)) { 1037 if ((pDevice->byBBType == BB_TYPE_11B)&& (brate > 3)) {
1038 pDevice->uConnectionRate = 3; 1038 pDevice->uConnectionRate = 3;
1039 } 1039 }
@@ -1072,7 +1072,7 @@ int iwctl_giwrate(struct net_device *dev,
1072 int brate = 0; 1072 int brate = 0;
1073//2008-5-8 <modify> by chester 1073//2008-5-8 <modify> by chester
1074if(pDevice->bLinkPass){ 1074if(pDevice->bLinkPass){
1075if(pDevice->bFixRate == TRUE){ 1075if(pDevice->bFixRate == true){
1076 if (pDevice->uConnectionRate < 13) { 1076 if (pDevice->uConnectionRate < 13) {
1077 brate = abySupportedRates[pDevice->uConnectionRate]; 1077 brate = abySupportedRates[pDevice->uConnectionRate];
1078 }else { 1078 }else {
@@ -1108,8 +1108,8 @@ else brate =0;
1108// brate = abySupportedRates[pDevice->wCurrentRate]; 1108// brate = abySupportedRates[pDevice->wCurrentRate];
1109 wrq->value = brate * 500000; 1109 wrq->value = brate * 500000;
1110 // If more than one rate, set auto 1110 // If more than one rate, set auto
1111 if (pDevice->bFixRate == TRUE) 1111 if (pDevice->bFixRate == true)
1112 wrq->fixed = TRUE; 1112 wrq->fixed = true;
1113 } 1113 }
1114 1114
1115 1115
@@ -1370,8 +1370,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
1370 } 1370 }
1371 pDevice->byKeyIndex = (unsigned char)dwKeyIndex; 1371 pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
1372 pDevice->uKeyLength = wrq->length; 1372 pDevice->uKeyLength = wrq->length;
1373 pDevice->bTransmitKey = TRUE; 1373 pDevice->bTransmitKey = true;
1374 pDevice->bEncryptionEnable = TRUE; 1374 pDevice->bEncryptionEnable = true;
1375 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 1375 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
1376 1376
1377 }else if(index>0){ 1377 }else if(index>0){
@@ -1462,8 +1462,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
1462 } 1462 }
1463 pDevice->byKeyIndex = (unsigned char)dwKeyIndex; 1463 pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
1464 pDevice->uKeyLength = wrq->length; 1464 pDevice->uKeyLength = wrq->length;
1465 pDevice->bTransmitKey = TRUE; 1465 pDevice->bTransmitKey = true;
1466 pDevice->bEncryptionEnable = TRUE; 1466 pDevice->bEncryptionEnable = true;
1467 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 1467 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
1468 1468
1469 // Do we want to just set the transmit key index ? 1469 // Do we want to just set the transmit key index ?
@@ -1493,7 +1493,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){
1493 1493
1494 if(wrq->flags & IW_ENCODE_RESTRICTED) { 1494 if(wrq->flags & IW_ENCODE_RESTRICTED) {
1495 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n"); 1495 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n");
1496 pMgmt->bShareKeyAlgorithm = TRUE; 1496 pMgmt->bShareKeyAlgorithm = true;
1497 } 1497 }
1498 if(wrq->flags & IW_ENCODE_OPEN) { 1498 if(wrq->flags & IW_ENCODE_OPEN) {
1499 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n"); 1499 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n");
@@ -1729,7 +1729,7 @@ int iwctl_giwsens(struct net_device *dev,
1729 long ldBm; 1729 long ldBm;
1730 1730
1731 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); 1731 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n");
1732 if (pDevice->bLinkPass == TRUE) { 1732 if (pDevice->bLinkPass == true) {
1733 RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm); 1733 RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm);
1734 wrq->value = ldBm; 1734 wrq->value = ldBm;
1735 } 1735 }
@@ -1771,7 +1771,7 @@ int iwctl_siwauth(struct net_device *dev,
1771 else { 1771 else {
1772 PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n"); 1772 PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n");
1773 } 1773 }
1774 //pDevice->bWPASuppWextEnabled =TRUE; 1774 //pDevice->bWPASuppWextEnabled =true;
1775 break; 1775 break;
1776 case IW_AUTH_CIPHER_PAIRWISE: 1776 case IW_AUTH_CIPHER_PAIRWISE:
1777 pairwise = wrq->value; 1777 pairwise = wrq->value;
@@ -1820,7 +1820,7 @@ int iwctl_siwauth(struct net_device *dev,
1820 if(wrq->value==IW_AUTH_ALG_OPEN_SYSTEM){ 1820 if(wrq->value==IW_AUTH_ALG_OPEN_SYSTEM){
1821 pMgmt->bShareKeyAlgorithm=FALSE; 1821 pMgmt->bShareKeyAlgorithm=FALSE;
1822 }else if(wrq->value==IW_AUTH_ALG_SHARED_KEY){ 1822 }else if(wrq->value==IW_AUTH_ALG_SHARED_KEY){
1823 pMgmt->bShareKeyAlgorithm=TRUE; 1823 pMgmt->bShareKeyAlgorithm=true;
1824 } 1824 }
1825 break; 1825 break;
1826 case IW_AUTH_WPA_ENABLED: 1826 case IW_AUTH_WPA_ENABLED:
@@ -1852,9 +1852,9 @@ int iwctl_siwauth(struct net_device *dev,
1852 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise); 1852 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise);
1853 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus); 1853 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus);
1854 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode); 1854 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode);
1855 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"TRUE":"FALSE"); 1855 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"true":"FALSE");
1856 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"TRUE":"FALSE"); 1856 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"true":"FALSE");
1857 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"TRUE":"FALSE"); 1857 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"true":"FALSE");
1858*/ 1858*/
1859 return ret; 1859 return ret;
1860} 1860}
@@ -2055,12 +2055,12 @@ if(param->u.wpa_key.alg_name == WPA_ALG_NONE) {
2055if( pDevice->bwextcount == 4) { 2055if( pDevice->bwextcount == 4) {
2056 printk("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n"); 2056 printk("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n");
2057 pDevice->bwextcount=0; 2057 pDevice->bwextcount=0;
2058 pDevice->bWPASuppWextEnabled = TRUE; 2058 pDevice->bWPASuppWextEnabled = true;
2059 } 2059 }
2060//****** 2060//******
2061 2061
2062 spin_lock_irq(&pDevice->lock); 2062 spin_lock_irq(&pDevice->lock);
2063 ret = wpa_set_keys(pDevice, param, TRUE); 2063 ret = wpa_set_keys(pDevice, param, true);
2064 spin_unlock_irq(&pDevice->lock); 2064 spin_unlock_irq(&pDevice->lock);
2065 2065
2066error: 2066error:
@@ -2099,7 +2099,7 @@ int iwctl_siwmlme(struct net_device *dev,
2099 //bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (unsigned char *)&reason); 2099 //bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (unsigned char *)&reason);
2100 break; 2100 break;
2101 case IW_MLME_DISASSOC: 2101 case IW_MLME_DISASSOC:
2102 if(pDevice->bLinkPass == TRUE){ 2102 if(pDevice->bLinkPass == true){
2103 printk("iwctl_siwmlme--->send DISASSOCIATE\n"); 2103 printk("iwctl_siwmlme--->send DISASSOCIATE\n");
2104 //clear related flags 2104 //clear related flags
2105 memset(pMgmt->abyDesireBSSID, 0xFF,6); 2105 memset(pMgmt->abyDesireBSSID, 0xFF,6);
diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c
index 490f653962c9..d61b493b19c6 100644
--- a/drivers/staging/vt6655/key.c
+++ b/drivers/staging/vt6655/key.c
@@ -64,7 +64,7 @@ s_vCheckKeyTableValid (PSKeyManagement pTable, unsigned long dwIoBase)
64 int i; 64 int i;
65 65
66 for (i=0;i<MAX_KEY_TABLE;i++) { 66 for (i=0;i<MAX_KEY_TABLE;i++) {
67 if ((pTable->KeyTable[i].bInUse == TRUE) && 67 if ((pTable->KeyTable[i].bInUse == true) &&
68 (pTable->KeyTable[i].PairwiseKey.bKeyValid == FALSE) && 68 (pTable->KeyTable[i].PairwiseKey.bKeyValid == FALSE) &&
69 (pTable->KeyTable[i].GroupKey[0].bKeyValid == FALSE) && 69 (pTable->KeyTable[i].GroupKey[0].bKeyValid == FALSE) &&
70 (pTable->KeyTable[i].GroupKey[1].bKeyValid == FALSE) && 70 (pTable->KeyTable[i].GroupKey[1].bKeyValid == FALSE) &&
@@ -128,7 +128,7 @@ void KeyvInitTable (PSKeyManagement pTable, unsigned long dwIoBase)
128 * Out: 128 * Out:
129 * pKey - Key return 129 * pKey - Key return
130 * 130 *
131 * Return Value: TRUE if found otherwise FALSE 131 * Return Value: true if found otherwise FALSE
132 * 132 *
133 */ 133 */
134BOOL KeybGetKey ( 134BOOL KeybGetKey (
@@ -144,20 +144,20 @@ BOOL KeybGetKey (
144 144
145 *pKey = NULL; 145 *pKey = NULL;
146 for (i=0;i<MAX_KEY_TABLE;i++) { 146 for (i=0;i<MAX_KEY_TABLE;i++) {
147 if ((pTable->KeyTable[i].bInUse == TRUE) && 147 if ((pTable->KeyTable[i].bInUse == true) &&
148 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { 148 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
149 if (dwKeyIndex == 0xFFFFFFFF) { 149 if (dwKeyIndex == 0xFFFFFFFF) {
150 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { 150 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
151 *pKey = &(pTable->KeyTable[i].PairwiseKey); 151 *pKey = &(pTable->KeyTable[i].PairwiseKey);
152 return (TRUE); 152 return (true);
153 } 153 }
154 else { 154 else {
155 return (FALSE); 155 return (FALSE);
156 } 156 }
157 } else if (dwKeyIndex < MAX_GROUP_KEY) { 157 } else if (dwKeyIndex < MAX_GROUP_KEY) {
158 if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == TRUE) { 158 if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) {
159 *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]); 159 *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]);
160 return (TRUE); 160 return (true);
161 } 161 }
162 else { 162 else {
163 return (FALSE); 163 return (FALSE);
@@ -186,7 +186,7 @@ BOOL KeybGetKey (
186 * Out: 186 * Out:
187 * none 187 * none
188 * 188 *
189 * Return Value: TRUE if success otherwise FALSE 189 * Return Value: true if success otherwise FALSE
190 * 190 *
191 */ 191 */
192BOOL KeybSetKey ( 192BOOL KeybSetKey (
@@ -215,7 +215,7 @@ BOOL KeybSetKey (
215 // found empty table 215 // found empty table
216 j = i; 216 j = i;
217 } 217 }
218 if ((pTable->KeyTable[i].bInUse == TRUE) && 218 if ((pTable->KeyTable[i].bInUse == true) &&
219 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { 219 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
220 // found table already exist 220 // found table already exist
221 if ((dwKeyIndex & PAIRWISE_KEY) != 0) { 221 if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
@@ -241,7 +241,7 @@ BOOL KeybSetKey (
241 } 241 }
242 pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly 242 pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly
243 243
244 pKey->bKeyValid = TRUE; 244 pKey->bKeyValid = true;
245 pKey->uKeyLength = uKeyLength; 245 pKey->uKeyLength = uKeyLength;
246 pKey->dwKeyIndex = dwKeyIndex; 246 pKey->dwKeyIndex = dwKeyIndex;
247 pKey->byCipherSuite = byKeyDecMode; 247 pKey->byCipherSuite = byKeyDecMode;
@@ -277,12 +277,12 @@ BOOL KeybSetKey (
277 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); 277 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
278 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); 278 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
279 279
280 return (TRUE); 280 return (true);
281 } 281 }
282 } 282 }
283 if (j < (MAX_KEY_TABLE-1)) { 283 if (j < (MAX_KEY_TABLE-1)) {
284 memcpy(pTable->KeyTable[j].abyBSSID,pbyBSSID,ETH_ALEN); 284 memcpy(pTable->KeyTable[j].abyBSSID,pbyBSSID,ETH_ALEN);
285 pTable->KeyTable[j].bInUse = TRUE; 285 pTable->KeyTable[j].bInUse = true;
286 if ((dwKeyIndex & PAIRWISE_KEY) != 0) { 286 if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
287 // Pairwise key 287 // Pairwise key
288 pKey = &(pTable->KeyTable[j].PairwiseKey); 288 pKey = &(pTable->KeyTable[j].PairwiseKey);
@@ -306,7 +306,7 @@ BOOL KeybSetKey (
306 } 306 }
307 pTable->KeyTable[j].wKeyCtl |= 0x8000; // enable on-fly 307 pTable->KeyTable[j].wKeyCtl |= 0x8000; // enable on-fly
308 308
309 pKey->bKeyValid = TRUE; 309 pKey->bKeyValid = true;
310 pKey->uKeyLength = uKeyLength; 310 pKey->uKeyLength = uKeyLength;
311 pKey->dwKeyIndex = dwKeyIndex; 311 pKey->dwKeyIndex = dwKeyIndex;
312 pKey->byCipherSuite = byKeyDecMode; 312 pKey->byCipherSuite = byKeyDecMode;
@@ -342,7 +342,7 @@ BOOL KeybSetKey (
342 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); 342 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
343 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); 343 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
344 344
345 return (TRUE); 345 return (true);
346 } 346 }
347 return (FALSE); 347 return (FALSE);
348} 348}
@@ -359,7 +359,7 @@ BOOL KeybSetKey (
359 * Out: 359 * Out:
360 * none 360 * none
361 * 361 *
362 * Return Value: TRUE if success otherwise FALSE 362 * Return Value: true if success otherwise FALSE
363 * 363 *
364 */ 364 */
365BOOL KeybRemoveKey ( 365BOOL KeybRemoveKey (
@@ -378,7 +378,7 @@ BOOL KeybRemoveKey (
378 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; 378 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
379 } 379 }
380 s_vCheckKeyTableValid(pTable, dwIoBase); 380 s_vCheckKeyTableValid(pTable, dwIoBase);
381 return TRUE; 381 return true;
382 } 382 }
383 else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { 383 else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
384 for (i=0;i<MAX_KEY_TABLE;i++) { 384 for (i=0;i<MAX_KEY_TABLE;i++) {
@@ -389,7 +389,7 @@ BOOL KeybRemoveKey (
389 } 389 }
390 } 390 }
391 s_vCheckKeyTableValid(pTable, dwIoBase); 391 s_vCheckKeyTableValid(pTable, dwIoBase);
392 return TRUE; 392 return true;
393 } 393 }
394 else { 394 else {
395 return FALSE; 395 return FALSE;
@@ -397,12 +397,12 @@ BOOL KeybRemoveKey (
397 } 397 }
398 398
399 for (i=0;i<MAX_KEY_TABLE;i++) { 399 for (i=0;i<MAX_KEY_TABLE;i++) {
400 if ((pTable->KeyTable[i].bInUse == TRUE) && 400 if ((pTable->KeyTable[i].bInUse == true) &&
401 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { 401 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
402 if ((dwKeyIndex & PAIRWISE_KEY) != 0) { 402 if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
403 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; 403 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
404 s_vCheckKeyTableValid(pTable, dwIoBase); 404 s_vCheckKeyTableValid(pTable, dwIoBase);
405 return (TRUE); 405 return (true);
406 } 406 }
407 else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { 407 else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
408 pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; 408 pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE;
@@ -411,7 +411,7 @@ BOOL KeybRemoveKey (
411 pTable->KeyTable[i].dwGTKeyIndex = 0; 411 pTable->KeyTable[i].dwGTKeyIndex = 0;
412 } 412 }
413 s_vCheckKeyTableValid(pTable, dwIoBase); 413 s_vCheckKeyTableValid(pTable, dwIoBase);
414 return (TRUE); 414 return (true);
415 } 415 }
416 else { 416 else {
417 return (FALSE); 417 return (FALSE);
@@ -432,7 +432,7 @@ BOOL KeybRemoveKey (
432 * Out: 432 * Out:
433 * none 433 * none
434 * 434 *
435 * Return Value: TRUE if success otherwise FALSE 435 * Return Value: true if success otherwise FALSE
436 * 436 *
437 */ 437 */
438BOOL KeybRemoveAllKey ( 438BOOL KeybRemoveAllKey (
@@ -444,7 +444,7 @@ BOOL KeybRemoveAllKey (
444 int i,u; 444 int i,u;
445 445
446 for (i=0;i<MAX_KEY_TABLE;i++) { 446 for (i=0;i<MAX_KEY_TABLE;i++) {
447 if ((pTable->KeyTable[i].bInUse == TRUE) && 447 if ((pTable->KeyTable[i].bInUse == true) &&
448 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { 448 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
449 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; 449 pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE;
450 for(u=0;u<MAX_GROUP_KEY;u++) { 450 for(u=0;u<MAX_GROUP_KEY;u++) {
@@ -452,7 +452,7 @@ BOOL KeybRemoveAllKey (
452 } 452 }
453 pTable->KeyTable[i].dwGTKeyIndex = 0; 453 pTable->KeyTable[i].dwGTKeyIndex = 0;
454 s_vCheckKeyTableValid(pTable, dwIoBase); 454 s_vCheckKeyTableValid(pTable, dwIoBase);
455 return (TRUE); 455 return (true);
456 } 456 }
457 } 457 }
458 return (FALSE); 458 return (FALSE);
@@ -467,7 +467,7 @@ BOOL KeybRemoveAllKey (
467 * Out: 467 * Out:
468 * none 468 * none
469 * 469 *
470 * Return Value: TRUE if success otherwise FALSE 470 * Return Value: true if success otherwise FALSE
471 * 471 *
472 */ 472 */
473void KeyvRemoveWEPKey ( 473void KeyvRemoveWEPKey (
@@ -478,7 +478,7 @@ void KeyvRemoveWEPKey (
478{ 478{
479 479
480 if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { 480 if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
481 if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == TRUE) { 481 if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == true) {
482 if (pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].byCipherSuite == KEY_CTL_WEP) { 482 if (pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].byCipherSuite == KEY_CTL_WEP) {
483 pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; 483 pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE;
484 if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) { 484 if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) {
@@ -514,7 +514,7 @@ void KeyvRemoveAllWEPKey (
514 * Out: 514 * Out:
515 * pKey - Key return 515 * pKey - Key return
516 * 516 *
517 * Return Value: TRUE if found otherwise FALSE 517 * Return Value: true if found otherwise FALSE
518 * 518 *
519 */ 519 */
520BOOL KeybGetTransmitKey ( 520BOOL KeybGetTransmitKey (
@@ -528,12 +528,12 @@ BOOL KeybGetTransmitKey (
528 528
529 *pKey = NULL; 529 *pKey = NULL;
530 for (i=0;i<MAX_KEY_TABLE;i++) { 530 for (i=0;i<MAX_KEY_TABLE;i++) {
531 if ((pTable->KeyTable[i].bInUse == TRUE) && 531 if ((pTable->KeyTable[i].bInUse == true) &&
532 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { 532 !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
533 533
534 if (dwKeyType == PAIRWISE_KEY) { 534 if (dwKeyType == PAIRWISE_KEY) {
535 535
536 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { 536 if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
537 *pKey = &(pTable->KeyTable[i].PairwiseKey); 537 *pKey = &(pTable->KeyTable[i].PairwiseKey);
538 538
539 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); 539 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -544,7 +544,7 @@ BOOL KeybGetTransmitKey (
544 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); 544 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
545 545
546 546
547 return (TRUE); 547 return (true);
548 } 548 }
549 else { 549 else {
550 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n"); 550 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n");
@@ -556,7 +556,7 @@ BOOL KeybGetTransmitKey (
556 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n"); 556 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n");
557 return FALSE; 557 return FALSE;
558 } 558 }
559 if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == TRUE) { 559 if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == true) {
560 *pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]); 560 *pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]);
561 561
562 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); 562 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
@@ -567,7 +567,7 @@ BOOL KeybGetTransmitKey (
567 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); 567 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
568 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); 568 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
569 569
570 return (TRUE); 570 return (true);
571 } 571 }
572 else { 572 else {
573 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n"); 573 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n");
@@ -594,7 +594,7 @@ BOOL KeybGetTransmitKey (
594 * Out: 594 * Out:
595 * none 595 * none
596 * 596 *
597 * Return Value: TRUE if found otherwise FALSE 597 * Return Value: true if found otherwise FALSE
598 * 598 *
599 */ 599 */
600BOOL KeybCheckPairewiseKey ( 600BOOL KeybCheckPairewiseKey (
@@ -606,10 +606,10 @@ BOOL KeybCheckPairewiseKey (
606 606
607 *pKey = NULL; 607 *pKey = NULL;
608 for (i=0;i<MAX_KEY_TABLE;i++) { 608 for (i=0;i<MAX_KEY_TABLE;i++) {
609 if ((pTable->KeyTable[i].bInUse == TRUE) && 609 if ((pTable->KeyTable[i].bInUse == true) &&
610 (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE)) { 610 (pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) {
611 *pKey = &(pTable->KeyTable[i].PairwiseKey); 611 *pKey = &(pTable->KeyTable[i].PairwiseKey);
612 return (TRUE); 612 return (true);
613 } 613 }
614 } 614 }
615 return (FALSE); 615 return (FALSE);
@@ -628,7 +628,7 @@ BOOL KeybCheckPairewiseKey (
628 * Out: 628 * Out:
629 * none 629 * none
630 * 630 *
631 * Return Value: TRUE if success otherwise FALSE 631 * Return Value: true if success otherwise FALSE
632 * 632 *
633 */ 633 */
634BOOL KeybSetDefaultKey ( 634BOOL KeybSetDefaultKey (
@@ -655,7 +655,7 @@ BOOL KeybSetDefaultKey (
655 return (FALSE); 655 return (FALSE);
656 } 656 }
657 657
658 pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = TRUE; 658 pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = true;
659 for(ii=0;ii<ETH_ALEN;ii++) 659 for(ii=0;ii<ETH_ALEN;ii++)
660 pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF; 660 pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF;
661 661
@@ -676,13 +676,13 @@ BOOL KeybSetDefaultKey (
676 if ((uKeyLength == WLAN_WEP232_KEYLEN) && 676 if ((uKeyLength == WLAN_WEP232_KEYLEN) &&
677 (byKeyDecMode == KEY_CTL_WEP)) { 677 (byKeyDecMode == KEY_CTL_WEP)) {
678 pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000; // disable on-fly disable address match 678 pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000; // disable on-fly disable address match
679 pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = TRUE; 679 pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = true;
680 } else { 680 } else {
681 if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == FALSE) 681 if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == FALSE)
682 pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000; // enable on-fly disable address match 682 pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000; // enable on-fly disable address match
683 } 683 }
684 684
685 pKey->bKeyValid = TRUE; 685 pKey->bKeyValid = true;
686 pKey->uKeyLength = uKeyLength; 686 pKey->uKeyLength = uKeyLength;
687 pKey->dwKeyIndex = dwKeyIndex; 687 pKey->dwKeyIndex = dwKeyIndex;
688 pKey->byCipherSuite = byKeyDecMode; 688 pKey->byCipherSuite = byKeyDecMode;
@@ -718,7 +718,7 @@ BOOL KeybSetDefaultKey (
718 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0); 718 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0);
719 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); 719 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex);
720 720
721 return (TRUE); 721 return (true);
722} 722}
723 723
724 724
@@ -735,7 +735,7 @@ BOOL KeybSetDefaultKey (
735 * Out: 735 * Out:
736 * none 736 * none
737 * 737 *
738 * Return Value: TRUE if success otherwise FALSE 738 * Return Value: true if success otherwise FALSE
739 * 739 *
740 */ 740 */
741BOOL KeybSetAllGroupKey ( 741BOOL KeybSetAllGroupKey (
@@ -764,7 +764,7 @@ BOOL KeybSetAllGroupKey (
764 } 764 }
765 765
766 for (i=0; i < MAX_KEY_TABLE-1; i++) { 766 for (i=0; i < MAX_KEY_TABLE-1; i++) {
767 if (pTable->KeyTable[i].bInUse == TRUE) { 767 if (pTable->KeyTable[i].bInUse == true) {
768 // found table already exist 768 // found table already exist
769 // Group key 769 // Group key
770 pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]); 770 pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
@@ -781,7 +781,7 @@ BOOL KeybSetAllGroupKey (
781 781
782 pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly 782 pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly
783 783
784 pKey->bKeyValid = TRUE; 784 pKey->bKeyValid = true;
785 pKey->uKeyLength = uKeyLength; 785 pKey->uKeyLength = uKeyLength;
786 pKey->dwKeyIndex = dwKeyIndex; 786 pKey->dwKeyIndex = dwKeyIndex;
787 pKey->byCipherSuite = byKeyDecMode; 787 pKey->byCipherSuite = byKeyDecMode;
@@ -817,7 +817,7 @@ BOOL KeybSetAllGroupKey (
817 //DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0)); 817 //DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0));
818 //DBG_PRN_GRP12(("pKey->dwKeyIndex: %lX\n ", pKey->dwKeyIndex)); 818 //DBG_PRN_GRP12(("pKey->dwKeyIndex: %lX\n ", pKey->dwKeyIndex));
819 819
820 } // (pTable->KeyTable[i].bInUse == TRUE) 820 } // (pTable->KeyTable[i].bInUse == true)
821 } 821 }
822 return (TRUE); 822 return (true);
823} 823}
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 48bfbf834bf3..4f46f488f793 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -137,7 +137,7 @@ void MACvReadAllRegs (unsigned long dwIoBase, unsigned char *pbyMacRegs)
137 * Out: 137 * Out:
138 * none 138 * none
139 * 139 *
140 * Return Value: TRUE if all test bits On; otherwise FALSE 140 * Return Value: true if all test bits On; otherwise FALSE
141 * 141 *
142 */ 142 */
143BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits) 143BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
@@ -160,7 +160,7 @@ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned c
160 * Out: 160 * Out:
161 * none 161 * none
162 * 162 *
163 * Return Value: TRUE if all test bits Off; otherwise FALSE 163 * Return Value: true if all test bits Off; otherwise FALSE
164 * 164 *
165 */ 165 */
166BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits) 166BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits)
@@ -181,7 +181,7 @@ BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned
181 * Out: 181 * Out:
182 * none 182 * none
183 * 183 *
184 * Return Value: TRUE if interrupt is disable; otherwise FALSE 184 * Return Value: true if interrupt is disable; otherwise FALSE
185 * 185 *
186 */ 186 */
187BOOL MACbIsIntDisable (unsigned long dwIoBase) 187BOOL MACbIsIntDisable (unsigned long dwIoBase)
@@ -192,7 +192,7 @@ BOOL MACbIsIntDisable (unsigned long dwIoBase)
192 if (dwData != 0) 192 if (dwData != 0)
193 return FALSE; 193 return FALSE;
194 194
195 return TRUE; 195 return true;
196} 196}
197 197
198/* 198/*
@@ -556,7 +556,7 @@ void MACvSetLoopbackMode (unsigned long dwIoBase, unsigned char byLoopbackMode)
556 * Out: 556 * Out:
557 * none 557 * none
558 * 558 *
559 * Return Value: TRUE if in Loopback mode; otherwise FALSE 559 * Return Value: true if in Loopback mode; otherwise FALSE
560 * 560 *
561 */ 561 */
562BOOL MACbIsInLoopbackMode (unsigned long dwIoBase) 562BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
@@ -565,7 +565,7 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase)
565 565
566 VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue); 566 VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue);
567 if (byOrgValue & (TEST_LBINT | TEST_LBEXT)) 567 if (byOrgValue & (TEST_LBINT | TEST_LBEXT))
568 return TRUE; 568 return true;
569 return FALSE; 569 return FALSE;
570} 570}
571 571
@@ -725,7 +725,7 @@ void MACvRestoreContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
725 * Out: 725 * Out:
726 * none 726 * none
727 * 727 *
728 * Return Value: TRUE if all values are the same; otherwise FALSE 728 * Return Value: true if all values are the same; otherwise FALSE
729 * 729 *
730 */ 730 */
731BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) 731BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
@@ -733,7 +733,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
733 unsigned long dwData; 733 unsigned long dwData;
734 734
735 // compare MAC context to determine if this is a power lost init, 735 // compare MAC context to determine if this is a power lost init,
736 // return TRUE for power remaining init, return FALSE for power lost init 736 // return true for power remaining init, return FALSE for power lost init
737 737
738 // compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR 738 // compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR
739 VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData); 739 VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData);
@@ -757,7 +757,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
757 } 757 }
758 758
759 759
760 return TRUE; 760 return true;
761} 761}
762 762
763/* 763/*
@@ -770,7 +770,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf)
770 * Out: 770 * Out:
771 * none 771 * none
772 * 772 *
773 * Return Value: TRUE if Reset Success; otherwise FALSE 773 * Return Value: true if Reset Success; otherwise FALSE
774 * 774 *
775 */ 775 */
776BOOL MACbSoftwareReset (unsigned long dwIoBase) 776BOOL MACbSoftwareReset (unsigned long dwIoBase)
@@ -789,7 +789,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
789 } 789 }
790 if (ww == W_MAX_TIMEOUT) 790 if (ww == W_MAX_TIMEOUT)
791 return FALSE; 791 return FALSE;
792 return TRUE; 792 return true;
793 793
794} 794}
795 795
@@ -803,7 +803,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase)
803 * Out: 803 * Out:
804 * none 804 * none
805 * 805 *
806 * Return Value: TRUE if success; otherwise FALSE 806 * Return Value: true if success; otherwise FALSE
807 * 807 *
808 */ 808 */
809BOOL MACbSafeSoftwareReset (unsigned long dwIoBase) 809BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
@@ -836,7 +836,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase)
836 * Out: 836 * Out:
837 * none 837 * none
838 * 838 *
839 * Return Value: TRUE if success; otherwise FALSE 839 * Return Value: true if success; otherwise FALSE
840 * 840 *
841 */ 841 */
842BOOL MACbSafeRxOff (unsigned long dwIoBase) 842BOOL MACbSafeRxOff (unsigned long dwIoBase)
@@ -884,7 +884,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
884 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n"); 884 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n");
885 return(FALSE); 885 return(FALSE);
886 } 886 }
887 return TRUE; 887 return true;
888} 888}
889 889
890/* 890/*
@@ -897,7 +897,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase)
897 * Out: 897 * Out:
898 * none 898 * none
899 * 899 *
900 * Return Value: TRUE if success; otherwise FALSE 900 * Return Value: true if success; otherwise FALSE
901 * 901 *
902 */ 902 */
903BOOL MACbSafeTxOff (unsigned long dwIoBase) 903BOOL MACbSafeTxOff (unsigned long dwIoBase)
@@ -948,7 +948,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
948 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n"); 948 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n");
949 return(FALSE); 949 return(FALSE);
950 } 950 }
951 return TRUE; 951 return true;
952} 952}
953 953
954/* 954/*
@@ -961,7 +961,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase)
961 * Out: 961 * Out:
962 * none 962 * none
963 * 963 *
964 * Return Value: TRUE if success; otherwise FALSE 964 * Return Value: true if success; otherwise FALSE
965 * 965 *
966 */ 966 */
967BOOL MACbSafeStop (unsigned long dwIoBase) 967BOOL MACbSafeStop (unsigned long dwIoBase)
@@ -983,7 +983,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase)
983 983
984 MACvRegBitsOff(dwIoBase, MAC_REG_HOSTCR, HOSTCR_MACEN); 984 MACvRegBitsOff(dwIoBase, MAC_REG_HOSTCR, HOSTCR_MACEN);
985 985
986 return TRUE; 986 return true;
987} 987}
988 988
989/* 989/*
@@ -996,7 +996,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase)
996 * Out: 996 * Out:
997 * none 997 * none
998 * 998 *
999 * Return Value: TRUE if success; otherwise FALSE 999 * Return Value: true if success; otherwise FALSE
1000 * 1000 *
1001 */ 1001 */
1002BOOL MACbShutdown (unsigned long dwIoBase) 1002BOOL MACbShutdown (unsigned long dwIoBase)
@@ -1010,7 +1010,7 @@ BOOL MACbShutdown (unsigned long dwIoBase)
1010 return FALSE; 1010 return FALSE;
1011 } 1011 }
1012 MACvSetLoopbackMode(dwIoBase, MAC_LB_NONE); 1012 MACvSetLoopbackMode(dwIoBase, MAC_LB_NONE);
1013 return TRUE; 1013 return true;
1014} 1014}
1015 1015
1016/* 1016/*
@@ -1045,7 +1045,7 @@ void MACvInitialize (unsigned long dwIoBase)
1045 // issue AUTOLD in EECSR to reload eeprom 1045 // issue AUTOLD in EECSR to reload eeprom
1046 //MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD); 1046 //MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD);
1047 // wait until EEPROM loading complete 1047 // wait until EEPROM loading complete
1048 //while (TRUE) { 1048 //while (true) {
1049 // u8 u8Data; 1049 // u8 u8Data;
1050 // VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data); 1050 // VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data);
1051 // if ( !(u8Data & I2MCSR_AUTOLD)) 1051 // if ( !(u8Data & I2MCSR_AUTOLD))
@@ -1344,7 +1344,7 @@ unsigned int ww = 0;
1344 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n"); 1344 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n");
1345 return FALSE; 1345 return FALSE;
1346 } 1346 }
1347 return TRUE; 1347 return true;
1348} 1348}
1349 1349
1350void MACvClearBusSusInd (unsigned long dwIoBase) 1350void MACvClearBusSusInd (unsigned long dwIoBase)
@@ -1412,7 +1412,7 @@ BOOL MACbFlushSYNCFifo (unsigned long dwIoBase)
1412 DBG_PORT80(0x35); 1412 DBG_PORT80(0x35);
1413 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); 1413 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n");
1414 } 1414 }
1415 return TRUE; 1415 return true;
1416} 1416}
1417 1417
1418BOOL MACbPSWakeup (unsigned long dwIoBase) 1418BOOL MACbPSWakeup (unsigned long dwIoBase)
@@ -1421,7 +1421,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
1421 unsigned int ww; 1421 unsigned int ww;
1422 // Read PSCTL 1422 // Read PSCTL
1423 if (MACbIsRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PS)) { 1423 if (MACbIsRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PS)) {
1424 return TRUE; 1424 return true;
1425 } 1425 }
1426 // Disable PS 1426 // Disable PS
1427 MACvRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PSEN); 1427 MACvRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PSEN);
@@ -1437,7 +1437,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase)
1437 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); 1437 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n");
1438 return FALSE; 1438 return FALSE;
1439 } 1439 }
1440 return TRUE; 1440 return true;
1441} 1441}
1442 1442
1443/* 1443/*
diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c
index 3debc8986cd0..f191f8771410 100644
--- a/drivers/staging/vt6655/power.c
+++ b/drivers/staging/vt6655/power.c
@@ -115,7 +115,7 @@ PSvEnablePowerSaving(
115 115
116 // enable power saving hw function 116 // enable power saving hw function
117 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); 117 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN);
118 pDevice->bEnablePSMode = TRUE; 118 pDevice->bEnablePSMode = true;
119 119
120 if (pDevice->eOPMode == OP_MODE_ADHOC) { 120 if (pDevice->eOPMode == OP_MODE_ADHOC) {
121// bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); 121// bMgrPrepareBeaconToSend((void *)pDevice, pMgmt);
@@ -124,7 +124,7 @@ PSvEnablePowerSaving(
124 else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) { 124 else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) {
125 PSbSendNullPacket(pDevice); 125 PSbSendNullPacket(pDevice);
126 } 126 }
127 pDevice->bPWBitOn = TRUE; 127 pDevice->bPWBitOn = true;
128 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n"); 128 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n");
129 return; 129 return;
130} 130}
@@ -177,7 +177,7 @@ PSvDisablePowerSaving(
177 * Consider to power down when no more packets to tx or rx. 177 * Consider to power down when no more packets to tx or rx.
178 * 178 *
179 * Return Value: 179 * Return Value:
180 * TRUE, if power down success 180 * true, if power down success
181 * FALSE, if fail 181 * FALSE, if fail
182-*/ 182-*/
183 183
@@ -195,7 +195,7 @@ PSbConsiderPowerDown(
195 195
196 // check if already in Doze mode 196 // check if already in Doze mode
197 if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS)) 197 if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS))
198 return TRUE; 198 return true;
199 199
200 if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { 200 if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
201 // check if in TIM wake period 201 // check if in TIM wake period
@@ -233,7 +233,7 @@ PSbConsiderPowerDown(
233 // no Tx, no Rx isr, now go to Doze 233 // no Tx, no Rx isr, now go to Doze
234 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); 234 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE);
235 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); 235 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
236 return TRUE; 236 return true;
237} 237}
238 238
239 239
@@ -369,7 +369,7 @@ PSbSendNullPacket(
369 } 369 }
370 370
371 371
372 return TRUE ; 372 return true ;
373} 373}
374 374
375/*+ 375/*+
@@ -402,7 +402,7 @@ PSbIsNextTBTTWakeUp(
402 if (pMgmt->wCountToWakeUp == 1) { 402 if (pMgmt->wCountToWakeUp == 1) {
403 // Turn on wake up to listen next beacon 403 // Turn on wake up to listen next beacon
404 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); 404 MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN);
405 bWakeUp = TRUE; 405 bWakeUp = true;
406 } 406 }
407 407
408 } 408 }
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index b4d76fe98778..6069d4aa86b3 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -471,7 +471,7 @@ const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = {
471 * Out: 471 * Out:
472 * none 472 * none
473 * 473 *
474 * Return Value: TRUE if succeeded; FALSE if failed. 474 * Return Value: true if succeeded; FALSE if failed.
475 * 475 *
476 */ 476 */
477BOOL s_bAL7230Init (unsigned long dwIoBase) 477BOOL s_bAL7230Init (unsigned long dwIoBase)
@@ -479,7 +479,7 @@ BOOL s_bAL7230Init (unsigned long dwIoBase)
479 int ii; 479 int ii;
480 BOOL bResult; 480 BOOL bResult;
481 481
482 bResult = TRUE; 482 bResult = true;
483 483
484 //3-wire control for normal mode 484 //3-wire control for normal mode
485 VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0); 485 VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0);
@@ -521,7 +521,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
521{ 521{
522 BOOL bResult; 522 BOOL bResult;
523 523
524 bResult = TRUE; 524 bResult = true;
525 525
526 // PLLON Off 526 // PLLON Off
527 MACvWordRegBitsOff(dwIoBase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPE3); 527 MACvWordRegBitsOff(dwIoBase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPE3);
@@ -552,7 +552,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
552 * Out: 552 * Out:
553 * none 553 * none
554 * 554 *
555 * Return Value: TRUE if succeeded; FALSE if failed. 555 * Return Value: true if succeeded; FALSE if failed.
556 * 556 *
557 */ 557 */
558 558
@@ -567,7 +567,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
567 * Out: 567 * Out:
568 * none 568 * none
569 * 569 *
570 * Return Value: TRUE if succeeded; FALSE if failed. 570 * Return Value: true if succeeded; FALSE if failed.
571 * 571 *
572 */ 572 */
573 573
@@ -585,7 +585,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
585 * Out: 585 * Out:
586 * none 586 * none
587 * 587 *
588 * Return Value: TRUE if succeeded; FALSE if failed. 588 * Return Value: true if succeeded; FALSE if failed.
589 * 589 *
590 */ 590 */
591 591
@@ -599,7 +599,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
599 * Out: 599 * Out:
600 * none 600 * none
601 * 601 *
602 * Return Value: TRUE if succeeded; FALSE if failed. 602 * Return Value: true if succeeded; FALSE if failed.
603 * 603 *
604 */ 604 */
605 605
@@ -619,7 +619,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
619 * Out: 619 * Out:
620 * none 620 * none
621 * 621 *
622 * Return Value: TRUE if succeeded; FALSE if failed. 622 * Return Value: true if succeeded; FALSE if failed.
623 * 623 *
624 */ 624 */
625BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) 625BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
@@ -640,7 +640,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
640// DBG_PORT80_ALWAYS(0x32); 640// DBG_PORT80_ALWAYS(0x32);
641 return FALSE; 641 return FALSE;
642 } 642 }
643 return TRUE; 643 return true;
644} 644}
645 645
646 646
@@ -654,7 +654,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
654 * Out: 654 * Out:
655 * none 655 * none
656 * 656 *
657 * Return Value: TRUE if succeeded; FALSE if failed. 657 * Return Value: true if succeeded; FALSE if failed.
658 * 658 *
659 */ 659 */
660 660
@@ -668,7 +668,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
668 * Out: 668 * Out:
669 * none 669 * none
670 * 670 *
671 * Return Value: TRUE if succeeded; FALSE if failed. 671 * Return Value: true if succeeded; FALSE if failed.
672 * 672 *
673 */ 673 */
674 674
@@ -681,7 +681,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData)
681 * Out: 681 * Out:
682 * none 682 * none
683 * 683 *
684 * Return Value: TRUE if succeeded; FALSE if failed. 684 * Return Value: true if succeeded; FALSE if failed.
685 * 685 *
686 */ 686 */
687BOOL RFbAL2230Init (unsigned long dwIoBase) 687BOOL RFbAL2230Init (unsigned long dwIoBase)
@@ -689,7 +689,7 @@ BOOL RFbAL2230Init (unsigned long dwIoBase)
689 int ii; 689 int ii;
690 BOOL bResult; 690 BOOL bResult;
691 691
692 bResult = TRUE; 692 bResult = true;
693 693
694 //3-wire control for normal mode 694 //3-wire control for normal mode
695 VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0); 695 VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0);
@@ -738,7 +738,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
738{ 738{
739 BOOL bResult; 739 BOOL bResult;
740 740
741 bResult = TRUE; 741 bResult = true;
742 742
743 bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable0[byChannel-1]); 743 bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable0[byChannel-1]);
744 bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable1[byChannel-1]); 744 bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable1[byChannel-1]);
@@ -761,7 +761,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
761 * Out: 761 * Out:
762 * none 762 * none
763 * 763 *
764 * Return Value: TRUE if succeeded; FALSE if failed. 764 * Return Value: true if succeeded; FALSE if failed.
765 * 765 *
766 */ 766 */
767 767
@@ -776,7 +776,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
776 * Out: 776 * Out:
777 * none 777 * none
778 * 778 *
779 * Return Value: TRUE if succeeded; FALSE if failed. 779 * Return Value: true if succeeded; FALSE if failed.
780 * 780 *
781 */ 781 */
782 782
@@ -790,7 +790,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
790 * Out: 790 * Out:
791 * none 791 * none
792 * 792 *
793 * Return Value: TRUE if succeeded; FALSE if failed. 793 * Return Value: true if succeeded; FALSE if failed.
794 * 794 *
795 */ 795 */
796 796
@@ -804,14 +804,14 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel)
804 * Out: 804 * Out:
805 * none 805 * none
806 * 806 *
807 * Return Value: TRUE if succeeded; FALSE if failed. 807 * Return Value: true if succeeded; FALSE if failed.
808 * 808 *
809 */ 809 */
810BOOL RFbInit ( 810BOOL RFbInit (
811 PSDevice pDevice 811 PSDevice pDevice
812 ) 812 )
813{ 813{
814BOOL bResult = TRUE; 814BOOL bResult = true;
815 switch (pDevice->byRFType) { 815 switch (pDevice->byRFType) {
816 case RF_AIROHA : 816 case RF_AIROHA :
817 case RF_AL2230S: 817 case RF_AL2230S:
@@ -823,7 +823,7 @@ BOOL bResult = TRUE;
823 bResult = s_bAL7230Init(pDevice->PortOffset); 823 bResult = s_bAL7230Init(pDevice->PortOffset);
824 break; 824 break;
825 case RF_NOTHING : 825 case RF_NOTHING :
826 bResult = TRUE; 826 bResult = true;
827 break; 827 break;
828 default : 828 default :
829 bResult = FALSE; 829 bResult = FALSE;
@@ -842,21 +842,21 @@ BOOL bResult = TRUE;
842 * Out: 842 * Out:
843 * none 843 * none
844 * 844 *
845 * Return Value: TRUE if succeeded; FALSE if failed. 845 * Return Value: true if succeeded; FALSE if failed.
846 * 846 *
847 */ 847 */
848BOOL RFbShutDown ( 848BOOL RFbShutDown (
849 PSDevice pDevice 849 PSDevice pDevice
850 ) 850 )
851{ 851{
852BOOL bResult = TRUE; 852BOOL bResult = true;
853 853
854 switch (pDevice->byRFType) { 854 switch (pDevice->byRFType) {
855 case RF_AIROHA7230 : 855 case RF_AIROHA7230 :
856 bResult = IFRFbWriteEmbeded (pDevice->PortOffset, 0x1ABAEF00+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW); 856 bResult = IFRFbWriteEmbeded (pDevice->PortOffset, 0x1ABAEF00+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW);
857 break; 857 break;
858 default : 858 default :
859 bResult = TRUE; 859 bResult = true;
860 break; 860 break;
861 } 861 }
862 return bResult; 862 return bResult;
@@ -872,12 +872,12 @@ BOOL bResult = TRUE;
872 * Out: 872 * Out:
873 * none 873 * none
874 * 874 *
875 * Return Value: TRUE if succeeded; FALSE if failed. 875 * Return Value: true if succeeded; FALSE if failed.
876 * 876 *
877 */ 877 */
878BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel) 878BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel)
879{ 879{
880BOOL bResult = TRUE; 880BOOL bResult = true;
881 switch (byRFType) { 881 switch (byRFType) {
882 882
883 case RF_AIROHA : 883 case RF_AIROHA :
@@ -890,7 +890,7 @@ BOOL bResult = TRUE;
890 break; 890 break;
891 //}} RobertYu 891 //}} RobertYu
892 case RF_NOTHING : 892 case RF_NOTHING :
893 bResult = TRUE; 893 bResult = true;
894 break; 894 break;
895 default: 895 default:
896 bResult = FALSE; 896 bResult = FALSE;
@@ -970,7 +970,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
970 //}} RobertYu 970 //}} RobertYu
971 971
972 case RF_NOTHING : 972 case RF_NOTHING :
973 return TRUE; 973 return true;
974 break; 974 break;
975 975
976 default: 976 default:
@@ -980,7 +980,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
980 980
981 MACvSetMISCFifo(dwIoBase, MISCFIFO_SYNINFO_IDX, (unsigned long )MAKEWORD(bySleepCount, byInitCount)); 981 MACvSetMISCFifo(dwIoBase, MISCFIFO_SYNINFO_IDX, (unsigned long )MAKEWORD(bySleepCount, byInitCount));
982 982
983 return TRUE; 983 return true;
984} 984}
985 985
986/* 986/*
@@ -993,7 +993,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign
993 * Out: 993 * Out:
994 * none 994 * none
995 * 995 *
996 * Return Value: TRUE if succeeded; FALSE if failed. 996 * Return Value: true if succeeded; FALSE if failed.
997 * 997 *
998 */ 998 */
999BOOL RFbSetPower ( 999BOOL RFbSetPower (
@@ -1002,13 +1002,13 @@ BOOL RFbSetPower (
1002 unsigned int uCH 1002 unsigned int uCH
1003 ) 1003 )
1004{ 1004{
1005BOOL bResult = TRUE; 1005BOOL bResult = true;
1006unsigned char byPwr = 0; 1006unsigned char byPwr = 0;
1007unsigned char byDec = 0; 1007unsigned char byDec = 0;
1008unsigned char byPwrdBm = 0; 1008unsigned char byPwrdBm = 0;
1009 1009
1010 if (pDevice->dwDiagRefCount != 0) { 1010 if (pDevice->dwDiagRefCount != 0) {
1011 return TRUE; 1011 return true;
1012 } 1012 }
1013 if ((uCH < 1) || (uCH > CB_MAX_CHANNEL)) { 1013 if ((uCH < 1) || (uCH > CB_MAX_CHANNEL)) {
1014 return FALSE; 1014 return FALSE;
@@ -1070,7 +1070,7 @@ unsigned char byPwrdBm = 0;
1070#if 0 1070#if 0
1071 1071
1072 // 802.11h TPC 1072 // 802.11h TPC
1073 if (pDevice->bLinkPass == TRUE) { 1073 if (pDevice->bLinkPass == true) {
1074 // do not over local constraint 1074 // do not over local constraint
1075 if (byPwrdBm > pDevice->abyLocalPwr[uCH]) { 1075 if (byPwrdBm > pDevice->abyLocalPwr[uCH]) {
1076 pDevice->byCurPwrdBm = pDevice->abyLocalPwr[uCH]; 1076 pDevice->byCurPwrdBm = pDevice->abyLocalPwr[uCH];
@@ -1111,11 +1111,11 @@ unsigned char byPwrdBm = 0;
1111 1111
1112// if (pDevice->byLocalID <= REV_ID_VT3253_B1) { 1112// if (pDevice->byLocalID <= REV_ID_VT3253_B1) {
1113 if (pDevice->byCurPwr == byPwr) { 1113 if (pDevice->byCurPwr == byPwr) {
1114 return TRUE; 1114 return true;
1115 } 1115 }
1116 bResult = RFbRawSetPower(pDevice, byPwr, uRATE); 1116 bResult = RFbRawSetPower(pDevice, byPwr, uRATE);
1117// } 1117// }
1118 if (bResult == TRUE) { 1118 if (bResult == true) {
1119 pDevice->byCurPwr = byPwr; 1119 pDevice->byCurPwr = byPwr;
1120 } 1120 }
1121 return bResult; 1121 return bResult;
@@ -1131,7 +1131,7 @@ unsigned char byPwrdBm = 0;
1131 * Out: 1131 * Out:
1132 * none 1132 * none
1133 * 1133 *
1134 * Return Value: TRUE if succeeded; FALSE if failed. 1134 * Return Value: true if succeeded; FALSE if failed.
1135 * 1135 *
1136 */ 1136 */
1137 1137
@@ -1141,7 +1141,7 @@ BOOL RFbRawSetPower (
1141 unsigned int uRATE 1141 unsigned int uRATE
1142 ) 1142 )
1143{ 1143{
1144BOOL bResult = TRUE; 1144BOOL bResult = true;
1145unsigned long dwMax7230Pwr = 0; 1145unsigned long dwMax7230Pwr = 0;
1146 1146
1147 if (byPwr >= pDevice->byMaxPwrLevel) { 1147 if (byPwr >= pDevice->byMaxPwrLevel) {
@@ -1236,7 +1236,7 @@ BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, unsigned char by
1236{ 1236{
1237 BOOL bResult; 1237 BOOL bResult;
1238 1238
1239 bResult = TRUE; 1239 bResult = true;
1240 1240
1241 // if change between 11 b/g and 11a need to update the following register 1241 // if change between 11 b/g and 11a need to update the following register
1242 // Channel Index 1~14 1242 // Channel Index 1~14
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c
index 802de278675b..fa0b8ef8db12 100644
--- a/drivers/staging/vt6655/rxtx.c
+++ b/drivers/staging/vt6655/rxtx.c
@@ -1166,7 +1166,7 @@ s_vGenerateTxParameter (
1166 wFifoCtl = pFifoHead->wFIFOCtl; 1166 wFifoCtl = pFifoHead->wFIFOCtl;
1167 1167
1168 if (wFifoCtl & FIFOCTL_CRCDIS) { 1168 if (wFifoCtl & FIFOCTL_CRCDIS) {
1169 bDisCRC = TRUE; 1169 bDisCRC = true;
1170 } 1170 }
1171 1171
1172 if (wFifoCtl & FIFOCTL_AUTO_FB_0) { 1172 if (wFifoCtl & FIFOCTL_AUTO_FB_0) {
@@ -1375,12 +1375,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1375 if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0]))) 1375 if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])))
1376 bNeedACK = FALSE; 1376 bNeedACK = FALSE;
1377 else 1377 else
1378 bNeedACK = TRUE; 1378 bNeedACK = true;
1379 bIsAdhoc = TRUE; 1379 bIsAdhoc = true;
1380 } 1380 }
1381 else { 1381 else {
1382 // MSDUs in Infra mode always need ACK 1382 // MSDUs in Infra mode always need ACK
1383 bNeedACK = TRUE; 1383 bNeedACK = true;
1384 bIsAdhoc = FALSE; 1384 bIsAdhoc = FALSE;
1385 } 1385 }
1386 1386
@@ -1390,12 +1390,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1390 cbMACHdLen = WLAN_HDR_ADDR3_LEN; 1390 cbMACHdLen = WLAN_HDR_ADDR3_LEN;
1391 1391
1392 1392
1393 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL)) { 1393 if ((bNeedEncrypt == true) && (pTransmitKey != NULL)) {
1394 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { 1394 if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
1395 cbIVlen = 4; 1395 cbIVlen = 4;
1396 cbICVlen = 4; 1396 cbICVlen = 4;
1397 if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) { 1397 if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
1398 bIsWEP256 = TRUE; 1398 bIsWEP256 = true;
1399 } 1399 }
1400 } 1400 }
1401 if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) { 1401 if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
@@ -1425,7 +1425,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1425 bRTS = FALSE; 1425 bRTS = FALSE;
1426 } 1426 }
1427 else { 1427 else {
1428 bRTS = TRUE; 1428 bRTS = true;
1429 psTxBufHd->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY); 1429 psTxBufHd->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY);
1430 } 1430 }
1431 // 1431 //
@@ -1444,7 +1444,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1444 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet 1444 if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
1445 1445
1446 if (byFBOption == AUTO_FB_NONE) { 1446 if (byFBOption == AUTO_FB_NONE) {
1447 if (bRTS == TRUE) {//RTS_need 1447 if (bRTS == true) {//RTS_need
1448 pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize); 1448 pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
1449 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS)); 1449 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
1450 pvRTS = (PSRTS_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR); 1450 pvRTS = (PSRTS_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1462,7 +1462,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1462 } 1462 }
1463 } else { 1463 } else {
1464 // Auto Fall Back 1464 // Auto Fall Back
1465 if (bRTS == TRUE) {//RTS_need 1465 if (bRTS == true) {//RTS_need
1466 pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize); 1466 pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize);
1467 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS)); 1467 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS));
1468 pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR); 1468 pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR);
@@ -1483,7 +1483,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1483 else {//802.11a/b packet 1483 else {//802.11a/b packet
1484 1484
1485 if (byFBOption == AUTO_FB_NONE) { 1485 if (byFBOption == AUTO_FB_NONE) {
1486 if (bRTS == TRUE) { 1486 if (bRTS == true) {
1487 pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); 1487 pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
1488 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); 1488 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
1489 pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); 1489 pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1501,7 +1501,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1501 } 1501 }
1502 } else { 1502 } else {
1503 // Auto Fall Back 1503 // Auto Fall Back
1504 if (bRTS == TRUE) {//RTS_need 1504 if (bRTS == true) {//RTS_need
1505 pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); 1505 pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize);
1506 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); 1506 pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab));
1507 pvRTS = (PSRTS_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); 1507 pvRTS = (PSRTS_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR);
@@ -1522,7 +1522,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1522 memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize)); 1522 memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize));
1523 1523
1524////////////////////////////////////////////////////////////////// 1524//////////////////////////////////////////////////////////////////
1525 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { 1525 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1526 if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { 1526 if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
1527 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]); 1527 dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]);
1528 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]); 1528 dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]);
@@ -1549,7 +1549,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1549 pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen); 1549 pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
1550 pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding); 1550 pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding);
1551 1551
1552 if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE) && (bIsWEP256 == FALSE)) { 1552 if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true) && (bIsWEP256 == FALSE)) {
1553 // Fragmentation 1553 // Fragmentation
1554 // FragThreshold = Fragment size(Hdr+(IV)+fragment payload+(MIC)+(ICV)+FCS) 1554 // FragThreshold = Fragment size(Hdr+(IV)+fragment payload+(MIC)+(ICV)+FCS)
1555 cbFragmentSize = pDevice->wFragmentationThreshold; 1555 cbFragmentSize = pDevice->wFragmentationThreshold;
@@ -1584,7 +1584,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1584 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, 1584 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
1585 wFragType, uDMAIdx, uFragIdx); 1585 wFragType, uDMAIdx, uFragIdx);
1586 1586
1587 if (bNeedEncrypt == TRUE) { 1587 if (bNeedEncrypt == true) {
1588 //Fill TXKEY 1588 //Fill TXKEY
1589 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, 1589 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1590 pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR); 1590 pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1636,7 +1636,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1636 1636
1637 uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len; 1637 uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len;
1638 1638
1639 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { 1639 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1640 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize); 1640 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize);
1641 MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize); 1641 MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize);
1642 1642
@@ -1689,7 +1689,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1689 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, 1689 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
1690 wFragType, uDMAIdx, uFragIdx); 1690 wFragType, uDMAIdx, uFragIdx);
1691 1691
1692 if (bNeedEncrypt == TRUE) { 1692 if (bNeedEncrypt == true) {
1693 //Fill TXKEY 1693 //Fill TXKEY
1694 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, 1694 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1695 pbyMacHdr, (unsigned short)cbLastFragPayloadSize, (unsigned char *)pMICHDR); 1695 pbyMacHdr, (unsigned short)cbLastFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1728,7 +1728,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1728 uTmpLen = cbLastFragPayloadSize - cbMIClen; 1728 uTmpLen = cbLastFragPayloadSize - cbMIClen;
1729 1729
1730 } 1730 }
1731 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { 1731 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1732 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n", 1732 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n",
1733 uMICFragLen, cbLastFragPayloadSize, uTmpLen); 1733 uMICFragLen, cbLastFragPayloadSize, uTmpLen);
1734 1734
@@ -1820,7 +1820,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1820 wFragType, uDMAIdx, uFragIdx); 1820 wFragType, uDMAIdx, uFragIdx);
1821 1821
1822 1822
1823 if (bNeedEncrypt == TRUE) { 1823 if (bNeedEncrypt == true) {
1824 //Fill TXKEY 1824 //Fill TXKEY
1825 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, 1825 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1826 pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR); 1826 pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR);
@@ -1861,12 +1861,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1861 1861
1862 uTotalCopyLength += uTmpLen; 1862 uTotalCopyLength += uTmpLen;
1863 1863
1864 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { 1864 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
1865 1865
1866 MIC_vAppend((pbyBuffer + uLength), uTmpLen); 1866 MIC_vAppend((pbyBuffer + uLength), uTmpLen);
1867 1867
1868 if (uTmpLen < cbFragPayloadSize) { 1868 if (uTmpLen < cbFragPayloadSize) {
1869 bMIC2Frag = TRUE; 1869 bMIC2Frag = true;
1870 uMICFragLen = cbFragPayloadSize - uTmpLen; 1870 uMICFragLen = cbFragPayloadSize - uTmpLen;
1871 ASSERT(uMICFragLen < cbMIClen); 1871 ASSERT(uMICFragLen < cbMIClen);
1872 1872
@@ -1949,7 +1949,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1949 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, 1949 vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt,
1950 wFragType, uDMAIdx, 0); 1950 wFragType, uDMAIdx, 0);
1951 1951
1952 if (bNeedEncrypt == TRUE) { 1952 if (bNeedEncrypt == true) {
1953 //Fill TXKEY 1953 //Fill TXKEY
1954 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, 1954 s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
1955 pbyMacHdr, (unsigned short)cbFrameBodySize, (unsigned char *)pMICHDR); 1955 pbyMacHdr, (unsigned short)cbFrameBodySize, (unsigned char *)pMICHDR);
@@ -1998,7 +1998,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
1998 cbFrameBodySize - cb802_1_H_len 1998 cbFrameBodySize - cb802_1_H_len
1999 ); 1999 );
2000 2000
2001 if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){ 2001 if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){
2002 2002
2003 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength); 2003 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength);
2004 /* 2004 /*
@@ -2017,7 +2017,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT
2017 MIC_vUnInit(); 2017 MIC_vUnInit();
2018 2018
2019 2019
2020 if (pDevice->bTxMICFail == TRUE) { 2020 if (pDevice->bTxMICFail == true) {
2021 *pdwMIC_L = 0; 2021 *pdwMIC_L = 0;
2022 *pdwMIC_R = 0; 2022 *pdwMIC_R = 0;
2023 pDevice->bTxMICFail = FALSE; 2023 pDevice->bTxMICFail = FALSE;
@@ -2093,14 +2093,14 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
2093 pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK); 2093 pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK);
2094 } 2094 }
2095 else { 2095 else {
2096 bNeedACK = TRUE; 2096 bNeedACK = true;
2097 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; 2097 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
2098 } 2098 }
2099 bIsAdhoc = TRUE; 2099 bIsAdhoc = true;
2100 } 2100 }
2101 else { 2101 else {
2102 // MSDUs in Infra mode always need ACK 2102 // MSDUs in Infra mode always need ACK
2103 bNeedACK = TRUE; 2103 bNeedACK = true;
2104 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; 2104 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
2105 bIsAdhoc = FALSE; 2105 bIsAdhoc = FALSE;
2106 } 2106 }
@@ -2145,7 +2145,7 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb
2145 pTxBufHead->wFIFOCtl |= FIFOCTL_11GA; 2145 pTxBufHead->wFIFOCtl |= FIFOCTL_11GA;
2146 } 2146 }
2147 //Set FIFOCTL_GrpAckPolicy 2147 //Set FIFOCTL_GrpAckPolicy
2148 if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 2148 if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
2149 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; 2149 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
2150 } 2150 }
2151 2151
@@ -2391,7 +2391,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
2391 if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0]))) 2391 if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0])))
2392 bNeedACK = FALSE; 2392 bNeedACK = FALSE;
2393 else { 2393 else {
2394 bNeedACK = TRUE; 2394 bNeedACK = true;
2395 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; 2395 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
2396 }; 2396 };
2397 2397
@@ -2411,7 +2411,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
2411 pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0); 2411 pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
2412 2412
2413 if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) { 2413 if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) {
2414 bIsPSPOLL = TRUE; 2414 bIsPSPOLL = true;
2415 cbMacHdLen = WLAN_HDR_ADDR2_LEN; 2415 cbMacHdLen = WLAN_HDR_ADDR2_LEN;
2416 } else { 2416 } else {
2417 cbMacHdLen = WLAN_HDR_ADDR3_LEN; 2417 cbMacHdLen = WLAN_HDR_ADDR3_LEN;
@@ -2444,7 +2444,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
2444 cbIVlen = 8;//RSN Header 2444 cbIVlen = 8;//RSN Header
2445 cbICVlen = 8;//MIC 2445 cbICVlen = 8;//MIC
2446 pTxBufHead->wFragCtl |= FRAGCTL_AES; 2446 pTxBufHead->wFragCtl |= FRAGCTL_AES;
2447 pDevice->bAES = TRUE; 2447 pDevice->bAES = true;
2448 } 2448 }
2449 //MAC Header should be padding 0 to DW alignment. 2449 //MAC Header should be padding 0 to DW alignment.
2450 uPadding = 4 - (cbMacHdLen%4); 2450 uPadding = 4 - (cbMacHdLen%4);
@@ -2454,7 +2454,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
2454 cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen; 2454 cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen;
2455 2455
2456 //Set FIFOCTL_GrpAckPolicy 2456 //Set FIFOCTL_GrpAckPolicy
2457 if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 2457 if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
2458 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; 2458 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
2459 } 2459 }
2460 //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter() 2460 //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -2524,12 +2524,12 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
2524 //} 2524 //}
2525 do { 2525 do {
2526 if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) && 2526 if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
2527 (pDevice->bLinkPass == TRUE)) { 2527 (pDevice->bLinkPass == true)) {
2528 pbyBSSID = pDevice->abyBSSID; 2528 pbyBSSID = pDevice->abyBSSID;
2529 // get pairwise key 2529 // get pairwise key
2530 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { 2530 if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) {
2531 // get group key 2531 // get group key
2532 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { 2532 if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
2533 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); 2533 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n");
2534 break; 2534 break;
2535 } 2535 }
@@ -2725,11 +2725,11 @@ cbGetFragCount (
2725 if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0]))) 2725 if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0])))
2726 bNeedACK = FALSE; 2726 bNeedACK = FALSE;
2727 else 2727 else
2728 bNeedACK = TRUE; 2728 bNeedACK = true;
2729 } 2729 }
2730 else { 2730 else {
2731 // MSDUs in Infra mode always need ACK 2731 // MSDUs in Infra mode always need ACK
2732 bNeedACK = TRUE; 2732 bNeedACK = true;
2733 } 2733 }
2734 2734
2735 if (pDevice->bLongHeader) 2735 if (pDevice->bLongHeader)
@@ -2738,7 +2738,7 @@ cbGetFragCount (
2738 cbMACHdLen = WLAN_HDR_ADDR3_LEN; 2738 cbMACHdLen = WLAN_HDR_ADDR3_LEN;
2739 2739
2740 2740
2741 if (pDevice->bEncryptionEnable == TRUE) { 2741 if (pDevice->bEncryptionEnable == true) {
2742 2742
2743 if (pTransmitKey == NULL) { 2743 if (pTransmitKey == NULL) {
2744 if ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) || 2744 if ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) ||
@@ -2768,7 +2768,7 @@ cbGetFragCount (
2768 2768
2769 cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen; 2769 cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen;
2770 2770
2771 if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE)) { 2771 if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true)) {
2772 // Fragmentation 2772 // Fragmentation
2773 cbFragmentSize = pDevice->wFragmentationThreshold; 2773 cbFragmentSize = pDevice->wFragmentationThreshold;
2774 cbFragPayloadSize = cbFragmentSize - cbMACHdLen - cbIVlen - cbICVlen - cbFCSlen; 2774 cbFragPayloadSize = cbFragmentSize - cbMACHdLen - cbIVlen - cbICVlen - cbFCSlen;
@@ -2901,15 +2901,15 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
2901 bNeedACK = FALSE; 2901 bNeedACK = FALSE;
2902 if (pDevice->bEnableHostWEP) { 2902 if (pDevice->bEnableHostWEP) {
2903 uNodeIndex = 0; 2903 uNodeIndex = 0;
2904 bNodeExist = TRUE; 2904 bNodeExist = true;
2905 }; 2905 };
2906 } 2906 }
2907 else { 2907 else {
2908 if (pDevice->bEnableHostWEP) { 2908 if (pDevice->bEnableHostWEP) {
2909 if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex)) 2909 if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex))
2910 bNodeExist = TRUE; 2910 bNodeExist = true;
2911 }; 2911 };
2912 bNeedACK = TRUE; 2912 bNeedACK = true;
2913 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; 2913 pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
2914 }; 2914 };
2915 2915
@@ -2930,7 +2930,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
2930 pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0); 2930 pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
2931 2931
2932 if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) { 2932 if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) {
2933 bIsPSPOLL = TRUE; 2933 bIsPSPOLL = true;
2934 cbMacHdLen = WLAN_HDR_ADDR2_LEN; 2934 cbMacHdLen = WLAN_HDR_ADDR2_LEN;
2935 } else { 2935 } else {
2936 cbMacHdLen = WLAN_HDR_ADDR3_LEN; 2936 cbMacHdLen = WLAN_HDR_ADDR3_LEN;
@@ -2982,7 +2982,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
2982 cbICVlen = 8;//MIC 2982 cbICVlen = 8;//MIC
2983 cbMICHDR = sizeof(SMICHDRHead); 2983 cbMICHDR = sizeof(SMICHDRHead);
2984 pTxBufHead->wFragCtl |= FRAGCTL_AES; 2984 pTxBufHead->wFragCtl |= FRAGCTL_AES;
2985 pDevice->bAES = TRUE; 2985 pDevice->bAES = true;
2986 } 2986 }
2987 //MAC Header should be padding 0 to DW alignment. 2987 //MAC Header should be padding 0 to DW alignment.
2988 uPadding = 4 - (cbMacHdLen%4); 2988 uPadding = 4 - (cbMacHdLen%4);
@@ -2992,7 +2992,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
2992 cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen + cbExtSuppRate; 2992 cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen + cbExtSuppRate;
2993 2993
2994 //Set FIFOCTL_GrpAckPolicy 2994 //Set FIFOCTL_GrpAckPolicy
2995 if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 2995 if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
2996 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; 2996 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK;
2997 } 2997 }
2998 //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter() 2998 //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
@@ -3105,7 +3105,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un
3105 MIC_vGetMIC(pdwMIC_L, pdwMIC_R); 3105 MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
3106 MIC_vUnInit(); 3106 MIC_vUnInit();
3107 3107
3108 if (pDevice->bTxMICFail == TRUE) { 3108 if (pDevice->bTxMICFail == true) {
3109 *pdwMIC_L = 0; 3109 *pdwMIC_L = 0;
3110 *pdwMIC_R = 0; 3110 *pdwMIC_R = 0;
3111 pDevice->bTxMICFail = FALSE; 3111 pDevice->bTxMICFail = FALSE;
diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c
index 2f458fe6e943..eff1e47d07e0 100644
--- a/drivers/staging/vt6655/srom.c
+++ b/drivers/staging/vt6655/srom.c
@@ -122,7 +122,7 @@ unsigned char SROMbyReadEmbedded(unsigned long dwIoBase, unsigned char byContntO
122 * Out: 122 * Out:
123 * none 123 * none
124 * 124 *
125 * Return Value: TRUE if succeeded; FALSE if failed. 125 * Return Value: true if succeeded; FALSE if failed.
126 * 126 *
127 */ 127 */
128BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData) 128BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData)
@@ -160,7 +160,7 @@ BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, un
160 return FALSE; 160 return FALSE;
161 } 161 }
162 VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg); 162 VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg);
163 return TRUE; 163 return true;
164} 164}
165 165
166 166
@@ -219,7 +219,7 @@ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsig
219 * Out: 219 * Out:
220 * none 220 * none
221 * 221 *
222 * Return Value: TRUE if all test bits on; otherwise FALSE 222 * Return Value: true if all test bits on; otherwise FALSE
223 * 223 *
224 */ 224 */
225BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) 225BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
@@ -242,7 +242,7 @@ BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsi
242 * Out: 242 * Out:
243 * none 243 * none
244 * 244 *
245 * Return Value: TRUE if all test bits off; otherwise FALSE 245 * Return Value: true if all test bits off; otherwise FALSE
246 * 246 *
247 */ 247 */
248BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) 248BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits)
@@ -386,7 +386,7 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId)
386 * Out: 386 * Out:
387 * none 387 * none
388 * 388 *
389 * Return Value: TRUE if success; otherwise FALSE 389 * Return Value: true if success; otherwise FALSE
390 * 390 *
391 */ 391 */
392BOOL SROMbAutoLoad(unsigned long dwIoBase) 392BOOL SROMbAutoLoad(unsigned long dwIoBase)
@@ -414,7 +414,7 @@ BOOL SROMbAutoLoad(unsigned long dwIoBase)
414 414
415 if (ii == EEP_MAX_CONTEXT_SIZE) 415 if (ii == EEP_MAX_CONTEXT_SIZE)
416 return FALSE; 416 return FALSE;
417 return TRUE; 417 return true;
418} 418}
419 419
420 420
diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c
index ca767c25f095..02d588a5112f 100644
--- a/drivers/staging/vt6655/tether.c
+++ b/drivers/staging/vt6655/tether.c
@@ -93,7 +93,7 @@ unsigned char ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr)
93 * Out: 93 * Out:
94 * none 94 * none
95 * 95 *
96 * Return Value: TRUE if ok; FALSE if error. 96 * Return Value: true if ok; FALSE if error.
97 * 97 *
98 */ 98 */
99BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength) 99BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
@@ -104,6 +104,6 @@ BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
104 if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) { 104 if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) {
105 return FALSE; 105 return FALSE;
106 } 106 }
107 return TRUE; 107 return true;
108} 108}
109 109
diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h
index 5032c22b6c6b..67b30e0b6914 100644
--- a/drivers/staging/vt6655/ttype.h
+++ b/drivers/staging/vt6655/ttype.h
@@ -39,9 +39,6 @@
39 39
40typedef int BOOL; 40typedef int BOOL;
41 41
42#if !defined(TRUE)
43#define TRUE 1
44#endif
45#if !defined(FALSE) 42#if !defined(FALSE)
46#define FALSE 0 43#define FALSE 0
47#endif 44#endif
diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c
index 4783d34cef6d..796ab753d5d6 100644
--- a/drivers/staging/vt6655/vntwifi.c
+++ b/drivers/staging/vt6655/vntwifi.c
@@ -317,7 +317,7 @@ VNTWIFIvSetAuthenticationMode (
317 pMgmt->eAuthenMode = eAuthMode; 317 pMgmt->eAuthenMode = eAuthMode;
318 if ((eAuthMode == WMAC_AUTH_SHAREKEY) || 318 if ((eAuthMode == WMAC_AUTH_SHAREKEY) ||
319 (eAuthMode == WMAC_AUTH_AUTO)) { 319 (eAuthMode == WMAC_AUTH_AUTO)) {
320 pMgmt->bShareKeyAlgorithm = TRUE; 320 pMgmt->bShareKeyAlgorithm = true;
321 } else { 321 } else {
322 pMgmt->bShareKeyAlgorithm = FALSE; 322 pMgmt->bShareKeyAlgorithm = FALSE;
323 } 323 }
@@ -350,7 +350,7 @@ VNTWIFIvSetEncryptionMode (
350 if ((eEncryptionMode == WMAC_ENCRYPTION_WEPEnabled) || 350 if ((eEncryptionMode == WMAC_ENCRYPTION_WEPEnabled) ||
351 (eEncryptionMode == WMAC_ENCRYPTION_TKIPEnabled) || 351 (eEncryptionMode == WMAC_ENCRYPTION_TKIPEnabled) ||
352 (eEncryptionMode == WMAC_ENCRYPTION_AESEnabled) ) { 352 (eEncryptionMode == WMAC_ENCRYPTION_AESEnabled) ) {
353 pMgmt->bPrivacyInvoked = TRUE; 353 pMgmt->bPrivacyInvoked = true;
354 } else { 354 } else {
355 pMgmt->bPrivacyInvoked = FALSE; 355 pMgmt->bPrivacyInvoked = FALSE;
356 } 356 }
@@ -368,14 +368,14 @@ VNTWIFIbConfigPhyMode (
368 368
369 if ((ePhyType != PHY_TYPE_AUTO) && 369 if ((ePhyType != PHY_TYPE_AUTO) &&
370 (ePhyType != pMgmt->eCurrentPHYMode)) { 370 (ePhyType != pMgmt->eCurrentPHYMode)) {
371 if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL)==TRUE) { 371 if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL)==true) {
372 pMgmt->eCurrentPHYMode = ePhyType; 372 pMgmt->eCurrentPHYMode = ePhyType;
373 } else { 373 } else {
374 return(FALSE); 374 return(FALSE);
375 } 375 }
376 } 376 }
377 pMgmt->eConfigPHYMode = ePhyType; 377 pMgmt->eConfigPHYMode = ePhyType;
378 return(TRUE); 378 return(true);
379} 379}
380 380
381 381
@@ -467,7 +467,7 @@ VNTWIFIvGetNextBSS (
467 if (pBSS > &(pMgmt->sBSSList[MAX_BSS_NUM])) { 467 if (pBSS > &(pMgmt->sBSSList[MAX_BSS_NUM])) {
468 return; 468 return;
469 } 469 }
470 if (pBSS->bActive == TRUE) { 470 if (pBSS->bActive == true) {
471 *pvNextBSS = pBSS; 471 *pvNextBSS = pBSS;
472 return; 472 return;
473 } 473 }
@@ -510,7 +510,7 @@ VNTWIFIvUpdateNodeTxCounter(
510 } 510 }
511 } 511 }
512 pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts++; 512 pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts++;
513 if (bTxOk == TRUE) { 513 if (bTxOk == true) {
514 // transmit success, TxAttempts at least plus one 514 // transmit success, TxAttempts at least plus one
515 pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++; 515 pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
516 pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wRate]++; 516 pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wRate]++;
@@ -605,7 +605,7 @@ VNTWIFIbyGetKeyCypher(
605{ 605{
606 PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; 606 PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
607 607
608 if (bGroupKey == TRUE) { 608 if (bGroupKey == true) {
609 return (pMgmt->byCSSGK); 609 return (pMgmt->byCSSGK);
610 } else { 610 } else {
611 return (pMgmt->byCSSPK); 611 return (pMgmt->byCSSPK);
@@ -652,7 +652,7 @@ VNTWIFIbInit(
652 pMgmt->bCmdRunning = FALSE; 652 pMgmt->bCmdRunning = FALSE;
653 653
654 *pMgmtHandler = pMgmt; 654 *pMgmtHandler = pMgmt;
655 return TRUE; 655 return true;
656} 656}
657*/ 657*/
658 658
@@ -672,7 +672,7 @@ VNTWIFIbSetPMKIDCache (
672 } 672 }
673 pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; 673 pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount;
674 memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); 674 memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo)));
675 return (TRUE); 675 return (true);
676} 676}
677 677
678 678
@@ -761,11 +761,11 @@ VNTWIFIbMeasureReport(
761 pMgmt->uLengthOfRepEIDs += (2 + pMgmt->pCurrMeasureEIDRep->len); 761 pMgmt->uLengthOfRepEIDs += (2 + pMgmt->pCurrMeasureEIDRep->len);
762 pMgmt->pCurrMeasureEIDRep = (PWLAN_IE_MEASURE_REP) pbyCurrentEID; 762 pMgmt->pCurrMeasureEIDRep = (PWLAN_IE_MEASURE_REP) pbyCurrentEID;
763 } 763 }
764 if (bEndOfReport == TRUE) { 764 if (bEndOfReport == true) {
765 IEEE11hbMSRRepTx(pMgmt); 765 IEEE11hbMSRRepTx(pMgmt);
766 } 766 }
767 //spin_unlock_irq(&pDevice->lock); 767 //spin_unlock_irq(&pDevice->lock);
768 return (TRUE); 768 return (true);
769} 769}
770 770
771 771
@@ -781,7 +781,7 @@ VNTWIFIbChannelSwitch(
781 pMgmt->uCurrChannel = byNewChannel; 781 pMgmt->uCurrChannel = byNewChannel;
782 pMgmt->bSwitchChannel = FALSE; 782 pMgmt->bSwitchChannel = FALSE;
783 //spin_unlock_irq(&pDevice->lock); 783 //spin_unlock_irq(&pDevice->lock);
784 return TRUE; 784 return true;
785} 785}
786 786
787/* 787/*
@@ -794,16 +794,16 @@ VNTWIFIbRadarPresent(
794 PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; 794 PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
795 if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && 795 if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
796 (byChannel == (unsigned char) pMgmt->uCurrChannel) && 796 (byChannel == (unsigned char) pMgmt->uCurrChannel) &&
797 (pMgmt->bSwitchChannel != TRUE) && 797 (pMgmt->bSwitchChannel != true) &&
798 (pMgmt->b11hEnable == TRUE)) { 798 (pMgmt->b11hEnable == true)) {
799 if (!compare_ether_addr(pMgmt->abyIBSSDFSOwner, CARDpGetCurrentAddress(pMgmt->pAdapter))) { 799 if (!compare_ether_addr(pMgmt->abyIBSSDFSOwner, CARDpGetCurrentAddress(pMgmt->pAdapter))) {
800 pMgmt->byNewChannel = CARDbyAutoChannelSelect(pMgmt->pAdapter,(unsigned char) pMgmt->uCurrChannel); 800 pMgmt->byNewChannel = CARDbyAutoChannelSelect(pMgmt->pAdapter,(unsigned char) pMgmt->uCurrChannel);
801 pMgmt->bSwitchChannel = TRUE; 801 pMgmt->bSwitchChannel = true;
802 } 802 }
803 BEACONbSendBeacon(pMgmt); 803 BEACONbSendBeacon(pMgmt);
804 CARDbChannelSwitch(pMgmt->pAdapter, 0, pMgmt->byNewChannel, 10); 804 CARDbChannelSwitch(pMgmt->pAdapter, 0, pMgmt->byNewChannel, 10);
805 } 805 }
806 return TRUE; 806 return true;
807} 807}
808*/ 808*/
809 809
diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c
index b8e9d8ea84ea..eafaf535a4ce 100644
--- a/drivers/staging/vt6655/wcmd.c
+++ b/drivers/staging/vt6655/wcmd.c
@@ -137,11 +137,11 @@ vAdHocBeaconStop(PSDevice pDevice)
137 if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) && 137 if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) &&
138 (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) 138 (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G))
139 { 139 {
140 bStop = TRUE; 140 bStop = true;
141 } 141 }
142 if (pMgmt->uIBSSChannel > CB_MAX_CHANNEL_24G) 142 if (pMgmt->uIBSSChannel > CB_MAX_CHANNEL_24G)
143 { 143 {
144 bStop = TRUE; 144 bStop = true;
145 } 145 }
146 } 146 }
147 147
@@ -355,7 +355,7 @@ vCommandTimer (
355 355
356 if (pDevice->dwDiagRefCount != 0) 356 if (pDevice->dwDiagRefCount != 0)
357 return; 357 return;
358 if (pDevice->bCmdRunning != TRUE) 358 if (pDevice->bCmdRunning != true)
359 return; 359 return;
360 360
361 spin_lock_irq(&pDevice->lock); 361 spin_lock_irq(&pDevice->lock);
@@ -365,7 +365,7 @@ vCommandTimer (
365 case WLAN_CMD_SCAN_START: 365 case WLAN_CMD_SCAN_START:
366 366
367 pDevice->byReAssocCount = 0; 367 pDevice->byReAssocCount = 0;
368 if (pDevice->bRadioOff == TRUE) { 368 if (pDevice->bRadioOff == true) {
369 s_bCommandComplete(pDevice); 369 s_bCommandComplete(pDevice);
370 spin_unlock_irq(&pDevice->lock); 370 spin_unlock_irq(&pDevice->lock);
371 return; 371 return;
@@ -432,7 +432,7 @@ vCommandTimer (
432 432
433 vAdHocBeaconStop(pDevice); 433 vAdHocBeaconStop(pDevice);
434 434
435 if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == TRUE) { 435 if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == true) {
436 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel); 436 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel);
437 } else { 437 } else {
438 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel); 438 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel);
@@ -540,7 +540,7 @@ vCommandTimer (
540 540
541 case WLAN_CMD_SSID_START: 541 case WLAN_CMD_SSID_START:
542 pDevice->byReAssocCount = 0; 542 pDevice->byReAssocCount = 0;
543 if (pDevice->bRadioOff == TRUE) { 543 if (pDevice->bRadioOff == true) {
544 s_bCommandComplete(pDevice); 544 s_bCommandComplete(pDevice);
545 spin_unlock_irq(&pDevice->lock); 545 spin_unlock_irq(&pDevice->lock);
546 return; 546 return;
@@ -608,9 +608,9 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
608 if (netif_queue_stopped(pDevice->dev)){ 608 if (netif_queue_stopped(pDevice->dev)){
609 netif_wake_queue(pDevice->dev); 609 netif_wake_queue(pDevice->dev);
610 } 610 }
611 pDevice->bLinkPass = TRUE; 611 pDevice->bLinkPass = true;
612 612
613 pMgmt->sNodeDBTable[0].bActive = TRUE; 613 pMgmt->sNodeDBTable[0].bActive = true;
614 pMgmt->sNodeDBTable[0].uInActiveCount = 0; 614 pMgmt->sNodeDBTable[0].uInActiveCount = 0;
615 bClearBSSID_SCAN(pDevice); 615 bClearBSSID_SCAN(pDevice);
616 } 616 }
@@ -636,12 +636,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
636 if (netif_queue_stopped(pDevice->dev)){ 636 if (netif_queue_stopped(pDevice->dev)){
637 netif_wake_queue(pDevice->dev); 637 netif_wake_queue(pDevice->dev);
638 } 638 }
639 pDevice->bLinkPass = TRUE; 639 pDevice->bLinkPass = true;
640 } 640 }
641 else { 641 else {
642 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n"); 642 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
643 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 643 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
644 // if(pDevice->bWPASuppWextEnabled == TRUE) 644 // if(pDevice->bWPASuppWextEnabled == true)
645 { 645 {
646 union iwreq_data wrqu; 646 union iwreq_data wrqu;
647 memset(&wrqu, 0, sizeof (wrqu)); 647 memset(&wrqu, 0, sizeof (wrqu));
@@ -686,7 +686,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
686 pDevice->byLinkWaitCount = 0; 686 pDevice->byLinkWaitCount = 0;
687 #if 0 687 #if 0
688 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 688 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
689 // if(pDevice->bWPASuppWextEnabled == TRUE) 689 // if(pDevice->bWPASuppWextEnabled == true)
690 { 690 {
691 union iwreq_data wrqu; 691 union iwreq_data wrqu;
692 memset(&wrqu, 0, sizeof (wrqu)); 692 memset(&wrqu, 0, sizeof (wrqu));
@@ -708,7 +708,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
708 if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) { 708 if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) {
709 KeybRemoveAllKey(&(pDevice->sKey), pDevice->abyBSSID, pDevice->PortOffset); 709 KeybRemoveAllKey(&(pDevice->sKey), pDevice->abyBSSID, pDevice->PortOffset);
710 } 710 }
711 pDevice->bLinkPass = TRUE; 711 pDevice->bLinkPass = true;
712 pDevice->byLinkWaitCount = 0; 712 pDevice->byLinkWaitCount = 0;
713 pDevice->byReAssocCount = 0; 713 pDevice->byReAssocCount = 0;
714 bClearBSSID_SCAN(pDevice); 714 bClearBSSID_SCAN(pDevice);
@@ -733,7 +733,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
733 else { 733 else {
734 // printk("mike:-->First time triger TimerTxData InSleep\n"); 734 // printk("mike:-->First time triger TimerTxData InSleep\n");
735 } 735 }
736 pDevice->IsTxDataTrigger = TRUE; 736 pDevice->IsTxDataTrigger = true;
737 add_timer(&pDevice->sTimerTxData); 737 add_timer(&pDevice->sTimerTxData);
738 #endif 738 #endif
739 } 739 }
@@ -750,7 +750,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
750 pDevice->byLinkWaitCount = 0; 750 pDevice->byLinkWaitCount = 0;
751 #if 0 751 #if 0
752 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 752 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
753 // if(pDevice->bWPASuppWextEnabled == TRUE) 753 // if(pDevice->bWPASuppWextEnabled == true)
754 { 754 {
755 union iwreq_data wrqu; 755 union iwreq_data wrqu;
756 memset(&wrqu, 0, sizeof (wrqu)); 756 memset(&wrqu, 0, sizeof (wrqu));
@@ -772,7 +772,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
772 pMgmt->eCurrState = WMAC_STATE_IDLE; 772 pMgmt->eCurrState = WMAC_STATE_IDLE;
773 pMgmt->eCurrMode = WMAC_MODE_STANDBY; 773 pMgmt->eCurrMode = WMAC_MODE_STANDBY;
774 pDevice->bLinkPass = FALSE; 774 pDevice->bLinkPass = FALSE;
775 if (pDevice->bEnableHostWEP == TRUE) 775 if (pDevice->bEnableHostWEP == true)
776 BSSvClearNodeDBTable(pDevice, 1); 776 BSSvClearNodeDBTable(pDevice, 1);
777 else 777 else
778 BSSvClearNodeDBTable(pDevice, 0); 778 BSSvClearNodeDBTable(pDevice, 0);
@@ -792,7 +792,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
792 if (netif_queue_stopped(pDevice->dev)){ 792 if (netif_queue_stopped(pDevice->dev)){
793 netif_wake_queue(pDevice->dev); 793 netif_wake_queue(pDevice->dev);
794 } 794 }
795 pDevice->bLinkPass = TRUE; 795 pDevice->bLinkPass = true;
796 add_timer(&pMgmt->sTimerSecondCallback); 796 add_timer(&pMgmt->sTimerSecondCallback);
797 } 797 }
798 s_bCommandComplete(pDevice); 798 s_bCommandComplete(pDevice);
@@ -807,7 +807,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
807 pDevice->bMoreData = FALSE; 807 pDevice->bMoreData = FALSE;
808 } 808 }
809 else { 809 else {
810 pDevice->bMoreData = TRUE; 810 pDevice->bMoreData = true;
811 } 811 }
812 if (!device_dma0_xmit(pDevice, skb, 0)) { 812 if (!device_dma0_xmit(pDevice, skb, 0)) {
813 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail \n"); 813 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail \n");
@@ -830,7 +830,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
830 pDevice->bMoreData = FALSE; 830 pDevice->bMoreData = FALSE;
831 } 831 }
832 else { 832 else {
833 pDevice->bMoreData = TRUE; 833 pDevice->bMoreData = true;
834 } 834 }
835 if (!device_dma0_xmit(pDevice, skb, ii)) { 835 if (!device_dma0_xmit(pDevice, skb, ii)) {
836 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail \n"); 836 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail \n");
@@ -857,7 +857,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS
857 857
858 case WLAN_CMD_RADIO_START : 858 case WLAN_CMD_RADIO_START :
859 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n"); 859 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
860 if (pDevice->bRadioCmd == TRUE) 860 if (pDevice->bRadioCmd == true)
861 CARDbRadioPowerOn(pDevice); 861 CARDbRadioPowerOn(pDevice);
862 else 862 else
863 CARDbRadioPowerOff(pDevice); 863 CARDbRadioPowerOff(pDevice);
@@ -905,7 +905,7 @@ s_bCommandComplete (
905 PWLAN_IE_SSID pSSID; 905 PWLAN_IE_SSID pSSID;
906 BOOL bRadioCmd = FALSE; 906 BOOL bRadioCmd = FALSE;
907 //unsigned short wDeAuthenReason = 0; 907 //unsigned short wDeAuthenReason = 0;
908 BOOL bForceSCAN = TRUE; 908 BOOL bForceSCAN = true;
909 PSMgmtObject pMgmt = pDevice->pMgmt; 909 PSMgmtObject pMgmt = pDevice->pMgmt;
910 910
911 911
@@ -913,7 +913,7 @@ s_bCommandComplete (
913 if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) { 913 if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) {
914 //Command Queue Empty 914 //Command Queue Empty
915 pDevice->bCmdRunning = FALSE; 915 pDevice->bCmdRunning = FALSE;
916 return TRUE; 916 return true;
917 } 917 }
918 else { 918 else {
919 pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd; 919 pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
@@ -922,7 +922,7 @@ s_bCommandComplete (
922 bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN; 922 bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN;
923 ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE); 923 ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
924 pDevice->cbFreeCmdQueue++; 924 pDevice->cbFreeCmdQueue++;
925 pDevice->bCmdRunning = TRUE; 925 pDevice->bCmdRunning = true;
926 switch ( pDevice->eCommand ) { 926 switch ( pDevice->eCommand ) {
927 case WLAN_CMD_BSSID_SCAN: 927 case WLAN_CMD_BSSID_SCAN:
928 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n"); 928 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n");
@@ -934,7 +934,7 @@ s_bCommandComplete (
934 memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); 934 memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
935 } 935 }
936/* 936/*
937 if ((bForceSCAN == FALSE) && (pDevice->bLinkPass == TRUE)) { 937 if ((bForceSCAN == FALSE) && (pDevice->bLinkPass == true)) {
938 if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) && 938 if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) &&
939 ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) { 939 ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) {
940 pDevice->eCommandState = WLAN_CMD_IDLE; 940 pDevice->eCommandState = WLAN_CMD_IDLE;
@@ -975,7 +975,7 @@ s_bCommandComplete (
975 vCommandTimerWait((void *)pDevice, 0); 975 vCommandTimerWait((void *)pDevice, 0);
976 } 976 }
977 977
978 return TRUE; 978 return true;
979} 979}
980 980
981 981
@@ -993,7 +993,7 @@ BOOL bScheduleCommand (
993 return (FALSE); 993 return (FALSE);
994 } 994 }
995 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand; 995 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
996 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = TRUE; 996 pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
997 memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); 997 memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
998 998
999 if (pbyItem0 != NULL) { 999 if (pbyItem0 != NULL) {
@@ -1043,7 +1043,7 @@ BOOL bScheduleCommand (
1043 } 1043 }
1044 else { 1044 else {
1045 } 1045 }
1046 return (TRUE); 1046 return (true);
1047 1047
1048} 1048}
1049 1049
@@ -1058,7 +1058,7 @@ BOOL bScheduleCommand (
1058 * Out: 1058 * Out:
1059 * none 1059 * none
1060 * 1060 *
1061 * Return Value: TRUE if success; otherwise FALSE 1061 * Return Value: true if success; otherwise FALSE
1062 * 1062 *
1063 */ 1063 */
1064BOOL bClearBSSID_SCAN ( 1064BOOL bClearBSSID_SCAN (
@@ -1078,7 +1078,7 @@ BOOL bClearBSSID_SCAN (
1078 break; 1078 break;
1079 } 1079 }
1080 } 1080 }
1081 return TRUE; 1081 return true;
1082} 1082}
1083 1083
1084//mike add:reset command timer 1084//mike add:reset command timer
@@ -1126,14 +1126,14 @@ BSSvSecondTxData(
1126 1126
1127 spin_lock_irq(&pDevice->lock); 1127 spin_lock_irq(&pDevice->lock);
1128 #if 1 1128 #if 1
1129 if(((pDevice->bLinkPass ==TRUE)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking 1129 if(((pDevice->bLinkPass ==true)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking
1130 (pDevice->fWPA_Authened == TRUE)) { //wpa linking 1130 (pDevice->fWPA_Authened == true)) { //wpa linking
1131 #else 1131 #else
1132 if(pDevice->bLinkPass ==TRUE) { 1132 if(pDevice->bLinkPass ==true) {
1133 #endif 1133 #endif
1134 1134
1135 // printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__); 1135 // printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__);
1136 pDevice->fTxDataInSleep = TRUE; 1136 pDevice->fTxDataInSleep = true;
1137 PSbSendNullPacket(pDevice); //send null packet 1137 PSbSendNullPacket(pDevice); //send null packet
1138 pDevice->fTxDataInSleep = FALSE; 1138 pDevice->fTxDataInSleep = FALSE;
1139 } 1139 }
diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c
index 8a37b769e8ae..d388dfd256bb 100644
--- a/drivers/staging/vt6655/wctl.c
+++ b/drivers/staging/vt6655/wctl.c
@@ -52,7 +52,7 @@
52 52
53/* 53/*
54 * Description: 54 * Description:
55 * Scan Rx cache. Return TRUE if packet is duplicate, else 55 * Scan Rx cache. Return true if packet is duplicate, else
56 * inserts in receive cache and returns FALSE. 56 * inserts in receive cache and returns FALSE.
57 * 57 *
58 * Parameters: 58 * Parameters:
@@ -62,7 +62,7 @@
62 * Out: 62 * Out:
63 * none 63 * none
64 * 64 *
65 * Return Value: TRUE if packet duplicate; otherwise FALSE 65 * Return Value: true if packet duplicate; otherwise FALSE
66 * 66 *
67 */ 67 */
68 68
@@ -81,7 +81,7 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader)
81 (!compare_ether_addr(&(pCacheEntry->abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) 81 (!compare_ether_addr(&(pCacheEntry->abyAddr2[0]), &(pMACHeader->abyAddr2[0])))
82 ) { 82 ) {
83 /* Duplicate match */ 83 /* Duplicate match */
84 return TRUE; 84 return true;
85 } 85 }
86 ADD_ONE_WITH_WRAP_AROUND(uIndex, DUPLICATE_RX_CACHE_LENGTH); 86 ADD_ONE_WITH_WRAP_AROUND(uIndex, DUPLICATE_RX_CACHE_LENGTH);
87 } 87 }
@@ -113,7 +113,7 @@ unsigned int WCTLuSearchDFCB (PSDevice pDevice, PS802_11Header pMACHeader)
113unsigned int ii; 113unsigned int ii;
114 114
115 for(ii=0;ii<pDevice->cbDFCB;ii++) { 115 for(ii=0;ii<pDevice->cbDFCB;ii++) {
116 if ((pDevice->sRxDFCB[ii].bInUse == TRUE) && 116 if ((pDevice->sRxDFCB[ii].bInUse == true) &&
117 (!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) 117 (!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0])))
118 ) { 118 ) {
119 // 119 //
@@ -148,7 +148,7 @@ unsigned int ii;
148 if (pDevice->sRxDFCB[ii].bInUse == FALSE) { 148 if (pDevice->sRxDFCB[ii].bInUse == FALSE) {
149 pDevice->cbFreeDFCB--; 149 pDevice->cbFreeDFCB--;
150 pDevice->sRxDFCB[ii].uLifetime = pDevice->dwMaxReceiveLifetime; 150 pDevice->sRxDFCB[ii].uLifetime = pDevice->dwMaxReceiveLifetime;
151 pDevice->sRxDFCB[ii].bInUse = TRUE; 151 pDevice->sRxDFCB[ii].bInUse = true;
152 pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4); 152 pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4);
153 pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F); 153 pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F);
154 memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN); 154 memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN);
@@ -172,7 +172,7 @@ unsigned int ii;
172 * Out: 172 * Out:
173 * none 173 * none
174 * 174 *
175 * Return Value: TRUE if it is valid fragment packet and we have resource to defragment; otherwise FALSE 175 * Return Value: true if it is valid fragment packet and we have resource to defragment; otherwise FALSE
176 * 176 *
177 */ 177 */
178BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV) 178BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV)
@@ -180,7 +180,7 @@ BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, unsigned
180unsigned int uHeaderSize; 180unsigned int uHeaderSize;
181 181
182 182
183 if (bWEP == TRUE) { 183 if (bWEP == true) {
184 uHeaderSize = 28; 184 uHeaderSize = 28;
185 if (bExtIV) 185 if (bExtIV)
186 // ExtIV 186 // ExtIV
@@ -241,7 +241,7 @@ unsigned int uHeaderSize;
241 pDevice->cbFreeDFCB++; 241 pDevice->cbFreeDFCB++;
242 pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE; 242 pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE;
243 //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); 243 //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
244 return(TRUE); 244 return(true);
245 } 245 }
246 return(FALSE); 246 return(FALSE);
247 } 247 }
diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c
index 3f7600c6141c..2e4276486eec 100644
--- a/drivers/staging/vt6655/wmgr.c
+++ b/drivers/staging/vt6655/wmgr.c
@@ -488,15 +488,15 @@ vMgrAssocBeginSta(
488 // ERP Phy (802.11g) should support short preamble. 488 // ERP Phy (802.11g) should support short preamble.
489 if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { 489 if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
490 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); 490 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
491 if (CARDbIsShorSlotTime(pMgmt->pAdapter) == TRUE) { 491 if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) {
492 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); 492 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
493 } 493 }
494 } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { 494 } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
495 if (CARDbIsShortPreamble(pMgmt->pAdapter) == TRUE) { 495 if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) {
496 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); 496 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
497 } 497 }
498 } 498 }
499 if (pMgmt->b11hEnable == TRUE) 499 if (pMgmt->b11hEnable == true)
500 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); 500 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
501 501
502 /* build an assocreq frame and send it */ 502 /* build an assocreq frame and send it */
@@ -567,15 +567,15 @@ vMgrReAssocBeginSta(
567 // ERP Phy (802.11g) should support short preamble. 567 // ERP Phy (802.11g) should support short preamble.
568 if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { 568 if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
569 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); 569 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
570 if (CARDbIsShorSlotTime(pMgmt->pAdapter) == TRUE) { 570 if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) {
571 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); 571 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
572 } 572 }
573 } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { 573 } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
574 if (CARDbIsShortPreamble(pMgmt->pAdapter) == TRUE) { 574 if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) {
575 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); 575 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
576 } 576 }
577 } 577 }
578 if (pMgmt->b11hEnable == TRUE) 578 if (pMgmt->b11hEnable == true)
579 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); 579 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
580 580
581 581
@@ -718,7 +718,7 @@ s_vMgrRxAssocRequest(
718 pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo); 718 pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo);
719 pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval); 719 pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval);
720 pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = 720 pMgmt->sNodeDBTable[uNodeIndex].bPSEnable =
721 WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? TRUE : FALSE; 721 WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : FALSE;
722 // Todo: check sta basic rate, if ap can't support, set status code 722 // Todo: check sta basic rate, if ap can't support, set status code
723 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { 723 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
724 uRateLen = WLAN_RATES_MAXLEN_11B; 724 uRateLen = WLAN_RATES_MAXLEN_11B;
@@ -764,15 +764,15 @@ s_vMgrRxAssocRequest(
764 wAssocAID = (unsigned short)uNodeIndex; 764 wAssocAID = (unsigned short)uNodeIndex;
765 // check if ERP support 765 // check if ERP support
766 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) 766 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
767 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; 767 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
768 768
769 if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) { 769 if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) {
770 // B only STA join 770 // B only STA join
771 pDevice->bProtectMode = TRUE; 771 pDevice->bProtectMode = true;
772 pDevice->bNonERPPresent = TRUE; 772 pDevice->bNonERPPresent = true;
773 } 773 }
774 if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) { 774 if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) {
775 pDevice->bBarkerPreambleMd = TRUE; 775 pDevice->bBarkerPreambleMd = true;
776 } 776 }
777 777
778 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID); 778 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID);
@@ -875,7 +875,7 @@ s_vMgrRxReAssocRequest(
875 pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo); 875 pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo);
876 pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval); 876 pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval);
877 pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = 877 pMgmt->sNodeDBTable[uNodeIndex].bPSEnable =
878 WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? TRUE : FALSE; 878 WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : FALSE;
879 // Todo: check sta basic rate, if ap can't support, set status code 879 // Todo: check sta basic rate, if ap can't support, set status code
880 880
881 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { 881 if (pDevice->eCurrentPHYType == PHY_TYPE_11B) {
@@ -924,15 +924,15 @@ s_vMgrRxReAssocRequest(
924 924
925 // if suppurt ERP 925 // if suppurt ERP
926 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) 926 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
927 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; 927 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
928 928
929 if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) { 929 if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) {
930 // B only STA join 930 // B only STA join
931 pDevice->bProtectMode = TRUE; 931 pDevice->bProtectMode = true;
932 pDevice->bNonERPPresent = TRUE; 932 pDevice->bNonERPPresent = true;
933 } 933 }
934 if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) { 934 if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) {
935 pDevice->bBarkerPreambleMd = TRUE; 935 pDevice->bBarkerPreambleMd = true;
936 } 936 }
937 937
938 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID); 938 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID);
@@ -1045,7 +1045,7 @@ s_vMgrRxAssocResponse(
1045 BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); 1045 BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates);
1046 pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; 1046 pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
1047 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); 1047 DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID);
1048 pDevice->bLinkPass = TRUE; 1048 pDevice->bLinkPass = true;
1049 pDevice->uBBVGADiffCount = 0; 1049 pDevice->uBBVGADiffCount = 0;
1050 if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { 1050 if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) {
1051 if(skb_tailroom(pDevice->skb) <(sizeof(viawget_wpa_header)+pMgmt->sAssocInfo.AssocInfo.ResponseIELength+ 1051 if(skb_tailroom(pDevice->skb) <(sizeof(viawget_wpa_header)+pMgmt->sAssocInfo.AssocInfo.ResponseIELength+
@@ -1074,7 +1074,7 @@ s_vMgrRxAssocResponse(
1074 1074
1075//2008-0409-07, <Add> by Einsn Liu 1075//2008-0409-07, <Add> by Einsn Liu
1076#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1076#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1077 //if(pDevice->bWPADevEnable == TRUE) 1077 //if(pDevice->bWPADevEnable == true)
1078 { 1078 {
1079 unsigned char buf[512]; 1079 unsigned char buf[512];
1080 size_t len; 1080 size_t len;
@@ -1394,7 +1394,7 @@ s_vMgrRxAuthenSequence_1(
1394 sFrame.pChallenge->len = WLAN_CHALLENGE_LEN; 1394 sFrame.pChallenge->len = WLAN_CHALLENGE_LEN;
1395 memset(pMgmt->abyChallenge, 0, WLAN_CHALLENGE_LEN); 1395 memset(pMgmt->abyChallenge, 0, WLAN_CHALLENGE_LEN);
1396 // get group key 1396 // get group key
1397 if(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, GROUP_KEY, &pTransmitKey) == TRUE) { 1397 if(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, GROUP_KEY, &pTransmitKey) == true) {
1398 rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength+3); 1398 rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength+3);
1399 rc4_encrypt(&pDevice->SBox, pMgmt->abyChallenge, pMgmt->abyChallenge, WLAN_CHALLENGE_LEN); 1399 rc4_encrypt(&pDevice->SBox, pMgmt->abyChallenge, pMgmt->abyChallenge, WLAN_CHALLENGE_LEN);
1400 } 1400 }
@@ -1710,7 +1710,7 @@ s_vMgrRxDisassociation(
1710 }; 1710 };
1711 1711
1712 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1712 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1713 // if(pDevice->bWPASuppWextEnabled == TRUE) 1713 // if(pDevice->bWPASuppWextEnabled == true)
1714 { 1714 {
1715 union iwreq_data wrqu; 1715 union iwreq_data wrqu;
1716 memset(&wrqu, 0, sizeof (wrqu)); 1716 memset(&wrqu, 0, sizeof (wrqu));
@@ -1796,7 +1796,7 @@ s_vMgrRxDeauthentication(
1796 }; 1796 };
1797 1797
1798 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 1798 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
1799 // if(pDevice->bWPASuppWextEnabled == TRUE) 1799 // if(pDevice->bWPASuppWextEnabled == true)
1800 { 1800 {
1801 union iwreq_data wrqu; 1801 union iwreq_data wrqu;
1802 memset(&wrqu, 0, sizeof (wrqu)); 1802 memset(&wrqu, 0, sizeof (wrqu));
@@ -1837,12 +1837,12 @@ ChannelExceedZoneType(
1837 switch(pDevice->byZoneType) { 1837 switch(pDevice->byZoneType) {
1838 case 0x00: //USA:1~11 1838 case 0x00: //USA:1~11
1839 if((byCurrChannel<1) ||(byCurrChannel>11)) 1839 if((byCurrChannel<1) ||(byCurrChannel>11))
1840 exceed = TRUE; 1840 exceed = true;
1841 break; 1841 break;
1842 case 0x01: //Japan:1~13 1842 case 0x01: //Japan:1~13
1843 case 0x02: //Europe:1~13 1843 case 0x02: //Europe:1~13
1844 if((byCurrChannel<1) ||(byCurrChannel>13)) 1844 if((byCurrChannel<1) ||(byCurrChannel>13))
1845 exceed = TRUE; 1845 exceed = true;
1846 break; 1846 break;
1847 default: //reserve for other zonetype 1847 default: //reserve for other zonetype
1848 break; 1848 break;
@@ -1929,15 +1929,15 @@ s_vMgrRxBeacon(
1929 } 1929 }
1930 } else { 1930 } else {
1931 // no DS channel info 1931 // no DS channel info
1932 bChannelHit = TRUE; 1932 bChannelHit = true;
1933 } 1933 }
1934//2008-0730-01<Add>by MikeLiu 1934//2008-0730-01<Add>by MikeLiu
1935if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) 1935if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
1936 return; 1936 return;
1937 1937
1938 if (sFrame.pERP != NULL) { 1938 if (sFrame.pERP != NULL) {
1939 sERP.byERP = sFrame.pERP->byContext; 1939 sERP.byERP = sFrame.pERP->byContext;
1940 sERP.bERPExist = TRUE; 1940 sERP.bERPExist = true;
1941 1941
1942 } else { 1942 } else {
1943 sERP.bERPExist = FALSE; 1943 sERP.bERPExist = FALSE;
@@ -1995,7 +1995,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
1995 } 1995 }
1996 1996
1997 if(byCurrChannel == (unsigned char)pMgmt->uCurrChannel) 1997 if(byCurrChannel == (unsigned char)pMgmt->uCurrChannel)
1998 bIsChannelEqual = TRUE; 1998 bIsChannelEqual = true;
1999 1999
2000 if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { 2000 if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
2001 2001
@@ -2022,7 +2022,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2022 if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)){ 2022 if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)){
2023 if (!pDevice->bProtectMode) { 2023 if (!pDevice->bProtectMode) {
2024 MACvEnableProtectMD(pDevice->PortOffset); 2024 MACvEnableProtectMD(pDevice->PortOffset);
2025 pDevice->bProtectMode = TRUE; 2025 pDevice->bProtectMode = true;
2026 } 2026 }
2027 } 2027 }
2028 } 2028 }
@@ -2036,7 +2036,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2036 pMgmt->abyCurrBSSID, 2036 pMgmt->abyCurrBSSID,
2037 WLAN_BSSID_LEN) == 0) { 2037 WLAN_BSSID_LEN) == 0) {
2038 2038
2039 bIsBSSIDEqual = TRUE; 2039 bIsBSSIDEqual = true;
2040 2040
2041// 2008-05-21 <add> by Richardtai 2041// 2008-05-21 <add> by Richardtai
2042 pDevice->uCurrRSSI = pRxPacket->uRSSI; 2042 pDevice->uCurrRSSI = pRxPacket->uRSSI;
@@ -2053,30 +2053,30 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2053 ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, 2053 ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,
2054 sFrame.pSSID->len 2054 sFrame.pSSID->len
2055 ) == 0) { 2055 ) == 0) {
2056 bIsSSIDEqual = TRUE; 2056 bIsSSIDEqual = true;
2057 }; 2057 };
2058 } 2058 }
2059 2059
2060 if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== TRUE) && 2060 if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) &&
2061 (bIsBSSIDEqual == TRUE) && 2061 (bIsBSSIDEqual == true) &&
2062 (bIsSSIDEqual == TRUE) && 2062 (bIsSSIDEqual == true) &&
2063 (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && 2063 (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
2064 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { 2064 (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
2065 // add state check to prevent reconnect fail since we'll receive Beacon 2065 // add state check to prevent reconnect fail since we'll receive Beacon
2066 2066
2067 bIsAPBeacon = TRUE; 2067 bIsAPBeacon = true;
2068 2068
2069 if (pBSSList != NULL) { 2069 if (pBSSList != NULL) {
2070 2070
2071 // Compare PHY paramater setting 2071 // Compare PHY paramater setting
2072 if (pMgmt->wCurrCapInfo != pBSSList->wCapInfo) { 2072 if (pMgmt->wCurrCapInfo != pBSSList->wCapInfo) {
2073 bUpdatePhyParameter = TRUE; 2073 bUpdatePhyParameter = true;
2074 pMgmt->wCurrCapInfo = pBSSList->wCapInfo; 2074 pMgmt->wCurrCapInfo = pBSSList->wCapInfo;
2075 } 2075 }
2076 if (sFrame.pERP != NULL) { 2076 if (sFrame.pERP != NULL) {
2077 if ((sFrame.pERP->byElementID == WLAN_EID_ERP) && 2077 if ((sFrame.pERP->byElementID == WLAN_EID_ERP) &&
2078 (pMgmt->byERPContext != sFrame.pERP->byContext)) { 2078 (pMgmt->byERPContext != sFrame.pERP->byContext)) {
2079 bUpdatePhyParameter = TRUE; 2079 bUpdatePhyParameter = true;
2080 pMgmt->byERPContext = sFrame.pERP->byContext; 2080 pMgmt->byERPContext = sFrame.pERP->byContext;
2081 } 2081 }
2082 } 2082 }
@@ -2095,7 +2095,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2095 RATEvParseMaxRate( (void *)pDevice, 2095 RATEvParseMaxRate( (void *)pDevice,
2096 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 2096 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
2097 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, 2097 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
2098 TRUE, 2098 true,
2099 &(pMgmt->sNodeDBTable[0].wMaxBasicRate), 2099 &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
2100 &(pMgmt->sNodeDBTable[0].wMaxSuppRate), 2100 &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
2101 &(pMgmt->sNodeDBTable[0].wSuppRate), 2101 &(pMgmt->sNodeDBTable[0].wSuppRate),
@@ -2105,7 +2105,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2105#ifdef PLICE_DEBUG 2105#ifdef PLICE_DEBUG
2106 //printk("RxBeacon:MaxSuppRate is %d\n",pMgmt->sNodeDBTable[0].wMaxSuppRate); 2106 //printk("RxBeacon:MaxSuppRate is %d\n",pMgmt->sNodeDBTable[0].wMaxSuppRate);
2107#endif 2107#endif
2108 if (bUpdatePhyParameter == TRUE) { 2108 if (bUpdatePhyParameter == true) {
2109 CARDbSetPhyParameter( pMgmt->pAdapter, 2109 CARDbSetPhyParameter( pMgmt->pAdapter,
2110 pMgmt->eCurrentPHYMode, 2110 pMgmt->eCurrentPHYMode,
2111 pMgmt->wCurrCapInfo, 2111 pMgmt->wCurrCapInfo,
@@ -2149,14 +2149,14 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2149 // check if beacon TSF larger or small than our local TSF 2149 // check if beacon TSF larger or small than our local TSF
2150 if (HIDWORD(qwTimestamp) == HIDWORD(qwLocalTSF)) { 2150 if (HIDWORD(qwTimestamp) == HIDWORD(qwLocalTSF)) {
2151 if (LODWORD(qwTimestamp) >= LODWORD(qwLocalTSF)) { 2151 if (LODWORD(qwTimestamp) >= LODWORD(qwLocalTSF)) {
2152 bTSFOffsetPostive = TRUE; 2152 bTSFOffsetPostive = true;
2153 } 2153 }
2154 else { 2154 else {
2155 bTSFOffsetPostive = FALSE; 2155 bTSFOffsetPostive = FALSE;
2156 } 2156 }
2157 } 2157 }
2158 else if (HIDWORD(qwTimestamp) > HIDWORD(qwLocalTSF)) { 2158 else if (HIDWORD(qwTimestamp) > HIDWORD(qwLocalTSF)) {
2159 bTSFOffsetPostive = TRUE; 2159 bTSFOffsetPostive = true;
2160 } 2160 }
2161 else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) { 2161 else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) {
2162 bTSFOffsetPostive = FALSE; 2162 bTSFOffsetPostive = FALSE;
@@ -2171,21 +2171,21 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2171 2171
2172 if (HIDWORD(qwTSFOffset) != 0 || 2172 if (HIDWORD(qwTSFOffset) != 0 ||
2173 (LODWORD(qwTSFOffset) > TRIVIAL_SYNC_DIFFERENCE )) { 2173 (LODWORD(qwTSFOffset) > TRIVIAL_SYNC_DIFFERENCE )) {
2174 bTSFLargeDiff = TRUE; 2174 bTSFLargeDiff = true;
2175 } 2175 }
2176 2176
2177 2177
2178 // if infra mode 2178 // if infra mode
2179 if (bIsAPBeacon == TRUE) { 2179 if (bIsAPBeacon == true) {
2180 2180
2181 // Infra mode: Local TSF always follow AP's TSF if Difference huge. 2181 // Infra mode: Local TSF always follow AP's TSF if Difference huge.
2182 if (bTSFLargeDiff) 2182 if (bTSFLargeDiff)
2183 bUpdateTSF = TRUE; 2183 bUpdateTSF = true;
2184 2184
2185 if ((pDevice->bEnablePSMode == TRUE) &&(sFrame.pTIM != 0)) { 2185 if ((pDevice->bEnablePSMode == true) &&(sFrame.pTIM != 0)) {
2186 2186
2187 // deal with DTIM, analysis TIM 2187 // deal with DTIM, analysis TIM
2188 pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? TRUE : FALSE ; 2188 pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? true : FALSE ;
2189 pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount; 2189 pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount;
2190 pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod; 2190 pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod;
2191 wAIDNumber = pMgmt->wCurrAID & ~(BIT14|BIT15); 2191 wAIDNumber = pMgmt->wCurrAID & ~(BIT14|BIT15);
@@ -2200,7 +2200,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2200 // len = byDTIMCount + byDTIMPeriod + byDTIMPeriod + byVirtBitMap[0~250] 2200 // len = byDTIMCount + byDTIMPeriod + byDTIMPeriod + byVirtBitMap[0~250]
2201 if (sFrame.pTIM->len >= (uLocateByteIndex + 4)) { 2201 if (sFrame.pTIM->len >= (uLocateByteIndex + 4)) {
2202 byTIMBitOn = (0x01) << ((wAIDNumber) % 8); 2202 byTIMBitOn = (0x01) << ((wAIDNumber) % 8);
2203 pMgmt->bInTIM = sFrame.pTIM->byVirtBitMap[uLocateByteIndex] & byTIMBitOn ? TRUE : FALSE; 2203 pMgmt->bInTIM = sFrame.pTIM->byVirtBitMap[uLocateByteIndex] & byTIMBitOn ? true : FALSE;
2204 } 2204 }
2205 else { 2205 else {
2206 pMgmt->bInTIM = FALSE; 2206 pMgmt->bInTIM = FALSE;
@@ -2212,7 +2212,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2212 2212
2213 if (pMgmt->bInTIM || 2213 if (pMgmt->bInTIM ||
2214 (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) { 2214 (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) {
2215 pMgmt->bInTIMWake = TRUE; 2215 pMgmt->bInTIMWake = true;
2216 // send out ps-poll packet 2216 // send out ps-poll packet
2217// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:In TIM\n"); 2217// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:In TIM\n");
2218 if (pMgmt->bInTIM) { 2218 if (pMgmt->bInTIM) {
@@ -2227,7 +2227,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2227 if (pDevice->bPWBitOn == FALSE) { 2227 if (pDevice->bPWBitOn == FALSE) {
2228 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n"); 2228 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n");
2229 if (PSbSendNullPacket(pDevice)) 2229 if (PSbSendNullPacket(pDevice))
2230 pDevice->bPWBitOn = TRUE; 2230 pDevice->bPWBitOn = true;
2231 } 2231 }
2232 if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) { 2232 if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) {
2233 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); 2233 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n");
@@ -2247,7 +2247,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2247 // adhoc mode:TSF updated only when beacon larger then local TSF 2247 // adhoc mode:TSF updated only when beacon larger then local TSF
2248 if (bTSFLargeDiff && bTSFOffsetPostive && 2248 if (bTSFLargeDiff && bTSFOffsetPostive &&
2249 (pMgmt->eCurrState == WMAC_STATE_JOINTED)) 2249 (pMgmt->eCurrState == WMAC_STATE_JOINTED))
2250 bUpdateTSF = TRUE; 2250 bUpdateTSF = true;
2251 2251
2252 // During dpc, already in spinlocked. 2252 // During dpc, already in spinlocked.
2253 if (BSSDBbIsSTAInNodeDB(pMgmt, sFrame.pHdr->sA3.abyAddr2, &uNodeIndex)) { 2253 if (BSSDBbIsSTAInNodeDB(pMgmt, sFrame.pHdr->sA3.abyAddr2, &uNodeIndex)) {
@@ -2260,7 +2260,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2260 RATEvParseMaxRate( (void *)pDevice, 2260 RATEvParseMaxRate( (void *)pDevice,
2261 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 2261 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
2262 NULL, 2262 NULL,
2263 TRUE, 2263 true,
2264 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), 2264 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
2265 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), 2265 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
2266 &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), 2266 &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
@@ -2281,7 +2281,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2281 RATEvParseMaxRate( (void *)pDevice, 2281 RATEvParseMaxRate( (void *)pDevice,
2282 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 2282 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
2283 NULL, 2283 NULL,
2284 TRUE, 2284 true,
2285 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), 2285 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
2286 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), 2286 &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
2287 &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), 2287 &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
@@ -2301,7 +2301,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2301/* 2301/*
2302 pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); 2302 pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
2303 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) 2303 if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
2304 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; 2304 pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
2305*/ 2305*/
2306 } 2306 }
2307 2307
@@ -2309,11 +2309,11 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE)
2309 if (pMgmt->eCurrState == WMAC_STATE_STARTED) { 2309 if (pMgmt->eCurrState == WMAC_STATE_STARTED) {
2310 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n"); 2310 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n");
2311 pMgmt->eCurrState = WMAC_STATE_JOINTED; 2311 pMgmt->eCurrState = WMAC_STATE_JOINTED;
2312 pDevice->bLinkPass = TRUE; 2312 pDevice->bLinkPass = true;
2313 if (netif_queue_stopped(pDevice->dev)){ 2313 if (netif_queue_stopped(pDevice->dev)){
2314 netif_wake_queue(pDevice->dev); 2314 netif_wake_queue(pDevice->dev);
2315 } 2315 }
2316 pMgmt->sNodeDBTable[0].bActive = TRUE; 2316 pMgmt->sNodeDBTable[0].bActive = true;
2317 pMgmt->sNodeDBTable[0].uInActiveCount = 0; 2317 pMgmt->sNodeDBTable[0].uInActiveCount = 0;
2318 2318
2319 }; 2319 };
@@ -2487,7 +2487,7 @@ vMgrCreateOwnIBSS(
2487 // set basic rate 2487 // set basic rate
2488 2488
2489 RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 2489 RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
2490 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, TRUE, 2490 (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, true,
2491 &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, 2491 &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
2492 &byTopCCKBasicRate, &byTopOFDMBasicRate); 2492 &byTopCCKBasicRate, &byTopOFDMBasicRate);
2493 2493
@@ -2621,7 +2621,7 @@ vMgrCreateOwnIBSS(
2621 pMgmt->wCurrCapInfo &= (~WLAN_SET_CAP_INFO_SHORTPREAMBLE(1)); 2621 pMgmt->wCurrCapInfo &= (~WLAN_SET_CAP_INFO_SHORTPREAMBLE(1));
2622 } 2622 }
2623 2623
2624 if ((pMgmt->b11hEnable == TRUE) && 2624 if ((pMgmt->b11hEnable == true) &&
2625 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { 2625 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
2626 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); 2626 pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
2627 } else { 2627 } else {
@@ -2675,7 +2675,7 @@ vMgrJoinBSSBegin(
2675 2675
2676 2676
2677 for (ii = 0; ii < MAX_BSS_NUM; ii++) { 2677 for (ii = 0; ii < MAX_BSS_NUM; ii++) {
2678 if (pMgmt->sBSSList[ii].bActive == TRUE) 2678 if (pMgmt->sBSSList[ii].bActive == true)
2679 break; 2679 break;
2680 } 2680 }
2681 2681
@@ -2727,7 +2727,7 @@ vMgrJoinBSSBegin(
2727 } 2727 }
2728 2728
2729#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT 2729#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
2730 //if(pDevice->bWPASuppWextEnabled == TRUE) 2730 //if(pDevice->bWPASuppWextEnabled == true)
2731 Encyption_Rebuild(pDevice, pCurr); 2731 Encyption_Rebuild(pDevice, pCurr);
2732#endif 2732#endif
2733 // Infrastructure BSS 2733 // Infrastructure BSS
@@ -2782,7 +2782,7 @@ vMgrJoinBSSBegin(
2782 } 2782 }
2783 } 2783 }
2784 2784
2785 RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, TRUE, 2785 RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, true,
2786 &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, 2786 &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
2787 &byTopCCKBasicRate, &byTopOFDMBasicRate); 2787 &byTopCCKBasicRate, &byTopOFDMBasicRate);
2788 2788
@@ -2869,7 +2869,7 @@ vMgrJoinBSSBegin(
2869 WLAN_RATES_MAXLEN_11B); 2869 WLAN_RATES_MAXLEN_11B);
2870 // set basic rate 2870 // set basic rate
2871 RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, 2871 RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
2872 NULL, TRUE, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, 2872 NULL, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
2873 &byTopCCKBasicRate, &byTopOFDMBasicRate); 2873 &byTopCCKBasicRate, &byTopOFDMBasicRate);
2874 2874
2875 pMgmt->wCurrCapInfo = pCurr->wCapInfo; 2875 pMgmt->wCurrCapInfo = pCurr->wCapInfo;
@@ -2884,7 +2884,7 @@ vMgrJoinBSSBegin(
2884 pMgmt->eCurrState = WMAC_STATE_STARTED; 2884 pMgmt->eCurrState = WMAC_STATE_STARTED;
2885 // Adopt BSS state in Adapter Device Object 2885 // Adopt BSS state in Adapter Device Object
2886 //pDevice->byOpMode = OP_MODE_ADHOC; 2886 //pDevice->byOpMode = OP_MODE_ADHOC;
2887// pDevice->bLinkPass = TRUE; 2887// pDevice->bLinkPass = true;
2888// memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN); 2888// memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN);
2889 2889
2890 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%02x-%02x-%02x-%02x-%02x-%02x \n", 2890 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%02x-%02x-%02x-%02x-%02x-%02x \n",
@@ -2959,7 +2959,7 @@ s_vMgrSynchBSS (
2959 } 2959 }
2960 2960
2961 // Init the BSS informations 2961 // Init the BSS informations
2962 pDevice->bCCK = TRUE; 2962 pDevice->bCCK = true;
2963 pDevice->bProtectMode = FALSE; 2963 pDevice->bProtectMode = FALSE;
2964 MACvDisableProtectMD(pDevice->PortOffset); 2964 MACvDisableProtectMD(pDevice->PortOffset);
2965 pDevice->bBarkerPreambleMd = FALSE; 2965 pDevice->bBarkerPreambleMd = FALSE;
@@ -3047,7 +3047,7 @@ s_vMgrSynchBSS (
3047 pCurr->sERP.byERP, 3047 pCurr->sERP.byERP,
3048 pMgmt->abyCurrSuppRates, 3048 pMgmt->abyCurrSuppRates,
3049 pMgmt->abyCurrExtSuppRates 3049 pMgmt->abyCurrExtSuppRates
3050 ) != TRUE) { 3050 ) != true) {
3051 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType); 3051 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType);
3052 return; 3052 return;
3053 } 3053 }
@@ -3106,7 +3106,7 @@ s_vMgrSynchBSS (
3106 // if( uSameBssidNum>=2) { //we only check AP in hidden sssid mode 3106 // if( uSameBssidNum>=2) { //we only check AP in hidden sssid mode
3107 if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || //networkmanager 0.7.0 does not give the pairwise-key selsection, 3107 if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || //networkmanager 0.7.0 does not give the pairwise-key selsection,
3108 (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) { // so we need re-selsect it according to real pairwise-key info. 3108 (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) { // so we need re-selsect it according to real pairwise-key info.
3109 if(pCurr->bWPAValid == TRUE) { //WPA-PSK 3109 if(pCurr->bWPAValid == true) { //WPA-PSK
3110 pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK; 3110 pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK;
3111 if(pCurr->abyPKType[0] == WPA_TKIP) { 3111 if(pCurr->abyPKType[0] == WPA_TKIP) {
3112 pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP 3112 pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP
@@ -3117,7 +3117,7 @@ s_vMgrSynchBSS (
3117 PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n"); 3117 PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n");
3118 } 3118 }
3119 } 3119 }
3120 else if(pCurr->bWPA2Valid == TRUE) { //WPA2-PSK 3120 else if(pCurr->bWPA2Valid == true) { //WPA2-PSK
3121 pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK; 3121 pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK;
3122 if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) { 3122 if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) {
3123 pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP 3123 pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP
@@ -3168,13 +3168,13 @@ s_vMgrFormatTIM(
3168 // Mask out the broadcast bit which is indicated separately. 3168 // Mask out the broadcast bit which is indicated separately.
3169 bMulticast = (byMap & byMask[0]) != 0; 3169 bMulticast = (byMap & byMask[0]) != 0;
3170 if(bMulticast) { 3170 if(bMulticast) {
3171 pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; 3171 pMgmt->sNodeDBTable[0].bRxPSPoll = true;
3172 } 3172 }
3173 byMap = 0; 3173 byMap = 0;
3174 } 3174 }
3175 if (byMap) { 3175 if (byMap) {
3176 if (!bStartFound) { 3176 if (!bStartFound) {
3177 bStartFound = TRUE; 3177 bStartFound = true;
3178 wStartIndex = ii; 3178 wStartIndex = ii;
3179 } 3179 }
3180 wEndIndex = ii; 3180 wEndIndex = ii;
@@ -3340,7 +3340,7 @@ s_MgrMakeBeacon(
3340 } 3340 }
3341 } 3341 }
3342 3342
3343 if ((pMgmt->b11hEnable == TRUE) && 3343 if ((pMgmt->b11hEnable == true) &&
3344 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { 3344 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
3345 // Country IE 3345 // Country IE
3346 pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len); 3346 pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
@@ -3354,7 +3354,7 @@ s_MgrMakeBeacon(
3354 ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0; 3354 ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0;
3355 pbyBuffer += (1) + WLAN_IEHDR_LEN; 3355 pbyBuffer += (1) + WLAN_IEHDR_LEN;
3356 uLength += (1) + WLAN_IEHDR_LEN; 3356 uLength += (1) + WLAN_IEHDR_LEN;
3357 if (pMgmt->bSwitchChannel == TRUE) { 3357 if (pMgmt->bSwitchChannel == true) {
3358 // Channel Switch IE 3358 // Channel Switch IE
3359 ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH; 3359 ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH;
3360 ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3; 3360 ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3;
@@ -3383,7 +3383,7 @@ s_MgrMakeBeacon(
3383 pbyBuffer += (7) + WLAN_IEHDR_LEN; 3383 pbyBuffer += (7) + WLAN_IEHDR_LEN;
3384 uLength += (7) + WLAN_IEHDR_LEN; 3384 uLength += (7) + WLAN_IEHDR_LEN;
3385 for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) { 3385 for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) {
3386 if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == TRUE) { 3386 if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) {
3387 pbyBuffer += 2; 3387 pbyBuffer += 2;
3388 uLength += 2; 3388 uLength += 2;
3389 pIBSSDFS->len += 2; 3389 pIBSSDFS->len += 2;
@@ -3399,11 +3399,11 @@ s_MgrMakeBeacon(
3399 sFrame.pERP->byElementID = WLAN_EID_ERP; 3399 sFrame.pERP->byElementID = WLAN_EID_ERP;
3400 sFrame.pERP->len = 1; 3400 sFrame.pERP->len = 1;
3401 sFrame.pERP->byContext = 0; 3401 sFrame.pERP->byContext = 0;
3402 if (pDevice->bProtectMode == TRUE) 3402 if (pDevice->bProtectMode == true)
3403 sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION; 3403 sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
3404 if (pDevice->bNonERPPresent == TRUE) 3404 if (pDevice->bNonERPPresent == true)
3405 sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT; 3405 sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
3406 if (pDevice->bBarkerPreambleMd == TRUE) 3406 if (pDevice->bBarkerPreambleMd == true)
3407 sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE; 3407 sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
3408 } 3408 }
3409 if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { 3409 if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
@@ -3415,7 +3415,7 @@ s_MgrMakeBeacon(
3415 ); 3415 );
3416 } 3416 }
3417 // hostapd wpa/wpa2 IE 3417 // hostapd wpa/wpa2 IE
3418 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == TRUE)) { 3418 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) {
3419 if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { 3419 if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
3420 if (pMgmt->wWPAIELen != 0) { 3420 if (pMgmt->wWPAIELen != 0) {
3421 sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); 3421 sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
@@ -3536,15 +3536,15 @@ s_MgrMakeProbeResponse(
3536 sFrame.pERP->byElementID = WLAN_EID_ERP; 3536 sFrame.pERP->byElementID = WLAN_EID_ERP;
3537 sFrame.pERP->len = 1; 3537 sFrame.pERP->len = 1;
3538 sFrame.pERP->byContext = 0; 3538 sFrame.pERP->byContext = 0;
3539 if (pDevice->bProtectMode == TRUE) 3539 if (pDevice->bProtectMode == true)
3540 sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION; 3540 sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
3541 if (pDevice->bNonERPPresent == TRUE) 3541 if (pDevice->bNonERPPresent == true)
3542 sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT; 3542 sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
3543 if (pDevice->bBarkerPreambleMd == TRUE) 3543 if (pDevice->bBarkerPreambleMd == true)
3544 sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE; 3544 sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
3545 } 3545 }
3546 3546
3547 if ((pMgmt->b11hEnable == TRUE) && 3547 if ((pMgmt->b11hEnable == true) &&
3548 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { 3548 (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
3549 // Country IE 3549 // Country IE
3550 pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len); 3550 pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
@@ -3558,7 +3558,7 @@ s_MgrMakeProbeResponse(
3558 ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0; 3558 ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0;
3559 pbyBuffer += (1) + WLAN_IEHDR_LEN; 3559 pbyBuffer += (1) + WLAN_IEHDR_LEN;
3560 uLength += (1) + WLAN_IEHDR_LEN; 3560 uLength += (1) + WLAN_IEHDR_LEN;
3561 if (pMgmt->bSwitchChannel == TRUE) { 3561 if (pMgmt->bSwitchChannel == true) {
3562 // Channel Switch IE 3562 // Channel Switch IE
3563 ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH; 3563 ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH;
3564 ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3; 3564 ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3;
@@ -3587,7 +3587,7 @@ s_MgrMakeProbeResponse(
3587 pbyBuffer += (7) + WLAN_IEHDR_LEN; 3587 pbyBuffer += (7) + WLAN_IEHDR_LEN;
3588 uLength += (7) + WLAN_IEHDR_LEN; 3588 uLength += (7) + WLAN_IEHDR_LEN;
3589 for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) { 3589 for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) {
3590 if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == TRUE) { 3590 if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) {
3591 pbyBuffer += 2; 3591 pbyBuffer += 2;
3592 uLength += 2; 3592 uLength += 2;
3593 pIBSSDFS->len += 2; 3593 pIBSSDFS->len += 2;
@@ -3608,7 +3608,7 @@ s_MgrMakeProbeResponse(
3608 } 3608 }
3609 3609
3610 // hostapd wpa/wpa2 IE 3610 // hostapd wpa/wpa2 IE
3611 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == TRUE)) { 3611 if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) {
3612 if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { 3612 if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
3613 if (pMgmt->wWPAIELen != 0) { 3613 if (pMgmt->wWPAIELen != 0) {
3614 sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); 3614 sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
@@ -3710,7 +3710,7 @@ s_MgrMakeAssocRequest(
3710 pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN; 3710 pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN;
3711 3711
3712 // for 802.11h 3712 // for 802.11h
3713 if (pMgmt->b11hEnable == TRUE) { 3713 if (pMgmt->b11hEnable == true) {
3714 if (sFrame.pCurrPowerCap == NULL) { 3714 if (sFrame.pCurrPowerCap == NULL) {
3715 sFrame.pCurrPowerCap = (PWLAN_IE_PW_CAP)(sFrame.pBuf + sFrame.len); 3715 sFrame.pCurrPowerCap = (PWLAN_IE_PW_CAP)(sFrame.pBuf + sFrame.len);
3716 sFrame.len += (2 + WLAN_IEHDR_LEN); 3716 sFrame.len += (2 + WLAN_IEHDR_LEN);
@@ -3855,7 +3855,7 @@ s_MgrMakeAssocRequest(
3855 sFrame.pRSN->len +=6; 3855 sFrame.pRSN->len +=6;
3856 3856
3857 // RSN Capabilites 3857 // RSN Capabilites
3858 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { 3858 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
3859 memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); 3859 memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
3860 } else { 3860 } else {
3861 sFrame.pRSN->abyRSN[16] = 0; 3861 sFrame.pRSN->abyRSN[16] = 0;
@@ -3863,7 +3863,7 @@ s_MgrMakeAssocRequest(
3863 } 3863 }
3864 sFrame.pRSN->len +=2; 3864 sFrame.pRSN->len +=2;
3865 3865
3866 if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == TRUE) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { 3866 if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
3867 // RSN PMKID 3867 // RSN PMKID
3868 pbyRSN = &sFrame.pRSN->abyRSN[18]; 3868 pbyRSN = &sFrame.pRSN->abyRSN[18];
3869 pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count 3869 pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count
@@ -4111,7 +4111,7 @@ s_MgrMakeReAssocRequest(
4111 sFrame.pRSN->len +=6; 4111 sFrame.pRSN->len +=6;
4112 4112
4113 // RSN Capabilites 4113 // RSN Capabilites
4114 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { 4114 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
4115 memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); 4115 memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
4116 } else { 4116 } else {
4117 sFrame.pRSN->abyRSN[16] = 0; 4117 sFrame.pRSN->abyRSN[16] = 0;
@@ -4119,7 +4119,7 @@ s_MgrMakeReAssocRequest(
4119 } 4119 }
4120 sFrame.pRSN->len +=2; 4120 sFrame.pRSN->len +=2;
4121 4121
4122 if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == TRUE) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { 4122 if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
4123 // RSN PMKID 4123 // RSN PMKID
4124 pbyRSN = &sFrame.pRSN->abyRSN[18]; 4124 pbyRSN = &sFrame.pRSN->abyRSN[18];
4125 pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count 4125 pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count
@@ -4326,7 +4326,7 @@ s_vMgrRxProbeResponse(
4326 unsigned char byCurrChannel = pRxPacket->byRxChannel; 4326 unsigned char byCurrChannel = pRxPacket->byRxChannel;
4327 ERPObject sERP; 4327 ERPObject sERP;
4328 unsigned char byIEChannel = 0; 4328 unsigned char byIEChannel = 0;
4329 BOOL bChannelHit = TRUE; 4329 BOOL bChannelHit = true;
4330 4330
4331 4331
4332 memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP)); 4332 memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP));
@@ -4362,16 +4362,16 @@ s_vMgrRxProbeResponse(
4362 } 4362 }
4363 } else { 4363 } else {
4364 // no DS channel info 4364 // no DS channel info
4365 bChannelHit = TRUE; 4365 bChannelHit = true;
4366 } 4366 }
4367 4367
4368//2008-0730-01<Add>by MikeLiu 4368//2008-0730-01<Add>by MikeLiu
4369if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) 4369if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
4370 return; 4370 return;
4371 4371
4372 if (sFrame.pERP != NULL) { 4372 if (sFrame.pERP != NULL) {
4373 sERP.byERP = sFrame.pERP->byContext; 4373 sERP.byERP = sFrame.pERP->byContext;
4374 sERP.bERPExist = TRUE; 4374 sERP.bERPExist = true;
4375 } else { 4375 } else {
4376 sERP.bERPExist = FALSE; 4376 sERP.bERPExist = FALSE;
4377 sERP.byERP = 0; 4377 sERP.byERP = 0;
@@ -4604,7 +4604,7 @@ vMgrRxManagePacket(
4604 case WLAN_FSTYPE_REASSOCRESP: 4604 case WLAN_FSTYPE_REASSOCRESP:
4605 // Frame Clase = 2 4605 // Frame Clase = 2
4606 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n"); 4606 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n");
4607 s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, TRUE); 4607 s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, true);
4608 break; 4608 break;
4609 4609
4610 case WLAN_FSTYPE_PROBEREQ: 4610 case WLAN_FSTYPE_PROBEREQ:
@@ -4624,7 +4624,7 @@ vMgrRxManagePacket(
4624 // Frame Clase = 0 4624 // Frame Clase = 0
4625 //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); 4625 //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n");
4626 if (pMgmt->eScanState != WMAC_NO_SCANNING) { 4626 if (pMgmt->eScanState != WMAC_NO_SCANNING) {
4627 bInScan = TRUE; 4627 bInScan = true;
4628 }; 4628 };
4629 s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan); 4629 s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan);
4630 break; 4630 break;
@@ -4681,7 +4681,7 @@ vMgrRxManagePacket(
4681 * Prepare beacon to send 4681 * Prepare beacon to send
4682 * 4682 *
4683 * Return Value: 4683 * Return Value:
4684 * TRUE if success; FALSE if failed. 4684 * true if success; FALSE if failed.
4685 * 4685 *
4686-*/ 4686-*/
4687BOOL 4687BOOL
@@ -4720,7 +4720,7 @@ bMgrPrepareBeaconToSend(
4720 4720
4721 csBeacon_xmit(pDevice, pTxPacket); 4721 csBeacon_xmit(pDevice, pTxPacket);
4722 4722
4723 return TRUE; 4723 return true;
4724} 4724}
4725 4725
4726 4726
@@ -4833,18 +4833,18 @@ bAdd_PMKID_Candidate (
4833 for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { 4833 for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
4834 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; 4834 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii];
4835 if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) { 4835 if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) {
4836 if ((psRSNCapObj->bRSNCapExist == TRUE) && (psRSNCapObj->wRSNCap & BIT0)) { 4836 if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) {
4837 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; 4837 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
4838 } else { 4838 } else {
4839 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); 4839 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
4840 } 4840 }
4841 return TRUE; 4841 return true;
4842 } 4842 }
4843 } 4843 }
4844 4844
4845 // New Candidate 4845 // New Candidate
4846 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates]; 4846 pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates];
4847 if ((psRSNCapObj->bRSNCapExist == TRUE) && (psRSNCapObj->wRSNCap & BIT0)) { 4847 if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) {
4848 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; 4848 pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
4849 } else { 4849 } else {
4850 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); 4850 pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
@@ -4852,7 +4852,7 @@ bAdd_PMKID_Candidate (
4852 memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN); 4852 memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN);
4853 pDevice->gsPMKIDCandidate.NumCandidates++; 4853 pDevice->gsPMKIDCandidate.NumCandidates++;
4854 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); 4854 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
4855 return TRUE; 4855 return true;
4856} 4856}
4857 4857
4858/* 4858/*
@@ -4905,7 +4905,7 @@ s_bCipherMatch (
4905 } 4905 }
4906 4906
4907 if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && 4907 if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
4908 (pBSSNode->bWPA2Valid == TRUE) && 4908 (pBSSNode->bWPA2Valid == true) &&
4909 //20080123-01,<Add> by Einsn Liu 4909 //20080123-01,<Add> by Einsn Liu
4910 ((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) { 4910 ((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) {
4911 //WPA2 4911 //WPA2
@@ -4939,7 +4939,7 @@ s_bCipherMatch (
4939 } 4939 }
4940 4940
4941 } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && 4941 } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
4942 (pBSSNode->bWPAValid == TRUE) && 4942 (pBSSNode->bWPAValid == true) &&
4943 ((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) { 4943 ((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) {
4944 //WPA 4944 //WPA
4945 // check Group Key Cipher 4945 // check Group Key Cipher
@@ -4979,7 +4979,7 @@ s_bCipherMatch (
4979 (byCipherMask == 0)) { 4979 (byCipherMask == 0)) {
4980 *pbyCCSGK = KEY_CTL_WEP; 4980 *pbyCCSGK = KEY_CTL_WEP;
4981 *pbyCCSPK = KEY_CTL_NONE; 4981 *pbyCCSPK = KEY_CTL_NONE;
4982 return TRUE; 4982 return true;
4983 } else { 4983 } else {
4984 return FALSE; 4984 return FALSE;
4985 } 4985 }
@@ -4989,17 +4989,17 @@ s_bCipherMatch (
4989 (byCipherMask == 0)) { 4989 (byCipherMask == 0)) {
4990 *pbyCCSGK = KEY_CTL_TKIP; 4990 *pbyCCSGK = KEY_CTL_TKIP;
4991 *pbyCCSPK = KEY_CTL_NONE; 4991 *pbyCCSPK = KEY_CTL_NONE;
4992 return TRUE; 4992 return true;
4993 } else if ((byMulticastCipher == KEY_CTL_WEP) && 4993 } else if ((byMulticastCipher == KEY_CTL_WEP) &&
4994 ((byCipherMask & 0x02) != 0)) { 4994 ((byCipherMask & 0x02) != 0)) {
4995 *pbyCCSGK = KEY_CTL_WEP; 4995 *pbyCCSGK = KEY_CTL_WEP;
4996 *pbyCCSPK = KEY_CTL_TKIP; 4996 *pbyCCSPK = KEY_CTL_TKIP;
4997 return TRUE; 4997 return true;
4998 } else if ((byMulticastCipher == KEY_CTL_TKIP) && 4998 } else if ((byMulticastCipher == KEY_CTL_TKIP) &&
4999 ((byCipherMask & 0x02) != 0)) { 4999 ((byCipherMask & 0x02) != 0)) {
5000 *pbyCCSGK = KEY_CTL_TKIP; 5000 *pbyCCSGK = KEY_CTL_TKIP;
5001 *pbyCCSPK = KEY_CTL_TKIP; 5001 *pbyCCSPK = KEY_CTL_TKIP;
5002 return TRUE; 5002 return true;
5003 } else { 5003 } else {
5004 return FALSE; 5004 return FALSE;
5005 } 5005 }
@@ -5012,22 +5012,22 @@ s_bCipherMatch (
5012 ((byCipherMask & 0x04) != 0)) { 5012 ((byCipherMask & 0x04) != 0)) {
5013 *pbyCCSGK = KEY_CTL_WEP; 5013 *pbyCCSGK = KEY_CTL_WEP;
5014 *pbyCCSPK = KEY_CTL_CCMP; 5014 *pbyCCSPK = KEY_CTL_CCMP;
5015 return TRUE; 5015 return true;
5016 } else if ((byMulticastCipher == KEY_CTL_TKIP) && 5016 } else if ((byMulticastCipher == KEY_CTL_TKIP) &&
5017 ((byCipherMask & 0x04) != 0)) { 5017 ((byCipherMask & 0x04) != 0)) {
5018 *pbyCCSGK = KEY_CTL_TKIP; 5018 *pbyCCSGK = KEY_CTL_TKIP;
5019 *pbyCCSPK = KEY_CTL_CCMP; 5019 *pbyCCSPK = KEY_CTL_CCMP;
5020 return TRUE; 5020 return true;
5021 } else if ((byMulticastCipher == KEY_CTL_CCMP) && 5021 } else if ((byMulticastCipher == KEY_CTL_CCMP) &&
5022 ((byCipherMask & 0x04) != 0)) { 5022 ((byCipherMask & 0x04) != 0)) {
5023 *pbyCCSGK = KEY_CTL_CCMP; 5023 *pbyCCSGK = KEY_CTL_CCMP;
5024 *pbyCCSPK = KEY_CTL_CCMP; 5024 *pbyCCSPK = KEY_CTL_CCMP;
5025 return TRUE; 5025 return true;
5026 } else { 5026 } else {
5027 return FALSE; 5027 return FALSE;
5028 } 5028 }
5029 } 5029 }
5030 return TRUE; 5030 return true;
5031} 5031}
5032 5032
5033 5033
diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c
index 5ac468881636..da8d548e6ff7 100644
--- a/drivers/staging/vt6655/wpa.c
+++ b/drivers/staging/vt6655/wpa.c
@@ -210,14 +210,14 @@ WPA_ParseRSN (
210 pbyCaps = (unsigned char *)pIE_RSN_Auth->AuthKSList[n].abyOUI; 210 pbyCaps = (unsigned char *)pIE_RSN_Auth->AuthKSList[n].abyOUI;
211 pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; 211 pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG;
212 pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); 212 pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS);
213 pBSSList->sRSNCapObj.bRSNCapExist = TRUE; 213 pBSSList->sRSNCapObj.bRSNCapExist = true;
214 pBSSList->sRSNCapObj.wRSNCap = *(unsigned short *)pbyCaps; 214 pBSSList->sRSNCapObj.wRSNCap = *(unsigned short *)pbyCaps;
215 //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps)); 215 //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps));
216 //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK)); 216 //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK));
217 //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx)); 217 //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx));
218 } 218 }
219 } 219 }
220 pBSSList->bWPAValid = TRUE; 220 pBSSList->bWPAValid = true;
221 } 221 }
222} 222}
223 223
@@ -270,7 +270,7 @@ WPA_SearchRSN (
270 if (byEncrypt != byPKType) 270 if (byEncrypt != byPKType)
271 return FALSE; 271 return FALSE;
272 } 272 }
273 return TRUE; 273 return true;
274// if (pBSSList->wAuthCount > 0) 274// if (pBSSList->wAuthCount > 0)
275// for (ii=0; ii < pBSSList->wAuthCount; ii ++) 275// for (ii=0; ii < pBSSList->wAuthCount; ii ++)
276// if (byAuth == pBSSList->abyAuthType[ii]) 276// if (byAuth == pBSSList->abyAuthType[ii])
@@ -308,7 +308,7 @@ WPAb_Is_RSN (
308 if ((pRSN->len >= 6) && // oui1(4)+ver(2) 308 if ((pRSN->len >= 6) && // oui1(4)+ver(2)
309 (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) && 309 (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) &&
310 (pRSN->wVersion == 1)) { 310 (pRSN->wVersion == 1)) {
311 return TRUE; 311 return true;
312 } 312 }
313 else 313 else
314 return FALSE; 314 return FALSE;
diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c
index 29f185c6489a..9b763a8a1ff6 100644
--- a/drivers/staging/vt6655/wpa2.c
+++ b/drivers/staging/vt6655/wpa2.c
@@ -124,7 +124,7 @@ WPA2vParseRSN (
124 124
125 if (pRSN->len == 2) { // ver(2) 125 if (pRSN->len == 2) { // ver(2)
126 if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { 126 if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) {
127 pBSSNode->bWPA2Valid = TRUE; 127 pBSSNode->bWPA2Valid = true;
128 } 128 }
129 return; 129 return;
130 } 130 }
@@ -159,7 +159,7 @@ WPA2vParseRSN (
159 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK); 159 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK);
160 160
161 if (pRSN->len == 6) { 161 if (pRSN->len == 6) {
162 pBSSNode->bWPA2Valid = TRUE; 162 pBSSNode->bWPA2Valid = true;
163 return; 163 return;
164 } 164 }
165 165
@@ -173,7 +173,7 @@ WPA2vParseRSN (
173 if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i) 173 if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i)
174 if ( !memcmp(pbyOUI, abyOUIGK, 4)) { 174 if ( !memcmp(pbyOUI, abyOUIGK, 4)) {
175 pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_USE_GROUP; 175 pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_USE_GROUP;
176 bUseGK = TRUE; 176 bUseGK = true;
177 } else if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) { 177 } else if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) {
178 // Invialid CSS, continue to parsing 178 // Invialid CSS, continue to parsing
179 } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) { 179 } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) {
@@ -195,7 +195,7 @@ WPA2vParseRSN (
195 break; 195 break;
196 } //for 196 } //for
197 197
198 if (bUseGK == TRUE) { 198 if (bUseGK == true) {
199 if (j != 1) { 199 if (j != 1) {
200 // invalid CSS, This should be only PK CSS. 200 // invalid CSS, This should be only PK CSS.
201 return; 201 return;
@@ -237,12 +237,12 @@ WPA2vParseRSN (
237 237
238 n = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));; 238 n = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));;
239 if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2) 239 if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2)
240 pBSSNode->sRSNCapObj.bRSNCapExist = TRUE; 240 pBSSNode->sRSNCapObj.bRSNCapExist = true;
241 pBSSNode->sRSNCapObj.wRSNCap = *((unsigned short *) &(pRSN->abyRSN[8+4*m+4*n])); 241 pBSSNode->sRSNCapObj.wRSNCap = *((unsigned short *) &(pRSN->abyRSN[8+4*m+4*n]));
242 } 242 }
243 } 243 }
244 //ignore PMKID lists bcs only (Re)Assocrequest has this field 244 //ignore PMKID lists bcs only (Re)Assocrequest has this field
245 pBSSNode->bWPA2Valid = TRUE; 245 pBSSNode->bWPA2Valid = true;
246 } 246 }
247} 247}
248 248
@@ -330,7 +330,7 @@ WPA2uSetIEs(
330 pRSNIEs->len +=6; 330 pRSNIEs->len +=6;
331 331
332 // RSN Capabilites 332 // RSN Capabilites
333 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { 333 if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
334 memcpy(&pRSNIEs->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); 334 memcpy(&pRSNIEs->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
335 } else { 335 } else {
336 pRSNIEs->abyRSN[16] = 0; 336 pRSNIEs->abyRSN[16] = 0;
@@ -339,7 +339,7 @@ WPA2uSetIEs(
339 pRSNIEs->len +=2; 339 pRSNIEs->len +=2;
340 340
341 if ((pMgmt->gsPMKIDCache.BSSIDInfoCount > 0) && 341 if ((pMgmt->gsPMKIDCache.BSSIDInfoCount > 0) &&
342 (pMgmt->bRoaming == TRUE) && 342 (pMgmt->bRoaming == true) &&
343 (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { 343 (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
344 // RSN PMKID 344 // RSN PMKID
345 pwPMKID = (unsigned short *)(&pRSNIEs->abyRSN[18]); // Point to PMKID count 345 pwPMKID = (unsigned short *)(&pRSNIEs->abyRSN[18]); // Point to PMKID count
diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index f34fdfca1fb2..d5e517b08f43 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -252,7 +252,7 @@ spin_lock_irq(&pDevice->lock);
252 else { 252 else {
253 if (param->u.wpa_key.set_tx) { 253 if (param->u.wpa_key.set_tx) {
254 pDevice->byKeyIndex = (unsigned char)dwKeyIndex; 254 pDevice->byKeyIndex = (unsigned char)dwKeyIndex;
255 pDevice->bTransmitKey = TRUE; 255 pDevice->bTransmitKey = true;
256 dwKeyIndex |= (1 << 31); 256 dwKeyIndex |= (1 << 31);
257 } 257 }
258 KeybSetDefaultKey(&(pDevice->sKey), 258 KeybSetDefaultKey(&(pDevice->sKey),
@@ -266,7 +266,7 @@ spin_lock_irq(&pDevice->lock);
266 266
267 } 267 }
268 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 268 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
269 pDevice->bEncryptionEnable = TRUE; 269 pDevice->bEncryptionEnable = true;
270 return ret; 270 return ret;
271 } 271 }
272 272
@@ -362,7 +362,7 @@ spin_lock_irq(&pDevice->lock);
362 (unsigned char *)abyKey, 362 (unsigned char *)abyKey,
363 byKeyDecMode, 363 byKeyDecMode,
364 pDevice->PortOffset, 364 pDevice->PortOffset,
365 pDevice->byLocalID) == TRUE) && 365 pDevice->byLocalID) == true) &&
366 (KeybSetDefaultKey(&(pDevice->sKey), 366 (KeybSetDefaultKey(&(pDevice->sKey),
367 dwKeyIndex, 367 dwKeyIndex,
368 param->u.wpa_key.key_len, 368 param->u.wpa_key.key_len,
@@ -370,7 +370,7 @@ spin_lock_irq(&pDevice->lock);
370 (unsigned char *)abyKey, 370 (unsigned char *)abyKey,
371 byKeyDecMode, 371 byKeyDecMode,
372 pDevice->PortOffset, 372 pDevice->PortOffset,
373 pDevice->byLocalID) == TRUE) ) { 373 pDevice->byLocalID) == true) ) {
374 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); 374 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n");
375 375
376 } else { 376 } else {
@@ -403,7 +403,7 @@ spin_lock_irq(&pDevice->lock);
403 (unsigned char *)abyKey, 403 (unsigned char *)abyKey,
404 byKeyDecMode, 404 byKeyDecMode,
405 pDevice->PortOffset, 405 pDevice->PortOffset,
406 pDevice->byLocalID) == TRUE) { 406 pDevice->byLocalID) == true) {
407 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); 407 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n");
408 408
409 } else { 409 } else {
@@ -423,9 +423,9 @@ spin_lock_irq(&pDevice->lock);
423 } // BSSID not 0xffffffffffff 423 } // BSSID not 0xffffffffffff
424 if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) { 424 if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) {
425 pDevice->byKeyIndex = (unsigned char)param->u.wpa_key.key_index; 425 pDevice->byKeyIndex = (unsigned char)param->u.wpa_key.key_index;
426 pDevice->bTransmitKey = TRUE; 426 pDevice->bTransmitKey = true;
427 } 427 }
428 pDevice->bEncryptionEnable = TRUE; 428 pDevice->bEncryptionEnable = true;
429 //spin_unlock_irq(&pDevice->lock); 429 //spin_unlock_irq(&pDevice->lock);
430 430
431/* 431/*
@@ -639,7 +639,7 @@ static int wpa_get_scan(PSDevice pDevice,
639 639
640 for(jj=0;jj<MAX_BSS_NUM-ii-1;jj++) { 640 for(jj=0;jj<MAX_BSS_NUM-ii-1;jj++) {
641 641
642 if((pMgmt->sBSSList[jj].bActive!=TRUE) || 642 if((pMgmt->sBSSList[jj].bActive!=true) ||
643 643
644 ((pMgmt->sBSSList[jj].uRSSI>pMgmt->sBSSList[jj+1].uRSSI) &&(pMgmt->sBSSList[jj+1].bActive!=FALSE))) { 644 ((pMgmt->sBSSList[jj].uRSSI>pMgmt->sBSSList[jj+1].uRSSI) &&(pMgmt->sBSSList[jj+1].bActive!=FALSE))) {
645 645
@@ -817,7 +817,7 @@ else
817 case CIPHER_WEP40: 817 case CIPHER_WEP40:
818 case CIPHER_WEP104: 818 case CIPHER_WEP104:
819 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 819 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
820 bWepEnabled=TRUE; 820 bWepEnabled=true;
821 break; 821 break;
822 case CIPHER_NONE: 822 case CIPHER_NONE:
823 if (param->u.wpa_associate.group_suite == CIPHER_CCMP) 823 if (param->u.wpa_associate.group_suite == CIPHER_CCMP)
@@ -834,7 +834,7 @@ else
834 if (pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) { 834 if (pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) {
835 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; 835 pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
836 //pMgmt->eAuthenMode = WMAC_AUTH_SHAREKEY; 836 //pMgmt->eAuthenMode = WMAC_AUTH_SHAREKEY;
837 pMgmt->bShareKeyAlgorithm = TRUE; 837 pMgmt->bShareKeyAlgorithm = true;
838 } 838 }
839 else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) { 839 else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) {
840 if(!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; 840 if(!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
@@ -846,11 +846,11 @@ else
846 pDevice->eOldEncryptionStatus = pDevice->eEncryptionStatus; 846 pDevice->eOldEncryptionStatus = pDevice->eEncryptionStatus;
847 847
848 if (pDevice->eEncryptionStatus != Ndis802_11EncryptionDisabled) 848 if (pDevice->eEncryptionStatus != Ndis802_11EncryptionDisabled)
849 pDevice->bEncryptionEnable = TRUE; 849 pDevice->bEncryptionEnable = true;
850 else 850 else
851 pDevice->bEncryptionEnable = FALSE; 851 pDevice->bEncryptionEnable = FALSE;
852if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) || 852if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) ||
853 ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==TRUE))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP 853 ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==true))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP
854 KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); 854 KeyvInitTable(&pDevice->sKey, pDevice->PortOffset);
855 spin_lock_irq(&pDevice->lock); 855 spin_lock_irq(&pDevice->lock);
856 pDevice->bLinkPass = FALSE; 856 pDevice->bLinkPass = FALSE;
diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c
index 2ec077eaa629..54534df9104f 100644
--- a/drivers/staging/vt6655/wroute.c
+++ b/drivers/staging/vt6655/wroute.c
@@ -53,16 +53,16 @@ static int msglevel =MSG_LEVEL_INFO;
53 53
54/* 54/*
55 * Description: 55 * Description:
56 * Relay packet. Return TRUE if packet is copy to DMA1 56 * Relay packet. Return true if packet is copy to DMA1
57 * 57 *
58 * Parameters: 58 * Parameters:
59 * In: 59 * In:
60 * pDevice - 60 * pDevice -
61 * pbySkbData - rx packet skb data 61 * pbySkbData - rx packet skb data
62 * Out: 62 * Out:
63 * TURE, FALSE 63 * true, FALSE
64 * 64 *
65 * Return Value: TRUE if packet duplicate; otherwise FALSE 65 * Return Value: true if packet duplicate; otherwise FALSE
66 * 66 *
67 */ 67 */
68BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex) 68BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex)
@@ -99,8 +99,8 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
99 cbFrameBodySize += 8; 99 cbFrameBodySize += 8;
100 } 100 }
101 101
102 if (pDevice->bEncryptionEnable == TRUE) { 102 if (pDevice->bEncryptionEnable == true) {
103 bNeedEncryption = TRUE; 103 bNeedEncryption = true;
104 104
105 // get group key 105 // get group key
106 pbyBSSID = pDevice->abyBroadcastAddr; 106 pbyBSSID = pDevice->abyBroadcastAddr;
@@ -192,7 +192,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat
192 192
193 MACvTransmitAC0(pDevice->PortOffset); 193 MACvTransmitAC0(pDevice->PortOffset);
194 194
195 return TRUE; 195 return true;
196} 196}
197 197
198 198