Commit 256a816b authored by Jim Lieb's avatar Jim Lieb Committed by Greg Kroah-Hartman
Browse files

Staging: vt665x: remove tbit.h part 2



Remove use of tbit macros adn remove header file.

Signed-off-by: default avatarJim Lieb <lieb@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8a3d91b0
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@
 */

#include "tmacro.h"
#include "tbit.h"
#include "tether.h"
#include "mac.h"
#include "baseband.h"
@@ -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;
    }

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

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


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

/*
+9 −10
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@
 *
 */

#include "tbit.h"
#include "ttype.h"
#include "tmacro.h"
#include "tether.h"
@@ -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);
@@ -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);
@@ -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);
+3 −4
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@

#include "tmacro.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "desc.h"
@@ -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;
                }
            }
@@ -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;
                    }
@@ -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)
+11 −12
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@

#include "device.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "tether.h"
@@ -789,8 +788,8 @@ 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)) {
@@ -798,8 +797,8 @@ if (BITbIsBitOff(pDevice->byGPIO,GPIO0_DATA)){pDevice->bHWRadioOff = FALSE;}
        }
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;
            }
        }
@@ -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);
@@ -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);
@@ -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
@@ -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));
@@ -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);
@@ -2783,7 +2782,7 @@ 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 {
@@ -2791,7 +2790,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) {
                    s_vCompleteCurrentMeasure(pDevice, MEASURE_MODE_LATE);
                }
            }
            if (BITbIsBitOn(pDevice->dwIsr, ISR_QUIETSTART)) {
            if (pDevice->dwIsr & ISR_QUIETSTART) {
                do {
                    ;
                } while (CARDbStartQuiet(pDevice) == FALSE);
+5 −6
Original line number Diff line number Diff line
@@ -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"
@@ -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 {
@@ -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
@@ -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",
@@ -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",
@@ -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);
            }
        }
Loading