Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[pandora-kernel.git] / drivers / staging / vt6656 / mib.c
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
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.
9  *
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.
14  *
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.
18  *
19  * File: mib.c
20  *
21  * Purpose: Implement MIB Data Structure
22  *
23  * Author: Tevin Chen
24  *
25  * Date: May 21, 1996
26  *
27  * Functions:
28  *      STAvClearAllCounter - Clear All MIB Counter
29  *      STAvUpdateIstStatCounter - Update ISR statistic counter
30  *      STAvUpdateRDStatCounter - Update Rx statistic counter
31  *      STAvUpdateRDStatCounterEx - Update Rx statistic counter and copy rcv data
32  *      STAvUpdateTDStatCounter - Update Tx statistic counter
33  *      STAvUpdateTDStatCounterEx - Update Tx statistic counter and copy tx data
34  *      STAvUpdate802_11Counter - Update 802.11 mib counter
35  *
36  * Revision History:
37  *
38  */
39
40 #include "upc.h"
41 #include "mac.h"
42 #include "tether.h"
43 #include "mib.h"
44 #include "wctl.h"
45 #include "baseband.h"
46
47 /*---------------------  Static Definitions -------------------------*/
48 static int          msglevel                =MSG_LEVEL_INFO;
49 /*---------------------  Static Classes  ----------------------------*/
50
51 /*---------------------  Static Variables  --------------------------*/
52
53 /*---------------------  Static Functions  --------------------------*/
54
55 /*---------------------  Export Variables  --------------------------*/
56
57 /*---------------------  Export Functions  --------------------------*/
58
59
60
61 /*
62  * Description: Clear All Statistic Counter
63  *
64  * Parameters:
65  *  In:
66  *      pStatistic  - Pointer to Statistic Counter Data Structure
67  *  Out:
68  *      none
69  *
70  * Return Value: none
71  *
72  */
73 void STAvClearAllCounter (PSStatCounter pStatistic)
74 {
75     // set memory to zero
76         memset(pStatistic, 0, sizeof(SStatCounter));
77 }
78
79
80 /*
81  * Description: Update Isr Statistic Counter
82  *
83  * Parameters:
84  *  In:
85  *      pStatistic  - Pointer to Statistic Counter Data Structure
86  *      wisr        - Interrupt status
87  *  Out:
88  *      none
89  *
90  * Return Value: none
91  *
92  */
93 void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1)
94 {
95     /**********************/
96     /* ABNORMAL interrupt */
97     /**********************/
98     // not any IMR bit invoke irq
99     if (byIsr0 == 0) {
100         pStatistic->ISRStat.dwIsrUnknown++;
101         return;
102     }
103
104
105     if (byIsr0 & ISR_ACTX)              // ISR, bit0
106         pStatistic->ISRStat.dwIsrTx0OK++;           // TXDMA0 successful
107
108     if (byIsr0 & ISR_BNTX)              // ISR, bit2
109         pStatistic->ISRStat.dwIsrBeaconTxOK++;      // BeaconTx successful
110
111     if (byIsr0 & ISR_RXDMA0)            // ISR, bit3
112         pStatistic->ISRStat.dwIsrRx0OK++;           // Rx0 successful
113
114     if (byIsr0 & ISR_TBTT)              // ISR, bit4
115         pStatistic->ISRStat.dwIsrTBTTInt++;         // TBTT successful
116
117     if (byIsr0 & ISR_SOFTTIMER)         // ISR, bit6
118         pStatistic->ISRStat.dwIsrSTIMERInt++;
119
120     if (byIsr0 & ISR_WATCHDOG)          // ISR, bit7
121         pStatistic->ISRStat.dwIsrWatchDog++;
122
123
124     if (byIsr1 & ISR_FETALERR)              // ISR, bit8
125         pStatistic->ISRStat.dwIsrUnrecoverableError++;
126
127     if (byIsr1 & ISR_SOFTINT)               // ISR, bit9
128         pStatistic->ISRStat.dwIsrSoftInterrupt++;       // software interrupt
129
130     if (byIsr1 & ISR_MIBNEARFULL)           // ISR, bit10
131         pStatistic->ISRStat.dwIsrMIBNearfull++;
132
133     if (byIsr1 & ISR_RXNOBUF)               // ISR, bit11
134         pStatistic->ISRStat.dwIsrRxNoBuf++;             // Rx No Buff
135
136 }
137
138
139 /*
140  * Description: Update Rx Statistic Counter
141  *
142  * Parameters:
143  *  In:
144  *      pStatistic      - Pointer to Statistic Counter Data Structure
145  *      byRSR           - Rx Status
146  *      byNewRSR        - Rx Status
147  *      pbyBuffer       - Rx Buffer
148  *      cbFrameLength   - Rx Length
149  *  Out:
150  *      none
151  *
152  * Return Value: none
153  *
154  */
155 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
156                              BYTE byRSR, BYTE byNewRSR,
157                              BYTE byRxSts, BYTE byRxRate,
158                              PBYTE pbyBuffer, unsigned int cbFrameLength)
159 {
160         /* need change */
161         PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
162
163         if (byRSR & RSR_ADDROK)
164                 pStatistic->dwRsrADDROk++;
165         if (byRSR & RSR_CRCOK) {
166                 pStatistic->dwRsrCRCOk++;
167                 pStatistic->ullRsrOK++;
168
169                 if (cbFrameLength >= ETH_ALEN) {
170                         /* update counters in case of successful transmission */
171             if (byRSR & RSR_ADDRBROAD) {
172                 pStatistic->ullRxBroadcastFrames++;
173                 pStatistic->ullRxBroadcastBytes +=
174                   (unsigned long long) cbFrameLength;
175             }
176             else if (byRSR & RSR_ADDRMULTI) {
177                 pStatistic->ullRxMulticastFrames++;
178                 pStatistic->ullRxMulticastBytes +=
179                   (unsigned long long) cbFrameLength;
180             }
181             else {
182                 pStatistic->ullRxDirectedFrames++;
183                 pStatistic->ullRxDirectedBytes +=
184                   (unsigned long long) cbFrameLength;
185             }
186         }
187     }
188
189     if(byRxRate==22) {
190         pStatistic->CustomStat.ullRsr11M++;
191         if(byRSR & RSR_CRCOK) {
192             pStatistic->CustomStat.ullRsr11MCRCOk++;
193         }
194         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "11M: ALL[%d], OK[%d]:[%02x]\n",
195                 (signed int) pStatistic->CustomStat.ullRsr11M,
196                 (signed int) pStatistic->CustomStat.ullRsr11MCRCOk, byRSR);
197     }
198     else if(byRxRate==11) {
199         pStatistic->CustomStat.ullRsr5M++;
200         if(byRSR & RSR_CRCOK) {
201             pStatistic->CustomStat.ullRsr5MCRCOk++;
202         }
203         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 5M: ALL[%d], OK[%d]:[%02x]\n",
204                 (signed int) pStatistic->CustomStat.ullRsr5M,
205                 (signed int) pStatistic->CustomStat.ullRsr5MCRCOk, byRSR);
206     }
207     else if(byRxRate==4) {
208         pStatistic->CustomStat.ullRsr2M++;
209         if(byRSR & RSR_CRCOK) {
210             pStatistic->CustomStat.ullRsr2MCRCOk++;
211         }
212         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 2M: ALL[%d], OK[%d]:[%02x]\n",
213                 (signed int) pStatistic->CustomStat.ullRsr2M,
214                 (signed int) pStatistic->CustomStat.ullRsr2MCRCOk, byRSR);
215     }
216     else if(byRxRate==2){
217         pStatistic->CustomStat.ullRsr1M++;
218         if(byRSR & RSR_CRCOK) {
219             pStatistic->CustomStat.ullRsr1MCRCOk++;
220         }
221         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 1M: ALL[%d], OK[%d]:[%02x]\n",
222                 (signed int) pStatistic->CustomStat.ullRsr1M,
223                 (signed int) pStatistic->CustomStat.ullRsr1MCRCOk, byRSR);
224     }
225     else if(byRxRate==12){
226         pStatistic->CustomStat.ullRsr6M++;
227         if(byRSR & RSR_CRCOK) {
228             pStatistic->CustomStat.ullRsr6MCRCOk++;
229         }
230         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 6M: ALL[%d], OK[%d]\n",
231                 (signed int) pStatistic->CustomStat.ullRsr6M,
232                 (signed int) pStatistic->CustomStat.ullRsr6MCRCOk);
233     }
234     else if(byRxRate==18){
235         pStatistic->CustomStat.ullRsr9M++;
236         if(byRSR & RSR_CRCOK) {
237             pStatistic->CustomStat.ullRsr9MCRCOk++;
238         }
239         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 9M: ALL[%d], OK[%d]\n",
240                 (signed int) pStatistic->CustomStat.ullRsr9M,
241                 (signed int) pStatistic->CustomStat.ullRsr9MCRCOk);
242     }
243     else if(byRxRate==24){
244         pStatistic->CustomStat.ullRsr12M++;
245         if(byRSR & RSR_CRCOK) {
246             pStatistic->CustomStat.ullRsr12MCRCOk++;
247         }
248         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "12M: ALL[%d], OK[%d]\n",
249                 (signed int) pStatistic->CustomStat.ullRsr12M,
250                 (signed int) pStatistic->CustomStat.ullRsr12MCRCOk);
251     }
252     else if(byRxRate==36){
253         pStatistic->CustomStat.ullRsr18M++;
254         if(byRSR & RSR_CRCOK) {
255             pStatistic->CustomStat.ullRsr18MCRCOk++;
256         }
257         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "18M: ALL[%d], OK[%d]\n",
258                 (signed int) pStatistic->CustomStat.ullRsr18M,
259                 (signed int) pStatistic->CustomStat.ullRsr18MCRCOk);
260     }
261     else if(byRxRate==48){
262         pStatistic->CustomStat.ullRsr24M++;
263         if(byRSR & RSR_CRCOK) {
264             pStatistic->CustomStat.ullRsr24MCRCOk++;
265         }
266         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "24M: ALL[%d], OK[%d]\n",
267                 (signed int) pStatistic->CustomStat.ullRsr24M,
268                 (signed int) pStatistic->CustomStat.ullRsr24MCRCOk);
269     }
270     else if(byRxRate==72){
271         pStatistic->CustomStat.ullRsr36M++;
272         if(byRSR & RSR_CRCOK) {
273             pStatistic->CustomStat.ullRsr36MCRCOk++;
274         }
275         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "36M: ALL[%d], OK[%d]\n",
276                 (signed int) pStatistic->CustomStat.ullRsr36M,
277                 (signed int) pStatistic->CustomStat.ullRsr36MCRCOk);
278     }
279     else if(byRxRate==96){
280         pStatistic->CustomStat.ullRsr48M++;
281         if(byRSR & RSR_CRCOK) {
282             pStatistic->CustomStat.ullRsr48MCRCOk++;
283         }
284         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "48M: ALL[%d], OK[%d]\n",
285                 (signed int) pStatistic->CustomStat.ullRsr48M,
286                 (signed int) pStatistic->CustomStat.ullRsr48MCRCOk);
287     }
288     else if(byRxRate==108){
289         pStatistic->CustomStat.ullRsr54M++;
290         if(byRSR & RSR_CRCOK) {
291             pStatistic->CustomStat.ullRsr54MCRCOk++;
292         }
293         DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "54M: ALL[%d], OK[%d]\n",
294                 (signed int) pStatistic->CustomStat.ullRsr54M,
295                 (signed int) pStatistic->CustomStat.ullRsr54MCRCOk);
296     }
297     else {
298             DBG_PRT(MSG_LEVEL_DEBUG,
299                     KERN_INFO "Unknown: Total[%d], CRCOK[%d]\n",
300                     (signed int) pStatistic->dwRsrRxPacket+1,
301                     (signed int)pStatistic->dwRsrCRCOk);
302     }
303
304     if (byRSR & RSR_BSSIDOK)
305         pStatistic->dwRsrBSSIDOk++;
306
307     if (byRSR & RSR_BCNSSIDOK)
308         pStatistic->dwRsrBCNSSIDOk++;
309     if (byRSR & RSR_IVLDLEN)  //invalid len (> 2312 byte)
310         pStatistic->dwRsrLENErr++;
311     if (byRSR & RSR_IVLDTYP)  //invalid packet type
312         pStatistic->dwRsrTYPErr++;
313     if ((byRSR & (RSR_IVLDTYP | RSR_IVLDLEN)) || !(byRSR & RSR_CRCOK))
314         pStatistic->dwRsrErr++;
315
316     if (byNewRSR & NEWRSR_DECRYPTOK)
317         pStatistic->dwNewRsrDECRYPTOK++;
318     if (byNewRSR & NEWRSR_CFPIND)
319         pStatistic->dwNewRsrCFP++;
320     if (byNewRSR & NEWRSR_HWUTSF)
321         pStatistic->dwNewRsrUTSF++;
322     if (byNewRSR & NEWRSR_BCNHITAID)
323         pStatistic->dwNewRsrHITAID++;
324     if (byNewRSR & NEWRSR_BCNHITAID0)
325         pStatistic->dwNewRsrHITAID0++;
326
327     // increase rx packet count
328     pStatistic->dwRsrRxPacket++;
329     pStatistic->dwRsrRxOctet += cbFrameLength;
330
331
332     if (IS_TYPE_DATA(pbyBuffer)) {
333         pStatistic->dwRsrRxData++;
334     } else if (IS_TYPE_MGMT(pbyBuffer)){
335         pStatistic->dwRsrRxManage++;
336     } else if (IS_TYPE_CONTROL(pbyBuffer)){
337         pStatistic->dwRsrRxControl++;
338     }
339
340     if (byRSR & RSR_ADDRBROAD)
341         pStatistic->dwRsrBroadcast++;
342     else if (byRSR & RSR_ADDRMULTI)
343         pStatistic->dwRsrMulticast++;
344     else
345         pStatistic->dwRsrDirected++;
346
347     if (WLAN_GET_FC_MOREFRAG(pHeader->wFrameCtl))
348         pStatistic->dwRsrRxFragment++;
349
350     if (cbFrameLength < MIN_PACKET_LEN + 4) {
351         pStatistic->dwRsrRunt++;
352     }
353     else if (cbFrameLength == MIN_PACKET_LEN + 4) {
354         pStatistic->dwRsrRxFrmLen64++;
355     }
356     else if ((65 <= cbFrameLength) && (cbFrameLength <= 127)) {
357         pStatistic->dwRsrRxFrmLen65_127++;
358     }
359     else if ((128 <= cbFrameLength) && (cbFrameLength <= 255)) {
360         pStatistic->dwRsrRxFrmLen128_255++;
361     }
362     else if ((256 <= cbFrameLength) && (cbFrameLength <= 511)) {
363         pStatistic->dwRsrRxFrmLen256_511++;
364     }
365     else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023)) {
366         pStatistic->dwRsrRxFrmLen512_1023++;
367     }
368     else if ((1024 <= cbFrameLength) && (cbFrameLength <= MAX_PACKET_LEN + 4)) {
369         pStatistic->dwRsrRxFrmLen1024_1518++;
370     } else if (cbFrameLength > MAX_PACKET_LEN + 4) {
371         pStatistic->dwRsrLong++;
372     }
373
374 }
375
376
377
378 /*
379  * Description: Update Rx Statistic Counter and copy Rx buffer
380  *
381  * Parameters:
382  *  In:
383  *      pStatistic      - Pointer to Statistic Counter Data Structure
384  *      byRSR           - Rx Status
385  *      byNewRSR        - Rx Status
386  *      pbyBuffer       - Rx Buffer
387  *      cbFrameLength   - Rx Length
388  *  Out:
389  *      none
390  *
391  * Return Value: none
392  *
393  */
394
395 void
396 STAvUpdateRDStatCounterEx (
397     PSStatCounter   pStatistic,
398     BYTE            byRSR,
399     BYTE            byNewRSR,
400     BYTE            byRxSts,
401     BYTE            byRxRate,
402     PBYTE           pbyBuffer,
403     unsigned int            cbFrameLength
404     )
405 {
406     STAvUpdateRDStatCounter(
407                     pStatistic,
408                     byRSR,
409                     byNewRSR,
410                     byRxSts,
411                     byRxRate,
412                     pbyBuffer,
413                     cbFrameLength
414                     );
415
416     // rx length
417     pStatistic->dwCntRxFrmLength = cbFrameLength;
418     // rx pattern, we just see 10 bytes for sample
419     memcpy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10);
420 }
421
422
423 /*
424  * Description: Update Tx Statistic Counter
425  *
426  * Parameters:
427  *  In:
428  *      pStatistic      - Pointer to Statistic Counter Data Structure
429  *      byTSR0          - Tx Status
430  *      byTSR1          - Tx Status
431  *      pbyBuffer       - Tx Buffer
432  *      cbFrameLength   - Tx Length
433  *      uIdx            - Index of Tx DMA
434  *  Out:
435  *      none
436  *
437  * Return Value: none
438  *
439  */
440 void
441 STAvUpdateTDStatCounter (
442     PSStatCounter   pStatistic,
443     BYTE            byPktNum,
444     BYTE            byRate,
445     BYTE            byTSR
446     )
447 {
448     BYTE    byRetyCnt;
449     // increase tx packet count
450     pStatistic->dwTsrTxPacket++;
451
452     byRetyCnt = (byTSR & 0xF0) >> 4;
453     if (byRetyCnt != 0) {
454         pStatistic->dwTsrRetry++;
455         pStatistic->dwTsrTotalRetry += byRetyCnt;
456         pStatistic->dwTxFail[byRate]+= byRetyCnt;
457         pStatistic->dwTxFail[MAX_RATE] += byRetyCnt;
458
459         if ( byRetyCnt == 0x1)
460             pStatistic->dwTsrOnceRetry++;
461         else
462             pStatistic->dwTsrMoreThanOnceRetry++;
463
464         if (byRetyCnt <= 8)
465             pStatistic->dwTxRetryCount[byRetyCnt-1]++;
466
467     }
468     if ( !(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
469
470 #ifdef Calcu_LinkQual
471    if (byRetyCnt < 2)
472         pStatistic->TxNoRetryOkCount ++;
473    else
474         pStatistic->TxRetryOkCount ++;
475 #endif
476
477         pStatistic->ullTsrOK++;
478         pStatistic->CustomStat.ullTsrAllOK++;
479         // update counters in case that successful transmit
480         pStatistic->dwTxOk[byRate]++;
481         pStatistic->dwTxOk[MAX_RATE]++;
482
483         if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_BROAD )  {
484             pStatistic->ullTxBroadcastFrames++;
485             pStatistic->ullTxBroadcastBytes += pStatistic->abyTxPktInfo[byPktNum].wLength;
486         } else if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_MULTI ) {
487             pStatistic->ullTxMulticastFrames++;
488             pStatistic->ullTxMulticastBytes += pStatistic->abyTxPktInfo[byPktNum].wLength;
489         } else if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_UNI ) {
490             pStatistic->ullTxDirectedFrames++;
491             pStatistic->ullTxDirectedBytes += pStatistic->abyTxPktInfo[byPktNum].wLength;
492         }
493     }
494     else {
495
496 #ifdef Calcu_LinkQual
497         pStatistic->TxFailCount ++;
498 #endif
499
500         pStatistic->dwTsrErr++;
501         if (byTSR & TSR_RETRYTMO)
502             pStatistic->dwTsrRetryTimeout++;
503         if (byTSR & TSR_TMO)
504             pStatistic->dwTsrTransmitTimeout++;
505     }
506
507     if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_BROAD )  {
508         pStatistic->dwTsrBroadcast++;
509     } else if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_MULTI ) {
510         pStatistic->dwTsrMulticast++;
511     } else if ( pStatistic->abyTxPktInfo[byPktNum].byBroadMultiUni == TX_PKT_UNI ) {
512         pStatistic->dwTsrDirected++;
513     }
514 }
515
516
517
518 /*
519  * Description: Update 802.11 mib counter
520  *
521  * Parameters:
522  *  In:
523  *      p802_11Counter  - Pointer to 802.11 mib counter
524  *      pStatistic      - Pointer to Statistic Counter Data Structure
525  *      dwCounter       - hardware counter for 802.11 mib
526  *  Out:
527  *      none
528  *
529  * Return Value: none
530  *
531  */
532 void
533 STAvUpdate802_11Counter(
534     PSDot11Counters         p802_11Counter,
535     PSStatCounter           pStatistic,
536     BYTE                    byRTSSuccess,
537     BYTE                    byRTSFail,
538     BYTE                    byACKFail,
539     BYTE                    byFCSErr
540     )
541 {
542     //p802_11Counter->TransmittedFragmentCount
543     p802_11Counter->MulticastTransmittedFrameCount =
544       (unsigned long long) (pStatistic->dwTsrBroadcast +
545                             pStatistic->dwTsrMulticast);
546     p802_11Counter->FailedCount = (unsigned long long) (pStatistic->dwTsrErr);
547     p802_11Counter->RetryCount = (unsigned long long) (pStatistic->dwTsrRetry);
548     p802_11Counter->MultipleRetryCount =
549       (unsigned long long) (pStatistic->dwTsrMoreThanOnceRetry);
550     //p802_11Counter->FrameDuplicateCount
551     p802_11Counter->RTSSuccessCount += (unsigned long long) byRTSSuccess;
552     p802_11Counter->RTSFailureCount += (unsigned long long) byRTSFail;
553     p802_11Counter->ACKFailureCount += (unsigned long long) byACKFail;
554     p802_11Counter->FCSErrorCount +=   (unsigned long long) byFCSErr;
555     //p802_11Counter->ReceivedFragmentCount
556     p802_11Counter->MulticastReceivedFrameCount =
557       (unsigned long long) (pStatistic->dwRsrBroadcast +
558                             pStatistic->dwRsrMulticast);
559 }
560
561 /*
562  * Description: Clear 802.11 mib counter
563  *
564  * Parameters:
565  *  In:
566  *      p802_11Counter  - Pointer to 802.11 mib counter
567  *  Out:
568  *      none
569  *
570  * Return Value: none
571  *
572  */
573 void
574 STAvClear802_11Counter(PSDot11Counters p802_11Counter)
575 {
576     // set memory to zero
577         memset(p802_11Counter, 0, sizeof(SDot11Counters));
578 }
579
580 /*
581  * Description: Clear 802.11 mib counter
582  *
583  * Parameters:
584  *  In:
585  *      pUsbCounter  - Pointer to USB mib counter
586  *      ntStatus - URB status
587  *  Out:
588  *      none
589  *
590  * Return Value: none
591  *
592  */
593
594 void
595 STAvUpdateUSBCounter(PSUSBCounter pUsbCounter,
596                      NTSTATUS ntStatus
597                      )
598 {
599
600 //    if ( ntStatus == USBD_STATUS_CRC ) {
601         pUsbCounter->dwCrc++;
602 //    }
603
604 }
605
606