Commit 8a3d91b0 authored by Jim Lieb's avatar Jim Lieb Committed by Greg Kroah-Hartman

Staging: vt665x: remove tbit.h

Remove use of tbit macros and remove the header file.
Signed-off-by: default avatarJim Lieb <lieb@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent dad72fed
......@@ -38,7 +38,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "tether.h"
#include "mac.h"
#include "baseband.h"
......
......@@ -55,7 +55,6 @@
#include "card.h"
#include "mac.h"
#include "wpa2.h"
#include "tbit.h"
#include "control.h"
#include "rndis.h"
#include "iowpa.h"
......@@ -1437,7 +1436,7 @@ BSSvUpdateNodeTxCounter(
//DBG_PRN_GRP21(("Device %08X, wRate %04X, byTSR %02X\n", hDeviceContext, wRate, byTSR));
if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
pMgmt->sNodeDBTable[0].uTxAttempts += 1;
if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
// transmit success, TxAttempts at least plus one
pMgmt->sNodeDBTable[0].uTxOk[MAX_RATE]++;
if ( (byFallBack == AUTO_FB_NONE) ||
......@@ -1489,7 +1488,7 @@ BSSvUpdateNodeTxCounter(
if (BSSbIsSTAInNodeDB((HANDLE)pDevice, pbyDestAddr, &uNodeIndex)){
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1;
if (BITbIsAllBitsOff(byTSR, (TSR_TMO | TSR_RETRYTMO))) {
if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
// transmit success, TxAttempts at least plus one
pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
if ( (byFallBack == AUTO_FB_NONE) ||
......
......@@ -47,7 +47,6 @@
#include "tmacro.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "desc.h"
......
......@@ -49,7 +49,6 @@
#include "tkip.h"
#include "tcrc.h"
#include "wctl.h"
#include "tbit.h"
#include "hostap.h"
#include "rf.h"
#include "iowpa.h"
......@@ -568,7 +567,7 @@ RXbBulkInProcessData (
//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((pbyFrame)))
) {
// defragment
......@@ -663,7 +662,7 @@ RXbBulkInProcessData (
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",
......@@ -676,7 +675,7 @@ RXbBulkInProcessData (
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",
......@@ -724,7 +723,7 @@ RXbBulkInProcessData (
if (pDevice->bEnablePSMode) {
if (IS_FC_MOREDATA((pbyFrame))) {
if (BITbIsBitOn(*pbyRsr, RSR_ADDROK)) {
if (*pbyRsr & RSR_ADDROK) {
//PSbSendPSPOLL((PSDevice)pDevice);
}
}
......
......@@ -34,7 +34,6 @@
#include "int.h"
#include "mib.h"
#include "tbit.h"
#include "tmacro.h"
#include "mac.h"
#include "power.h"
......@@ -112,28 +111,28 @@ INTnsProcessData(
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) {
......@@ -154,7 +153,7 @@ INTnsProcessData(
} 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);
}
......@@ -176,7 +175,7 @@ INTnsProcessData(
}
if ( pINTData->byISR1 != 0 ) {
if ( BITbIsBitOn(pINTData->byISR1, ISR_GPIO3) ) {
if (pINTData->byISR1 & ISR_GPIO3) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_RADIO, NULL);
}
}
......
......@@ -37,7 +37,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "key.h"
#include "mac.h"
#include "rndis.h"
......
......@@ -31,7 +31,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "tether.h"
#include "desc.h"
#include "mac.h"
......
......@@ -48,7 +48,6 @@
#include "device.h"
#include "card.h"
#include "tbit.h"
#include "baseband.h"
#include "mac.h"
#include "tether.h"
......
This diff is collapsed.
......@@ -40,7 +40,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "michael.h"
/*--------------------- Static Definitions -------------------------*/
......
......@@ -38,13 +38,11 @@
*/
#include "ttype.h"
#include "tbit.h"
#include "mac.h"
#include "device.h"
#include "wmgr.h"
#include "power.h"
#include "wcmd.h"
#include "tbit.h"
#include "rxtx.h"
#include "card.h"
#include "control.h"
......
......@@ -57,7 +57,6 @@
#include "tkip.h"
#include "tcrc.h"
#include "wctl.h"
#include "tbit.h"
#include "hostap.h"
#include "rf.h"
#include "datarate.h"
......
/*
* Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
*
* File: tbit.h
*
* Purpose: Bit routines
*
* Author: Tevin Chen
*
* Date: May 21, 1996
*
*/
#ifndef __TBIT_H__
#define __TBIT_H__
#include "ttype.h"
/*--------------------- Export Definitions -------------------------*/
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Macros ------------------------------*/
// test single bit on
#define BITbIsBitOn(tData, tTestBit) \
(((tData) & (tTestBit)) != 0)
// test single bit off
#define BITbIsBitOff(tData, tTestBit) \
(((tData) & (tTestBit)) == 0)
#define BITbIsAllBitsOn(tData, tTestBit) \
(((tData) & (tTestBit)) == (tTestBit))
#define BITbIsAllBitsOff(tData, tTestBit) \
(((tData) & (tTestBit)) == 0)
#define BITbIsAnyBitsOn(tData, tTestBit) \
(((tData) & (tTestBit)) != 0)
#define BITbIsAnyBitsOff(tData, tTestBit) \
(((tData) & (tTestBit)) != (tTestBit))
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
#endif // __TBIT_H__
......@@ -33,7 +33,6 @@
*
*/
#include "tbit.h"
#include "tcrc.h"
/*--------------------- Static Definitions -------------------------*/
......
......@@ -34,7 +34,6 @@
#include "device.h"
#include "tmacro.h"
#include "tbit.h"
#include "tcrc.h"
#include "tether.h"
......@@ -74,7 +73,7 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr)
// reverse most bit to least bit
for (ii = 0; ii < (sizeof(byTmpHash) * 8); ii++) {
byHash <<= 1;
if (BITbIsBitOn(byTmpHash, 0x01))
if (byTmpHash & 0x01)
byHash |= 1;
byTmpHash >>= 1;
}
......
......@@ -33,7 +33,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "tkip.h"
/*--------------------- Static Definitions -------------------------*/
......
......@@ -62,7 +62,6 @@
*/
#include "tmacro.h"
#include "tbit.h"
#include "desc.h"
#include "device.h"
#include "card.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment