diff options
Diffstat (limited to 'drivers/staging/vt6655/mib.c')
-rw-r--r-- | drivers/staging/vt6655/mib.c | 101 |
1 files changed, 50 insertions, 51 deletions
diff --git a/drivers/staging/vt6655/mib.c b/drivers/staging/vt6655/mib.c index 48484bbe7f2..fb11595c82c 100644 --- a/drivers/staging/vt6655/mib.c +++ b/drivers/staging/vt6655/mib.c @@ -39,7 +39,6 @@ #include "upc.h" #include "mac.h" -#include "tbit.h" #include "tether.h" #include "mib.h" #include "wctl.h" @@ -104,58 +103,58 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, DWORD dwIsr) } //Added by Kyle - if (BITbIsBitOn(dwIsr, ISR_TXDMA0)) // ISR, bit0 + if (dwIsr & ISR_TXDMA0) // ISR, bit0 pStatistic->ISRStat.dwIsrTx0OK++; // TXDMA0 successful - if (BITbIsBitOn(dwIsr, ISR_AC0DMA)) // ISR, bit1 + if (dwIsr & ISR_AC0DMA) // ISR, bit1 pStatistic->ISRStat.dwIsrAC0TxOK++; // AC0DMA successful - if (BITbIsBitOn(dwIsr, ISR_BNTX)) // ISR, bit2 + if (dwIsr & ISR_BNTX) // ISR, bit2 pStatistic->ISRStat.dwIsrBeaconTxOK++; // BeaconTx successful - if (BITbIsBitOn(dwIsr, ISR_RXDMA0)) // ISR, bit3 + if (dwIsr & ISR_RXDMA0) // ISR, bit3 pStatistic->ISRStat.dwIsrRx0OK++; // Rx0 successful - if (BITbIsBitOn(dwIsr, ISR_TBTT)) // ISR, bit4 + if (dwIsr & ISR_TBTT) // ISR, bit4 pStatistic->ISRStat.dwIsrTBTTInt++; // TBTT successful - if (BITbIsBitOn(dwIsr, ISR_SOFTTIMER)) // ISR, bit6 + if (dwIsr & ISR_SOFTTIMER) // ISR, bit6 pStatistic->ISRStat.dwIsrSTIMERInt++; - if (BITbIsBitOn(dwIsr, ISR_WATCHDOG)) // ISR, bit7 + if (dwIsr & ISR_WATCHDOG) // ISR, bit7 pStatistic->ISRStat.dwIsrWatchDog++; - if (BITbIsBitOn(dwIsr, ISR_FETALERR)) // ISR, bit8 + if (dwIsr & ISR_FETALERR) // ISR, bit8 pStatistic->ISRStat.dwIsrUnrecoverableError++; - if (BITbIsBitOn(dwIsr, ISR_SOFTINT)) // ISR, bit9 + if (dwIsr & ISR_SOFTINT) // ISR, bit9 pStatistic->ISRStat.dwIsrSoftInterrupt++; // software interrupt - if (BITbIsBitOn(dwIsr, ISR_MIBNEARFULL)) // ISR, bit10 + if (dwIsr & ISR_MIBNEARFULL) // ISR, bit10 pStatistic->ISRStat.dwIsrMIBNearfull++; - if (BITbIsBitOn(dwIsr, ISR_RXNOBUF)) // ISR, bit11 + if (dwIsr & ISR_RXNOBUF) // ISR, bit11 pStatistic->ISRStat.dwIsrRxNoBuf++; // Rx No Buff - if (BITbIsBitOn(dwIsr, ISR_RXDMA1)) // ISR, bit12 + if (dwIsr & ISR_RXDMA1) // ISR, bit12 pStatistic->ISRStat.dwIsrRx1OK++; // Rx1 successful -// if (BITbIsBitOn(dwIsr, ISR_ATIMTX)) // ISR, bit13 +// if (dwIsr & ISR_ATIMTX) // ISR, bit13 // pStatistic->ISRStat.dwIsrATIMTxOK++; // ATIMTX successful -// if (BITbIsBitOn(dwIsr, ISR_SYNCTX)) // ISR, bit14 +// if (dwIsr & ISR_SYNCTX) // ISR, bit14 // pStatistic->ISRStat.dwIsrSYNCTxOK++; // SYNCTX successful -// if (BITbIsBitOn(dwIsr, ISR_CFPEND)) // ISR, bit18 +// if (dwIsr & ISR_CFPEND) // ISR, bit18 // pStatistic->ISRStat.dwIsrCFPEnd++; -// if (BITbIsBitOn(dwIsr, ISR_ATIMEND)) // ISR, bit19 +// if (dwIsr & ISR_ATIMEND) // ISR, bit19 // pStatistic->ISRStat.dwIsrATIMEnd++; -// if (BITbIsBitOn(dwIsr, ISR_SYNCFLUSHOK)) // ISR, bit20 +// if (dwIsr & ISR_SYNCFLUSHOK) // ISR, bit20 // pStatistic->ISRStat.dwIsrSYNCFlushOK++; - if (BITbIsBitOn(dwIsr, ISR_SOFTTIMER1)) // ISR, bit21 + if (dwIsr & ISR_SOFTTIMER1) // ISR, bit21 pStatistic->ISRStat.dwIsrSTIMER1Int++; } @@ -184,20 +183,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; } @@ -210,84 +209,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); @@ -296,27 +295,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))) + if (byRSR & (RSR_IVLDTYP | RSR_IVLDLEN)) 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 @@ -332,9 +331,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++; @@ -486,13 +485,13 @@ STAvUpdateTDStatCounter ( } } else { - if (BITbIsBitOn(byTSR1, TSR1_TERR)) + if (byTSR1 & TSR1_TERR) pStatistic->dwTsrErr[uIdx]++; - if (BITbIsBitOn(byTSR1, TSR1_RETRYTMO)) + if (byTSR1 & TSR1_RETRYTMO) pStatistic->dwTsrRetryTimeout[uIdx]++; - if (BITbIsBitOn(byTSR1, TSR1_TMO)) + if (byTSR1 & TSR1_TMO) pStatistic->dwTsrTransmitTimeout[uIdx]++; - if (BITbIsBitOn(byTSR1, ACK_DATA)) + if (byTSR1 & ACK_DATA) pStatistic->dwTsrACKData[uIdx]++; } |