Main Page | Data Structures | Directories | File List | Data Fields | Globals

ar5210reg.h

Go to the documentation of this file.
00001 /*      $OpenBSD: ar5210reg.h,v 1.9 2005/05/08 14:46:50 reyk Exp $      */
00002 
00003 /*
00004  * Copyright (c) 2004, 2005 Reyk Floeter <reyk@vantronix.net>
00005  *
00006  * Permission to use, copy, modify, and distribute this software for any
00007  * purpose with or without fee is hereby granted, provided that the above
00008  * copyright notice and this permission notice appear in all copies.
00009  *
00010  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
00011  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
00012  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
00013  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
00014  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
00015  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
00016  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
00017  */
00018 
00019 /*
00020  * Known registers of the Atheros AR5000 Wireless LAN chipset
00021  * (AR5210 + AR5110).
00022  */
00023 
00024 #ifndef _AR5K_AR5210_REG_H
00025 #define _AR5K_AR5210_REG_H
00026 
00027 /*
00028  * First tansmit queue descriptor pointer register ("data queue")
00029  */
00030 #define AR5K_AR5210_TXDP0       0x0000
00031 
00032 /*
00033  * Second transmit queue descriptor pointer register ("beacon queue")
00034  */
00035 #define AR5K_AR5210_TXDP1       0x0004
00036 
00037 /*
00038  * Command register
00039  */
00040 #define AR5K_AR5210_CR          0x0008
00041 #define AR5K_AR5210_CR_TXE0     0x00000001
00042 #define AR5K_AR5210_CR_TXE1     0x00000002
00043 #define AR5K_AR5210_CR_RXE      0x00000004
00044 #define AR5K_AR5210_CR_TXD0     0x00000008
00045 #define AR5K_AR5210_CR_TXD1     0x00000010
00046 #define AR5K_AR5210_CR_RXD      0x00000020
00047 #define AR5K_AR5210_CR_SWI      0x00000040
00048 
00049 /*
00050  * Receive queue descriptor pointer register
00051  */
00052 #define AR5K_AR5210_RXDP        0x000c
00053 
00054 /*
00055  * Configuration and status register
00056  */
00057 #define AR5K_AR5210_CFG         0x0014
00058 #define AR5K_AR5210_CFG_SWTD    0x00000001
00059 #define AR5K_AR5210_CFG_SWTB    0x00000002
00060 #define AR5K_AR5210_CFG_SWRD    0x00000004
00061 #define AR5K_AR5210_CFG_SWRB    0x00000008
00062 #define AR5K_AR5210_CFG_SWRG    0x00000010
00063 #define AR5K_AR5210_CFG_EEBS    0x00000200
00064 #define AR5K_AR5210_CFG_TXCNT   0x00007800
00065 #define AR5K_AR5210_CFG_TXCNT_S 11
00066 #define AR5K_AR5210_CFG_TXFSTAT 0x00008000
00067 #define AR5K_AR5210_CFG_TXFSTRT 0x00010000
00068 
00069 /*
00070  * Interrupt service register
00071  */
00072 #define AR5K_AR5210_ISR         0x001c
00073 #define AR5K_AR5210_ISR_RXOK    0x00000001
00074 #define AR5K_AR5210_ISR_RXDESC  0x00000002
00075 #define AR5K_AR5210_ISR_RXERR   0x00000004
00076 #define AR5K_AR5210_ISR_RXNOFRM 0x00000008
00077 #define AR5K_AR5210_ISR_RXEOL   0x00000010
00078 #define AR5K_AR5210_ISR_RXORN   0x00000020
00079 #define AR5K_AR5210_ISR_TXOK    0x00000040
00080 #define AR5K_AR5210_ISR_TXDESC  0x00000080
00081 #define AR5K_AR5210_ISR_TXERR   0x00000100
00082 #define AR5K_AR5210_ISR_TXNOFRM 0x00000200
00083 #define AR5K_AR5210_ISR_TXEOL   0x00000400
00084 #define AR5K_AR5210_ISR_TXURN   0x00000800
00085 #define AR5K_AR5210_ISR_MIB     0x00001000
00086 #define AR5K_AR5210_ISR_SWI     0x00002000
00087 #define AR5K_AR5210_ISR_RXPHY   0x00004000
00088 #define AR5K_AR5210_ISR_RXKCM   0x00008000
00089 #define AR5K_AR5210_ISR_SWBA    0x00010000
00090 #define AR5K_AR5210_ISR_BRSSI   0x00020000
00091 #define AR5K_AR5210_ISR_BMISS   0x00040000
00092 #define AR5K_AR5210_ISR_MCABT   0x00100000
00093 #define AR5K_AR5210_ISR_SSERR   0x00200000
00094 #define AR5K_AR5210_ISR_DPERR   0x00400000
00095 #define AR5K_AR5210_ISR_GPIO    0x01000000
00096 #define AR5K_AR5210_ISR_FATAL   (                                       \
00097         AR5K_AR5210_ISR_MCABT | AR5K_AR5210_ISR_SSERR |                 \
00098         AR5K_AR5210_ISR_DPERR | AR5K_AR5210_ISR_RXORN                   \
00099 )
00100 
00101 /*
00102  * Interrupt mask register
00103  */
00104 #define AR5K_AR5210_IMR         0x0020
00105 #define AR5K_AR5210_IMR_RXOK    0x00000001
00106 #define AR5K_AR5210_IMR_RXDESC  0x00000002
00107 #define AR5K_AR5210_IMR_RXERR   0x00000004
00108 #define AR5K_AR5210_IMR_RXNOFRM 0x00000008
00109 #define AR5K_AR5210_IMR_RXEOL   0x00000010
00110 #define AR5K_AR5210_IMR_RXORN   0x00000020
00111 #define AR5K_AR5210_IMR_TXOK    0x00000040
00112 #define AR5K_AR5210_IMR_TXDESC  0x00000080
00113 #define AR5K_AR5210_IMR_TXERR   0x00000100
00114 #define AR5K_AR5210_IMR_TXNOFRM 0x00000200
00115 #define AR5K_AR5210_IMR_TXEOL   0x00000400
00116 #define AR5K_AR5210_IMR_TXURN   0x00000800
00117 #define AR5K_AR5210_IMR_MIB     0x00001000
00118 #define AR5K_AR5210_IMR_SWI     0x00002000
00119 #define AR5K_AR5210_IMR_RXPHY   0x00004000
00120 #define AR5K_AR5210_IMR_RXKCM   0x00008000
00121 #define AR5K_AR5210_IMR_SWBA    0x00010000
00122 #define AR5K_AR5210_IMR_BRSSI   0x00020000
00123 #define AR5K_AR5210_IMR_BMISS   0x00040000
00124 #define AR5K_AR5210_IMR_MCABT   0x00100000
00125 #define AR5K_AR5210_IMR_SSERR   0x00200000
00126 #define AR5K_AR5210_IMR_DPERR   0x00400000
00127 #define AR5K_AR5210_IMR_GPIO    0x01000000
00128 
00129 /*
00130  * Interrupt enable register
00131  */
00132 #define AR5K_AR5210_IER         0x0024
00133 #define AR5K_AR5210_IER_DISABLE 0x00000000
00134 #define AR5K_AR5210_IER_ENABLE  0x00000001
00135 
00136 /*
00137  * Beacon control register
00138  */
00139 #define AR5K_AR5210_BCR         0x0028
00140 #define AR5K_AR5210_BCR_AP      0x00000000
00141 #define AR5K_AR5210_BCR_ADHOC   0x00000001
00142 #define AR5K_AR5210_BCR_BDMAE   0x00000002
00143 #define AR5K_AR5210_BCR_TQ1FV   0x00000004
00144 #define AR5K_AR5210_BCR_TQ1V    0x00000008
00145 #define AR5K_AR5210_BCR_BCGET   0x00000010
00146 
00147 /*
00148  * Beacon status register
00149  */
00150 #define AR5K_AR5210_BSR                 0x002c
00151 #define AR5K_AR5210_BSR_BDLYSW          0x00000001
00152 #define AR5K_AR5210_BSR_BDLYDMA         0x00000002
00153 #define AR5K_AR5210_BSR_TXQ1F           0x00000004
00154 #define AR5K_AR5210_BSR_ATIMDLY         0x00000008
00155 #define AR5K_AR5210_BSR_SNPBCMD         0x00000100
00156 #define AR5K_AR5210_BSR_SNPBDMAE        0x00000200
00157 #define AR5K_AR5210_BSR_SNPTQ1FV        0x00000400
00158 #define AR5K_AR5210_BSR_SNPTQ1V         0x00000800
00159 #define AR5K_AR5210_BSR_SNAPPEDBCRVALID 0x00001000
00160 #define AR5K_AR5210_BSR_SWBA_CNT        0x00ff0000
00161 
00162 /*
00163  * DMA size definitions
00164  */
00165 typedef enum {
00166         AR5K_AR5210_DMASIZE_4B = 0,
00167         AR5K_AR5210_DMASIZE_8B,
00168         AR5K_AR5210_DMASIZE_16B,
00169         AR5K_AR5210_DMASIZE_32B,
00170         AR5K_AR5210_DMASIZE_64B,
00171         AR5K_AR5210_DMASIZE_128B,
00172         AR5K_AR5210_DMASIZE_256B,
00173         AR5K_AR5210_DMASIZE_512B
00174 } ar5k_ar5210_dmasize_t;
00175 
00176 /*
00177  * Transmit configuration register
00178  */
00179 #define AR5K_AR5210_TXCFG               0x0030
00180 #define AR5K_AR5210_TXCFG_SDMAMR        0x00000007
00181 #define AR5K_AR5210_TXCFG_TXFSTP        0x00000008
00182 #define AR5K_AR5210_TXCFG_TXFULL        0x00000070
00183 #define AR5K_AR5210_TXCFG_TXCONT_EN     0x00000080
00184 
00185 /*
00186  * Receive configuration register
00187  */
00188 #define AR5K_AR5210_RXCFG               0x0034
00189 #define AR5K_AR5210_RXCFG_SDMAMW        0x00000007
00190 #define AR5K_AR5210_RXCFG_ZLFDMA        0x00000010
00191 
00192 /*
00193  * MIB control register
00194  */
00195 #define AR5K_AR5210_MIBC                0x0040
00196 #define AR5K_AR5210_MIBC_COW            0x00000001
00197 #define AR5K_AR5210_MIBC_FMC            0x00000002
00198 #define AR5K_AR5210_MIBC_CMC            0x00000004
00199 #define AR5K_AR5210_MIBC_MCS            0x00000008
00200 
00201 /*
00202  * Timeout prescale register
00203  */
00204 #define AR5K_AR5210_TOPS                0x0044
00205 
00206 /*
00207  * Receive timeout register (no frame received)
00208  */
00209 #define AR5K_AR5210_RXNOFRM             0x0048
00210 
00211 /*
00212  * Transmit timeout register (no frame sent)
00213  */
00214 #define AR5K_AR5210_TXNOFRM             0x004c
00215 
00216 /*
00217  * Receive frame gap timeout register
00218  */
00219 #define AR5K_AR5210_RPGTO               0x0050
00220 
00221 /*
00222  * Receive frame count limit register
00223  */
00224 #define AR5K_AR5210_RFCNT               0x0054
00225 #define AR5K_AR5210_RFCNT_RFCL          0x0000000f
00226 
00227 /*
00228  * Misc settings/status register
00229  */
00230 #define AR5K_AR5210_MISC                0x0058
00231 #define AR5K_AR5210_MISC_LED_DECAY      0x001c0000
00232 #define AR5K_AR5210_MISC_LED_BLINK      0x00e00000
00233 
00234 /*
00235  * Reset control register
00236  */
00237 #define AR5K_AR5210_RC                  0x4000
00238 #define AR5K_AR5210_RC_PCU              0x00000001
00239 #define AR5K_AR5210_RC_DMA              0x00000002
00240 #define AR5K_AR5210_RC_MAC              0x00000004
00241 #define AR5K_AR5210_RC_PHY              0x00000008
00242 #define AR5K_AR5210_RC_PCI              0x00000010
00243 #define AR5K_AR5210_RC_CHIP             (                               \
00244         AR5K_AR5210_RC_PCU | AR5K_AR5210_RC_DMA |                       \
00245         AR5K_AR5210_RC_MAC | AR5K_AR5210_RC_PHY                         \
00246 )
00247 
00248 /*
00249  * Sleep control register
00250  */
00251 #define AR5K_AR5210_SCR                 0x4004
00252 #define AR5K_AR5210_SCR_SLDUR           0x0000ffff
00253 #define AR5K_AR5210_SCR_SLE             0x00030000
00254 #define AR5K_AR5210_SCR_SLE_WAKE        0x00000000
00255 #define AR5K_AR5210_SCR_SLE_SLP         0x00010000
00256 #define AR5K_AR5210_SCR_SLE_ALLOW       0x00020000
00257 
00258 /*
00259  * Interrupt pending register
00260  */
00261 #define AR5K_AR5210_INTPEND             0x4008
00262 #define AR5K_AR5210_INTPEND_IP          0x00000001
00263 
00264 /*
00265  * Sleep force register
00266  */
00267 #define AR5K_AR5210_SFR                 0x400c
00268 #define AR5K_AR5210_SFR_SF              0x00000001
00269 
00270 /*
00271  * PCI configuration register
00272  */
00273 #define AR5K_AR5210_PCICFG              0x4010
00274 #define AR5K_AR5210_PCICFG_EEAE         0x00000001
00275 #define AR5K_AR5210_PCICFG_CLKRUNEN     0x00000004
00276 #define AR5K_AR5210_PCICFG_LED_PEND     0x00000020
00277 #define AR5K_AR5210_PCICFG_LED_ACT      0x00000040
00278 #define AR5K_AR5210_PCICFG_SL_INTEN     0x00000800
00279 #define AR5K_AR5210_PCICFG_LED_BCTL     0x00001000
00280 #define AR5K_AR5210_PCICFG_SL_INPEN     0x00002800
00281 #define AR5K_AR5210_PCICFG_SPWR_DN      0x00010000
00282 
00283 /*
00284  * "General Purpose Input/Output" (GPIO) control register
00285  */
00286 #define AR5K_AR5210_GPIOCR              0x4014
00287 #define AR5K_AR5210_GPIOCR_INT_ENA      0x00008000
00288 #define AR5K_AR5210_GPIOCR_INT_SELL     0x00000000
00289 #define AR5K_AR5210_GPIOCR_INT_SELH     0x00010000
00290 #define AR5K_AR5210_GPIOCR_IN(n)        (0 << ((n) * 2))
00291 #define AR5K_AR5210_GPIOCR_OUT0(n)      (1 << ((n) * 2))
00292 #define AR5K_AR5210_GPIOCR_OUT1(n)      (2 << ((n) * 2))
00293 #define AR5K_AR5210_GPIOCR_OUT(n)       (3 << ((n) * 2))
00294 #define AR5K_AR5210_GPIOCR_ALL(n)       (3<< ((n) * 2))
00295 #define AR5K_AR5210_GPIOCR_INT_SEL(n)   ((n) << 12)
00296 
00297 #define AR5K_AR5210_NUM_GPIO    6
00298 
00299 /*
00300  * "General Purpose Input/Output" (GPIO) data output register
00301  */
00302 #define AR5K_AR5210_GPIODO      0x4018
00303 
00304 /*
00305  * "General Purpose Input/Output" (GPIO) data input register
00306  */
00307 #define AR5K_AR5210_GPIODI      0x401c
00308 #define AR5K_AR5210_GPIOD_MASK  0x0000002f
00309 
00310 /*
00311  * Silicon revision register
00312  */
00313 #define AR5K_AR5210_SREV                0x4020
00314 #define AR5K_AR5210_SREV_REV            0x0000000f
00315 #define AR5K_AR5210_SREV_REV_S          0
00316 #define AR5K_AR5210_SREV_VER            0x000000ff
00317 #define AR5K_AR5210_SREV_VER_S          4
00318 
00319 /*
00320  * EEPROM access registers
00321  */
00322 #define AR5K_AR5210_EEPROM_BASE         0x6000
00323 #define AR5K_AR5210_EEPROM_RDATA        0x6800
00324 #define AR5K_AR5210_EEPROM_STATUS       0x6c00
00325 #define AR5K_AR5210_EEPROM_STAT_RDERR   0x0001
00326 #define AR5K_AR5210_EEPROM_STAT_RDDONE  0x0002
00327 #define AR5K_AR5210_EEPROM_STAT_WRERR   0x0004
00328 #define AR5K_AR5210_EEPROM_STAT_WRDONE  0x0008
00329 
00330 /*
00331  * PCU registers
00332  */
00333 
00334 #define AR5K_AR5210_PCU_MIN     0x8000
00335 #define AR5K_AR5210_PCU_MAX     0x8fff
00336 
00337 /*
00338  * First station id register (MAC address in lower 32 bits)
00339  */
00340 #define AR5K_AR5210_STA_ID0     0x8000
00341 
00342 /*
00343  * Second station id register (MAC address in upper 16 bits)
00344  */
00345 #define AR5K_AR5210_STA_ID1                     0x8004
00346 #define AR5K_AR5210_STA_ID1_AP                  0x00010000
00347 #define AR5K_AR5210_STA_ID1_ADHOC               0x00020000
00348 #define AR5K_AR5210_STA_ID1_PWR_SV              0x00040000
00349 #define AR5K_AR5210_STA_ID1_NO_KEYSRCH          0x00080000
00350 #define AR5K_AR5210_STA_ID1_NO_PSPOLL           0x00100000
00351 #define AR5K_AR5210_STA_ID1_PCF                 0x00200000
00352 #define AR5K_AR5210_STA_ID1_DESC_ANTENNA        0x00400000
00353 #define AR5K_AR5210_STA_ID1_DEFAULT_ANTENNA     0x00800000
00354 #define AR5K_AR5210_STA_ID1_ACKCTS_6MB          0x01000000
00355 
00356 /*
00357  * First BSSID register (MAC address, lower 32bits)
00358  */
00359 #define AR5K_AR5210_BSS_ID0     0x8008
00360 
00361 /*
00362  * Second BSSID register (MAC address in upper 16 bits)
00363  *
00364  * AID: Association ID
00365  */
00366 #define AR5K_AR5210_BSS_ID1             0x800c
00367 #define AR5K_AR5210_BSS_ID1_AID         0xffff0000
00368 #define AR5K_AR5210_BSS_ID1_AID_S       16
00369 
00370 /*
00371  * Backoff slot time register
00372  */
00373 #define AR5K_AR5210_SLOT_TIME   0x8010
00374 
00375 /*
00376  * ACK/CTS timeout register
00377  */
00378 #define AR5K_AR5210_TIME_OUT            0x8014
00379 #define AR5K_AR5210_TIME_OUT_ACK        0x00001fff
00380 #define AR5K_AR5210_TIME_OUT_ACK_S      0
00381 #define AR5K_AR5210_TIME_OUT_CTS        0x1fff0000
00382 #define AR5K_AR5210_TIME_OUT_CTS_S      16
00383 
00384 /*
00385  * RSSI threshold register
00386  */
00387 #define AR5K_AR5210_RSSI_THR            0x8018
00388 #define AR5K_AR5210_RSSI_THR_BM_THR     0x00000700
00389 #define AR5K_AR5210_RSSI_THR_BM_THR_S   8
00390 
00391 /*
00392  * Retry limit register
00393  */
00394 #define AR5K_AR5210_RETRY_LMT                   0x801c
00395 #define AR5K_AR5210_RETRY_LMT_SH_RETRY          0x0000000f
00396 #define AR5K_AR5210_RETRY_LMT_SH_RETRY_S        0
00397 #define AR5K_AR5210_RETRY_LMT_LG_RETRY          0x000000f0
00398 #define AR5K_AR5210_RETRY_LMT_LG_RETRY_S        4
00399 #define AR5K_AR5210_RETRY_LMT_SSH_RETRY         0x00003f00
00400 #define AR5K_AR5210_RETRY_LMT_SSH_RETRY_S       8
00401 #define AR5K_AR5210_RETRY_LMT_SLG_RETRY         0x000fc000
00402 #define AR5K_AR5210_RETRY_LMT_SLG_RETRY_S       14
00403 #define AR5K_AR5210_RETRY_LMT_CW_MIN            0x3ff00000
00404 #define AR5K_AR5210_RETRY_LMT_CW_MIN_S          20
00405 
00406 /*
00407  * Transmit latency register
00408  */
00409 #define AR5K_AR5210_USEC                0x8020
00410 #define AR5K_AR5210_USEC_1              0x0000007f
00411 #define AR5K_AR5210_USEC_1_S            0
00412 #define AR5K_AR5210_USEC_32             0x00003f80
00413 #define AR5K_AR5210_USEC_32_S           7
00414 #define AR5K_AR5210_USEC_TX_LATENCY     0x000fc000
00415 #define AR5K_AR5210_USEC_TX_LATENCY_S   14
00416 #define AR5K_AR5210_USEC_RX_LATENCY     0x03f00000
00417 #define AR5K_AR5210_USEC_RX_LATENCY_S   20
00418 
00419 /*
00420  * PCU beacon control register
00421  */
00422 #define AR5K_AR5210_BEACON              0x8024
00423 #define AR5K_AR5210_BEACON_PERIOD       0x0000ffff
00424 #define AR5K_AR5210_BEACON_PERIOD_S     0
00425 #define AR5K_AR5210_BEACON_TIM          0x007f0000
00426 #define AR5K_AR5210_BEACON_TIM_S        16
00427 #define AR5K_AR5210_BEACON_EN           0x00800000
00428 #define AR5K_AR5210_BEACON_RESET_TSF    0x01000000
00429 
00430 /*
00431  * CFP period register
00432  */
00433 #define AR5K_AR5210_CFP_PERIOD          0x8028
00434 
00435 /*
00436  * Next beacon time register
00437  */
00438 #define AR5K_AR5210_TIMER0              0x802c
00439 
00440 /*
00441  * Next DMA beacon alert register
00442  */
00443 #define AR5K_AR5210_TIMER1              0x8030
00444 
00445 /*
00446  * Next software beacon alert register
00447  */
00448 #define AR5K_AR5210_TIMER2              0x8034
00449 
00450 /*
00451  * Next ATIM window time register
00452  */
00453 #define AR5K_AR5210_TIMER3              0x8038
00454 
00455 /*
00456  * First inter frame spacing register (IFS)
00457  */
00458 #define AR5K_AR5210_IFS0                0x8040
00459 #define AR5K_AR5210_IFS0_SIFS           0x000007ff
00460 #define AR5K_AR5210_IFS0_SIFS_S         0
00461 #define AR5K_AR5210_IFS0_DIFS           0x007ff800
00462 #define AR5K_AR5210_IFS0_DIFS_S         11
00463 
00464 /*
00465  * Second inter frame spacing register (IFS)
00466  */
00467 #define AR5K_AR5210_IFS1                0x8044
00468 #define AR5K_AR5210_IFS1_PIFS           0x00000fff
00469 #define AR5K_AR5210_IFS1_PIFS_S         0
00470 #define AR5K_AR5210_IFS1_EIFS           0x03fff000
00471 #define AR5K_AR5210_IFS1_EIFS_S         12
00472 #define AR5K_AR5210_IFS1_CS_EN          0x04000000
00473 
00474 /*
00475  * CFP duration register
00476  */
00477 #define AR5K_AR5210_CFP_DUR             0x8048
00478 
00479 /*
00480  * Receive filter register
00481  */
00482 #define AR5K_AR5210_RX_FILTER           0x804c
00483 #define AR5K_AR5210_RX_FILTER_UNICAST   0x00000001
00484 #define AR5K_AR5210_RX_FILTER_MULTICAST 0x00000002
00485 #define AR5K_AR5210_RX_FILTER_BROADCAST 0x00000004
00486 #define AR5K_AR5210_RX_FILTER_CONTROL   0x00000008
00487 #define AR5K_AR5210_RX_FILTER_BEACON    0x00000010
00488 #define AR5K_AR5210_RX_FILTER_PROMISC   0x00000020
00489 
00490 /*
00491  * Multicast filter register (lower 32 bits)
00492  */
00493 #define AR5K_AR5210_MCAST_FIL0  0x8050
00494 
00495 /*
00496  * Multicast filter register (higher 16 bits)
00497  */
00498 #define AR5K_AR5210_MCAST_FIL1  0x8054
00499 
00500 /*
00501  * Transmit mask register (lower 32 bits)
00502  */
00503 #define AR5K_AR5210_TX_MASK0    0x8058
00504 
00505 /*
00506  * Transmit mask register (higher 16 bits)
00507  */
00508 #define AR5K_AR5210_TX_MASK1    0x805c
00509 
00510 /*
00511  * Clear transmit mask
00512  */
00513 #define AR5K_AR5210_CLR_TMASK   0x8060
00514 
00515 /*
00516  * Trigger level register (before transmission)
00517  */
00518 #define AR5K_AR5210_TRIG_LVL    0x8064
00519 
00520 /*
00521  * PCU control register
00522  */
00523 #define AR5K_AR5210_DIAG_SW                     0x8068
00524 #define AR5K_AR5210_DIAG_SW_DIS_WEP_ACK         0x00000001
00525 #define AR5K_AR5210_DIAG_SW_DIS_ACK             0x00000002
00526 #define AR5K_AR5210_DIAG_SW_DIS_CTS             0x00000004
00527 #define AR5K_AR5210_DIAG_SW_DIS_ENC             0x00000008
00528 #define AR5K_AR5210_DIAG_SW_DIS_DEC             0x00000010
00529 #define AR5K_AR5210_DIAG_SW_DIS_TX              0x00000020
00530 #define AR5K_AR5210_DIAG_SW_DIS_RX              0x00000040
00531 #define AR5K_AR5210_DIAG_SW_LOOP_BACK           0x00000080
00532 #define AR5K_AR5210_DIAG_SW_CORR_FCS            0x00000100
00533 #define AR5K_AR5210_DIAG_SW_CHAN_INFO           0x00000200
00534 #define AR5K_AR5210_DIAG_SW_EN_SCRAM_SEED       0x00000400
00535 #define AR5K_AR5210_DIAG_SW_SCVRAM_SEED         0x0003f800
00536 #define AR5K_AR5210_DIAG_SW_DIS_SEQ_INC         0x00040000
00537 #define AR5K_AR5210_DIAG_SW_FRAME_NV0           0x00080000
00538 
00539 /*
00540  * TSF (clock) register (lower 32 bits)
00541  */
00542 #define AR5K_AR5210_TSF_L32     0x806c
00543 
00544 /*
00545  * TSF (clock) register (higher 32 bits)
00546  */
00547 #define AR5K_AR5210_TSF_U32     0x8070
00548 
00549 /*
00550  * Last beacon timestamp register
00551  */
00552 #define AR5K_AR5210_LAST_TSTP   0x8080
00553 
00554 /*
00555  * Retry count register
00556  */
00557 #define AR5K_AR5210_RETRY_CNT           0x8084
00558 #define AR5K_AR5210_RETRY_CNT_SSH       0x0000003f
00559 #define AR5K_AR5210_RETRY_CNT_SLG       0x00000fc0
00560 
00561 /*
00562  * Back-off status register
00563  */
00564 #define AR5K_AR5210_BACKOFF             0x8088
00565 #define AR5K_AR5210_BACKOFF_CW          0x000003ff
00566 #define AR5K_AR5210_BACKOFF_CNT         0x03ff0000
00567 
00568 /*
00569  * NAV register (current)
00570  */
00571 #define AR5K_AR5210_NAV         0x808c
00572 
00573 /*
00574  * RTS success register
00575  */
00576 #define AR5K_AR5210_RTS_OK      0x8090
00577 
00578 /*
00579  * RTS failure register
00580  */
00581 #define AR5K_AR5210_RTS_FAIL    0x8094
00582 
00583 /*
00584  * ACK failure register
00585  */
00586 #define AR5K_AR5210_ACK_FAIL    0x8098
00587 
00588 /*
00589  * FCS failure register
00590  */
00591 #define AR5K_AR5210_FCS_FAIL    0x809c
00592 
00593 /*
00594  * Beacon count register
00595  */
00596 #define AR5K_AR5210_BEACON_CNT  0x80a0
00597 
00598 /*
00599  * Key table (WEP) register
00600  */
00601 #define AR5K_AR5210_KEYTABLE_0          0x9000
00602 #define AR5K_AR5210_KEYTABLE(n)         (AR5K_AR5210_KEYTABLE_0 + ((n) << 5))
00603 #define AR5K_AR5210_KEYTABLE_OFF(_n, x) (AR5K_AR5210_KEYTABLE(_n) + (x << 2))
00604 #define AR5K_AR5210_KEYTABLE_TYPE(_n)   AR5K_AR5210_KEYTABLE_OFF(_n, 5)
00605 #define AR5K_AR5210_KEYTABLE_TYPE_40    0x00000000
00606 #define AR5K_AR5210_KEYTABLE_TYPE_104   0x00000001
00607 #define AR5K_AR5210_KEYTABLE_TYPE_128   0x00000003
00608 #define AR5K_AR5210_KEYTABLE_MAC0(_n)   AR5K_AR5210_KEYTABLE_OFF(_n, 6)
00609 #define AR5K_AR5210_KEYTABLE_MAC1(_n)   AR5K_AR5210_KEYTABLE_OFF(_n, 7)
00610 #define AR5K_AR5210_KEYTABLE_VALID      0x00008000
00611 
00612 #define AR5K_AR5210_KEYTABLE_SIZE       64
00613 #define AR5K_AR5210_KEYCACHE_SIZE       8
00614 
00615 /*
00616  * PHY register
00617  */
00618 #define AR5K_AR5210_PHY(_n)     (0x9800 + ((_n) << 2))
00619 
00620 /*
00621  * PHY frame control register
00622  */
00623 #define AR5K_AR5210_PHY_FC              0x9804
00624 #define AR5K_AR5210_PHY_FC_TURBO_MODE   0x00000001
00625 #define AR5K_AR5210_PHY_FC_TURBO_SHORT  0x00000002
00626 #define AR5K_AR5210_PHY_FC_TIMING_ERR   0x01000000
00627 #define AR5K_AR5210_PHY_FC_PARITY_ERR   0x02000000
00628 #define AR5K_AR5210_PHY_FC_ILLRATE_ERR  0x04000000
00629 #define AR5K_AR5210_PHY_FC_ILLLEN_ERR   0x08000000
00630 #define AR5K_AR5210_PHY_FC_SERVICE_ERR  0x20000000
00631 #define AR5K_AR5210_PHY_FC_TXURN_ERR    0x40000000
00632 
00633 /*
00634  * PHY agility command register
00635  */
00636 #define AR5K_AR5210_PHY_AGC             0x9808
00637 #define AR5K_AR5210_PHY_AGC_DISABLE     0x08000000
00638 
00639 /*
00640  * PHY chip revision register
00641  */
00642 #define AR5K_AR5210_PHY_CHIP_ID         0x9818
00643 
00644 /*
00645  * PHY activation register
00646  */
00647 #define AR5K_AR5210_PHY_ACTIVE          0x981c
00648 #define AR5K_AR5210_PHY_ENABLE          0x00000001
00649 #define AR5K_AR5210_PHY_DISABLE         0x00000002
00650 
00651 /*
00652  * PHY signal register
00653  */
00654 #define AR5K_AR5210_PHY_SIG             0x9858
00655 #define AR5K_AR5210_PHY_SIG_FIRSTEP     0x0003f000
00656 #define AR5K_AR5210_PHY_SIG_FIRSTEP_S   12
00657 #define AR5K_AR5210_PHY_SIG_FIRPWR      0x03fc0000
00658 #define AR5K_AR5210_PHY_SIG_FIRPWR_S    18
00659 
00660 /*
00661  * PHY coarse agility control register
00662  */
00663 #define AR5K_AR5210_PHY_AGCCOARSE       0x985c
00664 #define AR5K_AR5210_PHY_AGCCOARSE_LO    0x00007f80
00665 #define AR5K_AR5210_PHY_AGCCOARSE_LO_S  7
00666 #define AR5K_AR5210_PHY_AGCCOARSE_HI    0x003f8000
00667 #define AR5K_AR5210_PHY_AGCCOARSE_HI_S  15
00668 
00669 /*
00670  * PHY agility control register
00671  */
00672 #define AR5K_AR5210_PHY_AGCCTL          0x9860
00673 #define AR5K_AR5210_PHY_AGCCTL_CAL      0x00000001
00674 #define AR5K_AR5210_PHY_AGCCTL_NF       0x00000002
00675 
00676 /*
00677  * PHY noise floor status register
00678  */
00679 #define AR5K_AR5210_PHY_NF              0x9864
00680 #define AR5K_AR5210_PHY_NF_M            0x000001ff
00681 #define AR5K_AR5210_PHY_NF_ACTIVE       0x00000100
00682 #define AR5K_AR5210_PHY_NF_RVAL(_n)     (((_n) >> 19) & AR5K_AR5210_PHY_NF_M)
00683 #define AR5K_AR5210_PHY_NF_AVAL(_n)     (-((_n) ^ AR5K_AR5210_PHY_NF_M) + 1)
00684 
00685 /*
00686  * PHY ADC saturation register
00687  */
00688 #define AR5K_AR5210_PHY_ADCSAT          0x9868
00689 #define AR5K_AR5210_PHY_ADCSAT_ICNT     0x0001f800
00690 #define AR5K_AR5210_PHY_ADCSAT_ICNT_S   11
00691 #define AR5K_AR5210_PHY_ADCSAT_THR      0x000007e0
00692 #define AR5K_AR5210_PHY_ADCSAT_THR_S    5
00693 
00694 /*
00695  * PHY RF stage register
00696  */
00697 #define AR5K_AR5210_PHY_RFSTG           0x98d4
00698 #define AR5K_AR5210_PHY_RFSTG_DISABLE   0x00000021
00699 
00700 /*
00701  * Misc PHY/radio registers
00702  */
00703 #define AR5K_AR5210_BB_GAIN(_n)         (0x9b00 + ((_n) << 2))
00704 #define AR5K_AR5210_RF_GAIN(_n)         (0x9a00 + ((_n) << 2))
00705 
00706 #endif

Generated on Mon Nov 21 15:58:10 2005 for openwifi by  doxygen 1.4.1