Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 162332
b: refs/heads/master
c: 256a816
h: refs/heads/master
v: v3
  • Loading branch information
Jim Lieb authored and Greg Kroah-Hartman committed Sep 15, 2009
1 parent dcb80c8 commit 076633f
Show file tree
Hide file tree
Showing 20 changed files with 130 additions and 222 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a3d91b02830dd7c58d27e5de65222219ac2163f
refs/heads/master: 256a816b6b78bf29fba0c0f1bbcf998953429422
9 changes: 4 additions & 5 deletions trunk/drivers/staging/vt6655/baseband.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
*/

#include "tmacro.h"
#include "tbit.h"
#include "tether.h"
#include "mac.h"
#include "baseband.h"
Expand Down Expand Up @@ -2029,7 +2028,7 @@ BOOL BBbReadEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, PBYTE pbyData)
// W_MAX_TIMEOUT is the timeout period
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue);
if (BITbIsBitOn(byValue, BBREGCTL_DONE))
if (byValue & BBREGCTL_DONE)
break;
}

Expand Down Expand Up @@ -2074,7 +2073,7 @@ BOOL BBbWriteEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byData)
// W_MAX_TIMEOUT is the timeout period
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue);
if (BITbIsBitOn(byValue, BBREGCTL_DONE))
if (byValue & BBREGCTL_DONE)
break;
}

Expand Down Expand Up @@ -2106,7 +2105,7 @@ BOOL BBbIsRegBitsOn (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byTestBits)
BYTE byOrgData;

BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData);
return BITbIsAllBitsOn(byOrgData, byTestBits);
return (byOrgData & byTestBits) == byTestBits;
}


Expand All @@ -2129,7 +2128,7 @@ BOOL BBbIsRegBitsOff (DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byTestBits)
BYTE byOrgData;

BBbReadEmbeded(dwIoBase, byBBAddr, &byOrgData);
return BITbIsAllBitsOff(byOrgData, byTestBits);
return (byOrgData & byTestBits) == 0;
}

/*
Expand Down
19 changes: 9 additions & 10 deletions trunk/drivers/staging/vt6655/bssdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
*
*/

#include "tbit.h"
#include "ttype.h"
#include "tmacro.h"
#include "tether.h"
Expand Down Expand Up @@ -1035,14 +1034,14 @@ BSSvSecondCallBack(
//2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
if (((BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||(BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){
if ((( !(pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == FALSE))||((pDevice->byGPIO & GPIO0_DATA)&&(pDevice->bHWRadioOff == TRUE)))&&(cc==FALSE)){
cc=TRUE;
}
else if(cc==TRUE){

if(pDevice->bHWRadioOff == TRUE){
if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA))
//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV)))
if ( !(pDevice->byGPIO & GPIO0_DATA))
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==1) goto start;
status=1;
CARDbRadioPowerOff(pDevice);
Expand All @@ -1053,15 +1052,15 @@ CARDbRadioPowerOff(pDevice);
pDevice->bLinkPass = FALSE;

}
if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA))
//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV)))
if (pDevice->byGPIO &GPIO0_DATA)
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==2) goto start;
status=2;
CARDbRadioPowerOn(pDevice);
} }
else{
if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA))
//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV)))
if (pDevice->byGPIO & GPIO0_DATA)
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==3) goto start;
status=3;
CARDbRadioPowerOff(pDevice);
Expand All @@ -1072,8 +1071,8 @@ CARDbRadioPowerOff(pDevice);
pDevice->bLinkPass = FALSE;

}
if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA))
//||(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV)))
if ( !(pDevice->byGPIO & GPIO0_DATA))
//||( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV)))
{if(status==4) goto start;
status=4;
CARDbRadioPowerOn(pDevice);
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/staging/vt6655/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

#include "tmacro.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "desc.h"
Expand Down Expand Up @@ -2374,7 +2373,7 @@ CARDbyAutoChannelSelect(
}
if (sChannelTbl[ii].byMAP == 0) {
return ((BYTE) ii);
} else if (BITbIsBitOff(sChannelTbl[ii].byMAP, 0x08)) {
} else if ( !(sChannelTbl[ii].byMAP & 0x08)) {
byOptionChannel = (BYTE) ii;
}
}
Expand All @@ -2385,7 +2384,7 @@ CARDbyAutoChannelSelect(
if (sChannelTbl[ii].bValid == TRUE) {
if (sChannelTbl[ii].byMAP == 0) {
aiWeight[ii] += 100;
} else if (BITbIsBitOn(sChannelTbl[ii].byMAP, 0x01)) {
} else if (sChannelTbl[ii].byMAP & 0x01) {
if (ii > 3) {
aiWeight[ii-3] -= 10;
}
Expand Down Expand Up @@ -2973,7 +2972,7 @@ BOOL CARDbGetCurrentTSF (DWORD_PTR dwIoBase, PQWORD pqwCurrTSF)
MACvRegBitsOn(dwIoBase, MAC_REG_TFTCTL, TFTCTL_TSFCNTRRD);
for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
VNSvInPortB(dwIoBase + MAC_REG_TFTCTL, &byData);
if (BITbIsBitOff(byData, TFTCTL_TSFCNTRRD))
if ( !(byData & TFTCTL_TSFCNTRRD))
break;
}
if (ww == W_MAX_TIMEOUT)
Expand Down
23 changes: 11 additions & 12 deletions trunk/drivers/staging/vt6655/device_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

#include "device.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "tether.h"
Expand Down Expand Up @@ -789,17 +788,17 @@ else
MACvGPIOIn(pDevice->PortOffset, &pDevice->byGPIO);
//2008-4-14 <add> by chester for led issue
#ifdef FOR_LED_ON_NOTEBOOK
if (BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = TRUE;}
if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;}
if (pDevice->byGPIO & GPIO0_DATA){pDevice->bHWRadioOff = TRUE;}
if ( !(pDevice->byGPIO & GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;}

}
if ( (pDevice->bRadioControlOff == TRUE)) {
CARDbRadioPowerOff(pDevice);
}
else CARDbRadioPowerOn(pDevice);
#else
if ((BITbIsBitOn(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOff(pDevice->byRadioCtl, EEP_RADIOCTL_INV)) ||
(BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA) && BITbIsBitOn(pDevice->byRadioCtl, EEP_RADIOCTL_INV))) {
if (((pDevice->byGPIO & GPIO0_DATA) && !(pDevice->byRadioCtl & EEP_RADIOCTL_INV)) ||
( !(pDevice->byGPIO & GPIO0_DATA) && (pDevice->byRadioCtl & EEP_RADIOCTL_INV))) {
pDevice->bHWRadioOff = TRUE;
}
}
Expand Down Expand Up @@ -1703,7 +1702,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) {
uFIFOHeaderSize
);

if (BITbIsBitOff(byTsr1, TSR1_TERR)) {
if ( !(byTsr1 & TSR1_TERR)) {
if (byTsr0 != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X].\n",
(INT)uIdx, byTsr1, byTsr0);
Expand Down Expand Up @@ -1735,7 +1734,7 @@ static int device_tx_srv(PSDevice pDevice, UINT uIdx) {
}
}

if (BITbIsBitOn(byTsr1, TSR1_TERR)) {
if (byTsr1 & TSR1_TERR) {
if ((pTD->pTDInfo->byFlags & TD_FLAGS_PRIV_SKB) != 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Tx[%d] fail has error. tsr1[%02X] tsr0[%02X].\n",
(INT)uIdx, byTsr1, byTsr0);
Expand Down Expand Up @@ -2691,7 +2690,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
/*
// 2008-05-21 <mark> by Richardtai, we can't read RSSI here, because no packet bound with RSSI
if ((BITbIsBitOn(pDevice->dwIsr, ISR_RXDMA0)) &&
if ((pDevice->dwIsr & ISR_RXDMA0) &&
(pDevice->byLocalID != REV_ID_VT3253_B0) &&
(pDevice->bBSSIDFilter == TRUE)) {
// update RSSI
Expand Down Expand Up @@ -2732,7 +2731,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {

if (pDevice->byLocalID > REV_ID_VT3253_B1) {

if (BITbIsBitOn(pDevice->dwIsr, ISR_MEASURESTART)) {
if (pDevice->dwIsr & ISR_MEASURESTART) {
// 802.11h measure start
pDevice->byOrgChannel = pDevice->byCurrentCh;
VNSvInPortB(pDevice->PortOffset + MAC_REG_RCR, &(pDevice->byOrgRCR));
Expand Down Expand Up @@ -2764,7 +2763,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage0(pDevice->PortOffset);
}
}
if (BITbIsBitOn(pDevice->dwIsr, ISR_MEASUREEND)) {
if (pDevice->dwIsr & ISR_MEASUREEND) {
// 802.11h measure end
pDevice->bMeasureInProgress = FALSE;
VNSvOutPortB(pDevice->PortOffset + MAC_REG_RCR, pDevice->byOrgRCR);
Expand All @@ -2783,15 +2782,15 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
MACvSelectPage1(pDevice->PortOffset);
MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MSRCTL+1, MSRCTL1_TXPAUSE);
MACvSelectPage0(pDevice->PortOffset);
if (BITbIsBitOn(byData, MSRCTL_FINISH)) {
if (byData & MSRCTL_FINISH) {
// measure success
s_vCompleteCurrentMeasure(pDevice, 0);
} else {
// can not measure because not ready before end of measure time
s_vCompleteCurrentMeasure(pDevice, MEASURE_MODE_LATE);
}
}
if (BITbIsBitOn(pDevice->dwIsr, ISR_QUIETSTART)) {
if (pDevice->dwIsr & ISR_QUIETSTART) {
do {
;
} while (CARDbStartQuiet(pDevice) == FALSE);
Expand Down
11 changes: 5 additions & 6 deletions trunk/drivers/staging/vt6655/dpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "tcrc.h"
#include "wctl.h"
#include "wroute.h"
#include "tbit.h"
#include "hostap.h"
#include "rf.h"
#include "iowpa.h"
Expand Down Expand Up @@ -441,7 +440,7 @@ device_receive_frame (
dwDuration = (FrameSize << 4);
dwDuration /= acbyRxRate[*pbyRxRate%MAX_RATE];
if (*pbyRxRate <= RATE_11M) {
if (BITbIsBitOn(*pbyRxSts, 0x01)) {
if (*pbyRxSts & 0x01) {
// long preamble
dwDuration += 192;
} else {
Expand Down Expand Up @@ -572,7 +571,7 @@ device_receive_frame (
//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((skb->data+4)))
) {
// defragment
Expand Down Expand Up @@ -661,7 +660,7 @@ device_receive_frame (
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",
Expand All @@ -674,7 +673,7 @@ device_receive_frame (
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",
Expand Down Expand Up @@ -712,7 +711,7 @@ device_receive_frame (

if (pDevice->bEnablePSMode) {
if (IS_FC_MOREDATA((skb->data+4))) {
if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) {
if (*pbyRsr & RSR_ADDROK) {
//PSbSendPSPOLL((PSDevice)pDevice);
}
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/vt6655/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
*/

#include "tmacro.h"
#include "tbit.h"
#include "key.h"
#include "mac.h"

Expand Down
Loading

0 comments on commit 076633f

Please sign in to comment.