aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorJim Lieb <lieb@canonical.com>2009-08-12 14:54:15 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:08 -0700
commit8a3d91b02830dd7c58d27e5de65222219ac2163f (patch)
tree90144dce79d0be450803761e51969e1b93ad62f4 /drivers/staging/vt6656
parentdad72fed3692a918fb567915f110ae71fb7ffe32 (diff)
Staging: vt665x: remove tbit.h
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>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/baseband.c1
-rw-r--r--drivers/staging/vt6656/bssdb.c5
-rw-r--r--drivers/staging/vt6656/card.c1
-rw-r--r--drivers/staging/vt6656/dpc.c9
-rw-r--r--drivers/staging/vt6656/int.c15
-rw-r--r--drivers/staging/vt6656/key.c1
-rw-r--r--drivers/staging/vt6656/mac.c1
-rw-r--r--drivers/staging/vt6656/main_usb.c1
-rw-r--r--drivers/staging/vt6656/mib.c83
-rw-r--r--drivers/staging/vt6656/michael.c1
-rw-r--r--drivers/staging/vt6656/power.c2
-rw-r--r--drivers/staging/vt6656/rxtx.c1
-rw-r--r--drivers/staging/vt6656/tbit.h73
-rw-r--r--drivers/staging/vt6656/tcrc.c1
-rw-r--r--drivers/staging/vt6656/tether.c3
-rw-r--r--drivers/staging/vt6656/tkip.c1
-rw-r--r--drivers/staging/vt6656/wmgr.c1
17 files changed, 55 insertions, 145 deletions
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c
index c5430d99b5f2..820a7b8e6fb8 100644
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -38,7 +38,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "tether.h"
#include "mac.h"
#include "baseband.h"
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index a8e53d94df4a..6b1678bfd61a 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -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) ||
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index edc744e96c80..d73efeea2d5c 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -47,7 +47,6 @@
#include "tmacro.h"
#include "card.h"
-#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "desc.h"
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 16fd33c6bca1..835c6d6967bf 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -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);
}
}
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c
index 60d6a13fb8c0..35053be6900d 100644
--- a/drivers/staging/vt6656/int.c
+++ b/drivers/staging/vt6656/int.c
@@ -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);
}
}
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index b82bc46886ce..13fc69a1a084 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -37,7 +37,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "key.h"
#include "mac.h"
#include "rndis.h"
diff --git a/drivers/staging/vt6656/mac.c b/drivers/staging/vt6656/mac.c
index fe37192a4275..55a798668fa5 100644
--- a/drivers/staging/vt6656/mac.c
+++ b/drivers/staging/vt6656/mac.c
@@ -31,7 +31,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "tether.h"
#include "desc.h"
#include "mac.h"
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index faa4b5275b85..7f96bcaf1c60 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -48,7 +48,6 @@
#include "device.h"
#include "card.h"
-#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "tether.h"
diff --git a/drivers/staging/vt6656/mib.c b/drivers/staging/vt6656/mib.c
index bb7c0cfcbe77..910e610b7cc0 100644
--- a/drivers/staging/vt6656/mib.c
+++ b/drivers/staging/vt6656/mib.c
@@ -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++;
}
diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c
index 2c8f875659dd..c930e0cdb853 100644
--- a/drivers/staging/vt6656/michael.c
+++ b/drivers/staging/vt6656/michael.c
@@ -40,7 +40,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "michael.h"
/*--------------------- Static Definitions -------------------------*/
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 6461355a40b6..b5702b098e18 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -38,13 +38,11 @@
*/
#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"
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 6a8eb1d26ca5..94ddf8bab62b 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -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
index 1850282ce443..000000000000
--- a/drivers/staging/vt6656/tbit.h
+++ /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__
-
-
-
diff --git a/drivers/staging/vt6656/tcrc.c b/drivers/staging/vt6656/tcrc.c
index 79347e48369a..5f0c74763f87 100644
--- a/drivers/staging/vt6656/tcrc.c
+++ b/drivers/staging/vt6656/tcrc.c
@@ -33,7 +33,6 @@
*
*/
-#include "tbit.h"
#include "tcrc.h"
/*--------------------- Static Definitions -------------------------*/
diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c
index 7268735d01ce..c90b469ad545 100644
--- a/drivers/staging/vt6656/tether.c
+++ b/drivers/staging/vt6656/tether.c
@@ -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;
}
diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c
index bbb3e62f03c0..8ca154080e98 100644
--- a/drivers/staging/vt6656/tkip.c
+++ b/drivers/staging/vt6656/tkip.c
@@ -33,7 +33,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "tkip.h"
/*--------------------- Static Definitions -------------------------*/
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
index d40d1bcf0cfe..330aea69d231 100644
--- a/drivers/staging/vt6656/wmgr.c
+++ b/drivers/staging/vt6656/wmgr.c
@@ -62,7 +62,6 @@
*/
#include "tmacro.h"
-#include "tbit.h"
#include "desc.h"
#include "device.h"
#include "card.h"