if_anreg.h (110531) | if_anreg.h (119156) |
---|---|
1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * | 1/* 2 * Copyright (c) 1997, 1998, 1999 3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 30 * THE POSSIBILITY OF SUCH DAMAGE. 31 * |
32 * $FreeBSD: head/sys/dev/an/if_anreg.h 110531 2003-02-08 04:41:17Z ambrisko $ | 32 * $FreeBSD: head/sys/dev/an/if_anreg.h 119156 2003-08-20 03:46:05Z ambrisko $ |
33 */ 34 35#define AN_TIMEOUT 65536 36 37/* Default network name: <empty string> */ 38#define AN_DEFAULT_NETNAME "" 39 40/* The nodename must be less than 16 bytes */ --- 49 unchanged lines hidden (view full) --- 90/* 91 * Size of Aironet I/O space. 92 */ 93#define AN_IOSIZ 0x40 94 95/* 96 * Size of aux. memory space ... probably not needed DJA 97 */ | 33 */ 34 35#define AN_TIMEOUT 65536 36 37/* Default network name: <empty string> */ 38#define AN_DEFAULT_NETNAME "" 39 40/* The nodename must be less than 16 bytes */ --- 49 unchanged lines hidden (view full) --- 90/* 91 * Size of Aironet I/O space. 92 */ 93#define AN_IOSIZ 0x40 94 95/* 96 * Size of aux. memory space ... probably not needed DJA 97 */ |
98#define AN_AUXMEMSIZE (256 * 1024) | 98#define AN_AUX_MEM_SIZE (256 * 1024) |
99 100/* 101 * Hermes register definitions and what little I know about them. 102 */ 103 104/* Hermes command/status registers. */ 105#define AN_COMMAND(x) (x ? 0x00 : 0x00) 106#define AN_PARAM0(x) (x ? 0x04 : 0x02) --- 69 unchanged lines hidden (view full) --- 176{ 177 unsigned an_offset:15; 178 unsigned an_eoc:1; 179 unsigned an_len:15; 180 unsigned an_valid:1; 181 u_int64_t an_phys; 182}; 183 | 99 100/* 101 * Hermes register definitions and what little I know about them. 102 */ 103 104/* Hermes command/status registers. */ 105#define AN_COMMAND(x) (x ? 0x00 : 0x00) 106#define AN_PARAM0(x) (x ? 0x04 : 0x02) --- 69 unchanged lines hidden (view full) --- 176{ 177 unsigned an_offset:15; 178 unsigned an_eoc:1; 179 unsigned an_len:15; 180 unsigned an_valid:1; 181 u_int64_t an_phys; 182}; 183 |
184#define AN_RID_BUFFER_SIZE 2048 185#define AN_RX_BUFFER_SIZE 1840 186#define AN_TX_BUFFER_SIZE 1840 187#define AN_HOST_DESC_OFFSET 0x8 | 184#define AN_RID_BUFFER_SIZE AN_MAX_DATALEN 185#define AN_RX_BUFFER_SIZE AN_HOSTBUFSIZ 186#define AN_TX_BUFFER_SIZE AN_HOSTBUFSIZ 187/*#define AN_HOST_DESC_OFFSET 0xC sort of works */ 188#define AN_HOST_DESC_OFFSET 0x800 |
188#define AN_RX_DESC_OFFSET (AN_HOST_DESC_OFFSET + \ 189 sizeof(struct an_card_rid_desc)) 190#define AN_TX_DESC_OFFSET (AN_RX_DESC_OFFSET + \ 191 (AN_MAX_RX_DESC * sizeof(struct an_card_rx_desc))) 192 193struct an_command { 194 u_int16_t an_cmd; 195 u_int16_t an_parm0; --- 42 unchanged lines hidden (view full) --- 238#define AN_LINKSTAT_SYNCLOST_HOSTREQ 0x8003 239#define AN_LINKSTAT_SYNCLOST_AVGRETRY 0x8002 240#define AN_LINKSTAT_SYNCLOST_MAXRETRY 0x8001 241#define AN_LINKSTAT_SYNCLOST_MISSBEACON 0x8000 242 243/* memory handle management registers */ 244#define AN_RX_FID 0x20 245#define AN_ALLOC_FID 0x22 | 189#define AN_RX_DESC_OFFSET (AN_HOST_DESC_OFFSET + \ 190 sizeof(struct an_card_rid_desc)) 191#define AN_TX_DESC_OFFSET (AN_RX_DESC_OFFSET + \ 192 (AN_MAX_RX_DESC * sizeof(struct an_card_rx_desc))) 193 194struct an_command { 195 u_int16_t an_cmd; 196 u_int16_t an_parm0; --- 42 unchanged lines hidden (view full) --- 239#define AN_LINKSTAT_SYNCLOST_HOSTREQ 0x8003 240#define AN_LINKSTAT_SYNCLOST_AVGRETRY 0x8002 241#define AN_LINKSTAT_SYNCLOST_MAXRETRY 0x8001 242#define AN_LINKSTAT_SYNCLOST_MISSBEACON 0x8000 243 244/* memory handle management registers */ 245#define AN_RX_FID 0x20 246#define AN_ALLOC_FID 0x22 |
246#define AN_TX_CMP_FID 0x24 | 247#define AN_TX_CMP_FID(x) (x ? 0x1a : 0x24) |
247 248/* 249 * Buffer Access Path (BAP) registers. 250 * These are I/O channels. I believe you can use each one for 251 * any desired purpose independently of the other. In general 252 * though, we use BAP1 for reading and writing LTV records and 253 * reading received data frames, and BAP0 for writing transmit 254 * frames. This is a convention though, not a rule. --- 16 unchanged lines hidden (view full) --- 271#define AN_EVENT_STAT(x) (x ? 0x60 : 0x30) /* Event status */ 272#define AN_INT_EN(x) (x ? 0x64 : 0x32) /* Interrupt enable/ 273 disable */ 274#define AN_EVENT_ACK(x) (x ? 0x68 : 0x34) /* Ack event */ 275 276/* Events */ 277#define AN_EV_CLR_STUCK_BUSY 0x4000 /* clear stuck busy bit */ 278#define AN_EV_WAKEREQUEST 0x2000 /* awaken from PSP mode */ | 248 249/* 250 * Buffer Access Path (BAP) registers. 251 * These are I/O channels. I believe you can use each one for 252 * any desired purpose independently of the other. In general 253 * though, we use BAP1 for reading and writing LTV records and 254 * reading received data frames, and BAP0 for writing transmit 255 * frames. This is a convention though, not a rule. --- 16 unchanged lines hidden (view full) --- 272#define AN_EVENT_STAT(x) (x ? 0x60 : 0x30) /* Event status */ 273#define AN_INT_EN(x) (x ? 0x64 : 0x32) /* Interrupt enable/ 274 disable */ 275#define AN_EVENT_ACK(x) (x ? 0x68 : 0x34) /* Ack event */ 276 277/* Events */ 278#define AN_EV_CLR_STUCK_BUSY 0x4000 /* clear stuck busy bit */ 279#define AN_EV_WAKEREQUEST 0x2000 /* awaken from PSP mode */ |
280#define AN_EV_MIC 0x1000 /* Message Integrity Check*/ |
|
279#define AN_EV_AWAKE 0x0100 /* station woke up from PSP mode*/ 280#define AN_EV_LINKSTAT 0x0080 /* link status available */ 281#define AN_EV_CMD 0x0010 /* command completed */ 282#define AN_EV_ALLOC 0x0008 /* async alloc/reclaim completed */ | 281#define AN_EV_AWAKE 0x0100 /* station woke up from PSP mode*/ 282#define AN_EV_LINKSTAT 0x0080 /* link status available */ 283#define AN_EV_CMD 0x0010 /* command completed */ 284#define AN_EV_ALLOC 0x0008 /* async alloc/reclaim completed */ |
285#define AN_EV_TX_CPY 0x0400 |
|
283#define AN_EV_TX_EXC 0x0004 /* async xmit completed with failure */ 284#define AN_EV_TX 0x0002 /* async xmit completed succesfully */ 285#define AN_EV_RX 0x0001 /* async rx completed */ 286 | 286#define AN_EV_TX_EXC 0x0004 /* async xmit completed with failure */ 287#define AN_EV_TX 0x0002 /* async xmit completed succesfully */ 288#define AN_EV_RX 0x0001 /* async rx completed */ 289 |
287#define AN_INTRS \ 288 (AN_EV_RX|AN_EV_TX|AN_EV_TX_EXC|AN_EV_ALLOC|AN_EV_LINKSTAT) | 290#define AN_INTRS(x) \ 291 ( x ? (AN_EV_RX|AN_EV_TX|AN_EV_TX_EXC|AN_EV_TX_CPY|AN_EV_ALLOC \ 292 |AN_EV_LINKSTAT|AN_EV_MIC) \ 293 : \ 294 (AN_EV_RX|AN_EV_TX|AN_EV_TX_EXC|AN_EV_ALLOC \ 295 |AN_EV_LINKSTAT|AN_EV_MIC) \ 296 ) |
289 290/* Host software registers */ 291#define AN_SW0(x) (x ? 0x50 : 0x28) 292#define AN_SW1(x) (x ? 0x54 : 0x2A) 293#define AN_SW2(x) (x ? 0x58 : 0x2C) 294#define AN_SW3(x) (x ? 0x5c : 0x2E) 295 296#define AN_CNTL 0x14 --- 156 unchanged lines hidden (view full) --- 453 bus_space_tag_t an_btag; 454 bus_space_handle_t an_mem_bhandle; 455 bus_space_tag_t an_mem_btag; 456 bus_space_handle_t an_mem_aux_bhandle; 457 bus_space_tag_t an_mem_aux_btag; 458 bus_dma_tag_t an_dtag; 459 struct an_ltv_genconfig an_config; 460 struct an_ltv_caps an_caps; | 297 298/* Host software registers */ 299#define AN_SW0(x) (x ? 0x50 : 0x28) 300#define AN_SW1(x) (x ? 0x54 : 0x2A) 301#define AN_SW2(x) (x ? 0x58 : 0x2C) 302#define AN_SW3(x) (x ? 0x5c : 0x2E) 303 304#define AN_CNTL 0x14 --- 156 unchanged lines hidden (view full) --- 461 bus_space_tag_t an_btag; 462 bus_space_handle_t an_mem_bhandle; 463 bus_space_tag_t an_mem_btag; 464 bus_space_handle_t an_mem_aux_bhandle; 465 bus_space_tag_t an_mem_aux_btag; 466 bus_dma_tag_t an_dtag; 467 struct an_ltv_genconfig an_config; 468 struct an_ltv_caps an_caps; |
461 struct an_ltv_ssidlist an_ssidlist; | 469 struct an_ltv_ssidlist_new an_ssidlist; |
462 struct an_ltv_aplist an_aplist; 463 struct an_ltv_key an_temp_keys[4]; 464 int an_tx_rate; 465 int an_rxmode; 466 int an_gone; 467 int an_if_flags; 468 u_int8_t an_txbuf[1536]; 469 struct an_tx_ring_data an_rdata; --- 76 unchanged lines hidden --- | 470 struct an_ltv_aplist an_aplist; 471 struct an_ltv_key an_temp_keys[4]; 472 int an_tx_rate; 473 int an_rxmode; 474 int an_gone; 475 int an_if_flags; 476 u_int8_t an_txbuf[1536]; 477 struct an_tx_ring_data an_rdata; --- 76 unchanged lines hidden --- |