2 ***************************************************************************
4 * 4F, No. 2 Technology 5th Rd.
5 * Science-based Industrial Park
6 * Hsin-chu, Taiwan, R.O.C.
8 * (c) Copyright 2002, Ralink Technology, Inc.
10 * All rights reserved. Ralink's source code is an unpublished work and the
11 * use of a copyright notice does not imply otherwise. This source code
12 * contains confidential trade secret material of Ralink Tech. Any attemp
13 * or participation in deciphering, decoding, reverse engineering or in any
14 * way altering the source code is stricitly prohibited, unless the prior
15 * written consent of Ralink Technology, Inc. is obtained.
16 ***************************************************************************
22 RT2560 ASIC related definition & structures
26 -------- ---------- ----------------------------------------------
34 // Control/Status Registers (CSR)
36 #define CSR0 0x0000 // ASIC revision number
37 #define CSR1 0x0004 // System control register
38 #define CSR2 0x0008 // System admin status register (invalid)
39 #define CSR3 0x000C // STA MAC address register 0
40 #define CSR4 0x0010 // STA MAC address register 1
41 #define CSR5 0x0014 // BSSID register 0
42 #define CSR6 0x0018 // BSSID register 1
43 #define CSR7 0x001C // Interrupt source register
44 #define CSR8 0x0020 // Interrupt mask register
45 #define CSR9 0x0024 // Maximum frame length register
46 #define CSR11 0x002C // Back-off control register
47 #define CSR12 0x0030 // Synchronization configuration register 0
48 #define CSR13 0x0034 // Synchronization configuration register 1
49 #define CSR14 0x0038 // Synchronization control register
50 #define CSR15 0x003C // Synchronization status register
51 #define CSR16 0x0040 // TSF timer register 0
52 #define CSR17 0x0044 // TSF timer register 1
53 #define CSR18 0x0048 // IFS timer register 0
54 #define CSR19 0x004C // IFS timer register 1
55 #define CSR20 0x0050 // WakeUp register
56 #define CSR21 0x0054 // EEPROM control register
57 #define CSR22 0x0058 // CFP Control Register
59 // Security coprocessor registers
60 #define SECCSR0 0x0028 // WEP control register
61 #define SECCSR1 0x0158 // WEP control register
62 #define SECCSR3 0x00fc // AES control register
64 // Transmit related CSRs
65 #define TXCSR0 0x0060 // TX cintrol register
66 #define TXCSR1 0x0064 // TX configuration register
67 #define TXCSR2 0x0068 // TX descriptor configuratioon register
68 #define TXCSR3 0x006C // TX Ring Base address register
69 #define TXCSR4 0x0070 // Atim Ring Base address register
70 #define TXCSR5 0x0074 // Prio Ring Base address register
71 #define TXCSR6 0x0078 // Beacon base address
72 #define TXCSR7 0x007C // AutoResponder Control Register
73 #define TXCSR8 0x0098 // CCK TX BBP registers
74 #define TXCSR9 0x0094 // OFDM TX BBP registers
76 // Receive related CSRs
77 #define RXCSR0 0x0080 // RX control register
78 #define RXCSR1 0x0084 // RX descriptorconfiguration register
79 #define RXCSR2 0x0088 // RX Ring base address register
80 #define RXCSR3 0x0090 // BBP ID register 0
81 //#define RXCSR4 0x0094 // BBP ID register 1
82 //#define ARCSR0 0x0098 // Auto responder PLCP config register 1
83 #define ARCSR1 0x009C // Auto responder PLCP config register 1
86 #define PCICSR 0x008C // PCI control register
89 // Alias to all ring base registers. Easier to understand constant definition
92 #define RX_RING_BASE_REG (RXCSR2)
93 #define TX_RING_BASE_REG (TXCSR3)
94 #define ATIM_RING_BASE_REG (TXCSR4)
95 #define PRIO_RING_BASE_REG (TXCSR5)
96 #define BEACON_BASE_REG (TXCSR6)
99 #define CNT0 0x00A0 // Dot11 FCS error count
100 #define CNT1 0x00AC // Dot11 PLCP error count
101 #define CNT2 0x00B0 // Dot11 long error count
102 #define CNT3 0x00B8 // Dot11 CCA false alarm count
103 #define CNT4 0x00BC // Dot11 Rx FIFO overflow count
104 #define CNT5 0x00C0 // Dot11 Tx FIFO underrun count
106 // Baseband Control Register
107 #define PWRCSR0 0x00C4
108 #define PSCSR0 0x00C8
109 #define PSCSR1 0x00CC
110 #define PSCSR2 0x00D0
111 #define PSCSR3 0x00D4
112 #define PWRCSR1 0x00D8
113 #define TIMECSR 0x00DC
114 #define MACCSR0 0x00E0
115 #define MACCSR1 0x00E4
116 #define RALINKCSR 0x00E8 // Ralink Auto-reset register
117 #define BCNCSR 0x00EC
119 // BBP/RF/IF Control Register
120 #define BBPCSR 0x00F0
122 #define LEDCSR 0x00F8
124 // ASIC pointer information
125 #define RXPTR 0x0100 // Current RX ring address
126 #define TXPTR 0x0104 // Current Tx ring address
127 #define PRIPTR 0x0108 // Current Priority ring address
128 #define ATIMPTR 0x010c // Current ATIM ring address
131 #define TXACKCSR0 0x0110 // TX ACK timeout
132 #define ACKCNT0 0x0114 // TX ACK timeout count
133 #define ACKCNT1 0x0118 // RX ACK timeout count
136 #define GPIOCSR 0x0120 // GPIO direction & in/out
137 #define FIFOCSR0 0x0128 // TX FIFO pointer
138 #define FIFOCSR1 0x012C // RX FIFO pointer
139 #define BCNCSR1 0x0130 // Tx BEACON offset time, unit: 1 usec
140 #define MACCSR2 0x0134 // TX_PE to RX_PE delay time, unit: 1 PCI clock cycle
141 #define TESTCSR 0x0138 // TEST mode selection register
143 #define PLCP1MCSR 0x013c // 1 Mbps ACK/CTS PLCP
144 #define PLCP2MCSR 0x0140 // 2 Mbps ACK/CTS PLCP
145 #define PLCP5MCSR 0x0144 // 5.5 Mbps ACK/CTS PLCP
146 #define PLCP11MCSR 0x0148 // 11 Mbps ACK/CTS PLCP
148 #define ARTCSR0 0x014c // ACK/CTS payload consumed time for 1/2/5.5/11 mbps
149 #define ARTCSR1 0x0150 // OFDM ACK/CTS payload consumed time for 6/9/12/18 mbps
150 #define ARTCSR2 0x0154 // OFDM ACK/CTS payload consumed time for 24/36/48/54 mbps
151 #define SECCSR1 0x0158 // security control register
152 #define BBPCSR1 0x015c // BBP TX configuration
154 #define DBANDCSR0 0x0160 // Dual band configuration register 0
155 #define DBANDCSR1 0x0164 // Dual band configuration register 1
156 #define BBPPCSR 0x0168 // BBP pin control register
157 #define DBGSEL0 0x016c // MAC special debug mode selection register 0
158 #define DBGSEL1 0x0170 // MAC special debug mode selection register 1
159 #define BISTCSR 0x0174 // BBP BIST register
161 #define MCAST0 0x0178 // multicast filter register 0
162 #define MCAST1 0x017c // multicast filter register 1
164 #define UARTCSR0 0x0180 // UART1 TX register
165 #define UARTCSR1 0x0184 // UART1 RX register
166 #define UARTCSR3 0x0188 // UART1 frame control register
167 #define UARTCSR4 0x018c // UART1 buffer control register
168 #define UART2CSR0 0x0190 // UART2 TX register
169 #define UART2CSR1 0x0194 // UART2 RX register
170 #define UART2CSR3 0x0198 // UART2 frame control register
171 #define UART2CSR4 0x019c // UART2 buffer control register
173 #define TIMECSR2 0x00a8
174 #define TIMECSR3 0x00b4
177 // Tx / Rx / Prio / Atim ring descriptor definition
179 #define DESC_OWN_HOST 0
180 #define DESC_OWN_NIC 1
181 #define DESC_VALID_TRUE 1
182 #define DESC_VALID_FALSE 0
185 // BBP & RF definition
190 #define BBP_Version 0x00
191 #define BBP_Tx_Configure 2 // R2
192 #define BBP_Tx_Tssi 1 // R1
193 #define BBP_Rx_Configure 14 // R14
195 #define PHY_TR_SWITCH_TIME 5 // usec
197 #define RT2560_VER_B 2
198 #define RT2560_VER_C 3
199 #define RT2560_VER_D 4
200 #define BBP_R17_LOW_SENSIBILITY 0x50
201 #define BBP_R17_MID_SENSIBILITY 0x41
202 #define BBP_R17_DYNAMIC_UP_BOUND 0x40
203 #define RSSI_FOR_LOW_SENSIBILITY -58
204 #define RSSI_FOR_MID_SENSIBILITY -74
205 //#define RSSI_HIGH_WATERMARK -53
206 //#define RSSI_LOW_WATERMARK -58
208 //-------------------------------------------------------------------------
210 //-------------------------------------------------------------------------
217 #define EEPROM_WRITE_OPCODE 0x05
218 #define EEPROM_READ_OPCODE 0x06
219 #define EEPROM_EWDS_OPCODE 0x10
220 #define EEPROM_EWEN_OPCODE 0x13
222 #define NUM_EEPROM_BBP_PARMS 19
223 #define NUM_EEPROM_TX_PARMS 7
224 #define EEPROM_BBP_BASE_OFFSET 0x20 // 0x16
225 #define EEPROM_TX_PWR_OFFSET 0x46 // 0x3c
226 #define EEPROM_TSSI_REF_OFFSET 0x54
227 #define EEPROM_TSSI_DELTA_OFFSET 0x24
228 #define EEPROM_VERSION_OFFSET 0x7e
229 #define VALID_EEPROM_VERSION 1
231 // =================================================================================
232 // TX / RX ring descriptor format
233 // =================================================================================
236 // TX descriptor format, Tx ring, Atim ring & Priority Ring
238 typedef struct _TXD_STRUC
{
242 ULONG Rsv1
:1; //RTS:1;
243 ULONG DataByteCnt
:12;
250 ULONG MoreFrag
:1; // More fragment following this tx ring
251 ULONG RetryCount
:3; // Retry result
252 ULONG TxResult
:3; // Filled by MAC ASIC
253 ULONG Valid
:1; // Entry valid bit
254 ULONG Owner
:1; // Descriptor owner bit
256 ULONG Owner
:1; // Descriptor owner bit
257 ULONG Valid
:1; // Entry valid bit
258 ULONG TxResult
:3; // Filled by MAC ASIC
259 ULONG RetryCount
:3; // Retry result
260 ULONG MoreFrag
:1; // More fragment following this tx ring
267 ULONG DataByteCnt
:12;
268 ULONG Rsv1
:1; //RTS:1;
273 ULONG BufferAddressPa
;
293 ULONG PlcpLengthLow
:8;
294 ULONG PlcpLengthHigh
:8;
305 // Word 10 - 11 Reserved, not necessary to put into the structure.
308 ULONG TxRate
:7; // for software use to track per-rate TX result, RATE_1, ...
312 ULONG TxRate
:7; // software use only. keep record of the Tx rate, RATE_1,...
315 } TXD_STRUC
, *PTXD_STRUC
;
318 // Rx descriptor format, Rx Ring
320 typedef struct _RXD_STRUC
{
324 ULONG Rsv1
:1; // Drop:1; // Drop this frame after NULL cipher operation
325 ULONG DataByteCnt
:12;
349 ULONG DataByteCnt
:12;
350 ULONG Rsv1
:1; // Drop:1; // Drop this frame after NULL cipher operation
355 ULONG BufferAddressPa
;
359 UCHAR BBR1
; // suppose to read back RSSI
371 // Word 10 - 11 Reserved, not necessary to put into the structure.
374 ULONG Drop
:1; // Drop this frame after NULL cipher operation
376 ULONG Drop
:1; // Drop this frame after NULL cipher operation
379 } RXD_STRUC
, *PRXD_STRUC
;
381 // =================================================================================
383 // =================================================================================
386 // CSR1: System control register
388 typedef union _CSR1_STRUC
{
392 ULONG HostReady
:1; // Host is ready after initialization, 1: ready
393 ULONG BbpReset
:1; // Hardware reset BBP
394 ULONG SoftReset
:1; // Software reset bit, 1: reset, 0: normal
396 ULONG SoftReset
:1; // Software reset bit, 1: reset, 0: normal
397 ULONG BbpReset
:1; // Hardware reset BBP
398 ULONG HostReady
:1; // Host is ready after initialization, 1: ready
403 } CSR1_STRUC
, *PCSR1_STRUC
;
406 // CSR3: STA MAC register 0
408 typedef union _CSR3_STRUC
{
411 UCHAR Byte3
; // MAC address byte 3
412 UCHAR Byte2
; // MAC address byte 2
413 UCHAR Byte1
; // MAC address byte 1
414 UCHAR Byte0
; // MAC address byte 0
416 UCHAR Byte0
; // MAC address byte 0
417 UCHAR Byte1
; // MAC address byte 1
418 UCHAR Byte2
; // MAC address byte 2
419 UCHAR Byte3
; // MAC address byte 3
423 } CSR3_STRUC
, *PCSR3_STRUC
;
426 // CSR4: STA MAC register 1
428 typedef union _CSR4_STRUC
{
433 UCHAR Byte5
; // MAC address byte 5
434 UCHAR Byte4
; // MAC address byte 4
436 UCHAR Byte4
; // MAC address byte 4
437 UCHAR Byte5
; // MAC address byte 5
443 } CSR4_STRUC
, *PCSR4_STRUC
;
446 // CSR5: BSSID register 0
448 typedef union _CSR5_STRUC
{
451 UCHAR Byte3
; // BSSID byte 3
452 UCHAR Byte2
; // BSSID byte 2
453 UCHAR Byte1
; // BSSID byte 1
454 UCHAR Byte0
; // BSSID byte 0
456 UCHAR Byte0
; // BSSID byte 0
457 UCHAR Byte1
; // BSSID byte 1
458 UCHAR Byte2
; // BSSID byte 2
459 UCHAR Byte3
; // BSSID byte 3
463 } CSR5_STRUC
, *PCSR5_STRUC
;
466 // CSR6: BSSID register 1
468 typedef union _CSR6_STRUC
{
473 UCHAR Byte5
; // BSSID byte 5
474 UCHAR Byte4
; // BSSID byte 4
476 UCHAR Byte4
; // BSSID byte 4
477 UCHAR Byte5
; // BSSID byte 5
483 } CSR6_STRUC
, *PCSR6_STRUC
;
486 // CSR7: Interrupt source register
487 // Write one to clear corresponding bit
489 typedef union _CSR7_STRUC
{
493 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
494 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
495 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
496 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
497 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
498 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
499 ULONG UartRxBufferError
:1; // UART1 RX buffer error
500 ULONG UartTxBufferError
:1; // UART1 TX buffer error
501 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
502 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
503 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
504 ULONG EncryptionDone
:1; // Encryption done interrupt
505 ULONG DecryptionDone
:1; // Decryption done interrupt
506 ULONG RxDone
:1; // Receive done interrupt
507 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt
508 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt
509 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt
510 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt
511 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt
512 ULONG TbcnExpire
:1; // Beacon timer expired interrupt
514 ULONG TbcnExpire
:1; // Beacon timer expired interrupt
515 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt
516 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt
517 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt
518 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt
519 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt
520 ULONG RxDone
:1; // Receive done interrupt
521 ULONG DecryptionDone
:1; // Decryption done interrupt
522 ULONG EncryptionDone
:1; // Encryption done interrupt
523 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
524 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
525 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
526 ULONG UartTxBufferError
:1; // UART1 TX buffer error
527 ULONG UartRxBufferError
:1; // UART1 RX buffer error
528 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
529 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
530 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
531 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
532 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
533 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
538 } CSR7_STRUC
, *PCSR7_STRUC
, INTSRC_STRUC
, *PINTSRC_STRUC
;
541 // CSR8: Interrupt Mask register
542 // Write one to mask off interrupt
544 typedef union _CSR8_STRUC
{
548 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
549 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
550 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
551 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
552 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
553 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
554 ULONG UartRxBufferError
:1; // UART1 RX buffer error
555 ULONG UartTxBufferError
:1; // UART1 TX buffer error
556 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
557 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
558 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
559 ULONG EncryptionDone
:1; // Encryption done interrupt
560 ULONG DecryptionDone
:1; // Decryption done interrupt
561 ULONG RxDone
:1; // Receive done interrupt mask
562 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt mask
563 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt mask
564 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt mask
565 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt mask
566 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt mask
567 ULONG TbcnExpire
:1; // Beacon timer expired interrupt mask
569 ULONG TbcnExpire
:1; // Beacon timer expired interrupt mask
570 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt mask
571 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt mask
572 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt mask
573 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt mask
574 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt mask
575 ULONG RxDone
:1; // Receive done interrupt mask
576 ULONG DecryptionDone
:1; // Decryption done interrupt
577 ULONG EncryptionDone
:1; // Encryption done interrupt
578 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
579 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
580 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
581 ULONG UartTxBufferError
:1; // UART1 TX buffer error
582 ULONG UartRxBufferError
:1; // UART1 RX buffer error
583 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
584 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
585 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
586 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
587 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
588 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
593 } CSR8_STRUC
, *PCSR8_STRUC
, INTMSK_STRUC
, *PINTMSK_STRUC
;
596 // CSR9: Maximum frame length register
598 typedef union _CSR9_STRUC
{
602 ULONG MaxFrameUnit
:5; // Maximum frame legth in 128B unit, default is 12 = 0xC.
606 ULONG MaxFrameUnit
:5; // Maximum frame legth in 128B unit, default is 12 = 0xC.
611 } CSR9_STRUC
, *PCSR9_STRUC
;
614 // SECCSR0: WEP control register
616 typedef union _SECCSR0_STRUC
{
619 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
620 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
621 ULONG KickDecypt
:1; // Kick decryption engine, self-clear
623 ULONG KickDecypt
:1; // Kick decryption engine, self-clear
624 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
625 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
629 } SECCSR0_STRUC
, *PSECCSR0_STRUC
;
632 // SECCSR1: WEP control register
634 typedef union _SECCSR1_STRUC
{
637 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
638 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
639 ULONG KickEncypt
:1; // Kick encryption engine, self-clear
641 ULONG KickEncypt
:1; // Kick encryption engine, self-clear
642 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
643 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
647 } SECCSR1_STRUC
, *PSECCSR1_STRUC
;
650 // CSR11: Back-Off control register
652 typedef union _CSR11_STRUC
{
655 ULONG ShortRetry
:8; // Short retry count
656 ULONG LongRetry
:8; // Long retry count
658 ULONG CWSelect
:1; // 1: CWmin/CWmax select from register, 0: select from TxD
659 ULONG SlotTime
:5; // Slot time, default is 20us for 802.11B
660 ULONG CWMax
:4; // Bit for Cwmax, default Cwmax is 1023 (2^10 - 1).
661 ULONG CWMin
:4; // Bit for Cwmin. default Cwmin is 31 (2^5 - 1).
663 ULONG CWMin
:4; // Bit for Cwmin. default Cwmin is 31 (2^5 - 1).
664 ULONG CWMax
:4; // Bit for Cwmax, default Cwmax is 1023 (2^10 - 1).
665 ULONG SlotTime
:5; // Slot time, default is 20us for 802.11B
666 ULONG CWSelect
:1; // 1: CWmin/Cwmax select from register, 0:select from TxD
668 ULONG LongRetry
:8; // Long retry count
669 ULONG ShortRetry
:8; // Short retry count
673 } CSR11_STRUC
, *PCSR11_STRUC
;
676 // CSR12: Synchronization configuration register 0
677 // All uint in 1/16 TU
679 typedef union _CSR12_STRUC
{
682 ULONG CfpMaxDuration
:16; // Beacon interval, default is 100 TU
683 ULONG BeaconInterval
:16; // CFP maximum duration, default is 100 TU
685 ULONG BeaconInterval
:16; // CFP maximum duration, default is 100 TU
686 ULONG CfpMaxDuration
:16; // Beacon interval, default is 100 TU
690 } CSR12_STRUC
, *PCSR12_STRUC
;
693 // CSR13: Synchronization configuration register 1
694 // All uint in 1/16 TU
696 typedef union _CSR13_STRUC
{
700 ULONG CfpPeriod
:8; // CFP period, default is 0 TU
701 ULONG AtimwDuration
:16; // ATIM window duration, default is 10 TU
703 ULONG AtimwDuration
:16; // ATIM window duration, default is 10 TU
704 ULONG CfpPeriod
:8; // CFP period, default is 0 TU
709 } CSR13_STRUC
, *PCSR13_STRUC
;
712 // CSR14: Synchronization control register
714 typedef union _CSR14_STRUC
{
717 ULONG TbcnPreload
:16; // Tbcn preload value
718 ULONG CfpCntPreload
:8; // Cfp count preload value
720 ULONG BeaconGen
:1; // Enable beacon generator
721 ULONG Tatimw
:1; // Enable Tatimw & ATIM window switching
722 ULONG Tcfp
:1; // Enable Tcfp & CFP / CP switching
723 ULONG Tbcn
:1; // Enable Tbcn with reload value
724 ULONG TsfSync
:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
725 ULONG TsfCount
:1; // Enable TSF auto counting
727 ULONG TsfCount
:1; // Enable TSF auto counting
728 ULONG TsfSync
:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
729 ULONG Tbcn
:1; // Enable Tbcn with reload value
730 ULONG Tcfp
:1; // Enable Tcfp & CFP / CP switching
731 ULONG Tatimw
:1; // Enable Tatimw & ATIM window switching
732 ULONG BeaconGen
:1; // Enable beacon generator
734 ULONG CfpCntPreload
:8; // Cfp count preload value
735 ULONG TbcnPreload
:16; // Tbcn preload value
739 } CSR14_STRUC
, *PCSR14_STRUC
;
742 // CSR15: Synchronization status register
744 typedef union _CSR15_STRUC
{
748 ULONG BeaconSent
:1; // Beacon sent
749 ULONG Atimw
:1; // Atim window period
750 ULONG Cfp
:1; // CFP period
752 ULONG Cfp
:1; // CFP period
753 ULONG Atimw
:1; // Atim window period
754 ULONG BeaconSent
:1; // Beacon sent
759 } CSR15_STRUC
, *PCSR15_STRUC
;
762 // CSR18: IFS Timer register 0
764 typedef union _CSR18_STRUC
{
768 ULONG PIFS
:9; // PIFS, default is 30 TU
770 ULONG SIFS
:9; // SIFS, default is 10 TU
772 ULONG SIFS
:9; // SIFS, default is 10 TU
774 ULONG PIFS
:9; // PIFS, default is 30 TU
779 } CSR18_STRUC
, *PCSR18_STRUC
;
782 // CSR19: IFS Timer register 1
784 typedef union _CSR19_STRUC
{
787 ULONG EIFS
:16; // EIFS, default is 364 TU
788 ULONG DIFS
:16; // DIFS, default is 50 TU
790 ULONG DIFS
:16; // DIFS, default is 50 TU
791 ULONG EIFS
:16; // EIFS, default is 364 TU
795 } CSR19_STRUC
, *PCSR19_STRUC
;
798 // CSR20: Wakeup timer register
800 typedef union _CSR20_STRUC
{
804 ULONG AutoWake
:1; // Enable auto wakeup / sleep mechanism
805 ULONG NumBcnBeforeWakeup
:8; // Number of beacon before wakeup
806 ULONG DelayAfterBcn
:16; // Delay after Tbcn expired in units of 1/16 TU
808 ULONG DelayAfterBcn
:16; // Delay after Tbcn expired in units of 1/16 TU
809 ULONG NumBcnBeforeWakeup
:8; // Number of beacon before wakeup
810 ULONG AutoWake
:1; // Enable auto wakeup / sleep mechanism
815 } CSR20_STRUC
, *PCSR20_STRUC
;
818 // CSR21: EEPROM control register
820 typedef union _CSR21_STRUC
{
824 ULONG Type
:1; // 1: 93C46, 0:93C66
829 ULONG Reload
:1; // Reload EEPROM content, write one to reload, self-cleared.
831 ULONG Reload
:1; // Reload EEPROM content, write one to reload, self-cleared.
836 ULONG Type
:1; // 1: 93C46, 0:93C66
841 } CSR21_STRUC
, *PCSR21_STRUC
;
844 // CSR22: CFP control register
846 typedef union _CSR22_STRUC
{
850 ULONG ReloadCfpDurRemain
:1; // Reload CFP duration remain, write one to reload, self-cleared
851 ULONG CfpDurRemain
:16; // CFP duration remain, in units of TU
853 ULONG CfpDurRemain
:16; // CFP duration remain, in units of TU
854 ULONG ReloadCfpDurRemain
:1; // Reload CFP duration remain, write one to reload, self-cleared
859 } CSR22_STRUC
, *PCSR22_STRUC
;
861 // =================================================================================
863 // =================================================================================
866 // TXCSR0 <0x0060> : TX Control Register
868 typedef union _TXCSR0_STRUC
{
872 ULONG Abort
:1; // Abort all transmit related ring operation
873 ULONG KickPrio
:1; // Kick priority ring
874 ULONG KickAtim
:1; // Kick ATIM ring
875 ULONG KickTx
:1; // Kick Tx ring
877 ULONG KickTx
:1; // Kick Tx ring
878 ULONG KickAtim
:1; // Kick ATIM ring
879 ULONG KickPrio
:1; // Kick priority ring
880 ULONG Abort
:1; // Abort all transmit related ring operation
885 } TXCSR0_STRUC
, *PTXCSR0_STRUC
;
888 // TXCSR1 <0x0064> : TX Configuration Register
890 typedef union _TXCSR1_STRUC
{
894 ULONG AutoResponder
:1; // enable auto responder which include ACK & CTS
895 ULONG TsFOffset
:6; // Insert Tsf offset
896 ULONG AckConsumeTime
:9; // ACK consume time, default = SIFS + ACKtime @ 1Mbps
897 ULONG AckTimeOut
:9; // Ack timeout, default = SIFS + 2*SLOT_ACKtime @ 1Mbps
899 ULONG AckTimeOut
:9; // Ack timeout, default = SIFS + 2*SLOT_ACKtime @ 1Mbps
900 ULONG AckConsumeTime
:9; // ACK consume time, default = SIFS + ACKtime @ 1Mbps
901 ULONG TsFOffset
:6; // Insert Tsf offset
902 ULONG AutoResponder
:1; // enable auto responder which include ACK & CTS
907 } TXCSR1_STRUC
, *PTXCSR1_STRUC
;
910 // TXCSR2: Tx descriptor configuration register
912 typedef union _TXCSR2_STRUC
{
915 ULONG NumPrioD
:8; // Number of PriorityD in ring
916 ULONG NumAtimD
:8; // Number of AtimD in ring
917 ULONG NumTxD
:8; // Number of TxD in ring
918 ULONG TxDSize
:8; // Tx descriptor size, default is 48
920 ULONG TxDSize
:8; // Tx descriptor size, default is 48
921 ULONG NumTxD
:8; // Number of TxD in ring
922 ULONG NumAtimD
:8; // Number of AtimD in ring
923 ULONG NumPrioD
:8; // Number of PriorityD in ring
927 } TXCSR2_STRUC
, *PTXCSR2_STRUC
;
930 // TXCSR7: Auto responder control register
932 typedef union _TXCSR7_STRUC
{
936 ULONG ARPowerManage
:1; // Auto responder power management bit
938 ULONG ARPowerManage
:1; // Auto responder power management bit
943 } TXCSR7_STRUC
, *PTXCSR7_STRUC
;
946 // TXCSR8: CCK Tx BBP register
948 typedef union _TXCSR8_STRUC
{
951 ULONG CckLenHigh
:8; // BBP length high byte address for CCK
952 ULONG CckLenLow
:8; // BBP length low byte address for CCK
953 ULONG CckService
:8; // BBP service field address for CCK
954 ULONG CckSignal
:8; // BBP signal field address for CCK
956 ULONG CckSignal
:8; // BBP signal field address for CCK
957 ULONG CckService
:8; // BBP service field address for CCK
958 ULONG CckLenLow
:8; // BBP length low byte address for CCK
959 ULONG CckLenHigh
:8; // BBP length high byte address for CCK
963 } TXCSR8_STRUC
, *PTXCSR8_STRUC
;
966 // TXCSR9: OFDM Tx BBP register
968 typedef union _TXCSR9_STRUC
{
971 ULONG OfdmLenHigh
:8; // BBP length high byte address for OFDM
972 ULONG OfdmLenLow
:8; // BBP length low byte address for OFDM
973 ULONG OfdmService
:8; // BBP service field address for OFDM
974 ULONG OfdmRate
:8; // BBP rate field address for OFDM
976 ULONG OfdmRate
:8; // BBP rate field address for OFDM
977 ULONG OfdmService
:8; // BBP service field address for OFDM
978 ULONG OfdmLenLow
:8; // BBP length low byte address for OFDM
979 ULONG OfdmLenHigh
:8; // BBP length high byte address for OFDM
983 } TXCSR9_STRUC
, *PTXCSR9_STRUC
;
986 // RXCSR0 <0x0080> : RX Control Register
988 typedef union _RXCSR0_STRUC
{
992 ULONG EnableQos
:1; // 1: accept QOS data frame format and parse the QOS field
993 ULONG DropBcast
:1; // Drop broadcast frames
994 ULONG DropMcast
:1; // Drop multicast frames
995 ULONG PassPlcp
:1; // Pass all receive packet with 4 bytes PLCP attached
996 ULONG PassCRC
:1; // Pass all receive packet to host with CRC attached
997 ULONG DropVersionErr
:1; // Drop version error frame
998 ULONG DropToDs
:1; // Drop fram ToDs bit is true
999 ULONG DropNotToMe
:1; // Drop not to me unicast frame
1000 ULONG DropControl
:1; // Drop control frame
1001 ULONG DropPhysical
:1; // Drop physical error
1002 ULONG DropCRC
:1; // Drop CRC error
1003 ULONG DisableRx
:1; // Disable Rx engine
1005 ULONG DisableRx
:1; // Disable Rx engine
1006 ULONG DropCRC
:1; // Drop CRC error
1007 ULONG DropPhysical
:1; // Drop physical error
1008 ULONG DropControl
:1; // Drop control frame
1009 ULONG DropNotToMe
:1; // Drop not to me unicast frame
1010 ULONG DropToDs
:1; // Drop fram ToDs bit is true
1011 ULONG DropVersionErr
:1; // Drop version error frame
1012 ULONG PassCRC
:1; // Pass all receive packet to host with CRC attached
1013 ULONG PassPlcp
:1; // Pass all receive packet with 4 bytes PLCP attached
1014 ULONG DropMcast
:1; // Drop multicast frames
1015 ULONG DropBcast
:1; // Drop broadcast frames
1016 ULONG EnableQos
:1; // 1: accept QOS data frame format and parse the QOS field
1021 } RXCSR0_STRUC
, *PRXCSR0_STRUC
;
1024 // RXCSR1: RX descriptor configuration register
1026 typedef union _RXCSR1_STRUC
{
1030 ULONG NumRxD
:8; // Number of RxD in ring.
1031 ULONG RxDSize
:8; // Rx descriptor size, default is 32B.
1033 ULONG RxDSize
:8; // Rx descriptor size, default is 32B.
1034 ULONG NumRxD
:8; // Number of RxD in ring.
1039 } RXCSR1_STRUC
, *PRXCSR1_STRUC
;
1042 // RXCSR3: BBP ID register for Rx operation
1044 typedef union _RXCSR3_STRUC
{
1047 ULONG ValidBbp3
:1; // BBP register 3 ID is valid or not
1048 ULONG IdBbp3
:7; // BBP register 3 ID
1049 ULONG ValidBbp2
:1; // BBP register 2 ID is valid or not
1050 ULONG IdBbp2
:7; // BBP register 2 ID
1051 ULONG ValidBbp1
:1; // BBP register 1 ID is valid or not
1052 ULONG IdBbp1
:7; // BBP register 1 ID
1053 ULONG ValidBbp0
:1; // BBP register 0 ID is valid or not
1054 ULONG IdBbp0
:7; // BBP register 0 ID
1056 ULONG IdBbp0
:7; // BBP register 0 ID
1057 ULONG ValidBbp0
:1; // BBP register 0 ID is valid or not
1058 ULONG IdBbp1
:7; // BBP register 1 ID
1059 ULONG ValidBbp1
:1; // BBP register 1 ID is valid or not
1060 ULONG IdBbp2
:7; // BBP register 2 ID
1061 ULONG ValidBbp2
:1; // BBP register 2 ID is valid or not
1062 ULONG IdBbp3
:7; // BBP register 3 ID
1063 ULONG ValidBbp3
:1; // BBP register 3 ID is valid or not
1067 } RXCSR3_STRUC
, *PRXCSR3_STRUC
;
1070 // RXCSR4: BBP ID register for Rx operation
1072 typedef union _RXCSR4_STRUC
{
1074 ULONG IdBbp4
:7; // BBP register 4 ID
1075 ULONG ValidBbp4
:1; // BBP register 4 ID is valid or not
1076 ULONG IdBbp5
:7; // BBP register 5 ID
1077 ULONG ValidBbp5
:1; // BBP register 5 ID is valid or not
1081 } RXCSR4_STRUC
, *PRXCSR4_STRUC
;
1084 // ARCSR0: Auto Responder PLCP value register 0
1086 typedef union _ARCSR0_STRUC
{
1088 ULONG ArBbpData0
:8; // Auto responder BBP register 0 data
1089 ULONG ArBbpId0
:8; // Auto responder BBP register 0 Id
1090 ULONG ArBbpData1
:8; // Auto responder BBP register 1 data
1091 ULONG ArBbpId1
:8; // Auto responder BBP register 1 Id
1094 } ARCSR0_STRUC
, *PARCSR0_STRUC
;
1097 // ARCSR0: Auto Responder PLCP value register 1
1099 typedef union _ARCSR1_STRUC
{
1101 ULONG ArBbpData2
:8; // Auto responder BBP register 2 data
1102 ULONG ArBbpId2
:8; // Auto responder BBP register 2 Id
1103 ULONG ArBbpData3
:8; // Auto responder BBP register 3 data
1104 ULONG ArBbpId3
:8; // Auto responder BBP register 3 Id
1107 } ARCSR1_STRUC
, *PARCSR1_STRUC
;
1109 // =================================================================================
1110 // Miscellaneous Registers
1111 // =================================================================================
1114 // PCISR: PCI control register
1116 typedef union _PCICSR_STRUC
{
1120 ULONG WriteInvalid
:1; // Enable memory write & invalid
1121 ULONG ReadMultiple
:1; // Enable memory read multiple
1122 ULONG EnableClk
:1; // Enable CLK_RUN, PCI clock can't going down to non-operational
1123 ULONG BurstLength
:2; // PCI burst length
1124 // 01: 8DW, 10: 16DW, 11:32DW, default 00: 4DW
1125 ULONG TxThreshold
:2; // Tx threshold in DW to start PCI access
1126 // 01: 1DW, 10: 4DW, 11: store & forward, default 00: 0DW
1127 ULONG RxThreshold
:2; // Rx threshold in DW to start PCI access
1128 // 01: 8DW, 10: 4DW, 11: 32DW, default 00: 16DW
1129 ULONG BigEndian
:1; // 1: big endian, 0: little endian
1131 ULONG BigEndian
:1; // 1: big endian, 0: little endian
1132 ULONG RxThreshold
:2; // Rx threshold in DW to start PCI access
1133 // 01: 8DW, 10: 4DW, 11: 32DW, default 00: 16DW
1134 ULONG TxThreshold
:2; // Tx threshold in DW to start PCI access
1135 // 01: 1DW, 10: 4DW, 11: store & forward, default 00: 0DW
1136 ULONG BurstLength
:2; // PCI burst length
1137 // 01: 8DW, 10: 16DW, 11:32DW, default 00: 4DW
1138 ULONG EnableClk
:1; // Enable CLK_RUN, PCI clock can't going down to non-operational
1139 ULONG ReadMultiple
:1; // Enable memory read multiple
1140 ULONG WriteInvalid
:1; // Enable memory write & invalid
1145 } PCICSR_STRUC
, *PPCICSR_STRUC
;
1148 // PWRCSR0: Power mode configuration register
1149 // Driver did not control it for now.
1152 // PSCSR0: Power saving delay time register 0
1153 // Driver did not control it for now.
1156 // PSCSR1: Power saving delay time register 1
1157 // Driver did not control it for now.
1160 // PSCSR2: Power saving delay time register 2
1161 // Driver did not control it for now.
1164 // PSCSR3: Power saving delay time register 3
1165 // Driver did not control it for now.
1168 // PWRCSR1: Manual power control / status register
1170 typedef union _PWRCSR1_STRUC
{
1175 ULONG RfCurrState
:2;
1176 ULONG BbpCurrState
:2;
1177 ULONG RfDesireState
:2;
1178 ULONG BbpDesireState
:2;
1182 ULONG BbpDesireState
:2;
1183 ULONG RfDesireState
:2;
1184 ULONG BbpCurrState
:2;
1185 ULONG RfCurrState
:2;
1191 } PWRCSR1_STRUC
, *PPWRCSR1_STRUC
;
1194 // TIMECSR: Timer control register
1196 typedef union _TIMECSR_STRUC
{
1200 ULONG BeaconExpect
:3; // Beacon expect window
1201 ULONG Us64Cnt
:8; // 64 us timer count in units of 1 us timer
1202 ULONG UsCnt
:8; // 1 us timer count in units of clock cycles
1204 ULONG UsCnt
:8; // 1 us timer count in units of clock cycles
1205 ULONG Us64Cnt
:8; // 64 us timer count in units of 1 us timer
1206 ULONG BeaconExpect
:3; // Beacon expect window
1211 } TIMECSR_STRUC
, *PTIMECSR_STRUC
;
1214 // MACCSR0: MAC configuration register 0
1218 // MACCSR1: MAC configuration register 1
1220 typedef union _MACCSR1_STRUC
{
1224 ULONG IntersilIF
:1; // Intersil IF calibration pin
1225 ULONG LoopBack
:2; // Loopback mode. 00: normal, 01: internal, 10: external, 11:rsvd.
1226 ULONG AutoRxBbp
:1; // Auto Rx logic access BBP control register
1227 ULONG AutoTxBbp
:1; // Auto Tx logic access BBP control register
1228 ULONG BbpRxResetMode
:1; // Ralink BBP RX reset mode
1229 ULONG OneShotRxMode
:1; // Enable one-shot Rx mode for debugging
1230 ULONG KickRx
:1; // Kick one-shot Rx in one-shot Rx mode
1232 ULONG KickRx
:1; // Kick one-shot Rx in one-shot Rx mode
1233 ULONG OneShotRxMode
:1; // Enable one-shot Rx mode for debugging
1234 ULONG BbpRxResetMode
:1; // Ralink BBP RX reset mode
1235 ULONG AutoTxBbp
:1; // Auto Tx logic access BBP control register
1236 ULONG AutoRxBbp
:1; // Auto Rx logic access BBP control register
1237 ULONG LoopBack
:2; // Loopback mode. 00: normal, 01: internal, 10: external, 11:rsvd.
1238 ULONG IntersilIF
:1; // Intersil IF calibration pin
1243 } MACCSR1_STRUC
, *PMACCSR1_STRUC
;
1246 // RALINKCSR: Ralink Rx auto-reset BBCR
1248 typedef union _RALINKCSR_STRUC
{
1251 ULONG ArBbpValid1
:1; // Auto reset BBP register 1 is valid
1252 ULONG ArBbpId1
:7; // Auto reset BBP register 1 Id
1253 ULONG ArBbpData1
:8; // Auto reset BBP register 1 data
1254 ULONG ArBbpValid0
:1; // Auto reset BBP register 0 is valid
1255 ULONG ArBbpId0
:7; // Auto reset BBP register 0 Id
1256 ULONG ArBbpData0
:8; // Auto reset BBP register 0 data
1258 ULONG ArBbpData0
:8; // Auto reset BBP register 0 data
1259 ULONG ArBbpId0
:7; // Auto reset BBP register 0 Id
1260 ULONG ArBbpValid0
:1; // Auto reset BBP register 0 is valid
1261 ULONG ArBbpData1
:8; // Auto reset BBP register 1 data
1262 ULONG ArBbpId1
:7; // Auto reset BBP register 1 Id
1263 ULONG ArBbpValid1
:1; // Auto reset BBP register 1 is valid
1267 } RALINKCSR_STRUC
, *PRALINKCSR_STRUC
;
1270 // BCNCSR: Beacon interval control register
1272 typedef union _BCNCSR_STRUC
{
1276 ULONG Plus
:1; // plus or minus delta time value
1277 ULONG Mode
:2; // please refer to ASIC specs.
1278 ULONG NumBcn
:8; // Delta time value or number of beacon according to mode
1279 ULONG DeltaTime
:4; // The delta time value
1280 ULONG Change
:1; // Write one to change beacon interval
1282 ULONG Change
:1; // Write one to change beacon interval
1283 ULONG DeltaTime
:4; // The delta time value
1284 ULONG NumBcn
:8; // Delta time value or number of beacon according to mode
1285 ULONG Mode
:2; // please refer to ASIC specs.
1286 ULONG Plus
:1; // plus or minus delta time value
1291 } BCNCSR_STRUC
, *PBCNCSR_STRUC
;
1294 // BBPCSR: BBP serial control register
1296 typedef union _BBPCSR_STRUC
{
1300 ULONG WriteControl
:1; // 1: Write BBP, 0: Read BBP
1301 ULONG Busy
:1; // 1: ASIC is busy execute BBP programming.
1302 ULONG RegNum
:7; // Selected BBP register
1303 ULONG Value
:8; // Register value to program into BBP
1305 ULONG Value
:8; // Register value to program into BBP
1306 ULONG RegNum
:7; // Selected BBP register
1307 ULONG Busy
:1; // 1: ASIC is busy execute BBP programming.
1308 ULONG WriteControl
:1; // 1: Write BBP, 0: Read BBP
1313 } BBPCSR_STRUC
, *PBBPCSR_STRUC
;
1316 // RFCSR: RF serial control register
1318 typedef union _RFCSR_STRUC
{
1321 ULONG Busy
:1; // 1: ASIC is busy execute RF programming.
1322 ULONG PLL_LD
:1; // RF PLL_LD status
1323 ULONG IFSelect
:1; // 1: select IF to program, 0: select RF to program
1324 ULONG NumberOfBits
:5; // Number of bits used in RFRegValue (I:20, RFMD:22)
1325 ULONG RFRegValue
:24; // Register value (include register id) serial out to RF/IF chip.
1327 ULONG RFRegValue
:24; // Register value (include register id) serial out to RF/IF chip.
1328 ULONG NumberOfBits
:5; // Number of bits used in RFRegValue (I:20, RFMD:22)
1329 ULONG IFSelect
:1; // 1: select IF to program, 0: select RF to program
1330 ULONG PLL_LD
:1; // RF PLL_LD status
1331 ULONG Busy
:1; // 1: ASIC is busy execute RF programming.
1335 } RFCSR_STRUC
, *PRFCSR_STRUC
;
1338 // LEDCSR: LED control register
1340 typedef union _LEDCSR_STRUC
{
1344 ULONG LedADefault
:1; // LED A default value for "enable" state. 0: LED ON, 1: LED OFF
1345 ULONG LedBPolarity
:1; // 0: active low, 1: active high
1346 ULONG LedAPolarity
:1; // 0: active low, 1: active high
1347 ULONG LedB
:1; // controlled by software, 1: ON, 0: OFF
1348 ULONG LedA
:1; // indicate TX activity, 1: enable, 0: disable
1349 ULONG OffPeriod
:8; // Off period, default 30ms
1350 ULONG OnPeriod
:8; // On period, default 70ms
1352 ULONG OnPeriod
:8; // On period, default 70ms
1353 ULONG OffPeriod
:8; // Off period, default 30ms
1354 ULONG LedA
:1; // indicate TX activity, 1: enable, 0: disable
1355 ULONG LedB
:1; // controlled by software, 1: ON, 0: OFF
1356 ULONG LedAPolarity
:1; // 0: active low, 1: active high
1357 ULONG LedBPolarity
:1; // 0: active low, 1: active high
1358 ULONG LedADefault
:1; // LED A default value for "enable" state. 0: LED ON, 1: LED OFF
1363 } LEDCSR_STRUC
, *PLEDCSR_STRUC
;
1366 // GPIOCSR: GPIO control register
1368 typedef union _GPIOCSR_STRUC
{
1409 } GPIOCSR_STRUC
, *PGPIOCSR_STRUC
;
1412 // BCNCSR1: Tx BEACON offset time control register
1414 typedef union _BCNCSR1_STRUC
{
1418 ULONG BeaconCwMin
:4; // 2^CwMin
1419 ULONG Preload
:16; // in units of usec
1421 ULONG Preload
:16; // in units of usec
1422 ULONG BeaconCwMin
:4; // 2^CwMin
1427 } BCNCSR1_STRUC
, *PBCNCSR1_STRUC
;
1430 // MACCSR2: TX_PE to RX_PE turn-around time control register
1432 typedef union _MACCSR2_STRUC
{
1436 ULONG Delay
:8; // in units of PCI clock cycle
1438 ULONG Delay
:8; // in units of PCI clock cycle
1443 } MACCSR2_STRUC
, *PMACCSR2_STRUC
;
1446 // EEPROM antenna select format
1448 typedef union _EEPROM_ANTENNA_STRUC
{
1451 USHORT RfType
:5; // see E2PROM document for RF IC selection
1452 USHORT HardwareRadioControl
:1; // 1: Hardware controlled radio enabled, Read GPIO0 required.
1453 USHORT DynamicTxAgcControl
:1;
1454 USHORT LedMode
:3; // 0-default mode, 1:TX/RX activity mode, 2: Single LED (didn't care about link), 3: reserved
1455 USHORT RxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1456 USHORT TxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1457 USHORT NumOfAntenna
:2; // Number of antenna
1459 USHORT NumOfAntenna
:2; // Number of antenna
1460 USHORT TxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1461 USHORT RxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1462 USHORT LedMode
:3; // 0-default mode, 1:TX/RX activity mode, 2: Single LED (didn't care about link), 3: reserved
1463 USHORT DynamicTxAgcControl
:1;
1464 USHORT HardwareRadioControl
:1; // 1: Hardware controlled radio enabled, Read GPIO0 required.
1465 USHORT RfType
:5; // see E2PROM document for RF IC selection
1469 } EEPROM_ANTENNA_STRUC
, *PEEPROM_ANTENNA_STRUC
;
1471 typedef union _EEPROM_NIC_CINFIG2_STRUC
{
1474 USHORT Rsv
:12; // must be 0
1475 USHORT CckTxPower
:2; // CCK TX power compensation
1476 USHORT DynamicBbpTuning
:1; // !!! NOTE: 0 - enable, 1 - disable
1477 USHORT CardbusAcceleration
:1; // !!! NOTE: 0 - enable, 1 - disable
1479 USHORT CardbusAcceleration
:1; // !!! NOTE: 0 - enable, 1 - disable
1480 USHORT DynamicBbpTuning
:1; // !!! NOTE: 0 - enable, 1 - disable
1481 USHORT CckTxPower
:2; // CCK TX power compensation
1482 USHORT Rsv
:12; // must be 0
1486 } EEPROM_NIC_CONFIG2_STRUC
, *PEEPROM_NIC_CONFIG2_STRUC
;
1488 typedef union _EEPROM_TX_PWR_STRUC
{
1491 UCHAR Byte1
; // High Byte
1492 UCHAR Byte0
; // Low Byte
1494 UCHAR Byte0
; // Low Byte
1495 UCHAR Byte1
; // High Byte
1499 } EEPROM_TX_PWR_STRUC
, *PEEPROM_TX_PWR_STRUC
;
1501 typedef union _EEPROM_VERSION_STRUC
{
1504 UCHAR Version
; // High Byte
1505 UCHAR FaeReleaseNumber
; // Low Byte
1507 UCHAR FaeReleaseNumber
; // Low Byte
1508 UCHAR Version
; // High Byte
1512 } EEPROM_VERSION_STRUC
, *PEEPROM_VERSION_STRUC
;
1514 #endif // __RT2560_H__