|
@@ -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++;
|
|
|
}
|
|
|
|