]> Git Repo - linux.git/blob - drivers/staging/vt6655/mib.c
selinux: Remove security_ops extern
[linux.git] / drivers / staging / vt6655 / 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  * Description: Clear All Statistic Counter
61  *
62  * Parameters:
63  *  In:
64  *      pStatistic  - Pointer to Statistic Counter Data Structure
65  *  Out:
66  *      none
67  *
68  * Return Value: none
69  *
70  */
71 void STAvClearAllCounter(PSStatCounter pStatistic)
72 {
73         // set memory to zero
74         memset(pStatistic, 0, sizeof(SStatCounter));
75 }
76
77 /*
78  * Description: Update Isr Statistic Counter
79  *
80  * Parameters:
81  *  In:
82  *      pStatistic  - Pointer to Statistic Counter Data Structure
83  *      wisr        - Interrupt status
84  *  Out:
85  *      none
86  *
87  * Return Value: none
88  *
89  */
90 void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, unsigned long dwIsr)
91 {
92         /**********************/
93         /* ABNORMAL interrupt */
94         /**********************/
95         // not any IMR bit invoke irq
96
97         if (dwIsr == 0) {
98                 pStatistic->ISRStat.dwIsrUnknown++;
99                 return;
100         }
101
102 //Added by Kyle
103         if (dwIsr & ISR_TXDMA0)               // ISR, bit0
104                 pStatistic->ISRStat.dwIsrTx0OK++;             // TXDMA0 successful
105
106         if (dwIsr & ISR_AC0DMA)               // ISR, bit1
107                 pStatistic->ISRStat.dwIsrAC0TxOK++;           // AC0DMA successful
108
109         if (dwIsr & ISR_BNTX)                 // ISR, bit2
110                 pStatistic->ISRStat.dwIsrBeaconTxOK++;        // BeaconTx successful
111
112         if (dwIsr & ISR_RXDMA0)               // ISR, bit3
113                 pStatistic->ISRStat.dwIsrRx0OK++;             // Rx0 successful
114
115         if (dwIsr & ISR_TBTT)                 // ISR, bit4
116                 pStatistic->ISRStat.dwIsrTBTTInt++;           // TBTT successful
117
118         if (dwIsr & ISR_SOFTTIMER)            // ISR, bit6
119                 pStatistic->ISRStat.dwIsrSTIMERInt++;
120
121         if (dwIsr & ISR_WATCHDOG)             // ISR, bit7
122                 pStatistic->ISRStat.dwIsrWatchDog++;
123
124         if (dwIsr & ISR_FETALERR)             // ISR, bit8
125                 pStatistic->ISRStat.dwIsrUnrecoverableError++;
126
127         if (dwIsr & ISR_SOFTINT)              // ISR, bit9
128                 pStatistic->ISRStat.dwIsrSoftInterrupt++;     // software interrupt
129
130         if (dwIsr & ISR_MIBNEARFULL)          // ISR, bit10
131                 pStatistic->ISRStat.dwIsrMIBNearfull++;
132
133         if (dwIsr & ISR_RXNOBUF)              // ISR, bit11
134                 pStatistic->ISRStat.dwIsrRxNoBuf++;           // Rx No Buff
135
136         if (dwIsr & ISR_RXDMA1)               // ISR, bit12
137                 pStatistic->ISRStat.dwIsrRx1OK++;             // Rx1 successful
138
139         if (dwIsr & ISR_SOFTTIMER1)           // ISR, bit21
140                 pStatistic->ISRStat.dwIsrSTIMER1Int++;
141 }
142
143 /*
144  * Description: Update Rx Statistic Counter
145  *
146  * Parameters:
147  *  In:
148  *      pStatistic      - Pointer to Statistic Counter Data Structure
149  *      byRSR           - Rx Status
150  *      byNewRSR        - Rx Status
151  *      pbyBuffer       - Rx Buffer
152  *      cbFrameLength   - Rx Length
153  *  Out:
154  *      none
155  *
156  * Return Value: none
157  *
158  */
159 void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
160                              unsigned char byRSR, unsigned char byNewRSR, unsigned char byRxRate,
161                              unsigned char *pbyBuffer, unsigned int cbFrameLength)
162 {
163         //need change
164         PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
165
166         if (byRSR & RSR_ADDROK)
167                 pStatistic->dwRsrADDROk++;
168         if (byRSR & RSR_CRCOK) {
169                 pStatistic->dwRsrCRCOk++;
170
171                 pStatistic->ullRsrOK++;
172
173                 if (cbFrameLength >= ETH_ALEN) {
174                         // update counters in case of successful transmit
175                         if (byRSR & RSR_ADDRBROAD) {
176                                 pStatistic->ullRxBroadcastFrames++;
177                                 pStatistic->ullRxBroadcastBytes += (unsigned long long) cbFrameLength;
178                         } else if (byRSR & RSR_ADDRMULTI) {
179                                 pStatistic->ullRxMulticastFrames++;
180                                 pStatistic->ullRxMulticastBytes += (unsigned long long) cbFrameLength;
181                         } else {
182                                 pStatistic->ullRxDirectedFrames++;
183                                 pStatistic->ullRxDirectedBytes += (unsigned long long) cbFrameLength;
184                         }
185                 }
186         }
187
188         if (byRxRate == 22) {
189                 pStatistic->CustomStat.ullRsr11M++;
190                 if (byRSR & RSR_CRCOK)
191                         pStatistic->CustomStat.ullRsr11MCRCOk++;
192
193                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "11M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr11M, (int)pStatistic->CustomStat.ullRsr11MCRCOk, byRSR);
194         } else if (byRxRate == 11) {
195                 pStatistic->CustomStat.ullRsr5M++;
196                 if (byRSR & RSR_CRCOK)
197                         pStatistic->CustomStat.ullRsr5MCRCOk++;
198
199                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 5M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr5M, (int)pStatistic->CustomStat.ullRsr5MCRCOk, byRSR);
200         } else if (byRxRate == 4) {
201                 pStatistic->CustomStat.ullRsr2M++;
202                 if (byRSR & RSR_CRCOK)
203                         pStatistic->CustomStat.ullRsr2MCRCOk++;
204
205                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 2M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr2M, (int)pStatistic->CustomStat.ullRsr2MCRCOk, byRSR);
206         } else if (byRxRate == 2) {
207                 pStatistic->CustomStat.ullRsr1M++;
208                 if (byRSR & RSR_CRCOK)
209                         pStatistic->CustomStat.ullRsr1MCRCOk++;
210
211                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 1M: ALL[%d], OK[%d]:[%02x]\n", (int)pStatistic->CustomStat.ullRsr1M, (int)pStatistic->CustomStat.ullRsr1MCRCOk, byRSR);
212         } else if (byRxRate == 12) {
213                 pStatistic->CustomStat.ullRsr6M++;
214                 if (byRSR & RSR_CRCOK)
215                         pStatistic->CustomStat.ullRsr6MCRCOk++;
216
217                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 6M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr6M, (int)pStatistic->CustomStat.ullRsr6MCRCOk);
218         } else if (byRxRate == 18) {
219                 pStatistic->CustomStat.ullRsr9M++;
220                 if (byRSR & RSR_CRCOK)
221                         pStatistic->CustomStat.ullRsr9MCRCOk++;
222
223                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " 9M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr9M, (int)pStatistic->CustomStat.ullRsr9MCRCOk);
224         } else if (byRxRate == 24) {
225                 pStatistic->CustomStat.ullRsr12M++;
226                 if (byRSR & RSR_CRCOK)
227                         pStatistic->CustomStat.ullRsr12MCRCOk++;
228
229                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "12M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr12M, (int)pStatistic->CustomStat.ullRsr12MCRCOk);
230         } else if (byRxRate == 36) {
231                 pStatistic->CustomStat.ullRsr18M++;
232                 if (byRSR & RSR_CRCOK)
233                         pStatistic->CustomStat.ullRsr18MCRCOk++;
234
235                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "18M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr18M, (int)pStatistic->CustomStat.ullRsr18MCRCOk);
236         } else if (byRxRate == 48) {
237                 pStatistic->CustomStat.ullRsr24M++;
238                 if (byRSR & RSR_CRCOK)
239                         pStatistic->CustomStat.ullRsr24MCRCOk++;
240
241                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "24M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr24M, (int)pStatistic->CustomStat.ullRsr24MCRCOk);
242         } else if (byRxRate == 72) {
243                 pStatistic->CustomStat.ullRsr36M++;
244                 if (byRSR & RSR_CRCOK)
245                         pStatistic->CustomStat.ullRsr36MCRCOk++;
246
247                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "36M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr36M, (int)pStatistic->CustomStat.ullRsr36MCRCOk);
248         } else if (byRxRate == 96) {
249                 pStatistic->CustomStat.ullRsr48M++;
250                 if (byRSR & RSR_CRCOK)
251                         pStatistic->CustomStat.ullRsr48MCRCOk++;
252
253                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "48M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr48M, (int)pStatistic->CustomStat.ullRsr48MCRCOk);
254         } else if (byRxRate == 108) {
255                 pStatistic->CustomStat.ullRsr54M++;
256                 if (byRSR & RSR_CRCOK)
257                         pStatistic->CustomStat.ullRsr54MCRCOk++;
258
259                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "54M: ALL[%d], OK[%d]\n", (int)pStatistic->CustomStat.ullRsr54M, (int)pStatistic->CustomStat.ullRsr54MCRCOk);
260         } else {
261                 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unknown: Total[%d], CRCOK[%d]\n", (int)pStatistic->dwRsrRxPacket+1, (int)pStatistic->dwRsrCRCOk);
262         }
263
264         if (byRSR & RSR_BSSIDOK)
265                 pStatistic->dwRsrBSSIDOk++;
266
267         if (byRSR & RSR_BCNSSIDOK)
268                 pStatistic->dwRsrBCNSSIDOk++;
269         if (byRSR & RSR_IVLDLEN)  //invalid len (> 2312 byte)
270                 pStatistic->dwRsrLENErr++;
271         if (byRSR & RSR_IVLDTYP)  //invalid packet type
272                 pStatistic->dwRsrTYPErr++;
273         if (byRSR & (RSR_IVLDTYP | RSR_IVLDLEN))
274                 pStatistic->dwRsrErr++;
275
276         if (byNewRSR & NEWRSR_DECRYPTOK)
277                 pStatistic->dwNewRsrDECRYPTOK++;
278         if (byNewRSR & NEWRSR_CFPIND)
279                 pStatistic->dwNewRsrCFP++;
280         if (byNewRSR & NEWRSR_HWUTSF)
281                 pStatistic->dwNewRsrUTSF++;
282         if (byNewRSR & NEWRSR_BCNHITAID)
283                 pStatistic->dwNewRsrHITAID++;
284         if (byNewRSR & NEWRSR_BCNHITAID0)
285                 pStatistic->dwNewRsrHITAID0++;
286
287         // increase rx packet count
288         pStatistic->dwRsrRxPacket++;
289         pStatistic->dwRsrRxOctet += cbFrameLength;
290
291         if (IS_TYPE_DATA(pbyBuffer))
292                 pStatistic->dwRsrRxData++;
293         else if (IS_TYPE_MGMT(pbyBuffer))
294                 pStatistic->dwRsrRxManage++;
295         else if (IS_TYPE_CONTROL(pbyBuffer))
296                 pStatistic->dwRsrRxControl++;
297
298         if (byRSR & RSR_ADDRBROAD)
299                 pStatistic->dwRsrBroadcast++;
300         else if (byRSR & RSR_ADDRMULTI)
301                 pStatistic->dwRsrMulticast++;
302         else
303                 pStatistic->dwRsrDirected++;
304
305         if (WLAN_GET_FC_MOREFRAG(pHeader->wFrameCtl))
306                 pStatistic->dwRsrRxFragment++;
307
308         if (cbFrameLength < ETH_ZLEN + 4)
309                 pStatistic->dwRsrRunt++;
310         else if (cbFrameLength == ETH_ZLEN + 4)
311                 pStatistic->dwRsrRxFrmLen64++;
312         else if ((65 <= cbFrameLength) && (cbFrameLength <= 127))
313                 pStatistic->dwRsrRxFrmLen65_127++;
314         else if ((128 <= cbFrameLength) && (cbFrameLength <= 255))
315                 pStatistic->dwRsrRxFrmLen128_255++;
316         else if ((256 <= cbFrameLength) && (cbFrameLength <= 511))
317                 pStatistic->dwRsrRxFrmLen256_511++;
318         else if ((512 <= cbFrameLength) && (cbFrameLength <= 1023))
319                 pStatistic->dwRsrRxFrmLen512_1023++;
320         else if ((1024 <= cbFrameLength) && (cbFrameLength <= ETH_FRAME_LEN + 4))
321                 pStatistic->dwRsrRxFrmLen1024_1518++;
322         else if (cbFrameLength > ETH_FRAME_LEN + 4)
323                 pStatistic->dwRsrLong++;
324 }
325
326 /*
327  * Description: Update Rx Statistic Counter and copy Rx buffer
328  *
329  * Parameters:
330  *  In:
331  *      pStatistic      - Pointer to Statistic Counter Data Structure
332  *      byRSR           - Rx Status
333  *      byNewRSR        - Rx Status
334  *      pbyBuffer       - Rx Buffer
335  *      cbFrameLength   - Rx Length
336  *  Out:
337  *      none
338  *
339  * Return Value: none
340  *
341  */
342
343 void
344 STAvUpdateRDStatCounterEx(
345         PSStatCounter   pStatistic,
346         unsigned char byRSR,
347         unsigned char byNewRSR,
348         unsigned char byRxRate,
349         unsigned char *pbyBuffer,
350         unsigned int cbFrameLength
351 )
352 {
353         STAvUpdateRDStatCounter(
354                 pStatistic,
355                 byRSR,
356                 byNewRSR,
357                 byRxRate,
358                 pbyBuffer,
359                 cbFrameLength
360 );
361
362         // rx length
363         pStatistic->dwCntRxFrmLength = cbFrameLength;
364         // rx pattern, we just see 10 bytes for sample
365         memcpy(pStatistic->abyCntRxPattern, (unsigned char *)pbyBuffer, 10);
366 }
367
368 /*
369  * Description: Update Tx Statistic Counter
370  *
371  * Parameters:
372  *  In:
373  *      pStatistic      - Pointer to Statistic Counter Data Structure
374  *      byTSR0          - Tx Status
375  *      byTSR1          - Tx Status
376  *      pbyBuffer       - Tx Buffer
377  *      cbFrameLength   - Tx Length
378  *      uIdx            - Index of Tx DMA
379  *  Out:
380  *      none
381  *
382  * Return Value: none
383  *
384  */
385 void
386 STAvUpdateTDStatCounter(
387         PSStatCounter   pStatistic,
388         unsigned char byTSR0,
389         unsigned char byTSR1,
390         unsigned char *pbyBuffer,
391         unsigned int cbFrameLength,
392         unsigned int uIdx
393 )
394 {
395         PWLAN_80211HDR_A4   pHeader;
396         unsigned char *pbyDestAddr;
397         unsigned char byTSR0_NCR = byTSR0 & TSR0_NCR;
398
399         pHeader = (PWLAN_80211HDR_A4) pbyBuffer;
400         if (WLAN_GET_FC_TODS(pHeader->wFrameCtl) == 0)
401                 pbyDestAddr = &(pHeader->abyAddr1[0]);
402         else
403                 pbyDestAddr = &(pHeader->abyAddr3[0]);
404
405         // increase tx packet count
406         pStatistic->dwTsrTxPacket[uIdx]++;
407         pStatistic->dwTsrTxOctet[uIdx] += cbFrameLength;
408
409         if (byTSR0_NCR != 0) {
410                 pStatistic->dwTsrRetry[uIdx]++;
411                 pStatistic->dwTsrTotalRetry[uIdx] += byTSR0_NCR;
412
413                 if (byTSR0_NCR == 1)
414                         pStatistic->dwTsrOnceRetry[uIdx]++;
415                 else
416                         pStatistic->dwTsrMoreThanOnceRetry[uIdx]++;
417         }
418
419         if ((byTSR1&(TSR1_TERR|TSR1_RETRYTMO|TSR1_TMO|ACK_DATA)) == 0) {
420                 pStatistic->ullTsrOK[uIdx]++;
421                 pStatistic->CustomStat.ullTsrAllOK =
422                         (pStatistic->ullTsrOK[TYPE_AC0DMA] + pStatistic->ullTsrOK[TYPE_TXDMA0]);
423                 // update counters in case that successful transmit
424                 if (is_broadcast_ether_addr(pbyDestAddr)) {
425                         pStatistic->ullTxBroadcastFrames[uIdx]++;
426                         pStatistic->ullTxBroadcastBytes[uIdx] += (unsigned long long) cbFrameLength;
427                 } else if (is_multicast_ether_addr(pbyDestAddr)) {
428                         pStatistic->ullTxMulticastFrames[uIdx]++;
429                         pStatistic->ullTxMulticastBytes[uIdx] += (unsigned long long) cbFrameLength;
430                 } else {
431                         pStatistic->ullTxDirectedFrames[uIdx]++;
432                         pStatistic->ullTxDirectedBytes[uIdx] += (unsigned long long) cbFrameLength;
433                 }
434         } else {
435                 if (byTSR1 & TSR1_TERR)
436                         pStatistic->dwTsrErr[uIdx]++;
437                 if (byTSR1 & TSR1_RETRYTMO)
438                         pStatistic->dwTsrRetryTimeout[uIdx]++;
439                 if (byTSR1 & TSR1_TMO)
440                         pStatistic->dwTsrTransmitTimeout[uIdx]++;
441                 if (byTSR1 & ACK_DATA)
442                         pStatistic->dwTsrACKData[uIdx]++;
443         }
444
445         if (is_broadcast_ether_addr(pbyDestAddr))
446                 pStatistic->dwTsrBroadcast[uIdx]++;
447         else if (is_multicast_ether_addr(pbyDestAddr))
448                 pStatistic->dwTsrMulticast[uIdx]++;
449         else
450                 pStatistic->dwTsrDirected[uIdx]++;
451 }
452
453 /*
454  * Description: Update Tx Statistic Counter and copy Tx buffer
455  *
456  * Parameters:
457  *  In:
458  *      pStatistic      - Pointer to Statistic Counter Data Structure
459  *      pbyBuffer       - Tx Buffer
460  *      cbFrameLength   - Tx Length
461  *  Out:
462  *      none
463  *
464  * Return Value: none
465  *
466  */
467 void
468 STAvUpdateTDStatCounterEx(
469         PSStatCounter   pStatistic,
470         unsigned char *pbyBuffer,
471         unsigned long cbFrameLength
472 )
473 {
474         unsigned int uPktLength;
475
476         uPktLength = (unsigned int)cbFrameLength;
477
478         // tx length
479         pStatistic->dwCntTxBufLength = uPktLength;
480         // tx pattern, we just see 16 bytes for sample
481         memcpy(pStatistic->abyCntTxPattern, pbyBuffer, 16);
482 }
483
484 /*
485  * Description: Update 802.11 mib counter
486  *
487  * Parameters:
488  *  In:
489  *      p802_11Counter  - Pointer to 802.11 mib counter
490  *      pStatistic      - Pointer to Statistic Counter Data Structure
491  *      dwCounter       - hardware counter for 802.11 mib
492  *  Out:
493  *      none
494  *
495  * Return Value: none
496  *
497  */
498 void
499 STAvUpdate802_11Counter(
500         PSDot11Counters         p802_11Counter,
501         PSStatCounter           pStatistic,
502         unsigned long dwCounter
503 )
504 {
505         p802_11Counter->MulticastTransmittedFrameCount = (unsigned long long) (pStatistic->dwTsrBroadcast[TYPE_AC0DMA] +
506                                                                                pStatistic->dwTsrBroadcast[TYPE_TXDMA0] +
507                                                                                pStatistic->dwTsrMulticast[TYPE_AC0DMA] +
508                                                                                pStatistic->dwTsrMulticast[TYPE_TXDMA0]);
509         p802_11Counter->FailedCount = (unsigned long long) (pStatistic->dwTsrErr[TYPE_AC0DMA] + pStatistic->dwTsrErr[TYPE_TXDMA0]);
510         p802_11Counter->RetryCount = (unsigned long long) (pStatistic->dwTsrRetry[TYPE_AC0DMA] + pStatistic->dwTsrRetry[TYPE_TXDMA0]);
511         p802_11Counter->MultipleRetryCount = (unsigned long long) (pStatistic->dwTsrMoreThanOnceRetry[TYPE_AC0DMA] +
512                                                                    pStatistic->dwTsrMoreThanOnceRetry[TYPE_TXDMA0]);
513         p802_11Counter->RTSSuccessCount += (unsigned long long)  (dwCounter & 0x000000ff);
514         p802_11Counter->RTSFailureCount += (unsigned long long) ((dwCounter & 0x0000ff00) >> 8);
515         p802_11Counter->ACKFailureCount += (unsigned long long) ((dwCounter & 0x00ff0000) >> 16);
516         p802_11Counter->FCSErrorCount +=   (unsigned long long) ((dwCounter & 0xff000000) >> 24);
517         p802_11Counter->MulticastReceivedFrameCount = (unsigned long long) (pStatistic->dwRsrBroadcast +
518                                                                             pStatistic->dwRsrMulticast);
519 }
520
521 /*
522  * Description: Clear 802.11 mib counter
523  *
524  * Parameters:
525  *  In:
526  *      p802_11Counter  - Pointer to 802.11 mib counter
527  *  Out:
528  *      none
529  *
530  * Return Value: none
531  *
532  */
533 void
534 STAvClear802_11Counter(PSDot11Counters p802_11Counter)
535 {
536         // set memory to zero
537         memset(p802_11Counter, 0, sizeof(SDot11Counters));
538 }
This page took 0.063672 seconds and 4 git commands to generate.