sed -i 's/\bBOOL\b/bool/g' drivers/staging/vt6656/*.[ch] sed -i 's/\bFALSE\b/false/g' drivers/staging/vt6656/*.[ch] sed -i 's/\bTRUE\b/true/g' drivers/staging/vt6656/*.[ch] Reported checkpatch findings were not resolved, just modified as detailed above plus a couple of fixes in conflicting types in declarations. Running cleanpatch did not helped. Signed-off-by: Andres More <more.andres@xxxxxxxxx> --- drivers/staging/vt6656/80211mgr.c | 8 +- drivers/staging/vt6656/aes_ccmp.c | 10 +- drivers/staging/vt6656/aes_ccmp.h | 2 +- drivers/staging/vt6656/baseband.c | 16 +- drivers/staging/vt6656/bssdb.c | 136 +++++++------- drivers/staging/vt6656/bssdb.h | 28 ++-- drivers/staging/vt6656/card.c | 58 +++--- drivers/staging/vt6656/card.h | 4 +- drivers/staging/vt6656/channel.c | 152 ++++++++-------- drivers/staging/vt6656/channel.h | 6 +- drivers/staging/vt6656/datarate.c | 12 +- drivers/staging/vt6656/device.h | 8 +- drivers/staging/vt6656/device_cfg.h | 8 +- drivers/staging/vt6656/dpc.c | 178 +++++++++--------- drivers/staging/vt6656/firmware.c | 16 +- drivers/staging/vt6656/hostap.c | 48 +++--- drivers/staging/vt6656/int.c | 12 +- drivers/staging/vt6656/iocmd.h | 22 +- drivers/staging/vt6656/iwctl.c | 84 ++++---- drivers/staging/vt6656/key.c | 178 +++++++++--------- drivers/staging/vt6656/key.h | 6 +- drivers/staging/vt6656/main_usb.c | 160 ++++++++-------- drivers/staging/vt6656/power.c | 46 +++--- drivers/staging/vt6656/rf.c | 30 ++-- drivers/staging/vt6656/rxtx.c | 224 +++++++++++----------- drivers/staging/vt6656/tether.c | 8 +- drivers/staging/vt6656/tether.h | 2 +- drivers/staging/vt6656/ttype.h | 11 - drivers/staging/vt6656/usbpipe.c | 36 ++-- drivers/staging/vt6656/wcmd.c | 168 +++++++++--------- drivers/staging/vt6656/wcmd.h | 6 +- drivers/staging/vt6656/wctl.c | 42 ++-- drivers/staging/vt6656/wctl.h | 6 +- drivers/staging/vt6656/wmgr.c | 352 +++++++++++++++++----------------- drivers/staging/vt6656/wpa.c | 30 ++-- drivers/staging/vt6656/wpa.h | 4 +- drivers/staging/vt6656/wpa2.c | 22 +- drivers/staging/vt6656/wpactl.c | 18 +- 38 files changed, 1073 insertions(+), 1084 deletions(-) diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c index 8221d65..534d490 100644 --- a/drivers/staging/vt6656/80211mgr.c +++ b/drivers/staging/vt6656/80211mgr.c @@ -180,7 +180,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; @@ -393,7 +393,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; @@ -563,7 +563,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; @@ -753,7 +753,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/vt6656/aes_ccmp.c b/drivers/staging/vt6656/aes_ccmp.c index f7a3b8f..fb6124d 100644 --- a/drivers/staging/vt6656/aes_ccmp.c +++ b/drivers/staging/vt6656/aes_ccmp.c @@ -231,7 +231,7 @@ void AESv128(BYTE *key, BYTE *data, BYTE *ciphertext) * */ -BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) +bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) { BYTE abyNonce[13]; BYTE MIC_IV[16]; @@ -249,7 +249,7 @@ BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) WORD wHLen = 22; /* 8 is IV, 8 is MIC, 4 is CRC */ WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN; - BOOL bA4 = FALSE; + bool bA4 = false; BYTE byTmp; WORD wCnt; int ii, jj, kk; @@ -257,7 +257,7 @@ BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN; if (WLAN_GET_FC_TODS(*(PWORD) pbyFrame) && WLAN_GET_FC_FROMDS(*(PWORD) pbyFrame)) { - bA4 = TRUE; + bA4 = true; pbyIV += 6; /* 6 is 802.11 address4 */ wHLen += 6; wPayloadSize -= 6; @@ -380,7 +380,7 @@ BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize) /* => above is the packet dec-MIC */ if (!memcmp(abyMIC, abyTmp, 8)) - return TRUE; + return true; else - return FALSE; + return false; } diff --git a/drivers/staging/vt6656/aes_ccmp.h b/drivers/staging/vt6656/aes_ccmp.h index 353bd21..a2e2c4e 100644 --- a/drivers/staging/vt6656/aes_ccmp.h +++ b/drivers/staging/vt6656/aes_ccmp.h @@ -41,6 +41,6 @@ /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize); +bool AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize); #endif /* __AES_CCMP_H__ */ diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index cccd810..a9f525e 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -768,7 +768,7 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, int bCCK = pDevice->bCCK; cbBitCount = cbFrameLength * 8; - bExtBit = FALSE; + bExtBit = false; switch (wRate) { case RATE_1M : @@ -785,7 +785,7 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, break; case RATE_5M : - if (bCCK == FALSE) + if (bCCK == false) cbBitCount ++; cbUsCount = (cbBitCount * 10) / 55; cbTmp = (cbUsCount * 55) / 10; @@ -799,14 +799,14 @@ void BBvCalculateParameter(struct vnt_private *pDevice, u32 cbFrameLength, case RATE_11M : - if (bCCK == FALSE) + if (bCCK == false) cbBitCount ++; cbUsCount = cbBitCount / 11; cbTmp = cbUsCount * 11; if (cbTmp != cbBitCount) { cbUsCount ++; if ((cbBitCount - cbTmp) <= 3) - bExtBit = TRUE; + bExtBit = true; } if (byPreambleType == 1) *pbyPhySgn = 0x0b; @@ -976,12 +976,12 @@ int BBbVT3184Init(struct vnt_private *pDevice) EEP_MAX_CONTEXT_SIZE, pDevice->abyEEPROM); if (ntStatus != STATUS_SUCCESS) { - return FALSE; + return false; } // if ((pDevice->abyEEPROM[EEP_OFS_RADIOCTL]&0x06)==0x04) -// return FALSE; +// return false; //zonetype initial pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; @@ -1097,7 +1097,7 @@ else { MACvRegBitsOn(pDevice, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT); //}} } else { - return TRUE; + return true; } memcpy(abyArray, pbyAddr, wLength); @@ -1136,7 +1136,7 @@ else { ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); RFbRFTableDownload(pDevice); - return TRUE;//ntStatus; + return true;//ntStatus; } diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c index 79339fd..e214fcf 100644 --- a/drivers/staging/vt6656/bssdb.c +++ b/drivers/staging/vt6656/bssdb.c @@ -141,15 +141,15 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, } } - if ((pbyBSSID != NULL)&&(pDevice->bRoaming == FALSE)) { + if ((pbyBSSID != NULL)&&(pDevice->bRoaming == false)) { // match BSSID first for (ii = 0; ii <MAX_BSS_NUM; ii++) { pCurrBSS = &(pMgmt->sBSSList[ii]); - pCurrBSS->bSelected = FALSE; + pCurrBSS->bSelected = false; if ((pCurrBSS->bActive) && - (pCurrBSS->bSelected == FALSE)) { + (pCurrBSS->bSelected == false)) { if (!compare_ether_addr(pCurrBSS->abyBSSID, pbyBSSID)) { if (pSSID != NULL) { // compare ssid @@ -160,7 +160,7 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ((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); } } @@ -169,7 +169,7 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, ((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); } } @@ -183,9 +183,9 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, //2007-0721-01<Mark>by MikeLiu // if ((pCurrBSS->bActive) && - // (pCurrBSS->bSelected == FALSE)) { + // (pCurrBSS->bSelected == false)) { - pCurrBSS->bSelected = FALSE; + pCurrBSS->bSelected = false; if (pCurrBSS->bActive) { if (pSSID != NULL) { @@ -236,8 +236,8 @@ PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice, pDevice->bSameBSSMaxNum = jj; if (pSelect != NULL) { - pSelect->bSelected = TRUE; - if (pDevice->bRoaming == FALSE) { + pSelect->bSelected = true; + if (pDevice->bRoaming == false) { // Einsn Add @20070907 memcpy(pbyDesireSSID,pCurrBSS->abySSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1) ; } @@ -274,12 +274,12 @@ void BSSvClearBSSList(struct vnt_private *pDevice, int bKeepCurrBSSID) //mike mark: there are two BSSID's in list. If that AP is in hidden ssid mode, one SSID is null, // but other's might not be obvious, so if it associate's with your STA, // you must keep the two of them!! - // bKeepCurrBSSID = FALSE; + // bKeepCurrBSSID = false; continue; } } - pMgmt->sBSSList[ii].bActive = FALSE; + pMgmt->sBSSList[ii].bActive = false; memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS)); } BSSvClearAnyBSSJoinRecord(pDevice); @@ -293,7 +293,7 @@ void BSSvClearBSSList(struct vnt_private *pDevice, int bKeepCurrBSSID) * search BSS list by BSSID & SSID if matched * * Return Value: - * TRUE if found. + * true if found. * -*/ PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice, @@ -328,7 +328,7 @@ PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice, * Insert a BSS set into known BSS list * * Return Value: - * TRUE if success. + * true if success. * -*/ @@ -355,7 +355,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, (struct vnt_rx_mgmt *)pRxPacketContext; PKnownBSS pBSSList = NULL; unsigned int ii; - BOOL bParsingQuiet = FALSE; + bool bParsingQuiet = false; pBSSList = (PKnownBSS)&(pMgmt->sBSSList[0]); @@ -368,10 +368,10 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, if (ii == MAX_BSS_NUM){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Get free KnowBSS node failed.\n"); - return FALSE; + return false; } // save the BSS info - pBSSList->bActive = TRUE; + pBSSList->bActive = true; memcpy( pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN); pBSSList->qwBSSTimestamp = cpu_to_le64(qwTimestamp); pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval); @@ -404,7 +404,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, 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; @@ -420,7 +420,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { // assoc with BSS if (pBSSList == pMgmt->pCurrBSS) { - bParsingQuiet = TRUE; + bParsingQuiet = true; } } @@ -450,27 +450,27 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, } } - 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; + 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; @@ -495,7 +495,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); - return TRUE; + return true; } @@ -505,7 +505,7 @@ int BSSbInsertToBSSList(struct vnt_private *pDevice, * Update BSS set in known BSS list * * Return Value: - * TRUE if success. + * true if success. * -*/ // TODO: input structure modify @@ -534,10 +534,10 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, (struct vnt_rx_mgmt *)pRxPacketContext; int ii, jj; signed long ldBm, ldBmSum; - BOOL bParsingQuiet = FALSE; + bool bParsingQuiet = false; if (pBSSList == NULL) - return FALSE; + return false; pBSSList->qwBSSTimestamp = cpu_to_le64(qwTimestamp); @@ -566,7 +566,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, 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; @@ -583,7 +583,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { // assoc with BSS if (pBSSList == pMgmt->pCurrBSS) { - bParsingQuiet = TRUE; + bParsingQuiet = true; } } @@ -635,7 +635,7 @@ int BSSbUpdateToBSSList(struct vnt_private *pDevice, pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN; memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength); - return TRUE; + return true; } @@ -664,12 +664,12 @@ int BSSbIsSTAInNodeDB(struct vnt_private *pDevice, if (!compare_ether_addr(abyDstAddr, pMgmt->sNodeDBTable[ii].abyMACAddr)) { *puNodeIndex = ii; - return TRUE; + return true; } } } - return FALSE; + return false; }; @@ -722,7 +722,7 @@ void BSSvCreateOneNode(struct vnt_private *pDevice, u32 *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); @@ -777,7 +777,7 @@ void BSSvUpdateAPNode(struct vnt_private *pDevice, u16 *pwCapInfo, memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; if (pDevice->byBBType == BB_TYPE_11B) { uRateLen = WLAN_RATES_MAXLEN_11B; } @@ -790,7 +790,7 @@ void BSSvUpdateAPNode(struct vnt_private *pDevice, u16 *pwCapInfo, 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), @@ -825,13 +825,13 @@ void BSSvAddMulticastNode(struct vnt_private *pDevice) 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].bPSEnable = FALSE; + 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), @@ -870,11 +870,11 @@ void BSSvSecondCallBack(struct vnt_private *pDevice) pDevice->uAssocCount = 0; //Power Saving Mode Tx Burst - if ( pDevice->bEnablePSMode == TRUE ) { + if ( pDevice->bEnablePSMode == true ) { pDevice->ulPSModeWaitTx++; if ( pDevice->ulPSModeWaitTx >= 2 ) { pDevice->ulPSModeWaitTx = 0; - pDevice->bPSModeTxBurst = FALSE; + pDevice->bPSModeTxBurst = false; } } @@ -891,10 +891,10 @@ void BSSvSecondCallBack(struct vnt_private *pDevice) if(pDevice->byReAssocCount > 0) { 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; - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -903,7 +903,7 @@ if(pDevice->byReAssocCount > 0) { wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } } - else if(pDevice->bLinkPass == TRUE) + else if(pDevice->bLinkPass == true) pDevice->byReAssocCount = 0; } @@ -988,27 +988,27 @@ if(pDevice->byReAssocCount > 0) { if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) { if (!pDevice->bProtectMode) { MACvEnableProtectMD(pDevice); - pDevice->bProtectMode = TRUE; + pDevice->bProtectMode = true; } } else { if (pDevice->bProtectMode) { MACvDisableProtectMD(pDevice); - pDevice->bProtectMode = FALSE; + pDevice->bProtectMode = false; } } // on/off short slot time if (uNonShortSlotSTACnt > 0) { if (pDevice->bShortSlotTime) { - pDevice->bShortSlotTime = FALSE; + pDevice->bShortSlotTime = false; BBvSetShortSlotTime(pDevice); vUpdateIFS((void *)pDevice); } } else { if (!pDevice->bShortSlotTime) { - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; BBvSetShortSlotTime(pDevice); vUpdateIFS((void *)pDevice); } @@ -1019,13 +1019,13 @@ if(pDevice->byReAssocCount > 0) { if (uLongPreambleSTACnt > 0) { if (!pDevice->bBarkerPreambleMd) { MACvEnableBarkerPreambleMd(pDevice); - pDevice->bBarkerPreambleMd = TRUE; + pDevice->bBarkerPreambleMd = true; } } else { if (pDevice->bBarkerPreambleMd) { MACvDisableBarkerPreambleMd(pDevice); - pDevice->bBarkerPreambleMd = FALSE; + pDevice->bBarkerPreambleMd = false; } } @@ -1035,9 +1035,9 @@ if(pDevice->byReAssocCount > 0) { // 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; + pMgmt->sNodeDBTable[0].bPSEnable = false; } pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID; @@ -1062,14 +1062,14 @@ if(pDevice->byReAssocCount > 0) { } if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) { - pMgmt->sNodeDBTable[0].bActive = FALSE; + pMgmt->sNodeDBTable[0].bActive = false; pMgmt->eCurrMode = WMAC_MODE_STANDBY; pMgmt->eCurrState = WMAC_STATE_IDLE; netif_stop_queue(pDevice->dev); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); - pDevice->bRoaming = TRUE; - pDevice->bIsRoaming = FALSE; + pDevice->bRoaming = true; + pDevice->bIsRoaming = false; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n", pMgmt->sNodeDBTable[0].uInActiveCount); /* let wpa supplicant know AP may disconnect */ @@ -1084,10 +1084,10 @@ if(pDevice->byReAssocCount > 0) { } else if (pItemSSID->len != 0) { //Davidwang - if ((pDevice->bEnableRoaming == TRUE)&&(!(pMgmt->Cisco_cckm))) { + if ((pDevice->bEnableRoaming == true)&&(!(pMgmt->Cisco_cckm))) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bRoaming %d, !\n", pDevice->bRoaming ); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming ); - if ((pDevice->bRoaming == TRUE)&&(pDevice->bIsRoaming == TRUE)){ + if ((pDevice->bRoaming == true)&&(pDevice->bIsRoaming == true)){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fast Roaming ...\n"); BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass); bScheduleCommand((void *) pDevice, @@ -1098,12 +1098,12 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bIsRoaming %d, !\n", pDevice->bIsRoaming ); pMgmt->abyDesireSSID); pDevice->uAutoReConnectTime = 0; pDevice->uIsroamingTime = 0; - pDevice->bRoaming = FALSE; + pDevice->bRoaming = false; } - else if ((pDevice->bRoaming == FALSE)&&(pDevice->bIsRoaming == TRUE)) { + else if ((pDevice->bRoaming == false)&&(pDevice->bIsRoaming == true)) { pDevice->uIsroamingTime++; if (pDevice->uIsroamingTime >= 20) - pDevice->bIsRoaming = FALSE; + pDevice->bIsRoaming = false; } } @@ -1111,7 +1111,7 @@ else { if (pDevice->uAutoReConnectTime < 10) { pDevice->uAutoReConnectTime++; //network manager support need not do Roaming scan??? - if(pDevice->bWPASuppWextEnabled ==TRUE) + if(pDevice->bWPASuppWextEnabled ==true) pDevice->uAutoReConnectTime = 0; } else { @@ -1159,13 +1159,13 @@ else { pMgmt->sNodeDBTable[0].uInActiveCount = 0; pMgmt->eCurrState = WMAC_STATE_STARTED; netif_stop_queue(pDevice->dev); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); } } } - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { if (netif_queue_stopped(pDevice->dev)) netif_wake_queue(pDevice->dev); } @@ -1426,7 +1426,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) { pDevice->scStatistic.LinkQuality = 0; pDevice->scStatistic.SignalStren = 0; @@ -1459,7 +1459,7 @@ void BSSvClearAnyBSSJoinRecord(struct vnt_private *pDevice) int ii; for (ii = 0; ii < MAX_BSS_NUM; ii++) - pMgmt->sBSSList[ii].bSelected = FALSE; + pMgmt->sBSSList[ii].bSelected = false; return; } @@ -1474,7 +1474,7 @@ static void s_vCheckPreEDThreshold(struct vnt_private *pDevice) pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID, (PWLAN_IE_SSID)pMgmt->abyCurrSSID); if (pBSSList != NULL) { pDevice->byBBPreEDRSSI = (BYTE) (~(pBSSList->ldBmAverRange) + 1); - BBvUpdatePreEDThreshold(pDevice, FALSE); + BBvUpdatePreEDThreshold(pDevice, false); } } } diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h index 9ee37b9..08091a0 100644 --- a/drivers/staging/vt6656/bssdb.h +++ b/drivers/staging/vt6656/bssdb.h @@ -79,20 +79,20 @@ // typedef struct tagSERPObject { - BOOL bERPExist; + bool bERPExist; BYTE byERP; } ERPObject, *PERPObject; typedef struct tagSRSNCapObject { - BOOL bRSNCapExist; + bool bRSNCapExist; WORD wRSNCap; } SRSNCapObject, *PSRSNCapObject; // BSS info(AP) typedef struct tagKnownBSS { // BSS info - BOOL bActive; + bool bActive; BYTE abyBSSID[WLAN_BSSID_LEN]; unsigned int uChannel; BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; @@ -110,10 +110,10 @@ typedef struct tagKnownBSS { signed long ldBmAverage[RSSI_STAT_COUNT]; signed long ldBmAverRange; //For any BSSID selection improvment - BOOL bSelected; + bool bSelected; //++ WPA informations - BOOL bWPAValid; + bool bWPAValid; BYTE byGKType; BYTE abyPKType[4]; WORD wPKCount; @@ -124,7 +124,7 @@ typedef struct tagKnownBSS { //-- //++ WPA2 informations - BOOL bWPA2Valid; + bool bWPA2Valid; BYTE byCSSGK; WORD wCSSPKCount; BYTE abyCSSPK[4]; @@ -167,14 +167,14 @@ typedef enum tagNODE_STATE { // STA node info typedef struct tagKnownNodeDB { // STA info - BOOL bActive; + bool bActive; BYTE abyMACAddr[WLAN_ADDR_LEN]; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN]; WORD wTxDataRate; - BOOL bShortPreamble; - BOOL bERPExist; - BOOL bShortSlotTime; + bool bShortPreamble; + bool bERPExist; + bool bShortSlotTime; unsigned int uInActiveCount; WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp. WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon. @@ -188,15 +188,15 @@ typedef struct tagKnownNodeDB { WORD wListenInterval; WORD wAID; NODE_STATE eNodeState; - BOOL bPSEnable; - BOOL bRxPSPoll; + bool bPSEnable; + bool bRxPSPoll; BYTE byAuthSequence; unsigned long ulLastRxJiffer; BYTE bySuppRate; DWORD dwFlags; WORD wEnQueueCnt; - BOOL bOnFly; + bool bOnFly; unsigned long long KeyRSC; BYTE byKeyIndex; DWORD dwKeyIndex; @@ -207,7 +207,7 @@ typedef struct tagKnownNodeDB { BYTE abyWepKey[WLAN_WEPMAX_KEYLEN]; // // Auto rate fallback vars - BOOL bIsInFallback; + bool bIsInFallback; unsigned int uAverageRSSI; unsigned int uRateRecoveryTimeout; unsigned int uRatePollTimeout; diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index f988f07..22918a1 100644 --- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -501,7 +501,7 @@ void vUpdateIFS(struct vnt_private *pDevice) } else {// PK_TYPE_11GA & PK_TYPE_11GB BYTE byRate = 0; - BOOL bOFDMRate = FALSE; + bool bOFDMRate = false; unsigned int ii = 0; PWLAN_IE_SUPP_RATES pItemRates = NULL; @@ -517,22 +517,22 @@ void vUpdateIFS(struct vnt_private *pDevice) for (ii = 0; ii < pItemRates->len; ii++) { byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); if (RATEwGetRateIdx(byRate) > RATE_11M) { - bOFDMRate = TRUE; + bOFDMRate = true; break; } } - if (bOFDMRate == FALSE) { + if (bOFDMRate == false) { pItemRates = (PWLAN_IE_SUPP_RATES)pDevice->vnt_mgmt .abyCurrExtSuppRates; for (ii = 0; ii < pItemRates->len; ii++) { byRate = (BYTE)(pItemRates->abyRates[ii]&0x7F); if (RATEwGetRateIdx(byRate) > RATE_11M) { - bOFDMRate = TRUE; + bOFDMRate = true; break; } } } - if (bOFDMRate == TRUE) { + if (bOFDMRate == true) { pDevice->uCwMin = C_CWMIN_A; byMaxMin = 4; } else { @@ -599,7 +599,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *pDevice) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; false if failed. * */ void CARDbAddBasicRate(struct vnt_private *pDevice, u16 wRateIdx) @@ -618,9 +618,9 @@ int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice) for (ii = RATE_54M; ii >= RATE_6M; ii --) { if ((pDevice->wBasicRate) & ((WORD)(1<<ii))) - return TRUE; + return true; } - return FALSE; + return false; } u8 CARDbyGetPktType(struct vnt_private *pDevice) @@ -723,15 +723,15 @@ void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate, * Out: * qwCurrTSF - Current TSF counter * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise false * */ -int CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF) +bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF) { *pqwCurrTSF = pDevice->qwCurrTSF; - return TRUE; + return true; } @@ -743,17 +743,17 @@ int CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF) * In: * pDevice - The adapter to be read * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise false * */ -int CARDbClearCurrentTSF(struct vnt_private *pDevice) +bool CARDbClearCurrentTSF(struct vnt_private *pDevice) { MACvRegBitsOn(pDevice, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST); pDevice->qwCurrTSF = 0; - return TRUE; + return true; } /* @@ -899,17 +899,17 @@ void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF, * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise false * */ int CARDbRadioPowerOff(struct vnt_private *pDevice) { - int bResult = TRUE; + int bResult = true; - //if (pDevice->bRadioOff == TRUE) - // return TRUE; + //if (pDevice->bRadioOff == true) + // return true; - pDevice->bRadioOff = TRUE; + pDevice->bRadioOff = true; switch (pDevice->byRFType) { case RF_AL2230: @@ -939,21 +939,21 @@ int CARDbRadioPowerOff(struct vnt_private *pDevice) * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise false * */ int CARDbRadioPowerOn(struct vnt_private *pDevice) { - int bResult = TRUE; + int bResult = true; - if ((pDevice->bHWRadioOff == TRUE) || (pDevice->bRadioControlOff == TRUE)) { - return FALSE; + if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) { + return false; } - //if (pDevice->bRadioOff == FALSE) - // return TRUE; + //if (pDevice->bRadioOff == false) + // return true; - pDevice->bRadioOff = FALSE; + pDevice->bRadioOff = false; BBvExitDeepSleep(pDevice); @@ -1034,7 +1034,7 @@ void CARDvSetBSSMode(struct vnt_private *pDevice) int CARDbChannelSwitch(struct vnt_private *pDevice, u8 byMode, u8 byNewChannel, u8 byCount) { - int bResult = TRUE; + int bResult = true; if (byCount == 0) { pDevice->vnt_mgmt.uCurrChannel = byNewChannel; @@ -1043,11 +1043,11 @@ int CARDbChannelSwitch(struct vnt_private *pDevice, u8 byMode, } pDevice->byChannelSwitchCount = byCount; pDevice->byNewChannel = byNewChannel; - pDevice->bChannelSwitch = TRUE; + pDevice->bChannelSwitch = true; if (byMode == 1) { //bResult=CARDbStopTxPacket(pDevice, PKT_TYPE_802_11_ALL); - pDevice->bStopDataPkt = TRUE; + pDevice->bStopDataPkt = true; } return bResult; } diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h index 720643f..5123bc7 100644 --- a/drivers/staging/vt6656/card.h +++ b/drivers/staging/vt6656/card.h @@ -68,8 +68,8 @@ void CARDbAddBasicRate(struct vnt_private *pDevice, u16 wRateIdx); int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice); void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate, u64 qwBSSTimestamp, u64 qwLocalTSF); -BOOL CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF); -BOOL CARDbClearCurrentTSF(struct vnt_private *pDevice); +bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF); +bool CARDbClearCurrentTSF(struct vnt_private *pDevice); void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, WORD wBeaconInterval); void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF, WORD wBeaconInterval); diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index 95f00ba..4181e3e 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c @@ -50,63 +50,63 @@ static int msglevel = MSG_LEVEL_INFO; static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] = { - {0, 0, FALSE}, - {1, 2412, TRUE}, - {2, 2417, TRUE}, - {3, 2422, TRUE}, - {4, 2427, TRUE}, - {5, 2432, TRUE}, - {6, 2437, TRUE}, - {7, 2442, TRUE}, - {8, 2447, TRUE}, - {9, 2452, TRUE}, - {10, 2457, TRUE}, - {11, 2462, TRUE}, - {12, 2467, TRUE}, - {13, 2472, TRUE}, - {14, 2484, TRUE}, - {183, 4915, TRUE}, //15 - {184, 4920, TRUE}, //16 - {185, 4925, TRUE}, //17 - {187, 4935, TRUE}, //18 - {188, 4940, TRUE}, //19 - {189, 4945, TRUE}, //20 - {192, 4960, TRUE}, //21 - {196, 4980, TRUE}, //22 - {7, 5035, TRUE}, //23 - {8, 5040, TRUE}, //24 - {9, 5045, TRUE}, //25 - {11, 5055, TRUE}, //26 - {12, 5060, TRUE}, //27 - {16, 5080, TRUE}, //28 - {34, 5170, TRUE}, //29 - {36, 5180, TRUE}, //30 - {38, 5190, TRUE}, //31 - {40, 5200, TRUE}, //32 - {42, 5210, TRUE}, //33 - {44, 5220, TRUE}, //34 - {46, 5230, TRUE}, //35 - {48, 5240, TRUE}, //36 - {52, 5260, TRUE}, //37 - {56, 5280, TRUE}, //38 - {60, 5300, TRUE}, //39 - {64, 5320, TRUE}, //40 - {100, 5500, TRUE}, //41 - {104, 5520, TRUE}, //42 - {108, 5540, TRUE}, //43 - {112, 5560, TRUE}, //44 - {116, 5580, TRUE}, //45 - {120, 5600, TRUE}, //46 - {124, 5620, TRUE}, //47 - {128, 5640, TRUE}, //48 - {132, 5660, TRUE}, //49 - {136, 5680, TRUE}, //50 - {140, 5700, TRUE}, //51 - {149, 5745, TRUE}, //52 - {153, 5765, TRUE}, //53 - {157, 5785, TRUE}, //54 - {161, 5805, TRUE}, //55 - {165, 5825, TRUE} //56 + {0, 0, false}, + {1, 2412, true}, + {2, 2417, true}, + {3, 2422, true}, + {4, 2427, true}, + {5, 2432, true}, + {6, 2437, true}, + {7, 2442, true}, + {8, 2447, true}, + {9, 2452, true}, + {10, 2457, true}, + {11, 2462, true}, + {12, 2467, true}, + {13, 2472, true}, + {14, 2484, true}, + {183, 4915, true}, //15 + {184, 4920, true}, //16 + {185, 4925, true}, //17 + {187, 4935, true}, //18 + {188, 4940, true}, //19 + {189, 4945, true}, //20 + {192, 4960, true}, //21 + {196, 4980, true}, //22 + {7, 5035, true}, //23 + {8, 5040, true}, //24 + {9, 5045, true}, //25 + {11, 5055, true}, //26 + {12, 5060, true}, //27 + {16, 5080, true}, //28 + {34, 5170, true}, //29 + {36, 5180, true}, //30 + {38, 5190, true}, //31 + {40, 5200, true}, //32 + {42, 5210, true}, //33 + {44, 5220, true}, //34 + {46, 5230, true}, //35 + {48, 5240, true}, //36 + {52, 5260, true}, //37 + {56, 5280, true}, //38 + {60, 5300, true}, //39 + {64, 5320, true}, //40 + {100, 5500, true}, //41 + {104, 5520, true}, //42 + {108, 5540, true}, //43 + {112, 5560, true}, //44 + {116, 5580, true}, //45 + {120, 5600, true}, //46 + {124, 5620, true}, //47 + {128, 5640, true}, //48 + {132, 5660, true}, //49 + {136, 5680, true}, //50 + {140, 5700, true}, //51 + {149, 5745, true}, //52 + {153, 5765, true}, //53 + {157, 5785, true}, //54 + {161, 5805, true}, //55 + {165, 5825, true} //56 }; @@ -380,26 +380,26 @@ 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) // 5G => Ch 7, 8, 9, 11, 12, 16, 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64, // 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56) ************************************************************************/ -BOOL +bool ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex) { - BOOL bValid; + bool bValid; - bValid = FALSE; + bValid = false; /* * If Channel Index is invalid, return invalid */ if ((ChannelIndex > CB_MAX_CHANNEL) || (ChannelIndex == 0)) { - bValid = FALSE; + bValid = false; goto exit; } @@ -422,47 +422,47 @@ exit: * 0x0000000000000003 means channel 1,2 are supported * 0x000000000000000F means channel 1,2,..15 are supported ************************************************************************/ -BOOL +bool CHvChannelGetList ( unsigned int uCountryCodeIdx, PBYTE pbyChannelTable ) { if (uCountryCodeIdx >= CCODE_MAX) { - return (FALSE); + return (false); } memcpy(pbyChannelTable, ChannelRuleTab[uCountryCodeIdx].bChannelIdxList, CB_MAX_CHANNEL); - return (TRUE); + return (true); } void CHvInitChannelTable(struct vnt_private *pDevice) { - int bMultiBand = FALSE; + int bMultiBand = false; int ii; for (ii = 1; ii <= CB_MAX_CHANNEL; ii++) - sChannelTbl[ii].bValid = FALSE; + sChannelTbl[ii].bValid = false; switch (pDevice->byRFType) { case RF_AL2230: case RF_AL2230S: case RF_VT3226: case RF_VT3226D0: - bMultiBand = FALSE; + bMultiBand = false; break; case RF_AIROHA7230: case RF_VT3342A0: default : - bMultiBand = TRUE; + bMultiBand = true; break; } if ((pDevice->dwDiagRefCount != 0) || - (pDevice->b11hEable == TRUE)) { - if (bMultiBand == TRUE) { + (pDevice->b11hEable == true)) { + if (bMultiBand == true) { for (ii = 0; ii < CB_MAX_CHANNEL; 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]; } @@ -472,16 +472,16 @@ void CHvInitChannelTable(struct vnt_private *pDevice) } } else { for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) { - 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 < CB_MAX_CHANNEL; 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]; } @@ -489,7 +489,7 @@ void CHvInitChannelTable(struct vnt_private *pDevice) } else { for (ii = 0; ii < CB_MAX_CHANNEL_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]; } diff --git a/drivers/staging/vt6656/channel.h b/drivers/staging/vt6656/channel.h index 8031491..9914dba 100644 --- a/drivers/staging/vt6656/channel.h +++ b/drivers/staging/vt6656/channel.h @@ -40,17 +40,17 @@ typedef struct tagSChannelTblElement { BYTE byChannelNumber; unsigned int uFrequency; - BOOL bValid; + bool bValid; } SChannelTblElement, *PSChannelTblElement; /*--------------------- Export Variables --------------------------*/ /*--------------------- Export Functions --------------------------*/ -BOOL ChannelValid(unsigned int CountryCode, unsigned int ChannelNum); +bool ChannelValid(unsigned int CountryCode, unsigned int ChannelNum); void CHvInitChannelTable(struct vnt_private *pDevice); BYTE CHbyGetChannelMapping(BYTE byChannelNumber); -BOOL CHvChannelGetList(unsigned int uCountryCodeIdx, PBYTE pbyChannelTable); +bool CHvChannelGetList(unsigned int uCountryCodeIdx, PBYTE pbyChannelTable); #endif /* _CHANNEL_H_ */ diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c index 4a234e5..77464e8 100644 --- a/drivers/staging/vt6656/datarate.c +++ b/drivers/staging/vt6656/datarate.c @@ -218,7 +218,7 @@ void RATEvParseMaxRate(struct vnt_private *pDevice, for (ii = 0; ii < uRateLen; ii++) { byRate = (BYTE)(pItemRates->abyRates[ii]); if (WLAN_MGMT_IS_BASICRATE(byRate) && - (bUpdateBasicRate == TRUE)) { + (bUpdateBasicRate == true)) { /* * add to basic rate set, update pDevice->byTopCCKBasicRate and * pDevice->byTopOFDMBasicRate @@ -307,8 +307,8 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; u16 wIdxDownRate = 0; int ii; - int bAutoRate[MAX_RATE] = {TRUE, TRUE, TRUE, TRUE, FALSE, FALSE, TRUE, - TRUE, TRUE, TRUE, TRUE, TRUE}; + int bAutoRate[MAX_RATE] = {true, true, true, true, false, false, true, + true, true, true, true, true}; u32 dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; u32 dwThroughput = 0; @@ -335,11 +335,11 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, for (ii = 0; ii < MAX_RATE; ii++) { if (psNodeDBTable->wSuppRate & (0x0001<<ii)) { - if (bAutoRate[ii] == TRUE) { + if (bAutoRate[ii] == true) { wIdxUpRate = (WORD) ii; } } else { - bAutoRate[ii] = FALSE; + bAutoRate[ii] = false; } } @@ -361,7 +361,7 @@ void RATEvTxRateFallBack(struct vnt_private *pDevice, for (ii = psNodeDBTable->wTxDataRate; ii > 0;) { ii--; if ( (dwThroughputTbl[ii] > dwThroughput) && - (bAutoRate[ii]==TRUE) ) { + (bAutoRate[ii]==true) ) { dwThroughput = dwThroughputTbl[ii]; wIdxDownRate = (WORD) ii; } diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h index 82af871..6bba2e0 100644 --- a/drivers/staging/vt6656/device.h +++ b/drivers/staging/vt6656/device.h @@ -193,7 +193,7 @@ typedef struct _USB_SEND_CONTEXT { CONTEXT_TYPE Type; SEthernetHeader sEthHeader; void *Next; - BOOL bBoolInUse; + bool bBoolInUse; unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS]; } USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT; @@ -214,7 +214,7 @@ typedef struct { unsigned int uDataLen; PBYTE pDataBuf; /* struct urb *pUrb; */ - BOOL bInUse; + bool bInUse; } INT_BUFFER, *PINT_BUFFER; /* 0:11A 1:11B 2:11G */ @@ -308,7 +308,7 @@ typedef struct tagSPMKIDCandidateEvent { #define MAX_QUIET_COUNT 8 typedef struct tagSQuietControl { - BOOL bEnable; + bool bEnable; DWORD dwStartTime; BYTE byPeriod; WORD wDuration; @@ -342,7 +342,7 @@ typedef struct tagSDeFragControlBlock struct sk_buff* skb; PBYTE pbyRxBuffer; unsigned int cbFrameLength; - BOOL bInUse; + bool bInUse; } SDeFragControlBlock, *PSDeFragControlBlock; /* flags for options */ diff --git a/drivers/staging/vt6656/device_cfg.h b/drivers/staging/vt6656/device_cfg.h index 98600d6..62290d0 100644 --- a/drivers/staging/vt6656/device_cfg.h +++ b/drivers/staging/vt6656/device_cfg.h @@ -38,12 +38,12 @@ struct _version { unsigned char build; } version_t, *pversion_t; -#ifndef FALSE -#define FALSE (0) +#ifndef false +#define false (0) #endif -#ifndef TRUE -#define TRUE (!(FALSE)) +#ifndef true +#define true (!(false)) #endif #define VID_TABLE_SIZE 64 diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 208be2c..e83f95e 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -276,7 +276,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, PS802_11Header p802_11Header; u8 *pbyRsr, *pbyNewRsr, *pbyRSSI, *pbyFrame; u64 *pqwTSFTime; - u32 bDeFragRx = FALSE; + u32 bDeFragRx = false; u32 cbHeaderOffset, cbIVOffset; u32 FrameSize; u16 wEtherType = 0; @@ -289,7 +289,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, u32 dwRxTSC47_16 = 0; SKeyItem STempKey; /* signed long ldBm = 0; */ - int bIsWEP = FALSE; int bExtIV = FALSE; + int bIsWEP = false; int bExtIV = false; u32 dwWbkStatus; PRCB pRCBIndicate = pRCB; u8 *pbyDAddress; @@ -298,7 +298,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108}; u16 wPLCPwithPadding; PS802_11Header pMACHeader; - int bRxeapol_key = FALSE; + int bRxeapol_key = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n"); @@ -312,13 +312,13 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if (BytesToIndicate != FrameSize) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"------- WRONG Length 1\n"); - return FALSE; + return false; } if ((BytesToIndicate > 2372) || (BytesToIndicate <= 40)) { // Frame Size error drop this packet. DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---------- WRONG Length 2\n"); - return FALSE; + return false; } pbyDAddress = (PBYTE)(skb->data); @@ -336,7 +336,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong PLCP Length %x\n", (int) *pwPLCP_Length); ASSERT(0); - return FALSE; + return false; } for ( ii=RATE_1M;ii<MAX_RATE;ii++) { if ( *pbyRxRate == abyVaildRate[ii] ) { @@ -345,7 +345,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } if ( ii==MAX_RATE ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong RxRate %x\n",(int) *pbyRxRate); - return FALSE; + return false; } wPLCPwithPadding = ( (*pwPLCP_Length / 4) + ( (*pwPLCP_Length % 4) ? 1:0 ) ) *4; @@ -394,12 +394,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if (!is_multicast_ether_addr(pMACHeader->abyAddr1)) { if ( WCTLbIsDuplicate(&(pDevice->sDupRxCache), (PS802_11Header) pbyFrame) ) { pDevice->s802_11Counter.FrameDuplicateCount++; - return FALSE; + return false; } if (compare_ether_addr(pDevice->abyCurrentNetAddr, pMACHeader->abyAddr1)) { - return FALSE; + return false; } } @@ -409,7 +409,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if (!compare_ether_addr((PBYTE)&(pDevice->sRxEthHeader.abySrcAddr[0]), pDevice->abyCurrentNetAddr)) - return FALSE; + return false; if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) || (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) { if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) { @@ -423,17 +423,17 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { - if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == TRUE) { - return FALSE; + if (s_bAPModeRxCtl(pDevice, pbyFrame, iSANodeIndex) == true) { + return false; } } if (IS_FC_WEP(pbyFrame)) { - BOOL bRxDecryOK = FALSE; + 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; @@ -485,11 +485,11 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // pDevice->s802_11Counter.WEPICVErrorCount.QuadPart++; } } - return FALSE; + return false; } } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WEP Func Fail\n"); - return FALSE; + return false; } if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_CCMP)) FrameSize -= 8; // Message Integrity Code @@ -518,14 +518,14 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pbyFrame = skb->data + 8; } else { - return FALSE; + return false; } } // // Management & Control frame Handle // - if ((IS_TYPE_DATA((pbyFrame))) == FALSE) { + if ((IS_TYPE_DATA((pbyFrame))) == false) { // Handle Control & Manage Frame if (IS_TYPE_MGMT((pbyFrame))) { @@ -555,7 +555,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, //Discard beacon packet which channel is 0 if ( (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_BEACON) || (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_PROBERESP) ) { - return FALSE; + return false; } } pRxPacket->byRxChannel = (*pbyRxSts) >> 2; @@ -573,7 +573,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, skb->protocol = htons(ETH_P_802_2); memset(skb->cb, 0, sizeof(skb->cb)); netif_rx(skb); - return TRUE; + return true; } // @@ -581,11 +581,11 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // EnqueueRCB(pDevice->FirstRecvMngList, pDevice->LastRecvMngList, pRCBIndicate); pDevice->NumRecvMngList++; - if ( bDeFragRx == FALSE) { + if ( bDeFragRx == false) { pRCB->Ref++; } - if (pDevice->bIsRxMngWorkItemQueued == FALSE) { - pDevice->bIsRxMngWorkItemQueued = TRUE; + if (pDevice->bIsRxMngWorkItemQueued == false) { + pDevice->bIsRxMngWorkItemQueued = true; tasklet_schedule(&pDevice->RxMngWorkItem); } @@ -593,7 +593,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, else { // Control Frame }; - return FALSE; + return false; } else { if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { @@ -605,12 +605,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pDevice->dev->name); } } - return FALSE; + return false; } } else { // discard DATA packet while not associate || BSSID error - if ((pDevice->bLinkPass == FALSE) || + if ((pDevice->bLinkPass == false) || !(*pbyRsr & RSR_BSSIDOK)) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { @@ -618,7 +618,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pDevice->dev->name); } } - return FALSE; + return false; } //mike add:station mode check eapol-key challenge---> { @@ -637,7 +637,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, 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; Descriptor_type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2]; Key_info = (skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+1]<<8) |skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+2] ; if(Descriptor_type==2) { //RSN @@ -664,8 +664,8 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } else { - if (pMgmt->bInTIMWake == TRUE) { - pMgmt->bInTIMWake = FALSE; + if (pMgmt->bInTIMWake == true) { + pMgmt->bInTIMWake = false; } } } @@ -673,7 +673,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // 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)) { BBvAntennaDiversity(pDevice, s_byGetRateIdx(*pbyRxRate), 0); } @@ -702,7 +702,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // ----------------------------------------------- - if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == TRUE)){ + if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) && (pDevice->bEnable8021x == true)){ BYTE abyMacHdr[24]; // Only 802.1x packet incoming allowed @@ -717,7 +717,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, if (wEtherType == ETH_P_PAE) { skb->dev = pDevice->apdev; - if (bIsWEP == TRUE) { + if (bIsWEP == true) { // strip IV header(8) memcpy(&abyMacHdr[0], (skb->data + 8), 24); memcpy((skb->data + 8 + cbIVOffset), &abyMacHdr[0], 24); @@ -731,12 +731,12 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, 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 if (!(pMgmt->sNodeDBTable[iSANodeIndex].dwFlags & WLAN_STA_AUTHORIZED)) - return FALSE; + return false; } @@ -790,9 +790,9 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, 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->bRxMICFail = false; //pDevice->s802_11Counter.TKIPLocalMICFailures.QuadPart++; pDevice->s802_11Counter.TKIPLocalMICFailures++; if (bDeFragRx) { @@ -802,7 +802,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } } //send event to wpa_supplicant - //if(pDevice->bWPASuppWextEnabled == TRUE) + //if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; struct iw_michaelmicfailure ev; @@ -826,7 +826,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, } - return FALSE; + return false; } } @@ -870,7 +870,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pDevice->dev->name); } } - return FALSE; + return false; } } } @@ -883,7 +883,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, // Null data, framesize = 12 if (FrameSize < 12) - return FALSE; + return false; if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { if (s_bAPModeRxData(pDevice, @@ -892,7 +892,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, cbHeaderOffset, iSANodeIndex, iDANodeIndex - ) == FALSE) { + ) == false) { if (bDeFragRx) { if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) { @@ -900,7 +900,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, pDevice->dev->name); } } - return FALSE; + return false; } } @@ -918,10 +918,10 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB, DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n", pDevice->dev->name); } - return FALSE; + return false; } - return TRUE; + return true; } static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, @@ -951,7 +951,7 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, &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 @@ -963,13 +963,13 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, &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); @@ -979,8 +979,8 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, // check Data PS state // 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].bPSEnable = false; + pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true; bScheduleCommand((void *) pDevice, WLAN_CMD_RX_PSPOLL, NULL); @@ -990,15 +990,15 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, } 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].bPSEnable = false; + pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = true; bScheduleCommand((void *) pDevice, WLAN_CMD_RX_PSPOLL, NULL); @@ -1023,11 +1023,11 @@ static int s_bAPModeRxCtl(struct vnt_private *pDevice, u8 *pbyFrame, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "ADDR1:%pM\n", p802_11Header->abyAddr1); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: wFrameCtl= %x\n", p802_11Header->wFrameCtl ); - return TRUE; + return true; } } } - return FALSE; + return false; } @@ -1065,7 +1065,7 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, (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 (pMgmt->byCSSPK == KEY_CTL_TKIP) byDecMode = KEY_CTL_TKIP; else if (pMgmt->byCSSPK == KEY_CTL_CCMP) @@ -1099,24 +1099,24 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, 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; + return false; } 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; - return FALSE; + return false; } 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 @@ -1164,8 +1164,8 @@ static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, }// end of TKIP/AES if ((*(pbyIV+3) & 0x20) != 0) - *pbExtIV = TRUE; - return TRUE; + *pbExtIV = true; + return true; } static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, @@ -1203,18 +1203,18 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, 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; + return false; } if (byDecMode == KEY_CTL_WEP) { // 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) || - (bOnFly == FALSE)) { + (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true) || + (bOnFly == false)) { // Software WEP // 1. 3253A // 2. WEP 256 @@ -1247,7 +1247,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, if (byDecMode == KEY_CTL_TKIP) { - if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == FALSE)) { + if ((pDevice->byLocalID <= REV_ID_VT3253_A1) || (bOnFly == false)) { // Software TKIP // 1. 3253 A // 2. NotOnFly @@ -1267,7 +1267,7 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, } if (byDecMode == KEY_CTL_CCMP) { - if (bOnFly == FALSE) { + if (bOnFly == false) { // Software CCMP // NotOnFly DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"soft KEY_CTL_CCMP\n"); @@ -1283,8 +1283,8 @@ static int s_bHostWepRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame, }// end of TKIP/AES if ((*(pbyIV+3) & 0x20) != 0) - *pbExtIV = TRUE; - return TRUE; + *pbExtIV = true; + return true; } static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, @@ -1292,14 +1292,14 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, { struct sk_buff *skbcpy; struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - int bRelayAndForward = FALSE; - int bRelayOnly = FALSE; + int bRelayAndForward = false; + int bRelayOnly = false; u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u16 wAID; if (FrameSize > CB_MAX_BUF_SIZE) - return FALSE; + return false; // check DA if (is_multicast_ether_addr((PBYTE)(skb->data+cbHeaderOffset))) { if (pMgmt->sNodeDBTable[0].bPSEnable) { @@ -1321,7 +1321,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, } } else { - bRelayAndForward = TRUE; + bRelayAndForward = true; } } else { @@ -1341,10 +1341,10 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, 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; } } } @@ -1361,13 +1361,13 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb, } if (bRelayOnly) - return FALSE; + return false; } // none associate, don't forward if (pDevice->uAssocCount == 0) - return FALSE; + return false; - return TRUE; + return true; } @@ -1390,7 +1390,7 @@ void RXvWorkItem(struct vnt_private *pDevice) DequeueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList); ntStatus = PIPEnsBulkInUsbRead(pDevice, pRCB); } - pDevice->bIsRxWorkItemQueued = FALSE; + pDevice->bIsRxWorkItemQueued = false; spin_unlock_irq(&pDevice->lock); } @@ -1406,12 +1406,12 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) ASSERT(!pRCB->Ref); // should be 0 ASSERT(pRCB->pDevice); // shouldn't be NULL - if (bReAllocSkb == FALSE) { + if (bReAllocSkb == false) { kfree_skb(pRCB->skb); - bReAllocSkb = TRUE; + bReAllocSkb = true; } - if (bReAllocSkb == TRUE) { + if (bReAllocSkb == true) { pRCB->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); // todo error handling if (pRCB->skb == NULL) { @@ -1428,9 +1428,9 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb) if ((pDevice->Flags & fMP_POST_READS) && MP_IS_READY(pDevice) && - (pDevice->bIsRxWorkItemQueued == FALSE) ) { + (pDevice->bIsRxWorkItemQueued == false) ) { - pDevice->bIsRxWorkItemQueued = TRUE; + pDevice->bIsRxWorkItemQueued = true; tasklet_schedule(&pDevice->ReadWorkItem); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList); @@ -1441,7 +1441,7 @@ void RXvMngWorkItem(struct vnt_private *pDevice) { PRCB pRCB = NULL; struct vnt_rx_mgmt *pRxPacket; - int bReAllocSkb = FALSE; + int bReAllocSkb = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n"); @@ -1466,7 +1466,7 @@ void RXvMngWorkItem(struct vnt_private *pDevice) } } - pDevice->bIsRxMngWorkItemQueued = FALSE; + pDevice->bIsRxMngWorkItemQueued = false; spin_unlock_irq(&pDevice->lock); } diff --git a/drivers/staging/vt6656/firmware.c b/drivers/staging/vt6656/firmware.c index 93d7301..4371a77 100644 --- a/drivers/staging/vt6656/firmware.c +++ b/drivers/staging/vt6656/firmware.c @@ -62,7 +62,7 @@ int FIRMWAREbDownload(struct vnt_private *pDevice) const struct firmware *fw; int NdisStatus; void *pBuffer = NULL; - BOOL result = FALSE; + bool result = false; u16 wLength; int ii, rc; @@ -99,7 +99,7 @@ int FIRMWAREbDownload(struct vnt_private *pDevice) goto free_fw; } - result = TRUE; + result = true; free_fw: release_firmware(fw); @@ -126,9 +126,9 @@ int FIRMWAREbBrach2Sram(struct vnt_private *pDevice) ); if (NdisStatus != STATUS_SUCCESS) { - return (FALSE); + return (false); } else { - return (TRUE); + return (true); } } @@ -147,17 +147,17 @@ int FIRMWAREbCheckVersion(struct vnt_private *pDevice) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion); if (ntStatus != STATUS_SUCCESS) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n"); - return FALSE; + return false; } if (pDevice->wFirmwareVersion == 0xFFFF) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n"); - return FALSE; + return false; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n", pDevice->wFirmwareVersion); if (pDevice->wFirmwareVersion < FIRMWARE_VERSION) { // branch to loader for download new firmware FIRMWAREbBrach2Sram(pDevice); - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index 432961c..bc5e9da 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c @@ -135,9 +135,9 @@ static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked) } kfree(pDevice->apdev); pDevice->apdev = NULL; - pDevice->bEnable8021x = FALSE; - pDevice->bEnableHostWEP = FALSE; - pDevice->bEncryptionEnable = FALSE; + pDevice->bEnable8021x = false; + pDevice->bEnableHostWEP = false; + pDevice->bEncryptionEnable = false; return 0; } @@ -230,7 +230,7 @@ static int hostap_add_sta(struct vnt_private *pDevice, pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = param->u.add_sta.capability; // TODO listenInterval // pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = 1; - pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = FALSE; + pMgmt->sNodeDBTable[uNodeIndex].bPSEnable = false; pMgmt->sNodeDBTable[uNodeIndex].bySuppRate = param->u.add_sta.tx_supp_rates; // set max tx rate @@ -422,7 +422,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, int ret = 0; s32 iNodeIndex = -1; int ii; - int bKeyTableFull = FALSE; + int bKeyTableFull = false; u16 wKeyCtl = 0; @@ -444,7 +444,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, iNodeIndex = 0; } else { - if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &iNodeIndex) == FALSE) { + if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &iNodeIndex) == false) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; @@ -455,15 +455,15 @@ static int hostap_set_encryption(struct vnt_private *pDevice, if (param->u.crypt.alg == WPA_ALG_NONE) { - if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == TRUE) { + if (pMgmt->sNodeDBTable[iNodeIndex].bOnFly == true) { if (KeybRemoveKey( pDevice, &(pDevice->sKey), param->sta_addr, pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex - ) == FALSE) { + ) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "KeybRemoveKey fail \n"); } - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; } pMgmt->sNodeDBTable[iNodeIndex].byKeyIndex = 0; pMgmt->sNodeDBTable[iNodeIndex].dwKeyIndex = 0; @@ -492,13 +492,13 @@ static int hostap_set_encryption(struct vnt_private *pDevice, dwKeyIndex = (DWORD)(param->u.crypt.idx); if (param->u.crypt.flags & HOSTAP_CRYPT_FLAG_SET_TX_KEY) { pDevice->byKeyIndex = (BYTE)dwKeyIndex; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } if (param->u.crypt.alg == WPA_ALG_WEP) { - if ((pDevice->bEnable8021x == FALSE) || (iNodeIndex == 0)) { + if ((pDevice->bEnable8021x == false) || (iNodeIndex == 0)) { KeybSetDefaultKey( pDevice, &(pDevice->sKey), dwKeyIndex & ~(BIT30 | USE_KEYRSC), @@ -517,19 +517,19 @@ static int hostap_set_encryption(struct vnt_private *pDevice, param->u.crypt.key_len, &KeyRSC, (PBYTE)abyKey, KEY_CTL_WEP - ) == TRUE) { + ) == true) { - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { // Key Table Full - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; - bKeyTableFull = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; + 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; @@ -575,7 +575,7 @@ static int hostap_set_encryption(struct vnt_private *pDevice, abyKey, byKeyDecMode ); - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { dwKeyIndex |= (1 << 30); // set pairwise key @@ -587,20 +587,20 @@ static int hostap_set_encryption(struct vnt_private *pDevice, &KeyRSC, (PBYTE)abyKey, byKeyDecMode - ) == TRUE) { + ) == true) { - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = true; } else { // Key Table Full - pMgmt->sNodeDBTable[iNodeIndex].bOnFly = FALSE; - bKeyTableFull = TRUE; + pMgmt->sNodeDBTable[iNodeIndex].bOnFly = false; + 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); @@ -622,7 +622,7 @@ static int hostap_set_encryption(struct vnt_private *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; @@ -661,7 +661,7 @@ static int hostap_get_encryption(struct vnt_private *pDevice, if (is_broadcast_ether_addr(param->sta_addr)) { iNodeIndex = 0; } else { - if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &iNodeIndex) == FALSE) { + if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &iNodeIndex) == false) { param->u.crypt.err = HOSTAP_CRYPT_ERR_UNKNOWN_ADDR; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "hostap_get_encryption: HOSTAP_CRYPT_ERR_UNKNOWN_ADDR\n"); return -EINVAL; diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c index 97c6896..51990bd 100644 --- a/drivers/staging/vt6656/int.c +++ b/drivers/staging/vt6656/int.c @@ -82,7 +82,7 @@ void INTvWorkItem(struct vnt_private *pDevice) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Interrupt Polling Thread\n"); spin_lock_irq(&pDevice->lock); - if (pDevice->fKillEventPollingThread != TRUE) + if (pDevice->fKillEventPollingThread != true) ntStatus = PIPEnsInterruptRead(pDevice); spin_unlock_irq(&pDevice->lock); } @@ -146,12 +146,12 @@ void INTnsProcessData(struct vnt_private *pDevice) if (pMgmt->byDTIMCount > 0) { pMgmt->byDTIMCount--; pMgmt->sNodeDBTable[0].bRxPSPoll = - FALSE; + false; } else if (pMgmt->byDTIMCount == 0) { /* check if multicast tx buffering */ pMgmt->byDTIMCount = pMgmt->byDTIMPeriod-1; - pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; + pMgmt->sNodeDBTable[0].bRxPSPoll = true; if (pMgmt->sNodeDBTable[0].bPSEnable) bScheduleCommand((void *) pDevice, WLAN_CMD_RX_PSPOLL, @@ -161,9 +161,9 @@ void INTnsProcessData(struct vnt_private *pDevice) WLAN_CMD_BECON_SEND, NULL); } /* if (pDevice->eOPMode == OP_MODE_AP) */ - pDevice->bBeaconSent = TRUE; + pDevice->bBeaconSent = true; } else { - pDevice->bBeaconSent = FALSE; + pDevice->bBeaconSent = false; } if (pINTData->byISR0 & ISR_TBTT) { if (pDevice->bEnablePSMode) @@ -202,7 +202,7 @@ void INTnsProcessData(struct vnt_private *pDevice) WLAN_CMD_RADIO, NULL); pDevice->intBuf.uDataLen = 0; - pDevice->intBuf.bInUse = FALSE; + pDevice->intBuf.bInUse = false; pStats->tx_packets = pDevice->scStatistic.ullTsrOK; pStats->tx_bytes = pDevice->scStatistic.ullTxDirectedBytes + diff --git a/drivers/staging/vt6656/iocmd.h b/drivers/staging/vt6656/iocmd.h index ae6e2d2..c354a77 100644 --- a/drivers/staging/vt6656/iocmd.h +++ b/drivers/staging/vt6656/iocmd.h @@ -122,8 +122,8 @@ typedef struct tagSCmdBSSJoin { u16 wBBPType; u8 ssid[SSID_MAXLEN + 2]; u32 uChannel; - BOOL bPSEnable; - BOOL bShareKeyAuth; + bool bPSEnable; + bool bShareKeyAuth; } __packed SCmdBSSJoin, *PSCmdBSSJoin; @@ -133,7 +133,7 @@ typedef struct tagSCmdBSSJoin { typedef struct tagSCmdZoneTypeSet { - BOOL bWrite; + bool bWrite; WZONETYPE ZoneType; } __packed SCmdZoneTypeSet, *PSCmdZoneTypeSet; @@ -143,7 +143,7 @@ typedef struct tagSWPAResult { u8 proto; u8 key_mgmt; u8 eap_type; - BOOL authenticated; + bool authenticated; } __packed SWPAResult, *PSWPAResult; typedef struct tagSCmdStartAP { @@ -153,17 +153,17 @@ typedef struct tagSCmdStartAP { u8 ssid[SSID_MAXLEN + 2]; u32 uChannel; u32 uBeaconInt; - BOOL bShareKeyAuth; + bool bShareKeyAuth; u8 byBasicRate; } __packed SCmdStartAP, *PSCmdStartAP; typedef struct tagSCmdSetWEP { - BOOL bEnableWep; + bool bEnableWep; u8 byKeyIndex; u8 abyWepKey[WEP_NKEYS][WEP_KEYMAXLEN]; - BOOL bWepKeyAvailable[WEP_NKEYS]; + bool bWepKeyAvailable[WEP_NKEYS]; u32 auWepKeyLength[WEP_NKEYS]; } __packed SCmdSetWEP, *PSCmdSetWEP; @@ -176,7 +176,7 @@ typedef struct tagSBSSIDItem { u16 wBeaconInterval; u16 wCapInfo; u8 byNetType; - BOOL bWEPOn; + bool bWEPOn; u32 uRSSI; } __packed SBSSIDItem; @@ -197,12 +197,12 @@ typedef struct tagSNodeItem { u16 wInActiveCount; u16 wEnQueueCnt; u16 wFlags; - BOOL bPWBitOn; + bool bPWBitOn; u8 byKeyIndex; u16 wWepKeyLength; u8 abyWepKey[WEP_KEYMAXLEN]; // Auto rate fallback vars - BOOL bIsInFallback; + bool bIsInFallback; u32 uTxFailures; u32 uTxAttempts; u16 wFailureRatio; @@ -220,7 +220,7 @@ typedef struct tagSNodeList { typedef struct tagSCmdLinkStatus { - BOOL bLink; + bool bLink; u16 wBSSType; u8 byState; u8 abyBSSID[BSSID_LEN]; diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c index 880c025..69971f3 100644 --- a/drivers/staging/vt6656/iwctl.c +++ b/drivers/staging/vt6656/iwctl.c @@ -400,7 +400,7 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, 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"); break; @@ -409,7 +409,7 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, 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"); break; @@ -422,7 +422,7 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, 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"); break; @@ -455,7 +455,7 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL); } else { - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; pMgmt->eCurrState = WMAC_STATE_IDLE; memset(pMgmt->abyCurrBSSID, 0, 6); } @@ -479,7 +479,7 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info, spin_unlock_irq(&pDevice->lock); } - pDevice->bCommit = FALSE; + pDevice->bCommit = false; } @@ -672,7 +672,7 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info, } if (pDevice->flags & DEVICE_FLAGS_OPENED) - pDevice->bCommit = TRUE; + pDevice->bCommit = true; } return rc; } @@ -694,7 +694,7 @@ int iwctl_giwap(struct net_device *dev, struct iw_request_info *info, memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6); - if ((pDevice->bLinkPass == FALSE) && (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)) + if ((pDevice->bLinkPass == false) && (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)) memset(wrq->sa_data, 0, 6); if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) @@ -784,7 +784,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID :\n"); - pDevice->fWPA_Authened = FALSE; + pDevice->fWPA_Authened = false; // Check if we asked for `any' if (wrq->flags == 0) { // Just send an empty SSID list @@ -816,7 +816,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, // 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; BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; @@ -867,7 +867,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info, } if (pDevice->flags & DEVICE_FLAGS_OPENED) - pDevice->bCommit = TRUE; + pDevice->bCommit = true; return 0; } @@ -965,7 +965,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, if (wrq->fixed != 0) { // Fixed mode // One rate, fixed - pDevice->bFixRate = TRUE; + pDevice->bFixRate = true; if ((pDevice->byBBType == BB_TYPE_11B) && (brate > 3)) { pDevice->uConnectionRate = 3; } else { @@ -973,7 +973,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d \n", pDevice->uConnectionRate); } } else { - pDevice->bFixRate = FALSE; + pDevice->bFixRate = false; pDevice->uConnectionRate = 13; } @@ -1024,8 +1024,8 @@ int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info, 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; } return 0; @@ -1229,8 +1229,8 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, } pDevice->byKeyIndex = (BYTE)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? @@ -1244,8 +1244,8 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, // Read the flags if (wrq->flags & IW_ENCODE_DISABLED) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n"); - pMgmt->bShareKeyAlgorithm = FALSE; - pDevice->bEncryptionEnable = FALSE; + pMgmt->bShareKeyAlgorithm = false; + pDevice->bEncryptionEnable = false; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; if (pDevice->flags & DEVICE_FLAGS_OPENED) { spin_lock_irq(&pDevice->lock); @@ -1256,11 +1256,11 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info, } 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"); - pMgmt->bShareKeyAlgorithm = FALSE; + pMgmt->bShareKeyAlgorithm = false; } memset(pMgmt->abyDesireBSSID, 0xFF, 6); @@ -1423,7 +1423,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info, long ldBm; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n"); - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { RFvRSSITodBm(pDevice, (BYTE)(pDevice->uCurrRSSI), &ldBm); wrq->value = ldBm; } else { @@ -1508,9 +1508,9 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, case IW_AUTH_80211_AUTH_ALG: PRINT_K("iwctl_siwauth:set AUTH_ALG=%d\n", wrq->value); if (wrq->value == IW_AUTH_ALG_OPEN_SYSTEM) - pMgmt->bShareKeyAlgorithm = FALSE; + pMgmt->bShareKeyAlgorithm = false; else if (wrq->value == IW_AUTH_ALG_SHARED_KEY) - pMgmt->bShareKeyAlgorithm = TRUE; + pMgmt->bShareKeyAlgorithm = true; break; case IW_AUTH_WPA_ENABLED: break; @@ -1521,11 +1521,11 @@ int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info, break; case IW_AUTH_PRIVACY_INVOKED: pDevice->bEncryptionEnable = !!wrq->value; - if (pDevice->bEncryptionEnable == FALSE) { + if (pDevice->bEncryptionEnable == false) { wpa_version = 0; pairwise = 0; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; - pMgmt->bShareKeyAlgorithm = FALSE; + pMgmt->bShareKeyAlgorithm = false; pMgmt->eAuthenMode = WMAC_AUTH_OPEN; PRINT_K("iwctl_siwauth:set WPADEV to disaable at 2?????\n"); } @@ -1697,28 +1697,28 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info, /****this method is so foolish,but there is no other way??? */ if (param->u.wpa_key.alg_name == WPA_ALG_NONE) { if (param->u.wpa_key.key_index ==0) { - pDevice->bwextstep0 = TRUE; + pDevice->bwextstep0 = true; } - if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1)) { - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = TRUE; + if ((pDevice->bwextstep0 == true) && (param->u.wpa_key.key_index == 1)) { + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = true; } - if ((pDevice->bwextstep1 == TRUE) && (param->u.wpa_key.key_index == 2)) { - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = TRUE; + if ((pDevice->bwextstep1 == true) && (param->u.wpa_key.key_index == 2)) { + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = true; } - if ((pDevice->bwextstep2 == TRUE) && (param->u.wpa_key.key_index == 3)) { - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = TRUE; + if ((pDevice->bwextstep2 == true) && (param->u.wpa_key.key_index == 3)) { + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = true; } } - if (pDevice->bwextstep3 == TRUE) { + if (pDevice->bwextstep3 == true) { PRINT_K("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n"); - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = FALSE; - pDevice->bWPASuppWextEnabled = TRUE; + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = false; + pDevice->bWPASuppWextEnabled = true; memset(pMgmt->abyDesireBSSID, 0xFF, 6); KeyvInitTable(pDevice, &pDevice->sKey); } @@ -1758,7 +1758,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info, switch (mlme->cmd){ case IW_MLME_DEAUTH: case IW_MLME_DISASSOC: - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n"); bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE, NULL); diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c index 87eab91..416175e 100644 --- a/drivers/staging/vt6656/key.c +++ b/drivers/staging/vt6656/key.c @@ -68,17 +68,17 @@ static void s_vCheckKeyTableValid(struct vnt_private *pDevice, u8 pbyData[MAX_KEY_TABLE]; for (i=0;i<MAX_KEY_TABLE;i++) { - 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) && - (pTable->KeyTable[i].GroupKey[2].bKeyValid == FALSE) && - (pTable->KeyTable[i].GroupKey[3].bKeyValid == FALSE) + 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) && + (pTable->KeyTable[i].GroupKey[2].bKeyValid == false) && + (pTable->KeyTable[i].GroupKey[3].bKeyValid == false) ) { - pTable->KeyTable[i].bInUse = FALSE; + pTable->KeyTable[i].bInUse = false; pTable->KeyTable[i].wKeyCtl = 0; - pTable->KeyTable[i].bSoftWEP = FALSE; + pTable->KeyTable[i].bSoftWEP = false; pbyData[wLength++] = (BYTE) i; //MACvDisableKeyEntry(pDevice, i); } @@ -118,18 +118,18 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable) spin_lock_irq(&pDevice->lock); for (i=0;i<MAX_KEY_TABLE;i++) { - pTable->KeyTable[i].bInUse = FALSE; - pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; + pTable->KeyTable[i].bInUse = false; + pTable->KeyTable[i].PairwiseKey.bKeyValid = false; pTable->KeyTable[i].PairwiseKey.pvKeyTable = (void *)&pTable->KeyTable[i]; for (jj=0; jj < MAX_GROUP_KEY; jj++) { - pTable->KeyTable[i].GroupKey[jj].bKeyValid = FALSE; + pTable->KeyTable[i].GroupKey[jj].bKeyValid = false; pTable->KeyTable[i].GroupKey[jj].pvKeyTable = (void *) &(pTable->KeyTable[i]); } pTable->KeyTable[i].wKeyCtl = 0; pTable->KeyTable[i].dwGTKeyIndex = 0; - pTable->KeyTable[i].bSoftWEP = FALSE; + pTable->KeyTable[i].bSoftWEP = false; pbyData[i] = (BYTE) i; } pbyData[i] = (BYTE) i; @@ -158,7 +158,7 @@ void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable) * Out: * pKey - Key return * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise false * */ int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, @@ -170,31 +170,31 @@ int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, *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); + 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); + return (false); } } else { - return (FALSE); + return (false); } } } - return (FALSE); + return (false); } @@ -212,7 +212,7 @@ int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex, * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, @@ -228,12 +228,12 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, j = (MAX_KEY_TABLE-1); for (i=0;i<(MAX_KEY_TABLE-1);i++) { - if ((pTable->KeyTable[i].bInUse == FALSE) && + if ((pTable->KeyTable[i].bInUse == false) && (j == (MAX_KEY_TABLE-1))) { // 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) { @@ -245,7 +245,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, } else { // Group key if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) - return (FALSE); + return (false); pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]); if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key @@ -261,7 +261,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, } pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -298,12 +298,12 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\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); @@ -313,7 +313,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, } else { // Group key if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) - return (FALSE); + return (false); pKey = &(pTable->KeyTable[j].GroupKey[dwKeyIndex & 0x000000FF]); if ((dwKeyIndex & TRANSMIT_KEY) != 0) { // Group transmit key @@ -329,7 +329,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, } pTable->KeyTable[j].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -365,9 +365,9 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n ", pKey->dwKeyIndex); - return (TRUE); + return (true); } - return (FALSE); + return (false); } @@ -382,7 +382,7 @@ int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable, * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ @@ -390,56 +390,56 @@ int KeybRemoveKey(struct vnt_private *pDevice, PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex) { int i; - int bReturnValue = FALSE; + int bReturnValue = false; if (is_broadcast_ether_addr(pbyBSSID)) { // delete all keys if ((dwKeyIndex & PAIRWISE_KEY) != 0) { for (i=0;i<MAX_KEY_TABLE;i++) { - pTable->KeyTable[i].PairwiseKey.bKeyValid = FALSE; + pTable->KeyTable[i].PairwiseKey.bKeyValid = false; } - bReturnValue = TRUE; + bReturnValue = true; } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { for (i=0;i<MAX_KEY_TABLE;i++) { - pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; + pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false; if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) { // remove Group transmit key pTable->KeyTable[i].dwGTKeyIndex = 0; } } - bReturnValue = TRUE; + bReturnValue = true; } else { - bReturnValue = FALSE; + bReturnValue = false; } } else { 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; - bReturnValue = TRUE; + pTable->KeyTable[i].PairwiseKey.bKeyValid = false; + bReturnValue = true; break; } else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) { - pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = FALSE; + pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false; if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) { // remove Group transmit key pTable->KeyTable[i].dwGTKeyIndex = 0; } - bReturnValue = TRUE; + bReturnValue = true; break; } else { - bReturnValue = FALSE; + bReturnValue = false; break; } - } //pTable->KeyTable[i].bInUse == TRUE + } //pTable->KeyTable[i].bInUse == true } //for - bReturnValue = TRUE; + bReturnValue = true; } s_vCheckKeyTableValid(pDevice,pTable); @@ -459,7 +459,7 @@ int KeybRemoveKey(struct vnt_private *pDevice, PSKeyManagement pTable, * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ int KeybRemoveAllKey(struct vnt_private *pDevice, PSKeyManagement pTable, @@ -468,18 +468,18 @@ int KeybRemoveAllKey(struct vnt_private *pDevice, PSKeyManagement pTable, 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; + pTable->KeyTable[i].PairwiseKey.bKeyValid = false; for (u = 0; u < MAX_GROUP_KEY; u++) - pTable->KeyTable[i].GroupKey[u].bKeyValid = FALSE; + pTable->KeyTable[i].GroupKey[u].bKeyValid = false; pTable->KeyTable[i].dwGTKeyIndex = 0; s_vCheckKeyTableValid(pDevice, pTable); - return (TRUE); + return (true); } } - return (FALSE); + return (false); } /* @@ -491,7 +491,7 @@ int KeybRemoveAllKey(struct vnt_private *pDevice, PSKeyManagement pTable, * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ void KeyvRemoveWEPKey(struct vnt_private *pDevice, PSKeyManagement pTable, @@ -499,9 +499,9 @@ void KeyvRemoveWEPKey(struct vnt_private *pDevice, PSKeyManagement pTable, { 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; + pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false; if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex & 0x7FFFFFFF)) { // remove Group transmit key pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex = 0; @@ -531,7 +531,7 @@ void KeyvRemoveAllWEPKey(struct vnt_private *pDevice, PSKeyManagement pTable) * Out: * pKey - Key return * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise false * */ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, @@ -542,12 +542,12 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, *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:"); @@ -558,19 +558,19 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - return (TRUE); + return (true); } else { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == FALSE\n"); - return (FALSE); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == false\n"); + return (false); } } // End of Type == PAIRWISE else { if (pTable->KeyTable[i].dwGTKeyIndex == 0) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n"); - return FALSE; + 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:"); @@ -582,11 +582,11 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %X\n", pTable->KeyTable[i].dwGTKeyIndex); - return (TRUE); + return (true); } else { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == FALSE\n"); - return (FALSE); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == false\n"); + return (false); } } // End of Type = GROUP } // BSSID match @@ -596,7 +596,7 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(pbyBSSID+ii)); } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n"); - return (FALSE); + return (false); } @@ -609,7 +609,7 @@ int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType, * Out: * none * - * Return Value: TRUE if found otherwise FALSE + * Return Value: true if found otherwise false * */ int KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey) @@ -619,13 +619,13 @@ int KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey) *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); + return (false); } /* @@ -641,7 +641,7 @@ int KeybCheckPairewiseKey(PSKeyManagement pTable, PSKeyItem *pKey) * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ @@ -657,15 +657,15 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, (int) dwKeyIndex, (int) uKeyLength); if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key - return (FALSE); + return (false); } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { - return (FALSE); + return (false); } if (uKeyLength > MAX_KEY_LEN) 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; @@ -689,13 +689,13 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, 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) + 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; @@ -734,7 +734,7 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n", pKey->dwKeyIndex); - return (TRUE); + return (true); } @@ -751,7 +751,7 @@ int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable, * Out: * none * - * Return Value: TRUE if success otherwise FALSE + * Return Value: true if success otherwise false * */ @@ -768,13 +768,13 @@ int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable, if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key - return (FALSE); + return (false); } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) { - return (FALSE); + return (false); } 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]); @@ -793,7 +793,7 @@ int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable, pTable->KeyTable[i].wKeyCtl |= 0x8000; // enable on-fly - pKey->bKeyValid = TRUE; + pKey->bKeyValid = true; pKey->uKeyLength = uKeyLength; pKey->dwKeyIndex = dwKeyIndex; pKey->byCipherSuite = byKeyDecMode; @@ -828,7 +828,7 @@ int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable, //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/vt6656/key.h b/drivers/staging/vt6656/key.h index 8889423..7ecddcd 100644 --- a/drivers/staging/vt6656/key.h +++ b/drivers/staging/vt6656/key.h @@ -57,7 +57,7 @@ typedef struct tagSKeyItem { - BOOL bKeyValid; + bool bKeyValid; u32 uKeyLength; BYTE abyKey[MAX_KEY_LEN]; u64 KeyRSC; @@ -76,9 +76,9 @@ typedef struct tagSKeyTable SKeyItem PairwiseKey; SKeyItem GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328 DWORD dwGTKeyIndex; // GroupTransmitKey Index - BOOL bInUse; + bool bInUse; WORD wKeyCtl; - BOOL bSoftWEP; + bool bSoftWEP; BYTE byReserved1[6]; } SKeyTable, *PSKeyTable; //352 diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index d258cb2..d5f53e1 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -228,7 +228,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int device_init_registers(struct vnt_private *pDevice, DEVICE_INIT_TYPE InitType); -static BOOL device_init_defrag_cb(struct vnt_private *pDevice); +static bool device_init_defrag_cb(struct vnt_private *pDevice); static void device_init_diversity_timer(struct vnt_private *pDevice); static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev); @@ -237,7 +237,7 @@ static void device_free_tx_bufs(struct vnt_private *pDevice); static void device_free_rx_bufs(struct vnt_private *pDevice); static void device_free_int_bufs(struct vnt_private *pDevice); static void device_free_frag_bufs(struct vnt_private *pDevice); -static BOOL device_alloc_bufs(struct vnt_private *pDevice); +static bool device_alloc_bufs(struct vnt_private *pDevice); static int Read_config_file(struct vnt_private *pDevice); static unsigned char *Config_FileOperation(struct vnt_private *pDevice); @@ -279,18 +279,18 @@ device_set_options(struct vnt_private *pDevice) { pDevice->b11hEnable = X80211h_MODE_DEF; pDevice->eOPMode = OP_MODE_DEF; pDevice->uConnectionRate = DATA_RATE_DEF; - if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = TRUE; + if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true; pDevice->byBBType = BBP_TYPE_DEF; pDevice->byPacketType = pDevice->byBBType; pDevice->byAutoFBCtrl = AUTO_FB_0; - pDevice->bUpdateBBVGA = TRUE; + pDevice->bUpdateBBVGA = true; pDevice->byFOETuning = 0; pDevice->byAutoPwrTunning = 0; pDevice->wCTSDuration = 0; pDevice->byPreambleType = 0; - pDevice->bExistSWNetAddr = FALSE; - /* pDevice->bDiversityRegCtlON = TRUE; */ - pDevice->bDiversityRegCtlON = FALSE; + pDevice->bExistSWNetAddr = false; + /* pDevice->bDiversityRegCtlON = true; */ + pDevice->bDiversityRegCtlON = false; } @@ -345,24 +345,24 @@ static int device_init_registers(struct vnt_private *pDevice, ETH_ALEN); if ( !FIRMWAREbCheckVersion(pDevice) ) { - if (FIRMWAREbDownload(pDevice) == TRUE) { - if (FIRMWAREbBrach2Sram(pDevice) == FALSE) { + if (FIRMWAREbDownload(pDevice) == true) { + if (FIRMWAREbBrach2Sram(pDevice) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" FIRMWAREbBrach2Sram fail \n"); spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" FIRMWAREbDownload fail \n"); spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } } if ( !BBbVT3184Init(pDevice) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" BBbVT3184Init fail \n"); spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } } @@ -384,7 +384,7 @@ static int device_init_registers(struct vnt_private *pDevice, if ( ntStatus != STATUS_SUCCESS ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Issue Card init fail \n"); spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } if (InitType == DEVICE_INIT_COLD) { @@ -393,7 +393,7 @@ static int device_init_registers(struct vnt_private *pDevice, if (ntStatus != STATUS_SUCCESS) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Cardinit request in status fail!\n"); spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } /* local ID for AES functions */ @@ -406,17 +406,17 @@ static int device_init_registers(struct vnt_private *pDevice, if ( ntStatus != STATUS_SUCCESS ) { spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } /* do MACbSoftwareReset in MACvInitialize */ /* force CCK */ - pDevice->bCCK = TRUE; - pDevice->bProtectMode = FALSE; + pDevice->bCCK = true; + pDevice->bProtectMode = false; /* only used in 11g type, sync with ERP IE */ - pDevice->bNonERPPresent = FALSE; - pDevice->bBarkerPreambleMd = FALSE; + pDevice->bNonERPPresent = false; + pDevice->bBarkerPreambleMd = false; if ( pDevice->bFixRate ) { pDevice->wCurrentRate = (WORD) pDevice->uConnectionRate; } else { @@ -470,9 +470,9 @@ static int device_init_registers(struct vnt_private *pDevice, byAntenna = pDevice->abyEEPROM[EEP_OFS_ANTENNA]; if (byAntenna & EEP_ANTINV) - pDevice->bTxRxAntInv = TRUE; + pDevice->bTxRxAntInv = true; else - pDevice->bTxRxAntInv = FALSE; + pDevice->bTxRxAntInv = false; byAntenna &= (EEP_ANTENNA_AUX | EEP_ANTENNA_MAIN); @@ -484,29 +484,29 @@ static int device_init_registers(struct vnt_private *pDevice, 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; if (pDevice->bDiversityRegCtlON) - pDevice->bDiversityEnable = TRUE; + pDevice->bDiversityEnable = true; else - pDevice->bDiversityEnable = FALSE; + pDevice->bDiversityEnable = false; } else { - pDevice->bDiversityEnable = FALSE; + pDevice->bDiversityEnable = false; pDevice->byAntennaCount = 1; pDevice->dwTxAntennaSel = 0; pDevice->dwRxAntennaSel = 0; if (byAntenna & 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; @@ -604,10 +604,10 @@ static int device_init_registers(struct vnt_private *pDevice, */ if (pDevice->byBBType == BB_TYPE_11A) { CARDbAddBasicRate(pDevice, RATE_6M); - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; } else { CARDbAddBasicRate(pDevice, RATE_1M); - pDevice->bShortSlotTime = FALSE; + pDevice->bShortSlotTime = false; } BBvSetShortSlotTime(pDevice); CARDvSetBSSMode(pDevice); @@ -619,7 +619,7 @@ static int device_init_registers(struct vnt_private *pDevice, } pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL]; - pDevice->bHWRadioOff = FALSE; + pDevice->bHWRadioOff = false; if ( (pDevice->byRadioCtl & EEP_RADIOCTL_ENABLE) != 0 ) { ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, @@ -630,14 +630,14 @@ static int device_init_registers(struct vnt_private *pDevice, if ( ntStatus != STATUS_SUCCESS ) { spin_unlock_irq(&pDevice->lock); - return FALSE; + return false; } if ( (byTmp & GPIO3_DATA) == 0 ) { - pDevice->bHWRadioOff = TRUE; + pDevice->bHWRadioOff = true; MACvRegBitsOn(pDevice,MAC_REG_GPIOCTL1,GPIO3_INTMD); } else { MACvRegBitsOff(pDevice,MAC_REG_GPIOCTL1,GPIO3_INTMD); - pDevice->bHWRadioOff = FALSE; + pDevice->bHWRadioOff = false; } } @@ -646,7 +646,7 @@ static int device_init_registers(struct vnt_private *pDevice, ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); MACvRegBitsOn(pDevice,MAC_REG_GPIOCTL0,0x01); - if ((pDevice->bHWRadioOff == TRUE) || (pDevice->bRadioControlOff == TRUE)) { + if ((pDevice->bHWRadioOff == true) || (pDevice->bRadioControlOff == true)) { CARDbRadioPowerOff(pDevice); } else { CARDbRadioPowerOn(pDevice); @@ -654,7 +654,7 @@ static int device_init_registers(struct vnt_private *pDevice, spin_unlock_irq(&pDevice->lock); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----INIbInitAdapter Exit\n"); - return TRUE; + return true; } #ifdef CONFIG_PM /* Minimal support for suspend and resume */ @@ -814,7 +814,7 @@ static void device_free_int_bufs(struct vnt_private *pDevice) } -static BOOL device_alloc_bufs(struct vnt_private *pDevice) +static bool device_alloc_bufs(struct vnt_private *pDevice) { PUSB_SEND_CONTEXT pTxContext; @@ -837,7 +837,7 @@ static BOOL device_alloc_bufs(struct vnt_private *pDevice) DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "alloc tx urb failed\n"); goto free_tx; } - pTxContext->bBoolInUse = FALSE; + pTxContext->bBoolInUse = false; } /* allocate RCB mem */ @@ -872,7 +872,7 @@ static BOOL device_alloc_bufs(struct vnt_private *pDevice) goto free_rx_tx; } pRCB->skb->dev = pDevice->dev; - pRCB->bBoolInUse = FALSE; + pRCB->bBoolInUse = false; EnqueueRCB(pDevice->FirstRecvFreeList, pDevice->LastRecvFreeList, pRCB); pDevice->NumRecvFreeList++; pRCB++; @@ -900,7 +900,7 @@ static BOOL device_alloc_bufs(struct vnt_private *pDevice) goto free_rx_tx; } - return TRUE; + return true; free_rx_tx: device_free_rx_bufs(pDevice); @@ -908,13 +908,13 @@ free_rx_tx: free_tx: device_free_tx_bufs(pDevice); - return FALSE; + return false; } -static BOOL device_init_defrag_cb(struct vnt_private *pDevice) +static bool device_init_defrag_cb(struct vnt_private *pDevice) { int i; PSDeFragControlBlock pDeF; @@ -930,11 +930,11 @@ static BOOL device_init_defrag_cb(struct vnt_private *pDevice) } pDevice->cbDFCB = CB_MAX_RX_FRAG; pDevice->cbFreeDFCB = pDevice->cbDFCB; - return TRUE; + return true; free_frag: device_free_frag_bufs(pDevice); - return FALSE; + return false; } @@ -961,11 +961,11 @@ int device_alloc_frag_buf(struct vnt_private *pDevice, pDeF->skb = dev_alloc_skb((int)pDevice->rx_buf_sz); if (pDeF->skb == NULL) - return FALSE; + return false; ASSERT(pDeF->skb); pDeF->skb->dev = pDevice->dev; - return TRUE; + return true; } @@ -975,19 +975,19 @@ static int device_open(struct net_device *dev) { struct vnt_private *pDevice = netdev_priv(dev); - pDevice->fWPA_Authened = FALSE; + pDevice->fWPA_Authened = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " device_open...\n"); pDevice->rx_buf_sz = MAX_TOTAL_SIZE_WITH_ALL_HEADERS; - if (device_alloc_bufs(pDevice) == FALSE) { + if (device_alloc_bufs(pDevice) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " device_alloc_bufs fail... \n"); return -ENOMEM; } - if (device_init_defrag_cb(pDevice)== FALSE) { + if (device_init_defrag_cb(pDevice)== false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Initial defragment cb fail \n"); goto free_rx_tx; } @@ -1001,7 +1001,7 @@ static int device_open(struct net_device *dev) /* read config file */ Read_config_file(pDevice); - if (device_init_registers(pDevice, DEVICE_INIT_COLD) == FALSE) { + if (device_init_registers(pDevice, DEVICE_INIT_COLD) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " init register fail\n"); goto free_all; } @@ -1013,11 +1013,11 @@ static int device_open(struct net_device *dev) memcpy(pDevice->vnt_mgmt.abyMACAddr, pDevice->abyCurrentNetAddr, ETH_ALEN); memcpy(pDevice->dev->dev_addr, pDevice->abyCurrentNetAddr, ETH_ALEN); - pDevice->bStopTx0Pkt = FALSE; - pDevice->bStopDataPkt = FALSE; - pDevice->bRoaming = FALSE; - pDevice->bIsRoaming = FALSE; - pDevice->bEnableRoaming = FALSE; + pDevice->bStopTx0Pkt = false; + pDevice->bStopDataPkt = false; + pDevice->bRoaming = false; + pDevice->bIsRoaming = false; + pDevice->bEnableRoaming = false; if (pDevice->bDiversityRegCtlON) { device_init_diversity_timer(pDevice); } @@ -1030,23 +1030,23 @@ static int device_open(struct net_device *dev) pDevice->int_interval = 100; /* max 100 microframes */ pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; - pDevice->bIsRxWorkItemQueued = TRUE; - pDevice->fKillEventPollingThread = FALSE; - pDevice->bEventAvailable = FALSE; + pDevice->bIsRxWorkItemQueued = true; + pDevice->fKillEventPollingThread = false; + pDevice->bEventAvailable = false; - pDevice->bWPADEVUp = FALSE; - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = FALSE; - pDevice->bWPASuppWextEnabled = FALSE; + pDevice->bWPADEVUp = false; + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = false; + pDevice->bWPASuppWextEnabled = false; pDevice->byReAssocCount = 0; RXvWorkItem(pDevice); INTvWorkItem(pDevice); /* 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)) { spin_lock_irq(&pDevice->lock); KeybSetDefaultKey( pDevice, &(pDevice->sKey), @@ -1106,22 +1106,22 @@ static int device_close(struct net_device *dev) memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); - pMgmt->bShareKeyAlgorithm = FALSE; - pDevice->bEncryptionEnable = FALSE; + pMgmt->bShareKeyAlgorithm = false; + pDevice->bEncryptionEnable = false; pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; spin_lock_irq(&pDevice->lock); for (uu = 0; uu < MAX_KEY_TABLE; uu++) MACvDisableKeyEntry(pDevice,uu); spin_unlock_irq(&pDevice->lock); - if ((pDevice->flags & DEVICE_FLAGS_UNPLUG) == FALSE) { + if ((pDevice->flags & DEVICE_FLAGS_UNPLUG) == false) { MACbShutdown(pDevice); } netif_stop_queue(pDevice->dev); MP_SET_FLAG(pDevice, fMP_DISCONNECTED); MP_CLEAR_FLAG(pDevice, fMP_POST_WRITES); MP_CLEAR_FLAG(pDevice, fMP_POST_READS); - pDevice->fKillEventPollingThread = TRUE; + pDevice->fKillEventPollingThread = true; del_timer(&pDevice->sTimerCommand); del_timer(&pMgmt->sTimerSecondCallback); @@ -1136,11 +1136,11 @@ static int device_close(struct net_device *dev) tasklet_kill(&pDevice->ReadWorkItem); tasklet_kill(&pDevice->EventWorkItem); - pDevice->bRoaming = FALSE; - pDevice->bIsRoaming = FALSE; - pDevice->bEnableRoaming = FALSE; - pDevice->bCmdRunning = FALSE; - pDevice->bLinkPass = FALSE; + pDevice->bRoaming = false; + pDevice->bIsRoaming = false; + pDevice->bEnableRoaming = false; + pDevice->bCmdRunning = false; + pDevice->bLinkPass = false; memset(pMgmt->abyCurrBSSID, 0, 6); pMgmt->eCurrState = WMAC_STATE_IDLE; @@ -1277,14 +1277,14 @@ static int Config_FileGetParameter(unsigned char *string, /* find target string start point */ start_p = kstrstr(source,buf1); if (start_p == NULL) - return FALSE; + return false; /* check if current config line is marked by "#" */ for (ii = 1; ; ii++) { if (memcmp(start_p - ii, "\n", 1) == 0) break; if (memcmp(start_p - ii, "#", 1) == 0) - return FALSE; + return false; } /* find target string end point */ @@ -1300,7 +1300,7 @@ static int Config_FileGetParameter(unsigned char *string, /* find value */ start_p = kstrstr(buf2,"="); if (start_p == NULL) - return FALSE; + return false; memset(buf1,0,100); strcpy(buf1,start_p+1); @@ -1314,7 +1314,7 @@ static int Config_FileGetParameter(unsigned char *string, } memcpy(dest,tmp_p,strlen(tmp_p)); - return TRUE; + return true; } /* if read fails, return NULL, or return data pointer */ @@ -1390,7 +1390,7 @@ static int Read_config_file(struct vnt_private *pDevice) /* get zonetype */ { memset(tmpbuffer,0,sizeof(tmpbuffer)); - if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer) ==TRUE) { + if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer) ==true) { if(memcmp(tmpbuffer,"USA",3)==0) { pDevice->config_file.ZoneType=ZoneType_USA; } @@ -1409,12 +1409,12 @@ static int Read_config_file(struct vnt_private *pDevice) /* get other parameter */ { memset(tmpbuffer,0,sizeof(tmpbuffer)); - if(Config_FileGetParameter("AUTHENMODE",tmpbuffer,buffer)==TRUE) { + if(Config_FileGetParameter("AUTHENMODE",tmpbuffer,buffer)==true) { pDevice->config_file.eAuthenMode = (int) simple_strtol(tmpbuffer, NULL, 10); } memset(tmpbuffer,0,sizeof(tmpbuffer)); - if(Config_FileGetParameter("ENCRYPTIONMODE",tmpbuffer,buffer)==TRUE) { + if(Config_FileGetParameter("ENCRYPTIONMODE",tmpbuffer,buffer)==true) { pDevice->config_file.eEncryptionStatus= (int) simple_strtol(tmpbuffer, NULL, 10); } } diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 43965bc..527c259f 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -114,13 +114,13 @@ void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval) pMgmt->wCountToWakeUp = 0; } - pDevice->bEnablePSMode = TRUE; + pDevice->bEnablePSMode = true; /* We don't send null pkt in ad hoc mode since beacon will handle this. */ 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"); } @@ -146,12 +146,12 @@ void PSvDisablePowerSaving(struct vnt_private *pDevice) /* set always listen beacon */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN); - pDevice->bEnablePSMode = FALSE; + pDevice->bEnablePSMode = false; if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) PSbSendNullPacket(pDevice); - pDevice->bPWBitOn = FALSE; + pDevice->bPWBitOn = false; } /* @@ -160,8 +160,8 @@ void PSvDisablePowerSaving(struct vnt_private *pDevice) * Consider to power down when no more packets to tx or rx. * * Return Value: - * TRUE, if power down success - * FALSE, if fail + * true, if power down success + * false, if fail */ int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA, @@ -175,21 +175,21 @@ int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA, MAC_REG_PSCTL, &byData); if ((byData & PSCTL_PS) != 0) - return TRUE; + return true; if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { /* check if in TIM wake period */ if (pMgmt->bInTIMWake) - return FALSE; + return false; } /* check scan state */ if (pDevice->bCmdRunning) - return FALSE; + return false; /* Tx Burst */ if (pDevice->bPSModeTxBurst) - return FALSE; + return false; /* Froce PSEN on */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN); @@ -197,16 +197,16 @@ int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA, if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0 || pMgmt->wCountToWakeUp == 1)) { - return FALSE; + return false; } } - pDevice->bPSRxBeacon = TRUE; + pDevice->bPSRxBeacon = true; /* no Tx, no Rx isr, now go to Doze */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); - return TRUE; + return true; } /* @@ -265,12 +265,12 @@ int PSbSendNullPacket(struct vnt_private *pDevice) struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; u16 flags = 0; - if (pDevice->bLinkPass == FALSE) - return FALSE; + if (pDevice->bLinkPass == false) + return false; - if ((pDevice->bEnablePSMode == FALSE) && - (pDevice->fTxDataInSleep == FALSE)) { - return FALSE; + if ((pDevice->bEnablePSMode == false) && + (pDevice->fTxDataInSleep == false)) { + return false; } memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt) @@ -300,9 +300,9 @@ int PSbSendNullPacket(struct vnt_private *pDevice) /* log error if sending failed */ if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n"); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -318,7 +318,7 @@ int PSbSendNullPacket(struct vnt_private *pDevice) int PSbIsNextTBTTWakeUp(struct vnt_private *pDevice) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - int bWakeUp = FALSE; + int bWakeUp = false; if (pMgmt->wListenInterval >= 2) { if (pMgmt->wCountToWakeUp == 0) @@ -329,8 +329,8 @@ int PSbIsNextTBTTWakeUp(struct vnt_private *pDevice) if (pMgmt->wCountToWakeUp == 1) { /* Turn on wake up to listen next beacon */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN); - pDevice->bPSRxBeacon = FALSE; - bWakeUp = TRUE; + pDevice->bPSRxBeacon = false; + bWakeUp = true; } else if (!pDevice->bPSRxBeacon) { /* Listen until RxBeacon */ MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN); diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c index 5785eec..a415705 100644 --- a/drivers/staging/vt6656/rf.c +++ b/drivers/staging/vt6656/rf.c @@ -719,7 +719,7 @@ const u8 RFaby11aChannelIndex[200] = { * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; false if failed. * */ int IFRFbWriteEmbedded(struct vnt_private *pDevice, u32 dwData) @@ -735,7 +735,7 @@ int IFRFbWriteEmbedded(struct vnt_private *pDevice, u32 dwData) MESSAGE_TYPE_WRITE_IFRF, 0, 0, 4, pbyData); - return TRUE; + return true; } @@ -749,16 +749,16 @@ int IFRFbWriteEmbedded(struct vnt_private *pDevice, u32 dwData) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; false if failed. * */ int RFbSetPower(struct vnt_private *pDevice, u32 uRATE, u32 uCH) { - int bResult = TRUE; + int bResult = true; u8 byPwr = pDevice->byCCKPwr; if (pDevice->dwDiagRefCount) - return TRUE; + return true; if (uCH == 0) return -EINVAL; @@ -801,16 +801,16 @@ int RFbSetPower(struct vnt_private *pDevice, u32 uRATE, u32 uCH) * Out: * none * - * Return Value: TRUE if succeeded; FALSE if failed. + * Return Value: true if succeeded; false if failed. * */ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) { - int bResult = TRUE; + int bResult = true; if (pDevice->byCurPwr == byPwr) - return TRUE; + return true; pDevice->byCurPwr = byPwr; @@ -818,7 +818,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) case RF_AL2230 : if (pDevice->byCurPwr >= AL2230_PWR_IDX_LEN) - return FALSE; + return false; bResult &= IFRFbWriteEmbedded(pDevice, dwAL2230PowerTable[pDevice->byCurPwr]); if (uRATE <= RATE_11M) bResult &= IFRFbWriteEmbedded(pDevice, 0x0001B400+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW); @@ -828,7 +828,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) case RF_AL2230S : if (pDevice->byCurPwr >= AL2230_PWR_IDX_LEN) - return FALSE; + return false; bResult &= IFRFbWriteEmbedded(pDevice, dwAL2230PowerTable[pDevice->byCurPwr]); if (uRATE <= RATE_11M) { bResult &= IFRFbWriteEmbedded(pDevice, 0x040C1400+(BY_AL2230_REG_LEN<<3)+IFREGCTL_REGW); @@ -851,7 +851,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) bResult &= IFRFbWriteEmbedded(pDevice, 0x221BB900+(BY_AL7230_REG_LEN<<3)+IFREGCTL_REGW); } - if (pDevice->byCurPwr > AL7230_PWR_IDX_LEN) return FALSE; + if (pDevice->byCurPwr > AL7230_PWR_IDX_LEN) return false; // 0x080F1B00 for 3 wire control TxGain(D10) and 0x31 as TX Gain value dwMax7230Pwr = 0x080C0B00 | ( (pDevice->byCurPwr) << 12 ) | @@ -867,7 +867,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) DWORD dwVT3226Pwr; if (pDevice->byCurPwr >= VT3226_PWR_IDX_LEN) - return FALSE; + return false; dwVT3226Pwr = ((0x3F-pDevice->byCurPwr) << 20 ) | ( 0x17 << 8 ) /* Reg7 */ | (BY_VT3226_REG_LEN << 3 ) | IFREGCTL_REGW; bResult &= IFRFbWriteEmbedded(pDevice, dwVT3226Pwr); @@ -879,7 +879,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) DWORD dwVT3226Pwr; if (pDevice->byCurPwr >= VT3226_PWR_IDX_LEN) - return FALSE; + return false; if (uRATE <= RATE_11M) { @@ -924,7 +924,7 @@ int RFbRawSetPower(struct vnt_private *pDevice, u8 byPwr, u32 uRATE) DWORD dwVT3342Pwr; if (pDevice->byCurPwr >= VT3342_PWR_IDX_LEN) - return FALSE; + return false; dwVT3342Pwr = ((0x3F-pDevice->byCurPwr) << 20 ) | ( 0x27 << 8 ) /* Reg7 */ | (BY_VT3342_REG_LEN << 3 ) | IFREGCTL_REGW; @@ -1125,7 +1125,7 @@ void RFbRFTableDownload(struct vnt_private *pDevice) int s_bVT3226D0_11bLoCurrentAdjust(struct vnt_private *pDevice, u8 byChannel, int b11bMode) { - int bResult = TRUE; + int bResult = true; if (b11bMode) bResult &= IFRFbWriteEmbedded(pDevice, diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index 92343f2..b939dcf 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c @@ -169,8 +169,8 @@ static void *s_vGetFreeContext(struct vnt_private *pDevice) for (ii = 0; ii < pDevice->cbTD; ii++) { pContext = pDevice->apTD[ii]; - if (pContext->bBoolInUse == FALSE) { - pContext->bBoolInUse = TRUE; + if (pContext->bBoolInUse == false) { + pContext->bBoolInUse = true; pReturnContext = pContext; break; } @@ -562,7 +562,7 @@ static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType, break; } - ASSERT(FALSE); + ASSERT(false); return 0; } @@ -1102,7 +1102,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, { u32 cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */ u16 wFifoCtl; - int bDisCRC = FALSE; + int bDisCRC = false; u8 byFBOption = AUTO_FB_NONE; //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter...\n"); @@ -1111,7 +1111,7 @@ static void s_vGenerateTxParameter(struct vnt_private *pDevice, wFifoCtl = pFifoHead->wFIFOCtl; if (wFifoCtl & FIFOCTL_CRCDIS) { - bDisCRC = TRUE; + bDisCRC = true; } if (wFifoCtl & FIFOCTL_AUTO_FB_0) { @@ -1227,13 +1227,13 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, u16 wTxBufSize; u32 dwMICKey0, dwMICKey1, dwMIC_Priority, dwCRC; u32 *pdwMIC_L, *pdwMIC_R; - int bSoftWEP = FALSE; + int bSoftWEP = false; pvRrvTime = pMICHDR = pvRTS = pvCTS = pvTxDataHd = NULL; if (bNeedEncryption && pTransmitKey->pvKeyTable) { - if (((PSKeyTable)pTransmitKey->pvKeyTable)->bSoftWEP == TRUE) - bSoftWEP = TRUE; /* WEP 256 */ + if (((PSKeyTable)pTransmitKey->pvKeyTable)->bSoftWEP == true) + bSoftWEP = true; /* WEP 256 */ } pTxBufHead = (PTX_BUFFER) usbPacketBuf; @@ -1256,23 +1256,23 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pTxBufHead->wFIFOCtl |= (WORD)(byPktType<<8); if (pDevice->dwDiagRefCount != 0) { - bNeedACK = FALSE; + bNeedACK = false; pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK); } else { //if (pDevice->dwDiagRefCount != 0) { if ((pDevice->eOPMode == OP_MODE_ADHOC) || (pDevice->eOPMode == OP_MODE_AP)) { if (is_multicast_ether_addr(psEthHeader->abyDstAddr)) { - bNeedACK = FALSE; + bNeedACK = false; pTxBufHead->wFIFOCtl = pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK); } else { - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; } } else { // MSDUs in Infra mode always need ACK - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; } } //if (pDevice->dwDiagRefCount != 0) { @@ -1296,7 +1296,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pTxBufHead->wFragCtl |= (WORD)(cbMACHdLen << 10); //Set FIFOCTL_GrpAckPolicy - if (pDevice->bGrpAckPolicy == TRUE) {//0000 0100 0000 0000 + if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000 pTxBufHead->wFIFOCtl |= FIFOCTL_GRPACK; } @@ -1311,7 +1311,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } } - if (bSoftWEP != TRUE) { + if (bSoftWEP != true) { if ((bNeedEncryption) && (pTransmitKey != NULL)) { //WEP enabled if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { //WEP40 or WEP104 pTxBufHead->wFragCtl |= FRAGCTL_LEGACY; @@ -1342,7 +1342,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, cbICVlen = 8;//MIC cbMICHDR = sizeof(SMICHDRHead); } - if (bSoftWEP == FALSE) { + if (bSoftWEP == false) { //MAC Header should be padding 0 to DW alignment. uPadding = 4 - (cbMACHdLen%4); uPadding %= 4; @@ -1351,10 +1351,10 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen; - if ( (bNeedACK == FALSE) ||(cbFrameSize < pDevice->wRTSThreshold) ) { - bRTS = FALSE; + if ( (bNeedACK == false) ||(cbFrameSize < pDevice->wRTSThreshold) ) { + bRTS = false; } else { - bRTS = TRUE; + bRTS = true; pTxBufHead->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY); } @@ -1362,7 +1362,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, wTxBufSize = sizeof(STxBufHead); 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); @@ -1380,7 +1380,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } } 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); @@ -1388,7 +1388,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pvTxDataHd = (PSTxDataHead_g_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR + sizeof(SRTS_g_FB)); cbHeaderLength = wTxBufSize + sizeof(SRrvTime_gRTS) + cbMICHDR + sizeof(SRTS_g_FB) + sizeof(STxDataHead_g_FB); } - else if (bRTS == FALSE) { //RTS_needless + else if (bRTS == false) { //RTS_needless pvRrvTime = (PSRrvTime_gCTS) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_gCTS)); pvRTS = NULL; @@ -1400,7 +1400,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } else {//802.11a/b packet if (byFBOption == AUTO_FB_NONE) { - if (bRTS == TRUE) {//RTS_need + if (bRTS == true) {//RTS_need pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvRTS = (PSRTS_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR); @@ -1408,7 +1408,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pvTxDataHd = (PSTxDataHead_ab) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR + sizeof(SRTS_ab)); cbHeaderLength = wTxBufSize + sizeof(PSRrvTime_ab) + cbMICHDR + sizeof(SRTS_ab) + sizeof(STxDataHead_ab); } - else if (bRTS == FALSE) { //RTS_needless, no MICHDR + else if (bRTS == false) { //RTS_needless, no MICHDR pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvRTS = NULL; @@ -1418,7 +1418,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } } 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); @@ -1426,7 +1426,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pvTxDataHd = (PSTxDataHead_a_FB) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab) + cbMICHDR + sizeof(SRTS_a_FB)); cbHeaderLength = wTxBufSize + sizeof(PSRrvTime_ab) + cbMICHDR + sizeof(SRTS_a_FB) + sizeof(STxDataHead_a_FB); } - else if (bRTS == FALSE) { //RTS_needless + else if (bRTS == false) { //RTS_needless pvRrvTime = (PSRrvTime_ab) (pbyTxBufferAddr + wTxBufSize); pMICHDR = (PSMICHDRHead) (pbyTxBufferAddr + wTxBufSize + sizeof(SRrvTime_ab)); pvRTS = NULL; @@ -1462,7 +1462,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, s_vGenerateMACHeader(pDevice, pbyMacHdr, (WORD)uDuration, psEthHeader, bNeedEncryption, byFragType, uDMAIdx, 0); - if (bNeedEncryption == TRUE) { + if (bNeedEncryption == true) { //Fill TXKEY s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, pbyMacHdr, (WORD)cbFrameBodySize, (PBYTE)pMICHDR); @@ -1507,7 +1507,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, ASSERT(uLength == cbNdisBodySize); - if ((bNeedEncryption == TRUE) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { + if ((bNeedEncryption == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) { /////////////////////////////////////////////////////////////////// @@ -1547,10 +1547,10 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, 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; + pDevice->bTxMICFail = false; } //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderLength, uPadding, cbIVlen); @@ -1558,17 +1558,17 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, } - if (bSoftWEP == TRUE) { + if (bSoftWEP == true) { s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (WORD)(cbFrameBodySize + cbMIClen)); - } else if ( ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) && (bNeedEncryption == TRUE)) || - ((pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) && (bNeedEncryption == TRUE)) || - ((pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) && (bNeedEncryption == TRUE)) ) { + } else if ( ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) && (bNeedEncryption == true)) || + ((pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) && (bNeedEncryption == true)) || + ((pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) && (bNeedEncryption == true)) ) { cbFrameSize -= cbICVlen; } - if (pDevice->bSoftwareGenCrcErr == TRUE) { + if (pDevice->bSoftwareGenCrcErr == true) { unsigned int cbLen; PDWORD pdwCRC; @@ -1593,7 +1593,7 @@ static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType, pTxBufHead->wFragCtl |= (WORD)byFragType; - return TRUE; + return true; } @@ -1706,7 +1706,7 @@ static void s_vGenerateMACHeader(struct vnt_private *pDevice, * Out: * none * - * Return Value: CMD_STATUS_PENDING if MAC Tx resource available; otherwise FALSE + * Return Value: CMD_STATUS_PENDING if MAC Tx resource available; otherwise false * -*/ @@ -1723,7 +1723,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, u8 byPktType, *pbyTxBufferAddr; void *pvRTS, *pvTxDataHd, *pvRrvTime, *pMICHDR; u32 uDuration, cbReqCount, cbHeaderSize, cbFrameBodySize, cbFrameSize; - int bNeedACK, bIsPSPOLL = FALSE; + int bNeedACK, bIsPSPOLL = false; u32 cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, cbFCSlen = 4; u32 uPadding = 0; u16 wTxBufSize; @@ -1784,10 +1784,10 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, pTxBufHead->wTimeStamp = cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us); if (is_multicast_ether_addr(pPacket->p80211Header->sA3.abyAddr1)) { - bNeedACK = FALSE; + bNeedACK = false; } else { - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; }; @@ -1799,7 +1799,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, //pDevice->byPreambleType = PREAMBLE_LONG; // probe-response don't retry //if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_MGMT_PROBE_RSP) { - // bNeedACK = FALSE; + // bNeedACK = false; // pTxBufHead->wFIFOCtl &= (~FIFOCTL_NEEDACK); //} } @@ -1807,7 +1807,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, 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; @@ -1819,7 +1819,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, // Notes: // Although spec says MMPDU can be fragmented; In most case, // no one will send a MMPDU under fragmentation. With RTS may occur. - pDevice->bAES = FALSE; //Set FRAGCTL_WEPTYP + pDevice->bAES = false; //Set FRAGCTL_WEPTYP if (WLAN_GET_FC_ISWEP(pPacket->p80211Header->sA4.wFrameCtl) != 0) { if (pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) { @@ -1840,7 +1840,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, 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); @@ -1850,7 +1850,7 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, 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() @@ -1911,12 +1911,12 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, pbyPayloadHead = (PBYTE)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen); 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) { + 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; } @@ -1927,13 +1927,13 @@ CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice, } // get group key pbyBSSID = pDevice->abyBroadcastAddr; - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) { pTransmitKey = NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KEY is NULL. OP Mode[%d]\n", pDevice->eOPMode); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n"); } - } while(FALSE); + } while(false); //Fill TXKEY s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey, (PBYTE)pMACHeader, (WORD)cbFrameBodySize, NULL); @@ -2029,7 +2029,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ); //Get Duration and TimeStampOff pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_A, cbFrameSize, PK_TYPE_11A, - wCurrentRate, FALSE, 0, 0, 1, AUTO_FB_NONE)); + wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE)); pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; cbHeaderSize = wTxBufSize + sizeof(STxDataHead_ab); } else { @@ -2042,7 +2042,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice, ); //Get Duration and TimeStampOff pTxDataHead->wDuration = cpu_to_le16((WORD)s_uGetDataDuration(pDevice, DATADUR_B, cbFrameSize, PK_TYPE_11B, - wCurrentRate, FALSE, 0, 0, 1, AUTO_FB_NONE)); + wCurrentRate, false, 0, 0, 1, AUTO_FB_NONE)); pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE]; cbHeaderSize = wTxBufSize + sizeof(STxDataHead_ab); } @@ -2082,7 +2082,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) u32 uDuration, cbReqCount; PS802_11Header pMACHeader; u32 cbHeaderSize, cbFrameBodySize; - int bNeedACK, bIsPSPOLL = FALSE; + int bNeedACK, bIsPSPOLL = false; PSTxBufHead pTxBufHead; u32 cbFrameSize; u32 cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, cbFCSlen = 4; @@ -2098,7 +2098,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) u32 wCurrentRate = RATE_1M; PUWLAN_80211HDR p80211Header; u32 uNodeIndex = 0; - int bNodeExist = FALSE; + int bNodeExist = false; SKeyItem STempKey; PSKeyItem pTransmitKey = NULL; u8 *pbyIVHead, *pbyPayloadHead, *pbyMacHdr; @@ -2169,18 +2169,18 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) pTxBufHead->wTimeStamp = cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us); if (is_multicast_ether_addr(p80211Header->sA3.abyAddr1)) { - bNeedACK = FALSE; + bNeedACK = false; if (pDevice->bEnableHostWEP) { uNodeIndex = 0; - bNodeExist = TRUE; + bNodeExist = true; } } else { if (pDevice->bEnableHostWEP) { if (BSSbIsSTAInNodeDB(pDevice, (PBYTE)(p80211Header->sA3.abyAddr1), &uNodeIndex)) - bNodeExist = TRUE; + bNodeExist = true; } - bNeedACK = TRUE; + bNeedACK = true; pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK; }; @@ -2193,7 +2193,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) // probe-response don't retry //if ((p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_MGMT_PROBE_RSP) { - // bNeedACK = FALSE; + // bNeedACK = false; // pTxBufHead->wFIFOCtl &= (~FIFOCTL_NEEDACK); //} } @@ -2201,7 +2201,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) 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; @@ -2230,7 +2230,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) // Notes: // Although spec says MMPDU can be fragmented; In most case, // no one will send a MMPDU under fragmentation. With RTS may occur. - pDevice->bAES = FALSE; //Set FRAGCTL_WEPTYP + pDevice->bAES = false; //Set FRAGCTL_WEPTYP if (WLAN_GET_FC_ISWEP(p80211Header->sA4.wFrameCtl) != 0) { @@ -2253,7 +2253,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) 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); @@ -2263,7 +2263,7 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) 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() @@ -2380,10 +2380,10 @@ void vDMA0_tx_80211(struct vnt_private *pDevice, struct sk_buff *skb) 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; + pDevice->bTxMICFail = false; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize); @@ -2473,20 +2473,20 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u16 wAID; u8 byPktType; - int bNeedEncryption = FALSE; + int bNeedEncryption = false; PSKeyItem pTransmitKey = NULL; SKeyItem STempKey; int ii; - int bTKIP_UseGTK = FALSE; - int bNeedDeAuth = FALSE; + int bTKIP_UseGTK = false; + int bNeedDeAuth = false; u8 *pbyBSSID; - int bNodeExist = FALSE; + int bNodeExist = false; PUSB_SEND_CONTEXT pContext; - BOOL fConvertedPacket; + bool fConvertedPacket; PTX_BUFFER pTX_Buffer; u32 status; u16 wKeepRate = pDevice->wCurrentRate; - int bTxeapol_key = FALSE; + int bTxeapol_key = false; if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) { @@ -2498,7 +2498,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, if (is_multicast_ether_addr((PBYTE)(skb->data))) { uNodeIndex = 0; - bNodeExist = TRUE; + bNodeExist = true; if (pMgmt->sNodeDBTable[0].bPSEnable) { skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb); @@ -2543,11 +2543,11 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, }else { pDevice->byPreambleType = PREAMBLE_LONG; } - bNodeExist = TRUE; + bNodeExist = true; } } - if (bNodeExist == FALSE) { + if (bNodeExist == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Unknown STA not found in node DB \n"); dev_kfree_skb_irq(skb); return 0; @@ -2579,22 +2579,22 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, /* 802.1x OR eapol-key challenge frame transfer */ if (((Protocol_Version == 1) || (Protocol_Version == 2)) && (Packet_Type == 3)) { - bTxeapol_key = TRUE; + bTxeapol_key = true; if(!(Key_info & BIT3) && //WPA or RSN group-key challenge (Key_info & BIT8) && (Key_info & BIT9)) { //send 2/2 key if(Descriptor_type==254) { - pDevice->fWPA_Authened = TRUE; + pDevice->fWPA_Authened = true; PRINT_K("WPA "); } else { - pDevice->fWPA_Authened = TRUE; + pDevice->fWPA_Authened = true; PRINT_K("WPA2(re-keying) "); } PRINT_K("Authentication completed!!\n"); } else if((Key_info & BIT3) && (Descriptor_type==2) && //RSN pairwise-key challenge (Key_info & BIT8) && (Key_info & BIT9)) { - pDevice->fWPA_Authened = TRUE; + pDevice->fWPA_Authened = true; PRINT_K("WPA2 Authentication completed!!\n"); } } @@ -2602,18 +2602,18 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, } //mike add:station mode check eapol-key challenge<--- - if (pDevice->bEncryptionEnable == TRUE) { - bNeedEncryption = TRUE; + if (pDevice->bEncryptionEnable == true) { + bNeedEncryption = true; // get Transmit key do { if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { pbyBSSID = pDevice->abyBSSID; // get pairwise key - if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == FALSE) { + 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; } @@ -2630,12 +2630,12 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, 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 pbyBSSID = pDevice->abyBroadcastAddr; - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) { pTransmitKey = NULL; if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS and KEY is NULL. [%d]\n", pMgmt->eCurrMode); @@ -2643,15 +2643,15 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, else DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pMgmt->eCurrMode); } else { - bTKIP_UseGTK = TRUE; + bTKIP_UseGTK = true; DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n"); } - } while(FALSE); + } while(false); } 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; @@ -2750,23 +2750,23 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, byPktType = PK_TYPE_11B; } - 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) == cpu_to_be16(ETH_P_PAE)) { - bNeedEncryption = FALSE; + bNeedEncryption = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.wType)); if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { if (pTransmitKey == NULL) { 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 [%X]\n", pTransmitKey->dwKeyIndex); - bNeedEncryption = TRUE; + bNeedEncryption = true; } } } @@ -2776,7 +2776,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, (pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%X]\n", pTransmitKey->dwKeyIndex); - bNeedEncryption = TRUE; + bNeedEncryption = true; } } } @@ -2784,7 +2784,7 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, if (pTransmitKey == NULL) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"return no tx key\n"); - pContext->bBoolInUse = FALSE; + pContext->bBoolInUse = false; dev_kfree_skb_irq(skb); pStats->tx_dropped++; return STATUS_FAILURE; @@ -2800,18 +2800,18 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, &uHeaderLen, &BytesToWrite ); - if (fConvertedPacket == FALSE) { - pContext->bBoolInUse = FALSE; + if (fConvertedPacket == false) { + pContext->bBoolInUse = false; dev_kfree_skb_irq(skb); return STATUS_FAILURE; } - if ( pDevice->bEnablePSMode == TRUE ) { + if ( pDevice->bEnablePSMode == true ) { if ( !pDevice->bPSModeTxBurst ) { bScheduleCommand((void *) pDevice, WLAN_CMD_MAC_DISPOWERSAVING, NULL); - pDevice->bPSModeTxBurst = TRUE; + pDevice->bPSModeTxBurst = true; } } @@ -2827,14 +2827,14 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, status = PIPEnsSendBulkOut(pDevice,pContext); - if (bNeedDeAuth == TRUE) { + if (bNeedDeAuth == true) { WORD wReason = WLAN_MGMT_REASON_MIC_FAILURE; bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (PBYTE) &wReason); } if(status!=STATUS_PENDING) { - pContext->bBoolInUse = FALSE; + pContext->bBoolInUse = false; dev_kfree_skb_irq(skb); return STATUS_FAILURE; } @@ -2855,9 +2855,9 @@ int nsDMA_tx_packet(struct vnt_private *pDevice, * pPacket - Pointer to rx packet * cbPacketSize - rx ethernet frame size * Out: - * TURE, FALSE + * TURE, false * - * Return Value: Return TRUE if packet is copy to dma1; otherwise FALSE + * Return Value: Return true if packet is copy to dma1; otherwise false */ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, @@ -2866,7 +2866,7 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; u32 BytesToWrite = 0, uHeaderLen = 0; u8 byPktType = PK_TYPE_11B; - int bNeedEncryption = FALSE; + int bNeedEncryption = false; SKeyItem STempKey; PSKeyItem pTransmitKey = NULL; u8 *pbyBSSID; @@ -2882,16 +2882,16 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, pContext = (PUSB_SEND_CONTEXT)s_vGetFreeContext(pDevice); if (NULL == pContext) { - return FALSE; + return false; } memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)pbySkbData, ETH_HLEN); - if (pDevice->bEncryptionEnable == TRUE) { - bNeedEncryption = TRUE; + if (pDevice->bEncryptionEnable == true) { + bNeedEncryption = true; // get group key pbyBSSID = pDevice->abyBroadcastAddr; - if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == FALSE) { + if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) { pTransmitKey = NULL; DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"KEY is NULL. [%d]\n", pMgmt->eCurrMode); } else { @@ -2915,8 +2915,8 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, } if ( bNeedEncryption && (pTransmitKey == NULL) ) { - pContext->bBoolInUse = FALSE; - return FALSE; + pContext->bBoolInUse = false; + return false; } byPktTyp = (BYTE)pDevice->byPacketType; @@ -2964,9 +2964,9 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, &uHeaderLen, &BytesToWrite ); - if (fConvertedPacket == FALSE) { - pContext->bBoolInUse = FALSE; - return FALSE; + if (fConvertedPacket == false) { + pContext->bBoolInUse = false; + return false; } pTX_Buffer = (PTX_BUFFER)&(pContext->Data[0]); @@ -2981,6 +2981,6 @@ int bRelayPacketSend(struct vnt_private *pDevice, u8 *pbySkbData, u32 uDataLen, status = PIPEnsSendBulkOut(pDevice,pContext); - return TRUE; + return true; } diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c index 083b215..95286c4 100644 --- a/drivers/staging/vt6656/tether.c +++ b/drivers/staging/vt6656/tether.c @@ -93,16 +93,16 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr) * Out: * none * - * Return Value: TRUE if ok; FALSE if error. + * Return Value: true if ok; false if error. * */ -BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength) +bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength) { DWORD dwCRC; dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4); if (cpu_to_le32(*((PDWORD)(pbyBuffer + cbFrameLength - 4))) != dwCRC) - return FALSE; - return TRUE; + return false; + return true; } diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h index 8c1f5d2..2f8f485 100644 --- a/drivers/staging/vt6656/tether.h +++ b/drivers/staging/vt6656/tether.h @@ -161,6 +161,6 @@ S802_11Header, *PS802_11Header; BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr); //BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr); -BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength); +bool ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength); #endif /* __TETHER_H__ */ diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h index 89ab494..01187f1 100644 --- a/drivers/staging/vt6656/ttype.h +++ b/drivers/staging/vt6656/ttype.h @@ -33,15 +33,6 @@ /******* Common definitions and typedefs ***********************************/ -typedef int BOOL; - -#if !defined(TRUE) -#define TRUE 1 -#endif -#if !defined(FALSE) -#define FALSE 0 -#endif - /****** Simple typedefs ***************************************************/ typedef u8 BYTE; @@ -53,8 +44,6 @@ typedef u32 DWORD; typedef u32 ULONG_PTR; typedef u32 DWORD_PTR; -// boolean pointer - typedef BYTE * PBYTE; typedef WORD * PWORD; diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index 22a3dde..00fd0f8 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -311,11 +311,11 @@ int PIPEnsInterruptRead(struct vnt_private *pDevice) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartInterruptUsbRead()\n"); - if(pDevice->intBuf.bInUse == TRUE){ + if(pDevice->intBuf.bInUse == true){ return (STATUS_FAILURE); } - pDevice->intBuf.bInUse = TRUE; -// pDevice->bEventAvailable = FALSE; + pDevice->intBuf.bInUse = true; +// pDevice->bEventAvailable = false; pDevice->ulIntInPosted++; // @@ -383,7 +383,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) // otherwise interrupt data handler will free int buffer after it handle it. if (( ntStatus != STATUS_SUCCESS )) { pDevice->ulBulkInError++; - pDevice->intBuf.bInUse = FALSE; + pDevice->intBuf.bInUse = false; // if (ntStatus == USBD_STATUS_CRC) { // pDevice->ulIntInContCRCError++; @@ -391,20 +391,20 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb) // if (ntStatus == STATUS_NOT_CONNECTED ) // { - pDevice->fKillEventPollingThread = TRUE; + pDevice->fKillEventPollingThread = true; // } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus ); } else { pDevice->ulIntInBytesRead += (unsigned long) urb->actual_length; pDevice->ulIntInContCRCError = 0; - pDevice->bEventAvailable = TRUE; + pDevice->bEventAvailable = true; INTnsProcessData(pDevice); } STAvUpdateUSBCounter(&pDevice->scStatistic.USB_InterruptStat, ntStatus); - if (pDevice->fKillEventPollingThread != TRUE) { + if (pDevice->fKillEventPollingThread != true) { usb_fill_bulk_urb(pDevice->pInterruptURB, pDevice->usb, usb_rcvbulkpipe(pDevice->usb, 1), @@ -477,7 +477,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB) return STATUS_FAILURE ; } pRCB->Ref = 1; - pRCB->bBoolInUse= TRUE; + pRCB->bBoolInUse= true; return ntStatus; } @@ -505,8 +505,8 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) PRCB pRCB = (PRCB)urb->context; struct vnt_private *pDevice = pRCB->pDevice; unsigned long bytesRead; - int bIndicateReceive = FALSE; - int bReAllocSkb = FALSE; + int bIndicateReceive = false; + int bReAllocSkb = false; int status; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n"); @@ -528,7 +528,7 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) // } } else { if (bytesRead) - bIndicateReceive = TRUE; + bIndicateReceive = true; pDevice->ulBulkInContCRCError = 0; pDevice->ulBulkInBytesRead += bytesRead; @@ -540,8 +540,8 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) if (bIndicateReceive) { spin_lock(&pDevice->lock); - if (RXbBulkInProcessData(pDevice, pRCB, bytesRead) == TRUE) - bReAllocSkb = TRUE; + if (RXbBulkInProcessData(pDevice, pRCB, bytesRead) == true) + bReAllocSkb = true; spin_unlock(&pDevice->lock); } pRCB->Ref--; @@ -578,7 +578,7 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice, PUSB_SEND_CONTEXT pContext) - pDevice->bPWBitOn = FALSE; + pDevice->bPWBitOn = false; /* if (pDevice->pPendingBulkOutContext != NULL) { @@ -610,13 +610,13 @@ int PIPEnsSendBulkOut(struct vnt_private *pDevice, PUSB_SEND_CONTEXT pContext) if (status != 0) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Tx URB failed %d\n", status); - pContext->bBoolInUse = FALSE; + pContext->bBoolInUse = false; return STATUS_FAILURE; } return STATUS_PENDING; } else { - pContext->bBoolInUse = FALSE; + pContext->bBoolInUse = false; return STATUS_RESOURCES; } } @@ -715,11 +715,11 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb) } } - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { if (netif_queue_stopped(pDevice->dev)) netif_wake_queue(pDevice->dev); } - pContext->bBoolInUse = FALSE; + pContext->bBoolInUse = false; return; } diff --git a/drivers/staging/vt6656/wcmd.c b/drivers/staging/vt6656/wcmd.c index 51f48c1..4bb652b 100644 --- a/drivers/staging/vt6656/wcmd.c +++ b/drivers/staging/vt6656/wcmd.c @@ -114,18 +114,18 @@ static void vAdHocBeaconStop(struct vnt_private *pDevice) * or * (3.2) AdHoc channel is in A mode */ - bStop = FALSE; + bStop = false; if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState >= WMAC_STATE_STARTED)) { 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; } } @@ -319,7 +319,7 @@ void vRunCommand(struct vnt_private *pDevice) if (pDevice->dwDiagRefCount != 0) return; - if (pDevice->bCmdRunning != TRUE) + if (pDevice->bCmdRunning != true) return; spin_lock_irq(&pDevice->lock); @@ -329,7 +329,7 @@ void vRunCommand(struct vnt_private *pDevice) 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; @@ -357,7 +357,7 @@ void vRunCommand(struct vnt_private *pDevice) if (pDevice->bUpdateBBVGA) { BBvSetShortSlotTime(pDevice); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); - BBvUpdatePreEDThreshold(pDevice, FALSE); + BBvUpdatePreEDThreshold(pDevice, false); } // Set channel back vAdHocBeaconRestart(pDevice); @@ -369,7 +369,7 @@ void vRunCommand(struct vnt_private *pDevice) pDevice->byRxMode |= RCR_BSSID; } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); - pDevice->bStopDataPkt = FALSE; + pDevice->bStopDataPkt = false; s_bCommandComplete(pDevice); spin_unlock_irq(&pDevice->lock); return; @@ -395,7 +395,7 @@ void vRunCommand(struct vnt_private *pDevice) pDevice->bLinkPass); */ pMgmt->eScanState = WMAC_IS_SCANNING; pDevice->byScanBBType = pDevice->byBBType; //lucas - pDevice->bStopDataPkt = TRUE; + pDevice->bStopDataPkt = true; // Turn off RCR_BSSID filter every time MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_BSSID); pDevice->byRxMode &= ~RCR_BSSID; @@ -419,7 +419,7 @@ void vRunCommand(struct vnt_private *pDevice) if (pDevice->bUpdateBBVGA) { BBvSetShortSlotTime(pDevice); BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]); - BBvUpdatePreEDThreshold(pDevice, TRUE); + BBvUpdatePreEDThreshold(pDevice, true); } pMgmt->uScanChannel++; @@ -433,7 +433,7 @@ void vRunCommand(struct vnt_private *pDevice) pDevice->eCommandState = WLAN_CMD_SCAN_END; } - if ((pMgmt->b11hEnable == FALSE) || + if ((pMgmt->b11hEnable == false) || (pMgmt->uScanChannel < CB_MAX_CHANNEL_24G)) { s_vProbeChannel(pDevice); spin_unlock_irq(&pDevice->lock); @@ -460,7 +460,7 @@ void vRunCommand(struct vnt_private *pDevice) if (pDevice->bUpdateBBVGA) { BBvSetShortSlotTime(pDevice); BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); - BBvUpdatePreEDThreshold(pDevice, FALSE); + BBvUpdatePreEDThreshold(pDevice, false); } // Set channel back @@ -474,7 +474,7 @@ void vRunCommand(struct vnt_private *pDevice) } DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel); pMgmt->eScanState = WMAC_NO_SCANNING; - pDevice->bStopDataPkt = FALSE; + pDevice->bStopDataPkt = false; /*send scan event to wpa_Supplicant*/ PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n"); @@ -493,12 +493,12 @@ void vRunCommand(struct vnt_private *pDevice) return; } else { - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = FALSE; - pDevice->bWPASuppWextEnabled = FALSE; - pDevice->fWPA_Authened = FALSE; + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = false; + pDevice->bWPASuppWextEnabled = false; + pDevice->fWPA_Authened = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n"); // reason = 8 : disassoc because sta has left @@ -507,18 +507,18 @@ void vRunCommand(struct vnt_private *pDevice) pMgmt->abyCurrBSSID, (8), &Status); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); // unlock command busy pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; pItemSSID->len = 0; memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN); pMgmt->eCurrState = WMAC_STATE_IDLE; - pMgmt->sNodeDBTable[0].bActive = FALSE; -// pDevice->bBeaconBufReady = FALSE; + pMgmt->sNodeDBTable[0].bActive = false; +// pDevice->bBeaconBufReady = false; } netif_stop_queue(pDevice->dev); - if (pDevice->bNeedRadioOFF == TRUE) + if (pDevice->bNeedRadioOFF == true) CARDbRadioPowerOff(pDevice); s_bCommandComplete(pDevice); break; @@ -527,7 +527,7 @@ void vRunCommand(struct vnt_private *pDevice) 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; @@ -560,7 +560,7 @@ void vRunCommand(struct vnt_private *pDevice) } } netif_stop_queue(pDevice->dev); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); } // set initial state @@ -597,9 +597,9 @@ void vRunCommand(struct vnt_private *pDevice) if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); - pMgmt->sNodeDBTable[0].bActive = TRUE; + pMgmt->sNodeDBTable[0].bActive = true; pMgmt->sNodeDBTable[0].uInActiveCount = 0; } else { @@ -630,7 +630,7 @@ void vRunCommand(struct vnt_private *pDevice) BSSvAddMulticastNode(pDevice); s_bClearBSSID_SCAN(pDevice); /* - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); @@ -640,7 +640,7 @@ void vRunCommand(struct vnt_private *pDevice) } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n"); - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -698,7 +698,7 @@ void vRunCommand(struct vnt_private *pDevice) */ pDevice->byLinkWaitCount = 0; pDevice->byReAssocCount = 0; - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); s_bClearBSSID_SCAN(pDevice); @@ -706,20 +706,20 @@ void vRunCommand(struct vnt_private *pDevice) netif_wake_queue(pDevice->dev); } - if(pDevice->IsTxDataTrigger != FALSE) { //TxDataTimer is not triggered at the first time + if(pDevice->IsTxDataTrigger != false) { //TxDataTimer is not triggered at the first time // printk("Re-initial TxDataTimer****\n"); del_timer(&pDevice->sTimerTxData); init_timer(&pDevice->sTimerTxData); pDevice->sTimerTxData.data = (unsigned long) pDevice; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback - pDevice->fTxDataInSleep = FALSE; + pDevice->fTxDataInSleep = false; pDevice->nTxDataTimeCout = 0; } else { // printk("mike:-->First time trigger TimerTxData InSleep\n"); } - pDevice->IsTxDataTrigger = TRUE; + pDevice->IsTxDataTrigger = true; add_timer(&pDevice->sTimerTxData); } @@ -745,15 +745,15 @@ void vRunCommand(struct vnt_private *pDevice) del_timer(&pMgmt->sTimerSecondCallback); pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrMode = WMAC_MODE_STANDBY; - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); - if (pDevice->bEnableHostWEP == TRUE) + if (pDevice->bEnableHostWEP == true) BSSvClearNodeDBTable(pDevice, 1); else BSSvClearNodeDBTable(pDevice, 0); pDevice->uAssocCount = 0; pMgmt->eCurrState = WMAC_STATE_IDLE; - pDevice->bFixRate = FALSE; + pDevice->bFixRate = false; vMgrCreateOwnIBSS((void *) pDevice, &Status); if (Status != CMD_STATUS_SUCCESS) { @@ -768,7 +768,7 @@ void vRunCommand(struct vnt_private *pDevice) if (netif_queue_stopped(pDevice->dev)){ netif_wake_queue(pDevice->dev); } - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); add_timer(&pMgmt->sTimerSecondCallback); } @@ -781,10 +781,10 @@ void vRunCommand(struct vnt_private *pDevice) while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) { if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) { pMgmt->abyPSTxMap[0] &= ~byMask[0]; - pDevice->bMoreData = FALSE; + pDevice->bMoreData = false; } else { - pDevice->bMoreData = TRUE; + pDevice->bMoreData = true; } if (nsDMA_tx_packet(pDevice, TYPE_AC0DMA, skb) != 0) { @@ -806,10 +806,10 @@ void vRunCommand(struct vnt_private *pDevice) // clear tx map pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &= ~byMask[pMgmt->sNodeDBTable[ii].wAID & 7]; - pDevice->bMoreData = FALSE; + pDevice->bMoreData = false; } else { - pDevice->bMoreData = TRUE; + pDevice->bMoreData = true; } if (nsDMA_tx_packet(pDevice, TYPE_AC0DMA, skb) != 0) { @@ -828,7 +828,7 @@ void vRunCommand(struct vnt_private *pDevice) ~byMask[pMgmt->sNodeDBTable[ii].wAID & 7]; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d PS queue clear \n", ii); } - pMgmt->sNodeDBTable[ii].bRxPSPoll = FALSE; + pMgmt->sNodeDBTable[ii].bRxPSPoll = false; } } @@ -838,7 +838,7 @@ void vRunCommand(struct vnt_private *pDevice) 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); @@ -866,31 +866,31 @@ void vRunCommand(struct vnt_private *pDevice) pDevice->cbFreeCmdQueue = CMD_Q_SIZE; pDevice->uCmdDequeueIdx = 0; pDevice->uCmdEnqueueIdx = 0; - //0415pDevice->bCmdRunning = FALSE; - pDevice->bCmdClear = TRUE; - pDevice->bStopTx0Pkt = FALSE; - pDevice->bStopDataPkt = TRUE; + //0415pDevice->bCmdRunning = false; + pDevice->bCmdClear = true; + pDevice->bStopTx0Pkt = false; + pDevice->bStopDataPkt = true; pDevice->byKeyIndex = 0; - pDevice->bTransmitKey = FALSE; + pDevice->bTransmitKey = false; spin_unlock_irq(&pDevice->lock); KeyvInitTable(pDevice,&pDevice->sKey); spin_lock_irq(&pDevice->lock); pMgmt->byCSSPK = KEY_CTL_NONE; pMgmt->byCSSGK = KEY_CTL_NONE; - if (pDevice->bLinkPass == TRUE) { + if (pDevice->bLinkPass == true) { // reason = 8 : disassoc because sta has left vMgrDisassocBeginSta((void *) pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; // unlock command busy pMgmt->eCurrState = WMAC_STATE_IDLE; - pMgmt->sNodeDBTable[0].bActive = FALSE; - // if(pDevice->bWPASuppWextEnabled == TRUE) + pMgmt->sNodeDBTable[0].bActive = false; + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -899,11 +899,11 @@ void vRunCommand(struct vnt_private *pDevice) wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL); } } - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = FALSE; - pDevice->bWPASuppWextEnabled = FALSE; + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = false; + pDevice->bWPASuppWextEnabled = false; //clear current SSID pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; pItemSSID->len = 0; @@ -917,10 +917,10 @@ void vRunCommand(struct vnt_private *pDevice) CARDbRadioPowerOff(pDevice); MACvRegBitsOn(pDevice,MAC_REG_GPIOCTL1,GPIO3_INTMD); ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_OFF); - pDevice->bHWRadioOff = TRUE; + pDevice->bHWRadioOff = true; } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_ON........................\n"); - pDevice->bHWRadioOff = FALSE; + pDevice->bHWRadioOff = false; CARDbRadioPowerOn(pDevice); MACvRegBitsOff(pDevice,MAC_REG_GPIOCTL1,GPIO3_INTMD); ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_ON); @@ -933,11 +933,11 @@ void vRunCommand(struct vnt_private *pDevice) case WLAN_CMD_CHANGE_BBSENSITIVITY_START: - pDevice->bStopDataPkt = TRUE; + pDevice->bStopDataPkt = true; pDevice->byBBVGACurrent = pDevice->byBBVGANew; BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change sensitivity pDevice->byBBVGACurrent = %x\n", pDevice->byBBVGACurrent); - pDevice->bStopDataPkt = FALSE; + pDevice->bStopDataPkt = false; s_bCommandComplete(pDevice); break; @@ -962,13 +962,13 @@ void vRunCommand(struct vnt_private *pDevice) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Change from Antenna%d to", (int)pDevice->dwRxAntennaSel); if ( pDevice->dwRxAntennaSel == 0) { pDevice->dwRxAntennaSel=1; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) BBvSetAntennaMode(pDevice, ANT_RXA); else BBvSetAntennaMode(pDevice, ANT_RXB); } else { pDevice->dwRxAntennaSel=0; - if (pDevice->bTxRxAntInv == TRUE) + if (pDevice->bTxRxAntInv == true) BBvSetAntennaMode(pDevice, ANT_RXB); else BBvSetAntennaMode(pDevice, ANT_RXA); @@ -999,9 +999,9 @@ void vRunCommand(struct vnt_private *pDevice) case WLAN_CMD_11H_CHSW_START: CARDbSetMediaChannel(pDevice, pDevice->byNewChannel); - pDevice->bChannelSwitch = FALSE; + pDevice->bChannelSwitch = false; pMgmt->uCurrChannel = pDevice->byNewChannel; - pDevice->bStopDataPkt = FALSE; + pDevice->bStopDataPkt = false; s_bCommandComplete(pDevice); break; @@ -1019,15 +1019,15 @@ static int s_bCommandComplete(struct vnt_private *pDevice) { struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; PWLAN_IE_SSID pSSID; - int bRadioCmd = FALSE; - int bForceSCAN = TRUE; + int bRadioCmd = false; + int bForceSCAN = true; pDevice->eCommandState = WLAN_CMD_IDLE; if (pDevice->cbFreeCmdQueue == CMD_Q_SIZE) { //Command Queue Empty - pDevice->bCmdRunning = FALSE; - return TRUE; + pDevice->bCmdRunning = false; + return true; } else { pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd; @@ -1036,7 +1036,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice) 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"); @@ -1048,7 +1048,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice) 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; @@ -1116,7 +1116,7 @@ static int s_bCommandComplete(struct vnt_private *pDevice) vCommandTimerWait(pDevice, 0); } - return TRUE; + return true; } int bScheduleCommand(struct vnt_private *pDevice, @@ -1124,15 +1124,15 @@ int bScheduleCommand(struct vnt_private *pDevice, { if (pDevice->cbFreeCmdQueue == 0) { - return (FALSE); + 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) { switch (eCommand) { case WLAN_CMD_BSSID_SCAN: - pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = FALSE; + pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = false; memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1); break; @@ -1163,12 +1163,12 @@ int bScheduleCommand(struct vnt_private *pDevice, ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdEnqueueIdx, CMD_Q_SIZE); pDevice->cbFreeCmdQueue--; - if (pDevice->bCmdRunning == FALSE) { + if (pDevice->bCmdRunning == false) { s_bCommandComplete(pDevice); } else { } - return (TRUE); + return (true); } @@ -1183,7 +1183,7 @@ int bScheduleCommand(struct vnt_private *pDevice, * Out: * none * - * Return Value: TRUE if success; otherwise FALSE + * Return Value: true if success; otherwise false * */ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice) @@ -1200,7 +1200,7 @@ static int s_bClearBSSID_SCAN(struct vnt_private *pDevice) break; } } - return TRUE; + return true; } @@ -1219,8 +1219,8 @@ void vResetCommandTimer(struct vnt_private *pDevice) pDevice->uCmdDequeueIdx = 0; pDevice->uCmdEnqueueIdx = 0; pDevice->eCommandState = WLAN_CMD_IDLE; - pDevice->bCmdRunning = FALSE; - pDevice->bCmdClear = FALSE; + pDevice->bCmdRunning = false; + pDevice->bCmdClear = false; } void BSSvSecondTxData(struct vnt_private *pDevice) @@ -1239,13 +1239,13 @@ void BSSvSecondTxData(struct vnt_private *pDevice) spin_lock_irq(&pDevice->lock); //is wap_supplicant running successful OR only open && sharekey mode! - if (((pDevice->bLinkPass == TRUE) && + if (((pDevice->bLinkPass == true) && (pMgmt->eAuthenMode < WMAC_AUTH_WPA)) || //open && sharekey linking - (pDevice->fWPA_Authened == TRUE)) { //wpa linking + (pDevice->fWPA_Authened == true)) { //wpa linking // printk("mike:%s-->InSleep Tx Data Procedure\n",__FUNCTION__); - pDevice->fTxDataInSleep = TRUE; + pDevice->fTxDataInSleep = true; PSbSendNullPacket(pDevice); //send null packet - pDevice->fTxDataInSleep = FALSE; + pDevice->fTxDataInSleep = false; } spin_unlock_irq(&pDevice->lock); diff --git a/drivers/staging/vt6656/wcmd.h b/drivers/staging/vt6656/wcmd.h index a3d0323..c40e6ba 100644 --- a/drivers/staging/vt6656/wcmd.h +++ b/drivers/staging/vt6656/wcmd.h @@ -74,9 +74,9 @@ typedef enum tagCMD_STATUS { typedef struct tagCMD_ITEM { CMD_CODE eCmd; BYTE abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; - BOOL bNeedRadioOFF; - BOOL bRadioCmd; - BOOL bForceSCAN; + bool bNeedRadioOFF; + bool bRadioCmd; + bool bForceSCAN; WORD wDeAuthenReason; } CMD_ITEM, *PCMD_ITEM; diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c index 18a09a3..baa48a1 100644 --- a/drivers/staging/vt6656/wctl.c +++ b/drivers/staging/vt6656/wctl.c @@ -53,8 +53,8 @@ /* * Description: - * Scan Rx cache. Return TRUE if packet is duplicate, else - * inserts in receive cache and returns FALSE. + * Scan Rx cache. Return true if packet is duplicate, else + * inserts in receive cache and returns false. * * Parameters: * In: @@ -63,11 +63,11 @@ * Out: * none * - * Return Value: TRUE if packet duplicate; otherwise FALSE + * Return Value: true if packet duplicate; otherwise false * */ -BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) +bool WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) { unsigned int uIndex; unsigned int ii; @@ -84,7 +84,7 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) (LOBYTE(pCacheEntry->wFrameCtl) == LOBYTE(pMACHeader->wFrameCtl)) ) { /* Duplicate match */ - return TRUE; + return true; } ADD_ONE_WITH_WRAP_AROUND(uIndex, DUPLICATE_RX_CACHE_LENGTH); } @@ -95,7 +95,7 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) memcpy(&(pCacheEntry->abyAddr2[0]), &(pMACHeader->abyAddr2[0]), ETH_ALEN); pCacheEntry->wFrameCtl = pMACHeader->wFrameCtl; ADD_ONE_WITH_WRAP_AROUND(pCache->uInPtr, DUPLICATE_RX_CACHE_LENGTH); - return FALSE; + return false; } /* @@ -119,7 +119,7 @@ unsigned int WCTLuSearchDFCB(struct vnt_private *pDevice, 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])))) { return ii; @@ -150,10 +150,10 @@ unsigned int WCTLuInsertDFCB(struct vnt_private *pDevice, if (pDevice->cbFreeDFCB == 0) return(pDevice->cbDFCB); for (ii = 0; ii < pDevice->cbDFCB; ii++) { - if (pDevice->sRxDFCB[ii].bInUse == FALSE) { + 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]), @@ -179,16 +179,16 @@ unsigned int WCTLuInsertDFCB(struct vnt_private *pDevice, * 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 * */ -int WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, - unsigned int cbFrameLength, int bWEP, int bExtIV) +bool WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, + unsigned int cbFrameLength, bool bWEP, bool bExtIV) { unsigned int uHeaderSize; - if (bWEP == TRUE) { + if (bWEP == true) { uHeaderSize = 28; if (bExtIV) // ExtIV @@ -209,7 +209,7 @@ int WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, else { pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader); if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) { - return(FALSE); + return(false); } } // reserve 8 byte to match MAC RX Buffer @@ -220,7 +220,7 @@ int WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength; pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++; //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx); - return(FALSE); + return(false); } else { pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader); @@ -238,21 +238,21 @@ int WCTLbHandleFragment(struct vnt_private *pDevice, PS802_11Header pMACHeader, else { // seq error or frag # error flush DFCB pDevice->cbFreeDFCB++; - pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE; - return(FALSE); + pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false; + return(false); } } else { - return(FALSE); + return(false); } if (IS_LAST_FRAGMENT_PKT(pMACHeader)) { //enq defragcontrolblock pDevice->cbFreeDFCB++; - pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = FALSE; + 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); + return(false); } } diff --git a/drivers/staging/vt6656/wctl.h b/drivers/staging/vt6656/wctl.h index a509f63..1b21e32e 100644 --- a/drivers/staging/vt6656/wctl.h +++ b/drivers/staging/vt6656/wctl.h @@ -96,9 +96,9 @@ /*--------------------- Export Functions --------------------------*/ -BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader); -int WCTLbHandleFragment(struct vnt_private *, PS802_11Header pMACHeader, - unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV); +bool WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader); +bool WCTLbHandleFragment(struct vnt_private *, PS802_11Header pMACHeader, + unsigned int cbFrameLength, bool bWEP, bool bExtIV); unsigned int WCTLuSearchDFCB(struct vnt_private *, PS802_11Header pMACHeader); unsigned int WCTLuInsertDFCB(struct vnt_private *, PS802_11Header pMACHeader); diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c index 89491ae..5dced0a 100644 --- a/drivers/staging/vt6656/wmgr.c +++ b/drivers/staging/vt6656/wmgr.c @@ -187,7 +187,7 @@ static void s_vMgrSynchBSS(struct vnt_private *, u32 uBSSMode, PKnownBSS pCurr, PCMD_STATUS pStatus); -static BOOL +static bool s_bCipherMatch ( PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus, @@ -228,7 +228,7 @@ void vMgrObjectInit(struct vnt_private *pDevice) pMgmt->byCSSPK = KEY_CTL_NONE; pMgmt->byCSSGK = KEY_CTL_NONE; pMgmt->wIBSSBeaconPeriod = DEFAULT_IBSS_BI; - BSSvClearBSSList((void *) pDevice, FALSE); + BSSvClearBSSList((void *) pDevice, false); init_timer(&pMgmt->sTimerSecondCallback); pMgmt->sTimerSecondCallback.data = (unsigned long)pDevice; @@ -244,16 +244,16 @@ void vMgrObjectInit(struct vnt_private *pDevice) pDevice->sTimerTxData.data = (unsigned long)pDevice; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback - pDevice->fTxDataInSleep = FALSE; - pDevice->IsTxDataTrigger = FALSE; + pDevice->fTxDataInSleep = false; + pDevice->IsTxDataTrigger = false; pDevice->nTxDataTimeCout = 0; pDevice->cbFreeCmdQueue = CMD_Q_SIZE; pDevice->uCmdDequeueIdx = 0; pDevice->uCmdEnqueueIdx = 0; pDevice->eCommandState = WLAN_CMD_IDLE; - pDevice->bCmdRunning = FALSE; - pDevice->bCmdClear = FALSE; + pDevice->bCmdRunning = false; + pDevice->bCmdClear = false; return; } @@ -291,7 +291,7 @@ void vMgrAssocBeginSta(struct vnt_private *pDevice, // ERP Phy (802.11g) should support short preamble. if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); - if (pDevice->bShortSlotTime == TRUE) + if (pDevice->bShortSlotTime == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { @@ -299,7 +299,7 @@ void vMgrAssocBeginSta(struct vnt_private *pDevice, 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 @@ -363,7 +363,7 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice, // ERP Phy (802.11g) should support short preamble. if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) { pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); - if (pDevice->bShortSlotTime == TRUE) + if (pDevice->bShortSlotTime == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1); } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) { @@ -371,7 +371,7 @@ void vMgrReAssocBeginSta(struct vnt_private *pDevice, pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1); } } - if (pMgmt->b11hEnable == TRUE) + if (pMgmt->b11hEnable == true) pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1); @@ -505,7 +505,7 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, 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->byBBType == BB_TYPE_11B) { uRateLen = WLAN_RATES_MAXLEN_11B; @@ -527,7 +527,7 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates, - FALSE, // do not change our basic rate + false, // do not change our basic rate &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), @@ -548,15 +548,15 @@ static void s_vMgrRxAssocRequest(struct vnt_private *pDevice, wAssocAID = (WORD)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; + if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) { + pDevice->bBarkerPreambleMd = true; } DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID); @@ -651,7 +651,7 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, 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->byBBType == BB_TYPE_11B) { @@ -675,7 +675,7 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)abyCurrSuppRates, (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates, - FALSE, // do not change our basic rate + false, // do not change our basic rate &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate), &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate), &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate), @@ -697,15 +697,15 @@ static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice, // 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; + if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) { + pDevice->bBarkerPreambleMd = true; } DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID); @@ -815,10 +815,10 @@ static void s_vMgrRxAssocResponse(struct vnt_private *pDevice, 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; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); - //if(pDevice->bWPASuppWextEnabled == TRUE) + //if(pDevice->bWPASuppWextEnabled == true) { BYTE buf[512]; size_t len; @@ -872,11 +872,11 @@ static void s_vMgrRxAssocResponse(struct vnt_private *pDevice, } //need clear flags related to Networkmanager - pDevice->bwextstep0 = FALSE; - pDevice->bwextstep1 = FALSE; - pDevice->bwextstep2 = FALSE; - pDevice->bwextstep3 = FALSE; - pDevice->bWPASuppWextEnabled = FALSE; + pDevice->bwextstep0 = false; + pDevice->bwextstep1 = false; + pDevice->bwextstep2 = false; + pDevice->bwextstep3 = false; + pDevice->bWPASuppWextEnabled = false; if(pMgmt->eCurrState == WMAC_STATE_ASSOC) timer_expire(pDevice->sTimerCommand, 0); @@ -1121,7 +1121,7 @@ static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice, 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); } @@ -1399,13 +1399,13 @@ static void s_vMgrRxDisassociation(struct vnt_private *pDevice, vMgrDecodeDisassociation(&sFrame); DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason))); - pDevice->fWPA_Authened = FALSE; + pDevice->fWPA_Authened = false; //TODO: do something let upper layer know or //try to send associate packet again because of inactivity timeout if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { - pDevice->bLinkPass = FALSE; - pMgmt->sNodeDBTable[0].bActive = FALSE; + pDevice->bLinkPass = false; + pMgmt->sNodeDBTable[0].bActive = false; pDevice->byReAssocCount = 0; pMgmt->eCurrState = WMAC_STATE_AUTH; // jump back to the auth state! pDevice->eCommandState = WLAN_ASSOCIATE_WAIT; @@ -1416,7 +1416,7 @@ static void s_vMgrRxDisassociation(struct vnt_private *pDevice, } } - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1467,22 +1467,22 @@ static void s_vMgrRxDeauthentication(struct vnt_private *pDevice, sFrame.len = pRxPacket->cbMPDULen; sFrame.pBuf = (PBYTE)pRxPacket->p80211Header; vMgrDecodeDeauthen(&sFrame); - pDevice->fWPA_Authened = FALSE; + pDevice->fWPA_Authened = false; DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason)))); // TODO: update BSS list for specific BSSID if pre-authentication case if (!compare_ether_addr(sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID)) { if (pMgmt->eCurrState >= WMAC_STATE_AUTHPENDING) { - pMgmt->sNodeDBTable[0].bActive = FALSE; + pMgmt->sNodeDBTable[0].bActive = false; pMgmt->eCurrMode = WMAC_MODE_STANDBY; pMgmt->eCurrState = WMAC_STATE_IDLE; netif_stop_queue(pDevice->dev); - pDevice->bLinkPass = FALSE; + pDevice->bLinkPass = false; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_SLOW); } } - // if(pDevice->bWPASuppWextEnabled == TRUE) + // if(pDevice->bWPASuppWextEnabled == true) { union iwreq_data wrqu; memset(&wrqu, 0, sizeof (wrqu)); @@ -1511,17 +1511,17 @@ static void s_vMgrRxDeauthentication(struct vnt_private *pDevice, -*/ static int ChannelExceedZoneType(struct vnt_private *pDevice, u8 byCurrChannel) { - int exceed = FALSE; + int exceed = false; 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; @@ -1548,13 +1548,13 @@ static void s_vMgrRxBeacon(struct vnt_private *pDevice, PKnownBSS pBSSList; WLAN_FR_BEACON sFrame; u64 qwTSFOffset; - int bIsBSSIDEqual = FALSE; - int bIsSSIDEqual = FALSE; - int bTSFLargeDiff = FALSE; - int bTSFOffsetPostive = FALSE; - int bUpdateTSF = FALSE; - int bIsAPBeacon = FALSE; - int bIsChannelEqual = FALSE; + int bIsBSSIDEqual = false; + int bIsSSIDEqual = false; + int bTSFLargeDiff = false; + int bTSFOffsetPostive = false; + int bUpdateTSF = false; + int bIsAPBeacon = false; + int bIsChannelEqual = false; u32 uLocateByteIndex; u8 byTIMBitOn = 0; u16 wAIDNumber = 0; @@ -1566,7 +1566,7 @@ static void s_vMgrRxBeacon(struct vnt_private *pDevice, u8 byCurrChannel = pRxPacket->byRxChannel; ERPObject sERP; u32 uRateLen = WLAN_RATES_MAXLEN; - int bChannelHit = FALSE; + int bChannelHit = false; u8 byOldPreambleType; @@ -1594,31 +1594,31 @@ static void s_vMgrRxBeacon(struct vnt_private *pDevice, { if (sFrame.pDSParms != NULL) { if (byCurrChannel == RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]) - bChannelHit = TRUE; + bChannelHit = true; byCurrChannel = RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]; } else { - bChannelHit = TRUE; + bChannelHit = true; } } else { if (sFrame.pDSParms != NULL) { if (byCurrChannel == sFrame.pDSParms->byCurrChannel) - bChannelHit = TRUE; + bChannelHit = true; byCurrChannel = sFrame.pDSParms->byCurrChannel; } else { - bChannelHit = TRUE; + bChannelHit = true; } } -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.bERPExist = false; sERP.byERP = 0; } @@ -1673,7 +1673,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) } if(byCurrChannel == (BYTE)pMgmt->uCurrChannel) - bIsChannelEqual = TRUE; + bIsChannelEqual = true; if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) { @@ -1702,7 +1702,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) pMgmt->abyCurrBSSID, WLAN_BSSID_LEN) == 0) { - bIsBSSIDEqual = TRUE; + bIsBSSIDEqual = true; pDevice->uCurrRSSI = pRxPacket->uRSSI; pDevice->byCurrSQ = pRxPacket->bySQ; if (pMgmt->sNodeDBTable[0].uInActiveCount != 0) { @@ -1716,22 +1716,22 @@ 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) { // Sync ERP field - if ((pBSSList->sERP.bERPExist == TRUE) && (pDevice->byBBType == BB_TYPE_11G)) { + if ((pBSSList->sERP.bERPExist == true) && (pDevice->byBBType == BB_TYPE_11G)) { if ((pBSSList->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION) != pDevice->bProtectMode) {//0000 0010 pDevice->bProtectMode = (pBSSList->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION); if (pDevice->bProtectMode) { @@ -1756,16 +1756,16 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) } // Sync Short Slot Time if (WLAN_GET_CAP_INFO_SHORTSLOTTIME(pBSSList->wCapInfo) != pDevice->bShortSlotTime) { - BOOL bShortSlotTime; + bool bShortSlotTime; bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(pBSSList->wCapInfo); //DBG_PRN_WLAN05(("Set Short Slot Time: %d\n", pDevice->bShortSlotTime)); //Kyle check if it is OK to set G. if (pDevice->byBBType == BB_TYPE_11A) { - bShortSlotTime = TRUE; + bShortSlotTime = true; } else if (pDevice->byBBType == BB_TYPE_11B) { - bShortSlotTime = FALSE; + bShortSlotTime = false; } if (bShortSlotTime != pDevice->bShortSlotTime) { pDevice->bShortSlotTime = bShortSlotTime; @@ -1801,7 +1801,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), @@ -1825,9 +1825,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // check if beacon TSF larger or small than our local TSF if (qwTimestamp >= qwLocalTSF) - bTSFOffsetPostive = TRUE; + bTSFOffsetPostive = true; else - bTSFOffsetPostive = FALSE; + bTSFOffsetPostive = false; if (bTSFOffsetPostive) { qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF)); @@ -1837,20 +1837,20 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) } if (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)) { + if ((pDevice->bEnablePSMode == true) && (sFrame.pTIM)) { /* 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); @@ -1865,33 +1865,33 @@ 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; + pMgmt->bInTIM = false; }; } else { - pMgmt->bInTIM = FALSE; + pMgmt->bInTIM = false; }; if (pMgmt->bInTIM || (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) { - pMgmt->bInTIMWake = TRUE; + pMgmt->bInTIMWake = true; /* send out ps-poll packet */ if (pMgmt->bInTIM) PSvSendPSPOLL(pDevice); } else { - pMgmt->bInTIMWake = FALSE; + pMgmt->bInTIMWake = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Not In TIM..\n"); - if (pDevice->bPWBitOn == FALSE) { + 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)) { + if(PSbConsiderPowerDown(pDevice, false, false)) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n"); } } @@ -1909,7 +1909,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 (BSSbIsSTAInNodeDB(pDevice, sFrame.pHdr->sA3.abyAddr2, &uNodeIndex)) { @@ -1922,7 +1922,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), @@ -1943,7 +1943,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), @@ -1957,7 +1957,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; */ } @@ -1965,12 +1965,12 @@ 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; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); 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; } @@ -2152,16 +2152,16 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) 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); if (pDevice->byBBType == BB_TYPE_11A) { - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; } else { - pDevice->bShortSlotTime = FALSE; + pDevice->bShortSlotTime = false; } BBvSetShortSlotTime(pDevice); // vUpdateIFS() use pDevice->bShortSlotTime as parameter so it must be called @@ -2232,7 +2232,7 @@ void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus) MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); pDevice->byRxMode |= RCR_BSSID; - pMgmt->bCurrBSSIDFilterOn = TRUE; + pMgmt->bCurrBSSIDFilterOn = true; // Set Capability Info pMgmt->wCurrCapInfo = 0; @@ -2311,11 +2311,11 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) u16 wSuppRate; u8 byTopCCKBasicRate = RATE_1M; u8 byTopOFDMBasicRate = RATE_1M; - u8 bShortSlotTime = FALSE; + u8 bShortSlotTime = false; for (ii = 0; ii < MAX_BSS_NUM; ii++) { - if (pMgmt->sBSSList[ii].bActive == TRUE) + if (pMgmt->sBSSList[ii].bActive == true) break; } @@ -2349,14 +2349,14 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) { /* if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) { - if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == FALSE) { + if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; return; } } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) { - if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == FALSE) { + if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == false) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; @@ -2366,7 +2366,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) */ } - //if(pDevice->bWPASuppWextEnabled == TRUE) + //if(pDevice->bWPASuppWextEnabled == true) Encyption_Rebuild(pDevice, pCurr); // Infrastructure BSS @@ -2422,7 +2422,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) } } - RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, TRUE, + RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); vUpdateIFS(pDevice); @@ -2443,11 +2443,11 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) // Add current BSS to Candidate list // This should only work for WPA2 BSS, and WPA2 BSS check must be done before. if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) { - BOOL bResult = bAdd_PMKID_Candidate((void *) pDevice, + bool bResult = bAdd_PMKID_Candidate((void *) pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult); - if (bResult == FALSE) { + if (bResult == false) { vFlush_PMKID_Candidate((void *) pDevice); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "vFlush_PMKID_Candidate: 4\n"); @@ -2497,10 +2497,10 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) //DBG_PRN_WLAN05(("wCapInfo: %X\n", pCurr->wCapInfo)); if (WLAN_GET_CAP_INFO_SHORTSLOTTIME(pCurr->wCapInfo) != pDevice->bShortSlotTime) { if (pDevice->byBBType == BB_TYPE_11A) { - bShortSlotTime = TRUE; + bShortSlotTime = true; } else if (pDevice->byBBType == BB_TYPE_11B) { - bShortSlotTime = FALSE; + bShortSlotTime = false; } else { bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(pCurr->wCapInfo); @@ -2527,7 +2527,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) { /* - if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == FALSE) { + if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == false) { // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; return; @@ -2535,7 +2535,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) */ } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) { /* - if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == FALSE) { + if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == false) { // encryption mode error pMgmt->eCurrState = WMAC_STATE_IDLE; return; @@ -2568,7 +2568,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) // set basic rate RATEvParseMaxRate((void *)pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates, - NULL, TRUE, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, + NULL, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate, &byTopCCKBasicRate, &byTopOFDMBasicRate); vUpdateIFS(pDevice); pMgmt->wCurrCapInfo = pCurr->wCapInfo; @@ -2581,7 +2581,7 @@ void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus) pMgmt->eCurrState = WMAC_STATE_STARTED; // Adopt BSS state in Adapter Device Object pDevice->eOPMode = OP_MODE_ADHOC; - pDevice->bLinkPass = TRUE; + pDevice->bLinkPass = true; ControlvMaskByte(pDevice,MESSAGE_REQUEST_MACREG,MAC_REG_PAPEDELAY,LEDSTS_STS,LEDSTS_INTER); memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN); @@ -2641,7 +2641,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, if (s_bCipherMatch(pCurr, pDevice->eEncryptionStatus, &(pMgmt->byCSSPK), - &(pMgmt->byCSSGK)) == FALSE) { + &(pMgmt->byCSSGK)) == false) { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "s_bCipherMatch Fail .......\n"); return; } @@ -2654,12 +2654,12 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, } // Init the BSS informations - pDevice->bCCK = TRUE; - pDevice->bProtectMode = FALSE; + pDevice->bCCK = true; + pDevice->bProtectMode = false; MACvDisableProtectMD(pDevice); - pDevice->bBarkerPreambleMd = FALSE; + pDevice->bBarkerPreambleMd = false; MACvDisableBarkerPreambleMd(pDevice); - pDevice->bNonERPPresent = FALSE; + pDevice->bNonERPPresent = false; pDevice->byPreambleType = 0; pDevice->wBasicRate = 0; // Set Basic Rate @@ -2689,7 +2689,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) { pDevice->byBBType = BB_TYPE_11A; pMgmt->eCurrentPHYMode = PHY_TYPE_11A; - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; BBvSetShortSlotTime(pDevice); CARDvSetBSSMode(pDevice); } else { @@ -2701,7 +2701,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) { pDevice->byBBType = BB_TYPE_11B; pMgmt->eCurrentPHYMode = PHY_TYPE_11B; - pDevice->bShortSlotTime = FALSE; + pDevice->bShortSlotTime = false; BBvSetShortSlotTime(pDevice); CARDvSetBSSMode(pDevice); } else { @@ -2712,12 +2712,12 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) { pDevice->byBBType = BB_TYPE_11G; pMgmt->eCurrentPHYMode = PHY_TYPE_11G; - pDevice->bShortSlotTime = TRUE; + pDevice->bShortSlotTime = true; BBvSetShortSlotTime(pDevice); CARDvSetBSSMode(pDevice); } else if (pDevice->eConfigPHYMode == PHY_TYPE_11B) { pDevice->byBBType = BB_TYPE_11B; - pDevice->bShortSlotTime = FALSE; + pDevice->bShortSlotTime = false; BBvSetShortSlotTime(pDevice); CARDvSetBSSMode(pDevice); } else { @@ -2729,7 +2729,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, MACvRegBitsOff(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC); MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); pDevice->byRxMode |= RCR_BSSID; - pMgmt->bCurrBSSIDFilterOn = TRUE; + pMgmt->bCurrBSSIDFilterOn = true; } // set channel and clear NAV @@ -2753,7 +2753,7 @@ static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode, MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC); MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID); pDevice->byRxMode |= RCR_BSSID; - pMgmt->bCurrBSSIDFilterOn = TRUE; + pMgmt->bCurrBSSIDFilterOn = true; } if (pDevice->byBBType == BB_TYPE_11A) { @@ -2779,7 +2779,7 @@ static void Encyption_Rebuild(struct vnt_private *pDevice, PKnownBSS pCurr) if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) || (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) { - 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 @@ -2790,7 +2790,7 @@ static void Encyption_Rebuild(struct vnt_private *pDevice, PKnownBSS pCurr) 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 @@ -2823,8 +2823,8 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; u8 byMap; int ii, jj; - int bStartFound = FALSE; - int bMulticast = FALSE; + int bStartFound = false; + int bMulticast = false; u16 wStartIndex = 0; u16 wEndIndex = 0; @@ -2836,13 +2836,13 @@ static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM) // 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 = (WORD)ii; } wEndIndex = (WORD)ii; @@ -3005,11 +3005,11 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, 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) { @@ -3021,7 +3021,7 @@ static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice, ); } // 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); @@ -3131,11 +3131,11 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, 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; } @@ -3149,7 +3149,7 @@ struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice, } // 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); @@ -3376,7 +3376,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, 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; @@ -3384,7 +3384,7 @@ struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice, } 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 = (PWORD)pbyRSN; // Point to PMKID count @@ -3632,7 +3632,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, 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; @@ -3640,7 +3640,7 @@ struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice, } 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 = (PWORD)pbyRSN; // Point to PMKID count @@ -3833,7 +3833,7 @@ static void s_vMgrRxProbeResponse(struct vnt_private *pDevice, WLAN_FR_PROBERESP sFrame; u8 byCurrChannel = pRxPacket->byRxChannel; ERPObject sERP; - int bChannelHit = TRUE; + int bChannelHit = true; memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP)); @@ -3864,31 +3864,31 @@ static void s_vMgrRxProbeResponse(struct vnt_private *pDevice, if (sFrame.pDSParms) { if (byCurrChannel == RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]) - bChannelHit = TRUE; + bChannelHit = true; byCurrChannel = RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1]; } else { - bChannelHit = TRUE; + bChannelHit = true; } } else { if (sFrame.pDSParms) { if (byCurrChannel == sFrame.pDSParms->byCurrChannel) - bChannelHit = TRUE; + bChannelHit = true; byCurrChannel = sFrame.pDSParms->byCurrChannel; } else { - bChannelHit = TRUE; + bChannelHit = true; } } //RobertYu:20050201 -if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) +if(ChannelExceedZoneType(pDevice,byCurrChannel)==true) return; if (sFrame.pERP) { sERP.byERP = sFrame.pERP->byContext; - sERP.bERPExist = TRUE; + sERP.bERPExist = true; } else { - sERP.bERPExist = FALSE; + sERP.bERPExist = false; sERP.byERP = 0; } @@ -4037,7 +4037,7 @@ static void s_vMgrRxProbeRequest(struct vnt_private *pDevice, void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket) { - int bInScan = FALSE; + int bInScan = false; u32 uNodeIndex = 0; NODE_STATE eNodeState = 0; CMD_STATUS Status; @@ -4073,7 +4073,7 @@ void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, case WLAN_FSTYPE_ASSOCRESP: // Frame Clase = 2 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp1\n"); - s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, FALSE); + s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, false); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp2\n"); break; @@ -4100,7 +4100,7 @@ void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, 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: @@ -4120,7 +4120,7 @@ void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, // 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; @@ -4175,7 +4175,7 @@ void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt, * Prepare beacon to send * * Return Value: - * TRUE if success; FALSE if failed. + * true if success; false if failed. * -*/ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, @@ -4183,7 +4183,7 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, { struct vnt_tx_mgmt *pTxPacket; -// pDevice->bBeaconBufReady = FALSE; +// pDevice->bBeaconBufReady = false; if (pDevice->bEncryptionEnable || pDevice->bEnable8021x){ pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1); } @@ -4206,12 +4206,12 @@ int bMgrPrepareBeaconToSend(struct vnt_private *pDevice, if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->abyCurrBSSID[0] == 0)) - return FALSE; + return false; csBeacon_xmit(pDevice, pTxPacket); MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX); - return TRUE; + return true; } @@ -4303,10 +4303,10 @@ int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID, DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); if ((pDevice == NULL) || (pbyBSSID == NULL) || (psRSNCapObj == NULL)) - return FALSE; + return false; if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST) - return FALSE; + return false; @@ -4314,7 +4314,7 @@ int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID, for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) { pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii]; if (!memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) { - if ((psRSNCapObj->bRSNCapExist == TRUE) + if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) { pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED; @@ -4322,13 +4322,13 @@ int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID, 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); @@ -4336,7 +4336,7 @@ int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID, 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; } /* @@ -4364,7 +4364,7 @@ void vFlush_PMKID_Candidate(struct vnt_private *pDevice) return; } -static BOOL +static bool s_bCipherMatch ( PKnownBSS pBSSNode, NDIS_802_11_ENCRYPTION_STATUS EncStatus, @@ -4377,7 +4377,7 @@ s_bCipherMatch ( int i; if (pBSSNode == NULL) - return FALSE; + return false; // check cap. of BSS if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && @@ -4387,7 +4387,7 @@ s_bCipherMatch ( } if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && - (pBSSNode->bWPA2Valid == TRUE) && + (pBSSNode->bWPA2Valid == true) && ((EncStatus == Ndis802_11Encryption3Enabled) || (EncStatus == Ndis802_11Encryption2Enabled))) { @@ -4422,7 +4422,7 @@ s_bCipherMatch ( } } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) && - (pBSSNode->bWPAValid == TRUE) && + (pBSSNode->bWPAValid == true) && ((EncStatus == Ndis802_11Encryption2Enabled) || (EncStatus == Ndis802_11Encryption3Enabled))) { //WPA // check Group Key Cipher @@ -4464,9 +4464,9 @@ s_bCipherMatch ( (byCipherMask == 0)) { *pbyCCSGK = KEY_CTL_WEP; *pbyCCSPK = KEY_CTL_NONE; - return TRUE; + return true; } else { - return FALSE; + return false; } } else if (EncStatus == Ndis802_11Encryption2Enabled) { @@ -4474,45 +4474,45 @@ 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; + return false; } } else if (EncStatus == Ndis802_11Encryption3Enabled) { if ((byMulticastCipher == KEY_CTL_CCMP) && (byCipherMask == 0)) { // When CCMP is enable, "Use group cipher suite" shall not be a valid option. - return FALSE; + return false; } else if ((byMulticastCipher == KEY_CTL_WEP) && ((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 false; } } - return TRUE; + return true; } diff --git a/drivers/staging/vt6656/wpa.c b/drivers/staging/vt6656/wpa.c index f6429a2..f037be3 100644 --- a/drivers/staging/vt6656/wpa.c +++ b/drivers/staging/vt6656/wpa.c @@ -83,9 +83,9 @@ WPA_ClearRSN( pBSSList->wAuthCount = 0; pBSSList->byDefaultK_as_PK = 0; pBSSList->byReplayIdx = 0; - pBSSList->sRSNCapObj.bRSNCapExist = FALSE; + pBSSList->sRSNCapObj.bRSNCapExist = false; pBSSList->sRSNCapObj.wRSNCap = 0; - pBSSList->bWPAValid = FALSE; + pBSSList->bWPAValid = false; } @@ -212,14 +212,14 @@ WPA_ParseRSN( pbyCaps = (PBYTE)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 = *(PWORD)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; } } @@ -239,7 +239,7 @@ WPA_ParseRSN( * Return Value: none. * -*/ -BOOL +bool WPA_SearchRSN( BYTE byCmd, BYTE byEncrypt, @@ -249,14 +249,14 @@ WPA_SearchRSN( int ii; BYTE byPKType = WPA_NONE; - if (pBSSList->bWPAValid == FALSE) - return FALSE; + if (pBSSList->bWPAValid == false) + return false; switch(byCmd) { case 0: if (byEncrypt != pBSSList->byGKType) - return FALSE; + return false; if (pBSSList->wPKCount > 0) { for (ii = 0; ii < pBSSList->wPKCount; ii ++) { @@ -270,9 +270,9 @@ WPA_SearchRSN( byPKType = WPA_WEP104; } if (byEncrypt != byPKType) - return FALSE; + return false; } - return TRUE; + return true; // if (pBSSList->wAuthCount > 0) // for (ii=0; ii < pBSSList->wAuthCount; ii ++) // if (byAuth == pBSSList->abyAuthType[ii]) @@ -282,7 +282,7 @@ WPA_SearchRSN( default: break; } - return FALSE; + return false; } /*+ @@ -299,20 +299,20 @@ WPA_SearchRSN( * Return Value: none. * -*/ -BOOL +bool WPAb_Is_RSN( PWLAN_IE_RSN_EXT pRSN ) { if (pRSN == NULL) - return FALSE; + return false; 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; + return false; } diff --git a/drivers/staging/vt6656/wpa.h b/drivers/staging/vt6656/wpa.h index 889489a..0369cbf 100644 --- a/drivers/staging/vt6656/wpa.h +++ b/drivers/staging/vt6656/wpa.h @@ -69,14 +69,14 @@ WPA_ParseRSN( PWLAN_IE_RSN_EXT pRSN ); -BOOL +bool WPA_SearchRSN( BYTE byCmd, BYTE byEncrypt, PKnownBSS pBSSList ); -BOOL +bool WPAb_Is_RSN( PWLAN_IE_RSN_EXT pRSN ); diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c index 99b4589..a89456a 100644 --- a/drivers/staging/vt6656/wpa2.c +++ b/drivers/staging/vt6656/wpa2.c @@ -78,7 +78,7 @@ WPA2_ClearRSN ( { int ii; - pBSSNode->bWPA2Valid = FALSE; + pBSSNode->bWPA2Valid = false; pBSSNode->byCSSGK = WLAN_11i_CSS_CCMP; for (ii=0; ii < 4; ii ++) @@ -87,7 +87,7 @@ WPA2_ClearRSN ( for (ii=0; ii < 4; ii ++) pBSSNode->abyAKMSSAuthType[ii] = WLAN_11i_AKMSS_802_1X; pBSSNode->wAKMSSAuthCount = 1; - pBSSNode->sRSNCapObj.bRSNCapExist = FALSE; + pBSSNode->sRSNCapObj.bRSNCapExist = false; pBSSNode->sRSNCapObj.wRSNCap = 0; } @@ -115,7 +115,7 @@ WPA2vParseRSN ( int i, j; WORD m = 0, n = 0; PBYTE pbyOUI; - BOOL bUseGK = FALSE; + bool bUseGK = false; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len); @@ -123,7 +123,7 @@ WPA2vParseRSN ( if (pRSN->len == 2) { // ver(2) if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) { - pBSSNode->bWPA2Valid = TRUE; + pBSSNode->bWPA2Valid = true; } return; } @@ -158,7 +158,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; } @@ -172,7 +172,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)) { // Invalid CSS, continue parsing } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) { @@ -194,7 +194,7 @@ WPA2vParseRSN ( break; } //for - if (bUseGK == TRUE) { + if (bUseGK == true) { if (j != 1) { // invalid CSS, This should be only PK CSS. return; @@ -236,12 +236,12 @@ WPA2vParseRSN ( n = *((PWORD) &(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 = *((PWORD) &(pRSN->abyRSN[8+4*m+4*n])); } } //ignore PMKID lists bcs only (Re)Assocrequest has this field - pBSSNode->bWPA2Valid = TRUE; + pBSSNode->bWPA2Valid = true; } } @@ -325,7 +325,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs) 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; @@ -334,7 +334,7 @@ unsigned int WPA2uSetIEs(void *pMgmtHandle, PWLAN_IE_RSN pRSNIEs) pRSNIEs->len +=2; if ((pMgmt->gsPMKIDCache.BSSIDInfoCount > 0) && - (pMgmt->bRoaming == TRUE) && + (pMgmt->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) { /* RSN PMKID, pointer to PMKID count */ pwPMKID = (PWORD)(&pRSNIEs->abyRSN[18]); diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c index 569d1a7..53629b2 100644 --- a/drivers/staging/vt6656/wpactl.c +++ b/drivers/staging/vt6656/wpactl.c @@ -87,9 +87,9 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) param->u.wpa_key.alg_name); if (param->u.wpa_key.alg_name == WPA_ALG_NONE) { pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled; - pDevice->bEncryptionEnable = FALSE; + pDevice->bEncryptionEnable = false; pDevice->byKeyIndex = 0; - pDevice->bTransmitKey = FALSE; + pDevice->bTransmitKey = false; for (uu=0; uu<MAX_KEY_TABLE; uu++) { MACvDisableKeyEntry(pDevice, uu); } @@ -109,7 +109,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) } else { if (param->u.wpa_key.set_tx) { pDevice->byKeyIndex = (BYTE)dwKeyIndex; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; dwKeyIndex |= (1 << 31); } KeybSetDefaultKey( pDevice, @@ -123,7 +123,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) } pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled; - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; return ret; } @@ -206,7 +206,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) &KeyRSC, (PBYTE)abyKey, byKeyDecMode - ) == TRUE) && + ) == true) && (KeybSetDefaultKey(pDevice, &(pDevice->sKey), dwKeyIndex, @@ -214,7 +214,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) &KeyRSC, (PBYTE)abyKey, byKeyDecMode - ) == TRUE) ) { + ) == true) ) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n"); } else { return -EINVAL; @@ -235,7 +235,7 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) if (KeybSetKey(pDevice, &(pDevice->sKey), ¶m->addr[0], dwKeyIndex, param->u.wpa_key.key_len, &KeyRSC, (PBYTE)abyKey, byKeyDecMode - ) == TRUE) { + ) == true) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n"); } else { // Key Table Full @@ -251,9 +251,9 @@ int wpa_set_keys(struct vnt_private *pDevice, void *ctx) } // BSSID not 0xffffffffffff if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) { pDevice->byKeyIndex = (BYTE)param->u.wpa_key.key_index; - pDevice->bTransmitKey = TRUE; + pDevice->bTransmitKey = true; } - pDevice->bEncryptionEnable = TRUE; + pDevice->bEncryptionEnable = true; return ret; } -- 1.7.2.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel