Staging: vt665x: Text janitor in prep for driver merge, part 2
[linux-2.6/mini2440.git] / drivers / staging / vt6655 / desc.h
blob8243ecb290c967f016ce983f134a5b4ca1ed57eb
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: desc.h
21 * Purpose:The header file of descriptor
23 * Revision History:
25 * Author: Tevin Chen
27 * Date: May 21, 1996
32 #ifndef __DESC_H__
33 #define __DESC_H__
35 #include <linux/types.h>
36 #include <linux/mm.h>
38 #if !defined(__TTYPE_H__)
39 #include "ttype.h"
40 #endif
41 #if !defined(__TETHER_H__)
42 #include "tether.h"
43 #endif
49 /*--------------------- Export Definitions -------------------------*/
51 #define B_OWNED_BY_CHIP 1 //
52 #define B_OWNED_BY_HOST 0 //
55 // Bits in the RSR register
57 #define RSR_ADDRBROAD 0x80 // 1000 0000
58 #define RSR_ADDRMULTI 0x40 // 0100 0000
59 #define RSR_ADDRUNI 0x00 // 0000 0000
60 #define RSR_IVLDTYP 0x20 // 0010 0000 , invalid packet type
61 #define RSR_IVLDLEN 0x10 // 0001 0000 , invalid len (> 2312 byte)
62 #define RSR_BSSIDOK 0x08 // 0000 1000
63 #define RSR_CRCOK 0x04 // 0000 0100
64 #define RSR_BCNSSIDOK 0x02 // 0000 0010
65 #define RSR_ADDROK 0x01 // 0000 0001
68 // Bits in the new RSR register
70 #define NEWRSR_DECRYPTOK 0x10 // 0001 0000
71 #define NEWRSR_CFPIND 0x08 // 0000 1000
72 #define NEWRSR_HWUTSF 0x04 // 0000 0100
73 #define NEWRSR_BCNHITAID 0x02 // 0000 0010
74 #define NEWRSR_BCNHITAID0 0x01 // 0000 0001
77 // Bits in the TSR0 register
79 #define TSR0_PWRSTS1_2 0xC0 // 1100 0000
80 #define TSR0_PWRSTS7 0x20 // 0010 0000
81 #define TSR0_NCR 0x1F // 0001 1111
84 // Bits in the TSR1 register
86 #define TSR1_TERR 0x80 // 1000 0000
87 #define TSR1_PWRSTS4_6 0x70 // 0111 0000
88 #define TSR1_RETRYTMO 0x08 // 0000 1000
89 #define TSR1_TMO 0x04 // 0000 0100
90 #define TSR1_PWRSTS3 0x02 // 0000 0010
91 #define ACK_DATA 0x01 // 0000 0000
94 // Bits in the TCR register
96 #define EDMSDU 0x04 // 0000 0100 end of sdu
97 #define TCR_EDP 0x02 // 0000 0010 end of packet
98 #define TCR_STP 0x01 // 0000 0001 start of packet
100 // max transmit or receive buffer size
101 #define CB_MAX_BUF_SIZE 2900U // max buffer size
102 // NOTE: must be multiple of 4
103 #define CB_MAX_TX_BUF_SIZE CB_MAX_BUF_SIZE // max Tx buffer size
104 #define CB_MAX_RX_BUF_SIZE_NORMAL CB_MAX_BUF_SIZE // max Rx buffer size when not use Multi-RD
106 #define CB_BEACON_BUF_SIZE 512U // default beacon buffer size
108 #define CB_MAX_RX_DESC 128 // max # of descriptor
109 #define CB_MIN_RX_DESC 16 // min # of rx descriptor
110 #define CB_MAX_TX_DESC 64 // max # of descriptor
111 #define CB_MIN_TX_DESC 16 // min # of tx descriptor
113 #define CB_MAX_RECEIVED_PACKETS 16 // max # of received packets at one time
114 // limit our receive routine to indicating
115 // this many at a time for 2 reasons:
116 // 1. driver flow control to protocol layer
117 // 2. limit the time used in ISR routine
119 #define CB_EXTRA_RD_NUM 32 // default # of Extra RD
120 #define CB_RD_NUM 32 // default # of RD
121 #define CB_TD_NUM 32 // default # of TD
124 // max number of physical segments
125 // in a single NDIS packet. Above this threshold, the packet
126 // is copied into a single physically contiguous buffer
127 #define CB_MAX_SEGMENT 4
129 #define CB_MIN_MAP_REG_NUM 4
130 #define CB_MAX_MAP_REG_NUM CB_MAX_TX_DESC
132 #define CB_PROTOCOL_RESERVED_SECTION 16
136 // if retrys excess 15 times , tx will abort, and
137 // if tx fifo underflow, tx will fail
138 // we should try to resend it
139 #define CB_MAX_TX_ABORT_RETRY 3
141 #ifdef __BIG_ENDIAN
143 // WMAC definition FIFO Control
144 #define FIFOCTL_AUTO_FB_1 0x0010 // 0001 0000 0000 0000
145 #define FIFOCTL_AUTO_FB_0 0x0008 // 0000 1000 0000 0000
146 #define FIFOCTL_GRPACK 0x0004 // 0000 0100 0000 0000
147 #define FIFOCTL_11GA 0x0003 // 0000 0011 0000 0000
148 #define FIFOCTL_11GB 0x0002 // 0000 0010 0000 0000
149 #define FIFOCTL_11B 0x0001 // 0000 0001 0000 0000
150 #define FIFOCTL_11A 0x0000 // 0000 0000 0000 0000
151 #define FIFOCTL_RTS 0x8000 // 0000 0000 1000 0000
152 #define FIFOCTL_ISDMA0 0x4000 // 0000 0000 0100 0000
153 #define FIFOCTL_GENINT 0x2000 // 0000 0000 0010 0000
154 #define FIFOCTL_TMOEN 0x1000 // 0000 0000 0001 0000
155 #define FIFOCTL_LRETRY 0x0800 // 0000 0000 0000 1000
156 #define FIFOCTL_CRCDIS 0x0400 // 0000 0000 0000 0100
157 #define FIFOCTL_NEEDACK 0x0200 // 0000 0000 0000 0010
158 #define FIFOCTL_LHEAD 0x0100 // 0000 0000 0000 0001
160 //WMAC definition Frag Control
161 #define FRAGCTL_AES 0x0003 // 0000 0011 0000 0000
162 #define FRAGCTL_TKIP 0x0002 // 0000 0010 0000 0000
163 #define FRAGCTL_LEGACY 0x0001 // 0000 0001 0000 0000
164 #define FRAGCTL_NONENCRYPT 0x0000 // 0000 0000 0000 0000
165 //#define FRAGCTL_AC3 0x0C00 // 0000 0000 0000 1100
166 //#define FRAGCTL_AC2 0x0800 // 0000 0000 0000 1000
167 //#define FRAGCTL_AC1 0x0400 // 0000 0000 0000 0100
168 //#define FRAGCTL_AC0 0x0000 // 0000 0000 0000 0000
169 #define FRAGCTL_ENDFRAG 0x0300 // 0000 0000 0000 0011
170 #define FRAGCTL_MIDFRAG 0x0200 // 0000 0000 0000 0010
171 #define FRAGCTL_STAFRAG 0x0100 // 0000 0000 0000 0001
172 #define FRAGCTL_NONFRAG 0x0000 // 0000 0000 0000 0000
174 #else
176 #define FIFOCTL_AUTO_FB_1 0x1000 // 0001 0000 0000 0000
177 #define FIFOCTL_AUTO_FB_0 0x0800 // 0000 1000 0000 0000
178 #define FIFOCTL_GRPACK 0x0400 // 0000 0100 0000 0000
179 #define FIFOCTL_11GA 0x0300 // 0000 0011 0000 0000
180 #define FIFOCTL_11GB 0x0200 // 0000 0010 0000 0000
181 #define FIFOCTL_11B 0x0100 // 0000 0001 0000 0000
182 #define FIFOCTL_11A 0x0000 // 0000 0000 0000 0000
183 #define FIFOCTL_RTS 0x0080 // 0000 0000 1000 0000
184 #define FIFOCTL_ISDMA0 0x0040 // 0000 0000 0100 0000
185 #define FIFOCTL_GENINT 0x0020 // 0000 0000 0010 0000
186 #define FIFOCTL_TMOEN 0x0010 // 0000 0000 0001 0000
187 #define FIFOCTL_LRETRY 0x0008 // 0000 0000 0000 1000
188 #define FIFOCTL_CRCDIS 0x0004 // 0000 0000 0000 0100
189 #define FIFOCTL_NEEDACK 0x0002 // 0000 0000 0000 0010
190 #define FIFOCTL_LHEAD 0x0001 // 0000 0000 0000 0001
192 //WMAC definition Frag Control
193 #define FRAGCTL_AES 0x0300 // 0000 0011 0000 0000
194 #define FRAGCTL_TKIP 0x0200 // 0000 0010 0000 0000
195 #define FRAGCTL_LEGACY 0x0100 // 0000 0001 0000 0000
196 #define FRAGCTL_NONENCRYPT 0x0000 // 0000 0000 0000 0000
197 //#define FRAGCTL_AC3 0x000C // 0000 0000 0000 1100
198 //#define FRAGCTL_AC2 0x0008 // 0000 0000 0000 1000
199 //#define FRAGCTL_AC1 0x0004 // 0000 0000 0000 0100
200 //#define FRAGCTL_AC0 0x0000 // 0000 0000 0000 0000
201 #define FRAGCTL_ENDFRAG 0x0003 // 0000 0000 0000 0011
202 #define FRAGCTL_MIDFRAG 0x0002 // 0000 0000 0000 0010
203 #define FRAGCTL_STAFRAG 0x0001 // 0000 0000 0000 0001
204 #define FRAGCTL_NONFRAG 0x0000 // 0000 0000 0000 0000
206 #endif // #ifdef __BIG_ENDIAN
208 //#define TYPE_AC0DMA 0
209 //#define TYPE_TXDMA0 1
210 #define TYPE_TXDMA0 0
211 #define TYPE_AC0DMA 1
212 #define TYPE_ATIMDMA 2
213 #define TYPE_SYNCDMA 3
214 #define TYPE_MAXTD 2
216 #define TYPE_BEACONDMA 4
218 #define TYPE_RXDMA0 0
219 #define TYPE_RXDMA1 1
220 #define TYPE_MAXRD 2
224 // TD_INFO flags control bit
225 #define TD_FLAGS_NETIF_SKB 0x01 // check if need release skb
226 #define TD_FLAGS_PRIV_SKB 0x02 // check if called from private skb(hostap)
227 #define TD_FLAGS_PS_RETRY 0x04 // check if PS STA frame re-transmit
228 //#define TD_FLAGS_NETIF_SKB 0x04
230 /*--------------------- Export Types ------------------------------*/
232 // ref_sk_buff is used for mapping the skb structure between pre-built driver-obj & running kernel.
233 // Since different kernel version (2.4x) may change skb structure, i.e. pre-built driver-obj
234 // may link to older skb that leads error.
236 typedef struct tagDEVICE_RD_INFO {
237 struct sk_buff* skb;
238 dma_addr_t skb_dma;
239 dma_addr_t curr_desc;
240 } DEVICE_RD_INFO, *PDEVICE_RD_INFO;
243 static inline PDEVICE_RD_INFO alloc_rd_info(void) {
244 PDEVICE_RD_INFO ptr;
245 if ((ptr = kmalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC)) == NULL)
246 return NULL;
247 else {
248 memset(ptr,0,sizeof(DEVICE_RD_INFO));
249 return ptr;
255 typedef struct tagRDES0 {
256 WORD wResCount;
257 WORD wf1Owner ;
258 // WORD f15Reserved : 15;
259 // WORD f1Owner : 1;
260 } __attribute__ ((__packed__))
261 SRDES0;
264 #ifdef __BIG_ENDIAN
266 typedef struct tagRDES0 {
267 volatile WORD wResCount;
268 union {
269 volatile U16 f15Reserved;
270 struct {
271 volatile U8 f8Reserved1;
272 volatile U8 f1Owner:1;
273 volatile U8 f7Reserved:7;
274 } __attribute__ ((__packed__));
275 } __attribute__ ((__packed__));
276 } __attribute__ ((__packed__))
277 SRDES0, *PSRDES0;
279 #else
281 typedef struct tagRDES0 {
282 WORD wResCount;
283 WORD f15Reserved : 15;
284 WORD f1Owner : 1;
285 } __attribute__ ((__packed__))
286 SRDES0;
289 #endif
291 typedef struct tagRDES1 {
292 WORD wReqCount;
293 WORD wReserved;
294 } __attribute__ ((__packed__))
295 SRDES1;
298 // Rx descriptor
300 typedef struct tagSRxDesc {
301 volatile SRDES0 m_rd0RD0;
302 volatile SRDES1 m_rd1RD1;
303 volatile U32 buff_addr;
304 volatile U32 next_desc;
305 struct tagSRxDesc *next;//4 bytes
306 volatile PDEVICE_RD_INFO pRDInfo;//4 bytes
307 volatile U32 Reserved[2];//8 bytes
308 } __attribute__ ((__packed__))
309 SRxDesc, DEF* PSRxDesc;
310 typedef const SRxDesc DEF* PCSRxDesc;
312 #ifdef __BIG_ENDIAN
315 typedef struct tagTDES0 {
316 volatile BYTE byTSR0;
317 volatile BYTE byTSR1;
318 volatile WORD wOwner_Txtime;
319 // volatile WORD f15Txtime : 15;
320 // volatile WORD f1Owner:1;
321 } __attribute__ ((__packed__))
322 STDES0;
325 typedef struct tagTDES0 {
326 volatile BYTE byTSR0;
327 volatile BYTE byTSR1;
328 union {
329 volatile U16 f15Txtime;
330 struct {
331 volatile U8 f8Reserved1;
332 volatile U8 f1Owner:1;
333 volatile U8 f7Reserved:7;
334 } __attribute__ ((__packed__));
335 } __attribute__ ((__packed__));
336 } __attribute__ ((__packed__))
337 STDES0, PSTDES0;
339 #else
341 typedef struct tagTDES0 {
342 volatile BYTE byTSR0;
343 volatile BYTE byTSR1;
344 volatile WORD f15Txtime : 15;
345 volatile WORD f1Owner:1;
346 } __attribute__ ((__packed__))
347 STDES0;
349 #endif
352 typedef struct tagTDES1 {
353 volatile WORD wReqCount;
354 volatile BYTE byTCR;
355 volatile BYTE byReserved;
356 } __attribute__ ((__packed__))
357 STDES1;
360 typedef struct tagDEVICE_TD_INFO{
361 struct sk_buff* skb;
362 PBYTE buf;
363 dma_addr_t skb_dma;
364 dma_addr_t buf_dma;
365 dma_addr_t curr_desc;
366 DWORD dwReqCount;
367 DWORD dwHeaderLength;
368 BYTE byFlags;
369 } DEVICE_TD_INFO, *PDEVICE_TD_INFO;
372 static inline PDEVICE_TD_INFO alloc_td_info(void) {
373 PDEVICE_TD_INFO ptr;
374 if ((ptr = kmalloc(sizeof(DEVICE_TD_INFO),GFP_ATOMIC))==NULL)
375 return NULL;
376 else {
377 memset(ptr,0,sizeof(DEVICE_TD_INFO));
378 return ptr;
384 // transmit descriptor
386 typedef struct tagSTxDesc {
387 volatile STDES0 m_td0TD0;
388 volatile STDES1 m_td1TD1;
389 volatile U32 buff_addr;
390 volatile U32 next_desc;
391 struct tagSTxDesc* next; //4 bytes
392 volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
393 volatile U32 Reserved[2];//8 bytes
394 } __attribute__ ((__packed__))
395 STxDesc, DEF* PSTxDesc;
396 typedef const STxDesc DEF* PCSTxDesc;
399 typedef struct tagSTxSyncDesc {
400 volatile STDES0 m_td0TD0;
401 volatile STDES1 m_td1TD1;
402 volatile DWORD buff_addr; // pointer to logical buffer
403 volatile DWORD next_desc; // pointer to next logical descriptor
404 volatile WORD m_wFIFOCtl;
405 volatile WORD m_wTimeStamp;
406 struct tagSTxSyncDesc* next; //4 bytes
407 volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
408 volatile DWORD m_dwReserved2;
409 } __attribute__ ((__packed__))
410 STxSyncDesc, DEF* PSTxSyncDesc;
411 typedef const STxSyncDesc DEF* PCSTxSyncDesc;
415 // RsvTime buffer header
417 typedef struct tagSRrvTime_gRTS {
418 WORD wRTSTxRrvTime_ba;
419 WORD wRTSTxRrvTime_aa;
420 WORD wRTSTxRrvTime_bb;
421 WORD wReserved;
422 WORD wTxRrvTime_b;
423 WORD wTxRrvTime_a;
424 }__attribute__ ((__packed__))
425 SRrvTime_gRTS, DEF* PSRrvTime_gRTS;
426 typedef const SRrvTime_gRTS DEF* PCSRrvTime_gRTS;
428 typedef struct tagSRrvTime_gCTS {
429 WORD wCTSTxRrvTime_ba;
430 WORD wReserved;
431 WORD wTxRrvTime_b;
432 WORD wTxRrvTime_a;
433 }__attribute__ ((__packed__))
434 SRrvTime_gCTS, DEF* PSRrvTime_gCTS;
435 typedef const SRrvTime_gCTS DEF* PCSRrvTime_gCTS;
437 typedef struct tagSRrvTime_ab {
438 WORD wRTSTxRrvTime;
439 WORD wTxRrvTime;
440 }__attribute__ ((__packed__))
441 SRrvTime_ab, DEF* PSRrvTime_ab;
442 typedef const SRrvTime_ab DEF* PCSRrvTime_ab;
444 typedef struct tagSRrvTime_atim {
445 WORD wCTSTxRrvTime_ba;
446 WORD wTxRrvTime_a;
447 }__attribute__ ((__packed__))
448 SRrvTime_atim, DEF* PSRrvTime_atim;
449 typedef const SRrvTime_atim DEF* PCSRrvTime_atim;
452 // RTS buffer header
454 typedef struct tagSRTSData {
455 WORD wFrameControl;
456 WORD wDurationID;
457 BYTE abyRA[U_ETHER_ADDR_LEN];
458 BYTE abyTA[U_ETHER_ADDR_LEN];
459 }__attribute__ ((__packed__))
460 SRTSData, DEF* PSRTSData;
461 typedef const SRTSData DEF* PCSRTSData;
463 typedef struct tagSRTS_g {
464 BYTE bySignalField_b;
465 BYTE byServiceField_b;
466 WORD wTransmitLength_b;
467 BYTE bySignalField_a;
468 BYTE byServiceField_a;
469 WORD wTransmitLength_a;
470 WORD wDuration_ba;
471 WORD wDuration_aa;
472 WORD wDuration_bb;
473 WORD wReserved;
474 SRTSData Data;
475 }__attribute__ ((__packed__))
476 SRTS_g, DEF* PSRTS_g;
477 typedef const SRTS_g DEF* PCSRTS_g;
480 typedef struct tagSRTS_g_FB {
481 BYTE bySignalField_b;
482 BYTE byServiceField_b;
483 WORD wTransmitLength_b;
484 BYTE bySignalField_a;
485 BYTE byServiceField_a;
486 WORD wTransmitLength_a;
487 WORD wDuration_ba;
488 WORD wDuration_aa;
489 WORD wDuration_bb;
490 WORD wReserved;
491 WORD wRTSDuration_ba_f0;
492 WORD wRTSDuration_aa_f0;
493 WORD wRTSDuration_ba_f1;
494 WORD wRTSDuration_aa_f1;
495 SRTSData Data;
496 }__attribute__ ((__packed__))
497 SRTS_g_FB, DEF* PSRTS_g_FB;
498 typedef const SRTS_g_FB DEF* PCSRTS_g_FB;
501 typedef struct tagSRTS_ab {
502 BYTE bySignalField;
503 BYTE byServiceField;
504 WORD wTransmitLength;
505 WORD wDuration;
506 WORD wReserved;
507 SRTSData Data;
508 }__attribute__ ((__packed__))
509 SRTS_ab, DEF* PSRTS_ab;
510 typedef const SRTS_ab DEF* PCSRTS_ab;
513 typedef struct tagSRTS_a_FB {
514 BYTE bySignalField;
515 BYTE byServiceField;
516 WORD wTransmitLength;
517 WORD wDuration;
518 WORD wReserved;
519 WORD wRTSDuration_f0;
520 WORD wRTSDuration_f1;
521 SRTSData Data;
522 }__attribute__ ((__packed__))
523 SRTS_a_FB, DEF* PSRTS_a_FB;
524 typedef const SRTS_a_FB DEF* PCSRTS_a_FB;
528 // CTS buffer header
530 typedef struct tagSCTSData {
531 WORD wFrameControl;
532 WORD wDurationID;
533 BYTE abyRA[U_ETHER_ADDR_LEN];
534 WORD wReserved;
535 }__attribute__ ((__packed__))
536 SCTSData, DEF* PSCTSData;
538 typedef struct tagSCTS {
539 BYTE bySignalField_b;
540 BYTE byServiceField_b;
541 WORD wTransmitLength_b;
542 WORD wDuration_ba;
543 WORD wReserved;
544 SCTSData Data;
545 }__attribute__ ((__packed__))
546 SCTS, DEF* PSCTS;
547 typedef const SCTS DEF* PCSCTS;
549 typedef struct tagSCTS_FB {
550 BYTE bySignalField_b;
551 BYTE byServiceField_b;
552 WORD wTransmitLength_b;
553 WORD wDuration_ba;
554 WORD wReserved;
555 WORD wCTSDuration_ba_f0;
556 WORD wCTSDuration_ba_f1;
557 SCTSData Data;
558 }__attribute__ ((__packed__))
559 SCTS_FB, DEF* PSCTS_FB;
560 typedef const SCTS_FB DEF* PCSCTS_FB;
564 // Tx FIFO header
566 typedef struct tagSTxBufHead {
567 DWORD adwTxKey[4];
568 WORD wFIFOCtl;
569 WORD wTimeStamp;
570 WORD wFragCtl;
571 BYTE byTxPower;
572 BYTE wReserved;
573 }__attribute__ ((__packed__))
574 STxBufHead, DEF* PSTxBufHead;
575 typedef const STxBufHead DEF* PCSTxBufHead;
577 typedef struct tagSTxShortBufHead {
578 WORD wFIFOCtl;
579 WORD wTimeStamp;
580 }__attribute__ ((__packed__))
581 STxShortBufHead, DEF* PSTxShortBufHead;
582 typedef const STxShortBufHead DEF* PCSTxShortBufHead;
585 // Tx data header
587 typedef struct tagSTxDataHead_g {
588 BYTE bySignalField_b;
589 BYTE byServiceField_b;
590 WORD wTransmitLength_b;
591 BYTE bySignalField_a;
592 BYTE byServiceField_a;
593 WORD wTransmitLength_a;
594 WORD wDuration_b;
595 WORD wDuration_a;
596 WORD wTimeStampOff_b;
597 WORD wTimeStampOff_a;
598 }__attribute__ ((__packed__))
599 STxDataHead_g, DEF* PSTxDataHead_g;
600 typedef const STxDataHead_g DEF* PCSTxDataHead_g;
602 typedef struct tagSTxDataHead_g_FB {
603 BYTE bySignalField_b;
604 BYTE byServiceField_b;
605 WORD wTransmitLength_b;
606 BYTE bySignalField_a;
607 BYTE byServiceField_a;
608 WORD wTransmitLength_a;
609 WORD wDuration_b;
610 WORD wDuration_a;
611 WORD wDuration_a_f0;
612 WORD wDuration_a_f1;
613 WORD wTimeStampOff_b;
614 WORD wTimeStampOff_a;
615 }__attribute__ ((__packed__))
616 STxDataHead_g_FB, DEF* PSTxDataHead_g_FB;
617 typedef const STxDataHead_g_FB DEF* PCSTxDataHead_g_FB;
620 typedef struct tagSTxDataHead_ab {
621 BYTE bySignalField;
622 BYTE byServiceField;
623 WORD wTransmitLength;
624 WORD wDuration;
625 WORD wTimeStampOff;
626 }__attribute__ ((__packed__))
627 STxDataHead_ab, DEF* PSTxDataHead_ab;
628 typedef const STxDataHead_ab DEF* PCSTxDataHead_ab;
631 typedef struct tagSTxDataHead_a_FB {
632 BYTE bySignalField;
633 BYTE byServiceField;
634 WORD wTransmitLength;
635 WORD wDuration;
636 WORD wTimeStampOff;
637 WORD wDuration_f0;
638 WORD wDuration_f1;
639 }__attribute__ ((__packed__))
640 STxDataHead_a_FB, DEF* PSTxDataHead_a_FB;
641 typedef const STxDataHead_a_FB DEF* PCSTxDataHead_a_FB;
644 // MICHDR data header
646 typedef struct tagSMICHDRHead {
647 DWORD adwHDR0[4];
648 DWORD adwHDR1[4];
649 DWORD adwHDR2[4];
650 }__attribute__ ((__packed__))
651 SMICHDRHead, DEF* PSMICHDRHead;
652 typedef const SMICHDRHead DEF* PCSMICHDRHead;
654 typedef struct tagSBEACONCtl {
655 DWORD BufReady : 1;
656 DWORD TSF : 15;
657 DWORD BufLen : 11;
658 DWORD Reserved : 5;
659 }__attribute__ ((__packed__))
660 SBEACONCtl;
663 typedef struct tagSSecretKey {
664 DWORD dwLowDword;
665 BYTE byHighByte;
666 }__attribute__ ((__packed__))
667 SSecretKey;
669 typedef struct tagSKeyEntry {
670 BYTE abyAddrHi[2];
671 WORD wKCTL;
672 BYTE abyAddrLo[4];
673 DWORD dwKey0[4];
674 DWORD dwKey1[4];
675 DWORD dwKey2[4];
676 DWORD dwKey3[4];
677 DWORD dwKey4[4];
678 }__attribute__ ((__packed__))
679 SKeyEntry;
680 /*--------------------- Export Macros ------------------------------*/
682 /*--------------------- Export Classes ----------------------------*/
684 /*--------------------- Export Variables --------------------------*/
686 /*--------------------- Export Functions --------------------------*/
691 #endif // __DESC_H__