KVM: nVMX: Fix returned value of MSR_IA32_VMX_VMCS_ENUM
[linux/fpc-iii.git] / drivers / staging / vt6655 / mib.h
blobc0a59489184db8696fcffc0a8c5cb018cd32a452
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 * File: mib.h
21 * Purpose: Implement MIB Data Structure
23 * Author: Tevin Chen
25 * Date: May 21, 1996
29 #ifndef __MIB_H__
30 #define __MIB_H__
32 #include "ttype.h"
33 #include "tether.h"
34 #include "desc.h"
36 /*--------------------- Export Definitions -------------------------*/
38 // 802.11 counter
41 typedef struct tagSDot11Counters {
42 unsigned long Length; // Length of structure
43 unsigned long long TransmittedFragmentCount;
44 unsigned long long MulticastTransmittedFrameCount;
45 unsigned long long FailedCount;
46 unsigned long long RetryCount;
47 unsigned long long MultipleRetryCount;
48 unsigned long long RTSSuccessCount;
49 unsigned long long RTSFailureCount;
50 unsigned long long ACKFailureCount;
51 unsigned long long FrameDuplicateCount;
52 unsigned long long ReceivedFragmentCount;
53 unsigned long long MulticastReceivedFrameCount;
54 unsigned long long FCSErrorCount;
55 unsigned long long TKIPLocalMICFailures;
56 unsigned long long TKIPRemoteMICFailures;
57 unsigned long long TKIPICVErrors;
58 unsigned long long TKIPCounterMeasuresInvoked;
59 unsigned long long TKIPReplays;
60 unsigned long long CCMPFormatErrors;
61 unsigned long long CCMPReplays;
62 unsigned long long CCMPDecryptErrors;
63 unsigned long long FourWayHandshakeFailures;
64 } SDot11Counters, *PSDot11Counters;
67 // MIB2 counter
69 typedef struct tagSMib2Counter {
70 long ifIndex;
71 char ifDescr[256]; // max size 255 plus zero ending
72 // e.g. "interface 1"
73 long ifType;
74 long ifMtu;
75 unsigned long ifSpeed;
76 unsigned char ifPhysAddress[ETH_ALEN];
77 long ifAdminStatus;
78 long ifOperStatus;
79 unsigned long ifLastChange;
80 unsigned long ifInOctets;
81 unsigned long ifInUcastPkts;
82 unsigned long ifInNUcastPkts;
83 unsigned long ifInDiscards;
84 unsigned long ifInErrors;
85 unsigned long ifInUnknownProtos;
86 unsigned long ifOutOctets;
87 unsigned long ifOutUcastPkts;
88 unsigned long ifOutNUcastPkts;
89 unsigned long ifOutDiscards;
90 unsigned long ifOutErrors;
91 unsigned long ifOutQLen;
92 unsigned long ifSpecific;
93 } SMib2Counter, *PSMib2Counter;
95 // Value in the ifType entry
96 #define WIRELESSLANIEEE80211b 6 //
98 // Value in the ifAdminStatus/ifOperStatus entry
99 #define UP 1 //
100 #define DOWN 2 //
101 #define TESTING 3 //
104 // RMON counter
106 typedef struct tagSRmonCounter {
107 long etherStatsIndex;
108 unsigned long etherStatsDataSource;
109 unsigned long etherStatsDropEvents;
110 unsigned long etherStatsOctets;
111 unsigned long etherStatsPkts;
112 unsigned long etherStatsBroadcastPkts;
113 unsigned long etherStatsMulticastPkts;
114 unsigned long etherStatsCRCAlignErrors;
115 unsigned long etherStatsUndersizePkts;
116 unsigned long etherStatsOversizePkts;
117 unsigned long etherStatsFragments;
118 unsigned long etherStatsJabbers;
119 unsigned long etherStatsCollisions;
120 unsigned long etherStatsPkt64Octets;
121 unsigned long etherStatsPkt65to127Octets;
122 unsigned long etherStatsPkt128to255Octets;
123 unsigned long etherStatsPkt256to511Octets;
124 unsigned long etherStatsPkt512to1023Octets;
125 unsigned long etherStatsPkt1024to1518Octets;
126 unsigned long etherStatsOwners;
127 unsigned long etherStatsStatus;
128 } SRmonCounter, *PSRmonCounter;
131 // Custom counter
133 typedef struct tagSCustomCounters {
134 unsigned long Length;
136 unsigned long long ullTsrAllOK;
138 unsigned long long ullRsr11M;
139 unsigned long long ullRsr5M;
140 unsigned long long ullRsr2M;
141 unsigned long long ullRsr1M;
143 unsigned long long ullRsr11MCRCOk;
144 unsigned long long ullRsr5MCRCOk;
145 unsigned long long ullRsr2MCRCOk;
146 unsigned long long ullRsr1MCRCOk;
148 unsigned long long ullRsr54M;
149 unsigned long long ullRsr48M;
150 unsigned long long ullRsr36M;
151 unsigned long long ullRsr24M;
152 unsigned long long ullRsr18M;
153 unsigned long long ullRsr12M;
154 unsigned long long ullRsr9M;
155 unsigned long long ullRsr6M;
157 unsigned long long ullRsr54MCRCOk;
158 unsigned long long ullRsr48MCRCOk;
159 unsigned long long ullRsr36MCRCOk;
160 unsigned long long ullRsr24MCRCOk;
161 unsigned long long ullRsr18MCRCOk;
162 unsigned long long ullRsr12MCRCOk;
163 unsigned long long ullRsr9MCRCOk;
164 unsigned long long ullRsr6MCRCOk;
165 } SCustomCounters, *PSCustomCounters;
168 // Custom counter
170 typedef struct tagSISRCounters {
171 unsigned long Length;
173 unsigned long dwIsrTx0OK;
174 unsigned long dwIsrAC0TxOK;
175 unsigned long dwIsrBeaconTxOK;
176 unsigned long dwIsrRx0OK;
177 unsigned long dwIsrTBTTInt;
178 unsigned long dwIsrSTIMERInt;
179 unsigned long dwIsrWatchDog;
180 unsigned long dwIsrUnrecoverableError;
181 unsigned long dwIsrSoftInterrupt;
182 unsigned long dwIsrMIBNearfull;
183 unsigned long dwIsrRxNoBuf;
185 unsigned long dwIsrUnknown; // unknown interrupt count
187 unsigned long dwIsrRx1OK;
188 unsigned long dwIsrATIMTxOK;
189 unsigned long dwIsrSYNCTxOK;
190 unsigned long dwIsrCFPEnd;
191 unsigned long dwIsrATIMEnd;
192 unsigned long dwIsrSYNCFlushOK;
193 unsigned long dwIsrSTIMER1Int;
194 /////////////////////////////////////
195 } SISRCounters, *PSISRCounters;
197 // Value in the etherStatsStatus entry
198 #define VALID 1 //
199 #define CREATE_REQUEST 2 //
200 #define UNDER_CREATION 3 //
201 #define INVALID 4 //
204 // statistic counter
206 typedef struct tagSStatCounter {
208 // ISR status count
211 // RSR status count
213 unsigned long dwRsrFrmAlgnErr;
214 unsigned long dwRsrErr;
215 unsigned long dwRsrCRCErr;
216 unsigned long dwRsrCRCOk;
217 unsigned long dwRsrBSSIDOk;
218 unsigned long dwRsrADDROk;
219 unsigned long dwRsrBCNSSIDOk;
220 unsigned long dwRsrLENErr;
221 unsigned long dwRsrTYPErr;
223 unsigned long dwNewRsrDECRYPTOK;
224 unsigned long dwNewRsrCFP;
225 unsigned long dwNewRsrUTSF;
226 unsigned long dwNewRsrHITAID;
227 unsigned long dwNewRsrHITAID0;
229 unsigned long dwRsrLong;
230 unsigned long dwRsrRunt;
232 unsigned long dwRsrRxControl;
233 unsigned long dwRsrRxData;
234 unsigned long dwRsrRxManage;
236 unsigned long dwRsrRxPacket;
237 unsigned long dwRsrRxOctet;
238 unsigned long dwRsrBroadcast;
239 unsigned long dwRsrMulticast;
240 unsigned long dwRsrDirected;
241 // 64-bit OID
242 unsigned long long ullRsrOK;
244 // for some optional OIDs (64 bits) and DMI support
245 unsigned long long ullRxBroadcastBytes;
246 unsigned long long ullRxMulticastBytes;
247 unsigned long long ullRxDirectedBytes;
248 unsigned long long ullRxBroadcastFrames;
249 unsigned long long ullRxMulticastFrames;
250 unsigned long long ullRxDirectedFrames;
252 unsigned long dwRsrRxFragment;
253 unsigned long dwRsrRxFrmLen64;
254 unsigned long dwRsrRxFrmLen65_127;
255 unsigned long dwRsrRxFrmLen128_255;
256 unsigned long dwRsrRxFrmLen256_511;
257 unsigned long dwRsrRxFrmLen512_1023;
258 unsigned long dwRsrRxFrmLen1024_1518;
260 // TSR status count
262 unsigned long dwTsrTotalRetry[TYPE_MAXTD]; // total collision retry count
263 unsigned long dwTsrOnceRetry[TYPE_MAXTD]; // this packet only occur one collision
264 unsigned long dwTsrMoreThanOnceRetry[TYPE_MAXTD]; // this packet occur more than one collision
265 unsigned long dwTsrRetry[TYPE_MAXTD]; // this packet has ever occur collision,
266 // that is (dwTsrOnceCollision0 + dwTsrMoreThanOnceCollision0)
267 unsigned long dwTsrACKData[TYPE_MAXTD];
268 unsigned long dwTsrErr[TYPE_MAXTD];
269 unsigned long dwAllTsrOK[TYPE_MAXTD];
270 unsigned long dwTsrRetryTimeout[TYPE_MAXTD];
271 unsigned long dwTsrTransmitTimeout[TYPE_MAXTD];
273 unsigned long dwTsrTxPacket[TYPE_MAXTD];
274 unsigned long dwTsrTxOctet[TYPE_MAXTD];
275 unsigned long dwTsrBroadcast[TYPE_MAXTD];
276 unsigned long dwTsrMulticast[TYPE_MAXTD];
277 unsigned long dwTsrDirected[TYPE_MAXTD];
279 // RD/TD count
280 unsigned long dwCntRxFrmLength;
281 unsigned long dwCntTxBufLength;
283 unsigned char abyCntRxPattern[16];
284 unsigned char abyCntTxPattern[16];
286 // Software check....
287 unsigned long dwCntRxDataErr; // rx buffer data software compare CRC err count
288 unsigned long dwCntDecryptErr; // rx buffer data software compare CRC err count
289 unsigned long dwCntRxICVErr; // rx buffer data software compare CRC err count
290 unsigned int idxRxErrorDesc[TYPE_MAXRD]; // index for rx data error RD
292 // 64-bit OID
293 unsigned long long ullTsrOK[TYPE_MAXTD];
295 // for some optional OIDs (64 bits) and DMI support
296 unsigned long long ullTxBroadcastFrames[TYPE_MAXTD];
297 unsigned long long ullTxMulticastFrames[TYPE_MAXTD];
298 unsigned long long ullTxDirectedFrames[TYPE_MAXTD];
299 unsigned long long ullTxBroadcastBytes[TYPE_MAXTD];
300 unsigned long long ullTxMulticastBytes[TYPE_MAXTD];
301 unsigned long long ullTxDirectedBytes[TYPE_MAXTD];
303 SISRCounters ISRStat;
305 SCustomCounters CustomStat;
307 #ifdef Calcu_LinkQual
308 //Tx count:
309 unsigned long TxNoRetryOkCount; //success tx no retry !
310 unsigned long TxRetryOkCount; //success tx but retry !
311 unsigned long TxFailCount; //fail tx ?
312 //Rx count:
313 unsigned long RxOkCnt; //success rx !
314 unsigned long RxFcsErrCnt; //fail rx ?
315 //statistic
316 unsigned long SignalStren;
317 unsigned long LinkQuality;
318 #endif
319 } SStatCounter, *PSStatCounter;
321 /*--------------------- Export Classes ----------------------------*/
323 /*--------------------- Export Variables --------------------------*/
325 /*--------------------- Export Functions --------------------------*/
327 void STAvClearAllCounter(PSStatCounter pStatistic);
329 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr);
331 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
332 unsigned char byRSR, unsigned char byNewRSR, unsigned char byRxRate,
333 unsigned char *pbyBuffer, unsigned int cbFrameLength);
335 void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
336 unsigned char byRSR, unsigned char byNewRsr, unsigned char byRxRate,
337 unsigned char *pbyBuffer, unsigned int cbFrameLength);
339 void STAvUpdateTDStatCounter(PSStatCounter pStatistic, unsigned char byTSR0, unsigned char byTSR1,
340 unsigned char *pbyBuffer, unsigned int cbFrameLength, unsigned int uIdx);
342 void STAvUpdateTDStatCounterEx(
343 PSStatCounter pStatistic,
344 unsigned char *pbyBuffer,
345 unsigned long cbFrameLength
348 void STAvUpdate802_11Counter(
349 PSDot11Counters p802_11Counter,
350 PSStatCounter pStatistic,
351 unsigned long dwCounter
354 void STAvClear802_11Counter(PSDot11Counters p802_11Counter);
356 #endif // __MIB_H__