#include "int.h"
#include "mib.h"
-#include "tbit.h"
#include "tmacro.h"
#include "mac.h"
#include "power.h"
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) {
} 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);
}
}
if ( pINTData->byISR1 != 0 ) {
- if ( BITbIsBitOn(pINTData->byISR1, ISR_GPIO3) ) {
+ if (pINTData->byISR1 & ISR_GPIO3) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_RADIO, NULL);
}
}
#include "upc.h"
#include "mac.h"
-#include "tbit.h"
#include "tether.h"
#include "mib.h"
#include "wctl.h"
}
- 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
}
//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;
}
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);
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
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++;
pStatistic->dwTxRetryCount[byRetyCnt-1]++;
}
- if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
+ if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
#ifdef Calcu_LinkQual
if (byRetyCnt < 2)
#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++;
}