blob: c0fc1d3b0a2eebe305dbf6ccfb3d862a6541e837 [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
44// #ifdef PRIVATE_OBJ
45//#if !defined(__DEVICE_MODULE_H)
46//#include "device_module.h"
47//#endif
48
49
50
51
52/*--------------------- Export Definitions -------------------------*/
53
54#define B_OWNED_BY_CHIP 1 //
55#define B_OWNED_BY_HOST 0 //
56
57//
58// Bits in the RSR register
59//
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
69
70//
71// Bits in the new RSR register
72//
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
78
79//
80// Bits in the TSR0 register
81//
82#define TSR0_PWRSTS1_2 0xC0 // 1100 0000
83#define TSR0_PWRSTS7 0x20 // 0010 0000
84#define TSR0_NCR 0x1F // 0001 1111
85
86//
87// Bits in the TSR1 register
88//
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
95
96//
97// Bits in the TCR register
98//
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
102
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
108
109#define CB_BEACON_BUF_SIZE 512U // default beacon buffer size
110
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
115
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
121
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
125
126
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
131
132#define CB_MIN_MAP_REG_NUM 4
133#define CB_MAX_MAP_REG_NUM CB_MAX_TX_DESC
134
135#define CB_PROTOCOL_RESERVED_SECTION 16
136
137
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
142
143#ifdef __BIG_ENDIAN
144
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
161
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
175
176#else
177
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
193
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
207
208#endif // #ifdef __BIG_ENDIAN
209
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
217
218#define TYPE_BEACONDMA 4
219
220#define TYPE_RXDMA0 0
221#define TYPE_RXDMA1 1
222#define TYPE_MAXRD 2
223
224
225
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
231
232/*--------------------- Export Types ------------------------------*/
233
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.
237
238typedef 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;
246
247/*
248static 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;
255 }
256}
257*/
258
259/*
260typedef struct tagRDES0 {
261 WORD wResCount;
262 WORD wf1Owner ;
263// WORD f15Reserved : 15;
264// WORD f1Owner : 1;
265} __attribute__ ((__packed__))
266SRDES0;
267*/
268
269#ifdef __BIG_ENDIAN
270
271typedef 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__))
282SRDES0, *PSRDES0;
283
284#else
285
286typedef struct tagRDES0 {
287 WORD wResCount;
288 WORD f15Reserved : 15;
289 WORD f1Owner : 1;
290} __attribute__ ((__packed__))
291SRDES0;
292
293
294#endif
295
296typedef struct tagRDES1 {
297 WORD wReqCount;
298 WORD wReserved;
299} __attribute__ ((__packed__))
300SRDES1;
301
302//
303// Rx descriptor
304//
305typedef 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__))
314SRxDesc, DEF* PSRxDesc;
315typedef const SRxDesc DEF* PCSRxDesc;
316
317#ifdef __BIG_ENDIAN
318
319/*
320typedef 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__))
327STDES0;
328*/
329
330typedef 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__))
342STDES0, PSTDES0;
343
344#else
345
346typedef struct tagTDES0 {
347 volatile BYTE byTSR0;
348 volatile BYTE byTSR1;
349 volatile WORD f15Txtime : 15;
350 volatile WORD f1Owner:1;
351} __attribute__ ((__packed__))
352STDES0;
353
354#endif
355
356
357typedef struct tagTDES1 {
358 volatile WORD wReqCount;
359 volatile BYTE byTCR;
360 volatile BYTE byReserved;
361} __attribute__ ((__packed__))
362STDES1;
363
364
365typedef 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;
375
376/*
377static 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;
384 }
385}
386*/
387
388//
389// transmit descriptor
390//
391typedef 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__))
400STxDesc, DEF* PSTxDesc;
401typedef const STxDesc DEF* PCSTxDesc;
402
403
404typedef 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__))
415STxSyncDesc, DEF* PSTxSyncDesc;
416typedef const STxSyncDesc DEF* PCSTxSyncDesc;
417
418
419//
420// RsvTime buffer header
421//
422typedef 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__))
430SRrvTime_gRTS, DEF* PSRrvTime_gRTS;
431typedef const SRrvTime_gRTS DEF* PCSRrvTime_gRTS;
432
433typedef struct tagSRrvTime_gCTS {
434 WORD wCTSTxRrvTime_ba;
435 WORD wReserved;
436 WORD wTxRrvTime_b;
437 WORD wTxRrvTime_a;
438}__attribute__ ((__packed__))
439SRrvTime_gCTS, DEF* PSRrvTime_gCTS;
440typedef const SRrvTime_gCTS DEF* PCSRrvTime_gCTS;
441
442typedef struct tagSRrvTime_ab {
443 WORD wRTSTxRrvTime;
444 WORD wTxRrvTime;
445}__attribute__ ((__packed__))
446SRrvTime_ab, DEF* PSRrvTime_ab;
447typedef const SRrvTime_ab DEF* PCSRrvTime_ab;
448
449typedef struct tagSRrvTime_atim {
450 WORD wCTSTxRrvTime_ba;
451 WORD wTxRrvTime_a;
452}__attribute__ ((__packed__))
453SRrvTime_atim, DEF* PSRrvTime_atim;
454typedef const SRrvTime_atim DEF* PCSRrvTime_atim;
455
456//
457// RTS buffer header
458//
459typedef 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__))
465SRTSData, DEF* PSRTSData;
466typedef const SRTSData DEF* PCSRTSData;
467
468typedef 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__))
481SRTS_g, DEF* PSRTS_g;
482typedef const SRTS_g DEF* PCSRTS_g;
483
484
485typedef 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__))
502SRTS_g_FB, DEF* PSRTS_g_FB;
503typedef const SRTS_g_FB DEF* PCSRTS_g_FB;
504
505
506typedef struct tagSRTS_ab {
507 BYTE bySignalField;
508 BYTE byServiceField;
509 WORD wTransmitLength;
510 WORD wDuration;
511 WORD wReserved;
512 SRTSData Data;
513}__attribute__ ((__packed__))
514SRTS_ab, DEF* PSRTS_ab;
515typedef const SRTS_ab DEF* PCSRTS_ab;
516
517
518typedef 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__))
528SRTS_a_FB, DEF* PSRTS_a_FB;
529typedef const SRTS_a_FB DEF* PCSRTS_a_FB;
530
531
532//
533// CTS buffer header
534//
535typedef struct tagSCTSData {
536 WORD wFrameControl;
537 WORD wDurationID;
538 BYTE abyRA[U_ETHER_ADDR_LEN];
539 WORD wReserved;
540}__attribute__ ((__packed__))
541SCTSData, DEF* PSCTSData;
542
543typedef 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__))
551SCTS, DEF* PSCTS;
552typedef const SCTS DEF* PCSCTS;
553
554typedef 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__))
564SCTS_FB, DEF* PSCTS_FB;
565typedef const SCTS_FB DEF* PCSCTS_FB;
566
567
568//
569// Tx FIFO header
570//
571typedef struct tagSTxBufHead {
572 DWORD adwTxKey[4];
573 WORD wFIFOCtl;
574 WORD wTimeStamp;
575 WORD wFragCtl;
576 BYTE byTxPower;
577 BYTE wReserved;
578}__attribute__ ((__packed__))
579STxBufHead, DEF* PSTxBufHead;
580typedef const STxBufHead DEF* PCSTxBufHead;
581
582typedef struct tagSTxShortBufHead {
583 WORD wFIFOCtl;
584 WORD wTimeStamp;
585}__attribute__ ((__packed__))
586STxShortBufHead, DEF* PSTxShortBufHead;
587typedef const STxShortBufHead DEF* PCSTxShortBufHead;
588
589//
590// Tx data header
591//
592typedef 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__))
604STxDataHead_g, DEF* PSTxDataHead_g;
605typedef const STxDataHead_g DEF* PCSTxDataHead_g;
606
607typedef 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__))
621STxDataHead_g_FB, DEF* PSTxDataHead_g_FB;
622typedef const STxDataHead_g_FB DEF* PCSTxDataHead_g_FB;
623
624
625typedef struct tagSTxDataHead_ab {
626 BYTE bySignalField;
627 BYTE byServiceField;
628 WORD wTransmitLength;
629 WORD wDuration;
630 WORD wTimeStampOff;
631}__attribute__ ((__packed__))
632STxDataHead_ab, DEF* PSTxDataHead_ab;
633typedef const STxDataHead_ab DEF* PCSTxDataHead_ab;
634
635
636typedef 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__))
645STxDataHead_a_FB, DEF* PSTxDataHead_a_FB;
646typedef const STxDataHead_a_FB DEF* PCSTxDataHead_a_FB;
647
648//
649// MICHDR data header
650//
651typedef struct tagSMICHDRHead {
652 DWORD adwHDR0[4];
653 DWORD adwHDR1[4];
654 DWORD adwHDR2[4];
655}__attribute__ ((__packed__))
656SMICHDRHead, DEF* PSMICHDRHead;
657typedef const SMICHDRHead DEF* PCSMICHDRHead;
658
659typedef struct tagSBEACONCtl {
660 DWORD BufReady : 1;
661 DWORD TSF : 15;
662 DWORD BufLen : 11;
663 DWORD Reserved : 5;
664}__attribute__ ((__packed__))
665SBEACONCtl;
666
667
668typedef struct tagSSecretKey {
669 DWORD dwLowDword;
670 BYTE byHighByte;
671}__attribute__ ((__packed__))
672SSecretKey;
673
674typedef 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__))
684SKeyEntry;
685/*--------------------- Export Macros ------------------------------*/
686
687/*--------------------- Export Classes ----------------------------*/
688
689/*--------------------- Export Variables --------------------------*/
690
691/*--------------------- Export Functions --------------------------*/
692
693
694
695
696#endif // __DESC_H__
697