blob: 8243ecb290c967f016ce983f134a5b4ca1ed57eb [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
Jim Lieb612822f2009-08-12 14:54:03 -070046
47
48
Forest Bond5449c682009-04-25 10:30:44 -040049/*--------------------- Export Definitions -------------------------*/
50
51#define B_OWNED_BY_CHIP 1 //
52#define B_OWNED_BY_HOST 0 //
53
54//
55// Bits in the RSR register
56//
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
66
67//
68// Bits in the new RSR register
69//
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
75
76//
77// Bits in the TSR0 register
78//
79#define TSR0_PWRSTS1_2 0xC0 // 1100 0000
80#define TSR0_PWRSTS7 0x20 // 0010 0000
81#define TSR0_NCR 0x1F // 0001 1111
82
83//
84// Bits in the TSR1 register
85//
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
92
93//
94// Bits in the TCR register
95//
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
99
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
105
106#define CB_BEACON_BUF_SIZE 512U // default beacon buffer size
107
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
112
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
118
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
122
123
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
128
129#define CB_MIN_MAP_REG_NUM 4
130#define CB_MAX_MAP_REG_NUM CB_MAX_TX_DESC
131
132#define CB_PROTOCOL_RESERVED_SECTION 16
133
134
Jim Lieb612822f2009-08-12 14:54:03 -0700135
Forest Bond5449c682009-04-25 10:30:44 -0400136// 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
140
141#ifdef __BIG_ENDIAN
142
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
159
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
173
174#else
175
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
191
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
205
206#endif // #ifdef __BIG_ENDIAN
207
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
215
216#define TYPE_BEACONDMA 4
217
218#define TYPE_RXDMA0 0
219#define TYPE_RXDMA1 1
220#define TYPE_MAXRD 2
221
222
223
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
229
230/*--------------------- Export Types ------------------------------*/
231
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.
235
236typedef struct tagDEVICE_RD_INFO {
237 struct sk_buff* skb;
Forest Bond5449c682009-04-25 10:30:44 -0400238 dma_addr_t skb_dma;
239 dma_addr_t curr_desc;
240} DEVICE_RD_INFO, *PDEVICE_RD_INFO;
241
242/*
243static 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;
250 }
251}
252*/
253
254/*
255typedef struct tagRDES0 {
256 WORD wResCount;
257 WORD wf1Owner ;
258// WORD f15Reserved : 15;
259// WORD f1Owner : 1;
260} __attribute__ ((__packed__))
261SRDES0;
262*/
263
264#ifdef __BIG_ENDIAN
265
266typedef 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__))
277SRDES0, *PSRDES0;
278
279#else
280
281typedef struct tagRDES0 {
282 WORD wResCount;
283 WORD f15Reserved : 15;
284 WORD f1Owner : 1;
285} __attribute__ ((__packed__))
286SRDES0;
287
288
289#endif
290
291typedef struct tagRDES1 {
292 WORD wReqCount;
293 WORD wReserved;
294} __attribute__ ((__packed__))
295SRDES1;
296
297//
298// Rx descriptor
299//
300typedef 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__))
309SRxDesc, DEF* PSRxDesc;
310typedef const SRxDesc DEF* PCSRxDesc;
311
312#ifdef __BIG_ENDIAN
313
314/*
315typedef 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__))
322STDES0;
323*/
324
325typedef 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__))
337STDES0, PSTDES0;
338
339#else
340
341typedef struct tagTDES0 {
342 volatile BYTE byTSR0;
343 volatile BYTE byTSR1;
344 volatile WORD f15Txtime : 15;
345 volatile WORD f1Owner:1;
346} __attribute__ ((__packed__))
347STDES0;
348
349#endif
350
351
352typedef struct tagTDES1 {
353 volatile WORD wReqCount;
354 volatile BYTE byTCR;
355 volatile BYTE byReserved;
356} __attribute__ ((__packed__))
357STDES1;
358
359
360typedef 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;
370
371/*
372static 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;
379 }
380}
381*/
382
383//
384// transmit descriptor
385//
386typedef 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__))
395STxDesc, DEF* PSTxDesc;
396typedef const STxDesc DEF* PCSTxDesc;
397
398
399typedef 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__))
410STxSyncDesc, DEF* PSTxSyncDesc;
411typedef const STxSyncDesc DEF* PCSTxSyncDesc;
412
413
414//
415// RsvTime buffer header
416//
417typedef 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__))
425SRrvTime_gRTS, DEF* PSRrvTime_gRTS;
426typedef const SRrvTime_gRTS DEF* PCSRrvTime_gRTS;
427
428typedef struct tagSRrvTime_gCTS {
429 WORD wCTSTxRrvTime_ba;
430 WORD wReserved;
431 WORD wTxRrvTime_b;
432 WORD wTxRrvTime_a;
433}__attribute__ ((__packed__))
434SRrvTime_gCTS, DEF* PSRrvTime_gCTS;
435typedef const SRrvTime_gCTS DEF* PCSRrvTime_gCTS;
436
437typedef struct tagSRrvTime_ab {
438 WORD wRTSTxRrvTime;
439 WORD wTxRrvTime;
440}__attribute__ ((__packed__))
441SRrvTime_ab, DEF* PSRrvTime_ab;
442typedef const SRrvTime_ab DEF* PCSRrvTime_ab;
443
444typedef struct tagSRrvTime_atim {
445 WORD wCTSTxRrvTime_ba;
446 WORD wTxRrvTime_a;
447}__attribute__ ((__packed__))
448SRrvTime_atim, DEF* PSRrvTime_atim;
449typedef const SRrvTime_atim DEF* PCSRrvTime_atim;
450
451//
452// RTS buffer header
453//
454typedef 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__))
460SRTSData, DEF* PSRTSData;
461typedef const SRTSData DEF* PCSRTSData;
462
463typedef 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__))
476SRTS_g, DEF* PSRTS_g;
477typedef const SRTS_g DEF* PCSRTS_g;
478
479
480typedef 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__))
497SRTS_g_FB, DEF* PSRTS_g_FB;
498typedef const SRTS_g_FB DEF* PCSRTS_g_FB;
499
500
501typedef struct tagSRTS_ab {
502 BYTE bySignalField;
503 BYTE byServiceField;
504 WORD wTransmitLength;
505 WORD wDuration;
506 WORD wReserved;
507 SRTSData Data;
508}__attribute__ ((__packed__))
509SRTS_ab, DEF* PSRTS_ab;
510typedef const SRTS_ab DEF* PCSRTS_ab;
511
512
513typedef 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__))
523SRTS_a_FB, DEF* PSRTS_a_FB;
524typedef const SRTS_a_FB DEF* PCSRTS_a_FB;
525
526
527//
528// CTS buffer header
529//
530typedef struct tagSCTSData {
531 WORD wFrameControl;
532 WORD wDurationID;
533 BYTE abyRA[U_ETHER_ADDR_LEN];
534 WORD wReserved;
535}__attribute__ ((__packed__))
536SCTSData, DEF* PSCTSData;
537
538typedef 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__))
546SCTS, DEF* PSCTS;
547typedef const SCTS DEF* PCSCTS;
548
549typedef 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__))
559SCTS_FB, DEF* PSCTS_FB;
560typedef const SCTS_FB DEF* PCSCTS_FB;
561
562
563//
564// Tx FIFO header
565//
566typedef struct tagSTxBufHead {
567 DWORD adwTxKey[4];
568 WORD wFIFOCtl;
569 WORD wTimeStamp;
570 WORD wFragCtl;
571 BYTE byTxPower;
572 BYTE wReserved;
573}__attribute__ ((__packed__))
574STxBufHead, DEF* PSTxBufHead;
575typedef const STxBufHead DEF* PCSTxBufHead;
576
577typedef struct tagSTxShortBufHead {
578 WORD wFIFOCtl;
579 WORD wTimeStamp;
580}__attribute__ ((__packed__))
581STxShortBufHead, DEF* PSTxShortBufHead;
582typedef const STxShortBufHead DEF* PCSTxShortBufHead;
583
584//
585// Tx data header
586//
587typedef 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__))
599STxDataHead_g, DEF* PSTxDataHead_g;
600typedef const STxDataHead_g DEF* PCSTxDataHead_g;
601
602typedef 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__))
616STxDataHead_g_FB, DEF* PSTxDataHead_g_FB;
617typedef const STxDataHead_g_FB DEF* PCSTxDataHead_g_FB;
618
619
620typedef struct tagSTxDataHead_ab {
621 BYTE bySignalField;
622 BYTE byServiceField;
623 WORD wTransmitLength;
624 WORD wDuration;
625 WORD wTimeStampOff;
626}__attribute__ ((__packed__))
627STxDataHead_ab, DEF* PSTxDataHead_ab;
628typedef const STxDataHead_ab DEF* PCSTxDataHead_ab;
629
630
631typedef 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__))
640STxDataHead_a_FB, DEF* PSTxDataHead_a_FB;
641typedef const STxDataHead_a_FB DEF* PCSTxDataHead_a_FB;
642
643//
644// MICHDR data header
645//
646typedef struct tagSMICHDRHead {
647 DWORD adwHDR0[4];
648 DWORD adwHDR1[4];
649 DWORD adwHDR2[4];
650}__attribute__ ((__packed__))
651SMICHDRHead, DEF* PSMICHDRHead;
652typedef const SMICHDRHead DEF* PCSMICHDRHead;
653
654typedef struct tagSBEACONCtl {
655 DWORD BufReady : 1;
656 DWORD TSF : 15;
657 DWORD BufLen : 11;
658 DWORD Reserved : 5;
659}__attribute__ ((__packed__))
660SBEACONCtl;
661
662
663typedef struct tagSSecretKey {
664 DWORD dwLowDword;
665 BYTE byHighByte;
666}__attribute__ ((__packed__))
667SSecretKey;
668
669typedef 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__))
679SKeyEntry;
680/*--------------------- Export Macros ------------------------------*/
681
682/*--------------------- Export Classes ----------------------------*/
683
684/*--------------------- Export Variables --------------------------*/
685
686/*--------------------- Export Functions --------------------------*/
687
688
689
690
691#endif // __DESC_H__
692