···68686969#include "device_cfg.h"7070#include "card.h"7171-#include "mib.h"7271#include "srom.h"7372#include "desc.h"7473#include "key.h"···284285285286 unsigned char abyCurrentNetAddr[ETH_ALEN]; __aligned(2)286287 bool bLinkPass; /* link status: OK or fail */287287-288288- /* 802.11 counter */289289- SDot11Counters s802_11Counter;290288291289 unsigned int uCurrRSSI;292290 unsigned char byCurrSQ;
-112
drivers/staging/vt6655/mib.c
···11-/*22- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.33- * All rights reserved.44- *55- * This program is free software; you can redistribute it and/or modify66- * it under the terms of the GNU General Public License as published by77- * the Free Software Foundation; either version 2 of the License, or88- * (at your option) any later version.99- *1010- * This program is distributed in the hope that it will be useful,1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313- * GNU General Public License for more details.1414- *1515- * You should have received a copy of the GNU General Public License along1616- * with this program; if not, write to the Free Software Foundation, Inc.,1717- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.1818- *1919- * File: mib.c2020- *2121- * Purpose: Implement MIB Data Structure2222- *2323- * Author: Tevin Chen2424- *2525- * Date: May 21, 19962626- *2727- * Functions:2828- * STAvUpdateIstStatCounter - Update ISR statistic counter2929- * STAvUpdate802_11Counter - Update 802.11 mib counter3030- *3131- * Revision History:3232- *3333- */3434-3535-#include "mac.h"3636-#include "mib.h"3737-3838-/*--------------------- Static Classes ----------------------------*/3939-4040-/*--------------------- Static Variables --------------------------*/4141-4242-/*--------------------- Static Functions --------------------------*/4343-4444-/*--------------------- Export Variables --------------------------*/4545-4646-/*--------------------- Export Functions --------------------------*/4747-4848-/*4949- * Description: Update Isr Statistic Counter5050- *5151- * Parameters:5252- * In:5353- * pStatistic - Pointer to Statistic Counter Data Structure5454- * wisr - Interrupt status5555- * Out:5656- * none5757- *5858- * Return Value: none5959- *6060- */6161-void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr)6262-{6363- /**********************/6464- /* ABNORMAL interrupt */6565- /**********************/6666- /* not any IMR bit invoke irq */6767-6868- if (dwIsr == 0) {6969- pStatistic->ISRStat.dwIsrUnknown++;7070- return;7171- }7272-7373-/* Added by Kyle */7474- if (dwIsr & ISR_TXDMA0) /* ISR, bit0 */7575- pStatistic->ISRStat.dwIsrTx0OK++; /* TXDMA0 successful */7676-7777- if (dwIsr & ISR_AC0DMA) /* ISR, bit1 */7878- pStatistic->ISRStat.dwIsrAC0TxOK++; /* AC0DMA successful */7979-8080- if (dwIsr & ISR_BNTX) /* ISR, bit2 */8181- pStatistic->ISRStat.dwIsrBeaconTxOK++; /* BeaconTx successful */8282-8383- if (dwIsr & ISR_RXDMA0) /* ISR, bit3 */8484- pStatistic->ISRStat.dwIsrRx0OK++; /* Rx0 successful */8585-8686- if (dwIsr & ISR_TBTT) /* ISR, bit4 */8787- pStatistic->ISRStat.dwIsrTBTTInt++; /* TBTT successful */8888-8989- if (dwIsr & ISR_SOFTTIMER) /* ISR, bit6 */9090- pStatistic->ISRStat.dwIsrSTIMERInt++;9191-9292- if (dwIsr & ISR_WATCHDOG) /* ISR, bit7 */9393- pStatistic->ISRStat.dwIsrWatchDog++;9494-9595- if (dwIsr & ISR_FETALERR) /* ISR, bit8 */9696- pStatistic->ISRStat.dwIsrUnrecoverableError++;9797-9898- if (dwIsr & ISR_SOFTINT) /* ISR, bit9 */9999- pStatistic->ISRStat.dwIsrSoftInterrupt++; /* software interrupt */100100-101101- if (dwIsr & ISR_MIBNEARFULL) /* ISR, bit10 */102102- pStatistic->ISRStat.dwIsrMIBNearfull++;103103-104104- if (dwIsr & ISR_RXNOBUF) /* ISR, bit11 */105105- pStatistic->ISRStat.dwIsrRxNoBuf++; /* Rx No Buff */106106-107107- if (dwIsr & ISR_RXDMA1) /* ISR, bit12 */108108- pStatistic->ISRStat.dwIsrRx1OK++; /* Rx1 successful */109109-110110- if (dwIsr & ISR_SOFTTIMER1) /* ISR, bit21 */111111- pStatistic->ISRStat.dwIsrSTIMER1Int++;112112-}
-76
drivers/staging/vt6655/mib.h
···11-/*22- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.33- * All rights reserved.44- *55- * This program is free software; you can redistribute it and/or modify66- * it under the terms of the GNU General Public License as published by77- * the Free Software Foundation; either version 2 of the License, or88- * (at your option) any later version.99- *1010- * This program is distributed in the hope that it will be useful,1111- * but WITHOUT ANY WARRANTY; without even the implied warranty of1212- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the1313- * GNU General Public License for more details.1414- *1515- * You should have received a copy of the GNU General Public License along1616- * with this program; if not, write to the Free Software Foundation, Inc.,1717- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.1818- *1919- * File: mib.h2020- *2121- * Purpose: Implement MIB Data Structure2222- *2323- * Author: Tevin Chen2424- *2525- * Date: May 21, 19962626- *2727- */2828-2929-#ifndef __MIB_H__3030-#define __MIB_H__3131-3232-#include "desc.h"3333-3434-//3535-// 802.11 counter3636-//3737-3838-typedef struct tagSDot11Counters {3939- unsigned long long RTSSuccessCount;4040- unsigned long long RTSFailureCount;4141- unsigned long long ACKFailureCount;4242- unsigned long long FCSErrorCount;4343-} SDot11Counters, *PSDot11Counters;4444-4545-//4646-// Custom counter4747-//4848-typedef struct tagSISRCounters {4949- unsigned long dwIsrTx0OK;5050- unsigned long dwIsrAC0TxOK;5151- unsigned long dwIsrBeaconTxOK;5252- unsigned long dwIsrRx0OK;5353- unsigned long dwIsrTBTTInt;5454- unsigned long dwIsrSTIMERInt;5555- unsigned long dwIsrWatchDog;5656- unsigned long dwIsrUnrecoverableError;5757- unsigned long dwIsrSoftInterrupt;5858- unsigned long dwIsrMIBNearfull;5959- unsigned long dwIsrRxNoBuf;6060-6161- unsigned long dwIsrUnknown;6262-6363- unsigned long dwIsrRx1OK;6464- unsigned long dwIsrSTIMER1Int;6565-} SISRCounters, *PSISRCounters;6666-6767-//6868-// statistic counter6969-//7070-typedef struct tagSStatCounter {7171- SISRCounters ISRStat;7272-} SStatCounter, *PSStatCounter;7373-7474-void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr);7575-7676-#endif // __MIB_H__