staging: hv: make HYPERV_UTILS depend on NLS to prevent a build error
[linux-2.6/next.git] / drivers / staging / vt6656 / rxtx.h
blobf99acf1d8eb9cf10f53d9754d38b66590ace87aa
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: rxtx.h
21 * Purpose:
23 * Author: Jerry Chen
25 * Date: Jun. 27, 2002
29 #ifndef __RXTX_H__
30 #define __RXTX_H__
32 #include "ttype.h"
33 #include "device.h"
34 #include "wcmd.h"
36 /*--------------------- Export Definitions -------------------------*/
38 /*--------------------- Export Classes ----------------------------*/
41 // RTS buffer header
43 typedef struct tagSRTSDataF {
44 WORD wFrameControl;
45 WORD wDurationID;
46 BYTE abyRA[ETH_ALEN];
47 BYTE abyTA[ETH_ALEN];
48 } SRTSDataF, *PSRTSDataF;
51 // CTS buffer header
53 typedef struct tagSCTSDataF {
54 WORD wFrameControl;
55 WORD wDurationID;
56 BYTE abyRA[ETH_ALEN];
57 WORD wReserved;
58 } SCTSDataF, *PSCTSDataF;
61 // MICHDR data header
63 typedef struct tagSMICHDR {
64 DWORD adwHDR0[4];
65 DWORD adwHDR1[4];
66 DWORD adwHDR2[4];
67 } SMICHDR, *PSMICHDR;
70 typedef struct tagSTX_NAF_G_RTS
72 //RsvTime
73 WORD wRTSTxRrvTime_ba;
74 WORD wRTSTxRrvTime_aa;
75 WORD wRTSTxRrvTime_bb;
76 WORD wReserved2;
77 WORD wTxRrvTime_b;
78 WORD wTxRrvTime_a;
80 //RTS
81 BYTE byRTSSignalField_b;
82 BYTE byRTSServiceField_b;
83 WORD wRTSTransmitLength_b;
84 BYTE byRTSSignalField_a;
85 BYTE byRTSServiceField_a;
86 WORD wRTSTransmitLength_a;
87 WORD wRTSDuration_ba;
88 WORD wRTSDuration_aa;
89 WORD wRTSDuration_bb;
90 WORD wReserved3;
91 SRTSDataF sRTS;
93 //Data
94 BYTE bySignalField_b;
95 BYTE byServiceField_b;
96 WORD wTransmitLength_b;
97 BYTE bySignalField_a;
98 BYTE byServiceField_a;
99 WORD wTransmitLength_a;
100 WORD wDuration_b;
101 WORD wDuration_a;
102 WORD wTimeStampOff_b;
103 WORD wTimeStampOff_a;
105 } TX_NAF_G_RTS, *PTX_NAF_G_RTS;
107 typedef struct tagSTX_NAF_G_RTS_MIC
109 //RsvTime
110 WORD wRTSTxRrvTime_ba;
111 WORD wRTSTxRrvTime_aa;
112 WORD wRTSTxRrvTime_bb;
113 WORD wReserved2;
114 WORD wTxRrvTime_b;
115 WORD wTxRrvTime_a;
117 SMICHDR sMICHDR;
119 //RTS
120 BYTE byRTSSignalField_b;
121 BYTE byRTSServiceField_b;
122 WORD wRTSTransmitLength_b;
123 BYTE byRTSSignalField_a;
124 BYTE byRTSServiceField_a;
125 WORD wRTSTransmitLength_a;
126 WORD wRTSDuration_ba;
127 WORD wRTSDuration_aa;
128 WORD wRTSDuration_bb;
129 WORD wReserved3;
130 SRTSDataF sRTS;
132 //Data
133 BYTE bySignalField_b;
134 BYTE byServiceField_b;
135 WORD wTransmitLength_b;
136 BYTE bySignalField_a;
137 BYTE byServiceField_a;
138 WORD wTransmitLength_a;
139 WORD wDuration_b;
140 WORD wDuration_a;
141 WORD wTimeStampOff_b;
142 WORD wTimeStampOff_a;
144 } TX_NAF_G_RTS_MIC, *PTX_NAF_G_RTS_MIC;
146 typedef struct tagSTX_NAF_G_CTS
148 //RsvTime
149 WORD wCTSTxRrvTime_ba;
150 WORD wReserved2;
151 WORD wTxRrvTime_b;
152 WORD wTxRrvTime_a;
154 //CTS
155 BYTE byCTSSignalField_b;
156 BYTE byCTSServiceField_b;
157 WORD wCTSTransmitLength_b;
158 WORD wCTSDuration_ba;
159 WORD wReserved3;
160 SCTSDataF sCTS;
162 //Data
163 BYTE bySignalField_b;
164 BYTE byServiceField_b;
165 WORD wTransmitLength_b;
166 BYTE bySignalField_a;
167 BYTE byServiceField_a;
168 WORD wTransmitLength_a;
169 WORD wDuration_b;
170 WORD wDuration_a;
171 WORD wTimeStampOff_b;
172 WORD wTimeStampOff_a;
174 } TX_NAF_G_CTS, *PTX_NAF_G_CTS;
177 typedef struct tagSTX_NAF_G_CTS_MIC
179 //RsvTime
180 WORD wCTSTxRrvTime_ba;
181 WORD wReserved2;
182 WORD wTxRrvTime_b;
183 WORD wTxRrvTime_a;
186 SMICHDR sMICHDR;
188 //CTS
189 BYTE byCTSSignalField_b;
190 BYTE byCTSServiceField_b;
191 WORD wCTSTransmitLength_b;
192 WORD wCTSDuration_ba;
193 WORD wReserved3;
194 SCTSDataF sCTS;
196 //Data
197 BYTE bySignalField_b;
198 BYTE byServiceField_b;
199 WORD wTransmitLength_b;
200 BYTE bySignalField_a;
201 BYTE byServiceField_a;
202 WORD wTransmitLength_a;
203 WORD wDuration_b;
204 WORD wDuration_a;
205 WORD wTimeStampOff_b;
206 WORD wTimeStampOff_a;
208 } TX_NAF_G_CTS_MIC, *PTX_NAF_G_CTS_MIC;
211 typedef struct tagSTX_NAF_G_BEACON
213 WORD wFIFOCtl;
214 WORD wTimeStamp;
216 //CTS
217 BYTE byCTSSignalField_b;
218 BYTE byCTSServiceField_b;
219 WORD wCTSTransmitLength_b;
220 WORD wCTSDuration_ba;
221 WORD wReserved1;
222 SCTSDataF sCTS;
224 //Data
225 BYTE bySignalField_a;
226 BYTE byServiceField_a;
227 WORD wTransmitLength_a;
228 WORD wDuration_a;
229 WORD wTimeStampOff_a;
232 } TX_NAF_G_BEACON, *PTX_NAF_G_BEACON;
235 typedef struct tagSTX_NAF_AB_RTS
237 //RsvTime
238 WORD wRTSTxRrvTime_ab;
239 WORD wTxRrvTime_ab;
241 //RTS
242 BYTE byRTSSignalField_ab;
243 BYTE byRTSServiceField_ab;
244 WORD wRTSTransmitLength_ab;
245 WORD wRTSDuration_ab;
246 WORD wReserved2;
247 SRTSDataF sRTS;
249 //Data
250 BYTE bySignalField_ab;
251 BYTE byServiceField_ab;
252 WORD wTransmitLength_ab;
253 WORD wDuration_ab;
254 WORD wTimeStampOff_ab;
257 } TX_NAF_AB_RTS, *PTX_NAF_AB_RTS;
260 typedef struct tagSTX_NAF_AB_RTS_MIC
262 //RsvTime
263 WORD wRTSTxRrvTime_ab;
264 WORD wTxRrvTime_ab;
266 SMICHDR sMICHDR;
268 //RTS
269 BYTE byRTSSignalField_ab;
270 BYTE byRTSServiceField_ab;
271 WORD wRTSTransmitLength_ab;
272 WORD wRTSDuration_ab;
273 WORD wReserved2;
274 SRTSDataF sRTS;
276 //Data
277 BYTE bySignalField_ab;
278 BYTE byServiceField_ab;
279 WORD wTransmitLength_ab;
280 WORD wDuration_ab;
281 WORD wTimeStampOff_ab;
284 } TX_NAF_AB_RTS_MIC, *PTX_NAF_AB_RTS_MIC;
288 typedef struct tagSTX_NAF_AB_CTS
290 //RsvTime
291 WORD wReserved2;
292 WORD wTxRrvTime_ab;
294 //Data
295 BYTE bySignalField_ab;
296 BYTE byServiceField_ab;
297 WORD wTransmitLength_ab;
298 WORD wDuration_ab;
299 WORD wTimeStampOff_ab;
301 } TX_NAF_AB_CTS, *PTX_NAF_AB_CTS;
303 typedef struct tagSTX_NAF_AB_CTS_MIC
305 //RsvTime
306 WORD wReserved2;
307 WORD wTxRrvTime_ab;
309 SMICHDR sMICHDR;
311 //Data
312 BYTE bySignalField_ab;
313 BYTE byServiceField_ab;
314 WORD wTransmitLength_ab;
315 WORD wDuration_ab;
316 WORD wTimeStampOff_ab;
318 } TX_NAF_AB_CTS_MIC, *PTX_NAF_AB_CTS_MIC;
321 typedef struct tagSTX_NAF_AB_BEACON
323 WORD wFIFOCtl;
324 WORD wTimeStamp;
326 //Data
327 BYTE bySignalField_ab;
328 BYTE byServiceField_ab;
329 WORD wTransmitLength_ab;
330 WORD wDuration_ab;
331 WORD wTimeStampOff_ab;
333 } TX_NAF_AB_BEACON, *PTX_NAF_AB_BEACON;
335 typedef struct tagSTX_AF_G_RTS
337 //RsvTime
338 WORD wRTSTxRrvTime_ba;
339 WORD wRTSTxRrvTime_aa;
340 WORD wRTSTxRrvTime_bb;
341 WORD wReserved2;
342 WORD wTxRrvTime_b;
343 WORD wTxRrvTime_a;
345 //RTS
346 BYTE byRTSSignalField_b;
347 BYTE byRTSServiceField_b;
348 WORD wRTSTransmitLength_b;
349 BYTE byRTSSignalField_a;
350 BYTE byRTSServiceField_a;
351 WORD wRTSTransmitLength_a;
352 WORD wRTSDuration_ba;
353 WORD wRTSDuration_aa;
354 WORD wRTSDuration_bb;
355 WORD wReserved3;
356 WORD wRTSDuration_ba_f0;
357 WORD wRTSDuration_aa_f0;
358 WORD wRTSDuration_ba_f1;
359 WORD wRTSDuration_aa_f1;
360 SRTSDataF sRTS;
362 //Data
363 BYTE bySignalField_b;
364 BYTE byServiceField_b;
365 WORD wTransmitLength_b;
366 BYTE bySignalField_a;
367 BYTE byServiceField_a;
368 WORD wTransmitLength_a;
369 WORD wDuration_b;
370 WORD wDuration_a;
371 WORD wDuration_a_f0;
372 WORD wDuration_a_f1;
373 WORD wTimeStampOff_b;
374 WORD wTimeStampOff_a;
376 } TX_AF_G_RTS, *PTX_AF_G_RTS;
379 typedef struct tagSTX_AF_G_RTS_MIC
381 //RsvTime
382 WORD wRTSTxRrvTime_ba;
383 WORD wRTSTxRrvTime_aa;
384 WORD wRTSTxRrvTime_bb;
385 WORD wReserved2;
386 WORD wTxRrvTime_b;
387 WORD wTxRrvTime_a;
389 SMICHDR sMICHDR;
391 //RTS
392 BYTE byRTSSignalField_b;
393 BYTE byRTSServiceField_b;
394 WORD wRTSTransmitLength_b;
395 BYTE byRTSSignalField_a;
396 BYTE byRTSServiceField_a;
397 WORD wRTSTransmitLength_a;
398 WORD wRTSDuration_ba;
399 WORD wRTSDuration_aa;
400 WORD wRTSDuration_bb;
401 WORD wReserved3;
402 WORD wRTSDuration_ba_f0;
403 WORD wRTSDuration_aa_f0;
404 WORD wRTSDuration_ba_f1;
405 WORD wRTSDuration_aa_f1;
406 SRTSDataF sRTS;
408 //Data
409 BYTE bySignalField_b;
410 BYTE byServiceField_b;
411 WORD wTransmitLength_b;
412 BYTE bySignalField_a;
413 BYTE byServiceField_a;
414 WORD wTransmitLength_a;
415 WORD wDuration_b;
416 WORD wDuration_a;
417 WORD wDuration_a_f0;
418 WORD wDuration_a_f1;
419 WORD wTimeStampOff_b;
420 WORD wTimeStampOff_a;
422 } TX_AF_G_RTS_MIC, *PTX_AF_G_RTS_MIC;
426 typedef struct tagSTX_AF_G_CTS
428 //RsvTime
429 WORD wCTSTxRrvTime_ba;
430 WORD wReserved2;
431 WORD wTxRrvTime_b;
432 WORD wTxRrvTime_a;
434 //CTS
435 BYTE byCTSSignalField_b;
436 BYTE byCTSServiceField_b;
437 WORD wCTSTransmitLength_b;
438 WORD wCTSDuration_ba;
439 WORD wReserved3;
440 WORD wCTSDuration_ba_f0;
441 WORD wCTSDuration_ba_f1;
442 SCTSDataF sCTS;
444 //Data
445 BYTE bySignalField_b;
446 BYTE byServiceField_b;
447 WORD wTransmitLength_b;
448 BYTE bySignalField_a;
449 BYTE byServiceField_a;
450 WORD wTransmitLength_a;
451 WORD wDuration_b;
452 WORD wDuration_a;
453 WORD wDuration_a_f0;
454 WORD wDuration_a_f1;
455 WORD wTimeStampOff_b;
456 WORD wTimeStampOff_a;
458 } TX_AF_G_CTS, *PTX_AF_G_CTS;
461 typedef struct tagSTX_AF_G_CTS_MIC
463 //RsvTime
464 WORD wCTSTxRrvTime_ba;
465 WORD wReserved2;
466 WORD wTxRrvTime_b;
467 WORD wTxRrvTime_a;
470 SMICHDR sMICHDR;
472 //CTS
473 BYTE byCTSSignalField_b;
474 BYTE byCTSServiceField_b;
475 WORD wCTSTransmitLength_b;
476 WORD wCTSDuration_ba;
477 WORD wReserved3;
478 WORD wCTSDuration_ba_f0;
479 WORD wCTSDuration_ba_f1;
480 SCTSDataF sCTS;
482 //Data
483 BYTE bySignalField_b;
484 BYTE byServiceField_b;
485 WORD wTransmitLength_b;
486 BYTE bySignalField_a;
487 BYTE byServiceField_a;
488 WORD wTransmitLength_a;
489 WORD wDuration_b;
490 WORD wDuration_a;
491 WORD wDuration_a_f0;
492 WORD wDuration_a_f1;
493 WORD wTimeStampOff_b;
494 WORD wTimeStampOff_a;
496 } TX_AF_G_CTS_MIC, *PTX_AF_G_CTS_MIC;
500 typedef struct tagSTX_AF_A_RTS
502 //RsvTime
503 WORD wRTSTxRrvTime_a;
504 WORD wTxRrvTime_a;
506 //RTS
507 BYTE byRTSSignalField_a;
508 BYTE byRTSServiceField_a;
509 WORD wRTSTransmitLength_a;
510 WORD wRTSDuration_a;
511 WORD wReserved2;
512 WORD wRTSDuration_a_f0;
513 WORD wRTSDuration_a_f1;
514 SRTSDataF sRTS;
516 //Data
517 BYTE bySignalField_a;
518 BYTE byServiceField_a;
519 WORD wTransmitLength_a;
520 WORD wDuration_a;
521 WORD wTimeStampOff_a;
522 WORD wDuration_a_f0;
523 WORD wDuration_a_f1;
525 } TX_AF_A_RTS, *PTX_AF_A_RTS;
528 typedef struct tagSTX_AF_A_RTS_MIC
530 //RsvTime
531 WORD wRTSTxRrvTime_a;
532 WORD wTxRrvTime_a;
534 SMICHDR sMICHDR;
536 //RTS
537 BYTE byRTSSignalField_a;
538 BYTE byRTSServiceField_a;
539 WORD wRTSTransmitLength_a;
540 WORD wRTSDuration_a;
541 WORD wReserved2;
542 WORD wRTSDuration_a_f0;
543 WORD wRTSDuration_a_f1;
544 SRTSDataF sRTS;
546 //Data
547 BYTE bySignalField_a;
548 BYTE byServiceField_a;
549 WORD wTransmitLength_a;
550 WORD wDuration_a;
551 WORD wTimeStampOff_a;
552 WORD wDuration_a_f0;
553 WORD wDuration_a_f1;
555 } TX_AF_A_RTS_MIC, *PTX_AF_A_RTS_MIC;
559 typedef struct tagSTX_AF_A_CTS
561 //RsvTime
562 WORD wReserved2;
563 WORD wTxRrvTime_a;
565 //Data
566 BYTE bySignalField_a;
567 BYTE byServiceField_a;
568 WORD wTransmitLength_a;
569 WORD wDuration_a;
570 WORD wTimeStampOff_a;
571 WORD wDuration_a_f0;
572 WORD wDuration_a_f1;
574 } TX_AF_A_CTS, *PTX_AF_A_CTS;
577 typedef struct tagSTX_AF_A_CTS_MIC
579 //RsvTime
580 WORD wReserved2;
581 WORD wTxRrvTime_a;
583 SMICHDR sMICHDR;
585 //Data
586 BYTE bySignalField_a;
587 BYTE byServiceField_a;
588 WORD wTransmitLength_a;
589 WORD wDuration_a;
590 WORD wTimeStampOff_a;
591 WORD wDuration_a_f0;
592 WORD wDuration_a_f1;
594 } TX_AF_A_CTS_MIC, *PTX_AF_A_CTS_MIC;
598 // union with all of the TX Buffer Type
600 typedef union tagUTX_BUFFER_CONTAINER
602 TX_NAF_G_RTS RTS_G;
603 TX_NAF_G_RTS_MIC RTS_G_MIC;
604 TX_NAF_G_CTS CTS_G;
605 TX_NAF_G_CTS_MIC CTS_G_MIC;
606 //TX_NAF_G_BEACON Beacon_G;
607 TX_NAF_AB_RTS RTS_AB;
608 TX_NAF_AB_RTS_MIC RTS_AB_MIC;
609 TX_NAF_AB_CTS CTS_AB;
610 TX_NAF_AB_CTS_MIC CTS_AB_MIC;
611 //TX_NAF_AB_BEACON Beacon_AB;
612 TX_AF_G_RTS RTS_G_AutoFB;
613 TX_AF_G_RTS_MIC RTS_G_AutoFB_MIC;
614 TX_AF_G_CTS CTS_G_AutoFB;
615 TX_AF_G_CTS_MIC CTS_G_AutoFB_MIC;
616 TX_AF_A_RTS RTS_A_AutoFB;
617 TX_AF_A_RTS_MIC RTS_A_AutoFB_MIC;
618 TX_AF_A_CTS CTS_A_AutoFB;
619 TX_AF_A_CTS_MIC CTS_A_AutoFB_MIC;
621 } TX_BUFFER_CONTAINER, *PTX_BUFFER_CONTAINER;
625 // Remote NDIS message format
627 typedef struct tagSTX_BUFFER
629 BYTE byType;
630 BYTE byPKTNO;
631 WORD wTxByteCount;
633 DWORD adwTxKey[4];
634 WORD wFIFOCtl;
635 WORD wTimeStamp;
636 WORD wFragCtl;
637 WORD wReserved;
640 // Actual message
641 TX_BUFFER_CONTAINER BufferHeader;
643 } TX_BUFFER, *PTX_BUFFER;
647 // Remote NDIS message format
649 typedef struct tagSBEACON_BUFFER
651 BYTE byType;
652 BYTE byPKTNO;
653 WORD wTxByteCount;
655 WORD wFIFOCtl;
656 WORD wTimeStamp;
658 // Actual message
659 TX_BUFFER_CONTAINER BufferHeader;
661 } BEACON_BUFFER, *PBEACON_BUFFER;
664 /*--------------------- Export Variables --------------------------*/
666 /*--------------------- Export Functions --------------------------*/
668 BOOL
669 bPacketToWirelessUsb(
670 PSDevice pDevice,
671 BYTE byPktType,
672 PBYTE usbPacketBuf,
673 BOOL bNeedEncrypt,
674 unsigned int cbPayloadSize,
675 unsigned int uDMAIdx,
676 PSEthernetHeader psEthHeader,
677 PBYTE pPacket,
678 PSKeyItem pTransmitKey,
679 unsigned int uNodeIndex,
680 WORD wCurrentRate,
681 unsigned int *pcbHeaderLen,
682 unsigned int *pcbTotalLen
685 void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb);
686 int nsDMA_tx_packet(PSDevice pDevice,
687 unsigned int uDMAIdx,
688 struct sk_buff *skb);
689 CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);
690 CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);
691 BOOL bRelayPacketSend(PSDevice pDevice, PBYTE pbySkbData,
692 unsigned int uDataLen, unsigned int uNodeIndex);
694 #endif /* __RXTX_H__ */