Merge branch 'fix/pcm-hwptr' into for-linus
[linux/fpc-iii.git] / drivers / staging / vt6655 / desc.h
blobc0fc1d3b0a2eebe305dbf6ccfb3d862a6541e837
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
44 // #ifdef PRIVATE_OBJ
45 //#if !defined(__DEVICE_MODULE_H)
46 //#include "device_module.h"
47 //#endif
52 /*--------------------- Export Definitions -------------------------*/
54 #define B_OWNED_BY_CHIP 1 //
55 #define B_OWNED_BY_HOST 0 //
58 // Bits in the RSR register
60 #define RSR_ADDRBROAD 0x80 // 1000 0000
61 #define RSR_ADDRMULTI 0x40 // 0100 0000
62 #define RSR_ADDRUNI 0x00 // 0000 0000
63 #define RSR_IVLDTYP 0x20 // 0010 0000 , invalid packet type
64 #define RSR_IVLDLEN 0x10 // 0001 0000 , invalid len (> 2312 byte)
65 #define RSR_BSSIDOK 0x08 // 0000 1000
66 #define RSR_CRCOK 0x04 // 0000 0100
67 #define RSR_BCNSSIDOK 0x02 // 0000 0010
68 #define RSR_ADDROK 0x01 // 0000 0001
71 // Bits in the new RSR register
73 #define NEWRSR_DECRYPTOK 0x10 // 0001 0000
74 #define NEWRSR_CFPIND 0x08 // 0000 1000
75 #define NEWRSR_HWUTSF 0x04 // 0000 0100
76 #define NEWRSR_BCNHITAID 0x02 // 0000 0010
77 #define NEWRSR_BCNHITAID0 0x01 // 0000 0001
80 // Bits in the TSR0 register
82 #define TSR0_PWRSTS1_2 0xC0 // 1100 0000
83 #define TSR0_PWRSTS7 0x20 // 0010 0000
84 #define TSR0_NCR 0x1F // 0001 1111
87 // Bits in the TSR1 register
89 #define TSR1_TERR 0x80 // 1000 0000
90 #define TSR1_PWRSTS4_6 0x70 // 0111 0000
91 #define TSR1_RETRYTMO 0x08 // 0000 1000
92 #define TSR1_TMO 0x04 // 0000 0100
93 #define TSR1_PWRSTS3 0x02 // 0000 0010
94 #define ACK_DATA 0x01 // 0000 0000
97 // Bits in the TCR register
99 #define EDMSDU 0x04 // 0000 0100 end of sdu
100 #define TCR_EDP 0x02 // 0000 0010 end of packet
101 #define TCR_STP 0x01 // 0000 0001 start of packet
103 // max transmit or receive buffer size
104 #define CB_MAX_BUF_SIZE 2900U // max buffer size
105 // NOTE: must be multiple of 4
106 #define CB_MAX_TX_BUF_SIZE CB_MAX_BUF_SIZE // max Tx buffer size
107 #define CB_MAX_RX_BUF_SIZE_NORMAL CB_MAX_BUF_SIZE // max Rx buffer size when not use Multi-RD
109 #define CB_BEACON_BUF_SIZE 512U // default beacon buffer size
111 #define CB_MAX_RX_DESC 128 // max # of descriptor
112 #define CB_MIN_RX_DESC 16 // min # of rx descriptor
113 #define CB_MAX_TX_DESC 64 // max # of descriptor
114 #define CB_MIN_TX_DESC 16 // min # of tx descriptor
116 #define CB_MAX_RECEIVED_PACKETS 16 // max # of received packets at one time
117 // limit our receive routine to indicating
118 // this many at a time for 2 reasons:
119 // 1. driver flow control to protocol layer
120 // 2. limit the time used in ISR routine
122 #define CB_EXTRA_RD_NUM 32 // default # of Extra RD
123 #define CB_RD_NUM 32 // default # of RD
124 #define CB_TD_NUM 32 // default # of TD
127 // max number of physical segments
128 // in a single NDIS packet. Above this threshold, the packet
129 // is copied into a single physically contiguous buffer
130 #define CB_MAX_SEGMENT 4
132 #define CB_MIN_MAP_REG_NUM 4
133 #define CB_MAX_MAP_REG_NUM CB_MAX_TX_DESC
135 #define CB_PROTOCOL_RESERVED_SECTION 16
138 // if retrys excess 15 times , tx will abort, and
139 // if tx fifo underflow, tx will fail
140 // we should try to resend it
141 #define CB_MAX_TX_ABORT_RETRY 3
143 #ifdef __BIG_ENDIAN
145 // WMAC definition FIFO Control
146 #define FIFOCTL_AUTO_FB_1 0x0010 // 0001 0000 0000 0000
147 #define FIFOCTL_AUTO_FB_0 0x0008 // 0000 1000 0000 0000
148 #define FIFOCTL_GRPACK 0x0004 // 0000 0100 0000 0000
149 #define FIFOCTL_11GA 0x0003 // 0000 0011 0000 0000
150 #define FIFOCTL_11GB 0x0002 // 0000 0010 0000 0000
151 #define FIFOCTL_11B 0x0001 // 0000 0001 0000 0000
152 #define FIFOCTL_11A 0x0000 // 0000 0000 0000 0000
153 #define FIFOCTL_RTS 0x8000 // 0000 0000 1000 0000
154 #define FIFOCTL_ISDMA0 0x4000 // 0000 0000 0100 0000
155 #define FIFOCTL_GENINT 0x2000 // 0000 0000 0010 0000
156 #define FIFOCTL_TMOEN 0x1000 // 0000 0000 0001 0000
157 #define FIFOCTL_LRETRY 0x0800 // 0000 0000 0000 1000
158 #define FIFOCTL_CRCDIS 0x0400 // 0000 0000 0000 0100
159 #define FIFOCTL_NEEDACK 0x0200 // 0000 0000 0000 0010
160 #define FIFOCTL_LHEAD 0x0100 // 0000 0000 0000 0001
162 //WMAC definition Frag Control
163 #define FRAGCTL_AES 0x0003 // 0000 0011 0000 0000
164 #define FRAGCTL_TKIP 0x0002 // 0000 0010 0000 0000
165 #define FRAGCTL_LEGACY 0x0001 // 0000 0001 0000 0000
166 #define FRAGCTL_NONENCRYPT 0x0000 // 0000 0000 0000 0000
167 //#define FRAGCTL_AC3 0x0C00 // 0000 0000 0000 1100
168 //#define FRAGCTL_AC2 0x0800 // 0000 0000 0000 1000
169 //#define FRAGCTL_AC1 0x0400 // 0000 0000 0000 0100
170 //#define FRAGCTL_AC0 0x0000 // 0000 0000 0000 0000
171 #define FRAGCTL_ENDFRAG 0x0300 // 0000 0000 0000 0011
172 #define FRAGCTL_MIDFRAG 0x0200 // 0000 0000 0000 0010
173 #define FRAGCTL_STAFRAG 0x0100 // 0000 0000 0000 0001
174 #define FRAGCTL_NONFRAG 0x0000 // 0000 0000 0000 0000
176 #else
178 #define FIFOCTL_AUTO_FB_1 0x1000 // 0001 0000 0000 0000
179 #define FIFOCTL_AUTO_FB_0 0x0800 // 0000 1000 0000 0000
180 #define FIFOCTL_GRPACK 0x0400 // 0000 0100 0000 0000
181 #define FIFOCTL_11GA 0x0300 // 0000 0011 0000 0000
182 #define FIFOCTL_11GB 0x0200 // 0000 0010 0000 0000
183 #define FIFOCTL_11B 0x0100 // 0000 0001 0000 0000
184 #define FIFOCTL_11A 0x0000 // 0000 0000 0000 0000
185 #define FIFOCTL_RTS 0x0080 // 0000 0000 1000 0000
186 #define FIFOCTL_ISDMA0 0x0040 // 0000 0000 0100 0000
187 #define FIFOCTL_GENINT 0x0020 // 0000 0000 0010 0000
188 #define FIFOCTL_TMOEN 0x0010 // 0000 0000 0001 0000
189 #define FIFOCTL_LRETRY 0x0008 // 0000 0000 0000 1000
190 #define FIFOCTL_CRCDIS 0x0004 // 0000 0000 0000 0100
191 #define FIFOCTL_NEEDACK 0x0002 // 0000 0000 0000 0010
192 #define FIFOCTL_LHEAD 0x0001 // 0000 0000 0000 0001
194 //WMAC definition Frag Control
195 #define FRAGCTL_AES 0x0300 // 0000 0011 0000 0000
196 #define FRAGCTL_TKIP 0x0200 // 0000 0010 0000 0000
197 #define FRAGCTL_LEGACY 0x0100 // 0000 0001 0000 0000
198 #define FRAGCTL_NONENCRYPT 0x0000 // 0000 0000 0000 0000
199 //#define FRAGCTL_AC3 0x000C // 0000 0000 0000 1100
200 //#define FRAGCTL_AC2 0x0008 // 0000 0000 0000 1000
201 //#define FRAGCTL_AC1 0x0004 // 0000 0000 0000 0100
202 //#define FRAGCTL_AC0 0x0000 // 0000 0000 0000 0000
203 #define FRAGCTL_ENDFRAG 0x0003 // 0000 0000 0000 0011
204 #define FRAGCTL_MIDFRAG 0x0002 // 0000 0000 0000 0010
205 #define FRAGCTL_STAFRAG 0x0001 // 0000 0000 0000 0001
206 #define FRAGCTL_NONFRAG 0x0000 // 0000 0000 0000 0000
208 #endif // #ifdef __BIG_ENDIAN
210 //#define TYPE_AC0DMA 0
211 //#define TYPE_TXDMA0 1
212 #define TYPE_TXDMA0 0
213 #define TYPE_AC0DMA 1
214 #define TYPE_ATIMDMA 2
215 #define TYPE_SYNCDMA 3
216 #define TYPE_MAXTD 2
218 #define TYPE_BEACONDMA 4
220 #define TYPE_RXDMA0 0
221 #define TYPE_RXDMA1 1
222 #define TYPE_MAXRD 2
226 // TD_INFO flags control bit
227 #define TD_FLAGS_NETIF_SKB 0x01 // check if need release skb
228 #define TD_FLAGS_PRIV_SKB 0x02 // check if called from private skb(hostap)
229 #define TD_FLAGS_PS_RETRY 0x04 // check if PS STA frame re-transmit
230 //#define TD_FLAGS_NETIF_SKB 0x04
232 /*--------------------- Export Types ------------------------------*/
234 // ref_sk_buff is used for mapping the skb structure between pre-built driver-obj & running kernel.
235 // Since different kernel version (2.4x) may change skb structure, i.e. pre-built driver-obj
236 // may link to older skb that leads error.
238 typedef struct tagDEVICE_RD_INFO {
239 struct sk_buff* skb;
240 #ifdef PRIVATE_OBJ
241 ref_sk_buff ref_skb;
242 #endif
243 dma_addr_t skb_dma;
244 dma_addr_t curr_desc;
245 } DEVICE_RD_INFO, *PDEVICE_RD_INFO;
248 static inline PDEVICE_RD_INFO alloc_rd_info(void) {
249 PDEVICE_RD_INFO ptr;
250 if ((ptr = kmalloc(sizeof(DEVICE_RD_INFO), GFP_ATOMIC)) == NULL)
251 return NULL;
252 else {
253 memset(ptr,0,sizeof(DEVICE_RD_INFO));
254 return ptr;
260 typedef struct tagRDES0 {
261 WORD wResCount;
262 WORD wf1Owner ;
263 // WORD f15Reserved : 15;
264 // WORD f1Owner : 1;
265 } __attribute__ ((__packed__))
266 SRDES0;
269 #ifdef __BIG_ENDIAN
271 typedef struct tagRDES0 {
272 volatile WORD wResCount;
273 union {
274 volatile U16 f15Reserved;
275 struct {
276 volatile U8 f8Reserved1;
277 volatile U8 f1Owner:1;
278 volatile U8 f7Reserved:7;
279 } __attribute__ ((__packed__));
280 } __attribute__ ((__packed__));
281 } __attribute__ ((__packed__))
282 SRDES0, *PSRDES0;
284 #else
286 typedef struct tagRDES0 {
287 WORD wResCount;
288 WORD f15Reserved : 15;
289 WORD f1Owner : 1;
290 } __attribute__ ((__packed__))
291 SRDES0;
294 #endif
296 typedef struct tagRDES1 {
297 WORD wReqCount;
298 WORD wReserved;
299 } __attribute__ ((__packed__))
300 SRDES1;
303 // Rx descriptor
305 typedef struct tagSRxDesc {
306 volatile SRDES0 m_rd0RD0;
307 volatile SRDES1 m_rd1RD1;
308 volatile U32 buff_addr;
309 volatile U32 next_desc;
310 struct tagSRxDesc *next;//4 bytes
311 volatile PDEVICE_RD_INFO pRDInfo;//4 bytes
312 volatile U32 Reserved[2];//8 bytes
313 } __attribute__ ((__packed__))
314 SRxDesc, DEF* PSRxDesc;
315 typedef const SRxDesc DEF* PCSRxDesc;
317 #ifdef __BIG_ENDIAN
320 typedef struct tagTDES0 {
321 volatile BYTE byTSR0;
322 volatile BYTE byTSR1;
323 volatile WORD wOwner_Txtime;
324 // volatile WORD f15Txtime : 15;
325 // volatile WORD f1Owner:1;
326 } __attribute__ ((__packed__))
327 STDES0;
330 typedef struct tagTDES0 {
331 volatile BYTE byTSR0;
332 volatile BYTE byTSR1;
333 union {
334 volatile U16 f15Txtime;
335 struct {
336 volatile U8 f8Reserved1;
337 volatile U8 f1Owner:1;
338 volatile U8 f7Reserved:7;
339 } __attribute__ ((__packed__));
340 } __attribute__ ((__packed__));
341 } __attribute__ ((__packed__))
342 STDES0, PSTDES0;
344 #else
346 typedef struct tagTDES0 {
347 volatile BYTE byTSR0;
348 volatile BYTE byTSR1;
349 volatile WORD f15Txtime : 15;
350 volatile WORD f1Owner:1;
351 } __attribute__ ((__packed__))
352 STDES0;
354 #endif
357 typedef struct tagTDES1 {
358 volatile WORD wReqCount;
359 volatile BYTE byTCR;
360 volatile BYTE byReserved;
361 } __attribute__ ((__packed__))
362 STDES1;
365 typedef struct tagDEVICE_TD_INFO{
366 struct sk_buff* skb;
367 PBYTE buf;
368 dma_addr_t skb_dma;
369 dma_addr_t buf_dma;
370 dma_addr_t curr_desc;
371 DWORD dwReqCount;
372 DWORD dwHeaderLength;
373 BYTE byFlags;
374 } DEVICE_TD_INFO, *PDEVICE_TD_INFO;
377 static inline PDEVICE_TD_INFO alloc_td_info(void) {
378 PDEVICE_TD_INFO ptr;
379 if ((ptr = kmalloc(sizeof(DEVICE_TD_INFO),GFP_ATOMIC))==NULL)
380 return NULL;
381 else {
382 memset(ptr,0,sizeof(DEVICE_TD_INFO));
383 return ptr;
389 // transmit descriptor
391 typedef struct tagSTxDesc {
392 volatile STDES0 m_td0TD0;
393 volatile STDES1 m_td1TD1;
394 volatile U32 buff_addr;
395 volatile U32 next_desc;
396 struct tagSTxDesc* next; //4 bytes
397 volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
398 volatile U32 Reserved[2];//8 bytes
399 } __attribute__ ((__packed__))
400 STxDesc, DEF* PSTxDesc;
401 typedef const STxDesc DEF* PCSTxDesc;
404 typedef struct tagSTxSyncDesc {
405 volatile STDES0 m_td0TD0;
406 volatile STDES1 m_td1TD1;
407 volatile DWORD buff_addr; // pointer to logical buffer
408 volatile DWORD next_desc; // pointer to next logical descriptor
409 volatile WORD m_wFIFOCtl;
410 volatile WORD m_wTimeStamp;
411 struct tagSTxSyncDesc* next; //4 bytes
412 volatile PDEVICE_TD_INFO pTDInfo;//4 bytes
413 volatile DWORD m_dwReserved2;
414 } __attribute__ ((__packed__))
415 STxSyncDesc, DEF* PSTxSyncDesc;
416 typedef const STxSyncDesc DEF* PCSTxSyncDesc;
420 // RsvTime buffer header
422 typedef struct tagSRrvTime_gRTS {
423 WORD wRTSTxRrvTime_ba;
424 WORD wRTSTxRrvTime_aa;
425 WORD wRTSTxRrvTime_bb;
426 WORD wReserved;
427 WORD wTxRrvTime_b;
428 WORD wTxRrvTime_a;
429 }__attribute__ ((__packed__))
430 SRrvTime_gRTS, DEF* PSRrvTime_gRTS;
431 typedef const SRrvTime_gRTS DEF* PCSRrvTime_gRTS;
433 typedef struct tagSRrvTime_gCTS {
434 WORD wCTSTxRrvTime_ba;
435 WORD wReserved;
436 WORD wTxRrvTime_b;
437 WORD wTxRrvTime_a;
438 }__attribute__ ((__packed__))
439 SRrvTime_gCTS, DEF* PSRrvTime_gCTS;
440 typedef const SRrvTime_gCTS DEF* PCSRrvTime_gCTS;
442 typedef struct tagSRrvTime_ab {
443 WORD wRTSTxRrvTime;
444 WORD wTxRrvTime;
445 }__attribute__ ((__packed__))
446 SRrvTime_ab, DEF* PSRrvTime_ab;
447 typedef const SRrvTime_ab DEF* PCSRrvTime_ab;
449 typedef struct tagSRrvTime_atim {
450 WORD wCTSTxRrvTime_ba;
451 WORD wTxRrvTime_a;
452 }__attribute__ ((__packed__))
453 SRrvTime_atim, DEF* PSRrvTime_atim;
454 typedef const SRrvTime_atim DEF* PCSRrvTime_atim;
457 // RTS buffer header
459 typedef struct tagSRTSData {
460 WORD wFrameControl;
461 WORD wDurationID;
462 BYTE abyRA[U_ETHER_ADDR_LEN];
463 BYTE abyTA[U_ETHER_ADDR_LEN];
464 }__attribute__ ((__packed__))
465 SRTSData, DEF* PSRTSData;
466 typedef const SRTSData DEF* PCSRTSData;
468 typedef struct tagSRTS_g {
469 BYTE bySignalField_b;
470 BYTE byServiceField_b;
471 WORD wTransmitLength_b;
472 BYTE bySignalField_a;
473 BYTE byServiceField_a;
474 WORD wTransmitLength_a;
475 WORD wDuration_ba;
476 WORD wDuration_aa;
477 WORD wDuration_bb;
478 WORD wReserved;
479 SRTSData Data;
480 }__attribute__ ((__packed__))
481 SRTS_g, DEF* PSRTS_g;
482 typedef const SRTS_g DEF* PCSRTS_g;
485 typedef struct tagSRTS_g_FB {
486 BYTE bySignalField_b;
487 BYTE byServiceField_b;
488 WORD wTransmitLength_b;
489 BYTE bySignalField_a;
490 BYTE byServiceField_a;
491 WORD wTransmitLength_a;
492 WORD wDuration_ba;
493 WORD wDuration_aa;
494 WORD wDuration_bb;
495 WORD wReserved;
496 WORD wRTSDuration_ba_f0;
497 WORD wRTSDuration_aa_f0;
498 WORD wRTSDuration_ba_f1;
499 WORD wRTSDuration_aa_f1;
500 SRTSData Data;
501 }__attribute__ ((__packed__))
502 SRTS_g_FB, DEF* PSRTS_g_FB;
503 typedef const SRTS_g_FB DEF* PCSRTS_g_FB;
506 typedef struct tagSRTS_ab {
507 BYTE bySignalField;
508 BYTE byServiceField;
509 WORD wTransmitLength;
510 WORD wDuration;
511 WORD wReserved;
512 SRTSData Data;
513 }__attribute__ ((__packed__))
514 SRTS_ab, DEF* PSRTS_ab;
515 typedef const SRTS_ab DEF* PCSRTS_ab;
518 typedef struct tagSRTS_a_FB {
519 BYTE bySignalField;
520 BYTE byServiceField;
521 WORD wTransmitLength;
522 WORD wDuration;
523 WORD wReserved;
524 WORD wRTSDuration_f0;
525 WORD wRTSDuration_f1;
526 SRTSData Data;
527 }__attribute__ ((__packed__))
528 SRTS_a_FB, DEF* PSRTS_a_FB;
529 typedef const SRTS_a_FB DEF* PCSRTS_a_FB;
533 // CTS buffer header
535 typedef struct tagSCTSData {
536 WORD wFrameControl;
537 WORD wDurationID;
538 BYTE abyRA[U_ETHER_ADDR_LEN];
539 WORD wReserved;
540 }__attribute__ ((__packed__))
541 SCTSData, DEF* PSCTSData;
543 typedef struct tagSCTS {
544 BYTE bySignalField_b;
545 BYTE byServiceField_b;
546 WORD wTransmitLength_b;
547 WORD wDuration_ba;
548 WORD wReserved;
549 SCTSData Data;
550 }__attribute__ ((__packed__))
551 SCTS, DEF* PSCTS;
552 typedef const SCTS DEF* PCSCTS;
554 typedef struct tagSCTS_FB {
555 BYTE bySignalField_b;
556 BYTE byServiceField_b;
557 WORD wTransmitLength_b;
558 WORD wDuration_ba;
559 WORD wReserved;
560 WORD wCTSDuration_ba_f0;
561 WORD wCTSDuration_ba_f1;
562 SCTSData Data;
563 }__attribute__ ((__packed__))
564 SCTS_FB, DEF* PSCTS_FB;
565 typedef const SCTS_FB DEF* PCSCTS_FB;
569 // Tx FIFO header
571 typedef struct tagSTxBufHead {
572 DWORD adwTxKey[4];
573 WORD wFIFOCtl;
574 WORD wTimeStamp;
575 WORD wFragCtl;
576 BYTE byTxPower;
577 BYTE wReserved;
578 }__attribute__ ((__packed__))
579 STxBufHead, DEF* PSTxBufHead;
580 typedef const STxBufHead DEF* PCSTxBufHead;
582 typedef struct tagSTxShortBufHead {
583 WORD wFIFOCtl;
584 WORD wTimeStamp;
585 }__attribute__ ((__packed__))
586 STxShortBufHead, DEF* PSTxShortBufHead;
587 typedef const STxShortBufHead DEF* PCSTxShortBufHead;
590 // Tx data header
592 typedef struct tagSTxDataHead_g {
593 BYTE bySignalField_b;
594 BYTE byServiceField_b;
595 WORD wTransmitLength_b;
596 BYTE bySignalField_a;
597 BYTE byServiceField_a;
598 WORD wTransmitLength_a;
599 WORD wDuration_b;
600 WORD wDuration_a;
601 WORD wTimeStampOff_b;
602 WORD wTimeStampOff_a;
603 }__attribute__ ((__packed__))
604 STxDataHead_g, DEF* PSTxDataHead_g;
605 typedef const STxDataHead_g DEF* PCSTxDataHead_g;
607 typedef struct tagSTxDataHead_g_FB {
608 BYTE bySignalField_b;
609 BYTE byServiceField_b;
610 WORD wTransmitLength_b;
611 BYTE bySignalField_a;
612 BYTE byServiceField_a;
613 WORD wTransmitLength_a;
614 WORD wDuration_b;
615 WORD wDuration_a;
616 WORD wDuration_a_f0;
617 WORD wDuration_a_f1;
618 WORD wTimeStampOff_b;
619 WORD wTimeStampOff_a;
620 }__attribute__ ((__packed__))
621 STxDataHead_g_FB, DEF* PSTxDataHead_g_FB;
622 typedef const STxDataHead_g_FB DEF* PCSTxDataHead_g_FB;
625 typedef struct tagSTxDataHead_ab {
626 BYTE bySignalField;
627 BYTE byServiceField;
628 WORD wTransmitLength;
629 WORD wDuration;
630 WORD wTimeStampOff;
631 }__attribute__ ((__packed__))
632 STxDataHead_ab, DEF* PSTxDataHead_ab;
633 typedef const STxDataHead_ab DEF* PCSTxDataHead_ab;
636 typedef struct tagSTxDataHead_a_FB {
637 BYTE bySignalField;
638 BYTE byServiceField;
639 WORD wTransmitLength;
640 WORD wDuration;
641 WORD wTimeStampOff;
642 WORD wDuration_f0;
643 WORD wDuration_f1;
644 }__attribute__ ((__packed__))
645 STxDataHead_a_FB, DEF* PSTxDataHead_a_FB;
646 typedef const STxDataHead_a_FB DEF* PCSTxDataHead_a_FB;
649 // MICHDR data header
651 typedef struct tagSMICHDRHead {
652 DWORD adwHDR0[4];
653 DWORD adwHDR1[4];
654 DWORD adwHDR2[4];
655 }__attribute__ ((__packed__))
656 SMICHDRHead, DEF* PSMICHDRHead;
657 typedef const SMICHDRHead DEF* PCSMICHDRHead;
659 typedef struct tagSBEACONCtl {
660 DWORD BufReady : 1;
661 DWORD TSF : 15;
662 DWORD BufLen : 11;
663 DWORD Reserved : 5;
664 }__attribute__ ((__packed__))
665 SBEACONCtl;
668 typedef struct tagSSecretKey {
669 DWORD dwLowDword;
670 BYTE byHighByte;
671 }__attribute__ ((__packed__))
672 SSecretKey;
674 typedef struct tagSKeyEntry {
675 BYTE abyAddrHi[2];
676 WORD wKCTL;
677 BYTE abyAddrLo[4];
678 DWORD dwKey0[4];
679 DWORD dwKey1[4];
680 DWORD dwKey2[4];
681 DWORD dwKey3[4];
682 DWORD dwKey4[4];
683 }__attribute__ ((__packed__))
684 SKeyEntry;
685 /*--------------------- Export Macros ------------------------------*/
687 /*--------------------- Export Classes ----------------------------*/
689 /*--------------------- Export Variables --------------------------*/
691 /*--------------------- Export Functions --------------------------*/
696 #endif // __DESC_H__