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