#ifndef _DEV_ATH_AR5212REG_H_
#define _DEV_ATH_AR5212REG_H_
#define AR_CR 0x0008
#define AR_RXDP 0x000C
#define AR_CFG 0x0014
#define AR_IER 0x0024
#define AR_TXCFG 0x0030
#define AR_RXCFG 0x0034
#define AR_MIBC 0x0040
#define AR_TOPS 0x0044
#define AR_RXNPTO 0x0048
#define AR_TXNPTO 0x004C
#define AR_RPGTO 0x0050
#define AR_RPCNT 0x0054
#define AR_MACMISC 0x0058
#define AR_SPC_0 0x005c
#define AR_SPC_1 0x0060
#define AR_ISR 0x0080
#define AR_ISR_S0 0x0084
#define AR_ISR_S1 0x0088
#define AR_ISR_S2 0x008c
#define AR_ISR_S3 0x0090
#define AR_ISR_S4 0x0094
#define AR_IMR 0x00a0
#define AR_IMR_S0 0x00a4
#define AR_IMR_S1 0x00a8
#define AR_IMR_S2 0x00ac
#define AR_IMR_S3 0x00b0
#define AR_IMR_S4 0x00b4
#define AR_ISR_RAC 0x00c0
#define AR_ISR_S0_S 0x00c4
#define AR_ISR_S1_S 0x00c8
#define AR_ISR_S2_S 0x00cc
#define AR_ISR_S3_S 0x00d0
#define AR_ISR_S4_S 0x00d4
#define AR_DMADBG_0 0x00e0
#define AR_DMADBG_1 0x00e4
#define AR_DMADBG_2 0x00e8
#define AR_DMADBG_3 0x00ec
#define AR_DMADBG_4 0x00f0
#define AR_DMADBG_5 0x00f4
#define AR_DMADBG_6 0x00f8
#define AR_DMADBG_7 0x00fc
#define AR_DCM_A 0x0400
#define AR_DCM_D 0x0404
#define AR_DCCFG 0x0420
#define AR_CCFG 0x0600
#define AR_CCUCFG 0x0604
#define AR_CPC_0 0x0610
#define AR_CPC_1 0x0614
#define AR_CPC_2 0x0618
#define AR_CPC_3 0x061c
#define AR_CPCOVF 0x0620
#define AR_Q0_TXDP 0x0800
#define AR_Q1_TXDP 0x0804
#define AR_Q2_TXDP 0x0808
#define AR_Q3_TXDP 0x080c
#define AR_Q4_TXDP 0x0810
#define AR_Q5_TXDP 0x0814
#define AR_Q6_TXDP 0x0818
#define AR_Q7_TXDP 0x081c
#define AR_Q8_TXDP 0x0820
#define AR_Q9_TXDP 0x0824
#define AR_QTXDP(_i) (AR_Q0_TXDP + ((_i)<<2))
#define AR_Q_TXE 0x0840
#define AR_Q_TXE_M 0x000003FF
#define AR_Q_TXD 0x0880
#define AR_Q_TXD_M 0x000003FF
#define AR_Q0_CBRCFG 0x08c0
#define AR_Q1_CBRCFG 0x08c4
#define AR_Q2_CBRCFG 0x08c8
#define AR_Q3_CBRCFG 0x08cc
#define AR_Q4_CBRCFG 0x08d0
#define AR_Q5_CBRCFG 0x08d4
#define AR_Q6_CBRCFG 0x08d8
#define AR_Q7_CBRCFG 0x08dc
#define AR_Q8_CBRCFG 0x08e0
#define AR_Q9_CBRCFG 0x08e4
#define AR_QCBRCFG(_i) (AR_Q0_CBRCFG + ((_i)<<2))
#define AR_Q0_RDYTIMECFG 0x0900
#define AR_Q1_RDYTIMECFG 0x0904
#define AR_Q2_RDYTIMECFG 0x0908
#define AR_Q3_RDYTIMECFG 0x090c
#define AR_Q4_RDYTIMECFG 0x0910
#define AR_Q5_RDYTIMECFG 0x0914
#define AR_Q6_RDYTIMECFG 0x0918
#define AR_Q7_RDYTIMECFG 0x091c
#define AR_Q8_RDYTIMECFG 0x0920
#define AR_Q9_RDYTIMECFG 0x0924
#define AR_QRDYTIMECFG(_i) (AR_Q0_RDYTIMECFG + ((_i)<<2))
#define AR_Q_ONESHOTARM_SC 0x0940
#define AR_Q_ONESHOTARM_CC 0x0980
#define AR_Q0_MISC 0x09c0
#define AR_Q1_MISC 0x09c4
#define AR_Q2_MISC 0x09c8
#define AR_Q3_MISC 0x09cc
#define AR_Q4_MISC 0x09d0
#define AR_Q5_MISC 0x09d4
#define AR_Q6_MISC 0x09d8
#define AR_Q7_MISC 0x09dc
#define AR_Q8_MISC 0x09e0
#define AR_Q9_MISC 0x09e4
#define AR_QMISC(_i) (AR_Q0_MISC + ((_i)<<2))
#define AR_Q0_STS 0x0a00
#define AR_Q1_STS 0x0a04
#define AR_Q2_STS 0x0a08
#define AR_Q3_STS 0x0a0c
#define AR_Q4_STS 0x0a10
#define AR_Q5_STS 0x0a14
#define AR_Q6_STS 0x0a18
#define AR_Q7_STS 0x0a1c
#define AR_Q8_STS 0x0a20
#define AR_Q9_STS 0x0a24
#define AR_QSTS(_i) (AR_Q0_STS + ((_i)<<2))
#define AR_Q_RDYTIMESHDN 0x0a40
#define AR_Q_CBBS 0xb00
#define AR_Q_CBBA 0xb04
#define AR_Q_CBC 0xb08
#define AR_D0_QCUMASK 0x1000
#define AR_D1_QCUMASK 0x1004
#define AR_D2_QCUMASK 0x1008
#define AR_D3_QCUMASK 0x100c
#define AR_D4_QCUMASK 0x1010
#define AR_D5_QCUMASK 0x1014
#define AR_D6_QCUMASK 0x1018
#define AR_D7_QCUMASK 0x101c
#define AR_D8_QCUMASK 0x1020
#define AR_D9_QCUMASK 0x1024
#define AR_DQCUMASK(_i) (AR_D0_QCUMASK + ((_i)<<2))
#define AR_D0_LCL_IFS 0x1040
#define AR_D1_LCL_IFS 0x1044
#define AR_D2_LCL_IFS 0x1048
#define AR_D3_LCL_IFS 0x104c
#define AR_D4_LCL_IFS 0x1050
#define AR_D5_LCL_IFS 0x1054
#define AR_D6_LCL_IFS 0x1058
#define AR_D7_LCL_IFS 0x105c
#define AR_D8_LCL_IFS 0x1060
#define AR_D9_LCL_IFS 0x1064
#define AR_DLCL_IFS(_i) (AR_D0_LCL_IFS + ((_i)<<2))
#define AR_D0_RETRY_LIMIT 0x1080
#define AR_D1_RETRY_LIMIT 0x1084
#define AR_D2_RETRY_LIMIT 0x1088
#define AR_D3_RETRY_LIMIT 0x108c
#define AR_D4_RETRY_LIMIT 0x1090
#define AR_D5_RETRY_LIMIT 0x1094
#define AR_D6_RETRY_LIMIT 0x1098
#define AR_D7_RETRY_LIMIT 0x109c
#define AR_D8_RETRY_LIMIT 0x10a0
#define AR_D9_RETRY_LIMIT 0x10a4
#define AR_DRETRY_LIMIT(_i) (AR_D0_RETRY_LIMIT + ((_i)<<2))
#define AR_D0_CHNTIME 0x10c0
#define AR_D1_CHNTIME 0x10c4
#define AR_D2_CHNTIME 0x10c8
#define AR_D3_CHNTIME 0x10cc
#define AR_D4_CHNTIME 0x10d0
#define AR_D5_CHNTIME 0x10d4
#define AR_D6_CHNTIME 0x10d8
#define AR_D7_CHNTIME 0x10dc
#define AR_D8_CHNTIME 0x10e0
#define AR_D9_CHNTIME 0x10e4
#define AR_DCHNTIME(_i) (AR_D0_CHNTIME + ((_i)<<2))
#define AR_D0_MISC 0x1100
#define AR_D1_MISC 0x1104
#define AR_D2_MISC 0x1108
#define AR_D3_MISC 0x110c
#define AR_D4_MISC 0x1110
#define AR_D5_MISC 0x1114
#define AR_D6_MISC 0x1118
#define AR_D7_MISC 0x111c
#define AR_D8_MISC 0x1120
#define AR_D9_MISC 0x1124
#define AR_DMISC(_i) (AR_D0_MISC + ((_i)<<2))
#define AR_D_SEQNUM 0x1140
#define AR_D_GBL_IFS_SIFS 0x1030
#define AR_D_GBL_IFS_SLOT 0x1070
#define AR_D_GBL_IFS_EIFS 0x10b0
#define AR_D_GBL_IFS_MISC 0x10f0
#define AR_D_FPCTL 0x1230
#define AR_D_TXPSE 0x1270
#define AR_D_TXBLK_CMD 0x1038
#define AR_D_TXBLK_DATA(i) (AR_D_TXBLK_CMD+(i))
#define AR_D_TXBLK_CLR 0x143c
#define AR_D_TXBLK_SET 0x147c
#define AR_RC 0x4000
#define AR_SCR 0x4004
#define AR_INTPEND 0x4008
#define AR_SFR 0x400C
#define AR_PCICFG 0x4010
#define AR_GPIOCR 0x4014
#define AR_GPIODO 0x4018
#define AR_GPIODI 0x401C
#define AR_SREV 0x4020
#define AR_TXEPOST 0x4028
#define AR_QSM 0x402C
#define AR_PCIE_PMC 0x4068
#define AR_PCIE_SERDES 0x4080
#define AR_PCIE_SERDES2 0x4084
#define AR_EEPROM_ADDR 0x6000
#define AR_EEPROM_DATA 0x6004
#define AR_EEPROM_CMD 0x6008
#define AR_EEPROM_STS 0x600c
#define AR_EEPROM_CFG 0x6010
#define AR_STA_ID0 0x8000
#define AR_STA_ID1 0x8004
#define AR_BSS_ID0 0x8008
#define AR_BSS_ID1 0x800C
#define AR_SLOT_TIME 0x8010
#define AR_TIME_OUT 0x8014
#define AR_RSSI_THR 0x8018
#define AR_USEC 0x801c
#define AR_BEACON 0x8020
#define AR_CFP_PERIOD 0x8024
#define AR_TIMER0 0x8028
#define AR_TIMER1 0x802c
#define AR_TIMER2 0x8030
#define AR_TIMER3 0x8034
#define AR_CFP_DUR 0x8038
#define AR_RX_FILTER 0x803C
#define AR_MCAST_FIL0 0x8040
#define AR_MCAST_FIL1 0x8044
#define AR_DIAG_SW 0x8048
#define AR_TSF_L32 0x804c
#define AR_TSF_U32 0x8050
#define AR_TST_ADDAC 0x8054
#define AR_DEF_ANTENNA 0x8058
#define AR_QOS_MASK 0x805c
#define AR_SEQ_MASK 0x8060
#define AR_OBSERV_2 0x8068
#define AR_OBSERV_1 0x806c
#define AR_LAST_TSTP 0x8080
#define AR_NAV 0x8084
#define AR_RTS_OK 0x8088
#define AR_RTS_FAIL 0x808c
#define AR_ACK_FAIL 0x8090
#define AR_FCS_FAIL 0x8094
#define AR_BEACON_CNT 0x8098
#define AR_SLEEP1 0x80d4
#define AR_SLEEP2 0x80d8
#define AR_SLEEP3 0x80dc
#define AR_BSSMSKL 0x80e0
#define AR_BSSMSKU 0x80e4
#define AR_TPC 0x80e8
#define AR_TFCNT 0x80ec
#define AR_RFCNT 0x80f0
#define AR_RCCNT 0x80f4
#define AR_CCCNT 0x80f8
#define AR_QUIET1 0x80fc
#define AR_QUIET1_NEXT_QUIET_S 0
#define AR_QUIET1_NEXT_QUIET 0xffff
#define AR_QUIET1_QUIET_ENABLE 0x10000
#define AR_QUIET1_QUIET_ACK_CTS_ENABLE 0x20000
#define AR_QUIET1_QUIET_ACK_CTS_ENABLE_S 17
#define AR_QUIET2 0x8100
#define AR_QUIET2_QUIET_PER_S 0
#define AR_QUIET2_QUIET_PER 0xffff
#define AR_QUIET2_QUIET_DUR_S 16
#define AR_QUIET2_QUIET_DUR 0xffff0000
#define AR_TSF_PARM 0x8104
#define AR_NOACK 0x8108
#define AR_PHY_ERR 0x810c
#define AR_QOS_CONTROL 0x8118
#define AR_QOS_SELECT 0x811c
#define AR_MISC_MODE 0x8120
#define AR_FILTOFDM 0x8124
#define AR_FILTCCK 0x8128
#define AR_PHYCNT1 0x812c
#define AR_PHYCNTMASK1 0x8130
#define AR_PHYCNT2 0x8134
#define AR_PHYCNTMASK2 0x8138
#define AR_PHY_COUNTMAX (3 << 22)
#define AR_MIBCNT_INTRMASK (3<<22)
#define AR_RATE_DURATION_0 0x8700
#define AR_RATE_DURATION(_n) (AR_RATE_DURATION_0 + ((_n)<<2))
#define AR_KEYTABLE_0 0x8800
#define AR_KEYTABLE(_n) (AR_KEYTABLE_0 + ((_n)*32))
#define AR_CFP_MASK 0x0000ffff
#define AR_CR_RXE 0x00000004
#define AR_CR_RXD 0x00000020
#define AR_CR_SWI 0x00000040
#define AR_CFG_SWTD 0x00000001
#define AR_CFG_SWTB 0x00000002
#define AR_CFG_SWRD 0x00000004
#define AR_CFG_SWRB 0x00000008
#define AR_CFG_SWRG 0x00000010
#define AR_CFG_AP_ADHOC_INDICATION 0x00000020
#define AR_CFG_PHOK 0x00000100
#define AR_CFG_EEBS 0x00000200
#define AR_5211_CFG_CLK_GATE_DIS 0x00000400
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH 0x00060000
#define AR_CFG_PCI_MASTER_REQ_Q_THRESH_S 17
#define AR_IER_ENABLE 0x00000001
#define AR_IER_DISABLE 0x00000000
#define AR_DMASIZE_4B 0x00000000
#define AR_DMASIZE_8B 0x00000001
#define AR_DMASIZE_16B 0x00000002
#define AR_DMASIZE_32B 0x00000003
#define AR_DMASIZE_64B 0x00000004
#define AR_DMASIZE_128B 0x00000005
#define AR_DMASIZE_256B 0x00000006
#define AR_DMASIZE_512B 0x00000007
#define AR_FTRIG 0x000003F0
#define AR_FTRIG_S 4
#define AR_FTRIG_IMMED 0x00000000
#define AR_FTRIG_64B 0x00000010
#define AR_FTRIG_128B 0x00000020
#define AR_FTRIG_192B 0x00000030
#define AR_FTRIG_256B 0x00000040
#define AR_RXCFG_ZLFDMA 0x00000010
#define AR_MIBC_COW 0x00000001
#define AR_MIBC_FMC 0x00000002
#define AR_MIBC_CMC 0x00000004
#define AR_MIBC_MCS 0x00000008
#define AR_TOPS_MASK 0x0000FFFF
#define AR_RXNPTO_MASK 0x000003FF
#define AR_TXNPTO_MASK 0x000003FF
#define AR_TXNPTO_QCU_MASK 0x000FFC00
#define AR_RPGTO_MASK 0x000003FF
#define AR_RPCNT_MASK 0x0000001F
#define AR_MACMISC_DMA_OBS 0x000001E0
#define AR_MACMISC_DMA_OBS_S 5
#define AR_MACMISC_MISC_OBS 0x00000E00
#define AR_MACMISC_MISC_OBS_S 9
#define AR_MACMISC_MAC_OBS_BUS_LSB 0x00007000
#define AR_MACMISC_MAC_OBS_BUS_LSB_S 12
#define AR_MACMISC_MAC_OBS_BUS_MSB 0x00038000
#define AR_MACMISC_MAC_OBS_BUS_MSB_S 15
#define AR_ISR_RXOK 0x00000001
#define AR_ISR_RXDESC 0x00000002
#define AR_ISR_RXERR 0x00000004
#define AR_ISR_RXNOPKT 0x00000008
#define AR_ISR_RXEOL 0x00000010
#define AR_ISR_RXORN 0x00000020
#define AR_ISR_TXOK 0x00000040
#define AR_ISR_TXDESC 0x00000080
#define AR_ISR_TXERR 0x00000100
#define AR_ISR_TXNOPKT 0x00000200
#define AR_ISR_TXEOL 0x00000400
#define AR_ISR_TXURN 0x00000800
#define AR_ISR_MIB 0x00001000
#define AR_ISR_SWI 0x00002000
#define AR_ISR_RXPHY 0x00004000
#define AR_ISR_RXKCM 0x00008000
#define AR_ISR_SWBA 0x00010000
#define AR_ISR_BRSSI 0x00020000
#define AR_ISR_BMISS 0x00040000
#define AR_ISR_HIUERR 0x00080000
#define AR_ISR_BNR 0x00100000
#define AR_ISR_RXCHIRP 0x00200000
#define AR_ISR_RXDOPPL 0x00400000
#define AR_ISR_BCNMISC 0x00800000
#define AR_ISR_TIM 0x00800000
#define AR_ISR_GPIO 0x01000000
#define AR_ISR_QCBROVF 0x02000000
#define AR_ISR_QCBRURN 0x04000000
#define AR_ISR_QTRIG 0x08000000
#define AR_ISR_RESV0 0xF0000000
#define AR_ISR_S0_QCU_TXOK 0x000003FF
#define AR_ISR_S0_QCU_TXOK_S 0
#define AR_ISR_S0_QCU_TXDESC 0x03FF0000
#define AR_ISR_S0_QCU_TXDESC_S 16
#define AR_ISR_S1_QCU_TXERR 0x000003FF
#define AR_ISR_S1_QCU_TXERR_S 0
#define AR_ISR_S1_QCU_TXEOL 0x03FF0000
#define AR_ISR_S1_QCU_TXEOL_S 16
#define AR_ISR_S2_QCU_TXURN 0x000003FF
#define AR_ISR_S2_MCABT 0x00010000
#define AR_ISR_S2_SSERR 0x00020000
#define AR_ISR_S2_DPERR 0x00040000
#define AR_ISR_S2_TIM 0x01000000
#define AR_ISR_S2_CABEND 0x02000000
#define AR_ISR_S2_DTIMSYNC 0x04000000
#define AR_ISR_S2_BCNTO 0x08000000
#define AR_ISR_S2_CABTO 0x10000000
#define AR_ISR_S2_DTIM 0x20000000
#define AR_ISR_S2_TSFOOR 0x40000000
#define AR_ISR_S2_TBTT 0x80000000
#define AR_ISR_S3_QCU_QCBROVF 0x000003FF
#define AR_ISR_S3_QCU_QCBRURN 0x03FF0000
#define AR_ISR_S4_QCU_QTRIG 0x000003FF
#define AR_ISR_S4_RESV0 0xFFFFFC00
#define AR_IMR_RXOK 0x00000001
#define AR_IMR_RXDESC 0x00000002
#define AR_IMR_RXERR 0x00000004
#define AR_IMR_RXNOPKT 0x00000008
#define AR_IMR_RXEOL 0x00000010
#define AR_IMR_RXORN 0x00000020
#define AR_IMR_TXOK 0x00000040
#define AR_IMR_TXDESC 0x00000080
#define AR_IMR_TXERR 0x00000100
#define AR_IMR_TXNOPKT 0x00000200
#define AR_IMR_TXEOL 0x00000400
#define AR_IMR_TXURN 0x00000800
#define AR_IMR_MIB 0x00001000
#define AR_IMR_SWI 0x00002000
#define AR_IMR_RXPHY 0x00004000
#define AR_IMR_RXKCM 0x00008000
#define AR_IMR_SWBA 0x00010000
#define AR_IMR_BRSSI 0x00020000
#define AR_IMR_BMISS 0x00040000
#define AR_IMR_HIUERR 0x00080000
#define AR_IMR_BNR 0x00100000
#define AR_IMR_RXCHIRP 0x00200000
#define AR_IMR_BCNMISC 0x00800000
#define AR_IMR_TIM 0x00800000
#define AR_IMR_GPIO 0x01000000
#define AR_IMR_QCBROVF 0x02000000
#define AR_IMR_QCBRURN 0x04000000
#define AR_IMR_QTRIG 0x08000000
#define AR_IMR_RESV0 0xF0000000
#define AR_IMR_S0_QCU_TXOK 0x000003FF
#define AR_IMR_S0_QCU_TXOK_S 0
#define AR_IMR_S0_QCU_TXDESC 0x03FF0000
#define AR_IMR_S0_QCU_TXDESC_S 16
#define AR_IMR_S1_QCU_TXERR 0x000003FF
#define AR_IMR_S1_QCU_TXERR_S 0
#define AR_IMR_S1_QCU_TXEOL 0x03FF0000
#define AR_IMR_S1_QCU_TXEOL_S 16
#define AR_IMR_S2_QCU_TXURN 0x000003FF
#define AR_IMR_S2_QCU_TXURN_S 0
#define AR_IMR_S2_MCABT 0x00010000
#define AR_IMR_S2_SSERR 0x00020000
#define AR_IMR_S2_DPERR 0x00040000
#define AR_IMR_S2_TIM 0x01000000
#define AR_IMR_S2_CABEND 0x02000000
#define AR_IMR_S2_DTIMSYNC 0x04000000
#define AR_IMR_S2_BCNTO 0x08000000
#define AR_IMR_S2_CABTO 0x10000000
#define AR_IMR_S2_DTIM 0x20000000
#define AR_IMR_S2_TSFOOR 0x40000000
#define AR_IMR_S2_TBTT 0x80000000
#define AR_IMR_SR2_BCNMISC \
(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | \
AR_IMR_S2_CABEND | AR_IMR_S2_CABTO | AR_IMR_S2_TSFOOR | \
AR_IMR_S2_TBTT)
#define AR_IMR_S3_QCU_QCBROVF 0x000003FF
#define AR_IMR_S3_QCU_QCBRURN 0x03FF0000
#define AR_IMR_S3_QCU_QCBRURN_S 16
#define AR_IMR_S4_QCU_QTRIG 0x000003FF
#define AR_IMR_S4_RESV0 0xFFFFFC00
#define AR_NUM_QCU 10
#define AR_QCU_0 0x0001
#define AR_QCU_1 0x0002
#define AR_QCU_2 0x0004
#define AR_QCU_3 0x0008
#define AR_QCU_4 0x0010
#define AR_QCU_5 0x0020
#define AR_QCU_6 0x0040
#define AR_QCU_7 0x0080
#define AR_QCU_8 0x0100
#define AR_QCU_9 0x0200
#define AR_Q_CBRCFG_CBR_INTERVAL 0x00FFFFFF
#define AR_Q_CBRCFG_CBR_INTERVAL_S 0
#define AR_Q_CBRCFG_CBR_OVF_THRESH 0xFF000000
#define AR_Q_CBRCFG_CBR_OVF_THRESH_S 24
#define AR_Q_RDYTIMECFG_INT 0x00FFFFFF
#define AR_Q_RDYTIMECFG_INT_S 0
#define AR_Q_RDYTIMECFG_ENA 0x01000000
#define AR_Q_MISC_FSP 0x0000000F
#define AR_Q_MISC_FSP_ASAP 0
#define AR_Q_MISC_FSP_CBR 1
#define AR_Q_MISC_FSP_DBA_GATED 2
#define AR_Q_MISC_FSP_TIM_GATED 3
#define AR_Q_MISC_FSP_BEACON_SENT_GATED 4
#define AR_Q_MISC_FSP_S 0
#define AR_Q_MISC_ONE_SHOT_EN 0x00000010
#define AR_Q_MISC_CBR_INCR_DIS1 0x00000020
#define AR_Q_MISC_CBR_INCR_DIS0 0x00000040
#define AR_Q_MISC_BEACON_USE 0x00000080
#define AR_Q_MISC_CBR_EXP_CNTR_LIMIT 0x00000100
#define AR_Q_MISC_RDYTIME_EXP_POLICY 0x00000200
#define AR_Q_MISC_RESET_CBR_EXP_CTR 0x00000400
#define AR_Q_MISC_DCU_EARLY_TERM_REQ 0x00000800
#define AR_Q_MISC_QCU_COMP_EN 0x00001000
#define AR_Q_MISC_RESV0 0xFFFFF000
#define AR_Q_STS_PEND_FR_CNT 0x00000003
#define AR_Q_STS_RESV0 0x000000FC
#define AR_Q_STS_CBR_EXP_CNT 0x0000FF00
#define AR_Q_STS_RESV1 0xFFFF0000
#define AR_NUM_DCU 10
#define AR_DCU_0 0x0001
#define AR_DCU_1 0x0002
#define AR_DCU_2 0x0004
#define AR_DCU_3 0x0008
#define AR_DCU_4 0x0010
#define AR_DCU_5 0x0020
#define AR_DCU_6 0x0040
#define AR_DCU_7 0x0080
#define AR_DCU_8 0x0100
#define AR_DCU_9 0x0200
#define AR_D_QCUMASK 0x000003FF
#define AR_D_QCUMASK_RESV0 0xFFFFFC00
#define AR_D_LCL_IFS_CWMIN 0x000003FF
#define AR_D_LCL_IFS_CWMIN_S 0
#define AR_D_LCL_IFS_CWMAX 0x000FFC00
#define AR_D_LCL_IFS_CWMAX_S 10
#define AR_D_LCL_IFS_AIFS 0x0FF00000
#define AR_D_LCL_IFS_AIFS_S 20
#define AR_D_LCL_IFS_RESV0 0xF0000000
#define AR_D_RETRY_LIMIT_FR_SH 0x0000000F
#define AR_D_RETRY_LIMIT_FR_SH_S 0
#define AR_D_RETRY_LIMIT_FR_LG 0x000000F0
#define AR_D_RETRY_LIMIT_FR_LG_S 4
#define AR_D_RETRY_LIMIT_STA_SH 0x00003F00
#define AR_D_RETRY_LIMIT_STA_SH_S 8
#define AR_D_RETRY_LIMIT_STA_LG 0x000FC000
#define AR_D_RETRY_LIMIT_STA_LG_S 14
#define AR_D_RETRY_LIMIT_RESV0 0xFFF00000
#define AR_D_CHNTIME_DUR 0x000FFFFF
#define AR_D_CHNTIME_DUR_S 0
#define AR_D_CHNTIME_EN 0x00100000
#define AR_D_CHNTIME_RESV0 0xFFE00000
#define AR_D_MISC_BKOFF_THRESH 0x0000003F
#define AR_D_MISC_ETS_RTS 0x00000040
#define AR_D_MISC_ETS_CW 0x00000080
#define AR_D_MISC_FRAG_WAIT_EN 0x00000100
#define AR_D_MISC_FRAG_BKOFF_EN 0x00000200
#define AR_D_MISC_HCF_POLL_EN 0x00000800
#define AR_D_MISC_BKOFF_PERSISTENCE 0x00001000
#define AR_D_MISC_FR_PREFETCH_EN 0x00002000
#define AR_D_MISC_VIR_COL_HANDLING 0x0000C000
#define AR_D_MISC_VIR_COL_HANDLING_S 14
#define AR_D_MISC_VIR_COL_HANDLING_DEFAULT 0
#define AR_D_MISC_VIR_COL_HANDLING_IGNORE 1
#define AR_D_MISC_BEACON_USE 0x00010000
#define AR_D_MISC_ARB_LOCKOUT_CNTRL 0x00060000
#define AR_D_MISC_ARB_LOCKOUT_CNTRL_S 17
#define AR_D_MISC_ARB_LOCKOUT_CNTRL_NONE 0
#define AR_D_MISC_ARB_LOCKOUT_CNTRL_INTRA_FR 1
#define AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL 2
#define AR_D_MISC_ARB_LOCKOUT_IGNORE 0x00080000
#define AR_D_MISC_SEQ_NUM_INCR_DIS 0x00100000
#define AR_D_MISC_POST_FR_BKOFF_DIS 0x00200000
#define AR_D_MISC_VIRT_COLL_POLICY 0x00400000
#define AR_D_MISC_BLOWN_IFS_POLICY 0x00800000
#define AR_D_MISC_RESV0 0xFE000000
#define AR_D_SEQNUM_RESV0 0xFFFFF000
#define AR_D_GBL_IFS_MISC_LFSR_SLICE_SEL 0x00000007
#define AR_D_GBL_IFS_MISC_TURBO_MODE 0x00000008
#define AR_D_GBL_IFS_MISC_SIFS_DURATION_USEC 0x000003F0
#define AR_D_GBL_IFS_MISC_USEC_DURATION 0x000FFC00
#define AR_D_GBL_IFS_MISC_USEC_DURATION_S 10
#define AR_D_GBL_IFS_MISC_DCU_ARBITER_DLY 0x00300000
#define AR_D_GBL_IFS_MISC_RESV0 0xFFC00000
#define AR_RC_MAC 0x00000001
#define AR_RC_BB 0x00000002
#define AR_RC_RESV0 0x00000004
#define AR_RC_RESV1 0x00000008
#define AR_RC_PCI 0x00000010
#define AR_SCR_SLDUR 0x0000ffff
#define AR_SCR_SLDUR_S 0
#define AR_SCR_SLE 0x00030000
#define AR_SCR_SLE_S 16
#define AR_SCR_SLE_WAKE 0
#define AR_SCR_SLE_SLP 1
#define AR_SCR_SLE_NORM 2
#define AR_SCR_SLDTP 0x00040000
#define AR_SCR_SLDWP 0x00080000
#define AR_SCR_SLEPOL 0x00100000
#define AR_SCR_MIBIE 0x00200000
#define AR_SCR_UNKNOWN 0x00400000
#define AR_INTPEND_TRUE 0x00000001
#define AR_SFR_SLEEP 0x00000001
#define AR_PCICFG_SCLK_SEL 0x00000002
#define AR_PCICFG_SCLK_SEL_S 1
#define AR_PCICFG_CLKRUNEN 0x00000004
#define AR_PCICFG_EEPROM_SIZE 0x00000018
#define AR_PCICFG_EEPROM_SIZE_4 0
#define AR_PCICFG_EEPROM_SIZE_8K 1
#define AR_PCICFG_EEPROM_SIZE_16K 2
#define AR_PCICFG_EEPROM_SIZE_FAILED 3
#define AR_PCICFG_EEPROM_SIZE_S 3
#define AR_PCICFG_LEDCTL 0x00000060
#define AR_PCICFG_LEDCTL_NONE 0
#define AR_PCICFG_LEDCTL_PEND 1
#define AR_PCICFG_LEDCTL_ASSOC 2
#define AR_PCICFG_LEDCTL_S 5
#define AR_PCICFG_PCI_BUS_SEL 0x00000380
#define AR_PCICFG_DIS_CBE_FIX 0x00000400
#define AR_PCICFG_SL_INTEN 0x00000800
#define AR_PCICFG_RETRYFIXEN 0x00001000
#define AR_PCICFG_SL_INPEN 0x00002000
#define AR_PCICFG_RESV1 0x0000C000
#define AR_PCICFG_SPWR_DN 0x00010000
#define AR_PCICFG_LEDMODE 0x000E0000
#define AR_PCICFG_LEDMODE_PROP 0
#define AR_PCICFG_LEDMODE_RPROP 1
#define AR_PCICFG_LEDMODE_SPLIT 2
#define AR_PCICFG_LEDMODE_RAND 3
#define AR_PCICFG_LEDMODE_OFF 4
#define AR_PCICFG_LEDMODE_POWON 5
#define AR_PCICFG_LEDMODE_NETON 6
#define AR_PCICFG_LEDMODE_S 17
#define AR_PCICFG_LEDBLINK 0x00700000
#define AR_PCICFG_LEDBLINK_S 20
#define AR_PCICFG_LEDSLOW 0x00800000
#define AR_PCICFG_LEDSLOW_S 23
#define AR_PCICFG_SCLK_RATE_IND 0x03000000
#define AR_PCICFG_SCLK_RATE_IND_S 24
#define AR_PCICFG_RESV2 0xFC000000
#define AR_GPIOCR_CR_SHIFT 2
#define AR_GPIOCR_CR_N(_g) (0 << (AR_GPIOCR_CR_SHIFT * (_g)))
#define AR_GPIOCR_CR_0(_g) (1 << (AR_GPIOCR_CR_SHIFT * (_g)))
#define AR_GPIOCR_CR_1(_g) (2 << (AR_GPIOCR_CR_SHIFT * (_g)))
#define AR_GPIOCR_CR_A(_g) (3 << (AR_GPIOCR_CR_SHIFT * (_g)))
#define AR_GPIOCR_INT_SHIFT 12
#define AR_GPIOCR_INT(_g) ((_g) << AR_GPIOCR_INT_SHIFT)
#define AR_GPIOCR_INT_MASK 0x00007000
#define AR_GPIOCR_INT_ENA 0x00008000
#define AR_GPIOCR_INT_SELL 0x00000000
#define AR_GPIOCR_INT_SELH 0x00010000
#define AR_GPIOCR_INT_SEL AR_GPIOCR_INT_SELH
#define AR_SREV_ID 0x000000FF
#define AR_SREV_ID_S 4
#define AR_SREV_REVISION 0x0000000F
#define AR_SREV_REVISION_MIN 0
#define AR_SREV_REVISION_MAX 0xF
#define AR_SREV_FPGA 1
#define AR_SREV_D2PLUS 2
#define AR_SREV_D2PLUS_MS 3
#define AR_SREV_CRETE 4
#define AR_SREV_CRETE_MS 5
#define AR_SREV_CRETE_MS23 7
#define AR_SREV_CRETE_23 8
#define AR_SREV_GRIFFIN_LITE 8
#define AR_SREV_HAINAN 9
#define AR_SREV_CONDOR 11
#define AR_SREV_VERSION 0x000000F0
#define AR_SREV_VERSION_CRETE 0
#define AR_SREV_VERSION_MAUI_1 1
#define AR_SREV_VERSION_MAUI_2 2
#define AR_SREV_VERSION_SPIRIT 3
#define AR_SREV_VERSION_OAHU 4
#define AR_SREV_VERSION_VENICE 5
#define AR_SREV_VERSION_GRIFFIN 7
#define AR_SREV_VERSION_CONDOR 9
#define AR_SREV_VERSION_EAGLE 10
#define AR_SREV_VERSION_COBRA 11
#define AR_SREV_2413 AR_SREV_VERSION_GRIFFIN
#define AR_SREV_5413 AR_SREV_VERSION_EAGLE
#define AR_SREV_2415 AR_SREV_VERSION_COBRA
#define AR_SREV_5424 AR_SREV_VERSION_CONDOR
#define AR_SREV_2425 14
#define AR_SREV_2417 15
#define AR_SREV_OAHU_ES 0
#define AR_SREV_OAHU_PROD 2
#define AR_PHYREV_HAINAN 0x43
#define AR_ANALOG5REV_HAINAN 0x46
#define AR_RADIO_SREV_MAJOR 0xF0
#define AR_RADIO_SREV_MINOR 0x0F
#define AR_RAD5111_SREV_MAJOR 0x10
#define AR_RAD5111_SREV_PROD 0x15
#define AR_RAD2111_SREV_MAJOR 0x20
#define AR_RAD5112_SREV_MAJOR 0x30
#define AR_RAD5112_SREV_2_0 0x35
#define AR_RAD5112_SREV_2_1 0x36
#define AR_RAD2112_SREV_MAJOR 0x40
#define AR_RAD2112_SREV_2_0 0x45
#define AR_RAD2112_SREV_2_1 0x46
#define AR_RAD2413_SREV_MAJOR 0x50
#define AR_RAD5413_SREV_MAJOR 0x60
#define AR_RAD2316_SREV_MAJOR 0x70
#define AR_RAD2317_SREV_MAJOR 0x80
#define AR_RAD5424_SREV_MAJOR 0xa0
#define AR_PCIE_PMC_ENA_L1 0x01
#define AR_PCIE_PMC_ENA_RESET 0x08
#define AR_EEPROM_CMD_READ 0x00000001
#define AR_EEPROM_CMD_WRITE 0x00000002
#define AR_EEPROM_CMD_RESET 0x00000004
#define AR_EEPROM_STS_READ_ERROR 0x00000001
#define AR_EEPROM_STS_READ_COMPLETE 0x00000002
#define AR_EEPROM_STS_WRITE_ERROR 0x00000004
#define AR_EEPROM_STS_WRITE_COMPLETE 0x00000008
#define AR_EEPROM_CFG_SIZE 0x00000003
#define AR_EEPROM_CFG_SIZE_AUTO 0
#define AR_EEPROM_CFG_SIZE_4KBIT 1
#define AR_EEPROM_CFG_SIZE_8KBIT 2
#define AR_EEPROM_CFG_SIZE_16KBIT 3
#define AR_EEPROM_CFG_DIS_WWRCL 0x00000004
#define AR_EEPROM_CFG_CLOCK 0x00000018
#define AR_EEPROM_CFG_CLOCK_S 3
#define AR_EEPROM_CFG_CLOCK_156KHZ 0
#define AR_EEPROM_CFG_CLOCK_312KHZ 1
#define AR_EEPROM_CFG_CLOCK_625KHZ 2
#define AR_EEPROM_CFG_RESV0 0x000000E0
#define AR_EEPROM_CFG_PKEY 0x00FFFF00
#define AR_EEPROM_CFG_PKEY_S 8
#define AR_EEPROM_CFG_EN_L 0x01000000
#define AR_STA_ID1_SADH_MASK 0x0000FFFF
#define AR_STA_ID1_STA_AP 0x00010000
#define AR_STA_ID1_ADHOC 0x00020000
#define AR_STA_ID1_PWR_SAV 0x00040000
#define AR_STA_ID1_KSRCHDIS 0x00080000
#define AR_STA_ID1_PCF 0x00100000
#define AR_STA_ID1_USE_DEFANT 0x00200000
#define AR_STA_ID1_UPD_DEFANT 0x00400000
#define AR_STA_ID1_RTS_USE_DEF 0x00800000
#define AR_STA_ID1_ACKCTS_6MB 0x01000000
#define AR_STA_ID1_BASE_RATE_11B 0x02000000
#define AR_STA_ID1_USE_DA_SG 0x04000000
#define AR_STA_ID1_CRPT_MIC_ENABLE 0x08000000
#define AR_STA_ID1_KSRCH_MODE 0x10000000
#define AR_STA_ID1_PRE_SEQNUM 0x20000000
#define AR_STA_ID1_CBCIV_ENDIAN 0x40000000
#define AR_STA_ID1_MCAST_KSRCH 0x80000000
#define AR_BSS_ID1_U16 0x0000FFFF
#define AR_BSS_ID1_AID 0xFFFF0000
#define AR_BSS_ID1_AID_S 16
#define AR_SLOT_TIME_MASK 0x000007FF
#define AR_TIME_OUT_ACK 0x00003FFF
#define AR_TIME_OUT_ACK_S 0
#define AR_TIME_OUT_CTS 0x3FFF0000
#define AR_TIME_OUT_CTS_S 16
#define AR_RSSI_THR_MASK 0x000000FF
#define AR_RSSI_THR_BM_THR 0x0000FF00
#define AR_RSSI_THR_BM_THR_S 8
#define AR_USEC_USEC 0x0000007F
#define AR_USEC_USEC_S 0
#define AR_USEC_USEC32 0x00003F80
#define AR_USEC_USEC32_S 7
#define AR5212_USEC_TX_LAT_M 0x007FC000
#define AR5212_USEC_TX_LAT_S 14
#define AR5212_USEC_RX_LAT_M 0x1F800000
#define AR5212_USEC_RX_LAT_S 23
#define AR_BEACON_PERIOD 0x0000FFFF
#define AR_BEACON_PERIOD_S 0
#define AR_BEACON_TIM 0x007F0000
#define AR_BEACON_TIM_S 16
#define AR_BEACON_EN 0x00800000
#define AR_BEACON_RESET_TSF 0x01000000
#define AR_RX_NONE 0x00000000
#define AR_RX_UCAST 0x00000001
#define AR_RX_MCAST 0x00000002
#define AR_RX_BCAST 0x00000004
#define AR_RX_CONTROL 0x00000008
#define AR_RX_BEACON 0x00000010
#define AR_RX_PROM 0x00000020
#define AR_RX_PROBE_REQ 0x00000080
#define AR_DIAG_CACHE_ACK 0x00000001
#define AR_DIAG_ACK_DIS 0x00000002
#define AR_DIAG_CTS_DIS 0x00000004
#define AR_DIAG_ENCRYPT_DIS 0x00000008
#define AR_DIAG_DECRYPT_DIS 0x00000010
#define AR_DIAG_RX_DIS 0x00000020
#define AR_DIAG_CORR_FCS 0x00000080
#define AR_DIAG_CHAN_INFO 0x00000100
#define AR_DIAG_EN_SCRAMSD 0x00000200
#define AR_DIAG_SCRAM_SEED 0x0001FC00
#define AR_DIAG_SCRAM_SEED_S 10
#define AR_DIAG_FRAME_NV0 0x00020000
#define AR_DIAG_OBS_PT_SEL 0x000C0000
#define AR_DIAG_OBS_PT_SEL_S 18
#define AR_DIAG_RX_CLR_HI 0x00100000
#define AR_DIAG_IGNORE_CS 0x00200000
#define AR_DIAG_CHAN_IDLE 0x00400000
#define AR_DIAG_PHEAR_ME 0x00800000
#define AR_SLEEP1_NEXT_DTIM 0x0007ffff
#define AR_SLEEP1_NEXT_DTIM_S 0
#define AR_SLEEP1_ASSUME_DTIM 0x00080000
#define AR_SLEEP1_ENH_SLEEP_ENA 0x00100000
#define AR_SLEEP1_CAB_TIMEOUT 0xff000000
#define AR_SLEEP1_CAB_TIMEOUT_S 24
#define AR_SLEEP2_NEXT_TIM 0x0007ffff
#define AR_SLEEP2_NEXT_TIM_S 0
#define AR_SLEEP2_BEACON_TIMEOUT 0xff000000
#define AR_SLEEP2_BEACON_TIMEOUT_S 24
#define AR_SLEEP3_TIM_PERIOD 0x0000ffff
#define AR_SLEEP3_TIM_PERIOD_S 0
#define AR_SLEEP3_DTIM_PERIOD 0xffff0000
#define AR_SLEEP3_DTIM_PERIOD_S 16
#define AR_TPC_ACK 0x0000003f
#define AR_TPC_ACK_S 0
#define AR_TPC_CTS 0x00003f00
#define AR_TPC_CTS_S 8
#define AR_TPC_CHIRP 0x003f0000
#define AR_TPC_CHIRP_S 16
#define AR_TPC_DOPPLER 0x0f000000
#define AR_TPC_DOPPLER_S 24
#define AR_PHY_ERR_RADAR 0x00000020
#define AR_PHY_ERR_OFDM_TIMING 0x00020000
#define AR_PHY_ERR_CCK_TIMING 0x02000000
#define AR_TSF_PARM_INCREMENT 0x000000ff
#define AR_TSF_PARM_INCREMENT_S 0
#define AR_NOACK_2BIT_VALUE 0x0000000f
#define AR_NOACK_2BIT_VALUE_S 0
#define AR_NOACK_BIT_OFFSET 0x00000070
#define AR_NOACK_BIT_OFFSET_S 4
#define AR_NOACK_BYTE_OFFSET 0x00000180
#define AR_NOACK_BYTE_OFFSET_S 7
#define AR_MISC_MODE_BSSID_MATCH_FORCE 0x1
#define AR_MISC_MODE_ACKSIFS_MEMORY 0x2
#define AR_MISC_MODE_MIC_NEW_LOC_ENABLE 0x4
#define AR_MISC_MODE_TX_ADD_TSF 0x8
#define AR_KEYTABLE_KEY0(_n) (AR_KEYTABLE(_n) + 0)
#define AR_KEYTABLE_KEY1(_n) (AR_KEYTABLE(_n) + 4)
#define AR_KEYTABLE_KEY2(_n) (AR_KEYTABLE(_n) + 8)
#define AR_KEYTABLE_KEY3(_n) (AR_KEYTABLE(_n) + 12)
#define AR_KEYTABLE_KEY4(_n) (AR_KEYTABLE(_n) + 16)
#define AR_KEYTABLE_TYPE(_n) (AR_KEYTABLE(_n) + 20)
#define AR_KEYTABLE_TYPE_40 0x00000000
#define AR_KEYTABLE_TYPE_104 0x00000001
#define AR_KEYTABLE_TYPE_128 0x00000003
#define AR_KEYTABLE_TYPE_TKIP 0x00000004
#define AR_KEYTABLE_TYPE_AES 0x00000005
#define AR_KEYTABLE_TYPE_CCM 0x00000006
#define AR_KEYTABLE_TYPE_CLR 0x00000007
#define AR_KEYTABLE_ANT 0x00000008
#define AR_KEYTABLE_MAC0(_n) (AR_KEYTABLE(_n) + 24)
#define AR_KEYTABLE_MAC1(_n) (AR_KEYTABLE(_n) + 28)
#define AR_KEYTABLE_VALID 0x00008000
#define AR_CCFG_WIN_M 0x00000007
#define AR_CCFG_MIB_INT_EN 0x00000008
#define AR_CCUCFG_RESET_VAL 0x00100200
#define AR_CCUCFG_CATCHUP_EN 0x00000001
#define AR_DCM_D_EN 0x00000001
#define AR_COMPRESSION_WINDOW_SIZE 4096
#endif