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_CALIBRATE_OFFSET 0x7c
229 #define EEPROM_VERSION_OFFSET 0x7e
230 #define VALID_EEPROM_VERSION 1
232 // =================================================================================
233 // TX / RX ring descriptor format
234 // =================================================================================
237 // TX descriptor format, Tx ring, Atim ring & Priority Ring
239 typedef struct _TXD_STRUC
{
243 ULONG Rsv1
:1; //RTS:1;
244 ULONG DataByteCnt
:12;
251 ULONG MoreFrag
:1; // More fragment following this tx ring
252 ULONG RetryCount
:3; // Retry result
253 ULONG TxResult
:3; // Filled by MAC ASIC
254 ULONG Valid
:1; // Entry valid bit
255 ULONG Owner
:1; // Descriptor owner bit
257 ULONG Owner
:1; // Descriptor owner bit
258 ULONG Valid
:1; // Entry valid bit
259 ULONG TxResult
:3; // Filled by MAC ASIC
260 ULONG RetryCount
:3; // Retry result
261 ULONG MoreFrag
:1; // More fragment following this tx ring
268 ULONG DataByteCnt
:12;
269 ULONG Rsv1
:1; //RTS:1;
274 ULONG BufferAddressPa
;
294 ULONG PlcpLengthLow
:8;
295 ULONG PlcpLengthHigh
:8;
306 // Word 10 - 11 Reserved, not necessary to put into the structure.
309 ULONG TxRate
:7; // for software use to track per-rate TX result, RATE_1, ...
313 ULONG TxRate
:7; // software use only. keep record of the Tx rate, RATE_1,...
316 } TXD_STRUC
, *PTXD_STRUC
;
319 // Rx descriptor format, Rx Ring
321 typedef struct _RXD_STRUC
{
325 ULONG Rsv1
:1; // Drop:1; // Drop this frame after NULL cipher operation
326 ULONG DataByteCnt
:12;
350 ULONG DataByteCnt
:12;
351 ULONG Rsv1
:1; // Drop:1; // Drop this frame after NULL cipher operation
356 ULONG BufferAddressPa
;
360 UCHAR BBR1
; // suppose to read back RSSI
372 // Word 10 - 11 Reserved, not necessary to put into the structure.
380 } RXD_STRUC
, *PRXD_STRUC
;
382 // =================================================================================
384 // =================================================================================
387 // CSR1: System control register
389 typedef union _CSR1_STRUC
{
393 ULONG HostReady
:1; // Host is ready after initialization, 1: ready
394 ULONG BbpReset
:1; // Hardware reset BBP
395 ULONG SoftReset
:1; // Software reset bit, 1: reset, 0: normal
397 ULONG SoftReset
:1; // Software reset bit, 1: reset, 0: normal
398 ULONG BbpReset
:1; // Hardware reset BBP
399 ULONG HostReady
:1; // Host is ready after initialization, 1: ready
404 } CSR1_STRUC
, *PCSR1_STRUC
;
407 // CSR3: STA MAC register 0
409 typedef union _CSR3_STRUC
{
412 UCHAR Byte3
; // MAC address byte 3
413 UCHAR Byte2
; // MAC address byte 2
414 UCHAR Byte1
; // MAC address byte 1
415 UCHAR Byte0
; // MAC address byte 0
417 UCHAR Byte0
; // MAC address byte 0
418 UCHAR Byte1
; // MAC address byte 1
419 UCHAR Byte2
; // MAC address byte 2
420 UCHAR Byte3
; // MAC address byte 3
424 } CSR3_STRUC
, *PCSR3_STRUC
;
427 // CSR4: STA MAC register 1
429 typedef union _CSR4_STRUC
{
434 UCHAR Byte5
; // MAC address byte 5
435 UCHAR Byte4
; // MAC address byte 4
437 UCHAR Byte4
; // MAC address byte 4
438 UCHAR Byte5
; // MAC address byte 5
444 } CSR4_STRUC
, *PCSR4_STRUC
;
447 // CSR5: BSSID register 0
449 typedef union _CSR5_STRUC
{
452 UCHAR Byte3
; // BSSID byte 3
453 UCHAR Byte2
; // BSSID byte 2
454 UCHAR Byte1
; // BSSID byte 1
455 UCHAR Byte0
; // BSSID byte 0
457 UCHAR Byte0
; // BSSID byte 0
458 UCHAR Byte1
; // BSSID byte 1
459 UCHAR Byte2
; // BSSID byte 2
460 UCHAR Byte3
; // BSSID byte 3
464 } CSR5_STRUC
, *PCSR5_STRUC
;
467 // CSR6: BSSID register 1
469 typedef union _CSR6_STRUC
{
474 UCHAR Byte5
; // BSSID byte 5
475 UCHAR Byte4
; // BSSID byte 4
477 UCHAR Byte4
; // BSSID byte 4
478 UCHAR Byte5
; // BSSID byte 5
484 } CSR6_STRUC
, *PCSR6_STRUC
;
487 // CSR7: Interrupt source register
488 // Write one to clear corresponding bit
490 typedef union _CSR7_STRUC
{
494 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
495 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
496 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
497 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
498 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
499 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
500 ULONG UartRxBufferError
:1; // UART1 RX buffer error
501 ULONG UartTxBufferError
:1; // UART1 TX buffer error
502 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
503 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
504 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
505 ULONG EncryptionDone
:1; // Encryption done interrupt
506 ULONG DecryptionDone
:1; // Decryption done interrupt
507 ULONG RxDone
:1; // Receive done interrupt
508 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt
509 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt
510 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt
511 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt
512 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt
513 ULONG TbcnExpire
:1; // Beacon timer expired interrupt
515 ULONG TbcnExpire
:1; // Beacon timer expired interrupt
516 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt
517 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt
518 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt
519 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt
520 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt
521 ULONG RxDone
:1; // Receive done interrupt
522 ULONG DecryptionDone
:1; // Decryption done interrupt
523 ULONG EncryptionDone
:1; // Encryption done interrupt
524 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
525 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
526 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
527 ULONG UartTxBufferError
:1; // UART1 TX buffer error
528 ULONG UartRxBufferError
:1; // UART1 RX buffer error
529 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
530 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
531 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
532 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
533 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
534 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
539 } CSR7_STRUC
, *PCSR7_STRUC
, INTSRC_STRUC
, *PINTSRC_STRUC
;
542 // CSR8: Interrupt Mask register
543 // Write one to mask off interrupt
545 typedef union _CSR8_STRUC
{
549 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
550 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
551 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
552 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
553 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
554 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
555 ULONG UartRxBufferError
:1; // UART1 RX buffer error
556 ULONG UartTxBufferError
:1; // UART1 TX buffer error
557 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
558 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
559 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
560 ULONG EncryptionDone
:1; // Encryption done interrupt
561 ULONG DecryptionDone
:1; // Decryption done interrupt
562 ULONG RxDone
:1; // Receive done interrupt mask
563 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt mask
564 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt mask
565 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt mask
566 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt mask
567 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt mask
568 ULONG TbcnExpire
:1; // Beacon timer expired interrupt mask
570 ULONG TbcnExpire
:1; // Beacon timer expired interrupt mask
571 ULONG TwakeExpire
:1; // Wakeup timer expired interrupt mask
572 ULONG TatimwExpire
:1; // Timer of atim window expired interrupt mask
573 ULONG TxRingTxDone
:1; // Tx ring transmit done interrupt mask
574 ULONG AtimRingTxDone
:1; // Atim ring transmit done interrupt mask
575 ULONG PrioRingTxDone
:1; // Priority ring transmit done interrupt mask
576 ULONG RxDone
:1; // Receive done interrupt mask
577 ULONG DecryptionDone
:1; // Decryption done interrupt
578 ULONG EncryptionDone
:1; // Encryption done interrupt
579 ULONG UartTxThreshold
:1; // UART1 TX reaches threshold
580 ULONG UartRxThreshold
:1; // UART1 RX reaches threshold
581 ULONG UartIdleThreshold
:1; // UART1 IDLE over threshold
582 ULONG UartTxBufferError
:1; // UART1 TX buffer error
583 ULONG UartRxBufferError
:1; // UART1 RX buffer error
584 ULONG Uart2TxThreshold
:1; // UART2 TX reaches threshold
585 ULONG Uart2RxThreshold
:1; // UART2 RX reaches threshold
586 ULONG Uart2IdleThreshold
:1; // UART2 IDLE over threshold
587 ULONG Uart2TxBufferError
:1; // UART2 TX buffer error
588 ULONG Uart2RxBufferError
:1; // UART2 RX buffer error
589 ULONG Timecsr3Expired
:1; // TIMECSR3 hardware timer expired (for 802.1H quiet period)
594 } CSR8_STRUC
, *PCSR8_STRUC
, INTMSK_STRUC
, *PINTMSK_STRUC
;
597 // CSR9: Maximum frame length register
599 typedef union _CSR9_STRUC
{
603 ULONG MaxFrameUnit
:5; // Maximum frame legth in 128B unit, default is 12 = 0xC.
607 ULONG MaxFrameUnit
:5; // Maximum frame legth in 128B unit, default is 12 = 0xC.
612 } CSR9_STRUC
, *PCSR9_STRUC
;
615 // SECCSR0: WEP control register
617 typedef union _SECCSR0_STRUC
{
620 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
621 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
622 ULONG KickDecypt
:1; // Kick decryption engine, self-clear
624 ULONG KickDecypt
:1; // Kick decryption engine, self-clear
625 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
626 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
630 } SECCSR0_STRUC
, *PSECCSR0_STRUC
;
633 // SECCSR1: WEP control register
635 typedef union _SECCSR1_STRUC
{
638 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
639 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
640 ULONG KickEncypt
:1; // Kick encryption engine, self-clear
642 ULONG KickEncypt
:1; // Kick encryption engine, self-clear
643 ULONG OneShotMode
:1; // 1: One shot only mode, 0: ring mode
644 ULONG DescAddress
:30; // Descriptor physical address of frame in one-shot-mode.
648 } SECCSR1_STRUC
, *PSECCSR1_STRUC
;
651 // CSR11: Back-Off control register
653 typedef union _CSR11_STRUC
{
656 ULONG ShortRetry
:8; // Short retry count
657 ULONG LongRetry
:8; // Long retry count
659 ULONG CWSelect
:1; // 1: CWmin/CWmax select from register, 0: select from TxD
660 ULONG SlotTime
:5; // Slot time, default is 20us for 802.11B
661 ULONG CWMax
:4; // Bit for Cwmax, default Cwmax is 1023 (2^10 - 1).
662 ULONG CWMin
:4; // Bit for Cwmin. default Cwmin is 31 (2^5 - 1).
664 ULONG CWMin
:4; // Bit for Cwmin. default Cwmin is 31 (2^5 - 1).
665 ULONG CWMax
:4; // Bit for Cwmax, default Cwmax is 1023 (2^10 - 1).
666 ULONG SlotTime
:5; // Slot time, default is 20us for 802.11B
667 ULONG CWSelect
:1; // 1: CWmin/Cwmax select from register, 0:select from TxD
669 ULONG LongRetry
:8; // Long retry count
670 ULONG ShortRetry
:8; // Short retry count
674 } CSR11_STRUC
, *PCSR11_STRUC
;
677 // CSR12: Synchronization configuration register 0
678 // All uint in 1/16 TU
680 typedef union _CSR12_STRUC
{
683 ULONG CfpMaxDuration
:16; // Beacon interval, default is 100 TU
684 ULONG BeaconInterval
:16; // CFP maximum duration, default is 100 TU
686 ULONG BeaconInterval
:16; // CFP maximum duration, default is 100 TU
687 ULONG CfpMaxDuration
:16; // Beacon interval, default is 100 TU
691 } CSR12_STRUC
, *PCSR12_STRUC
;
694 // CSR13: Synchronization configuration register 1
695 // All uint in 1/16 TU
697 typedef union _CSR13_STRUC
{
701 ULONG CfpPeriod
:8; // CFP period, default is 0 TU
702 ULONG AtimwDuration
:16; // ATIM window duration, default is 10 TU
704 ULONG AtimwDuration
:16; // ATIM window duration, default is 10 TU
705 ULONG CfpPeriod
:8; // CFP period, default is 0 TU
710 } CSR13_STRUC
, *PCSR13_STRUC
;
713 // CSR14: Synchronization control register
715 typedef union _CSR14_STRUC
{
718 ULONG TbcnPreload
:16; // Tbcn preload value
719 ULONG CfpCntPreload
:8; // Cfp count preload value
721 ULONG BeaconGen
:1; // Enable beacon generator
722 ULONG Tatimw
:1; // Enable Tatimw & ATIM window switching
723 ULONG Tcfp
:1; // Enable Tcfp & CFP / CP switching
724 ULONG Tbcn
:1; // Enable Tbcn with reload value
725 ULONG TsfSync
:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
726 ULONG TsfCount
:1; // Enable TSF auto counting
728 ULONG TsfCount
:1; // Enable TSF auto counting
729 ULONG TsfSync
:2; // Enable TSF sync, 00: disable, 01: infra mode, 10: ad-hoc mode
730 ULONG Tbcn
:1; // Enable Tbcn with reload value
731 ULONG Tcfp
:1; // Enable Tcfp & CFP / CP switching
732 ULONG Tatimw
:1; // Enable Tatimw & ATIM window switching
733 ULONG BeaconGen
:1; // Enable beacon generator
735 ULONG CfpCntPreload
:8; // Cfp count preload value
736 ULONG TbcnPreload
:16; // Tbcn preload value
740 } CSR14_STRUC
, *PCSR14_STRUC
;
743 // CSR15: Synchronization status register
745 typedef union _CSR15_STRUC
{
749 ULONG BeaconSent
:1; // Beacon sent
750 ULONG Atimw
:1; // Atim window period
751 ULONG Cfp
:1; // CFP period
753 ULONG Cfp
:1; // CFP period
754 ULONG Atimw
:1; // Atim window period
755 ULONG BeaconSent
:1; // Beacon sent
760 } CSR15_STRUC
, *PCSR15_STRUC
;
763 // CSR18: IFS Timer register 0
765 typedef union _CSR18_STRUC
{
769 ULONG PIFS
:9; // PIFS, default is 30 TU
771 ULONG SIFS
:9; // SIFS, default is 10 TU
773 ULONG SIFS
:9; // SIFS, default is 10 TU
775 ULONG PIFS
:9; // PIFS, default is 30 TU
780 } CSR18_STRUC
, *PCSR18_STRUC
;
783 // CSR19: IFS Timer register 1
785 typedef union _CSR19_STRUC
{
788 ULONG EIFS
:16; // EIFS, default is 364 TU
789 ULONG DIFS
:16; // DIFS, default is 50 TU
791 ULONG DIFS
:16; // DIFS, default is 50 TU
792 ULONG EIFS
:16; // EIFS, default is 364 TU
796 } CSR19_STRUC
, *PCSR19_STRUC
;
799 // CSR20: Wakeup timer register
801 typedef union _CSR20_STRUC
{
805 ULONG AutoWake
:1; // Enable auto wakeup / sleep mechanism
806 ULONG NumBcnBeforeWakeup
:8; // Number of beacon before wakeup
807 ULONG DelayAfterBcn
:16; // Delay after Tbcn expired in units of 1/16 TU
809 ULONG DelayAfterBcn
:16; // Delay after Tbcn expired in units of 1/16 TU
810 ULONG NumBcnBeforeWakeup
:8; // Number of beacon before wakeup
811 ULONG AutoWake
:1; // Enable auto wakeup / sleep mechanism
816 } CSR20_STRUC
, *PCSR20_STRUC
;
819 // CSR21: EEPROM control register
821 typedef union _CSR21_STRUC
{
825 ULONG Type
:1; // 1: 93C46, 0:93C66
830 ULONG Reload
:1; // Reload EEPROM content, write one to reload, self-cleared.
832 ULONG Reload
:1; // Reload EEPROM content, write one to reload, self-cleared.
837 ULONG Type
:1; // 1: 93C46, 0:93C66
842 } CSR21_STRUC
, *PCSR21_STRUC
;
845 // CSR22: CFP control register
847 typedef union _CSR22_STRUC
{
851 ULONG ReloadCfpDurRemain
:1; // Reload CFP duration remain, write one to reload, self-cleared
852 ULONG CfpDurRemain
:16; // CFP duration remain, in units of TU
854 ULONG CfpDurRemain
:16; // CFP duration remain, in units of TU
855 ULONG ReloadCfpDurRemain
:1; // Reload CFP duration remain, write one to reload, self-cleared
860 } CSR22_STRUC
, *PCSR22_STRUC
;
862 // =================================================================================
864 // =================================================================================
867 // TXCSR0 <0x0060> : TX Control Register
869 typedef union _TXCSR0_STRUC
{
873 ULONG Abort
:1; // Abort all transmit related ring operation
874 ULONG KickPrio
:1; // Kick priority ring
875 ULONG KickAtim
:1; // Kick ATIM ring
876 ULONG KickTx
:1; // Kick Tx ring
878 ULONG KickTx
:1; // Kick Tx ring
879 ULONG KickAtim
:1; // Kick ATIM ring
880 ULONG KickPrio
:1; // Kick priority ring
881 ULONG Abort
:1; // Abort all transmit related ring operation
886 } TXCSR0_STRUC
, *PTXCSR0_STRUC
;
889 // TXCSR1 <0x0064> : TX Configuration Register
891 typedef union _TXCSR1_STRUC
{
895 ULONG AutoResponder
:1; // enable auto responder which include ACK & CTS
896 ULONG TsFOffset
:6; // Insert Tsf offset
897 ULONG AckConsumeTime
:9; // ACK consume time, default = SIFS + ACKtime @ 1Mbps
898 ULONG AckTimeOut
:9; // Ack timeout, default = SIFS + 2*SLOT_ACKtime @ 1Mbps
900 ULONG AckTimeOut
:9; // Ack timeout, default = SIFS + 2*SLOT_ACKtime @ 1Mbps
901 ULONG AckConsumeTime
:9; // ACK consume time, default = SIFS + ACKtime @ 1Mbps
902 ULONG TsFOffset
:6; // Insert Tsf offset
903 ULONG AutoResponder
:1; // enable auto responder which include ACK & CTS
908 } TXCSR1_STRUC
, *PTXCSR1_STRUC
;
911 // TXCSR2: Tx descriptor configuration register
913 typedef union _TXCSR2_STRUC
{
916 ULONG NumPrioD
:8; // Number of PriorityD in ring
917 ULONG NumAtimD
:8; // Number of AtimD in ring
918 ULONG NumTxD
:8; // Number of TxD in ring
919 ULONG TxDSize
:8; // Tx descriptor size, default is 48
921 ULONG TxDSize
:8; // Tx descriptor size, default is 48
922 ULONG NumTxD
:8; // Number of TxD in ring
923 ULONG NumAtimD
:8; // Number of AtimD in ring
924 ULONG NumPrioD
:8; // Number of PriorityD in ring
928 } TXCSR2_STRUC
, *PTXCSR2_STRUC
;
931 // TXCSR7: Auto responder control register
933 typedef union _TXCSR7_STRUC
{
937 ULONG ARPowerManage
:1; // Auto responder power management bit
939 ULONG ARPowerManage
:1; // Auto responder power management bit
944 } TXCSR7_STRUC
, *PTXCSR7_STRUC
;
947 // TXCSR8: CCK Tx BBP register
949 typedef union _TXCSR8_STRUC
{
952 ULONG CckLenHigh
:8; // BBP length high byte address for CCK
953 ULONG CckLenLow
:8; // BBP length low byte address for CCK
954 ULONG CckService
:8; // BBP service field address for CCK
955 ULONG CckSignal
:8; // BBP signal field address for CCK
957 ULONG CckSignal
:8; // BBP signal field address for CCK
958 ULONG CckService
:8; // BBP service field address for CCK
959 ULONG CckLenLow
:8; // BBP length low byte address for CCK
960 ULONG CckLenHigh
:8; // BBP length high byte address for CCK
964 } TXCSR8_STRUC
, *PTXCSR8_STRUC
;
967 // TXCSR9: OFDM Tx BBP register
969 typedef union _TXCSR9_STRUC
{
972 ULONG OfdmLenHigh
:8; // BBP length high byte address for OFDM
973 ULONG OfdmLenLow
:8; // BBP length low byte address for OFDM
974 ULONG OfdmService
:8; // BBP service field address for OFDM
975 ULONG OfdmRate
:8; // BBP rate field address for OFDM
977 ULONG OfdmRate
:8; // BBP rate field address for OFDM
978 ULONG OfdmService
:8; // BBP service field address for OFDM
979 ULONG OfdmLenLow
:8; // BBP length low byte address for OFDM
980 ULONG OfdmLenHigh
:8; // BBP length high byte address for OFDM
984 } TXCSR9_STRUC
, *PTXCSR9_STRUC
;
987 // RXCSR0 <0x0080> : RX Control Register
989 typedef union _RXCSR0_STRUC
{
993 ULONG EnableQos
:1; // 1: accept QOS data frame format and parse the QOS field
994 ULONG DropBcast
:1; // Drop broadcast frames
995 ULONG DropMcast
:1; // Drop multicast frames
996 ULONG PassPlcp
:1; // Pass all receive packet with 4 bytes PLCP attached
997 ULONG PassCRC
:1; // Pass all receive packet to host with CRC attached
998 ULONG DropVersionErr
:1; // Drop version error frame
999 ULONG DropToDs
:1; // Drop fram ToDs bit is true
1000 ULONG DropNotToMe
:1; // Drop not to me unicast frame
1001 ULONG DropControl
:1; // Drop control frame
1002 ULONG DropPhysical
:1; // Drop physical error
1003 ULONG DropCRC
:1; // Drop CRC error
1004 ULONG DisableRx
:1; // Disable Rx engine
1006 ULONG DisableRx
:1; // Disable Rx engine
1007 ULONG DropCRC
:1; // Drop CRC error
1008 ULONG DropPhysical
:1; // Drop physical error
1009 ULONG DropControl
:1; // Drop control frame
1010 ULONG DropNotToMe
:1; // Drop not to me unicast frame
1011 ULONG DropToDs
:1; // Drop fram ToDs bit is true
1012 ULONG DropVersionErr
:1; // Drop version error frame
1013 ULONG PassCRC
:1; // Pass all receive packet to host with CRC attached
1014 ULONG PassPlcp
:1; // Pass all receive packet with 4 bytes PLCP attached
1015 ULONG DropMcast
:1; // Drop multicast frames
1016 ULONG DropBcast
:1; // Drop broadcast frames
1017 ULONG EnableQos
:1; // 1: accept QOS data frame format and parse the QOS field
1022 } RXCSR0_STRUC
, *PRXCSR0_STRUC
;
1025 // RXCSR1: RX descriptor configuration register
1027 typedef union _RXCSR1_STRUC
{
1031 ULONG NumRxD
:8; // Number of RxD in ring.
1032 ULONG RxDSize
:8; // Rx descriptor size, default is 32B.
1034 ULONG RxDSize
:8; // Rx descriptor size, default is 32B.
1035 ULONG NumRxD
:8; // Number of RxD in ring.
1040 } RXCSR1_STRUC
, *PRXCSR1_STRUC
;
1043 // RXCSR3: BBP ID register for Rx operation
1045 typedef union _RXCSR3_STRUC
{
1048 ULONG ValidBbp3
:1; // BBP register 3 ID is valid or not
1049 ULONG IdBbp3
:7; // BBP register 3 ID
1050 ULONG ValidBbp2
:1; // BBP register 2 ID is valid or not
1051 ULONG IdBbp2
:7; // BBP register 2 ID
1052 ULONG ValidBbp1
:1; // BBP register 1 ID is valid or not
1053 ULONG IdBbp1
:7; // BBP register 1 ID
1054 ULONG ValidBbp0
:1; // BBP register 0 ID is valid or not
1055 ULONG IdBbp0
:7; // BBP register 0 ID
1057 ULONG IdBbp0
:7; // BBP register 0 ID
1058 ULONG ValidBbp0
:1; // BBP register 0 ID is valid or not
1059 ULONG IdBbp1
:7; // BBP register 1 ID
1060 ULONG ValidBbp1
:1; // BBP register 1 ID is valid or not
1061 ULONG IdBbp2
:7; // BBP register 2 ID
1062 ULONG ValidBbp2
:1; // BBP register 2 ID is valid or not
1063 ULONG IdBbp3
:7; // BBP register 3 ID
1064 ULONG ValidBbp3
:1; // BBP register 3 ID is valid or not
1068 } RXCSR3_STRUC
, *PRXCSR3_STRUC
;
1071 // RXCSR4: BBP ID register for Rx operation
1073 typedef union _RXCSR4_STRUC
{
1075 ULONG IdBbp4
:7; // BBP register 4 ID
1076 ULONG ValidBbp4
:1; // BBP register 4 ID is valid or not
1077 ULONG IdBbp5
:7; // BBP register 5 ID
1078 ULONG ValidBbp5
:1; // BBP register 5 ID is valid or not
1082 } RXCSR4_STRUC
, *PRXCSR4_STRUC
;
1085 // ARCSR0: Auto Responder PLCP value register 0
1087 typedef union _ARCSR0_STRUC
{
1089 ULONG ArBbpData0
:8; // Auto responder BBP register 0 data
1090 ULONG ArBbpId0
:8; // Auto responder BBP register 0 Id
1091 ULONG ArBbpData1
:8; // Auto responder BBP register 1 data
1092 ULONG ArBbpId1
:8; // Auto responder BBP register 1 Id
1095 } ARCSR0_STRUC
, *PARCSR0_STRUC
;
1098 // ARCSR0: Auto Responder PLCP value register 1
1100 typedef union _ARCSR1_STRUC
{
1102 ULONG ArBbpData2
:8; // Auto responder BBP register 2 data
1103 ULONG ArBbpId2
:8; // Auto responder BBP register 2 Id
1104 ULONG ArBbpData3
:8; // Auto responder BBP register 3 data
1105 ULONG ArBbpId3
:8; // Auto responder BBP register 3 Id
1108 } ARCSR1_STRUC
, *PARCSR1_STRUC
;
1110 // =================================================================================
1111 // Miscellaneous Registers
1112 // =================================================================================
1115 // PCISR: PCI control register
1117 typedef union _PCICSR_STRUC
{
1121 ULONG WriteInvalid
:1; // Enable memory write & invalid
1122 ULONG ReadMultiple
:1; // Enable memory read multiple
1123 ULONG EnableClk
:1; // Enable CLK_RUN, PCI clock can't going down to non-operational
1124 ULONG BurstLength
:2; // PCI burst length
1125 // 01: 8DW, 10: 16DW, 11:32DW, default 00: 4DW
1126 ULONG TxThreshold
:2; // Tx threshold in DW to start PCI access
1127 // 01: 1DW, 10: 4DW, 11: store & forward, default 00: 0DW
1128 ULONG RxThreshold
:2; // Rx threshold in DW to start PCI access
1129 // 01: 8DW, 10: 4DW, 11: 32DW, default 00: 16DW
1130 ULONG BigEndian
:1; // 1: big endian, 0: little endian
1132 ULONG BigEndian
:1; // 1: big endian, 0: little endian
1133 ULONG RxThreshold
:2; // Rx threshold in DW to start PCI access
1134 // 01: 8DW, 10: 4DW, 11: 32DW, default 00: 16DW
1135 ULONG TxThreshold
:2; // Tx threshold in DW to start PCI access
1136 // 01: 1DW, 10: 4DW, 11: store & forward, default 00: 0DW
1137 ULONG BurstLength
:2; // PCI burst length
1138 // 01: 8DW, 10: 16DW, 11:32DW, default 00: 4DW
1139 ULONG EnableClk
:1; // Enable CLK_RUN, PCI clock can't going down to non-operational
1140 ULONG ReadMultiple
:1; // Enable memory read multiple
1141 ULONG WriteInvalid
:1; // Enable memory write & invalid
1146 } PCICSR_STRUC
, *PPCICSR_STRUC
;
1149 // PWRCSR0: Power mode configuration register
1150 // Driver did not control it for now.
1153 // PSCSR0: Power saving delay time register 0
1154 // Driver did not control it for now.
1157 // PSCSR1: Power saving delay time register 1
1158 // Driver did not control it for now.
1161 // PSCSR2: Power saving delay time register 2
1162 // Driver did not control it for now.
1165 // PSCSR3: Power saving delay time register 3
1166 // Driver did not control it for now.
1169 // PWRCSR1: Manual power control / status register
1171 typedef union _PWRCSR1_STRUC
{
1176 ULONG RfCurrState
:2;
1177 ULONG BbpCurrState
:2;
1178 ULONG RfDesireState
:2;
1179 ULONG BbpDesireState
:2;
1183 ULONG BbpDesireState
:2;
1184 ULONG RfDesireState
:2;
1185 ULONG BbpCurrState
:2;
1186 ULONG RfCurrState
:2;
1192 } PWRCSR1_STRUC
, *PPWRCSR1_STRUC
;
1195 // TIMECSR: Timer control register
1197 typedef union _TIMECSR_STRUC
{
1201 ULONG BeaconExpect
:3; // Beacon expect window
1202 ULONG Us64Cnt
:8; // 64 us timer count in units of 1 us timer
1203 ULONG UsCnt
:8; // 1 us timer count in units of clock cycles
1205 ULONG UsCnt
:8; // 1 us timer count in units of clock cycles
1206 ULONG Us64Cnt
:8; // 64 us timer count in units of 1 us timer
1207 ULONG BeaconExpect
:3; // Beacon expect window
1212 } TIMECSR_STRUC
, *PTIMECSR_STRUC
;
1215 // MACCSR0: MAC configuration register 0
1219 // MACCSR1: MAC configuration register 1
1221 typedef union _MACCSR1_STRUC
{
1225 ULONG IntersilIF
:1; // Intersil IF calibration pin
1226 ULONG LoopBack
:2; // Loopback mode. 00: normal, 01: internal, 10: external, 11:rsvd.
1227 ULONG AutoRxBbp
:1; // Auto Rx logic access BBP control register
1228 ULONG AutoTxBbp
:1; // Auto Tx logic access BBP control register
1229 ULONG BbpRxResetMode
:1; // Ralink BBP RX reset mode
1230 ULONG OneShotRxMode
:1; // Enable one-shot Rx mode for debugging
1231 ULONG KickRx
:1; // Kick one-shot Rx in one-shot Rx mode
1233 ULONG KickRx
:1; // Kick one-shot Rx in one-shot Rx mode
1234 ULONG OneShotRxMode
:1; // Enable one-shot Rx mode for debugging
1235 ULONG BbpRxResetMode
:1; // Ralink BBP RX reset mode
1236 ULONG AutoTxBbp
:1; // Auto Tx logic access BBP control register
1237 ULONG AutoRxBbp
:1; // Auto Rx logic access BBP control register
1238 ULONG LoopBack
:2; // Loopback mode. 00: normal, 01: internal, 10: external, 11:rsvd.
1239 ULONG IntersilIF
:1; // Intersil IF calibration pin
1244 } MACCSR1_STRUC
, *PMACCSR1_STRUC
;
1247 // RALINKCSR: Ralink Rx auto-reset BBCR
1249 typedef union _RALINKCSR_STRUC
{
1252 ULONG ArBbpValid1
:1; // Auto reset BBP register 1 is valid
1253 ULONG ArBbpId1
:7; // Auto reset BBP register 1 Id
1254 ULONG ArBbpData1
:8; // Auto reset BBP register 1 data
1255 ULONG ArBbpValid0
:1; // Auto reset BBP register 0 is valid
1256 ULONG ArBbpId0
:7; // Auto reset BBP register 0 Id
1257 ULONG ArBbpData0
:8; // Auto reset BBP register 0 data
1259 ULONG ArBbpData0
:8; // Auto reset BBP register 0 data
1260 ULONG ArBbpId0
:7; // Auto reset BBP register 0 Id
1261 ULONG ArBbpValid0
:1; // Auto reset BBP register 0 is valid
1262 ULONG ArBbpData1
:8; // Auto reset BBP register 1 data
1263 ULONG ArBbpId1
:7; // Auto reset BBP register 1 Id
1264 ULONG ArBbpValid1
:1; // Auto reset BBP register 1 is valid
1268 } RALINKCSR_STRUC
, *PRALINKCSR_STRUC
;
1271 // BCNCSR: Beacon interval control register
1273 typedef union _BCNCSR_STRUC
{
1277 ULONG Plus
:1; // plus or minus delta time value
1278 ULONG Mode
:2; // please refer to ASIC specs.
1279 ULONG NumBcn
:8; // Delta time value or number of beacon according to mode
1280 ULONG DeltaTime
:4; // The delta time value
1281 ULONG Change
:1; // Write one to change beacon interval
1283 ULONG Change
:1; // Write one to change beacon interval
1284 ULONG DeltaTime
:4; // The delta time value
1285 ULONG NumBcn
:8; // Delta time value or number of beacon according to mode
1286 ULONG Mode
:2; // please refer to ASIC specs.
1287 ULONG Plus
:1; // plus or minus delta time value
1292 } BCNCSR_STRUC
, *PBCNCSR_STRUC
;
1295 // BBPCSR: BBP serial control register
1297 typedef union _BBPCSR_STRUC
{
1301 ULONG WriteControl
:1; // 1: Write BBP, 0: Read BBP
1302 ULONG Busy
:1; // 1: ASIC is busy execute BBP programming.
1303 ULONG RegNum
:7; // Selected BBP register
1304 ULONG Value
:8; // Register value to program into BBP
1306 ULONG Value
:8; // Register value to program into BBP
1307 ULONG RegNum
:7; // Selected BBP register
1308 ULONG Busy
:1; // 1: ASIC is busy execute BBP programming.
1309 ULONG WriteControl
:1; // 1: Write BBP, 0: Read BBP
1314 } BBPCSR_STRUC
, *PBBPCSR_STRUC
;
1317 // RFCSR: RF serial control register
1319 typedef union _RFCSR_STRUC
{
1322 ULONG Busy
:1; // 1: ASIC is busy execute RF programming.
1323 ULONG PLL_LD
:1; // RF PLL_LD status
1324 ULONG IFSelect
:1; // 1: select IF to program, 0: select RF to program
1325 ULONG NumberOfBits
:5; // Number of bits used in RFRegValue (I:20, RFMD:22)
1326 ULONG RFRegValue
:24; // Register value (include register id) serial out to RF/IF chip.
1328 ULONG RFRegValue
:24; // Register value (include register id) serial out to RF/IF chip.
1329 ULONG NumberOfBits
:5; // Number of bits used in RFRegValue (I:20, RFMD:22)
1330 ULONG IFSelect
:1; // 1: select IF to program, 0: select RF to program
1331 ULONG PLL_LD
:1; // RF PLL_LD status
1332 ULONG Busy
:1; // 1: ASIC is busy execute RF programming.
1336 } RFCSR_STRUC
, *PRFCSR_STRUC
;
1339 // LEDCSR: LED control register
1341 typedef union _LEDCSR_STRUC
{
1345 ULONG LedADefault
:1; // LED A default value for "enable" state. 0: LED ON, 1: LED OFF
1346 ULONG LedBPolarity
:1; // 0: active low, 1: active high
1347 ULONG LedAPolarity
:1; // 0: active low, 1: active high
1348 ULONG LedB
:1; // controlled by software, 1: ON, 0: OFF
1349 ULONG LedA
:1; // indicate TX activity, 1: enable, 0: disable
1350 ULONG OffPeriod
:8; // Off period, default 30ms
1351 ULONG OnPeriod
:8; // On period, default 70ms
1353 ULONG OnPeriod
:8; // On period, default 70ms
1354 ULONG OffPeriod
:8; // Off period, default 30ms
1355 ULONG LedA
:1; // indicate TX activity, 1: enable, 0: disable
1356 ULONG LedB
:1; // controlled by software, 1: ON, 0: OFF
1357 ULONG LedAPolarity
:1; // 0: active low, 1: active high
1358 ULONG LedBPolarity
:1; // 0: active low, 1: active high
1359 ULONG LedADefault
:1; // LED A default value for "enable" state. 0: LED ON, 1: LED OFF
1364 } LEDCSR_STRUC
, *PLEDCSR_STRUC
;
1367 // GPIOCSR: GPIO control register
1369 typedef union _GPIOCSR_STRUC
{
1410 } GPIOCSR_STRUC
, *PGPIOCSR_STRUC
;
1413 // BCNCSR1: Tx BEACON offset time control register
1415 typedef union _BCNCSR1_STRUC
{
1419 ULONG BeaconCwMin
:4; // 2^CwMin
1420 ULONG Preload
:16; // in units of usec
1422 ULONG Preload
:16; // in units of usec
1423 ULONG BeaconCwMin
:4; // 2^CwMin
1428 } BCNCSR1_STRUC
, *PBCNCSR1_STRUC
;
1431 // MACCSR2: TX_PE to RX_PE turn-around time control register
1433 typedef union _MACCSR2_STRUC
{
1437 ULONG Delay
:8; // in units of PCI clock cycle
1439 ULONG Delay
:8; // in units of PCI clock cycle
1444 } MACCSR2_STRUC
, *PMACCSR2_STRUC
;
1447 // EEPROM antenna select format
1449 typedef union _EEPROM_ANTENNA_STRUC
{
1452 USHORT RfType
:5; // see E2PROM document for RF IC selection
1453 USHORT HardwareRadioControl
:1; // 1: Hardware controlled radio enabled, Read GPIO0 required.
1454 USHORT DynamicTxAgcControl
:1;
1455 USHORT LedMode
:3; // 0-default mode, 1:TX/RX activity mode, 2: Single LED (didn't care about link), 3: reserved
1456 USHORT RxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1457 USHORT TxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1458 USHORT NumOfAntenna
:2; // Number of antenna
1460 USHORT NumOfAntenna
:2; // Number of antenna
1461 USHORT TxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1462 USHORT RxDefaultAntenna
:2; // default of antenna, 0: diversity, 1:antenna-A, 2:antenna-B reserved (default = 0)
1463 USHORT LedMode
:3; // 0-default mode, 1:TX/RX activity mode, 2: Single LED (didn't care about link), 3: reserved
1464 USHORT DynamicTxAgcControl
:1;
1465 USHORT HardwareRadioControl
:1; // 1: Hardware controlled radio enabled, Read GPIO0 required.
1466 USHORT RfType
:5; // see E2PROM document for RF IC selection
1470 } EEPROM_ANTENNA_STRUC
, *PEEPROM_ANTENNA_STRUC
;
1472 typedef union _EEPROM_NIC_CINFIG2_STRUC
{
1475 USHORT Rsv
:12; // must be 0
1476 USHORT CckTxPower
:2; // CCK TX power compensation
1477 USHORT DynamicBbpTuning
:1; // !!! NOTE: 0 - enable, 1 - disable
1478 USHORT CardbusAcceleration
:1; // !!! NOTE: 0 - enable, 1 - disable
1480 USHORT CardbusAcceleration
:1; // !!! NOTE: 0 - enable, 1 - disable
1481 USHORT DynamicBbpTuning
:1; // !!! NOTE: 0 - enable, 1 - disable
1482 USHORT CckTxPower
:2; // CCK TX power compensation
1483 USHORT Rsv
:12; // must be 0
1487 } EEPROM_NIC_CONFIG2_STRUC
, *PEEPROM_NIC_CONFIG2_STRUC
;
1489 typedef union _EEPROM_TX_PWR_STRUC
{
1492 UCHAR Byte1
; // High Byte
1493 UCHAR Byte0
; // Low Byte
1495 UCHAR Byte0
; // Low Byte
1496 UCHAR Byte1
; // High Byte
1500 } EEPROM_TX_PWR_STRUC
, *PEEPROM_TX_PWR_STRUC
;
1502 typedef union _EEPROM_VERSION_STRUC
{
1505 UCHAR Version
; // High Byte
1506 UCHAR FaeReleaseNumber
; // Low Byte
1508 UCHAR FaeReleaseNumber
; // Low Byte
1509 UCHAR Version
; // High Byte
1513 } EEPROM_VERSION_STRUC
, *PEEPROM_VERSION_STRUC
;
1515 #endif // __RT2560_H__