Staging: vt6656: Change the define FALSE and TRUE to the lower case variant.
PATCH 1/1 Staging: vt6656: Change the define FALSE and TRUE to the lower case variant.
Remove the TRUE and FALSE define from the ttype.h
--- drivers/staging/vt6656/80211mgr.c | 8 +- drivers/staging/vt6656/aes_ccmp.c | 8 +- drivers/staging/vt6656/baseband.c | 16 +- drivers/staging/vt6656/bssdb.c | 154 ++++++++-------- drivers/staging/vt6656/card.c | 60 +++--- drivers/staging/vt6656/channel.c | 146 ++++++++-------- drivers/staging/vt6656/datarate.c | 18 +- drivers/staging/vt6656/device_cfg.h | 8 +- drivers/staging/vt6656/dpc.c | 176 +++++++++--------- drivers/staging/vt6656/firmware.c | 16 +- drivers/staging/vt6656/hostap.c | 50 +++--- drivers/staging/vt6656/int.c | 12 +- drivers/staging/vt6656/ioctl.c | 68 ++++---- drivers/staging/vt6656/iwctl.c | 100 +++++----- drivers/staging/vt6656/key.c | 178 +++++++++--------- drivers/staging/vt6656/mac.c | 4 +- drivers/staging/vt6656/main_usb.c | 174 +++++++++--------- drivers/staging/vt6656/power.c | 46 +++--- drivers/staging/vt6656/rf.c | 30 ++-- drivers/staging/vt6656/rxtx.c | 222 +++++++++++----------- drivers/staging/vt6656/tether.c | 6 +- drivers/staging/vt6656/ttype.h | 7 - drivers/staging/vt6656/usbpipe.c | 34 ++-- drivers/staging/vt6656/wcmd.c | 170 +++++++++--------- drivers/staging/vt6656/wctl.c | 36 ++-- drivers/staging/vt6656/wmgr.c | 348 +++++++++++++++++----------------- drivers/staging/vt6656/wpa.c | 26 ++-- drivers/staging/vt6656/wpa2.c | 22 +- drivers/staging/vt6656/wpactl.c | 44 +++--- 29 files changed, 1090 insertions(+), 1097 deletions(-)
drivers/staging/vt6656/80211mgr.c +4 -4
@@ -178,7 +178,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 ;
@@ -402,7 +402,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 ;
@@ -579,7 +579,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 ;
@@ -773,7 +773,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 ;
drivers/staging/vt6656/aes_ccmp.c +4 -4
@@ -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; }
drivers/staging/vt6656/baseband.c +8 -8
@@ -775,7 +775,7 @@ BBvCaculateParameter (BOOL bCCK = pDevice->bCCK; cbBitCount = cbFrameLength *8 ; - bExtBit = FALSE; + bExtBit = false;switch (wRate) {case RATE_1M :
@@ -792,7 +792,7 @@ BBvCaculateParameter (break ;case RATE_5M : -if (bCCK == FALSE) +if (bCCK == false) cbBitCount ++; cbUsCount = (cbBitCount *10 ) /55 ; cbTmp = (cbUsCount *55 ) /10 ;
@@ -806,14 +806,14 @@ BBvCaculateParameter (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 ;
@@ -1006,13 +1006,13 @@ BBbVT3184Init (PSDevice pDevice)EEP_MAX_CONTEXT_SIZE , pDevice->abyEEPROM);if (ntStatus !=STATUS_SUCCESS ) { -return FALSE; +return false; }//20080215-01,<Add> by Mike Liu // if ((pDevice->abyEEPROM[EEP_OFS_RADIOCTL]&0x06)==0x04) -// return FALSE; +// return false; //20080804-01,<Add> by Mike Liu //zonetype initial
@@ -1129,7 +1129,7 @@ else {MACvRegBitsOn (pDevice,MAC_REG_SOFTPWRCTL2 ,SOFTPWRCTL_RFLEOPT );//}} }else { -return TRUE; +return true; }memcpy (abyArray, pbyAddr, wLength);
@@ -1168,7 +1168,7 @@ else {ControlvWriteByte (pDevice,MESSAGE_REQUEST_BBREG ,0x0D ,0x01 );RFbRFTableDownload (pDevice); -return TRUE;//ntStatus; +return true;//ntStatus; }
drivers/staging/vt6656/bssdb.c +77 -77
524 lines not on this page · raw message
drivers/staging/vt6656/card.c +30 -30
181 lines not on this page · raw message
drivers/staging/vt6656/channel.c +73 -73
221 lines not on this page · raw message
drivers/staging/vt6656/datarate.c +9 -9
@@ -226,7 +226,7 @@ unsigned int uRateLen;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 CARDbAddBasicRate ((void *)pDevice,RATEwGetRateIdx (byRate));DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "ParseMaxRate AddBasicRate: %d\n" ,RATEwGetRateIdx (byRate));
@@ -312,7 +312,7 @@ PSMgmtObject pMgmt = &(pDevice->sMgmtObj);#if 1 //mike fixed old: use packet lose ratio algorithm to control rate WORD wIdxDownRate =0 ;unsigned int ii; -BOOL bAutoRate[MAX_RATE ] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; +BOOL bAutoRate[MAX_RATE ] = {true,true,true,true,false,false,true,true,true,true,true,true};DWORD dwThroughputTbl[MAX_RATE ] = {10 ,20 ,55 ,110 ,60 ,90 ,120 ,180 ,240 ,360 ,480 ,540 };DWORD dwThroughput =0 ;WORD wIdxUpRate =0 ;
@@ -339,11 +339,11 @@ DWORD dwTxDiff = 0;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; } }
@@ -365,7 +365,7 @@ DWORD dwTxDiff = 0;for (ii = psNodeDBTable->wTxDataRate; ii >0 ;) { ii--;if ( (dwThroughputTbl[ii] > dwThroughput) && - (bAutoRate[ii]==TRUE) ) { + (bAutoRate[ii]==true) ) { dwThroughput = dwThroughputTbl[ii]; wIdxDownRate = (WORD ) ii; }
@@ -391,7 +391,7 @@ DWORD dwTxDiff = 0;return ;#else //mike fixed new: use differ-signal strength to control rate WORD wIdxUpRate =0 ; -BOOL bAutoRate[MAX_RATE ] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; +BOOL bAutoRate[MAX_RATE ] = {true,true,true,true,false,false,true,true,true,true,true,true};unsigned int ii;long ldBm;
@@ -402,11 +402,11 @@ long ldBm;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; } }
@@ -435,7 +435,7 @@ if (wIdxUpRate == RATE_54M ) { //11a/g psNodeDBTable->wTxDataRate =RATE_5M ; else { psNodeDBTable->wTxDataRate =RATE_1M ; -//increasingVGA = TRUE; +//increasingVGA = true; } }else {//11b
drivers/staging/vt6656/device_cfg.h +4 -4
@@ -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
drivers/staging/vt6656/dpc.c +88 -88
573 lines not on this page · raw message
drivers/staging/vt6656/firmware.c +8 -8
@@ -806,7 +806,7 @@ FIRMWAREbDownload(if (pBuffer)kfree (pBuffer);spin_lock_irq (&pDevice->lock); -return (FALSE); +return (false); } } }
@@ -815,7 +815,7 @@ FIRMWAREbDownload(kfree (pBuffer);spin_lock_irq (&pDevice->lock); -return (TRUE); +return (true); }BOOL
@@ -836,9 +836,9 @@ FIRMWAREbBrach2Sram( );if (NdisStatus !=STATUS_SUCCESS ) { -return (FALSE); +return (false); }else { -return (TRUE); +return (true); } }
@@ -860,17 +860,17 @@ FIRMWAREbCheckVersion(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; }
drivers/staging/vt6656/hostap.c +25 -25
150 lines not on this page · raw message
drivers/staging/vt6656/int.c +6 -6
@@ -87,7 +87,7 @@ void INTvWorkItem(void *Context)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); }
@@ -153,12 +153,12 @@ INTnsProcessData(PSDevice pDevice)if (pMgmt->byDTIMCount >0 ) { pMgmt->byDTIMCount--; pMgmt->sNodeDBTable[0 ].bRxPSPoll = - FALSE; + false; }else if (pMgmt->byDTIMCount ==0 ) {/* check if mutltcast tx bufferring */ 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,
@@ -168,9 +168,9 @@ INTnsProcessData(PSDevice 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)
@@ -211,7 +211,7 @@ INTnsProcessData(PSDevice 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 +
drivers/staging/vt6656/ioctl.c +34 -34
214 lines not on this page · raw message
drivers/staging/vt6656/iwctl.c +50 -50
262 lines not on this page · raw message
drivers/staging/vt6656/key.c +89 -89
483 lines not on this page · raw message
drivers/staging/vt6656/mac.c +2 -2
@@ -133,7 +133,7 @@ void MACvWriteMultiAddr(PSDevice pDevice, unsigned int uByteIdx, BYTE byData)* Out: * none * -* Return Value: TRUE if success; otherwise FALSE +* Return Value: true if success; otherwise false * */ BOOL MACbShutdown (PSDevice pDevice)
@@ -145,7 +145,7 @@ BOOL MACbShutdown (PSDevice pDevice)0 ,NULL ); -return TRUE; +return true; }void MACvSetBBType (PSDevice pDevice,BYTE byType)
drivers/staging/vt6656/main_usb.c +87 -87
85 lines not on this page · raw message
drivers/staging/vt6656/power.c +23 -23
46 lines not on this page · raw message
drivers/staging/vt6656/rxtx.c +111 -111
222 lines not on this page · raw message
drivers/staging/vt6656/wcmd.c +85 -85
170 lines not on this page · raw message
drivers/staging/vt6656/wmgr.c +174 -174
348 lines not on this page · raw message
drivers/staging/vt6656/wpactl.c +22 -22
44 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.0.4
Part of the diff is not shown here. View the raw message.
Hi!
On Mon, 2010-07-12 at 23:26 +0200, Roel Van Nyen wrote:
[...]
drivers/staging/vt6656/80211mgr.c vMgrDecodeBeacon( · line 184
Quoted 9 lines
drivers/staging/vt6656/80211mgr.c +1
-1@@ -178,7 +178,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 ;
Am I the only one who thinks that this should better be ---- snip ----
@@ -178,7 +178,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))
pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
}
break;---- snip ----
- if only for readability and understandability?
Bernd
Signature · 2 lines
Bernd Petrovitsch Email : [email protected] LUGA : http://www.luga.at
2010/7/13 Bernd Petrovitsch <[email protected]>
Quoted 29 lines
Hi!
On Mon, 2010-07-12 at 23:26 +0200, Roel Van Nyen wrote:
[...]Quoted 9 lines
(quoted diff) +0
-0@@ -178,7 +178,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;Am I the only one who thinks that this should better be ---- snip ----
(quoted diff) +0
-0@@ -178,7 +178,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))pFrame->pRSNWPA= (PWLAN_IE_RSN_EXT)pItem; }
break;
---- snip ----
- if only for readability and understandability?
Quoted 5 lines
Bernd
--
Bernd Petrovitsch Email : [email protected] LUGA : http://www.luga.at
Hi!
I think from a readability and understandability standpoint == true is very clear, anyone who reads it will explicitly understand the meaning.
The goal of my patch is to remove the defines from the ttype.h so that at some time ttype.h can be removed.
Any more pros or cons for the == true ?
Roel