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