diff options
author | Charles Clément <caratorn@gmail.com> | 2010-08-01 17:15:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-02 18:17:12 -0700 |
commit | 1b12068a804711ae2f4fd2876d5706542c1d7ad9 (patch) | |
tree | dc4c9d82a09a452b273f90a4f58bd62388ab7dd3 /drivers/staging | |
parent | 93a94c42b1b4f455314230e6b343bc6a23f26854 (diff) | |
download | kernel_samsung_crespo-1b12068a804711ae2f4fd2876d5706542c1d7ad9.zip kernel_samsung_crespo-1b12068a804711ae2f4fd2876d5706542c1d7ad9.tar.gz kernel_samsung_crespo-1b12068a804711ae2f4fd2876d5706542c1d7ad9.tar.bz2 |
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>
Diffstat (limited to 'drivers/staging')
31 files changed, 761 insertions, 768 deletions
diff --git a/drivers/staging/vt6655/80211mgr.c b/drivers/staging/vt6655/80211mgr.c index 9156a0b..1ed0f26 100644 --- a/drivers/staging/vt6655/80211mgr.c +++ b/drivers/staging/vt6655/80211mgr.c @@ -179,7 +179,7 @@ vMgrDecodeBeacon( break; case WLAN_EID_RSN_WPA: if (pFrame->pRSNWPA == NULL) { - if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) + if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true) pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; } break; @@ -404,7 +404,7 @@ vMgrDecodeAssocRequest( break; case WLAN_EID_RSN_WPA: if (pFrame->pRSNWPA == NULL) { - if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) + if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true) pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; } break; @@ -584,7 +584,7 @@ vMgrDecodeReassocRequest( break; case WLAN_EID_RSN_WPA: if (pFrame->pRSNWPA == NULL) { - if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) + if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true) pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; } break; @@ -779,7 +779,7 @@ vMgrDecodeProbeResponse( break; case WLAN_EID_RSN_WPA: if (pFrame->pRSNWPA == NULL) { - if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == TRUE) + if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true) pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem; } break; diff --git a/drivers/staging/vt6655/IEEE11h.c b/drivers/staging/vt6655/IEEE11h.c index 35dd1aa..1216822 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, unsigned int uLength) { size_t uNumOfEIDs = 0; - BOOL bResult = TRUE; + BOOL bResult = true; if (uLength <= WLAN_A3FR_MAXLEN) { memcpy(pMgmt->abyCurrentMSRReq, pMSRReq, uLength); @@ -177,7 +177,7 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, unsigned pTxPacket->cbPayloadLen = sizeof(WLAN_FRAME_TPCREP) - WLAN_HDR_ADDR3_LEN; if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) return (FALSE); - return (TRUE); + return (true); // return (CARDbSendPacket(pMgmt->pAdapter, pFrame, PKT_TYPE_802_11_MNG, sizeof(WLAN_FRAME_TPCREP))); } @@ -260,9 +260,9 @@ IEEE11hbMgrRxAction ( pAction->byCategory |= 0x80; //return (CARDbSendPacket(pMgmt->pAdapter, pAction, PKT_TYPE_802_11_MNG, uLength)); - return (TRUE); + return (true); } - return (TRUE); + return (true); } @@ -298,7 +298,7 @@ BOOL IEEE11hbMSRRepTx ( pTxPacket->cbPayloadLen = uLength - WLAN_HDR_ADDR3_LEN; if (csMgmt_xmit(pMgmt->pAdapter, pTxPacket) != CMD_STATUS_PENDING) return (FALSE); - return (TRUE); + return (true); // return (CARDbSendPacket(pMgmt->pAdapter, pMSRRep, PKT_TYPE_802_11_MNG, uLength)); } diff --git a/drivers/staging/vt6655/aes_ccmp.c b/drivers/staging/vt6655/aes_ccmp.c index 7198f21..c56a409 100644 --- a/drivers/staging/vt6655/aes_ccmp.c +++ b/drivers/staging/vt6655/aes_ccmp.c @@ -269,7 +269,7 @@ int ii,jj,kk; pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; if ( WLAN_GET_FC_TODS(*(unsigned short *)pbyFrame) && WLAN_GET_FC_FROMDS(*(unsigned short *)pbyFrame) ) { - bA4 = TRUE; + bA4 = true; pbyIV += 6; // 6 is 802.11 address4 wHLen += 6; wPayloadSize -= 6; @@ -394,7 +394,7 @@ int ii,jj,kk; //-------------------------------------------- if ( !memcmp(abyMIC,abyTmp,8) ) { - return TRUE; + return true; } else { return FALSE; } diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index b2f7327..39ec064 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -1740,13 +1740,13 @@ s_vChangeAntenna ( #endif if ( pDevice->dwRxAntennaSel == 0) { pDevice->dwRxAntennaSel=1; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A); else BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B); } else { pDevice->dwRxAntennaSel=0; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) BBvSetRxAntennaMode(pDevice->PortOffset, ANT_B); else BBvSetRxAntennaMode(pDevice->PortOffset, ANT_A); @@ -1900,7 +1900,7 @@ BBvCaculateParameter ( if (cbTmp != cbBitCount) { cbUsCount ++; if ((cbBitCount - cbTmp) <= 3) - bExtBit = TRUE; + bExtBit = true; } if (byPreambleType == 1) *pbyPhySgn = 0x0b; @@ -2012,7 +2012,7 @@ BBvCaculateParameter ( * Out: * pbyData - data read * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char *pbyData) @@ -2040,7 +2040,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x30)\n"); return FALSE; } - return TRUE; + return true; } @@ -2055,7 +2055,7 @@ BOOL BBbReadEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byData) @@ -2082,7 +2082,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x31)\n"); return FALSE; } - return TRUE; + return true; } @@ -2097,7 +2097,7 @@ BOOL BBbWriteEmbeded (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c * Out: * none * - * Return Value: TRUE if all TestBits are set; FALSE otherwise. + * Return Value: true if all TestBits are set; FALSE otherwise. * */ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) @@ -2120,7 +2120,7 @@ BOOL BBbIsRegBitsOn (unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch * Out: * none * - * Return Value: TRUE if all TestBits are clear; FALSE otherwise. + * Return Value: true if all TestBits are clear; FALSE otherwise. * */ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned char byTestBits) @@ -2142,13 +2142,13 @@ BOOL BBbIsRegBitsOff (unsigned long dwIoBase, unsigned char byBBAddr, unsigned c * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL BBbVT3253Init (PSDevice pDevice) { - BOOL bResult = TRUE; + BOOL bResult = true; int ii; unsigned long dwIoBase = pDevice->PortOffset; unsigned char byRFType = pDevice->byRFType; diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index bcee662..47f411c 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -173,7 +173,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ) { - pCurrBSS->bSelected = TRUE; + pCurrBSS->bSelected = true; return(pCurrBSS); } } @@ -182,7 +182,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) && WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) || ((pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA) && WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ) { - pCurrBSS->bSelected = TRUE; + pCurrBSS->bSelected = true; return(pCurrBSS); } } @@ -225,7 +225,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; } /* if (pMgmt->eAuthenMode < WMAC_AUTH_WPA) { - if (pCurrBSS->bWPAValid == TRUE) { + if (pCurrBSS->bWPAValid == true) { // WPA AP will reject connection of station without WPA enable. continue; } @@ -254,7 +254,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; } } if (pSelect != NULL) { - pSelect->bSelected = TRUE; + pSelect->bSelected = true; /* if (pDevice->bRoaming == FALSE) { // Einsn Add @20070907 @@ -321,7 +321,7 @@ BSSvClearBSSList( * search BSS list by BSSID & SSID if matched * * Return Value: - * TRUE if found. + * true if found. * -*/ PKnownBSS @@ -363,7 +363,7 @@ BSSpAddrIsInBSSList( * Insert a BSS set into known BSS list * * Return Value: - * TRUE if success. + * true if success. * -*/ @@ -412,7 +412,7 @@ BSSbInsertToBSSList ( return FALSE; } // save the BSS info - pBSSList->bActive = TRUE; + pBSSList->bActive = true; memcpy( pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN); HIDWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(HIDWORD(qwTimestamp)); LODWORD(pBSSList->qwBSSTimestamp) = cpu_to_le32(LODWORD(qwTimestamp)); @@ -446,7 +446,7 @@ BSSbInsertToBSSList ( if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) { pBSSList->eNetworkTypeInUse = PHY_TYPE_11A; } else { - if (pBSSList->sERP.bERPExist == TRUE) { + if (pBSSList->sERP.bERPExist == true) { pBSSList->eNetworkTypeInUse = PHY_TYPE_11G; } else { pBSSList->eNetworkTypeInUse = PHY_TYPE_11B; @@ -462,7 +462,7 @@ BSSbInsertToBSSList ( (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { // assoc with BSS if (pBSSList == pMgmt->pCurrBSS) { - bParsingQuiet = TRUE; + bParsingQuiet = true; } } @@ -489,25 +489,25 @@ BSSbInsertToBSSList ( } } - if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) { + if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == true)) { PSKeyItem pTransmitKey = NULL; BOOL bIs802_1x = FALSE; for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii ++) { if (pBSSList->abyAKMSSAuthType[ii] == WLAN_11i_AKMSS_802_1X) { - bIs802_1x = TRUE; + bIs802_1x = true; break; } } - if ((bIs802_1x == TRUE) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) && + if ((bIs802_1x == true) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) && ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj); - if ((pDevice->bLinkPass == TRUE) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { - if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) || - (KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == TRUE)) { + if ((pDevice->bLinkPass == true) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { + if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == true) || + (KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, GROUP_KEY, &pTransmitKey) == true)) { pDevice->gsPMKIDCandidate.StatusType = Ndis802_11StatusType_PMKID_CandidateList; pDevice->gsPMKIDCandidate.Version = 1; @@ -527,19 +527,19 @@ BSSbInsertToBSSList ( } if ((pIE_Country != NULL) && - (pMgmt->b11hEnable == TRUE)) { + (pMgmt->b11hEnable == true)) { set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse, pIE_Country); } - if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { + if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) { if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { // valid EID if (pQuiet == NULL) { pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; CARDbSetQuiet( pMgmt->pAdapter, - TRUE, + true, pQuiet->byQuietCount, pQuiet->byQuietPeriod, *((unsigned short *)pQuiet->abyQuietDuration), @@ -558,7 +558,7 @@ BSSbInsertToBSSList ( } } - if ((bParsingQuiet == TRUE) && + if ((bParsingQuiet == true) && (pQuiet != NULL)) { CARDbStartQuiet(pMgmt->pAdapter); } @@ -568,7 +568,7 @@ BSSbInsertToBSSList ( pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); - return TRUE; + return true; } @@ -578,7 +578,7 @@ BSSbInsertToBSSList ( * Update BSS set in known BSS list * * Return Value: - * TRUE if success. + * true if success. * -*/ // TODO: input structure modify @@ -646,7 +646,7 @@ BSSbUpdateToBSSList ( if (pBSSList->uChannel > CB_MAX_CHANNEL_24G) { pBSSList->eNetworkTypeInUse = PHY_TYPE_11A; } else { - if (pBSSList->sERP.bERPExist == TRUE) { + if (pBSSList->sERP.bERPExist == true) { pBSSList->eNetworkTypeInUse = PHY_TYPE_11G; } else { pBSSList->eNetworkTypeInUse = PHY_TYPE_11B; @@ -663,7 +663,7 @@ BSSbUpdateToBSSList ( (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { // assoc with BSS if (pBSSList == pMgmt->pCurrBSS) { - bParsingQuiet = TRUE; + bParsingQuiet = true; } } @@ -703,19 +703,19 @@ BSSbUpdateToBSSList ( } if ((pIE_Country != NULL) && - (pMgmt->b11hEnable == TRUE)) { + (pMgmt->b11hEnable == true)) { set_country_info(pMgmt->pAdapter, pBSSList->eNetworkTypeInUse, pIE_Country); } - if ((bParsingQuiet == TRUE) && (pIE_Quiet != NULL)) { + if ((bParsingQuiet == true) && (pIE_Quiet != NULL)) { if ((((PWLAN_IE_QUIET)pIE_Quiet)->len == 8) && (((PWLAN_IE_QUIET)pIE_Quiet)->byQuietCount != 0)) { // valid EID if (pQuiet == NULL) { pQuiet = (PWLAN_IE_QUIET)pIE_Quiet; CARDbSetQuiet( pMgmt->pAdapter, - TRUE, + true, pQuiet->byQuietCount, pQuiet->byQuietPeriod, *((unsigned short *)pQuiet->abyQuietDuration), @@ -734,7 +734,7 @@ BSSbUpdateToBSSList ( } } - if ((bParsingQuiet == TRUE) && + if ((bParsingQuiet == true) && (pQuiet != NULL)) { CARDbStartQuiet(pMgmt->pAdapter); } @@ -744,7 +744,7 @@ BSSbUpdateToBSSList ( pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); - return TRUE; + return true; } @@ -773,7 +773,7 @@ BSSDBbIsSTAInNodeDB(void *pMgmtObject, unsigned char *abyDstAddr, if (pMgmt->sNodeDBTable[ii].bActive) { if (!compare_ether_addr(abyDstAddr, pMgmt->sNodeDBTable[ii].abyMACAddr)) { *puNodeIndex = ii; - return TRUE; + return true; } } } @@ -833,7 +833,7 @@ BSSvCreateOneNode(void *hDeviceContext, unsigned int *puNodeIndex) } memset(&pMgmt->sNodeDBTable[*puNodeIndex], 0, sizeof(KnownNodeDB)); - pMgmt->sNodeDBTable[*puNodeIndex].bActive = TRUE; + pMgmt->sNodeDBTable[*puNodeIndex].bActive = true; pMgmt->sNodeDBTable[*puNodeIndex].uRatePollTimeout = FALLBACK_POLL_SECOND; // for AP mode PS queue skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue); @@ -902,7 +902,7 @@ BSSvUpdateAPNode( memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { uRateLen = WLAN_RATES_MAXLEN_11B; } @@ -915,7 +915,7 @@ BSSvUpdateAPNode( RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, - TRUE, + true, &(pMgmt->sNodeDBTable[0].wMaxBasicRate), &(pMgmt->sNodeDBTable[0].wMaxSuppRate), &(pMgmt->sNodeDBTable[0].wSuppRate), @@ -962,13 +962,13 @@ BSSvAddMulticastNode( if (!pDevice->bEnableHostWEP) memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN); - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].bPSEnable = FALSE; skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue); RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, - TRUE, + true, &(pMgmt->sNodeDBTable[0].wMaxBasicRate), &(pMgmt->sNodeDBTable[0].wMaxSuppRate), &(pMgmt->sNodeDBTable[0].wSuppRate), @@ -1027,12 +1027,12 @@ BSSvSecondCallBack( //2008-4-14 <add> by chester for led issue #ifdef FOR_LED_ON_NOTEBOOK MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); -if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){ -cc=TRUE; +if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == true)))&&(cc==FALSE)){ +cc=true; } -else if(cc==TRUE){ +else if(cc==true){ -if(pDevice->bHWRadioOff == TRUE){ +if(pDevice->bHWRadioOff == true){ if ( !(pDevice->byGPIO & GPIO0_DATA)) //||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {if(status==1) goto start; @@ -1085,11 +1085,11 @@ start: { pDevice->byReAssocCount++; - if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != TRUE)) { //10 sec timeout + if((pDevice->byReAssocCount > 10) && (pDevice->bLinkPass != true)) { //10 sec timeout printk("Re-association timeout!!!\n"); pDevice->byReAssocCount = 0; #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1099,7 +1099,7 @@ start: } #endif } - else if(pDevice->bLinkPass == TRUE) + else if(pDevice->bLinkPass == true) pDevice->byReAssocCount = 0; } @@ -1193,7 +1193,7 @@ start: if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) { if (!pDevice->bProtectMode) { MACvEnableProtectMD(pDevice->PortOffset); - pDevice->bProtectMode = TRUE; + pDevice->bProtectMode = true; } } else { @@ -1213,7 +1213,7 @@ start: } else { if (!pDevice->bShortSlotTime) { - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; BBvSetShortSlotTime(pDevice); vUpdateIFS((void *)pDevice); } @@ -1224,7 +1224,7 @@ start: if (uLongPreambleSTACnt > 0) { if (!pDevice->bBarkerPreambleMd) { MACvEnableBarkerPreambleMd(pDevice->PortOffset); - pDevice->bBarkerPreambleMd = TRUE; + pDevice->bBarkerPreambleMd = true; } } else { @@ -1240,7 +1240,7 @@ start: // Check if any STA in PS mode, enable DTIM multicast deliver if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (uSleepySTACnt > 0) - pMgmt->sNodeDBTable[0].bPSEnable = TRUE; + pMgmt->sNodeDBTable[0].bPSEnable = true; else pMgmt->sNodeDBTable[0].bPSEnable = FALSE; } @@ -1274,7 +1274,7 @@ start: pMgmt->eCurrState = WMAC_STATE_IDLE; netif_stop_queue(pDevice->dev); pDevice->bLinkPass = FALSE; - pDevice->bRoaming = TRUE; + pDevice->bRoaming = true; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount); if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; @@ -1291,7 +1291,7 @@ start: pDevice->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); }; #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1307,7 +1307,7 @@ start: pDevice->uAutoReConnectTime++; #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //network manager support need not do Roaming scan??? - if(pDevice->bWPASuppWextEnabled ==TRUE) + if(pDevice->bWPASuppWextEnabled ==true) pDevice->uAutoReConnectTime = 0; #endif } @@ -1686,7 +1686,7 @@ RxCnt = pDevice->scStatistic.RxFcsErrCnt + TxOkRatio = (TxCnt < 6) ? 4000:((pDevice->scStatistic.TxNoRetryOkCount * 4000) / TxCnt); RxOkRatio = (RxCnt < 6) ? 2000:((pDevice->scStatistic.RxOkCnt * 2000) / RxCnt); //decide link quality -if(pDevice->bLinkPass !=TRUE) +if(pDevice->bLinkPass !=true) { // printk("s_uCalculateLinkQual-->Link disconnect and Poor quality**\n"); pDevice->scStatistic.LinkQuality = 0; diff --git a/drivers/staging/vt6655/card.c b/drivers/staging/vt6655/card.c index c9f0d7a..a0dc1ff 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, * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ /* @@ -380,7 +380,7 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp return TXbTD1Send(pDevice, pPacket, uLength); } - return (TRUE); + return (true); } */ @@ -394,7 +394,7 @@ BOOL CARDbSendPacket (void *pDeviceHandler, void *pPacket, CARD_PKT_TYPE ePktTyp * Out: * none * - * Return Value: TRUE if short preamble; otherwise FALSE + * Return Value: true if short preamble; otherwise FALSE * */ BOOL CARDbIsShortPreamble (void *pDeviceHandler) @@ -403,7 +403,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler) if (pDevice->byPreambleType == 0) { return(FALSE); } - return(TRUE); + return(true); } /* @@ -415,7 +415,7 @@ BOOL CARDbIsShortPreamble (void *pDeviceHandler) * Out: * none * - * Return Value: TRUE if short slot time; otherwise FALSE + * Return Value: true if short slot time; otherwise FALSE * */ BOOL CARDbIsShorSlotTime (void *pDeviceHandler) @@ -587,7 +587,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne pDevice->bySlot = bySlot; VNSvOutPortB(pDevice->PortOffset + MAC_REG_SLOT, pDevice->bySlot); if (pDevice->bySlot == C_SLOT_SHORT) { - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; } else { pDevice->bShortSlotTime = FALSE; } @@ -605,7 +605,7 @@ BOOL CARDbSetPhyParameter (void *pDeviceHandler, CARD_PHY_TYPE ePHYType, unsigne s_vSetRSPINF(pDevice, ePHYType, pSupportRates, pExtSupportRates); pDevice->eCurrentPHYType = ePHYType; // set for NDIS OID_802_11SUPPORTED_RATES - return (TRUE); + return (true); } /* @@ -641,7 +641,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi VNSvOutPortD(pDevice->PortOffset + MAC_REG_TSFOFST + 4, HIDWORD(qwTSFOffset)); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TSFSYNCEN); } - return(TRUE); + return(true); } @@ -656,7 +656,7 @@ BOOL CARDbUpdateTSF (void *pDeviceHandler, unsigned char byRxRate, QWORD qwBSSTi * Out: * none * - * Return Value: TRUE if succeed; otherwise FALSE + * Return Value: true if succeed; otherwise FALSE * */ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval) @@ -695,7 +695,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval) VNSvOutPortD(pDevice->PortOffset + MAC_REG_NEXTTBTT + 4, HIDWORD(qwNextTBTT)); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TFTCTL, TFTCTL_TBTTSYNCEN); - return(TRUE); + return(true); } @@ -710,7 +710,7 @@ BOOL CARDbSetBeaconPeriod (void *pDeviceHandler, unsigned short wBeaconInterval) * Out: * none * - * Return Value: TRUE if all data packet complete; otherwise FALSE. + * Return Value: true if all data packet complete; otherwise FALSE. * */ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) @@ -719,19 +719,19 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) if (ePktType == PKT_TYPE_802_11_ALL) { - pDevice->bStopBeacon = TRUE; - pDevice->bStopTx0Pkt = TRUE; - pDevice->bStopDataPkt = TRUE; + pDevice->bStopBeacon = true; + pDevice->bStopTx0Pkt = true; + pDevice->bStopDataPkt = true; } else if (ePktType == PKT_TYPE_802_11_BCN) { - pDevice->bStopBeacon = TRUE; + pDevice->bStopBeacon = true; } else if (ePktType == PKT_TYPE_802_11_MNG) { - pDevice->bStopTx0Pkt = TRUE; + pDevice->bStopTx0Pkt = true; } else if (ePktType == PKT_TYPE_802_11_DATA) { - pDevice->bStopDataPkt = TRUE; + pDevice->bStopDataPkt = true; } - if (pDevice->bStopBeacon == TRUE) { - if (pDevice->bIsBeaconBufReadySet == TRUE) { + if (pDevice->bStopBeacon == true) { + if (pDevice->bIsBeaconBufReadySet == true) { if (pDevice->cbBeaconBufReadySetCnt < WAIT_BEACON_TX_DOWN_TMO) { pDevice->cbBeaconBufReadySetCnt ++; return(FALSE); @@ -742,19 +742,19 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) MACvRegBitsOff(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); } // wait all TD0 complete - if (pDevice->bStopTx0Pkt == TRUE) { + if (pDevice->bStopTx0Pkt == true) { if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){ return(FALSE); } } // wait all Data TD complete - if (pDevice->bStopDataPkt == TRUE) { + if (pDevice->bStopDataPkt == true) { if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ return(FALSE); } } - return(TRUE); + return(true); } @@ -768,7 +768,7 @@ BOOL CARDbStopTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) * Out: * none * - * Return Value: TRUE if success; FALSE if failed. + * Return Value: true if success; FALSE if failed. * */ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) @@ -789,12 +789,12 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) } if ((pDevice->bStopBeacon == FALSE) && - (pDevice->bBeaconBufReady == TRUE) && + (pDevice->bBeaconBufReady == true) && (pDevice->eOPMode == OP_MODE_ADHOC)) { MACvRegBitsOn(pDevice->PortOffset, MAC_REG_TCR, TCR_AUTOBCNTX); } - return(TRUE); + return(true); } @@ -810,7 +810,7 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType) * Out: * none * - * Return Value: TRUE if success; FALSE if failed. + * Return Value: true if success; FALSE if failed. * */ BOOL 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 } else { if (is_zero_ether_addr(pDevice->abyBSSID) == FALSE) { MACvRegBitsOn(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID); - pDevice->bBSSIDFilter = TRUE; + pDevice->bBSSIDFilter = true; pDevice->byRxMode |= RCR_BSSID; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: rx_mode = %x\n", pDevice->byRxMode ); } // Adopt BSS state in Adapter Device Object pDevice->eOPMode = eOPMode; - return(TRUE); + return(true); } @@ -858,7 +858,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e * Out: * none * - * Return Value: TRUE if success; FALSE if failed. + * Return Value: true if success; FALSE if failed. * */ @@ -879,7 +879,7 @@ BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE e * Out: * none * - * Return Value: TRUE if succeed; otherwise FALSE + * Return Value: true if succeed; otherwise FALSE * */ BOOL CARDbSetTxDataRate( @@ -890,7 +890,7 @@ BOOL CARDbSetTxDataRate( PSDevice pDevice = (PSDevice) pDeviceHandler; pDevice->wCurrentRate = wDataRate; - return(TRUE); + return(true); } /*+ @@ -904,7 +904,7 @@ BOOL CARDbSetTxDataRate( * Out: * none * - * Return Value: TRUE if power down success; otherwise FALSE + * Return Value: true if power down success; otherwise FALSE * -*/ BOOL @@ -917,7 +917,7 @@ CARDbPowerDown( // check if already in Doze mode if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS)) - return TRUE; + return true; // Froce PSEN on MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); @@ -931,7 +931,7 @@ CARDbPowerDown( MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Go to Doze ZZZZZZZZZZZZZZZ\n"); - return TRUE; + return true; } /* @@ -943,16 +943,16 @@ CARDbPowerDown( * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL CARDbRadioPowerOff (void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; - BOOL bResult = TRUE; + BOOL bResult = true; - if (pDevice->bRadioOff == TRUE) - return TRUE; + if (pDevice->bRadioOff == true) + return true; switch (pDevice->byRFType) { @@ -975,7 +975,7 @@ BOOL CARDbRadioPowerOff (void *pDeviceHandler) BBvSetDeepSleep(pDevice->PortOffset, pDevice->byLocalID); - pDevice->bRadioOff = TRUE; + pDevice->bRadioOff = true; //2007-0409-03,<Add> by chester printk("chester power off\n"); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue @@ -992,23 +992,23 @@ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL CARDbRadioPowerOn (void *pDeviceHandler) { PSDevice pDevice = (PSDevice) pDeviceHandler; - BOOL bResult = TRUE; + BOOL bResult = true; printk("chester power on\n"); - if (pDevice->bRadioControlOff == TRUE){ -if (pDevice->bHWRadioOff == TRUE) printk("chester bHWRadioOff\n"); -if (pDevice->bRadioControlOff == TRUE) printk("chester bRadioControlOff\n"); + if (pDevice->bRadioControlOff == true){ +if (pDevice->bHWRadioOff == true) printk("chester bHWRadioOff\n"); +if (pDevice->bRadioControlOff == true) printk("chester bRadioControlOff\n"); return FALSE;} if (pDevice->bRadioOff == FALSE) { printk("chester pbRadioOff\n"); -return TRUE;} +return true;} BBvExitDeepSleep(pDevice->PortOffset, pDevice->byLocalID); @@ -1044,7 +1044,7 @@ BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID) PSDevice pDevice = (PSDevice) pDeviceHandler; KeybRemoveAllKey(&(pDevice->sKey), pbyBSSID, pDevice->PortOffset); - return (TRUE); + return (true); } @@ -1093,18 +1093,18 @@ CARDbAdd_PMKID_Candidate ( for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) { - if ((bRSNCapExist == TRUE) && (wRSNCap & BIT0)) { + if ((bRSNCapExist == true) && (wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); } - return TRUE; + return true; } } // New Candidate pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates]; - if ((bRSNCapExist == TRUE) && (wRSNCap & BIT0)) { + if ((bRSNCapExist == true) && (wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); @@ -1112,7 +1112,7 @@ CARDbAdd_PMKID_Candidate ( memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN); pDevice->gsPMKIDCandidate.NumCandidates++; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); - return TRUE; + return true; } void * @@ -1150,15 +1150,15 @@ CARDbStartMeasure ( PWLAN_IE_MEASURE_REQ pEID = (PWLAN_IE_MEASURE_REQ) pvMeasureEIDs; QWORD qwCurrTSF; QWORD qwStartTSF; - BOOL bExpired = TRUE; + BOOL bExpired = true; unsigned short wDuration = 0; if ((pEID == NULL) || (uNumOfMeasureEIDs == 0)) { - return (TRUE); + return (true); } CARDbGetCurrentTSF(pDevice->PortOffset, &qwCurrTSF); - if (pDevice->bMeasureInProgress == TRUE) { + if (pDevice->bMeasureInProgress == true) { pDevice->bMeasureInProgress = FALSE; VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR); MACvSelectPage1(pDevice->PortOffset); @@ -1240,7 +1240,7 @@ CARDbStartMeasure ( } else { // all measure start time expired we should complete action VNTWIFIbMeasureReport( pDevice->pMgmt, - TRUE, + true, NULL, 0, pDevice->byBasicMap, @@ -1248,7 +1248,7 @@ CARDbStartMeasure ( pDevice->abyRPIs ); } - return (TRUE); + return (true); } @@ -1275,7 +1275,7 @@ CARDbChannelSwitch ( ) { PSDevice pDevice = (PSDevice) pDeviceHandler; - BOOL bResult = TRUE; + BOOL bResult = true; if (byCount == 0) { bResult = set_channel(pDevice, byNewChannel); @@ -1287,7 +1287,7 @@ CARDbChannelSwitch ( } pDevice->byChannelSwitchCount = byCount; pDevice->byNewChannel = byNewChannel; - pDevice->bChannelSwitch = TRUE; + pDevice->bChannelSwitch = true; if (byMode == 1) { bResult=CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL); } @@ -1322,7 +1322,7 @@ CARDbSetQuiet ( PSDevice pDevice = (PSDevice) pDeviceHandler; unsigned int ii = 0; - if (bResetQuiet == TRUE) { + if (bResetQuiet == true) { MACvRegBitsOff(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN)); for(ii=0;ii<MAX_QUIET_COUNT;ii++) { pDevice->sQuiet[ii].bEnable = FALSE; @@ -1333,7 +1333,7 @@ CARDbSetQuiet ( pDevice->byQuietStartCount = byQuietCount; } if (pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable == FALSE) { - pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = TRUE; + pDevice->sQuiet[pDevice->uQuietEnqueue].bEnable = true; pDevice->sQuiet[pDevice->uQuietEnqueue].byPeriod = byQuietPeriod; pDevice->sQuiet[pDevice->uQuietEnqueue].wDuration = wQuietDuration; pDevice->sQuiet[pDevice->uQuietEnqueue].dwStartTime = (unsigned long) byQuietCount; @@ -1347,7 +1347,7 @@ CARDbSetQuiet ( } else { // we can not handle Quiet EID more } - return (TRUE); + return (true); } @@ -1379,7 +1379,7 @@ CARDbStartQuiet ( unsigned long dwDuration = 0; for(ii=0;ii<MAX_QUIET_COUNT;ii++) { - if ((pDevice->sQuiet[ii].bEnable == TRUE) && + if ((pDevice->sQuiet[ii].bEnable == true) && (dwStartTime > pDevice->sQuiet[ii].dwStartTime)) { dwStartTime = pDevice->sQuiet[ii].dwStartTime; uCurrentQuietIndex = ii; @@ -1402,7 +1402,7 @@ CARDbStartQuiet ( pDevice->bEnableFirstQuiet = FALSE; MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, (MSRCTL_QUIETTXCHK | MSRCTL_QUIETEN)); } else { - pDevice->bEnableFirstQuiet = TRUE; + pDevice->bEnableFirstQuiet = true; } MACvSelectPage0(pDevice->PortOffset); } else { @@ -1426,7 +1426,7 @@ CARDbStartQuiet ( MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_QUIETRPT); MACvSelectPage0(pDevice->PortOffset); } - pDevice->bQuietEnable = TRUE; + pDevice->bQuietEnable = true; pDevice->dwCurrentQuietEndTime = pDevice->sQuiet[uCurrentQuietIndex].dwStartTime; pDevice->dwCurrentQuietEndTime += pDevice->sQuiet[uCurrentQuietIndex].wDuration; if (pDevice->sQuiet[uCurrentQuietIndex].byPeriod == 0) { @@ -1441,14 +1441,14 @@ CARDbStartQuiet ( if (pDevice->dwCurrentQuietEndTime > 0x80010000) { // decreament all time to avoid wrap around for(ii=0;ii<MAX_QUIET_COUNT;ii++) { - if (pDevice->sQuiet[ii].bEnable == TRUE) { + if (pDevice->sQuiet[ii].bEnable == true) { pDevice->sQuiet[ii].dwStartTime -= 0x80000000; } } pDevice->dwCurrentQuietEndTime -= 0x80000000; } } - return (TRUE); + return (true); } /* @@ -1475,11 +1475,11 @@ CARDvSetPowerConstraint ( PSDevice pDevice = (PSDevice) pDeviceHandler; if (byChannel > CB_MAX_CHANNEL_24G) { - if (pDevice->bCountryInfo5G == TRUE) { + if (pDevice->bCountryInfo5G == true) { pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower; } } else { - if (pDevice->bCountryInfo24G == TRUE) { + if (pDevice->bCountryInfo24G == true) { pDevice->abyLocalPwr[byChannel] = pDevice->abyRegPwr[byChannel] - byPower; } } @@ -1943,7 +1943,7 @@ void CARDvUpdateBasicTopRate (void *pDeviceHandler) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx) @@ -1956,7 +1956,7 @@ BOOL CARDbAddBasicRate (void *pDeviceHandler, unsigned short wRateIdx) //Determines the highest basic rate. CARDvUpdateBasicTopRate((void *)pDevice); - return(TRUE); + return(true); } BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler) @@ -1966,7 +1966,7 @@ BOOL CARDbIsOFDMinBasicRate (void *pDeviceHandler) for (ii = RATE_54M; ii >= RATE_6M; ii --) { if ((pDevice->wBasicRate) & ((unsigned short)(1<<ii))) - return TRUE; + return true; } return FALSE; } @@ -2036,7 +2036,7 @@ BOOL CARDbSoftwareReset (void *pDeviceHandler) if (!MACbSafeSoftwareReset(pDevice->PortOffset)) return FALSE; - return TRUE; + return true; } @@ -2089,7 +2089,7 @@ QWORD CARDqGetTSFOffset (unsigned char byRxRate, QWORD qwTSF1, QWORD qwTSF2) * Out: * qwCurrTSF - Current TSF counter * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF) @@ -2108,7 +2108,7 @@ BOOL CARDbGetCurrentTSF (unsigned long dwIoBase, PQWORD pqwCurrTSF) VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR, &LODWORD(*pqwCurrTSF)); VNSvInPortD(dwIoBase + MAC_REG_TSFCNTR + 4, &HIDWORD(*pqwCurrTSF)); - return(TRUE); + return(true); } diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index 15aab95..ca2fa04 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -38,62 +38,62 @@ static int msglevel = MSG_LEVEL_INFO; static SChannelTblElement sChannelTbl[CARD_MAX_CHANNEL_TBL + 1] = { {0, 0, FALSE, 0}, - {1, 2412, TRUE, 0}, - {2, 2417, TRUE, 0}, - {3, 2422, TRUE, 0}, - {4, 2427, TRUE, 0}, - {5, 2432, TRUE, 0}, - {6, 2437, TRUE, 0}, - {7, 2442, TRUE, 0}, - {8, 2447, TRUE, 0}, - {9, 2452, TRUE, 0}, - {10, 2457, TRUE, 0}, - {11, 2462, TRUE, 0}, - {12, 2467, TRUE, 0}, - {13, 2472, TRUE, 0}, - {14, 2484, TRUE, 0}, - {183, 4915, TRUE, 0}, - {184, 4920, TRUE, 0}, - {185, 4925, TRUE, 0}, - {187, 4935, TRUE, 0}, - {188, 4940, TRUE, 0}, - {189, 4945, TRUE, 0}, - {192, 4960, TRUE, 0}, - {196, 4980, TRUE, 0}, - {7, 5035, TRUE, 0}, - {8, 5040, TRUE, 0}, - {9, 5045, TRUE, 0}, - {11, 5055, TRUE, 0}, - {12, 5060, TRUE, 0}, - {16, 5080, TRUE, 0}, - {34, 5170, TRUE, 0}, - {36, 5180, TRUE, 0}, - {38, 5190, TRUE, 0}, - {40, 5200, TRUE, 0}, - {42, 5210, TRUE, 0}, - {44, 5220, TRUE, 0}, - {46, 5230, TRUE, 0}, - {48, 5240, TRUE, 0}, - {52, 5260, TRUE, 0}, - {56, 5280, TRUE, 0}, - {60, 5300, TRUE, 0}, - {64, 5320, TRUE, 0}, - {100, 5500, TRUE, 0}, - {104, 5520, TRUE, 0}, - {108, 5540, TRUE, 0}, - {112, 5560, TRUE, 0}, - {116, 5580, TRUE, 0}, - {120, 5600, TRUE, 0}, - {124, 5620, TRUE, 0}, - {128, 5640, TRUE, 0}, - {132, 5660, TRUE, 0}, - {136, 5680, TRUE, 0}, - {140, 5700, TRUE, 0}, - {149, 5745, TRUE, 0}, - {153, 5765, TRUE, 0}, - {157, 5785, TRUE, 0}, - {161, 5805, TRUE, 0}, - {165, 5825, TRUE, 0} + {1, 2412, true, 0}, + {2, 2417, true, 0}, + {3, 2422, true, 0}, + {4, 2427, true, 0}, + {5, 2432, true, 0}, + {6, 2437, true, 0}, + {7, 2442, true, 0}, + {8, 2447, true, 0}, + {9, 2452, true, 0}, + {10, 2457, true, 0}, + {11, 2462, true, 0}, + {12, 2467, true, 0}, + {13, 2472, true, 0}, + {14, 2484, true, 0}, + {183, 4915, true, 0}, + {184, 4920, true, 0}, + {185, 4925, true, 0}, + {187, 4935, true, 0}, + {188, 4940, true, 0}, + {189, 4945, true, 0}, + {192, 4960, true, 0}, + {196, 4980, true, 0}, + {7, 5035, true, 0}, + {8, 5040, true, 0}, + {9, 5045, true, 0}, + {11, 5055, true, 0}, + {12, 5060, true, 0}, + {16, 5080, true, 0}, + {34, 5170, true, 0}, + {36, 5180, true, 0}, + {38, 5190, true, 0}, + {40, 5200, true, 0}, + {42, 5210, true, 0}, + {44, 5220, true, 0}, + {46, 5230, true, 0}, + {48, 5240, true, 0}, + {52, 5260, true, 0}, + {56, 5280, true, 0}, + {60, 5300, true, 0}, + {64, 5320, true, 0}, + {100, 5500, true, 0}, + {104, 5520, true, 0}, + {108, 5540, true, 0}, + {112, 5560, true, 0}, + {116, 5580, true, 0}, + {120, 5600, true, 0}, + {124, 5620, true, 0}, + {128, 5640, true, 0}, + {132, 5660, true, 0}, + {136, 5680, true, 0}, + {140, 5700, true, 0}, + {149, 5745, true, 0}, + {153, 5765, true, 0}, + {157, 5785, true, 0}, + {161, 5805, true, 0}, + {165, 5825, true, 0} }; /************************************************************************ @@ -365,7 +365,7 @@ static struct * 15 = 4.9G channel 183 * 16 = 4.9G channel 184 * ..... - * Output: TRUE if the specified 5GHz band is allowed to be used, + * Output: true if the specified 5GHz band is allowed to be used, * FALSE otherwise. * 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22) * @@ -414,7 +414,7 @@ BOOL channel_get_list(unsigned int uCountryCodeIdx, unsigned char *pbyChannelTab memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); - return (TRUE); + return (true); } void init_channel_table(void *pDeviceHandler) @@ -440,14 +440,14 @@ void init_channel_table(void *pDeviceHandler) case RF_UW2452 : case RF_NOTHING : default : - bMultiBand = TRUE; + bMultiBand = true; break; } - if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == TRUE)) { - if (bMultiBand == TRUE) { + if ((pDevice->dwDiagRefCount != 0) || (pDevice->b11hEnable == true)) { + if (bMultiBand == true) { for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) { - sChannelTbl[ii+1].bValid = TRUE; + sChannelTbl[ii+1].bValid = true; pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1]; pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1]; } @@ -459,17 +459,17 @@ void init_channel_table(void *pDeviceHandler) for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) { //2008-8-4 <add> by chester if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { - sChannelTbl[ii+1].bValid = TRUE; + sChannelTbl[ii+1].bValid = true; pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1]; pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1]; } } } } else if (pDevice->byZoneType <= CCODE_MAX) { - if (bMultiBand == TRUE) { + if (bMultiBand == true) { for(ii = 0 ; ii<CARD_MAX_CHANNEL_TBL ; ii++) { if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { - sChannelTbl[ii+1].bValid = TRUE; + sChannelTbl[ii+1].bValid = true; pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; } @@ -477,7 +477,7 @@ void init_channel_table(void *pDeviceHandler) } else { for(ii = 0 ; ii<CHANNEL_MAX_24G ; ii++) { if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) { - sChannelTbl[ii+1].bValid = TRUE; + sChannelTbl[ii+1].bValid = true; pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii]; } @@ -522,13 +522,13 @@ unsigned char get_channel_number(void *pDeviceHandler, unsigned char byChannelIn * @pDeviceHandler: The adapter to be set * @uConnectionChannel: Channel to be set * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel) { PSDevice pDevice = (PSDevice) pDeviceHandler; - BOOL bResult = TRUE; + BOOL bResult = true; if (pDevice->byCurrentCh == uConnectionChannel) { @@ -563,7 +563,7 @@ BOOL set_channel (void *pDeviceHandler, unsigned int uConnectionChannel) bResult &= RFbSelectChannel(pDevice->PortOffset, pDevice->byRFType, (unsigned char)uConnectionChannel); // Init Synthesizer Table - if (pDevice->bEnablePSMode == TRUE) + if (pDevice->bEnablePSMode == true) RFvWriteWakeProgSyn(pDevice->PortOffset, pDevice->byRFType, uConnectionChannel); @@ -617,13 +617,13 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE) uNumOfCountryInfo /= 3; if (ePHYType == PHY_TYPE_11A) { - pDevice->bCountryInfo5G = TRUE; + pDevice->bCountryInfo5G = true; for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CARD_MAX_CHANNEL_TBL ; ii++) { sChannelTbl[ii].bValid = FALSE; } step = 4; } else { - pDevice->bCountryInfo24G = TRUE; + pDevice->bCountryInfo24G = true; for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { sChannelTbl[ii].bValid = FALSE; } @@ -636,7 +636,7 @@ void set_country_info(void *pDeviceHandler, CARD_PHY_TYPE ePHYType, void *pIE) for(ii = 0 ; ii < uNumOfCountryInfo ; ii++) { for(uu = 0 ; uu < pIE_Country->abyCountryInfo[ii*3+1] ; uu++) { byCh = get_channel_mapping(pDevice, (unsigned char)(pIE_Country->abyCountryInfo[ii*3]+step*uu), ePHYType); - sChannelTbl[byCh].bValid = TRUE; + sChannelTbl[byCh].bValid = true; pDevice->abyRegPwr[byCh] = pIE_Country->abyCountryInfo[ii*3+2]; } } @@ -668,18 +668,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) byLen = 2; // lower band byCount = 0; - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[28] == true) { for (ii = 28 ; ii < 36 ; ii+= 2) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { byCount++; } } *pbyChTupple++ = 34; *pbyChTupple++ = byCount; byLen += 2; - } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == TRUE) { + } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[29] == true) { for (ii = 29 ; ii < 36 ; ii+= 2) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { byCount++; } } @@ -689,9 +689,9 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) } // middle band byCount = 0; - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[36] == true) { for (ii = 36 ; ii < 40 ; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { byCount++; } } @@ -701,18 +701,18 @@ unsigned char set_support_channels(void *pDeviceHandler, unsigned char *pbyIEs) } // higher band byCount = 0; - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[40] == true) { for (ii = 40 ; ii < 51 ; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { byCount++; } } *pbyChTupple++ = 100; *pbyChTupple++ = byCount; byLen += 2; - } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == TRUE) { + } else if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[51] == true) { for (ii = 51 ; ii < 56 ; ii++) { - if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == TRUE) { + if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] == true) { byCount++; } } @@ -784,7 +784,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) if (ePHYType == PHY_TYPE_11A) { for(ii = CB_MAX_CHANNEL_24G + 1 ; ii <= CB_MAX_CHANNEL ; ii++) { - if (sChannelTbl[ii].bValid == TRUE) { + if (sChannelTbl[ii].bValid == true) { if (byOptionChannel == 0) { byOptionChannel = (unsigned char) ii; } @@ -798,7 +798,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) } else { byOptionChannel = 0; for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { - if (sChannelTbl[ii].bValid == TRUE) { + if (sChannelTbl[ii].bValid == true) { if (sChannelTbl[ii].byMAP == 0) { aiWeight[ii] += 100; } else if (sChannelTbl[ii].byMAP & 0x01) { @@ -825,7 +825,7 @@ unsigned char auto_channel_select(void *pDeviceHandler, CARD_PHY_TYPE ePHYType) } } for(ii = 1 ; ii <= CB_MAX_CHANNEL_24G ; ii++) { - if ((sChannelTbl[ii].bValid == TRUE) && + if ((sChannelTbl[ii].bValid == true) && (aiWeight[ii] > aiWeight[byOptionChannel])) { byOptionChannel = (unsigned char) ii; } diff --git a/drivers/staging/vt6655/datarate.c b/drivers/staging/vt6655/datarate.c index dea9599..5efc724 100644 --- a/drivers/staging/vt6655/datarate.c +++ b/drivers/staging/vt6655/datarate.c @@ -233,7 +233,7 @@ unsigned int uRateLen; for (ii = 0; ii < uRateLen; ii++) { byRate = (unsigned char)(pItemRates->abyRates[ii]); if (WLAN_MGMT_IS_BASICRATE(byRate) && - (bUpdateBasicRate == TRUE)) { + (bUpdateBasicRate == true)) { // Add to basic rate set, update pDevice->byTopCCKBasicRate and pDevice->byTopOFDMBasicRate CARDbAddBasicRate((void *)pDevice, wGetRateIdx(byRate)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate AddBasicRate: %d\n", wGetRateIdx(byRate)); @@ -317,7 +317,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler; unsigned short wIdxDownRate = 0; unsigned int ii; //unsigned long dwRateTable[MAX_RATE] = {1, 2, 5, 11, 6, 9, 12, 18, 24, 36, 48, 54}; -BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; +BOOL bAutoRate[MAX_RATE] = {true,true,true,true,FALSE,FALSE,true,true,true,true,true,true}; unsigned long dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; unsigned long dwThroughput = 0; unsigned short wIdxUpRate = 0; @@ -346,7 +346,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T for(ii=0;ii<MAX_RATE;ii++) { if (psNodeDBTable->wSuppRate & (0x0001<<ii)) { - if (bAutoRate[ii] == TRUE) { + if (bAutoRate[ii] == true) { wIdxUpRate = (unsigned short) ii; } } else { @@ -372,7 +372,7 @@ BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,T for(ii = psNodeDBTable->wTxDataRate; ii > 0;) { ii--; if ( (dwThroughputTbl[ii] > dwThroughput) && - (bAutoRate[ii]==TRUE) ) { + (bAutoRate[ii]==true) ) { dwThroughput = dwThroughputTbl[ii]; wIdxDownRate = (unsigned short) ii; } diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h index a05b46e..ada2974 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) { ifa=(struct in_ifaddr*) in_dev->ifa_list; if (ifa!=NULL) { memcpy(pInfo->abyIPAddr,&ifa->ifa_address,4); - return TRUE; + return true; } } return FALSE; diff --git a/drivers/staging/vt6655/device_cfg.h b/drivers/staging/vt6655/device_cfg.h index d1e9c19..8a070c6 100644 --- a/drivers/staging/vt6655/device_cfg.h +++ b/drivers/staging/vt6655/device_cfg.h @@ -43,10 +43,6 @@ struct _version { #define FALSE (0) #endif -#ifndef TRUE -#define TRUE (!(FALSE)) -#endif - #define VID_TABLE_SIZE 64 #define MCAST_TABLE_SIZE 64 #define MCAM_SIZE 32 diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index d498442..4f9d0a5 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 *opt|=(def ? flag : 0); } else { DBG_PRT(MSG_LEVEL_INFO, KERN_NOTICE "%s: set parameter %s to %s\n", - devname,name , val ? "TRUE" : "FALSE"); + devname,name , val ? "true" : "FALSE"); *opt|=(val ? flag : 0); } } @@ -452,7 +452,7 @@ device_set_options(PSDevice pDevice) { pDevice->b11hEnable = (pDevice->sOpts.flags & DEVICE_FLAGS_80211h_MODE) ? 1 : 0; pDevice->bDiversityRegCtlON = (pDevice->sOpts.flags & DEVICE_FLAGS_DiversityANT) ? 1 : 0; pDevice->uConnectionRate = pDevice->sOpts.data_rate; - if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = TRUE; + if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true; pDevice->byBBType = pDevice->sOpts.bbp_type; pDevice->byPacketType = pDevice->byBBType; @@ -460,7 +460,7 @@ device_set_options(PSDevice pDevice) { pDevice->byAutoFBCtrl = AUTO_FB_0; //pDevice->byAutoFBCtrl = AUTO_FB_1; //PLICE_DEBUG<- -pDevice->bUpdateBBVGA = TRUE; +pDevice->bUpdateBBVGA = true; pDevice->byFOETuning = 0; pDevice->wCTSDuration = 0; pDevice->byPreambleType = 0; @@ -498,7 +498,7 @@ static void s_vCompleteCurrentMeasure (PSDevice pDevice, unsigned char byResult) if (pDevice->uNumOfMeasureEIDs == 0) { VNTWIFIbMeasureReport( pDevice->pMgmt, - TRUE, + true, pDevice->pCurrMeasureEID, byResult, pDevice->byBasicMap, @@ -542,7 +542,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) // Do MACbSoftwareReset in MACvInitialize MACbSoftwareReset(pDevice->PortOffset); // force CCK - pDevice->bCCK = TRUE; + pDevice->bCCK = true; pDevice->bAES = FALSE; pDevice->bProtectMode = FALSE; //Only used in 11g type, sync with ERP IE pDevice->bNonERPPresent = FALSE; @@ -572,7 +572,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) // Get Antena byValue = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); if (byValue & EEP_ANTINV) - pDevice->bTxRxAntInv = TRUE; + pDevice->bTxRxAntInv = true; else pDevice->bTxRxAntInv = FALSE; #ifdef PLICE_DEBUG @@ -597,7 +597,7 @@ static void device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) pDevice->byTxAntennaMode = ANT_B; pDevice->dwTxAntennaSel = 1; pDevice->dwRxAntennaSel = 1; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) pDevice->byRxAntennaMode = ANT_A; else pDevice->byRxAntennaMode = ANT_B; @@ -607,7 +607,7 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); if((byValue1&0x08)==0) pDevice->bDiversityEnable = FALSE;//SROMbyReadEmbedded(pDevice->PortOffset, 0x50); else - pDevice->bDiversityEnable = TRUE; + pDevice->bDiversityEnable = true; #ifdef PLICE_DEBUG //printk("aux |main antenna: RxAntennaMode is %d\n",pDevice->byRxAntennaMode); #endif @@ -618,13 +618,13 @@ byValue1 = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ANTENNA); pDevice->dwRxAntennaSel = 0; if (byValue & EEP_ANTENNA_AUX) { pDevice->byTxAntennaMode = ANT_A; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) pDevice->byRxAntennaMode = ANT_B; else pDevice->byRxAntennaMode = ANT_A; } else { pDevice->byTxAntennaMode = ANT_B; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) pDevice->byRxAntennaMode = ANT_A; else pDevice->byRxAntennaMode = ANT_B; @@ -792,21 +792,21 @@ else MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO); //2008-4-14 <add> by chester for led issue #ifdef FOR_LED_ON_NOTEBOOK -if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = TRUE;} +if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = true;} if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;} } - if ( (pDevice->bRadioControlOff == TRUE)) { + if ( (pDevice->bRadioControlOff == true)) { CARDbRadioPowerOff(pDevice); } else CARDbRadioPowerOn(pDevice); #else if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) || ( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) { - pDevice->bHWRadioOff = TRUE; + pDevice->bHWRadioOff = true; } } - if ((pDevice->bHWRadioOff == TRUE) || (pDevice->bRadioControlOff == TRUE)) { + if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) { CARDbRadioPowerOff(pDevice); } @@ -876,7 +876,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice) int ii=0; // wait_queue_head_t Set_wait; //send device close to wpa_supplicnat layer - if (pDevice->bWPADEVUp==TRUE) { + if (pDevice->bWPADEVUp==true) { wpahdr = (viawget_wpa_header *)pDevice->skb->data; wpahdr->type = VIAWGET_DEVICECLOSE_MSG; wpahdr->resp_ie_len = 0; @@ -893,7 +893,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice) //wait release WPADEV // init_waitqueue_head(&Set_wait); // wait_event_timeout(Set_wait, ((pDevice->wpadev==NULL)&&(pDevice->skb == NULL)),5*HZ); //1s wait - while((pDevice->bWPADEVUp==TRUE)) { + while((pDevice->bWPADEVUp==true)) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout (HZ/20); //wait 50ms ii++; @@ -901,7 +901,7 @@ static BOOL device_release_WPADEV(PSDevice pDevice) break; } }; - return TRUE; + return true; } @@ -919,7 +919,7 @@ static const struct net_device_ops device_netdev_ops = { static int __devinit vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) { - static BOOL bFirst = TRUE; + static BOOL bFirst = true; struct net_device* dev = NULL; PCHIP_INFO pChip_info = (PCHIP_INFO)ent->driver_data; PSDevice pDevice; @@ -1148,7 +1148,7 @@ static BOOL __devinit vt6655_init_info(struct pci_dev* pcid, PSDevice* ppDevice, spin_lock_init(&((*ppDevice)->lock)); - return TRUE; + return true; } static 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) { } } #endif - return TRUE; + return true; } static void device_free_info(PSDevice pDevice) { @@ -1361,7 +1361,7 @@ static BOOL device_init_rings(PSDevice pDevice) { pDevice->sOpts.nTxDescs[1] * PKT_BUF_SZ; - return TRUE; + return true; } static void device_free_rings(PSDevice pDevice) { @@ -1646,7 +1646,7 @@ static BOOL device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pRD) { pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz); pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma); - return TRUE; + return true; } @@ -1659,7 +1659,7 @@ BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF) { ASSERT(pDeF->skb); pDeF->skb->dev = pDevice->dev; - return TRUE; + return true; } @@ -1783,7 +1783,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) { // RESERV_AC0DMA reserved for relay if (AVAIL_TD(pDevice, uIdx) < RESERV_AC0DMA) { - bFull = TRUE; + bFull = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " AC0DMA is Full = %d\n", pDevice->iTDUsed[uIdx]); } if (netif_queue_stopped(pDevice->dev) && (bFull==FALSE)){ @@ -1994,7 +1994,7 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call device_init_registers\n"); pDevice->byReAssocCount = 0; pDevice->bWPADEVUp = FALSE; // Patch: if WEP key already set by iwconfig but device not yet open - if ((pDevice->bEncryptionEnable == TRUE) && (pDevice->bTransmitKey == TRUE)) { + if ((pDevice->bEncryptionEnable == true) && (pDevice->bTransmitKey == true)) { KeybSetDefaultKey(&(pDevice->sKey), (unsigned long)(pDevice->byKeyIndex | (1 << 31)), pDevice->uKeyLength, @@ -2099,7 +2099,7 @@ static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { return 0; } - if (pDevice->bStopTx0Pkt == TRUE) { + if (pDevice->bStopTx0Pkt == true) { dev_kfree_skb_irq(skb); spin_unlock_irq(&pDevice->lock); return 0; @@ -2132,7 +2132,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI // unsigned char byKeyIndex = 0; - if (pDevice->bStopTx0Pkt == TRUE) { + if (pDevice->bStopTx0Pkt == true) { dev_kfree_skb_irq(skb); return FALSE; }; @@ -2205,15 +2205,15 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { byPktType = PK_TYPE_11A; } else { - if (pDevice->bProtectMode == TRUE) { + if (pDevice->bProtectMode == true) { byPktType = PK_TYPE_11GB; } else { byPktType = PK_TYPE_11GA; } } - if (pDevice->bEncryptionEnable == TRUE) - bNeedEncryption = TRUE; + if (pDevice->bEncryptionEnable == true) + bNeedEncryption = true; if (pDevice->bEnableHostWEP) { pTransmitKey = &STempKey; @@ -2263,7 +2263,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI MACvTransmit0(pDevice->PortOffset); - return TRUE; + return true; } //TYPE_AC0DMA data tx @@ -2312,7 +2312,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { } if (is_multicast_ether_addr((unsigned char *)(skb->data))) { uNodeIndex = 0; - bNodeExist = TRUE; + bNodeExist = true; if (pMgmt->sNodeDBTable[0].bPSEnable) { skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb); pMgmt->sNodeDBTable[0].wEnQueueCnt++; @@ -2341,7 +2341,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { }else { pDevice->byPreambleType = PREAMBLE_LONG; } - bNodeExist = TRUE; + bNodeExist = true; } } @@ -2367,8 +2367,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { } - if (pDevice->bEncryptionEnable == TRUE) { - bNeedEncryption = TRUE; + if (pDevice->bEncryptionEnable == true) { + bNeedEncryption = true; // get Transmit key do { if ((pDevice->pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && @@ -2377,8 +2377,8 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { // get pairwise key if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { // get group key - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { - bTKIP_UseGTK = TRUE; + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) { + bTKIP_UseGTK = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); break; } @@ -2395,7 +2395,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n"); // get pairwise key - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == true) break; } // get group key @@ -2408,7 +2408,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { else DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pDevice->pMgmt->eCurrMode); } else { - bTKIP_UseGTK = TRUE; + bTKIP_UseGTK = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); } } while(FALSE); @@ -2416,7 +2416,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) { if (pDevice->bEnableHostWEP) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"acdma0: STA index %d\n", uNodeIndex); - if (pDevice->bEncryptionEnable == TRUE) { + if (pDevice->bEncryptionEnable == true) { pTransmitKey = &STempKey; pTransmitKey->byCipherSuite = pMgmt->sNodeDBTable[uNodeIndex].byCipherSuite; pTransmitKey->dwKeyIndex = pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex; @@ -2524,7 +2524,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); } else if (pDevice->eCurrentPHYType == PHY_TYPE_11A) { byPktType = PK_TYPE_11A; } else { - if (pDevice->bProtectMode == TRUE) { + if (pDevice->bProtectMode == true) { byPktType = PK_TYPE_11GB; } else { byPktType = PK_TYPE_11GA; @@ -2535,7 +2535,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); // printk("FIX RATE:CurrentRate is %d"); //#endif - if (bNeedEncryption == TRUE) { + if (bNeedEncryption == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.wType)); if ((pDevice->sTxEthHeader.wType) == TYPE_PKT_802_1x) { bNeedEncryption = FALSE; @@ -2545,18 +2545,18 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n"); } else { - if (bTKIP_UseGTK == TRUE) { + if (bTKIP_UseGTK == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n"); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); - bNeedEncryption = TRUE; + bNeedEncryption = true; } } } if (pDevice->byCntMeasure == 2) { - bNeedDeAuth = TRUE; + bNeedDeAuth = true; pDevice->s802_11Counter.TKIPCounterMeasuresInvoked++; } @@ -2564,7 +2564,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate); if ((uNodeIndex != 0) && (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex); - bNeedEncryption = TRUE; + bNeedEncryption = true; } } } @@ -2646,11 +2646,11 @@ BOOL bTxeapol_key = FALSE; if (pDevice->sTxEthHeader.wType == TYPE_PKT_802_1x) { if(((Protocol_Version==1) ||(Protocol_Version==2)) && (Packet_Type==3)) { //802.1x OR eapol-key challenge frame transfer - bTxeapol_key = TRUE; + bTxeapol_key = true; if((Descriptor_type==254)||(Descriptor_type==2)) { //WPA or RSN if(!(Key_info & BIT3) && //group-key challenge (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key - pDevice->fWPA_Authened = TRUE; + pDevice->fWPA_Authened = true; if(Descriptor_type==254) printk("WPA "); else @@ -2700,7 +2700,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if ((pDevice->dwIsr & ISR_RXDMA0) && (pDevice->byLocalID != REV_ID_VT3253_B0) && - (pDevice->bBSSIDFilter == TRUE)) { + (pDevice->bBSSIDFilter == true)) { // update RSSI //BBbReadEmbeded(pDevice->PortOffset, 0x3E, &byRSSI); //pDevice->uCurrRSSI = byRSSI; @@ -2749,9 +2749,9 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { VNSvInPortD(pDevice->PortOffset + MAC_REG_MAR4, &(pDevice->dwOrgMAR4)); MACvSelectPage0(pDevice->PortOffset); //xxxx - // WCMDbFlushCommandQueue(pDevice->pMgmt, TRUE); - if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == TRUE) { - pDevice->bMeasureInProgress = TRUE; + // WCMDbFlushCommandQueue(pDevice->pMgmt, true); + if (set_channel(pDevice, pDevice->pCurrMeasureEID->sReq.byChannel) == true) { + pDevice->bMeasureInProgress = true; MACvSelectPage1(pDevice->PortOffset); MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL, MSRCTL_READY); MACvSelectPage0(pDevice->PortOffset); @@ -2806,7 +2806,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { } if (pDevice->dwIsr & ISR_TBTT) { - if (pDevice->bEnableFirstQuiet == TRUE) { + if (pDevice->bEnableFirstQuiet == true) { pDevice->byQuietStartCount--; if (pDevice->byQuietStartCount == 0) { pDevice->bEnableFirstQuiet = FALSE; @@ -2815,7 +2815,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { MACvSelectPage0(pDevice->PortOffset); } } - if ((pDevice->bChannelSwitch == TRUE) && + if ((pDevice->bChannelSwitch == true) && (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE)) { pDevice->byChannelSwitchCount--; if (pDevice->byChannelSwitchCount == 0) { @@ -2832,7 +2832,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if (pDevice->eOPMode == OP_MODE_ADHOC) { //pDevice->bBeaconSent = FALSE; } else { - if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == TRUE) && (pDevice->uCurrRSSI != 0)) { + if ((pDevice->bUpdateBBVGA) && (pDevice->bLinkPass == true) && (pDevice->uCurrRSSI != 0)) { long ldBm; RFvRSSITodBm(pDevice, (unsigned char) pDevice->uCurrRSSI, &ldBm); @@ -2895,14 +2895,14 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { if(pMgmt->byDTIMCount == 0) { // check if mutltcast tx bufferring pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1; - pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[0].bRxPSPoll = true; bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); } } } - pDevice->bBeaconSent = TRUE; + pDevice->bBeaconSent = true; - if (pDevice->bChannelSwitch == TRUE) { + if (pDevice->bChannelSwitch == true) { pDevice->byChannelSwitchCount--; if (pDevice->byChannelSwitchCount == 0) { pDevice->bChannelSwitch = FALSE; @@ -2993,7 +2993,7 @@ static int Config_FileGetParameter(unsigned char *string, source+=strlen(buf1); memcpy(dest,source,source_len-strlen(buf1)); - return TRUE; + return true; } int 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) { goto error1; } -if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=TRUE) { +if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer)!=true) { printk("get parameter error?\n"); result = -1; goto error1; @@ -3565,7 +3565,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { netif_stop_queue(pDevice->dev); #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT pMgmt->eScanType = WMAC_SCAN_ACTIVE; - if(pDevice->bWPASuppWextEnabled !=TRUE) + if(pDevice->bWPASuppWextEnabled !=true) #endif bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); @@ -3708,7 +3708,7 @@ viawget_resume(struct pci_dev *pcid) spin_lock_irq(&pDevice->lock); MACvRestoreContext(pDevice->PortOffset, pDevice->abyMacContext); device_init_registers(pDevice, DEVICE_INIT_DXPL); - if (pMgmt->sNodeDBTable[0].bActive == TRUE) { // Assoc with BSS + if (pMgmt->sNodeDBTable[0].bActive == true) { // Assoc with BSS pMgmt->sNodeDBTable[0].bActive = FALSE; pDevice->bLinkPass = FALSE; if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index c7ffdea..c6ca3bb 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -413,7 +413,7 @@ device_receive_frame ( pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8); //PLICE_DEBUG<- - if (pDevice->bMeasureInProgress == TRUE) { + if (pDevice->bMeasureInProgress == true) { if ((*pbyRsr & RSR_CRCOK) != 0) { pDevice->byBasicMap |= 0x01; } @@ -470,7 +470,7 @@ device_receive_frame ( } if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { - if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == TRUE) { + if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == true) { return FALSE; } } @@ -480,7 +480,7 @@ device_receive_frame ( BOOL bRxDecryOK = FALSE; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n"); - bIsWEP = TRUE; + bIsWEP = true; if ((pDevice->bEnableHostWEP) && (iSANodeIndex >= 0)) { pKey = &STempKey; pKey->byCipherSuite = pMgmt->sNodeDBTable[iSANodeIndex].byCipherSuite; @@ -629,7 +629,7 @@ device_receive_frame ( skb->protocol = htons(ETH_P_802_2); memset(skb->cb, 0, sizeof(skb->cb)); netif_rx(skb); - return TRUE; + return true; } } else { @@ -677,7 +677,7 @@ device_receive_frame ( if (wEtherType == ETH_P_PAE) { //Protocol Type in LLC-Header if(((Protocol_Version==1) ||(Protocol_Version==2)) && (Packet_Type==3)) { //802.1x OR eapol-key challenge frame receive - bRxeapol_key = TRUE; + bRxeapol_key = true; } } } @@ -696,7 +696,7 @@ device_receive_frame ( } } else { - if (pDevice->pMgmt->bInTIMWake == TRUE) { + if (pDevice->pMgmt->bInTIMWake == true) { pDevice->pMgmt->bInTIMWake = FALSE; } } @@ -705,7 +705,7 @@ device_receive_frame ( // Now it only supports 802.11g Infrastructure Mode, and support rate must up to 54 Mbps if (pDevice->bDiversityEnable && (FrameSize>50) && (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) && - (pDevice->bLinkPass == TRUE)) { + (pDevice->bLinkPass == true)) { //printk("device_receive_frame: RxRate is %d\n",*pbyRxRate); BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0); } @@ -732,7 +732,7 @@ device_receive_frame ( // ----------------------------------------------- - if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){ + if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){ unsigned char abyMacHdr[24]; // Only 802.1x packet incoming allowed @@ -747,7 +747,7 @@ device_receive_frame ( if (wEtherType == ETH_P_PAE) { skb->dev = pDevice->apdev; - if (bIsWEP == TRUE) { + if (bIsWEP == true) { // strip IV header(8) memcpy(&abyMacHdr[0], (skb->data + 4), 24); memcpy((skb->data + 4 + cbIVOffset), &abyMacHdr[0], 24); @@ -761,7 +761,7 @@ device_receive_frame ( skb->protocol = htons(ETH_P_802_2); memset(skb->cb, 0, sizeof(skb->cb)); netif_rx(skb); - return TRUE; + return true; } // check if 802.1x authorized @@ -824,7 +824,7 @@ device_receive_frame ( if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) || - (pDevice->bRxMICFail == TRUE)) { + (pDevice->bRxMICFail == true)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n"); pDevice->bRxMICFail = FALSE; //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++; @@ -838,7 +838,7 @@ device_receive_frame ( //2008-0409-07, <Add> by Einsn Liu #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //send event to wpa_supplicant - //if(pDevice->bWPADevEnable == TRUE) + //if(pDevice->bWPADevEnable == true) { union iwreq_data wrqu; struct iw_michaelmicfailure ev; @@ -1014,7 +1014,7 @@ device_receive_frame ( return FALSE; } - return TRUE; + return true; } @@ -1048,7 +1048,7 @@ static BOOL s_bAPModeRxCtl ( &Status ); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDeAuthenBeginSta 1\n"); - return TRUE; + return true; }; if (pMgmt->sNodeDBTable[iSANodeIndex].eNodeState < NODE_ASSOC) { // send deassoc notification @@ -1060,13 +1060,13 @@ static BOOL s_bAPModeRxCtl ( &Status ); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: send vMgrDisassocBeginSta 2\n"); - return TRUE; + return true; }; if (pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable) { // delcare received ps-poll event if (IS_CTL_PSPOLL(pbyFrame)) { - pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true; bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n"); } @@ -1075,7 +1075,7 @@ static BOOL s_bAPModeRxCtl ( // if PW bit off, send out all PS bufferring packets. if (!IS_FC_POWERMGT(pbyFrame)) { pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; - pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true; bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n"); } @@ -1083,15 +1083,15 @@ static BOOL s_bAPModeRxCtl ( } else { if (IS_FC_POWERMGT(pbyFrame)) { - pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = TRUE; + pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = true; // Once if STA in PS state, enable multicast bufferring - pMgmt->sNodeDBTable[0].bPSEnable = TRUE; + pMgmt->sNodeDBTable[0].bPSEnable = true; } else { // clear all pending PS frame. if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) { pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; - pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true; bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n"); @@ -1134,7 +1134,7 @@ static BOOL s_bAPModeRxCtl ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl ); VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byRxMode)); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc:pDevice->byRxMode = %x\n", pDevice->byRxMode ); - return TRUE; + return true; } } } @@ -1184,7 +1184,7 @@ static BOOL s_bHandleRxEncryption ( (pDevice->pMgmt->byCSSPK != KEY_CTL_NONE)) { // unicast pkt use pairwise key DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n"); - if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == TRUE) { + if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == true) { if (pDevice->pMgmt->byCSSPK == KEY_CTL_TKIP) byDecMode = KEY_CTL_TKIP; else if (pDevice->pMgmt->byCSSPK == KEY_CTL_CCMP) @@ -1218,7 +1218,7 @@ static BOOL s_bHandleRxEncryption ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n"); if (byDecMode == KEY_CTL_WEP) { // pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; - } else if (pDevice->bLinkPass == TRUE) { + } else if (pDevice->bLinkPass == true) { // pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; } return FALSE; @@ -1226,7 +1226,7 @@ static BOOL s_bHandleRxEncryption ( if (byDecMode != pKey->byCipherSuite) { if (byDecMode == KEY_CTL_WEP) { // pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; - } else if (pDevice->bLinkPass == TRUE) { + } else if (pDevice->bLinkPass == true) { // pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; } *pKeyOut = NULL; @@ -1235,7 +1235,7 @@ static BOOL s_bHandleRxEncryption ( if (byDecMode == KEY_CTL_WEP) { // handle WEP if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || - (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE)) { + (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true)) { // Software WEP // 1. 3253A // 2. WEP 256 @@ -1283,8 +1283,8 @@ static BOOL s_bHandleRxEncryption ( }// end of TKIP/AES if ((*(pbyIV+3) & 0x20) != 0) - *pbExtIV = TRUE; - return TRUE; + *pbExtIV = true; + return true; } @@ -1333,7 +1333,7 @@ static BOOL s_bHostWepRxEncryption ( if (byDecMode != pKey->byCipherSuite) { if (byDecMode == KEY_CTL_WEP) { // pDevice->s802_11Counter.WEPUndecryptableCount.QuadPart++; - } else if (pDevice->bLinkPass == TRUE) { + } else if (pDevice->bLinkPass == true) { // pDevice->s802_11Counter.DecryptFailureCount.QuadPart++; } return FALSE; @@ -1343,7 +1343,7 @@ static BOOL s_bHostWepRxEncryption ( // handle WEP DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byDecMode == KEY_CTL_WEP \n"); if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || - (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == TRUE) || + (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true) || (bOnFly == FALSE)) { // Software WEP // 1. 3253A @@ -1413,8 +1413,8 @@ static BOOL s_bHostWepRxEncryption ( }// end of TKIP/AES if ((*(pbyIV+3) & 0x20) != 0) - *pbExtIV = TRUE; - return TRUE; + *pbExtIV = true; + return true; } @@ -1461,7 +1461,7 @@ static BOOL s_bAPModeRxData ( } } else { - bRelayAndForward = TRUE; + bRelayAndForward = true; } } else { @@ -1480,10 +1480,10 @@ static BOOL s_bAPModeRxData ( pMgmt->abyPSTxMap[wAID >> 3] |= byMask[wAID & 7]; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "relay: index= %d, pMgmt->abyPSTxMap[%d]= %d\n", iDANodeIndex, (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]); - return TRUE; + return true; } else { - bRelayOnly = TRUE; + bRelayOnly = true; } } }; @@ -1505,6 +1505,6 @@ static BOOL s_bAPModeRxData ( if (pDevice->uAssocCount == 0) return FALSE; - return TRUE; + return true; } diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index ef36394..865e0f6 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, * pDevice - * param - * Out: - * TURE, FALSE + * true, FALSE * * Return Value: * @@ -520,7 +520,7 @@ static int hostap_set_encryption(PSDevice pDevice, if (param->u.crypt.alg == WPA_ALG_NONE) { - if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == TRUE) { + if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) { if (KeybRemoveKey(&(pDevice->sKey), param->sta_addr, pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex, @@ -556,7 +556,7 @@ static int hostap_set_encryption(PSDevice pDevice, dwKeyIndex = (unsigned long)(param->u.crypt.idx); if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) { pDevice->byKeyIndex = (unsigned char)dwKeyIndex; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } @@ -583,18 +583,18 @@ static int hostap_set_encryption(PSDevice pDevice, (unsigned char *)abyKey, KEY_CTL_WEP, pDevice->PortOffset, - pDevice->byLocalID) == TRUE) { + pDevice->byLocalID) == true) { - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { // Key Table Full pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; - bKeyTableFull = TRUE; + bKeyTableFull = true; } } pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; pMgmt->byCSSPK = KEY_CTL_WEP; pMgmt->byCSSGK = KEY_CTL_WEP; pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = KEY_CTL_WEP; @@ -640,7 +640,7 @@ static int hostap_set_encryption(PSDevice pDevice, byKeyDecMode, pDevice->PortOffset, pDevice->byLocalID); - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { dwKeyIndex |= (1 << 30); // set pairwise key @@ -652,20 +652,20 @@ static int hostap_set_encryption(PSDevice pDevice, (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, - pDevice->byLocalID) == TRUE) { + pDevice->byLocalID) == true) { - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { // Key Table Full pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; - bKeyTableFull = TRUE; + bKeyTableFull = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Key Table Full\n"); } } - if (bKeyTableFull == TRUE) { + if (bKeyTableFull == true) { wKeyCtl &= 0x7F00; // clear all key control filed wKeyCtl |= (byKeyDecMode << 4); wKeyCtl |= (byKeyDecMode); @@ -686,7 +686,7 @@ static int hostap_set_encryption(PSDevice pDevice, ); // set wep key - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; pMgmt->sNodeDBTable[iNodeIndex].byCipherSuite = byKeyDecMode; pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = dwKeyIndex; pMgmt->sNodeDBTable[iNodeIndex].dwTSC47_16 = 0; diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 94c981b..e0812af 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) { memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN); } - if (pDevice->bMACSuspend == TRUE) { - if (pDevice->bRadioOff == TRUE) + if (pDevice->bMACSuspend == true) { + if (pDevice->bRadioOff == true) CARDbRadioPowerOn(pDevice); vMgrTimerInit(pDevice); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); @@ -130,7 +130,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; }; - if(sZoneTypeCmd.bWrite==TRUE) { + if(sZoneTypeCmd.bWrite==true) { //////write zonetype if(sZoneTypeCmd.ZoneType == ZoneType_USA) { //set to USA @@ -174,8 +174,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_BSS_JOIN: - if (pDevice->bMACSuspend == TRUE) { - if (pDevice->bRadioOff == TRUE) + if (pDevice->bMACSuspend == true) { + if (pDevice->bRadioOff == true) CARDbRadioPowerOn(pDevice); vMgrTimerInit(pDevice); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); @@ -199,7 +199,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ioct set to STA mode\n"); } - if (sJoinCmd.bPSEnable == TRUE) { + if (sJoinCmd.bPSEnable == true) { pDevice->ePSMode = WMAC_POWER_FAST; // pDevice->ePSMode = WMAC_POWER_MAX; pMgmt->wListenInterval = 2; @@ -211,8 +211,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Power Saving Off \n"); } - if (sJoinCmd.bShareKeyAuth == TRUE){ - pMgmt->bShareKeyAlgorithm = TRUE; + if (sJoinCmd.bShareKeyAuth == true){ + pMgmt->bShareKeyAlgorithm = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); } else { @@ -235,7 +235,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { result = -EFAULT; break; }; - if (sWEPCmd.bEnableWep != TRUE) { + if (sWEPCmd.bEnableWep != true) { pDevice->bEncryptionEnable = FALSE; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; MACvDisableDefaultKey(pDevice->PortOffset); @@ -264,8 +264,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { } } pDevice->byKeyIndex = sWEPCmd.byKeyIndex; - pDevice->bTransmitKey = TRUE; - pDevice->bEncryptionEnable = TRUE; + pDevice->bTransmitKey = true; + pDevice->bEncryptionEnable = true; pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; break; @@ -286,8 +286,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { sLinkStatus.byState = ADHOC_STARTED; sLinkStatus.uChannel = pMgmt->uCurrChannel; - if (pDevice->bLinkPass == TRUE) { - sLinkStatus.bLink = TRUE; + if (pDevice->bLinkPass == true) { + sLinkStatus.bLink = true; pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; memcpy(sLinkStatus.abySSID, pItemSSID->abySSID, pItemSSID->len); memcpy(sLinkStatus.abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN); @@ -353,7 +353,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { pList->sBSSIDList[ii].byNetType = ADHOC; } if (WLAN_GET_CAP_INFO_PRIVACY(pBSS->wCapInfo)) { - pList->sBSSIDList[ii].bWEPOn = TRUE; + pList->sBSSIDList[ii].bWEPOn = true; } else { pList->sBSSIDList[ii].bWEPOn = FALSE; @@ -400,7 +400,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { del_timer(&pDevice->sTimerCommand); del_timer(&pMgmt->sTimerSecondCallback); pDevice->bCmdRunning = FALSE; - pDevice->bMACSuspend = TRUE; + pDevice->bMACSuspend = true; MACvIntDisable(pDevice->PortOffset); spin_unlock_irq(&pDevice->lock); @@ -410,8 +410,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_START_MAC\n"); - if (pDevice->bMACSuspend == TRUE) { - if (pDevice->bRadioOff == TRUE) + if (pDevice->bMACSuspend == true) { + if (pDevice->bRadioOff == true) CARDbRadioPowerOn(pDevice); vMgrTimerInit(pDevice); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); @@ -458,7 +458,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { }; if (sValue.dwValue == 1) { - pDevice->bEnable8021x = TRUE; + pDevice->bEnable8021x = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable 802.1x\n"); } else { @@ -478,7 +478,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { }; if (sValue.dwValue == 1) { - pDevice->bEnableHostWEP = TRUE; + pDevice->bEnableHostWEP = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable HostWEP\n"); } else { @@ -498,7 +498,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { if (sValue.dwValue == 1) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "up wpadev\n"); memcpy(pDevice->wpadev->dev_addr, pDevice->dev->dev_addr, ETH_ALEN); - pDevice->bWPADEVUp = TRUE; + pDevice->bWPADEVUp = true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "close wpadev\n"); @@ -510,7 +510,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { case WLAN_CMD_AP_START: DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_AP_START\n"); - if (pDevice->bRadioOff == TRUE) { + if (pDevice->bRadioOff == true) { CARDbRadioPowerOn(pDevice); vMgrTimerInit(pDevice); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); @@ -554,8 +554,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { else pMgmt->wIBSSBeaconPeriod = 100; - if (sStartAPCmd.bShareKeyAuth == TRUE){ - pMgmt->bShareKeyAlgorithm = TRUE; + if (sStartAPCmd.bShareKeyAuth == true){ + pMgmt->bShareKeyAlgorithm = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Share Key \n"); } else { @@ -679,7 +679,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { break; } -if(wpa_Result.authenticated==TRUE) { +if(wpa_Result.authenticated==true) { #ifdef SndEvt_ToAPI { union iwreq_data wrqu; @@ -692,7 +692,7 @@ if(wpa_Result.authenticated==TRUE) { wireless_send_event(pDevice->dev, IWEVCUSTOM, &wrqu, pItemSSID->abySSID); } #endif - pDevice->fWPA_Authened = TRUE; //is successful peer to wpa_Result.authenticated? + pDevice->fWPA_Authened = true; //is successful peer to wpa_Result.authenticated? } //printk("get private wpa_supplicant announce WPA SM\n"); @@ -700,7 +700,7 @@ if(wpa_Result.authenticated==TRUE) { //printk("wpa-->proto=%d\n",wpa_Result.proto); //printk("wpa-->key-mgmt=%d\n",wpa_Result.key_mgmt); //printk("wpa-->eap_type=%d\n",wpa_Result.eap_type); - //printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==TRUE)?"TRUE":"FALSE"); + //printk("wpa-->authenticated is %s\n",(wpa_Result.authenticated==true)?"true":"FALSE"); pReq->wResult = 0; break; @@ -728,7 +728,7 @@ vConfigWEPKey ( memset(&pDevice->abyWepKey[dwKeyIndex][0], 0, WLAN_WEPMAX_KEYLEN); memcpy(&pDevice->abyWepKey[dwKeyIndex][0], pbyKey, uKeyLength); - pDevice->bWepKeyAvailable[dwKeyIndex] = TRUE; + pDevice->bWepKeyAvailable[dwKeyIndex] = true; pDevice->auWepKeyLength[dwKeyIndex] = uKeyLength; MACvSetDefaultKeyEntry(pDevice->PortOffset, uKeyLength, dwKeyIndex, @@ -736,7 +736,7 @@ vConfigWEPKey ( if (pDevice->eEncryptionStatus < Ndis802_11EncryptionNotSupported) { for(ii=0; ii<MAX_GROUP_KEY; ii++) { - if ((pDevice->bWepKeyAvailable[ii] == TRUE) && + if ((pDevice->bWepKeyAvailable[ii] == true) && (pDevice->auWepKeyLength[ii] == WLAN_WEP232_KEYLEN)) { pDevice->uCurrentWEPMode = TX_WEP_SW232; MACvDisableDefaultKey(pDevice->PortOffset); diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 6a713e2..7aca978 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) else pDevice->scStatistic.LinkQuality = (96-pDevice->byCurrSQ)*100/76; } - if(pDevice->bLinkPass !=TRUE) + if(pDevice->bLinkPass !=true) pDevice->scStatistic.LinkQuality = 0; #endif if(pDevice->scStatistic.LinkQuality > 100) @@ -426,7 +426,7 @@ int iwctl_siwfreq(struct net_device *dev, pDevice->uChannel = channel; //2007-0207-04,<Add> by EinsnLiu //Make change effect at once - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } } @@ -489,7 +489,7 @@ int iwctl_siwmode(struct net_device *dev, if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) { pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA; if (pDevice->flags & DEVICE_FLAGS_OPENED) { - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc \n"); @@ -499,7 +499,7 @@ int iwctl_siwmode(struct net_device *dev, if (pMgmt->eConfigMode != WMAC_CONFIG_ESS_STA) { pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA; if (pDevice->flags & DEVICE_FLAGS_OPENED) { - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure \n"); @@ -513,7 +513,7 @@ int iwctl_siwmode(struct net_device *dev, if (pMgmt->eConfigMode != WMAC_CONFIG_AP) { pMgmt->eConfigMode = WMAC_CONFIG_AP; if (pDevice->flags & DEVICE_FLAGS_OPENED) { - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to Access Point \n"); @@ -701,7 +701,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { else { memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6); //2008-0409-05, <Add> by Einsn Liu - if((pDevice->bLinkPass == TRUE) && + if((pDevice->bLinkPass == true) && (memcmp(pMgmt->abyDesireBSSID, pMgmt->abyCurrBSSID, 6)== 0)){ return rc; } @@ -728,7 +728,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } if (pDevice->flags & DEVICE_FLAGS_OPENED) { - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } } return rc; @@ -848,7 +848,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { PRINT_K("set essid to 'any' \n"); #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //Unknown desired AP,so here need not associate?? - //if(pDevice->bWPASuppWextEnabled == TRUE) { + //if(pDevice->bWPASuppWextEnabled == true) { return 0; // } #endif @@ -868,7 +868,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { printk("set essid to %s \n",pItemSSID->abySSID); //2008-0409-05, <Add> by Einsn Liu len=(pItemSSID->len > ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len)?pItemSSID->len:((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len; - if((pDevice->bLinkPass == TRUE) && + if((pDevice->bLinkPass == true) && (memcmp(pItemSSID->abySSID,((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,len)==0)) return 0; @@ -881,7 +881,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT //Wext wil order another command of siwap to link with desired AP, //so here need not associate?? - if(pDevice->bWPASuppWextEnabled == TRUE) { + if(pDevice->bWPASuppWextEnabled == true) { /*******search if in hidden ssid mode ****/ { PKnownBSS pCurr = NULL; @@ -927,7 +927,7 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } if (pDevice->flags & DEVICE_FLAGS_OPENED) { - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } @@ -1033,7 +1033,7 @@ int iwctl_siwrate(struct net_device *dev, // Fixed mode // One rate, fixed printk("Rate Fix\n"); - pDevice->bFixRate = TRUE; + pDevice->bFixRate = true; if ((pDevice->byBBType == BB_TYPE_11B)&& (brate > 3)) { pDevice->uConnectionRate = 3; } @@ -1072,7 +1072,7 @@ int iwctl_giwrate(struct net_device *dev, int brate = 0; //2008-5-8 <modify> by chester if(pDevice->bLinkPass){ -if(pDevice->bFixRate == TRUE){ +if(pDevice->bFixRate == true){ if (pDevice->uConnectionRate < 13) { brate = abySupportedRates[pDevice->uConnectionRate]; }else { @@ -1108,8 +1108,8 @@ else brate =0; // brate = abySupportedRates[pDevice->wCurrentRate]; wrq->value = brate * 500000; // If more than one rate, set auto - if (pDevice->bFixRate == TRUE) - wrq->fixed = TRUE; + if (pDevice->bFixRate == true) + wrq->fixed = true; } @@ -1370,8 +1370,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ } pDevice->byKeyIndex = (unsigned char)dwKeyIndex; pDevice->uKeyLength = wrq->length; - pDevice->bTransmitKey = TRUE; - pDevice->bEncryptionEnable = TRUE; + pDevice->bTransmitKey = true; + pDevice->bEncryptionEnable = true; pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; }else if(index>0){ @@ -1462,8 +1462,8 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ } pDevice->byKeyIndex = (unsigned char)dwKeyIndex; pDevice->uKeyLength = wrq->length; - pDevice->bTransmitKey = TRUE; - pDevice->bEncryptionEnable = TRUE; + pDevice->bTransmitKey = true; + pDevice->bEncryptionEnable = true; pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; // Do we want to just set the transmit key index ? @@ -1493,7 +1493,7 @@ if((wrq->flags & IW_ENCODE_DISABLED)==0){ if(wrq->flags & IW_ENCODE_RESTRICTED) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n"); - pMgmt->bShareKeyAlgorithm = TRUE; + pMgmt->bShareKeyAlgorithm = true; } if(wrq->flags & IW_ENCODE_OPEN) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n"); @@ -1729,7 +1729,7 @@ int iwctl_giwsens(struct net_device *dev, long ldBm; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { RFvRSSITodBm(pDevice, (unsigned char)(pDevice->uCurrRSSI), &ldBm); wrq->value = ldBm; } @@ -1771,7 +1771,7 @@ int iwctl_siwauth(struct net_device *dev, else { PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n"); } - //pDevice->bWPASuppWextEnabled =TRUE; + //pDevice->bWPASuppWextEnabled =true; break; case IW_AUTH_CIPHER_PAIRWISE: pairwise = wrq->value; @@ -1820,7 +1820,7 @@ int iwctl_siwauth(struct net_device *dev, if(wrq->value==IW_AUTH_ALG_OPEN_SYSTEM){ pMgmt->bShareKeyAlgorithm=FALSE; }else if(wrq->value==IW_AUTH_ALG_SHARED_KEY){ - pMgmt->bShareKeyAlgorithm=TRUE; + pMgmt->bShareKeyAlgorithm=true; } break; case IW_AUTH_WPA_ENABLED: @@ -1852,9 +1852,9 @@ int iwctl_siwauth(struct net_device *dev, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pairwise = %d\n",pairwise); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->eEncryptionStatus = %d\n",pDevice->eEncryptionStatus); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->eAuthenMode = %d\n",pMgmt->eAuthenMode); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"TRUE":"FALSE"); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"TRUE":"FALSE"); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"TRUE":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pMgmt->bShareKeyAlgorithm = %s\n",pMgmt->bShareKeyAlgorithm?"true":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bEncryptionEnable = %s\n",pDevice->bEncryptionEnable?"true":"FALSE"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->bWPADevEnable = %s\n",pDevice->bWPADevEnable?"true":"FALSE"); */ return ret; } @@ -2055,12 +2055,12 @@ if(param->u.wpa_key.alg_name == WPA_ALG_NONE) { if( pDevice->bwextcount == 4) { printk("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n"); pDevice->bwextcount=0; - pDevice->bWPASuppWextEnabled = TRUE; + pDevice->bWPASuppWextEnabled = true; } //****** spin_lock_irq(&pDevice->lock); - ret = wpa_set_keys(pDevice, param, TRUE); + ret = wpa_set_keys(pDevice, param, true); spin_unlock_irq(&pDevice->lock); error: @@ -2099,7 +2099,7 @@ int iwctl_siwmlme(struct net_device *dev, //bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (unsigned char *)&reason); break; case IW_MLME_DISASSOC: - if(pDevice->bLinkPass == TRUE){ + if(pDevice->bLinkPass == true){ printk("iwctl_siwmlme--->send DISASSOCIATE\n"); //clear related flags memset(pMgmt->abyDesireBSSID, 0xFF,6); diff --git a/drivers/staging/vt6655/key.c b/drivers/staging/vt6655/key.c index 490f653..d61b493 100644 --- a/drivers/staging/vt6655/key.c +++ b/drivers/staging/vt6655/key.c @@ -64,7 +64,7 @@ s_vCheckKeyTableValid (PSKeyManagement pTable, unsigned long dwIoBase) int i; for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && (pTable->KeyTable[i].PairwiseKey.bKeyValid == FALSE) && (pTable->KeyTable[i].GroupKey[0].bKeyValid == FALSE) && (pTable->KeyTable[i].GroupKey[1].bKeyValid == FALSE) && @@ -128,7 +128,7 @@ void KeyvInitTable (PSKeyManagement pTable, unsigned long dwIoBase) * Out: * pKey - Key return * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise FALSE * */ BOOL KeybGetKey ( @@ -144,20 +144,20 @@ BOOL KeybGetKey ( *pKey = NULL; for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { if (dwKeyIndex == 0xFFFFFFFF) { - if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { + if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) { *pKey = &(pTable->KeyTable[i].PairwiseKey); - return (TRUE); + return (true); } else { return (FALSE); } } else if (dwKeyIndex < MAX_GROUP_KEY) { - if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == TRUE) { + if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) { *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]); - return (TRUE); + return (true); } else { return (FALSE); @@ -186,7 +186,7 @@ BOOL KeybGetKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ BOOL KeybSetKey ( @@ -215,7 +215,7 @@ BOOL KeybSetKey ( // found empty table j = i; } - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { // found table already exist if ((dwKeyIndex & PAIRWISE_KEY) != 0) { @@ -241,7 +241,7 @@ BOOL KeybSetKey ( } pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -277,12 +277,12 @@ BOOL KeybSetKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); - return (TRUE); + return (true); } } if (j < (MAX_KEY_TABLE-1)) { memcpy(pTable->KeyTable[j].abyBSSID,pbyBSSID,ETH_ALEN); - pTable->KeyTable[j].bInUse = TRUE; + pTable->KeyTable[j].bInUse = true; if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key pKey = &(pTable->KeyTable[j].PairwiseKey); @@ -306,7 +306,7 @@ BOOL KeybSetKey ( } pTable->KeyTable[j].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -342,7 +342,7 @@ BOOL KeybSetKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex); - return (TRUE); + return (true); } return (FALSE); } @@ -359,7 +359,7 @@ BOOL KeybSetKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ BOOL KeybRemoveKey ( @@ -378,7 +378,7 @@ BOOL KeybRemoveKey ( pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; } s_vCheckKeyTableValid(pTable, dwIoBase); - return TRUE; + return true; } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { for (i=0;i<MAX_KEY_TABLE;i++) { @@ -389,7 +389,7 @@ BOOL KeybRemoveKey ( } } s_vCheckKeyTableValid(pTable, dwIoBase); - return TRUE; + return true; } else { return FALSE; @@ -397,12 +397,12 @@ BOOL KeybRemoveKey ( } for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { if ((dwKeyIndex & PAIRWISE_KEY) != 0) { pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; s_vCheckKeyTableValid(pTable, dwIoBase); - return (TRUE); + return (true); } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; @@ -411,7 +411,7 @@ BOOL KeybRemoveKey ( pTable->KeyTable[i].dwGTKeyIndex = 0; } s_vCheckKeyTableValid(pTable, dwIoBase); - return (TRUE); + return (true); } else { return (FALSE); @@ -432,7 +432,7 @@ BOOL KeybRemoveKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ BOOL KeybRemoveAllKey ( @@ -444,7 +444,7 @@ BOOL KeybRemoveAllKey ( int i,u; for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; for(u=0;u<MAX_GROUP_KEY;u++) { @@ -452,7 +452,7 @@ BOOL KeybRemoveAllKey ( } pTable->KeyTable[i].dwGTKeyIndex = 0; s_vCheckKeyTableValid(pTable, dwIoBase); - return (TRUE); + return (true); } } return (FALSE); @@ -467,7 +467,7 @@ BOOL KeybRemoveAllKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ void KeyvRemoveWEPKey ( @@ -478,7 +478,7 @@ void KeyvRemoveWEPKey ( { if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { - if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == TRUE) { + if (pTable->KeyTable[MAX_KEY_TABLE-1].bInUse == true) { if (pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].byCipherSuite == KEY_CTL_WEP) { pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) { @@ -514,7 +514,7 @@ void KeyvRemoveAllWEPKey ( * Out: * pKey - Key return * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise FALSE * */ BOOL KeybGetTransmitKey ( @@ -528,12 +528,12 @@ BOOL KeybGetTransmitKey ( *pKey = NULL; for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && + if ((pTable->KeyTable[i].bInUse == true) && !compare_ether_addr(pTable->KeyTable[i].abyBSSID, pbyBSSID)) { if (dwKeyType == PAIRWISE_KEY) { - if (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE) { + if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) { *pKey = &(pTable->KeyTable[i].PairwiseKey); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); @@ -544,7 +544,7 @@ BOOL KeybGetTransmitKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - return (TRUE); + return (true); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n"); @@ -556,7 +556,7 @@ BOOL KeybGetTransmitKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n"); return FALSE; } - if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == TRUE) { + if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == true) { *pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:"); @@ -567,7 +567,7 @@ BOOL KeybGetTransmitKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex); - return (TRUE); + return (true); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n"); @@ -594,7 +594,7 @@ BOOL KeybGetTransmitKey ( * Out: * none * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise FALSE * */ BOOL KeybCheckPairewiseKey ( @@ -606,10 +606,10 @@ BOOL KeybCheckPairewiseKey ( *pKey = NULL; for (i=0;i<MAX_KEY_TABLE;i++) { - if ((pTable->KeyTable[i].bInUse == TRUE) && - (pTable->KeyTable[i].PairwiseKey.bKeyValid == TRUE)) { + if ((pTable->KeyTable[i].bInUse == true) && + (pTable->KeyTable[i].PairwiseKey.bKeyValid == true)) { *pKey = &(pTable->KeyTable[i].PairwiseKey); - return (TRUE); + return (true); } } return (FALSE); @@ -628,7 +628,7 @@ BOOL KeybCheckPairewiseKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ BOOL KeybSetDefaultKey ( @@ -655,7 +655,7 @@ BOOL KeybSetDefaultKey ( return (FALSE); } - pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = TRUE; + pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = true; for(ii=0;ii<ETH_ALEN;ii++) pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF; @@ -676,13 +676,13 @@ BOOL KeybSetDefaultKey ( if ((uKeyLength == WLAN_WEP232_KEYLEN) && (byKeyDecMode == KEY_CTL_WEP)) { pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000; // disable on-fly disable address match - pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = TRUE; + pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = true; } else { if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == FALSE) pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000; // enable on-fly disable address match } - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -718,7 +718,7 @@ BOOL KeybSetDefaultKey ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex); - return (TRUE); + return (true); } @@ -735,7 +735,7 @@ BOOL KeybSetDefaultKey ( * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise FALSE * */ BOOL KeybSetAllGroupKey ( @@ -764,7 +764,7 @@ BOOL KeybSetAllGroupKey ( } for (i=0; i < MAX_KEY_TABLE-1; i++) { - if (pTable->KeyTable[i].bInUse == TRUE) { + if (pTable->KeyTable[i].bInUse == true) { // found table already exist // Group key pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]); @@ -781,7 +781,7 @@ BOOL KeybSetAllGroupKey ( pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -817,7 +817,7 @@ BOOL KeybSetAllGroupKey ( //DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0)); //DBG_PRN_GRP12(("pKey->dwKeyIndex: %lX\n ", pKey->dwKeyIndex)); - } // (pTable->KeyTable[i].bInUse == TRUE) + } // (pTable->KeyTable[i].bInUse == true) } - return (TRUE); + return (true); } diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index 48bfbf8..4f46f48 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) * Out: * none * - * Return Value: TRUE if all test bits On; otherwise FALSE + * Return Value: true if all test bits On; otherwise FALSE * */ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits) @@ -160,7 +160,7 @@ BOOL MACbIsRegBitsOn (unsigned long dwIoBase, unsigned char byRegOfs, unsigned c * Out: * none * - * Return Value: TRUE if all test bits Off; otherwise FALSE + * Return Value: true if all test bits Off; otherwise FALSE * */ BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned char byTestBits) @@ -181,7 +181,7 @@ BOOL MACbIsRegBitsOff (unsigned long dwIoBase, unsigned char byRegOfs, unsigned * Out: * none * - * Return Value: TRUE if interrupt is disable; otherwise FALSE + * Return Value: true if interrupt is disable; otherwise FALSE * */ BOOL MACbIsIntDisable (unsigned long dwIoBase) @@ -192,7 +192,7 @@ BOOL MACbIsIntDisable (unsigned long dwIoBase) if (dwData != 0) return FALSE; - return TRUE; + return true; } /* @@ -556,7 +556,7 @@ void MACvSetLoopbackMode (unsigned long dwIoBase, unsigned char byLoopbackMode) * Out: * none * - * Return Value: TRUE if in Loopback mode; otherwise FALSE + * Return Value: true if in Loopback mode; otherwise FALSE * */ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase) @@ -565,7 +565,7 @@ BOOL MACbIsInLoopbackMode (unsigned long dwIoBase) VNSvInPortB(dwIoBase + MAC_REG_TEST, &byOrgValue); if (byOrgValue & (TEST_LBINT | TEST_LBEXT)) - return TRUE; + return true; return FALSE; } @@ -725,7 +725,7 @@ void MACvRestoreContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) * Out: * none * - * Return Value: TRUE if all values are the same; otherwise FALSE + * Return Value: true if all values are the same; otherwise FALSE * */ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) @@ -733,7 +733,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) unsigned long dwData; // compare MAC context to determine if this is a power lost init, - // return TRUE for power remaining init, return FALSE for power lost init + // return true for power remaining init, return FALSE for power lost init // compare CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR VNSvInPortD(dwIoBase + MAC_REG_TXDMAPTR0, &dwData); @@ -757,7 +757,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) } - return TRUE; + return true; } /* @@ -770,7 +770,7 @@ BOOL MACbCompareContext (unsigned long dwIoBase, unsigned char *pbyCxtBuf) * Out: * none * - * Return Value: TRUE if Reset Success; otherwise FALSE + * Return Value: true if Reset Success; otherwise FALSE * */ BOOL MACbSoftwareReset (unsigned long dwIoBase) @@ -789,7 +789,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase) } if (ww == W_MAX_TIMEOUT) return FALSE; - return TRUE; + return true; } @@ -803,7 +803,7 @@ BOOL MACbSoftwareReset (unsigned long dwIoBase) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase) @@ -836,7 +836,7 @@ BOOL MACbSafeSoftwareReset (unsigned long dwIoBase) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL MACbSafeRxOff (unsigned long dwIoBase) @@ -884,7 +884,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x12)\n"); return(FALSE); } - return TRUE; + return true; } /* @@ -897,7 +897,7 @@ BOOL MACbSafeRxOff (unsigned long dwIoBase) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL MACbSafeTxOff (unsigned long dwIoBase) @@ -948,7 +948,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x24)\n"); return(FALSE); } - return TRUE; + return true; } /* @@ -961,7 +961,7 @@ BOOL MACbSafeTxOff (unsigned long dwIoBase) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL MACbSafeStop (unsigned long dwIoBase) @@ -983,7 +983,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase) MACvRegBitsOff(dwIoBase, MAC_REG_HOSTCR, HOSTCR_MACEN); - return TRUE; + return true; } /* @@ -996,7 +996,7 @@ BOOL MACbSafeStop (unsigned long dwIoBase) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL MACbShutdown (unsigned long dwIoBase) @@ -1010,7 +1010,7 @@ BOOL MACbShutdown (unsigned long dwIoBase) return FALSE; } MACvSetLoopbackMode(dwIoBase, MAC_LB_NONE); - return TRUE; + return true; } /* @@ -1045,7 +1045,7 @@ void MACvInitialize (unsigned long dwIoBase) // issue AUTOLD in EECSR to reload eeprom //MACvRegBitsOn(dwIoBase, MAC_REG_I2MCSR, I2MCSR_AUTOLD); // wait until EEPROM loading complete - //while (TRUE) { + //while (true) { // u8 u8Data; // VNSvInPortB(dwIoBase + MAC_REG_I2MCSR, &u8Data); // if ( !(u8Data & I2MCSR_AUTOLD)) @@ -1344,7 +1344,7 @@ unsigned int ww = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x29)\n"); return FALSE; } - return TRUE; + return true; } void MACvClearBusSusInd (unsigned long dwIoBase) @@ -1412,7 +1412,7 @@ BOOL MACbFlushSYNCFifo (unsigned long dwIoBase) DBG_PORT80(0x35); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); } - return TRUE; + return true; } BOOL MACbPSWakeup (unsigned long dwIoBase) @@ -1421,7 +1421,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase) unsigned int ww; // Read PSCTL if (MACbIsRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PS)) { - return TRUE; + return true; } // Disable PS MACvRegBitsOff(dwIoBase, MAC_REG_PSCTL, PSCTL_PSEN); @@ -1437,7 +1437,7 @@ BOOL MACbPSWakeup (unsigned long dwIoBase) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" DBG_PORT80(0x33)\n"); return FALSE; } - return TRUE; + return true; } /* diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index 3debc89..f191f87 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -115,7 +115,7 @@ PSvEnablePowerSaving( // enable power saving hw function MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PSEN); - pDevice->bEnablePSMode = TRUE; + pDevice->bEnablePSMode = true; if (pDevice->eOPMode == OP_MODE_ADHOC) { // bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); @@ -124,7 +124,7 @@ PSvEnablePowerSaving( else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) { PSbSendNullPacket(pDevice); } - pDevice->bPWBitOn = TRUE; + pDevice->bPWBitOn = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n"); return; } @@ -177,7 +177,7 @@ PSvDisablePowerSaving( * Consider to power down when no more packets to tx or rx. * * Return Value: - * TRUE, if power down success + * true, if power down success * FALSE, if fail -*/ @@ -195,7 +195,7 @@ PSbConsiderPowerDown( // check if already in Doze mode if (MACbIsRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_PS)) - return TRUE; + return true; if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { // check if in TIM wake period @@ -233,7 +233,7 @@ PSbConsiderPowerDown( // no Tx, no Rx isr, now go to Doze MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_GO2DOZE); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); - return TRUE; + return true; } @@ -369,7 +369,7 @@ PSbSendNullPacket( } - return TRUE ; + return true ; } /*+ @@ -402,7 +402,7 @@ PSbIsNextTBTTWakeUp( if (pMgmt->wCountToWakeUp == 1) { // Turn on wake up to listen next beacon MACvRegBitsOn(pDevice->PortOffset, MAC_REG_PSCTL, PSCTL_LNBCN); - bWakeUp = TRUE; + bWakeUp = true; } } diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c index b4d76fe..6069d4a 100644 --- a/drivers/staging/vt6655/rf.c +++ b/drivers/staging/vt6655/rf.c @@ -471,7 +471,7 @@ const unsigned long dwAL7230ChannelTable2[CB_MAX_CHANNEL] = { * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL s_bAL7230Init (unsigned long dwIoBase) @@ -479,7 +479,7 @@ BOOL s_bAL7230Init (unsigned long dwIoBase) int ii; BOOL bResult; - bResult = TRUE; + bResult = true; //3-wire control for normal mode VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0); @@ -521,7 +521,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) { BOOL bResult; - bResult = TRUE; + bResult = true; // PLLON Off MACvWordRegBitsOff(dwIoBase, MAC_REG_SOFTPWRCTL, SOFTPWRCTL_SWPE3); @@ -552,7 +552,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -567,7 +567,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -585,7 +585,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -599,7 +599,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -619,7 +619,7 @@ BOOL s_bAL7230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) @@ -640,7 +640,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) // DBG_PORT80_ALWAYS(0x32); return FALSE; } - return TRUE; + return true; } @@ -654,7 +654,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -668,7 +668,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -681,7 +681,7 @@ BOOL IFRFbWriteEmbeded (unsigned long dwIoBase, unsigned long dwData) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL RFbAL2230Init (unsigned long dwIoBase) @@ -689,7 +689,7 @@ BOOL RFbAL2230Init (unsigned long dwIoBase) int ii; BOOL bResult; - bResult = TRUE; + bResult = true; //3-wire control for normal mode VNSvOutPortB(dwIoBase + MAC_REG_SOFTPWRCTL, 0); @@ -738,7 +738,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) { BOOL bResult; - bResult = TRUE; + bResult = true; bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable0[byChannel-1]); bResult &= IFRFbWriteEmbeded (dwIoBase, dwAL2230ChannelTable1[byChannel-1]); @@ -761,7 +761,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -776,7 +776,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -790,7 +790,7 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -804,14 +804,14 @@ BOOL RFbAL2230SelectChannel (unsigned long dwIoBase, unsigned char byChannel) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL RFbInit ( PSDevice pDevice ) { -BOOL bResult = TRUE; +BOOL bResult = true; switch (pDevice->byRFType) { case RF_AIROHA : case RF_AL2230S: @@ -823,7 +823,7 @@ BOOL bResult = TRUE; bResult = s_bAL7230Init(pDevice->PortOffset); break; case RF_NOTHING : - bResult = TRUE; + bResult = true; break; default : bResult = FALSE; @@ -842,21 +842,21 @@ BOOL bResult = TRUE; * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL RFbShutDown ( PSDevice pDevice ) { -BOOL bResult = TRUE; +BOOL bResult = true; switch (pDevice->byRFType) { case RF_AIROHA7230 : bResult = IFRFbWriteEmbeded (pDevice->PortOffset, 0x1ABAEF00+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW); break; default : - bResult = TRUE; + bResult = true; break; } return bResult; @@ -872,12 +872,12 @@ BOOL bResult = TRUE; * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL RFbSelectChannel (unsigned long dwIoBase, unsigned char byRFType, unsigned char byChannel) { -BOOL bResult = TRUE; +BOOL bResult = true; switch (byRFType) { case RF_AIROHA : @@ -890,7 +890,7 @@ BOOL bResult = TRUE; break; //}} RobertYu case RF_NOTHING : - bResult = TRUE; + bResult = true; break; default: bResult = FALSE; @@ -970,7 +970,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign //}} RobertYu case RF_NOTHING : - return TRUE; + return true; break; default: @@ -980,7 +980,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign MACvSetMISCFifo(dwIoBase, MISCFIFO_SYNINFO_IDX, (unsigned long )MAKEWORD(bySleepCount, byInitCount)); - return TRUE; + return true; } /* @@ -993,7 +993,7 @@ BOOL RFvWriteWakeProgSyn (unsigned long dwIoBase, unsigned char byRFType, unsign * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL RFbSetPower ( @@ -1002,13 +1002,13 @@ BOOL RFbSetPower ( unsigned int uCH ) { -BOOL bResult = TRUE; +BOOL bResult = true; unsigned char byPwr = 0; unsigned char byDec = 0; unsigned char byPwrdBm = 0; if (pDevice->dwDiagRefCount != 0) { - return TRUE; + return true; } if ((uCH < 1) || (uCH > CB_MAX_CHANNEL)) { return FALSE; @@ -1070,7 +1070,7 @@ unsigned char byPwrdBm = 0; #if 0 // 802.11h TPC - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { // do not over local constraint if (byPwrdBm > pDevice->abyLocalPwr[uCH]) { pDevice->byCurPwrdBm = pDevice->abyLocalPwr[uCH]; @@ -1111,11 +1111,11 @@ unsigned char byPwrdBm = 0; // if (pDevice->byLocalID <= REV_ID_VT3253_B1) { if (pDevice->byCurPwr == byPwr) { - return TRUE; + return true; } bResult = RFbRawSetPower(pDevice, byPwr, uRATE); // } - if (bResult == TRUE) { + if (bResult == true) { pDevice->byCurPwr = byPwr; } return bResult; @@ -1131,7 +1131,7 @@ unsigned char byPwrdBm = 0; * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ @@ -1141,7 +1141,7 @@ BOOL RFbRawSetPower ( unsigned int uRATE ) { -BOOL bResult = TRUE; +BOOL bResult = true; unsigned long dwMax7230Pwr = 0; if (byPwr >= pDevice->byMaxPwrLevel) { @@ -1236,7 +1236,7 @@ BOOL RFbAL7230SelectChannelPostProcess (unsigned long dwIoBase, unsigned char by { BOOL bResult; - bResult = TRUE; + bResult = true; // if change between 11 b/g and 11a need to update the following register // Channel Index 1~14 diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 802de27..fa0b8ef 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c @@ -1166,7 +1166,7 @@ s_vGenerateTxParameter ( wFifoCtl = pFifoHead->wFIFOCtl; if (wFifoCtl & FIFOCTL_CRCDIS) { - bDisCRC = TRUE; + bDisCRC = true; } if (wFifoCtl & FIFOCTL_AUTO_FB_0) { @@ -1375,12 +1375,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0]))) bNeedACK = FALSE; else - bNeedACK = TRUE; - bIsAdhoc = TRUE; + bNeedACK = true; + bIsAdhoc = true; } else { // MSDUs in Infra mode always need ACK - bNeedACK = TRUE; + bNeedACK = true; bIsAdhoc = FALSE; } @@ -1390,12 +1390,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT cbMACHdLen = WLAN_HDR_ADDR3_LEN; - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL)) { + if ((bNeedEncrypt == true) && (pTransmitKey != NULL)) { if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { cbIVlen = 4; cbICVlen = 4; if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) { - bIsWEP256 = TRUE; + bIsWEP256 = true; } } if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) { @@ -1425,7 +1425,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT bRTS = FALSE; } else { - bRTS = TRUE; + bRTS = true; psTxBufHd->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY); } // @@ -1444,7 +1444,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet if (byFBOption == AUTO_FB_NONE) { - if (bRTS == TRUE) {//RTS_need + if (bRTS == true) {//RTS_need pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS)); pvRTS = (PSRTS_g) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR); @@ -1462,7 +1462,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT } } else { // Auto Fall Back - if (bRTS == TRUE) {//RTS_need + if (bRTS == true) {//RTS_need pvRrvTime = (PSRrvTime_gRTS) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS)); pvRTS = (PSRTS_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR); @@ -1483,7 +1483,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT else {//802.11a/b packet if (byFBOption == AUTO_FB_NONE) { - if (bRTS == TRUE) { + if (bRTS == true) { pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); @@ -1501,7 +1501,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT } } else { // Auto Fall Back - if (bRTS == TRUE) {//RTS_need + if (bRTS == true) {//RTS_need pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvRTS = (PSRTS_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); @@ -1522,7 +1522,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT memset((void *)(pbyTxBufferAddr + wTxBufSize), 0, (cbHeaderLength - wTxBufSize)); ////////////////////////////////////////////////////////////////// - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { + if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { if (pDevice->pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { dwMICKey0 = *(unsigned long *)(&pTransmitKey->abyKey[16]); dwMICKey1 = *(unsigned long *)(&pTransmitKey->abyKey[20]); @@ -1549,7 +1549,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen); pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding); - if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE) && (bIsWEP256 == FALSE)) { + if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true) && (bIsWEP256 == FALSE)) { // Fragmentation // FragThreshold = Fragment size(Hdr+(IV)+fragment payload+(MIC)+(ICV)+FCS) cbFragmentSize = pDevice->wFragmentationThreshold; @@ -1584,7 +1584,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, wFragType, uDMAIdx, uFragIdx); - if (bNeedEncrypt == TRUE) { + if (bNeedEncrypt == true) { //Fill TXKEY s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR); @@ -1636,7 +1636,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT uTotalCopyLength += cbFragPayloadSize - cb802_1_H_len; - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { + if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Start MIC: %d\n", cbFragPayloadSize); MIC_vAppend((pbyBuffer + uLength - cb802_1_H_len), cbFragPayloadSize); @@ -1689,7 +1689,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, wFragType, uDMAIdx, uFragIdx); - if (bNeedEncrypt == TRUE) { + if (bNeedEncrypt == true) { //Fill TXKEY s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, pbyMacHdr, (unsigned short)cbLastFragPayloadSize, (unsigned char *)pMICHDR); @@ -1728,7 +1728,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT uTmpLen = cbLastFragPayloadSize - cbMIClen; } - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { + if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen:%d, cbLastFragPayloadSize:%d, uTmpLen:%d\n", uMICFragLen, cbLastFragPayloadSize, uTmpLen); @@ -1820,7 +1820,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT wFragType, uDMAIdx, uFragIdx); - if (bNeedEncrypt == TRUE) { + if (bNeedEncrypt == true) { //Fill TXKEY s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, pbyMacHdr, (unsigned short)cbFragPayloadSize, (unsigned char *)pMICHDR); @@ -1861,12 +1861,12 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT uTotalCopyLength += uTmpLen; - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { + if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { MIC_vAppend((pbyBuffer + uLength), uTmpLen); if (uTmpLen < cbFragPayloadSize) { - bMIC2Frag = TRUE; + bMIC2Frag = true; uMICFragLen = cbFragPayloadSize - uTmpLen; ASSERT(uMICFragLen < cbMIClen); @@ -1949,7 +1949,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT vGenerateMACHeader(pDevice, pbyMacHdr, (unsigned short)uDuration, psEthHeader, bNeedEncrypt, wFragType, uDMAIdx, 0); - if (bNeedEncrypt == TRUE) { + if (bNeedEncrypt == true) { //Fill TXKEY s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey, pbyMacHdr, (unsigned short)cbFrameBodySize, (unsigned char *)pMICHDR); @@ -1998,7 +1998,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT cbFrameBodySize - cb802_1_H_len ); - if ((bNeedEncrypt == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){ + if ((bNeedEncrypt == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength); /* @@ -2017,7 +2017,7 @@ s_cbFillTxBufHead(PSDevice pDevice, unsigned char byPktType, unsigned char *pbyT MIC_vUnInit(); - if (pDevice->bTxMICFail == TRUE) { + if (pDevice->bTxMICFail == true) { *pdwMIC_L = 0; *pdwMIC_R = 0; pDevice->bTxMICFail = FALSE; @@ -2093,14 +2093,14 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK); } else { - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; } - bIsAdhoc = TRUE; + bIsAdhoc = true; } else { // MSDUs in Infra mode always need ACK - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; bIsAdhoc = FALSE; } @@ -2145,7 +2145,7 @@ vGenerateFIFOHeader(PSDevice pDevice, unsigned char byPktType, unsigned char *pb pTxBufHead->wFIFOCtl |= FIFOCTL_11GA; } //Set FIFOCTL_GrpAckPolicy - if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 + if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; } @@ -2391,7 +2391,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { if (is_multicast_ether_addr(&(pPacket->p80211Header->sA3.abyAddr1[0]))) bNeedACK = FALSE; else { - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; }; @@ -2411,7 +2411,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0); if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) { - bIsPSPOLL = TRUE; + bIsPSPOLL = true; cbMacHdLen = WLAN_HDR_ADDR2_LEN; } else { cbMacHdLen = WLAN_HDR_ADDR3_LEN; @@ -2444,7 +2444,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { cbIVlen = 8;//RSN Header cbICVlen = 8;//MIC pTxBufHead->wFragCtl |= FRAGCTL_AES; - pDevice->bAES = TRUE; + pDevice->bAES = true; } //MAC Header should be padding 0 to DW alignment. uPadding = 4 - (cbMacHdLen%4); @@ -2454,7 +2454,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) { cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen; //Set FIFOCTL_GrpAckPolicy - if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 + if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; } //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) { //} do { if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) && - (pDevice->bLinkPass == TRUE)) { + (pDevice->bLinkPass == true)) { pbyBSSID = pDevice->abyBSSID; // get pairwise key if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { // get group key - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == TRUE) { + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); break; } @@ -2725,11 +2725,11 @@ cbGetFragCount ( if (is_multicast_ether_addr(&(psEthHeader->abyDstAddr[0]))) bNeedACK = FALSE; else - bNeedACK = TRUE; + bNeedACK = true; } else { // MSDUs in Infra mode always need ACK - bNeedACK = TRUE; + bNeedACK = true; } if (pDevice->bLongHeader) @@ -2738,7 +2738,7 @@ cbGetFragCount ( cbMACHdLen = WLAN_HDR_ADDR3_LEN; - if (pDevice->bEncryptionEnable == TRUE) { + if (pDevice->bEncryptionEnable == true) { if (pTransmitKey == NULL) { if ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) || @@ -2768,7 +2768,7 @@ cbGetFragCount ( cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen; - if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE)) { + if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == true)) { // Fragmentation cbFragmentSize = pDevice->wFragmentationThreshold; cbFragPayloadSize = cbFragmentSize - cbMACHdLen - cbIVlen - cbICVlen - cbFCSlen; @@ -2901,15 +2901,15 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un bNeedACK = FALSE; if (pDevice->bEnableHostWEP) { uNodeIndex = 0; - bNodeExist = TRUE; + bNodeExist = true; }; } else { if (pDevice->bEnableHostWEP) { if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex)) - bNodeExist = TRUE; + bNodeExist = true; }; - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; }; @@ -2930,7 +2930,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0); if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) { - bIsPSPOLL = TRUE; + bIsPSPOLL = true; cbMacHdLen = WLAN_HDR_ADDR2_LEN; } else { cbMacHdLen = WLAN_HDR_ADDR3_LEN; @@ -2982,7 +2982,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un cbICVlen = 8;//MIC cbMICHDR = sizeof(SMICHDRHead); pTxBufHead->wFragCtl |= FRAGCTL_AES; - pDevice->bAES = TRUE; + pDevice->bAES = true; } //MAC Header should be padding 0 to DW alignment. uPadding = 4 - (cbMacHdLen%4); @@ -2992,7 +2992,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, un cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen + cbExtSuppRate; //Set FIFOCTL_GrpAckPolicy - if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 + if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; } //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 MIC_vGetMIC(pdwMIC_L, pdwMIC_R); MIC_vUnInit(); - if (pDevice->bTxMICFail == TRUE) { + if (pDevice->bTxMICFail == true) { *pdwMIC_L = 0; *pdwMIC_R = 0; pDevice->bTxMICFail = FALSE; diff --git a/drivers/staging/vt6655/srom.c b/drivers/staging/vt6655/srom.c index 2f458fe..eff1e47 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 * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; FALSE if failed. * */ BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byData) @@ -160,7 +160,7 @@ BOOL SROMbWriteEmbedded(unsigned long dwIoBase, unsigned char byContntOffset, un return FALSE; } VNSvOutPortB(dwIoBase + MAC_REG_I2MCFG, byOrg); - return TRUE; + return true; } @@ -219,7 +219,7 @@ void SROMvRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsig * Out: * none * - * Return Value: TRUE if all test bits on; otherwise FALSE + * Return Value: true if all test bits on; otherwise FALSE * */ BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) @@ -242,7 +242,7 @@ BOOL SROMbIsRegBitsOn(unsigned long dwIoBase, unsigned char byContntOffset, unsi * Out: * none * - * Return Value: TRUE if all test bits off; otherwise FALSE + * Return Value: true if all test bits off; otherwise FALSE * */ BOOL SROMbIsRegBitsOff(unsigned long dwIoBase, unsigned char byContntOffset, unsigned char byTestBits) @@ -386,7 +386,7 @@ void SROMvReadSubSysVenId(unsigned long dwIoBase, unsigned long *pdwSubSysVenId) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL SROMbAutoLoad(unsigned long dwIoBase) @@ -414,7 +414,7 @@ BOOL SROMbAutoLoad(unsigned long dwIoBase) if (ii == EEP_MAX_CONTEXT_SIZE) return FALSE; - return TRUE; + return true; } diff --git a/drivers/staging/vt6655/tether.c b/drivers/staging/vt6655/tether.c index ca767c2..02d588a 100644 --- a/drivers/staging/vt6655/tether.c +++ b/drivers/staging/vt6655/tether.c @@ -93,7 +93,7 @@ unsigned char ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr) * Out: * none * - * Return Value: TRUE if ok; FALSE if error. + * Return Value: true if ok; FALSE if error. * */ BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength) @@ -104,6 +104,6 @@ BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength) if (cpu_to_le32(*((unsigned long *)(pbyBuffer + cbFrameLength - 4))) != dwCRC) { return FALSE; } - return TRUE; + return true; } diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h index 5032c22..67b30e0 100644 --- a/drivers/staging/vt6655/ttype.h +++ b/drivers/staging/vt6655/ttype.h @@ -39,9 +39,6 @@ typedef int BOOL; -#if !defined(TRUE) -#define TRUE 1 -#endif #if !defined(FALSE) #define FALSE 0 #endif diff --git a/drivers/staging/vt6655/vntwifi.c b/drivers/staging/vt6655/vntwifi.c index 4783d34..796ab75 100644 --- a/drivers/staging/vt6655/vntwifi.c +++ b/drivers/staging/vt6655/vntwifi.c @@ -317,7 +317,7 @@ VNTWIFIvSetAuthenticationMode ( pMgmt->eAuthenMode = eAuthMode; if ((eAuthMode == WMAC_AUTH_SHAREKEY) || (eAuthMode == WMAC_AUTH_AUTO)) { - pMgmt->bShareKeyAlgorithm = TRUE; + pMgmt->bShareKeyAlgorithm = true; } else { pMgmt->bShareKeyAlgorithm = FALSE; } @@ -350,7 +350,7 @@ VNTWIFIvSetEncryptionMode ( if ((eEncryptionMode == WMAC_ENCRYPTION_WEPEnabled) || (eEncryptionMode == WMAC_ENCRYPTION_TKIPEnabled) || (eEncryptionMode == WMAC_ENCRYPTION_AESEnabled) ) { - pMgmt->bPrivacyInvoked = TRUE; + pMgmt->bPrivacyInvoked = true; } else { pMgmt->bPrivacyInvoked = FALSE; } @@ -368,14 +368,14 @@ VNTWIFIbConfigPhyMode ( if ((ePhyType != PHY_TYPE_AUTO) && (ePhyType != pMgmt->eCurrentPHYMode)) { - if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL)==TRUE) { + if (CARDbSetPhyParameter(pMgmt->pAdapter, ePhyType, 0, 0, NULL, NULL)==true) { pMgmt->eCurrentPHYMode = ePhyType; } else { return(FALSE); } } pMgmt->eConfigPHYMode = ePhyType; - return(TRUE); + return(true); } @@ -467,7 +467,7 @@ VNTWIFIvGetNextBSS ( if (pBSS > &(pMgmt->sBSSList[MAX_BSS_NUM])) { return; } - if (pBSS->bActive == TRUE) { + if (pBSS->bActive == true) { *pvNextBSS = pBSS; return; } @@ -510,7 +510,7 @@ VNTWIFIvUpdateNodeTxCounter( } } pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts++; - if (bTxOk == TRUE) { + if (bTxOk == true) { // transmit success, TxAttempts at least plus one pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++; pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wRate]++; @@ -605,7 +605,7 @@ VNTWIFIbyGetKeyCypher( { PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle; - if (bGroupKey == TRUE) { + if (bGroupKey == true) { return (pMgmt->byCSSGK); } else { return (pMgmt->byCSSPK); @@ -652,7 +652,7 @@ VNTWIFIbInit( pMgmt->bCmdRunning = FALSE; *pMgmtHandler = pMgmt; - return TRUE; + return true; } */ @@ -672,7 +672,7 @@ VNTWIFIbSetPMKIDCache ( } pMgmt->gsPMKIDCache.BSSIDInfoCount = ulCount; memcpy(pMgmt->gsPMKIDCache.BSSIDInfo, pPMKIDInfo, (ulCount*sizeof(PMKIDInfo))); - return (TRUE); + return (true); } @@ -761,11 +761,11 @@ VNTWIFIbMeasureReport( pMgmt->uLengthOfRepEIDs += (2 + pMgmt->pCurrMeasureEIDRep->len); pMgmt->pCurrMeasureEIDRep = (PWLAN_IE_MEASURE_REP) pbyCurrentEID; } - if (bEndOfReport == TRUE) { + if (bEndOfReport == true) { IEEE11hbMSRRepTx(pMgmt); } //spin_unlock_irq(&pDevice->lock); - return (TRUE); + return (true); } @@ -781,7 +781,7 @@ VNTWIFIbChannelSwitch( pMgmt->uCurrChannel = byNewChannel; pMgmt->bSwitchChannel = FALSE; //spin_unlock_irq(&pDevice->lock); - return TRUE; + return true; } /* @@ -794,16 +794,16 @@ VNTWIFIbRadarPresent( PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject; if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (byChannel == (unsigned char) pMgmt->uCurrChannel) && - (pMgmt->bSwitchChannel != TRUE) && - (pMgmt->b11hEnable == TRUE)) { + (pMgmt->bSwitchChannel != true) && + (pMgmt->b11hEnable == true)) { if (!compare_ether_addr(pMgmt->abyIBSSDFSOwner, CARDpGetCurrentAddress(pMgmt->pAdapter))) { pMgmt->byNewChannel = CARDbyAutoChannelSelect(pMgmt->pAdapter,(unsigned char) pMgmt->uCurrChannel); - pMgmt->bSwitchChannel = TRUE; + pMgmt->bSwitchChannel = true; } BEACONbSendBeacon(pMgmt); CARDbChannelSwitch(pMgmt->pAdapter, 0, pMgmt->byNewChannel, 10); } - return TRUE; + return true; } */ diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index b8e9d8e..eafaf53 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -137,11 +137,11 @@ vAdHocBeaconStop(PSDevice pDevice) if ((pMgmt->uIBSSChannel <= CB_MAX_CHANNEL_24G) && (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) { - bStop = TRUE; + bStop = true; } if (pMgmt->uIBSSChannel > CB_MAX_CHANNEL_24G) { - bStop = TRUE; + bStop = true; } } @@ -355,7 +355,7 @@ vCommandTimer ( if (pDevice->dwDiagRefCount != 0) return; - if (pDevice->bCmdRunning != TRUE) + if (pDevice->bCmdRunning != true) return; spin_lock_irq(&pDevice->lock); @@ -365,7 +365,7 @@ vCommandTimer ( case WLAN_CMD_SCAN_START: pDevice->byReAssocCount = 0; - if (pDevice->bRadioOff == TRUE) { + if (pDevice->bRadioOff == true) { s_bCommandComplete(pDevice); spin_unlock_irq(&pDevice->lock); return; @@ -432,7 +432,7 @@ vCommandTimer ( vAdHocBeaconStop(pDevice); - if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == TRUE) { + if (set_channel(pMgmt->pAdapter, pMgmt->uScanChannel) == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SCAN Channel: %d\n", pMgmt->uScanChannel); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"SET SCAN Channel Fail: %d\n", pMgmt->uScanChannel); @@ -540,7 +540,7 @@ vCommandTimer ( case WLAN_CMD_SSID_START: pDevice->byReAssocCount = 0; - if (pDevice->bRadioOff == TRUE) { + if (pDevice->bRadioOff == true) { s_bCommandComplete(pDevice); spin_unlock_irq(&pDevice->lock); return; @@ -608,9 +608,9 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].uInActiveCount = 0; bClearBSSID_SCAN(pDevice); } @@ -636,12 +636,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n"); #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -686,7 +686,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->byLinkWaitCount = 0; #if 0 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -708,7 +708,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) { KeybRemoveAllKey(&(pDevice->sKey), pDevice->abyBSSID, pDevice->PortOffset); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; pDevice->byLinkWaitCount = 0; pDevice->byReAssocCount = 0; bClearBSSID_SCAN(pDevice); @@ -733,7 +733,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS else { // printk("mike:-->First time triger TimerTxData InSleep\n"); } - pDevice->IsTxDataTrigger = TRUE; + pDevice->IsTxDataTrigger = true; add_timer(&pDevice->sTimerTxData); #endif } @@ -750,7 +750,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->byLinkWaitCount = 0; #if 0 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -772,7 +772,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrMode = WMAC_MODE_STANDBY; pDevice->bLinkPass = FALSE; - if (pDevice->bEnableHostWEP == TRUE) + if (pDevice->bEnableHostWEP == true) BSSvClearNodeDBTable(pDevice, 1); else BSSvClearNodeDBTable(pDevice, 0); @@ -792,7 +792,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; add_timer(&pMgmt->sTimerSecondCallback); } s_bCommandComplete(pDevice); @@ -807,7 +807,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->bMoreData = FALSE; } else { - pDevice->bMoreData = TRUE; + pDevice->bMoreData = true; } if (!device_dma0_xmit(pDevice, skb, 0)) { 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 pDevice->bMoreData = FALSE; } else { - pDevice->bMoreData = TRUE; + pDevice->bMoreData = true; } if (!device_dma0_xmit(pDevice, skb, ii)) { 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 case WLAN_CMD_RADIO_START : DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n"); - if (pDevice->bRadioCmd == TRUE) + if (pDevice->bRadioCmd == true) CARDbRadioPowerOn(pDevice); else CARDbRadioPowerOff(pDevice); @@ -905,7 +905,7 @@ s_bCommandComplete ( PWLAN_IE_SSID pSSID; BOOL bRadioCmd = FALSE; //unsigned short wDeAuthenReason = 0; - BOOL bForceSCAN = TRUE; + BOOL bForceSCAN = true; PSMgmtObject pMgmt = pDevice->pMgmt; @@ -913,7 +913,7 @@ s_bCommandComplete ( if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) { //Command Queue Empty pDevice->bCmdRunning = FALSE; - return TRUE; + return true; } else { pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd; @@ -922,7 +922,7 @@ s_bCommandComplete ( bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN; ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE); pDevice->cbFreeCmdQueue++; - pDevice->bCmdRunning = TRUE; + pDevice->bCmdRunning = true; switch ( pDevice->eCommand ) { case WLAN_CMD_BSSID_SCAN: DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n"); @@ -934,7 +934,7 @@ s_bCommandComplete ( memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); } /* - if ((bForceSCAN == FALSE) && (pDevice->bLinkPass == TRUE)) { + if ((bForceSCAN == FALSE) && (pDevice->bLinkPass == true)) { if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) && ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) { pDevice->eCommandState = WLAN_CMD_IDLE; @@ -975,7 +975,7 @@ s_bCommandComplete ( vCommandTimerWait((void *)pDevice, 0); } - return TRUE; + return true; } @@ -993,7 +993,7 @@ BOOL bScheduleCommand ( return (FALSE); } pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand; - pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = TRUE; + pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true; memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); if (pbyItem0 != NULL) { @@ -1043,7 +1043,7 @@ BOOL bScheduleCommand ( } else { } - return (TRUE); + return (true); } @@ -1058,7 +1058,7 @@ BOOL bScheduleCommand ( * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise FALSE * */ BOOL bClearBSSID_SCAN ( @@ -1078,7 +1078,7 @@ BOOL bClearBSSID_SCAN ( break; } } - return TRUE; + return true; } //mike add:reset command timer @@ -1126,14 +1126,14 @@ BSSvSecondTxData( spin_lock_irq(&pDevice->lock); #if 1 - if(((pDevice->bLinkPass ==TRUE)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking - (pDevice->fWPA_Authened == TRUE)) { //wpa linking + if(((pDevice->bLinkPass ==true)&&(pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking + (pDevice->fWPA_Authened == true)) { //wpa linking #else - if(pDevice->bLinkPass ==TRUE) { + if(pDevice->bLinkPass ==true) { #endif // printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__); - pDevice->fTxDataInSleep = TRUE; + pDevice->fTxDataInSleep = true; PSbSendNullPacket(pDevice); //send null packet pDevice->fTxDataInSleep = FALSE; } diff --git a/drivers/staging/vt6655/wctl.c b/drivers/staging/vt6655/wctl.c index 8a37b76..d388dfd 100644 --- a/drivers/staging/vt6655/wctl.c +++ b/drivers/staging/vt6655/wctl.c @@ -52,7 +52,7 @@ /* * Description: - * Scan Rx cache. Return TRUE if packet is duplicate, else + * Scan Rx cache. Return true if packet is duplicate, else * inserts in receive cache and returns FALSE. * * Parameters: @@ -62,7 +62,7 @@ * Out: * none * - * Return Value: TRUE if packet duplicate; otherwise FALSE + * Return Value: true if packet duplicate; otherwise FALSE * */ @@ -81,7 +81,7 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) (!compare_ether_addr(&(pCacheEntry->abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) ) { /* Duplicate match */ - return TRUE; + return true; } ADD_ONE_WITH_WRAP_AROUND(uIndex, DUPLICATE_RX_CACHE_LENGTH); } @@ -113,7 +113,7 @@ unsigned int WCTLuSearchDFCB (PSDevice pDevice, PS802_11Header pMACHeader) unsigned int ii; for(ii=0;ii<pDevice->cbDFCB;ii++) { - if ((pDevice->sRxDFCB[ii].bInUse == TRUE) && + if ((pDevice->sRxDFCB[ii].bInUse == true) && (!compare_ether_addr(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]))) ) { // @@ -148,7 +148,7 @@ unsigned int ii; if (pDevice->sRxDFCB[ii].bInUse == FALSE) { pDevice->cbFreeDFCB--; pDevice->sRxDFCB[ii].uLifetime = pDevice->dwMaxReceiveLifetime; - pDevice->sRxDFCB[ii].bInUse = TRUE; + pDevice->sRxDFCB[ii].bInUse = true; pDevice->sRxDFCB[ii].wSequence = (pMACHeader->wSeqCtl >> 4); pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->wSeqCtl & 0x000F); memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN); @@ -172,7 +172,7 @@ unsigned int ii; * Out: * none * - * Return Value: TRUE if it is valid fragment packet and we have resource to defragment; otherwise FALSE + * Return Value: true if it is valid fragment packet and we have resource to defragment; otherwise FALSE * */ BOOL 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 unsigned int uHeaderSize; - if (bWEP == TRUE) { + if (bWEP == true) { uHeaderSize = 28; if (bExtIV) // ExtIV @@ -241,7 +241,7 @@ unsigned int uHeaderSize; pDevice->cbFreeDFCB++; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE; //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); - return(TRUE); + return(true); } return(FALSE); } diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index 3f7600c..2e42764 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -488,15 +488,15 @@ vMgrAssocBeginSta( // ERP Phy (802.11g) should support short preamble. if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); - if (CARDbIsShorSlotTime(pMgmt->pAdapter) == TRUE) { + if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); } } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { - if (CARDbIsShortPreamble(pMgmt->pAdapter) == TRUE) { + if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); } } - if (pMgmt->b11hEnable == TRUE) + if (pMgmt->b11hEnable == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); /* build an assocreq frame and send it */ @@ -567,15 +567,15 @@ vMgrReAssocBeginSta( // ERP Phy (802.11g) should support short preamble. if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); - if (CARDbIsShorSlotTime(pMgmt->pAdapter) == TRUE) { + if (CARDbIsShorSlotTime(pMgmt->pAdapter) == true) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); } } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { - if (CARDbIsShortPreamble(pMgmt->pAdapter) == TRUE) { + if (CARDbIsShortPreamble(pMgmt->pAdapter) == true) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); } } - if (pMgmt->b11hEnable == TRUE) + if (pMgmt->b11hEnable == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); @@ -718,7 +718,7 @@ s_vMgrRxAssocRequest( pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo); pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval); pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = - WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? TRUE : FALSE; + WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : FALSE; // Todo: check sta basic rate, if ap can't support, set status code if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { uRateLen = WLAN_RATES_MAXLEN_11B; @@ -764,15 +764,15 @@ s_vMgrRxAssocRequest( wAssocAID = (unsigned short)uNodeIndex; // check if ERP support if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) - pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; + pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true; if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) { // B only STA join - pDevice->bProtectMode = TRUE; - pDevice->bNonERPPresent = TRUE; + pDevice->bProtectMode = true; + pDevice->bNonERPPresent = true; } if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) { - pDevice->bBarkerPreambleMd = TRUE; + pDevice->bBarkerPreambleMd = true; } DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID); @@ -875,7 +875,7 @@ s_vMgrRxReAssocRequest( pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo); pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval); pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = - WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? TRUE : FALSE; + WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : FALSE; // Todo: check sta basic rate, if ap can't support, set status code if (pDevice->eCurrentPHYType == PHY_TYPE_11B) { @@ -924,15 +924,15 @@ s_vMgrRxReAssocRequest( // if suppurt ERP if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) - pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; + pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true; if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) { // B only STA join - pDevice->bProtectMode = TRUE; - pDevice->bNonERPPresent = TRUE; + pDevice->bProtectMode = true; + pDevice->bNonERPPresent = true; } if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == FALSE) { - pDevice->bBarkerPreambleMd = TRUE; + pDevice->bBarkerPreambleMd = true; } DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID); @@ -1045,7 +1045,7 @@ s_vMgrRxAssocResponse( BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; pDevice->uBBVGADiffCount = 0; if ((pDevice->bWPADEVUp) && (pDevice->skb != NULL)) { if(skb_tailroom(pDevice->skb) <(sizeof(viawget_wpa_header)+pMgmt->sAssocInfo.AssocInfo.ResponseIELength+ @@ -1074,7 +1074,7 @@ s_vMgrRxAssocResponse( //2008-0409-07, <Add> by Einsn Liu #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - //if(pDevice->bWPADevEnable == TRUE) + //if(pDevice->bWPADevEnable == true) { unsigned char buf[512]; size_t len; @@ -1394,7 +1394,7 @@ s_vMgrRxAuthenSequence_1( sFrame.pChallenge->len = WLAN_CHALLENGE_LEN; memset(pMgmt->abyChallenge, 0, WLAN_CHALLENGE_LEN); // get group key - if(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, GROUP_KEY, &pTransmitKey) == TRUE) { + if(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, GROUP_KEY, &pTransmitKey) == true) { rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength+3); rc4_encrypt(&pDevice->SBox, pMgmt->abyChallenge, pMgmt->abyChallenge, WLAN_CHALLENGE_LEN); } @@ -1710,7 +1710,7 @@ s_vMgrRxDisassociation( }; #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1796,7 +1796,7 @@ s_vMgrRxDeauthentication( }; #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1837,12 +1837,12 @@ ChannelExceedZoneType( switch(pDevice->byZoneType) { case 0x00: //USA:1~11 if((byCurrChannel<1) ||(byCurrChannel>11)) - exceed = TRUE; + exceed = true; break; case 0x01: //Japan:1~13 case 0x02: //Europe:1~13 if((byCurrChannel<1) ||(byCurrChannel>13)) - exceed = TRUE; + exceed = true; break; default: //reserve for other zonetype break; @@ -1929,15 +1929,15 @@ s_vMgrRxBeacon( } } else { // no DS channel info - bChannelHit = TRUE; + bChannelHit = true; } //2008-0730-01<Add>by MikeLiu -if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) +if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) return; if (sFrame.pERP != NULL) { sERP.byERP = sFrame.pERP->byContext; - sERP.bERPExist = TRUE; + sERP.bERPExist = true; } else { sERP.bERPExist = FALSE; @@ -1995,7 +1995,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) } if(byCurrChannel == (unsigned char)pMgmt->uCurrChannel) - bIsChannelEqual = TRUE; + bIsChannelEqual = true; if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { @@ -2022,7 +2022,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)){ if (!pDevice->bProtectMode) { MACvEnableProtectMD(pDevice->PortOffset); - pDevice->bProtectMode = TRUE; + pDevice->bProtectMode = true; } } } @@ -2036,7 +2036,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) pMgmt->abyCurrBSSID, WLAN_BSSID_LEN) == 0) { - bIsBSSIDEqual = TRUE; + bIsBSSIDEqual = true; // 2008-05-21 <add> by Richardtai pDevice->uCurrRSSI = pRxPacket->uRSSI; @@ -2053,30 +2053,30 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, sFrame.pSSID->len ) == 0) { - bIsSSIDEqual = TRUE; + bIsSSIDEqual = true; }; } - if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== TRUE) && - (bIsBSSIDEqual == TRUE) && - (bIsSSIDEqual == TRUE) && + if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) && + (bIsBSSIDEqual == true) && + (bIsSSIDEqual == true) && (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { // add state check to prevent reconnect fail since we'll receive Beacon - bIsAPBeacon = TRUE; + bIsAPBeacon = true; if (pBSSList != NULL) { // Compare PHY paramater setting if (pMgmt->wCurrCapInfo != pBSSList->wCapInfo) { - bUpdatePhyParameter = TRUE; + bUpdatePhyParameter = true; pMgmt->wCurrCapInfo = pBSSList->wCapInfo; } if (sFrame.pERP != NULL) { if ((sFrame.pERP->byElementID == WLAN_EID_ERP) && (pMgmt->byERPContext != sFrame.pERP->byContext)) { - bUpdatePhyParameter = TRUE; + bUpdatePhyParameter = true; pMgmt->byERPContext = sFrame.pERP->byContext; } } @@ -2095,7 +2095,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) RATEvParseMaxRate( (void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, - TRUE, + true, &(pMgmt->sNodeDBTable[0].wMaxBasicRate), &(pMgmt->sNodeDBTable[0].wMaxSuppRate), &(pMgmt->sNodeDBTable[0].wSuppRate), @@ -2105,7 +2105,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) #ifdef PLICE_DEBUG //printk("RxBeacon:MaxSuppRate is %d\n",pMgmt->sNodeDBTable[0].wMaxSuppRate); #endif - if (bUpdatePhyParameter == TRUE) { + if (bUpdatePhyParameter == true) { CARDbSetPhyParameter( pMgmt->pAdapter, pMgmt->eCurrentPHYMode, pMgmt->wCurrCapInfo, @@ -2149,14 +2149,14 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // check if beacon TSF larger or small than our local TSF if (HIDWORD(qwTimestamp) == HIDWORD(qwLocalTSF)) { if (LODWORD(qwTimestamp) >= LODWORD(qwLocalTSF)) { - bTSFOffsetPostive = TRUE; + bTSFOffsetPostive = true; } else { bTSFOffsetPostive = FALSE; } } else if (HIDWORD(qwTimestamp) > HIDWORD(qwLocalTSF)) { - bTSFOffsetPostive = TRUE; + bTSFOffsetPostive = true; } else if (HIDWORD(qwTimestamp) < HIDWORD(qwLocalTSF)) { bTSFOffsetPostive = FALSE; @@ -2171,21 +2171,21 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (HIDWORD(qwTSFOffset) != 0 || (LODWORD(qwTSFOffset) > TRIVIAL_SYNC_DIFFERENCE )) { - bTSFLargeDiff = TRUE; + bTSFLargeDiff = true; } // if infra mode - if (bIsAPBeacon == TRUE) { + if (bIsAPBeacon == true) { // Infra mode: Local TSF always follow AP's TSF if Difference huge. if (bTSFLargeDiff) - bUpdateTSF = TRUE; + bUpdateTSF = true; - if ((pDevice->bEnablePSMode == TRUE) &&(sFrame.pTIM != 0)) { + if ((pDevice->bEnablePSMode == true) &&(sFrame.pTIM != 0)) { // deal with DTIM, analysis TIM - pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? TRUE : FALSE ; + pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? true : FALSE ; pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount; pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod; wAIDNumber = pMgmt->wCurrAID & ~(BIT14|BIT15); @@ -2200,7 +2200,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // len = byDTIMCount + byDTIMPeriod + byDTIMPeriod + byVirtBitMap[0~250] if (sFrame.pTIM->len >= (uLocateByteIndex + 4)) { byTIMBitOn = (0x01) << ((wAIDNumber) % 8); - pMgmt->bInTIM = sFrame.pTIM->byVirtBitMap[uLocateByteIndex] & byTIMBitOn ? TRUE : FALSE; + pMgmt->bInTIM = sFrame.pTIM->byVirtBitMap[uLocateByteIndex] & byTIMBitOn ? true : FALSE; } else { pMgmt->bInTIM = FALSE; @@ -2212,7 +2212,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (pMgmt->bInTIM || (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) { - pMgmt->bInTIMWake = TRUE; + pMgmt->bInTIMWake = true; // send out ps-poll packet // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN:In TIM\n"); if (pMgmt->bInTIM) { @@ -2227,7 +2227,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (pDevice->bPWBitOn == FALSE) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n"); if (PSbSendNullPacket(pDevice)) - pDevice->bPWBitOn = TRUE; + pDevice->bPWBitOn = true; } if(PSbConsiderPowerDown(pDevice, FALSE, FALSE)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); @@ -2247,7 +2247,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // adhoc mode:TSF updated only when beacon larger then local TSF if (bTSFLargeDiff && bTSFOffsetPostive && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) - bUpdateTSF = TRUE; + bUpdateTSF = true; // During dpc, already in spinlocked. if (BSSDBbIsSTAInNodeDB(pMgmt, sFrame.pHdr->sA3.abyAddr2, &uNodeIndex)) { @@ -2260,7 +2260,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) RATEvParseMaxRate( (void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, NULL, - TRUE, + true, &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), @@ -2281,7 +2281,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) RATEvParseMaxRate( (void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, NULL, - TRUE, + true, &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), @@ -2301,7 +2301,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) /* pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo); if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M) - pMgmt->sNodeDBTable[uNodeIndex].bERPExist = TRUE; + pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true; */ } @@ -2309,11 +2309,11 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) if (pMgmt->eCurrState == WMAC_STATE_STARTED) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n"); pMgmt->eCurrState = WMAC_STATE_JOINTED; - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].uInActiveCount = 0; }; @@ -2487,7 +2487,7 @@ vMgrCreateOwnIBSS( // set basic rate RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, - (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, TRUE, + (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); @@ -2621,7 +2621,7 @@ vMgrCreateOwnIBSS( pMgmt->wCurrCapInfo &= (~WLAN_SET_CAP_INFO_SHORTPREAMBLE(1)); } - if ((pMgmt->b11hEnable == TRUE) && + if ((pMgmt->b11hEnable == true) && (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); } else { @@ -2675,7 +2675,7 @@ vMgrJoinBSSBegin( for (ii = 0; ii < MAX_BSS_NUM; ii++) { - if (pMgmt->sBSSList[ii].bActive == TRUE) + if (pMgmt->sBSSList[ii].bActive == true) break; } @@ -2727,7 +2727,7 @@ vMgrJoinBSSBegin( } #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT - //if(pDevice->bWPASuppWextEnabled == TRUE) + //if(pDevice->bWPASuppWextEnabled == true) Encyption_Rebuild(pDevice, pCurr); #endif // Infrastructure BSS @@ -2782,7 +2782,7 @@ vMgrJoinBSSBegin( } } - RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, TRUE, + RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); @@ -2869,7 +2869,7 @@ vMgrJoinBSSBegin( WLAN_RATES_MAXLEN_11B); // set basic rate RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, - NULL, TRUE, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, + NULL, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); pMgmt->wCurrCapInfo = pCurr->wCapInfo; @@ -2884,7 +2884,7 @@ vMgrJoinBSSBegin( pMgmt->eCurrState = WMAC_STATE_STARTED; // Adopt BSS state in Adapter Device Object //pDevice->byOpMode = OP_MODE_ADHOC; -// pDevice->bLinkPass = TRUE; +// pDevice->bLinkPass = true; // memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%02x-%02x-%02x-%02x-%02x-%02x \n", @@ -2959,7 +2959,7 @@ s_vMgrSynchBSS ( } // Init the BSS informations - pDevice->bCCK = TRUE; + pDevice->bCCK = true; pDevice->bProtectMode = FALSE; MACvDisableProtectMD(pDevice->PortOffset); pDevice->bBarkerPreambleMd = FALSE; @@ -3047,7 +3047,7 @@ s_vMgrSynchBSS ( pCurr->sERP.byERP, pMgmt->abyCurrSuppRates, pMgmt->abyCurrExtSuppRates - ) != TRUE) { + ) != true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Phy Mode Fail [%d]\n", ePhyType); return; } @@ -3106,7 +3106,7 @@ s_vMgrSynchBSS ( // if( uSameBssidNum>=2) { //we only check AP in hidden sssid mode if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || //networkmanager 0.7.0 does not give the pairwise-key selsection, (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) { // so we need re-selsect it according to real pairwise-key info. - if(pCurr->bWPAValid == TRUE) { //WPA-PSK + if(pCurr->bWPAValid == true) { //WPA-PSK pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK; if(pCurr->abyPKType[0] == WPA_TKIP) { pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP @@ -3117,7 +3117,7 @@ s_vMgrSynchBSS ( PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n"); } } - else if(pCurr->bWPA2Valid == TRUE) { //WPA2-PSK + else if(pCurr->bWPA2Valid == true) { //WPA2-PSK pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK; if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) { pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled; //TKIP @@ -3168,13 +3168,13 @@ s_vMgrFormatTIM( // Mask out the broadcast bit which is indicated separately. bMulticast = (byMap & byMask[0]) != 0; if(bMulticast) { - pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[0].bRxPSPoll = true; } byMap = 0; } if (byMap) { if (!bStartFound) { - bStartFound = TRUE; + bStartFound = true; wStartIndex = ii; } wEndIndex = ii; @@ -3340,7 +3340,7 @@ s_MgrMakeBeacon( } } - if ((pMgmt->b11hEnable == TRUE) && + if ((pMgmt->b11hEnable == true) && (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { // Country IE pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len); @@ -3354,7 +3354,7 @@ s_MgrMakeBeacon( ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0; pbyBuffer += (1) + WLAN_IEHDR_LEN; uLength += (1) + WLAN_IEHDR_LEN; - if (pMgmt->bSwitchChannel == TRUE) { + if (pMgmt->bSwitchChannel == true) { // Channel Switch IE ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH; ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3; @@ -3383,7 +3383,7 @@ s_MgrMakeBeacon( pbyBuffer += (7) + WLAN_IEHDR_LEN; uLength += (7) + WLAN_IEHDR_LEN; for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) { - if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == TRUE) { + if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) { pbyBuffer += 2; uLength += 2; pIBSSDFS->len += 2; @@ -3399,11 +3399,11 @@ s_MgrMakeBeacon( sFrame.pERP->byElementID = WLAN_EID_ERP; sFrame.pERP->len = 1; sFrame.pERP->byContext = 0; - if (pDevice->bProtectMode == TRUE) + if (pDevice->bProtectMode == true) sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION; - if (pDevice->bNonERPPresent == TRUE) + if (pDevice->bNonERPPresent == true) sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT; - if (pDevice->bBarkerPreambleMd == TRUE) + if (pDevice->bBarkerPreambleMd == true) sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE; } if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) { @@ -3415,7 +3415,7 @@ s_MgrMakeBeacon( ); } // hostapd wpa/wpa2 IE - if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == TRUE)) { + if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) { if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { if (pMgmt->wWPAIELen != 0) { sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -3536,15 +3536,15 @@ s_MgrMakeProbeResponse( sFrame.pERP->byElementID = WLAN_EID_ERP; sFrame.pERP->len = 1; sFrame.pERP->byContext = 0; - if (pDevice->bProtectMode == TRUE) + if (pDevice->bProtectMode == true) sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION; - if (pDevice->bNonERPPresent == TRUE) + if (pDevice->bNonERPPresent == true) sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT; - if (pDevice->bBarkerPreambleMd == TRUE) + if (pDevice->bBarkerPreambleMd == true) sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE; } - if ((pMgmt->b11hEnable == TRUE) && + if ((pMgmt->b11hEnable == true) && (pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) { // Country IE pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len); @@ -3558,7 +3558,7 @@ s_MgrMakeProbeResponse( ((PWLAN_IE_PW_CONST) pbyBuffer)->byPower = 0; pbyBuffer += (1) + WLAN_IEHDR_LEN; uLength += (1) + WLAN_IEHDR_LEN; - if (pMgmt->bSwitchChannel == TRUE) { + if (pMgmt->bSwitchChannel == true) { // Channel Switch IE ((PWLAN_IE_CH_SW) pbyBuffer)->byElementID = WLAN_EID_CH_SWITCH; ((PWLAN_IE_CH_SW) pbyBuffer)->len = 3; @@ -3587,7 +3587,7 @@ s_MgrMakeProbeResponse( pbyBuffer += (7) + WLAN_IEHDR_LEN; uLength += (7) + WLAN_IEHDR_LEN; for(ii=CB_MAX_CHANNEL_24G+1; ii<=CB_MAX_CHANNEL; ii++ ) { - if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == TRUE) { + if (get_channel_map_info(pMgmt->pAdapter, ii, pbyBuffer, pbyBuffer+1) == true) { pbyBuffer += 2; uLength += 2; pIBSSDFS->len += 2; @@ -3608,7 +3608,7 @@ s_MgrMakeProbeResponse( } // hostapd wpa/wpa2 IE - if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == TRUE)) { + if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnableHostapd == true)) { if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) { if (pMgmt->wWPAIELen != 0) { sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len); @@ -3710,7 +3710,7 @@ s_MgrMakeAssocRequest( pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN; // for 802.11h - if (pMgmt->b11hEnable == TRUE) { + if (pMgmt->b11hEnable == true) { if (sFrame.pCurrPowerCap == NULL) { sFrame.pCurrPowerCap = (PWLAN_IE_PW_CAP)(sFrame.pBuf + sFrame.len); sFrame.len += (2 + WLAN_IEHDR_LEN); @@ -3855,7 +3855,7 @@ s_MgrMakeAssocRequest( sFrame.pRSN->len +=6; // RSN Capabilites - if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { + if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) { memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { sFrame.pRSN->abyRSN[16] = 0; @@ -3863,7 +3863,7 @@ s_MgrMakeAssocRequest( } sFrame.pRSN->len +=2; - if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == TRUE) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { + if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID pbyRSN = &sFrame.pRSN->abyRSN[18]; pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count @@ -4111,7 +4111,7 @@ s_MgrMakeReAssocRequest( sFrame.pRSN->len +=6; // RSN Capabilites - if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { + if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) { memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { sFrame.pRSN->abyRSN[16] = 0; @@ -4119,7 +4119,7 @@ s_MgrMakeReAssocRequest( } sFrame.pRSN->len +=2; - if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == TRUE) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { + if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID pbyRSN = &sFrame.pRSN->abyRSN[18]; pwPMKID = (unsigned short *)pbyRSN; // Point to PMKID count @@ -4326,7 +4326,7 @@ s_vMgrRxProbeResponse( unsigned char byCurrChannel = pRxPacket->byRxChannel; ERPObject sERP; unsigned char byIEChannel = 0; - BOOL bChannelHit = TRUE; + BOOL bChannelHit = true; memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP)); @@ -4362,16 +4362,16 @@ s_vMgrRxProbeResponse( } } else { // no DS channel info - bChannelHit = TRUE; + bChannelHit = true; } //2008-0730-01<Add>by MikeLiu -if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) +if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) return; if (sFrame.pERP != NULL) { sERP.byERP = sFrame.pERP->byContext; - sERP.bERPExist = TRUE; + sERP.bERPExist = true; } else { sERP.bERPExist = FALSE; sERP.byERP = 0; @@ -4604,7 +4604,7 @@ vMgrRxManagePacket( case WLAN_FSTYPE_REASSOCRESP: // Frame Clase = 2 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n"); - s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, TRUE); + s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, true); break; case WLAN_FSTYPE_PROBEREQ: @@ -4624,7 +4624,7 @@ vMgrRxManagePacket( // Frame Clase = 0 //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n"); if (pMgmt->eScanState != WMAC_NO_SCANNING) { - bInScan = TRUE; + bInScan = true; }; s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan); break; @@ -4681,7 +4681,7 @@ vMgrRxManagePacket( * Prepare beacon to send * * Return Value: - * TRUE if success; FALSE if failed. + * true if success; FALSE if failed. * -*/ BOOL @@ -4720,7 +4720,7 @@ bMgrPrepareBeaconToSend( csBeacon_xmit(pDevice, pTxPacket); - return TRUE; + return true; } @@ -4833,18 +4833,18 @@ bAdd_PMKID_Candidate ( for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; if ( !memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) { - if ((psRSNCapObj->bRSNCapExist == TRUE) && (psRSNCapObj->wRSNCap & BIT0)) { + if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); } - return TRUE; + return true; } } // New Candidate pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates]; - if ((psRSNCapObj->bRSNCapExist == TRUE) && (psRSNCapObj->wRSNCap & BIT0)) { + if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; } else { pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED); @@ -4852,7 +4852,7 @@ bAdd_PMKID_Candidate ( memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN); pDevice->gsPMKIDCandidate.NumCandidates++; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); - return TRUE; + return true; } /* @@ -4905,7 +4905,7 @@ s_bCipherMatch ( } if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && - (pBSSNode->bWPA2Valid == TRUE) && + (pBSSNode->bWPA2Valid == true) && //20080123-01,<Add> by Einsn Liu ((EncStatus == Ndis802_11Encryption3Enabled)||(EncStatus == Ndis802_11Encryption2Enabled))) { //WPA2 @@ -4939,7 +4939,7 @@ s_bCipherMatch ( } } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && - (pBSSNode->bWPAValid == TRUE) && + (pBSSNode->bWPAValid == true) && ((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) { //WPA // check Group Key Cipher @@ -4979,7 +4979,7 @@ s_bCipherMatch ( (byCipherMask == 0)) { *pbyCCSGK = KEY_CTL_WEP; *pbyCCSPK = KEY_CTL_NONE; - return TRUE; + return true; } else { return FALSE; } @@ -4989,17 +4989,17 @@ s_bCipherMatch ( (byCipherMask == 0)) { *pbyCCSGK = KEY_CTL_TKIP; *pbyCCSPK = KEY_CTL_NONE; - return TRUE; + return true; } else if ((byMulticastCipher == KEY_CTL_WEP) && ((byCipherMask & 0x02) != 0)) { *pbyCCSGK = KEY_CTL_WEP; *pbyCCSPK = KEY_CTL_TKIP; - return TRUE; + return true; } else if ((byMulticastCipher == KEY_CTL_TKIP) && ((byCipherMask & 0x02) != 0)) { *pbyCCSGK = KEY_CTL_TKIP; *pbyCCSPK = KEY_CTL_TKIP; - return TRUE; + return true; } else { return FALSE; } @@ -5012,22 +5012,22 @@ s_bCipherMatch ( ((byCipherMask & 0x04) != 0)) { *pbyCCSGK = KEY_CTL_WEP; *pbyCCSPK = KEY_CTL_CCMP; - return TRUE; + return true; } else if ((byMulticastCipher == KEY_CTL_TKIP) && ((byCipherMask & 0x04) != 0)) { *pbyCCSGK = KEY_CTL_TKIP; *pbyCCSPK = KEY_CTL_CCMP; - return TRUE; + return true; } else if ((byMulticastCipher == KEY_CTL_CCMP) && ((byCipherMask & 0x04) != 0)) { *pbyCCSGK = KEY_CTL_CCMP; *pbyCCSPK = KEY_CTL_CCMP; - return TRUE; + return true; } else { return FALSE; } } - return TRUE; + return true; } diff --git a/drivers/staging/vt6655/wpa.c b/drivers/staging/vt6655/wpa.c index 5ac4688..da8d548 100644 --- a/drivers/staging/vt6655/wpa.c +++ b/drivers/staging/vt6655/wpa.c @@ -210,14 +210,14 @@ WPA_ParseRSN ( pbyCaps = (unsigned char *)pIE_RSN_Auth->AuthKSList[n].abyOUI; pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG; pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS); - pBSSList->sRSNCapObj.bRSNCapExist = TRUE; + pBSSList->sRSNCapObj.bRSNCapExist = true; pBSSList->sRSNCapObj.wRSNCap = *(unsigned short *)pbyCaps; //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps)); //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK)); //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx)); } } - pBSSList->bWPAValid = TRUE; + pBSSList->bWPAValid = true; } } @@ -270,7 +270,7 @@ WPA_SearchRSN ( if (byEncrypt != byPKType) return FALSE; } - return TRUE; + return true; // if (pBSSList->wAuthCount > 0) // for (ii=0; ii < pBSSList->wAuthCount; ii ++) // if (byAuth == pBSSList->abyAuthType[ii]) @@ -308,7 +308,7 @@ WPAb_Is_RSN ( if ((pRSN->len >= 6) && // oui1(4)+ver(2) (pRSN->byElementID == WLAN_EID_RSN_WPA) && !memcmp(pRSN->abyOUI, abyOUI01, 4) && (pRSN->wVersion == 1)) { - return TRUE; + return true; } else return FALSE; diff --git a/drivers/staging/vt6655/wpa2.c b/drivers/staging/vt6655/wpa2.c index 29f185c..9b763a8 100644 --- a/drivers/staging/vt6655/wpa2.c +++ b/drivers/staging/vt6655/wpa2.c @@ -124,7 +124,7 @@ WPA2vParseRSN ( if (pRSN->len == 2) { // ver(2) if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { - pBSSNode->bWPA2Valid = TRUE; + pBSSNode->bWPA2Valid = true; } return; } @@ -159,7 +159,7 @@ WPA2vParseRSN ( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK); if (pRSN->len == 6) { - pBSSNode->bWPA2Valid = TRUE; + pBSSNode->bWPA2Valid = true; return; } @@ -173,7 +173,7 @@ WPA2vParseRSN ( if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i) if ( !memcmp(pbyOUI, abyOUIGK, 4)) { pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_USE_GROUP; - bUseGK = TRUE; + bUseGK = true; } else if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) { // Invialid CSS, continue to parsing } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) { @@ -195,7 +195,7 @@ WPA2vParseRSN ( break; } //for - if (bUseGK == TRUE) { + if (bUseGK == true) { if (j != 1) { // invalid CSS, This should be only PK CSS. return; @@ -237,12 +237,12 @@ WPA2vParseRSN ( n = *((unsigned short *) &(pRSN->abyRSN[6+4*m]));; if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2) - pBSSNode->sRSNCapObj.bRSNCapExist = TRUE; + pBSSNode->sRSNCapObj.bRSNCapExist = true; pBSSNode->sRSNCapObj.wRSNCap = *((unsigned short *) &(pRSN->abyRSN[8+4*m+4*n])); } } //ignore PMKID lists bcs only (Re)Assocrequest has this field - pBSSNode->bWPA2Valid = TRUE; + pBSSNode->bWPA2Valid = true; } } @@ -330,7 +330,7 @@ WPA2uSetIEs( pRSNIEs->len +=6; // RSN Capabilites - if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == TRUE) { + if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) { memcpy(&pRSNIEs->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2); } else { pRSNIEs->abyRSN[16] = 0; @@ -339,7 +339,7 @@ WPA2uSetIEs( pRSNIEs->len +=2; if ((pMgmt->gsPMKIDCache.BSSIDInfoCount > 0) && - (pMgmt->bRoaming == TRUE) && + (pMgmt->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { // RSN PMKID 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 f34fdfc..d5e517b 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -252,7 +252,7 @@ spin_lock_irq(&pDevice->lock); else { if (param->u.wpa_key.set_tx) { pDevice->byKeyIndex = (unsigned char)dwKeyIndex; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } KeybSetDefaultKey(&(pDevice->sKey), @@ -266,7 +266,7 @@ spin_lock_irq(&pDevice->lock); } pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; return ret; } @@ -362,7 +362,7 @@ spin_lock_irq(&pDevice->lock); (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, - pDevice->byLocalID) == TRUE) && + pDevice->byLocalID) == true) && (KeybSetDefaultKey(&(pDevice->sKey), dwKeyIndex, param->u.wpa_key.key_len, @@ -370,7 +370,7 @@ spin_lock_irq(&pDevice->lock); (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, - pDevice->byLocalID) == TRUE) ) { + pDevice->byLocalID) == true) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); } else { @@ -403,7 +403,7 @@ spin_lock_irq(&pDevice->lock); (unsigned char *)abyKey, byKeyDecMode, pDevice->PortOffset, - pDevice->byLocalID) == TRUE) { + pDevice->byLocalID) == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); } else { @@ -423,9 +423,9 @@ spin_lock_irq(&pDevice->lock); } // BSSID not 0xffffffffffff if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) { pDevice->byKeyIndex = (unsigned char)param->u.wpa_key.key_index; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; } - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; //spin_unlock_irq(&pDevice->lock); /* @@ -639,7 +639,7 @@ static int wpa_get_scan(PSDevice pDevice, for(jj=0;jj<MAX_BSS_NUM-ii-1;jj++) { - if((pMgmt->sBSSList[jj].bActive!=TRUE) || + if((pMgmt->sBSSList[jj].bActive!=true) || ((pMgmt->sBSSList[jj].uRSSI>pMgmt->sBSSList[jj+1].uRSSI) &&(pMgmt->sBSSList[jj+1].bActive!=FALSE))) { @@ -817,7 +817,7 @@ else case CIPHER_WEP40: case CIPHER_WEP104: pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; - bWepEnabled=TRUE; + bWepEnabled=true; break; case CIPHER_NONE: if (param->u.wpa_associate.group_suite == CIPHER_CCMP) @@ -834,7 +834,7 @@ else if (pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) { pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; //pMgmt->eAuthenMode = WMAC_AUTH_SHAREKEY; - pMgmt->bShareKeyAlgorithm = TRUE; + pMgmt->bShareKeyAlgorithm = true; } else if (pMgmt->eAuthenMode == WMAC_AUTH_OPEN) { if(!bWepEnabled) pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; @@ -846,11 +846,11 @@ else pDevice->eOldEncryptionStatus = pDevice->eEncryptionStatus; if (pDevice->eEncryptionStatus != Ndis802_11EncryptionDisabled) - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; else pDevice->bEncryptionEnable = FALSE; if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) || - ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==TRUE))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP + ((pMgmt->eAuthenMode == WMAC_AUTH_OPEN) && (bWepEnabled==true))) ) //DavidWang //20080717-06,<Modify> by chester//Not to initial WEP KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); spin_lock_irq(&pDevice->lock); pDevice->bLinkPass = FALSE; diff --git a/drivers/staging/vt6655/wroute.c b/drivers/staging/vt6655/wroute.c index 2ec077e..54534df 100644 --- a/drivers/staging/vt6655/wroute.c +++ b/drivers/staging/vt6655/wroute.c @@ -53,16 +53,16 @@ static int msglevel =MSG_LEVEL_INFO; /* * Description: - * Relay packet. Return TRUE if packet is copy to DMA1 + * Relay packet. Return true if packet is copy to DMA1 * * Parameters: * In: * pDevice - * pbySkbData - rx packet skb data * Out: - * TURE, FALSE + * true, FALSE * - * Return Value: TRUE if packet duplicate; otherwise FALSE + * Return Value: true if packet duplicate; otherwise FALSE * */ BOOL 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 cbFrameBodySize += 8; } - if (pDevice->bEncryptionEnable == TRUE) { - bNeedEncryption = TRUE; + if (pDevice->bEncryptionEnable == true) { + bNeedEncryption = true; // get group key pbyBSSID = pDevice->abyBroadcastAddr; @@ -192,7 +192,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDat MACvTransmitAC0(pDevice->PortOffset); - return TRUE; + return true; } |