Staging: vt665x: remove tbit.h
authorJim Lieb <lieb@canonical.com>
Wed, 12 Aug 2009 21:54:15 +0000 (14:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:08 +0000 (12:02 -0700)
Remove use of tbit macros and remove the header file.

Signed-off-by: Jim Lieb <lieb@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 files changed:
drivers/staging/vt6656/baseband.c
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6656/card.c
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/int.c
drivers/staging/vt6656/key.c
drivers/staging/vt6656/mac.c
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/mib.c
drivers/staging/vt6656/michael.c
drivers/staging/vt6656/power.c
drivers/staging/vt6656/rxtx.c
drivers/staging/vt6656/tbit.h [deleted file]
drivers/staging/vt6656/tcrc.c
drivers/staging/vt6656/tether.c
drivers/staging/vt6656/tkip.c
drivers/staging/vt6656/wmgr.c

index c5430d99b5f254a4b1341220526f1538f00defea..820a7b8e6fb82dfcedbca8ed355383fd40ec8195 100644 (file)
@@ -38,7 +38,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "tether.h"
 #include "mac.h"
 #include "baseband.h"
index a8e53d94df4a3fd6929be7fbbffda1ccdcf4ec63..6b1678bfd61a56749467f45eb53da020d58229e2 100644 (file)
@@ -55,7 +55,6 @@
 #include "card.h"
 #include "mac.h"
 #include "wpa2.h"
-#include "tbit.h"
 #include "control.h"
 #include "rndis.h"
 #include "iowpa.h"
@@ -1437,7 +1436,7 @@ BSSvUpdateNodeTxCounter(
         //DBG_PRN_GRP21(("Device %08X, wRate %04X, byTSR %02X\n", hDeviceContext, wRate, byTSR));
         if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
             pMgmt->sNodeDBTable[0].uTxAttempts += 1;
-            if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
+            if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
                 // transmit success, TxAttempts at least plus one
                 pMgmt->sNodeDBTable[0].uTxOk[MAX_RATE]++;
                 if ( (byFallBack == AUTO_FB_NONE) ||
@@ -1489,7 +1488,7 @@ BSSvUpdateNodeTxCounter(
 
             if (BSSbIsSTAInNodeDB((HANDLE)pDevice, pbyDestAddr, &uNodeIndex)){
                 pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1;
-                if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
+                if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
                     // transmit success, TxAttempts at least plus one
                     pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
                     if ( (byFallBack == AUTO_FB_NONE) ||
index edc744e96c80aeb7ff8ef2d3faaeaf6e86e69f35..d73efeea2d5c0b0537607e5a1907f23e5b37d7ed 100644 (file)
@@ -47,7 +47,6 @@
 
 #include "tmacro.h"
 #include "card.h"
-#include "tbit.h"
 #include "baseband.h"
 #include "mac.h"
 #include "desc.h"
index 16fd33c6bca1218941f22e36dd29a690056613d6..835c6d6967bfcfbab984031acf513d93e8db1fe3 100644 (file)
@@ -49,7 +49,6 @@
 #include "tkip.h"
 #include "tcrc.h"
 #include "wctl.h"
-#include "tbit.h"
 #include "hostap.h"
 #include "rf.h"
 #include "iowpa.h"
@@ -568,7 +567,7 @@ RXbBulkInProcessData (
     //remove the CRC length
     FrameSize -= U_CRC_LEN;
 
-    if ((BITbIsAllBitsOff(*pbyRsr, (RSR_ADDRBROAD | RSR_ADDRMULTI))) && // unicast address
+    if ( !(*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) && // unicast address
         (IS_FRAGMENT_PKT((pbyFrame)))
         ) {
         // defragment
@@ -663,7 +662,7 @@ RXbBulkInProcessData (
     else {
         if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
             //In AP mode, hw only check addr1(BSSID or RA) if equal to local MAC.
-            if (BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) {
+            if ( !(*pbyRsr & RSR_BSSIDOK)) {
                 if (bDeFragRx) {
                     if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
                         DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
@@ -676,7 +675,7 @@ RXbBulkInProcessData (
         else {
             // discard DATA packet while not associate || BSSID error
             if ((pDevice->bLinkPass == FALSE) ||
-                BITbIsBitOff(*pbyRsr, RSR_BSSIDOK)) {
+                !(*pbyRsr & RSR_BSSIDOK)) {
                 if (bDeFragRx) {
                     if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
                         DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
@@ -724,7 +723,7 @@ RXbBulkInProcessData (
 
     if (pDevice->bEnablePSMode) {
         if (IS_FC_MOREDATA((pbyFrame))) {
-            if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) {
+            if (*pbyRsr & RSR_ADDROK) {
                 //PSbSendPSPOLL((PSDevice)pDevice);
             }
         }
index 60d6a13fb8c02238e47d339cb35106e0e9f141fb..35053be6900d23bbf3c3f2f197ed9418f0ec2d06 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "int.h"
 #include "mib.h"
-#include "tbit.h"
 #include "tmacro.h"
 #include "mac.h"
 #include "power.h"
@@ -112,28 +111,28 @@ INTnsProcessData(
     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsInterruptProcessData\n");
 
     pINTData = (PSINTData) pDevice->intBuf.pDataBuf;
-    if (BITbIsBitOn(pINTData->byTSR0, TSR_VALID)) {
+    if (pINTData->byTSR0 & TSR_VALID) {
         STAvUpdateTDStatCounter (&(pDevice->scStatistic), (BYTE) (pINTData->byPkt0 & 0x0F), (BYTE) (pINTData->byPkt0>>4), pINTData->byTSR0);
         BSSvUpdateNodeTxCounter (pDevice, &(pDevice->scStatistic),  pINTData->byTSR0, pINTData->byPkt0);
         //DBG_PRN_GRP01(("TSR0 %02x\n", pINTData->byTSR0));
     }
-    if (BITbIsBitOn(pINTData->byTSR1, TSR_VALID)) {
+    if (pINTData->byTSR1 & TSR_VALID) {
         STAvUpdateTDStatCounter (&(pDevice->scStatistic), (BYTE) (pINTData->byPkt1 & 0x0F), (BYTE) (pINTData->byPkt1>>4), pINTData->byTSR1);
         BSSvUpdateNodeTxCounter (pDevice, &(pDevice->scStatistic),  pINTData->byTSR1, pINTData->byPkt1);
         //DBG_PRN_GRP01(("TSR1 %02x\n", pINTData->byTSR1));
     }
-    if (BITbIsBitOn(pINTData->byTSR2, TSR_VALID)) {
+    if (pINTData->byTSR2 & TSR_VALID) {
         STAvUpdateTDStatCounter (&(pDevice->scStatistic), (BYTE) (pINTData->byPkt2 & 0x0F), (BYTE) (pINTData->byPkt2>>4), pINTData->byTSR2);
         BSSvUpdateNodeTxCounter (pDevice, &(pDevice->scStatistic),  pINTData->byTSR2, pINTData->byPkt2);
         //DBG_PRN_GRP01(("TSR2 %02x\n", pINTData->byTSR2));
     }
-    if (BITbIsBitOn(pINTData->byTSR3, TSR_VALID)) {
+    if (pINTData->byTSR3 & TSR_VALID) {
         STAvUpdateTDStatCounter (&(pDevice->scStatistic), (BYTE) (pINTData->byPkt3 & 0x0F), (BYTE) (pINTData->byPkt3>>4), pINTData->byTSR3);
         BSSvUpdateNodeTxCounter (pDevice, &(pDevice->scStatistic),  pINTData->byTSR3, pINTData->byPkt3);
         //DBG_PRN_GRP01(("TSR3 %02x\n", pINTData->byTSR3));
     }
     if ( pINTData->byISR0 != 0 ) {
-        if ( BITbIsBitOn(pINTData->byISR0, ISR_BNTX) ) {
+        if (pINTData->byISR0 & ISR_BNTX) {
 
             if (pDevice->eOPMode == OP_MODE_AP) {
                 if(pMgmt->byDTIMCount > 0) {
@@ -154,7 +153,7 @@ INTnsProcessData(
         } else {
             pDevice->bBeaconSent = FALSE;
         }
-        if ( BITbIsBitOn(pINTData->byISR0, ISR_TBTT) ) {
+        if (pINTData->byISR0 & ISR_TBTT) {
             if ( pDevice->bEnablePSMode ) {
                 bScheduleCommand((HANDLE) pDevice, WLAN_CMD_TBTT_WAKEUP, NULL);
             }
@@ -176,7 +175,7 @@ INTnsProcessData(
     }
 
     if ( pINTData->byISR1 != 0 ) {
-        if ( BITbIsBitOn(pINTData->byISR1, ISR_GPIO3) ) {
+        if (pINTData->byISR1 & ISR_GPIO3) {
             bScheduleCommand((HANDLE) pDevice, WLAN_CMD_RADIO, NULL);
         }
     }
index b82bc46886ce7889e15b6abd2cd94839dff4869c..13fc69a1a0843f1e97dfeff8a73133c0c31d43dd 100644 (file)
@@ -37,7 +37,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "key.h"
 #include "mac.h"
 #include "rndis.h"
index fe37192a42750f07d88c1adde5826882ce77490f..55a798668fa5efeac4953a50353d749619f79b13 100644 (file)
@@ -31,7 +31,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "tether.h"
 #include "desc.h"
 #include "mac.h"
index faa4b5275b8544984c6a065953fa779e697cc333..7f96bcaf1c601a8fa99d54ce10ed9d1aa0566c11 100644 (file)
@@ -48,7 +48,6 @@
 
 #include "device.h"
 #include "card.h"
-#include "tbit.h"
 #include "baseband.h"
 #include "mac.h"
 #include "tether.h"
index bb7c0cfcbe774165cbdcf0de6d2a090410d0feb2..910e610b7cc08a5d4f096c0302a4c80e166d5d67 100644 (file)
@@ -39,7 +39,6 @@
 
 #include "upc.h"
 #include "mac.h"
-#include "tbit.h"
 #include "tether.h"
 #include "mib.h"
 #include "wctl.h"
@@ -103,35 +102,35 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr
     }
 
 
-    if (BITbIsBitOn(byIsr0, ISR_ACTX))              // ISR, bit0
+    if (byIsr0 & ISR_ACTX)              // ISR, bit0
         pStatistic->ISRStat.dwIsrTx0OK++;           // TXDMA0 successful
 
-    if (BITbIsBitOn(byIsr0, ISR_BNTX))              // ISR, bit2
+    if (byIsr0 & ISR_BNTX)              // ISR, bit2
         pStatistic->ISRStat.dwIsrBeaconTxOK++;      // BeaconTx successful
 
-    if (BITbIsBitOn(byIsr0, ISR_RXDMA0))            // ISR, bit3
+    if (byIsr0 & ISR_RXDMA0)            // ISR, bit3
         pStatistic->ISRStat.dwIsrRx0OK++;           // Rx0 successful
 
-    if (BITbIsBitOn(byIsr0, ISR_TBTT))              // ISR, bit4
+    if (byIsr0 & ISR_TBTT)              // ISR, bit4
         pStatistic->ISRStat.dwIsrTBTTInt++;         // TBTT successful
 
-    if (BITbIsBitOn(byIsr0, ISR_SOFTTIMER))         // ISR, bit6
+    if (byIsr0 & ISR_SOFTTIMER)         // ISR, bit6
         pStatistic->ISRStat.dwIsrSTIMERInt++;
 
-    if (BITbIsBitOn(byIsr0, ISR_WATCHDOG))          // ISR, bit7
+    if (byIsr0 & ISR_WATCHDOG)          // ISR, bit7
         pStatistic->ISRStat.dwIsrWatchDog++;
 
 
-    if (BITbIsBitOn(byIsr1, ISR_FETALERR))              // ISR, bit8
+    if (byIsr1 & ISR_FETALERR)              // ISR, bit8
         pStatistic->ISRStat.dwIsrUnrecoverableError++;
 
-    if (BITbIsBitOn(byIsr1, ISR_SOFTINT))               // ISR, bit9
+    if (byIsr1 & ISR_SOFTINT)               // ISR, bit9
         pStatistic->ISRStat.dwIsrSoftInterrupt++;       // software interrupt
 
-    if (BITbIsBitOn(byIsr1, ISR_MIBNEARFULL))           // ISR, bit10
+    if (byIsr1 & ISR_MIBNEARFULL)           // ISR, bit10
         pStatistic->ISRStat.dwIsrMIBNearfull++;
 
-    if (BITbIsBitOn(byIsr1, ISR_RXNOBUF))               // ISR, bit11
+    if (byIsr1 & ISR_RXNOBUF)               // ISR, bit11
         pStatistic->ISRStat.dwIsrRxNoBuf++;             // Rx No Buff
 
 }
@@ -160,20 +159,20 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
     //need change
     PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
 
-    if (BITbIsBitOn(byRSR, RSR_ADDROK))
+    if (byRSR & RSR_ADDROK)
         pStatistic->dwRsrADDROk++;
-    if (BITbIsBitOn(byRSR, RSR_CRCOK)) {
+    if (byRSR & RSR_CRCOK) {
         pStatistic->dwRsrCRCOk++;
 
         pStatistic->ullRsrOK++;
 
         if (cbFrameLength >= U_ETHER_ADDR_LEN) {
             // update counters in case that successful transmit
-            if (BITbIsBitOn(byRSR, RSR_ADDRBROAD)) {
+            if (byRSR & RSR_ADDRBROAD) {
                 pStatistic->ullRxBroadcastFrames++;
                 pStatistic->ullRxBroadcastBytes += (ULONGLONG)cbFrameLength;
             }
-            else if (BITbIsBitOn(byRSR, RSR_ADDRMULTI)) {
+            else if (byRSR & RSR_ADDRMULTI) {
                 pStatistic->ullRxMulticastFrames++;
                 pStatistic->ullRxMulticastBytes += (ULONGLONG)cbFrameLength;
             }
@@ -186,84 +185,84 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
 
     if(byRxRate==22) {
         pStatistic->CustomStat.ullRsr11M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr11MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"11M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr11M, (INT)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR);
     }
     else if(byRxRate==11) {
         pStatistic->CustomStat.ullRsr5M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr5MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 5M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr5M, (INT)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR);
     }
     else if(byRxRate==4) {
         pStatistic->CustomStat.ullRsr2M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr2MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 2M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr2M, (INT)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR);
     }
     else if(byRxRate==2){
         pStatistic->CustomStat.ullRsr1M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr1MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 1M: ALL[%d], OK[%d]:[%02x]\n", (INT)pStatistic->CustomStat.ullRsr1M, (INT)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR);
     }
     else if(byRxRate==12){
         pStatistic->CustomStat.ullRsr6M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr6MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 6M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr6M, (INT)pStatistic->CustomStat.ullRsr6MCRCOk);
     }
     else if(byRxRate==18){
         pStatistic->CustomStat.ullRsr9M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr9MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" 9M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr9M, (INT)pStatistic->CustomStat.ullRsr9MCRCOk);
     }
     else if(byRxRate==24){
         pStatistic->CustomStat.ullRsr12M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr12MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"12M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr12M, (INT)pStatistic->CustomStat.ullRsr12MCRCOk);
     }
     else if(byRxRate==36){
         pStatistic->CustomStat.ullRsr18M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr18MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"18M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr18M, (INT)pStatistic->CustomStat.ullRsr18MCRCOk);
     }
     else if(byRxRate==48){
         pStatistic->CustomStat.ullRsr24M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr24MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"24M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr24M, (INT)pStatistic->CustomStat.ullRsr24MCRCOk);
     }
     else if(byRxRate==72){
         pStatistic->CustomStat.ullRsr36M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr36MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"36M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr36M, (INT)pStatistic->CustomStat.ullRsr36MCRCOk);
     }
     else if(byRxRate==96){
         pStatistic->CustomStat.ullRsr48M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr48MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"48M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr48M, (INT)pStatistic->CustomStat.ullRsr48MCRCOk);
     }
     else if(byRxRate==108){
         pStatistic->CustomStat.ullRsr54M++;
-        if(BITbIsBitOn(byRSR, RSR_CRCOK)) {
+        if(byRSR & RSR_CRCOK) {
             pStatistic->CustomStat.ullRsr54MCRCOk++;
         }
         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"54M: ALL[%d], OK[%d]\n", (INT)pStatistic->CustomStat.ullRsr54M, (INT)pStatistic->CustomStat.ullRsr54MCRCOk);
@@ -272,27 +271,27 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Unknown: Total[%d], CRCOK[%d]\n", (INT)pStatistic->dwRsrRxPacket+1, (INT)pStatistic->dwRsrCRCOk);
     }
 
-    if (BITbIsBitOn(byRSR, RSR_BSSIDOK))
+    if (byRSR & RSR_BSSIDOK)
         pStatistic->dwRsrBSSIDOk++;
 
-    if (BITbIsBitOn(byRSR, RSR_BCNSSIDOK))
+    if (byRSR & RSR_BCNSSIDOK)
         pStatistic->dwRsrBCNSSIDOk++;
-    if (BITbIsBitOn(byRSR, RSR_IVLDLEN))  //invalid len (> 2312 byte)
+    if (byRSR & RSR_IVLDLEN)  //invalid len (> 2312 byte)
         pStatistic->dwRsrLENErr++;
-    if (BITbIsBitOn(byRSR, RSR_IVLDTYP))  //invalid packet type
+    if (byRSR & RSR_IVLDTYP)  //invalid packet type
         pStatistic->dwRsrTYPErr++;
-    if (BITbIsBitOn(byRSR, (RSR_IVLDTYP | RSR_IVLDLEN)) || BITbIsBitOff(byRSR, RSR_CRCOK))
+    if ((byRSR & (RSR_IVLDTYP | RSR_IVLDLEN)) || !(byRSR & RSR_CRCOK))
         pStatistic->dwRsrErr++;
 
-    if (BITbIsBitOn(byNewRSR, NEWRSR_DECRYPTOK))
+    if (byNewRSR & NEWRSR_DECRYPTOK)
         pStatistic->dwNewRsrDECRYPTOK++;
-    if (BITbIsBitOn(byNewRSR, NEWRSR_CFPIND))
+    if (byNewRSR & NEWRSR_CFPIND)
         pStatistic->dwNewRsrCFP++;
-    if (BITbIsBitOn(byNewRSR, NEWRSR_HWUTSF))
+    if (byNewRSR & NEWRSR_HWUTSF)
         pStatistic->dwNewRsrUTSF++;
-    if (BITbIsBitOn(byNewRSR, NEWRSR_BCNHITAID))
+    if (byNewRSR & NEWRSR_BCNHITAID)
         pStatistic->dwNewRsrHITAID++;
-    if (BITbIsBitOn(byNewRSR, NEWRSR_BCNHITAID0))
+    if (byNewRSR & NEWRSR_BCNHITAID0)
         pStatistic->dwNewRsrHITAID0++;
 
     // increase rx packet count
@@ -308,9 +307,9 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
         pStatistic->dwRsrRxControl++;
     }
 
-    if (BITbIsBitOn(byRSR, RSR_ADDRBROAD))
+    if (byRSR & RSR_ADDRBROAD)
         pStatistic->dwRsrBroadcast++;
-    else if (BITbIsBitOn(byRSR, RSR_ADDRMULTI))
+    else if (byRSR & RSR_ADDRMULTI)
         pStatistic->dwRsrMulticast++;
     else
         pStatistic->dwRsrDirected++;
@@ -436,7 +435,7 @@ STAvUpdateTDStatCounter (
             pStatistic->dwTxRetryCount[byRetyCnt-1]++;
 
     }
-    if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
+    if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
 
 #ifdef Calcu_LinkQual
    if (byRetyCnt < 2)
@@ -469,9 +468,9 @@ STAvUpdateTDStatCounter (
 #endif
 
         pStatistic->dwTsrErr++;
-        if (BITbIsBitOn(byTSR, TSR_RETRYTMO))
+        if (byTSR & TSR_RETRYTMO)
             pStatistic->dwTsrRetryTimeout++;
-        if (BITbIsBitOn(byTSR, TSR_TMO))
+        if (byTSR & TSR_TMO)
             pStatistic->dwTsrTransmitTimeout++;
     }
 
index 2c8f875659dd05622f667c285062c7d64669c562..c930e0cdb853ae1b4429443f0b7d40edf7ed8762 100644 (file)
@@ -40,7 +40,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "michael.h"
 
 /*---------------------  Static Definitions -------------------------*/
index 6461355a40b66efcb3da4b6bb7afafcd4e368d3e..b5702b098e182dc17502074ee03abdddef1e403c 100644 (file)
  */
 
 #include "ttype.h"
-#include "tbit.h"
 #include "mac.h"
 #include "device.h"
 #include "wmgr.h"
 #include "power.h"
 #include "wcmd.h"
-#include "tbit.h"
 #include "rxtx.h"
 #include "card.h"
 #include "control.h"
index 6a8eb1d26ca5821d29160e6ab8020e5373ef3b76..94ddf8bab62be9aa05bdb90dbe8c52da29f7574e 100644 (file)
@@ -57,7 +57,6 @@
 #include "tkip.h"
 #include "tcrc.h"
 #include "wctl.h"
-#include "tbit.h"
 #include "hostap.h"
 #include "rf.h"
 #include "datarate.h"
diff --git a/drivers/staging/vt6656/tbit.h b/drivers/staging/vt6656/tbit.h
deleted file mode 100644 (file)
index 1850282..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: tbit.h
- *
- * Purpose: Bit routines
- *
- * Author: Tevin Chen
- *
- * Date: May 21, 1996
- *
- */
-
-#ifndef __TBIT_H__
-#define __TBIT_H__
-
-#include "ttype.h"
-
-/*---------------------  Export Definitions -------------------------*/
-
-/*---------------------  Export Types  ------------------------------*/
-
-/*---------------------  Export Macros ------------------------------*/
-
-// test single bit on
-#define BITbIsBitOn(tData, tTestBit)                \
-    (((tData) & (tTestBit)) != 0)
-
-// test single bit off
-#define BITbIsBitOff(tData, tTestBit)               \
-    (((tData) & (tTestBit)) == 0)
-
-
-#define BITbIsAllBitsOn(tData, tTestBit)            \
-    (((tData) & (tTestBit)) == (tTestBit))
-
-#define BITbIsAllBitsOff(tData, tTestBit)           \
-    (((tData) & (tTestBit)) == 0)
-
-#define BITbIsAnyBitsOn(tData, tTestBit)            \
-    (((tData) & (tTestBit)) != 0)
-
-#define BITbIsAnyBitsOff(tData, tTestBit)           \
-    (((tData) & (tTestBit)) != (tTestBit))
-
-/*---------------------  Export Classes  ----------------------------*/
-
-/*---------------------  Export Variables  --------------------------*/
-
-/*---------------------  Export Functions  --------------------------*/
-
-
-
-#endif // __TBIT_H__
-
-
-
index 79347e48369adf125219c747a96cba4798dee6d1..5f0c74763f8706ae6fb3ab23d3fe760746f34451 100644 (file)
@@ -33,7 +33,6 @@
  *
  */
 
-#include "tbit.h"
 #include "tcrc.h"
 
 /*---------------------  Static Definitions -------------------------*/
index 7268735d01ce0474633793880362bb3312b8a993..c90b469ad545503ed7c76d2eea9ff88c80da1f2c 100644 (file)
@@ -34,7 +34,6 @@
 
 #include "device.h"
 #include "tmacro.h"
-#include "tbit.h"
 #include "tcrc.h"
 #include "tether.h"
 
@@ -74,7 +73,7 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr)
     // reverse most bit to least bit
     for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) {
         byHash <<= 1;
-        if (BITbIsBitOn(byTmpHash, 0x01))
+        if (byTmpHash & 0x01)
             byHash |= 1;
         byTmpHash >>= 1;
     }
index bbb3e62f03c0656ec5c0002b9d3c4614788f7469..8ca154080e98a9276110bd38b25a95a96a35f99c 100644 (file)
@@ -33,7 +33,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "tkip.h"
 
 /*---------------------  Static Definitions -------------------------*/
index d40d1bcf0cfeb3ffe03ea12096f96b94be15d0b3..330aea69d2312975cf650794ef6cd95ea754382d 100644 (file)
@@ -62,7 +62,6 @@
  */
 
 #include "tmacro.h"
-#include "tbit.h"
 #include "desc.h"
 #include "device.h"
 #include "card.h"