1*2725e0dcSjsg /* $OpenBSD: anreg.h,v 1.12 2007/10/05 23:23:55 jsg Exp $ */ 204c2c6edSjsg /* $NetBSD: anreg.h,v 1.11 2005/01/15 11:01:46 dyoung Exp $ */ 3d7f83212Smickey /* 4d7f83212Smickey * Copyright (c) 1997, 1998, 1999 5d7f83212Smickey * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 6d7f83212Smickey * 7d7f83212Smickey * Redistribution and use in source and binary forms, with or without 8d7f83212Smickey * modification, are permitted provided that the following conditions 9d7f83212Smickey * are met: 10d7f83212Smickey * 1. Redistributions of source code must retain the above copyright 11d7f83212Smickey * notice, this list of conditions and the following disclaimer. 12d7f83212Smickey * 2. Redistributions in binary form must reproduce the above copyright 13d7f83212Smickey * notice, this list of conditions and the following disclaimer in the 14d7f83212Smickey * documentation and/or other materials provided with the distribution. 15d7f83212Smickey * 3. All advertising materials mentioning features or use of this software 16d7f83212Smickey * must display the following acknowledgement: 17d7f83212Smickey * This product includes software developed by Bill Paul. 18d7f83212Smickey * 4. Neither the name of the author nor the names of any co-contributors 19d7f83212Smickey * may be used to endorse or promote products derived from this software 20d7f83212Smickey * without specific prior written permission. 21d7f83212Smickey * 22d7f83212Smickey * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 23d7f83212Smickey * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24d7f83212Smickey * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25d7f83212Smickey * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD 26d7f83212Smickey * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27d7f83212Smickey * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28d7f83212Smickey * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29d7f83212Smickey * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30d7f83212Smickey * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31d7f83212Smickey * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 32d7f83212Smickey * THE POSSIBILITY OF SUCH DAMAGE. 33d7f83212Smickey * 3404c2c6edSjsg * $FreeBSD: src/sys/dev/an/if_anreg.h,v 1.3 2000/11/13 23:04:12 wpaul Exp $ 35d7f83212Smickey */ 36d7f83212Smickey 3704c2c6edSjsg #ifndef _DEV_IC_ANREG_H 3804c2c6edSjsg #define _DEV_IC_ANREG_H 39d7f83212Smickey 40d7f83212Smickey /* 41d7f83212Smickey * Size of Aironet I/O space. 42d7f83212Smickey */ 43d7f83212Smickey #define AN_IOSIZ 0x40 44d7f83212Smickey 45d7f83212Smickey /* 46d7f83212Smickey * Hermes register definitions and what little I know about them. 47d7f83212Smickey */ 48d7f83212Smickey 49d7f83212Smickey /* Hermes command/status registers. */ 50d7f83212Smickey #define AN_COMMAND 0x00 51d7f83212Smickey #define AN_PARAM0 0x02 52d7f83212Smickey #define AN_PARAM1 0x04 53d7f83212Smickey #define AN_PARAM2 0x06 54d7f83212Smickey #define AN_STATUS 0x08 55d7f83212Smickey #define AN_RESP0 0x0A 56d7f83212Smickey #define AN_RESP1 0x0C 57d7f83212Smickey #define AN_RESP2 0x0E 58d7f83212Smickey #define AN_LINKSTAT 0x10 59d7f83212Smickey 60d7f83212Smickey /* Command register */ 61d7f83212Smickey #define AN_CMD_BUSY 0x8000 /* busy bit */ 62d7f83212Smickey #define AN_CMD_NO_ACK 0x0080 /* don't acknowledge command */ 63d7f83212Smickey #define AN_CMD_CODE_MASK 0x003F 64d7f83212Smickey #define AN_CMD_QUAL_MASK 0x7F00 65d7f83212Smickey 66d7f83212Smickey /* Command codes */ 67d7f83212Smickey #define AN_CMD_NOOP 0x0000 /* no-op */ 68d7f83212Smickey #define AN_CMD_ENABLE 0x0001 /* enable */ 69d7f83212Smickey #define AN_CMD_DISABLE 0x0002 /* disable */ 70d7f83212Smickey #define AN_CMD_FORCE_SYNCLOSS 0x0003 /* force loss of sync */ 71d7f83212Smickey #define AN_CMD_FW_RESTART 0x0004 /* firmware resrart */ 72d7f83212Smickey #define AN_CMD_HOST_SLEEP 0x0005 73d7f83212Smickey #define AN_CMD_MAGIC_PKT 0x0006 74d7f83212Smickey #define AN_CMD_READCFG 0x0008 75c2cb52f4Smickey #define AN_CMD_SET_MODE 0x0009 76d7f83212Smickey #define AN_CMD_ALLOC_MEM 0x000A /* allocate NIC memory */ 77d7f83212Smickey #define AN_CMD_TX 0x000B /* transmit */ 78d7f83212Smickey #define AN_CMD_DEALLOC_MEM 0x000C 79d7f83212Smickey #define AN_CMD_NOOP2 0x0010 80d7f83212Smickey #define AN_CMD_ACCESS 0x0021 81d7f83212Smickey #define AN_CMD_ALLOC_BUF 0x0028 82d7f83212Smickey #define AN_CMD_PSP_NODES 0x0030 83d7f83212Smickey #define AN_CMD_SET_PHYREG 0x003E 84d7f83212Smickey #define AN_CMD_TX_TEST 0x003F 85d7f83212Smickey #define AN_CMD_SLEEP 0x0085 86d7f83212Smickey #define AN_CMD_SAVECFG 0x0108 87d7f83212Smickey 88d7f83212Smickey /* 89d7f83212Smickey * Reclaim qualifier bit, applicable to the 90d7f83212Smickey * TX command. 91d7f83212Smickey */ 92d7f83212Smickey #define AN_RECLAIM 0x0100 /* reclaim NIC memory */ 93d7f83212Smickey 94d7f83212Smickey /* 95d7f83212Smickey * ACCESS command qualifier bits. 96d7f83212Smickey */ 97d7f83212Smickey #define AN_ACCESS_READ 0x0000 98d7f83212Smickey #define AN_ACCESS_WRITE 0x0100 99d7f83212Smickey 100d7f83212Smickey /* 101d7f83212Smickey * PROGRAM command qualifier bits. 102d7f83212Smickey */ 103d7f83212Smickey #define AN_PROGRAM_DISABLE 0x0000 104d7f83212Smickey #define AN_PROGRAM_ENABLE_RAM 0x0100 105d7f83212Smickey #define AN_PROGRAM_ENABLE_NVRAM 0x0200 106d7f83212Smickey #define AN_PROGRAM_NVRAM 0x0300 107d7f83212Smickey 108d7f83212Smickey /* Status register values */ 109d7f83212Smickey #define AN_STAT_CMD_CODE 0x003F 110d7f83212Smickey #define AN_STAT_CMD_RESULT 0x7F00 111d7f83212Smickey 112d7f83212Smickey /* Linkstat register */ 113d7f83212Smickey #define AN_LINKSTAT_ASSOCIATED 0x0400 114d7f83212Smickey #define AN_LINKSTAT_AUTHFAIL 0x0300 115d7f83212Smickey #define AN_LINKSTAT_ASSOC_FAIL 0x8400 116d7f83212Smickey #define AN_LINKSTAT_DISASSOC 0x8200 117d7f83212Smickey #define AN_LINKSTAT_DEAUTH 0x8100 118d7f83212Smickey #define AN_LINKSTAT_SYNCLOST_TSF 0x8004 119d7f83212Smickey #define AN_LINKSTAT_SYNCLOST_HOSTREQ 0x8003 120d7f83212Smickey #define AN_LINKSTAT_SYNCLOST_AVGRETRY 0x8002 121d7f83212Smickey #define AN_LINKSTAT_SYNCLOST_MAXRETRY 0x8001 122d7f83212Smickey #define AN_LINKSTAT_SYNCLOST_MISSBEACON 0x8000 123d7f83212Smickey 124d7f83212Smickey /* memory handle management registers */ 125d7f83212Smickey #define AN_RX_FID 0x20 126d7f83212Smickey #define AN_ALLOC_FID 0x22 127d7f83212Smickey #define AN_TX_CMP_FID 0x24 128d7f83212Smickey 129d7f83212Smickey /* 130d7f83212Smickey * Buffer Access Path (BAP) registers. 131d7f83212Smickey * These are I/O channels. I believe you can use each one for 132d7f83212Smickey * any desired purpose independently of the other. In general 133d7f83212Smickey * though, we use BAP1 for reading and writing LTV records and 134d7f83212Smickey * reading received data frames, and BAP0 for writing transmit 135d7f83212Smickey * frames. This is a convention though, not a rule. 136d7f83212Smickey */ 137d7f83212Smickey #define AN_SEL0 0x18 138d7f83212Smickey #define AN_SEL1 0x1A 139d7f83212Smickey #define AN_OFF0 0x1C 140d7f83212Smickey #define AN_OFF1 0x1E 141d7f83212Smickey #define AN_DATA0 0x36 142d7f83212Smickey #define AN_DATA1 0x38 143d7f83212Smickey #define AN_BAP0 AN_DATA0 144d7f83212Smickey #define AN_BAP1 AN_DATA1 145d7f83212Smickey 146d7f83212Smickey #define AN_OFF_BUSY 0x8000 147d7f83212Smickey #define AN_OFF_ERR 0x4000 148d7f83212Smickey #define AN_OFF_DONE 0x2000 149d7f83212Smickey #define AN_OFF_DATAOFF 0x0FFF 150d7f83212Smickey 151d7f83212Smickey /* Event registers */ 152d7f83212Smickey #define AN_EVENT_STAT 0x30 /* Event status */ 153d7f83212Smickey #define AN_INT_EN 0x32 /* Interrupt enable/disable */ 154d7f83212Smickey #define AN_EVENT_ACK 0x34 /* Ack event */ 155d7f83212Smickey 156d7f83212Smickey /* Events */ 157d7f83212Smickey #define AN_EV_CLR_STUCK_BUSY 0x4000 /* clear stuck busy bit */ 158d7f83212Smickey #define AN_EV_WAKEREQUEST 0x2000 /* awaken from PSP mode */ 15904c2c6edSjsg #define AN_EV_MIC 0x1000 /* Message Integrity Check*/ 16004c2c6edSjsg #define AN_EV_TX_CPY 0x0400 161d7f83212Smickey #define AN_EV_AWAKE 0x0100 /* station woke up from PSP mode*/ 162d7f83212Smickey #define AN_EV_LINKSTAT 0x0080 /* link status available */ 163d7f83212Smickey #define AN_EV_CMD 0x0010 /* command completed */ 164d7f83212Smickey #define AN_EV_ALLOC 0x0008 /* async alloc/reclaim completed */ 165d7f83212Smickey #define AN_EV_TX_EXC 0x0004 /* async xmit completed with failure */ 1662408ed96Sjmc #define AN_EV_TX 0x0002 /* async xmit completed successfully */ 167d7f83212Smickey #define AN_EV_RX 0x0001 /* async rx completed */ 168d7f83212Smickey 169d7f83212Smickey /* Host software registers */ 170d7f83212Smickey #define AN_SW0 0x28 171d7f83212Smickey #define AN_SW1 0x2A 172d7f83212Smickey #define AN_SW2 0x2C 173d7f83212Smickey #define AN_SW3 0x2E 174d7f83212Smickey 175d7f83212Smickey #define AN_CNTL 0x14 176d7f83212Smickey 177d7f83212Smickey #define AN_CNTL_AUX_ENA 0xC000 178d7f83212Smickey #define AN_CNTL_AUX_ENA_STAT 0xC000 179d7f83212Smickey #define AN_CNTL_AUX_DIS_STAT 0x0000 180d7f83212Smickey #define AN_CNTL_AUX_ENA_CNTL 0x8000 181d7f83212Smickey #define AN_CNTL_AUX_DIS_CNTL 0x4000 182d7f83212Smickey 183d7f83212Smickey #define AN_AUX_PAGE 0x3A 184d7f83212Smickey #define AN_AUX_OFFSET 0x3C 185d7f83212Smickey #define AN_AUX_DATA 0x3E 186d7f83212Smickey 187d7f83212Smickey /* 18804c2c6edSjsg * General configuration information. 189d7f83212Smickey */ 19004c2c6edSjsg #define AN_RID_GENCONFIG 0xFF10 19104c2c6edSjsg struct an_rid_genconfig { 19204c2c6edSjsg /* General configuration. */ 19304c2c6edSjsg u_int16_t an_opmode; /* 0x02 */ 19404c2c6edSjsg u_int16_t an_rxmode; /* 0x04 */ 19504c2c6edSjsg u_int16_t an_fragthresh; /* 0x06 */ 19604c2c6edSjsg u_int16_t an_rtsthresh; /* 0x08 */ 19704c2c6edSjsg u_int8_t an_macaddr[6]; /* 0x0A */ 19804c2c6edSjsg u_int8_t an_rates[8]; /* 0x10 */ 19904c2c6edSjsg u_int16_t an_shortretry_limit; /* 0x18 */ 20004c2c6edSjsg u_int16_t an_longretry_limit; /* 0x1A */ 20104c2c6edSjsg u_int16_t an_tx_msdu_lifetime; /* 0x1C */ 20204c2c6edSjsg u_int16_t an_rx_msdu_lifetime; /* 0x1E */ 20304c2c6edSjsg u_int16_t an_stationary; /* 0x20 */ 20404c2c6edSjsg u_int16_t an_ordering; /* 0x22 */ 20504c2c6edSjsg u_int16_t an_devtype; /* 0x24 */ 20604c2c6edSjsg u_int16_t an_rsvd0[5]; /* 0x26 */ 20704c2c6edSjsg /* Scanning associating. */ 20804c2c6edSjsg u_int16_t an_scanmode; /* 0x30 */ 20904c2c6edSjsg u_int16_t an_probedelay; /* 0x32 */ 21004c2c6edSjsg u_int16_t an_probe_energy_timeout;/* 0x34 */ 21104c2c6edSjsg u_int16_t an_probe_response_timeout;/*0x36 */ 21204c2c6edSjsg u_int16_t an_beacon_listen_timeout;/*0x38 */ 21304c2c6edSjsg u_int16_t an_ibss_join_net_timeout;/*0x3A */ 21404c2c6edSjsg u_int16_t an_auth_timeout; /* 0x3C */ 21504c2c6edSjsg u_int16_t an_authtype; /* 0x3E */ 21604c2c6edSjsg u_int16_t an_assoc_timeout; /* 0x40 */ 21704c2c6edSjsg u_int16_t an_specified_ap_timeout;/* 0x42 */ 21804c2c6edSjsg u_int16_t an_offline_scan_interval;/*0x44 */ 21904c2c6edSjsg u_int16_t an_offline_scan_duration;/*0x46 */ 22004c2c6edSjsg u_int16_t an_link_loss_delay; /* 0x48 */ 22104c2c6edSjsg u_int16_t an_max_beacon_lost_time;/* 0x4A */ 22204c2c6edSjsg u_int16_t an_refresh_interval; /* 0x4C */ 22304c2c6edSjsg u_int16_t an_rsvd1; /* 0x4E */ 22404c2c6edSjsg /* Power save operation */ 22504c2c6edSjsg u_int16_t an_psave_mode; /* 0x50 */ 22604c2c6edSjsg u_int16_t an_sleep_for_dtims; /* 0x52 */ 22704c2c6edSjsg u_int16_t an_listen_interval; /* 0x54 */ 22804c2c6edSjsg u_int16_t an_fast_listen_interval;/* 0x56 */ 22904c2c6edSjsg u_int16_t an_listen_decay; /* 0x58 */ 23004c2c6edSjsg u_int16_t an_fast_listen_decay; /* 0x5A */ 23104c2c6edSjsg u_int16_t an_rsvd2[2]; /* 0x5C */ 23204c2c6edSjsg /* Ad-hoc (or AP) operation. */ 23304c2c6edSjsg u_int16_t an_beacon_period; /* 0x60 */ 23404c2c6edSjsg u_int16_t an_atim_duration; /* 0x62 */ 23504c2c6edSjsg u_int16_t an_rsvd3; /* 0x64 */ 23604c2c6edSjsg u_int16_t an_ds_channel; /* 0x66 */ 23704c2c6edSjsg u_int16_t an_rsvd4; /* 0x68 */ 23804c2c6edSjsg u_int16_t an_dtim_period; /* 0x6A */ 23904c2c6edSjsg u_int16_t an_rsvd5[2]; /* 0x6C */ 24004c2c6edSjsg /* Radio operation. */ 24104c2c6edSjsg u_int16_t an_radiotype; /* 0x70 */ 24204c2c6edSjsg u_int16_t an_diversity; /* 0x72 */ 24304c2c6edSjsg u_int16_t an_tx_power; /* 0x74 */ 24404c2c6edSjsg u_int16_t an_rss_thresh; /* 0x76 */ 24504c2c6edSjsg u_int16_t an_modulation_type; /* 0x78 */ 24604c2c6edSjsg u_int16_t an_short_preamble; /* 0x7A */ 24704c2c6edSjsg u_int16_t an_home_product; /* 0x7C */ 24804c2c6edSjsg u_int16_t an_rsvd6; /* 0x7E */ 24904c2c6edSjsg /* Aironet extensions. */ 25004c2c6edSjsg u_int8_t an_nodename[16]; /* 0x80 */ 25104c2c6edSjsg u_int16_t an_arl_thresh; /* 0x90 */ 25204c2c6edSjsg u_int16_t an_arl_decay; /* 0x92 */ 25304c2c6edSjsg u_int16_t an_arl_delay; /* 0x94 */ 25404c2c6edSjsg u_int8_t an_rsvd7; /* 0x96 */ 25504c2c6edSjsg u_int8_t an_rsvd8; /* 0x97 */ 25604c2c6edSjsg u_int8_t an_magic_packet_action; /* 0x98 */ 25704c2c6edSjsg u_int8_t an_magic_packet_ctl; /* 0x99 */ 25804c2c6edSjsg u_int16_t an_rsvd9; 25904c2c6edSjsg u_int16_t an_spare[24]; 2608bfba773Sgilles } __packed; 261d7f83212Smickey 262d7f83212Smickey #define AN_OPMODE_IBSS_ADHOC 0x0000 263d7f83212Smickey #define AN_OPMODE_INFRASTRUCTURE_STATION 0x0001 264d7f83212Smickey #define AN_OPMODE_AP 0x0002 265d7f83212Smickey #define AN_OPMODE_AP_REPEATER 0x0003 266d7f83212Smickey #define AN_OPMODE_UNMODIFIED_PAYLOAD 0x0100 267d7f83212Smickey #define AN_OPMODE_AIRONET_EXTENSIONS 0x0200 268d7f83212Smickey #define AN_OPMODE_AP_EXTENSIONS 0x0400 26904c2c6edSjsg #define AN_OPMODE_ANTENNA_ALIGN 0x0800 27004c2c6edSjsg #define AN_OPMODE_ETHER_LLC 0x1000 27104c2c6edSjsg #define AN_OPMODE_LEAF_NODE 0x2000 27204c2c6edSjsg #define AN_OPMODE_CF_POLLABLE 0x4000 27304c2c6edSjsg #define AN_OPMODE_MIC 0x8000 274d7f83212Smickey 275d7f83212Smickey #define AN_RXMODE_BC_MC_ADDR 0x0000 276d7f83212Smickey #define AN_RXMODE_BC_ADDR 0x0001 277d7f83212Smickey #define AN_RXMODE_ADDR 0x0002 278d7f83212Smickey #define AN_RXMODE_80211_MONITOR_CURBSS 0x0003 279d7f83212Smickey #define AN_RXMODE_80211_MONITOR_ANYBSS 0x0004 280d7f83212Smickey #define AN_RXMODE_LAN_MONITOR_CURBSS 0x0005 281d7f83212Smickey #define AN_RXMODE_NO_8023_HEADER 0x0100 28204c2c6edSjsg #define AN_RXMODE_NORMALIZED_RSSI 0x0200 283d7f83212Smickey 284d7f83212Smickey #define AN_RATE_1MBPS 0x0002 285d7f83212Smickey #define AN_RATE_2MBPS 0x0004 286d7f83212Smickey #define AN_RATE_5_5MBPS 0x000B 287d7f83212Smickey #define AN_RATE_11MBPS 0x0016 288d7f83212Smickey 289d7f83212Smickey #define AN_DEVTYPE_PC4500 0x0065 290d7f83212Smickey #define AN_DEVTYPE_PC4800 0x006D 291d7f83212Smickey 292d7f83212Smickey #define AN_SCANMODE_ACTIVE 0x0000 293d7f83212Smickey #define AN_SCANMODE_PASSIVE 0x0001 294d7f83212Smickey #define AN_SCANMODE_AIRONET_ACTIVE 0x0002 295d7f83212Smickey 296d7f83212Smickey #define AN_AUTHTYPE_NONE 0x0000 297d7f83212Smickey #define AN_AUTHTYPE_OPEN 0x0001 298d7f83212Smickey #define AN_AUTHTYPE_SHAREDKEY 0x0002 29904c2c6edSjsg #define AN_AUTHTYPE_MASK 0x00ff 3006ebdf338Stholo #define AN_AUTHTYPE_PRIVACY_IN_USE 0x0100 3016ebdf338Stholo #define AN_AUTHTYPE_ALLOW_UNENCRYPTED 0x0200 30204c2c6edSjsg #define AN_AUTHTYPE_LEAP 0x1000 303d7f83212Smickey 30404c2c6edSjsg #define AN_PSAVE_CAM 0x0000 30504c2c6edSjsg #define AN_PSAVE_PSP 0x0001 30604c2c6edSjsg #define AN_PSAVE_PSP_CAM 0x0002 307d7f83212Smickey 308d7f83212Smickey #define AN_RADIOTYPE_80211_FH 0x0001 309d7f83212Smickey #define AN_RADIOTYPE_80211_DS 0x0002 310d7f83212Smickey #define AN_RADIOTYPE_LM2000_DS 0x0004 311d7f83212Smickey 312d7f83212Smickey #define AN_DIVERSITY_FACTORY_DEFAULT 0x0000 313d7f83212Smickey #define AN_DIVERSITY_ANTENNA_1_ONLY 0x0001 314d7f83212Smickey #define AN_DIVERSITY_ANTENNA_2_ONLY 0x0002 315d7f83212Smickey #define AN_DIVERSITY_ANTENNA_1_AND_2 0x0003 316d7f83212Smickey 317d7f83212Smickey #define AN_TXPOWER_FACTORY_DEFAULT 0x0000 318d7f83212Smickey #define AN_TXPOWER_50MW 50 319d7f83212Smickey #define AN_TXPOWER_100MW 100 320d7f83212Smickey #define AN_TXPOWER_250MW 250 321d7f83212Smickey 32204c2c6edSjsg /* 32304c2c6edSjsg * Valid SSID list. You can specify up to three SSIDs denoting 32404c2c6edSjsg * the service sets that you want to join. The first SSID always 32504c2c6edSjsg * defaults to "tsunami" which is a handy way to detect the 32604c2c6edSjsg * card. 32704c2c6edSjsg */ 32804c2c6edSjsg #define AN_RID_SSIDLIST 0xFF11 32904c2c6edSjsg struct an_rid_ssidlist { 33004c2c6edSjsg struct an_rid_ssid_entry { 33104c2c6edSjsg u_int16_t an_ssid_len; 33204c2c6edSjsg char an_ssid[32]; 333*2725e0dcSjsg } __packed an_entry[3]; /* 25 for fwver.5 */ 3348bfba773Sgilles } __packed; 335d7f83212Smickey 33604c2c6edSjsg /* 33704c2c6edSjsg * Valid AP list. 33804c2c6edSjsg */ 33904c2c6edSjsg #define AN_RID_APLIST 0xFF12 34004c2c6edSjsg struct an_rid_aplist { 34104c2c6edSjsg u_int8_t an_ap1[8]; 34204c2c6edSjsg u_int8_t an_ap2[8]; 34304c2c6edSjsg u_int8_t an_ap3[8]; 34404c2c6edSjsg u_int8_t an_ap4[8]; 3458bfba773Sgilles } __packed; 34604c2c6edSjsg 34704c2c6edSjsg /* 34804c2c6edSjsg * Driver name. 34904c2c6edSjsg */ 35004c2c6edSjsg #define AN_RID_DRVNAME 0xFF13 35104c2c6edSjsg struct an_rid_drvname { 35204c2c6edSjsg u_int8_t an_drvname[16]; 3538bfba773Sgilles } __packed; 35404c2c6edSjsg 35504c2c6edSjsg /* 35604c2c6edSjsg * Frame encapsulation. 35704c2c6edSjsg */ 35804c2c6edSjsg #define AN_RID_ENCAP 0xFF14 35904c2c6edSjsg #define AN_ENCAP_NENTS 8 36004c2c6edSjsg struct an_rid_encap { 36104c2c6edSjsg struct an_rid_encap_entry { 36204c2c6edSjsg u_int16_t an_ethertype; 36304c2c6edSjsg u_int16_t an_action; 3648bfba773Sgilles } __packed an_entry[AN_ENCAP_NENTS]; 3658bfba773Sgilles } __packed; 366d7f83212Smickey 367d7f83212Smickey #define AN_ENCAP_ACTION_RX 0x0001 368d7f83212Smickey #define AN_ENCAP_ACTION_TX 0x0002 369d7f83212Smickey 370d7f83212Smickey #define AN_RXENCAP_NONE 0x0000 371d7f83212Smickey #define AN_RXENCAP_RFC1024 0x0001 372d7f83212Smickey 373d7f83212Smickey #define AN_TXENCAP_RFC1024 0x0000 374d7f83212Smickey #define AN_TXENCAP_80211 0x0002 375d7f83212Smickey 37604c2c6edSjsg /* 37704c2c6edSjsg * Actual config, same structure as general config (read only). 37804c2c6edSjsg */ 37904c2c6edSjsg #define AN_RID_ACTUALCFG 0xFF20 38004c2c6edSjsg 38104c2c6edSjsg /* 38204c2c6edSjsg * Card capabilities (read only). 38304c2c6edSjsg */ 38404c2c6edSjsg #define AN_RID_CAPABILITIES 0xFF00 38504c2c6edSjsg struct an_rid_caps { 38604c2c6edSjsg u_int8_t an_oui[3]; /* 0x02 */ 38704c2c6edSjsg u_int8_t an_rsvd0; /* 0x05 */ 38804c2c6edSjsg u_int16_t an_prodnum; /* 0x06 */ 38904c2c6edSjsg u_int8_t an_manufname[32]; /* 0x08 */ 39004c2c6edSjsg u_int8_t an_prodname[16]; /* 0x28 */ 39104c2c6edSjsg u_int8_t an_prodvers[8]; /* 0x38 */ 39204c2c6edSjsg u_int8_t an_oemaddr[6]; /* 0x40 */ 39304c2c6edSjsg u_int8_t an_aironetaddr[6]; /* 0x46 */ 39404c2c6edSjsg u_int16_t an_radiotype; /* 0x4C */ 39504c2c6edSjsg u_int16_t an_regdomain; /* 0x4E */ 39604c2c6edSjsg u_int8_t an_callid[6]; /* 0x50 */ 39704c2c6edSjsg u_int8_t an_rates[8]; /* 0x56 */ 39804c2c6edSjsg u_int8_t an_rx_diversity; /* 0x5E */ 39904c2c6edSjsg u_int8_t an_tx_diversity; /* 0x5F */ 40004c2c6edSjsg u_int16_t an_tx_powerlevels[8]; /* 0x60 */ 40104c2c6edSjsg u_int16_t an_hwrev; /* 0x70 */ 40204c2c6edSjsg u_int16_t an_hwcaps; /* 0x72 */ 40304c2c6edSjsg u_int16_t an_temprange; /* 0x74 */ 40404c2c6edSjsg u_int16_t an_fwrev; /* 0x76 */ 40504c2c6edSjsg u_int16_t an_fwsubrev; /* 0x78 */ 40604c2c6edSjsg u_int16_t an_ifacerev; /* 0x7A */ 40704c2c6edSjsg u_int16_t an_softcaps; /* 0x7C */ 40804c2c6edSjsg u_int16_t an_bootblockrev; /* 0x7E */ 40904c2c6edSjsg u_int16_t an_req_hw_support; /* 0x80 */ 41004c2c6edSjsg /* extended capabilities */ 41104c2c6edSjsg u_int16_t an_ext_softcaps; /* 0x82 */ 41204c2c6edSjsg u_int16_t an_spare[34]; 4138bfba773Sgilles } __packed; 41404c2c6edSjsg 41504c2c6edSjsg #define AN_REGDOMAIN_USA 0 41604c2c6edSjsg #define AN_REGDOMAIN_EUROPE 1 41704c2c6edSjsg #define AN_REGDOMAIN_JAPAN 2 41804c2c6edSjsg #define AN_REGDOMAIN_SPAIN 3 41904c2c6edSjsg #define AN_REGDOMAIN_FRANCE 4 42004c2c6edSjsg #define AN_REGDOMAIN_BELGIUM 5 42104c2c6edSjsg #define AN_REGDOMAIN_ISRAEL 6 42204c2c6edSjsg #define AN_REGDOMAIN_CANADA 7 42304c2c6edSjsg #define AN_REGDOMAIN_AUSTRALIA 8 42404c2c6edSjsg #define AN_REGDOMAIN_JAPANWIDE 9 42504c2c6edSjsg 42604c2c6edSjsg #define AN_SOFTCAPS_WEP 0x0002 42704c2c6edSjsg #define AN_SOFTCAPS_RSSIMAP 0x0008 42804c2c6edSjsg #define AN_SOFTCAPS_WEP128 0x0100 42904c2c6edSjsg 43004c2c6edSjsg #define AN_EXT_SOFTCAPS_MIC 0x0001 43104c2c6edSjsg 43204c2c6edSjsg /* 43304c2c6edSjsg * Access point (read only) 43404c2c6edSjsg */ 43504c2c6edSjsg #define AN_RID_APINFO 0xFF01 43604c2c6edSjsg struct an_rid_apinfo { 43704c2c6edSjsg u_int16_t an_tim_addr; 43804c2c6edSjsg u_int16_t an_airo_addr; 4398bfba773Sgilles } __packed; 44004c2c6edSjsg 44104c2c6edSjsg /* 44204c2c6edSjsg * Radio info (read only). 44304c2c6edSjsg */ 44404c2c6edSjsg #define AN_RID_RADIOINFO 0xFF02 44504c2c6edSjsg 44604c2c6edSjsg /* 44704c2c6edSjsg * Status (read only). Note: the manual claims this RID is 108 bytes 44804c2c6edSjsg * long (0x6A is the last datum, which is 2 bytes long) however when 44904c2c6edSjsg * this RID is read from the NIC, it returns a length of 110 or 112. 45004c2c6edSjsg * To be on the safe side, this structure is padded with 4 extra 16-bit 45104c2c6edSjsg * words. (There is a misprint in the manual which says the macaddr 45204c2c6edSjsg * field is 8 bytes long.) 45304c2c6edSjsg * 45404c2c6edSjsg * Also, the channel_set and current_channel fields appear to be 45504c2c6edSjsg * reversed. Either that, or the hop_period field is unused. 45604c2c6edSjsg */ 45704c2c6edSjsg #define AN_RID_STATUS 0xFF50 45804c2c6edSjsg struct an_rid_status { 45904c2c6edSjsg u_int8_t an_macaddr[6]; /* 0x02 */ 46004c2c6edSjsg u_int16_t an_opmode; /* 0x08 */ 46104c2c6edSjsg u_int16_t an_errcode; /* 0x0A */ 46204c2c6edSjsg u_int16_t an_cur_signal_strength; /* 0x0C */ 46304c2c6edSjsg u_int16_t an_ssidlen; /* 0x0E */ 46404c2c6edSjsg u_int8_t an_ssid[32]; /* 0x10 */ 46504c2c6edSjsg u_int8_t an_ap_name[16]; /* 0x30 */ 46604c2c6edSjsg u_int8_t an_cur_bssid[6]; /* 0x40 */ 46704c2c6edSjsg u_int8_t an_prev_bssid1[6]; /* 0x46 */ 46804c2c6edSjsg u_int8_t an_prev_bssid2[6]; /* 0x4C */ 46904c2c6edSjsg u_int8_t an_prev_bssid3[6]; /* 0x52 */ 47004c2c6edSjsg u_int16_t an_beacon_period; /* 0x58 */ 47104c2c6edSjsg u_int16_t an_dtim_period; /* 0x5A */ 47204c2c6edSjsg u_int16_t an_atim_duration; /* 0x5C */ 47304c2c6edSjsg u_int16_t an_hop_period; /* 0x5E */ 47404c2c6edSjsg u_int16_t an_cur_channel; /* 0x62 */ 47504c2c6edSjsg u_int16_t an_channel_set; /* 0x60 */ 47604c2c6edSjsg u_int16_t an_hops_to_backbone; /* 0x64 */ 47704c2c6edSjsg u_int16_t an_ap_total_load; /* 0x66 */ 47804c2c6edSjsg u_int16_t an_our_generated_load; /* 0x68 */ 47904c2c6edSjsg u_int16_t an_accumulated_arl; /* 0x6A */ 48004c2c6edSjsg u_int16_t an_cur_signal_quality; /* 0x6C */ 48104c2c6edSjsg u_int16_t an_current_tx_rate; /* 0x6E */ 48204c2c6edSjsg u_int16_t an_ap_device; /* 0x70 */ 48304c2c6edSjsg u_int16_t an_normalized_rssi; /* 0x72 */ 48404c2c6edSjsg u_int16_t an_short_pre_in_use; /* 0x74 */ 48504c2c6edSjsg u_int8_t an_ap_ip_addr[4]; /* 0x76 */ 48604c2c6edSjsg u_int16_t an_max_noise_prev_sec; /* 0x7A */ 48704c2c6edSjsg u_int16_t an_avg_noise_prev_min; /* 0x7C */ 48804c2c6edSjsg u_int16_t an_max_noise_prev_min; /* 0x7E */ 48904c2c6edSjsg u_int16_t an_spare[11]; 4908bfba773Sgilles } __packed; 49104c2c6edSjsg 492d7f83212Smickey #define AN_STATUS_OPMODE_CONFIGURED 0x0001 493d7f83212Smickey #define AN_STATUS_OPMODE_MAC_ENABLED 0x0002 494d7f83212Smickey #define AN_STATUS_OPMODE_RX_ENABLED 0x0004 495d7f83212Smickey #define AN_STATUS_OPMODE_IN_SYNC 0x0010 496d7f83212Smickey #define AN_STATUS_OPMODE_ASSOCIATED 0x0020 497d7f83212Smickey #define AN_STATUS_OPMODE_ERROR 0x8000 498d7f83212Smickey 499d7f83212Smickey /* 500d7f83212Smickey * Statistics 501d7f83212Smickey */ 502d7f83212Smickey #define AN_RID_16BITS_CUM 0xFF60 /* Cumulative 16-bit stats counters */ 503d7f83212Smickey #define AN_RID_16BITS_DELTA 0xFF61 /* 16-bit stats (since last clear) */ 504d7f83212Smickey #define AN_RID_16BITS_DELTACLR 0xFF62 /* 16-bit stats, clear on read */ 505d7f83212Smickey #define AN_RID_32BITS_CUM 0xFF68 /* Cumulative 32-bit stats counters */ 506d7f83212Smickey #define AN_RID_32BITS_DELTA 0xFF69 /* 32-bit stats (since last clear) */ 507d7f83212Smickey #define AN_RID_32BITS_DELTACLR 0xFF6A /* 32-bit stats, clear on read */ 508d7f83212Smickey 509d7f83212Smickey /* 51004c2c6edSjsg * Grrr. The manual says the statistics record is 384 bytes in length, 51104c2c6edSjsg * but the card says the record is 404 bytes. There's some padding left 51204c2c6edSjsg * at the end of this structure to account for any discrepancies. 51304c2c6edSjsg */ 51404c2c6edSjsg struct an_rid_stats { 51504c2c6edSjsg u_int16_t an_spacer; /* 0x02 */ 51604c2c6edSjsg u_int32_t an_rx_overruns; /* 0x04 */ 51704c2c6edSjsg u_int32_t an_rx_plcp_csum_errs; /* 0x08 */ 51804c2c6edSjsg u_int32_t an_rx_plcp_format_errs; /* 0x0C */ 51904c2c6edSjsg u_int32_t an_rx_plcp_len_errs; /* 0x10 */ 52004c2c6edSjsg u_int32_t an_rx_mac_crc_errs; /* 0x14 */ 52104c2c6edSjsg u_int32_t an_rx_mac_crc_ok; /* 0x18 */ 52204c2c6edSjsg u_int32_t an_rx_wep_errs; /* 0x1C */ 52304c2c6edSjsg u_int32_t an_rx_wep_ok; /* 0x20 */ 52404c2c6edSjsg u_int32_t an_retry_long; /* 0x24 */ 52504c2c6edSjsg u_int32_t an_retry_short; /* 0x28 */ 52604c2c6edSjsg u_int32_t an_retry_max; /* 0x2C */ 52704c2c6edSjsg u_int32_t an_no_ack; /* 0x30 */ 52804c2c6edSjsg u_int32_t an_no_cts; /* 0x34 */ 52904c2c6edSjsg u_int32_t an_rx_ack_ok; /* 0x38 */ 53004c2c6edSjsg u_int32_t an_rx_cts_ok; /* 0x3C */ 53104c2c6edSjsg u_int32_t an_tx_ack_ok; /* 0x40 */ 53204c2c6edSjsg u_int32_t an_tx_rts_ok; /* 0x44 */ 53304c2c6edSjsg u_int32_t an_tx_cts_ok; /* 0x48 */ 53404c2c6edSjsg u_int32_t an_tx_lmac_mcasts; /* 0x4C */ 53504c2c6edSjsg u_int32_t an_tx_lmac_bcasts; /* 0x50 */ 53604c2c6edSjsg u_int32_t an_tx_lmac_ucast_frags; /* 0x54 */ 53704c2c6edSjsg u_int32_t an_tx_lmac_ucasts; /* 0x58 */ 53804c2c6edSjsg u_int32_t an_tx_beacons; /* 0x5C */ 53904c2c6edSjsg u_int32_t an_rx_beacons; /* 0x60 */ 54004c2c6edSjsg u_int32_t an_tx_single_cols; /* 0x64 */ 54104c2c6edSjsg u_int32_t an_tx_multi_cols; /* 0x68 */ 54204c2c6edSjsg u_int32_t an_tx_defers_no; /* 0x6C */ 54304c2c6edSjsg u_int32_t an_tx_defers_prot; /* 0x70 */ 54404c2c6edSjsg u_int32_t an_tx_defers_energy; /* 0x74 */ 54504c2c6edSjsg u_int32_t an_rx_dups; /* 0x78 */ 54604c2c6edSjsg u_int32_t an_rx_partial; /* 0x7C */ 54704c2c6edSjsg u_int32_t an_tx_too_old; /* 0x80 */ 54804c2c6edSjsg u_int32_t an_rx_too_old; /* 0x84 */ 54904c2c6edSjsg u_int32_t an_lostsync_max_retries;/* 0x88 */ 55004c2c6edSjsg u_int32_t an_lostsync_missed_beacons;/* 0x8C */ 55104c2c6edSjsg u_int32_t an_lostsync_arl_exceeded;/*0x90 */ 55204c2c6edSjsg u_int32_t an_lostsync_deauthed; /* 0x94 */ 55304c2c6edSjsg u_int32_t an_lostsync_disassociated;/*0x98 */ 55404c2c6edSjsg u_int32_t an_lostsync_tsf_timing; /* 0x9C */ 55504c2c6edSjsg u_int32_t an_tx_host_mcasts; /* 0xA0 */ 55604c2c6edSjsg u_int32_t an_tx_host_bcasts; /* 0xA4 */ 55704c2c6edSjsg u_int32_t an_tx_host_ucasts; /* 0xA8 */ 55804c2c6edSjsg u_int32_t an_tx_host_failed; /* 0xAC */ 55904c2c6edSjsg u_int32_t an_rx_host_mcasts; /* 0xB0 */ 56004c2c6edSjsg u_int32_t an_rx_host_bcasts; /* 0xB4 */ 56104c2c6edSjsg u_int32_t an_rx_host_ucasts; /* 0xB8 */ 56204c2c6edSjsg u_int32_t an_rx_host_discarded; /* 0xBC */ 56304c2c6edSjsg u_int32_t an_tx_hmac_mcasts; /* 0xC0 */ 56404c2c6edSjsg u_int32_t an_tx_hmac_bcasts; /* 0xC4 */ 56504c2c6edSjsg u_int32_t an_tx_hmac_ucasts; /* 0xC8 */ 56604c2c6edSjsg u_int32_t an_tx_hmac_failed; /* 0xCC */ 56704c2c6edSjsg u_int32_t an_rx_hmac_mcasts; /* 0xD0 */ 56804c2c6edSjsg u_int32_t an_rx_hmac_bcasts; /* 0xD4 */ 56904c2c6edSjsg u_int32_t an_rx_hmac_ucasts; /* 0xD8 */ 57004c2c6edSjsg u_int32_t an_rx_hmac_discarded; /* 0xDC */ 57104c2c6edSjsg u_int32_t an_tx_hmac_accepted; /* 0xE0 */ 57204c2c6edSjsg u_int32_t an_ssid_mismatches; /* 0xE4 */ 57304c2c6edSjsg u_int32_t an_ap_mismatches; /* 0xE8 */ 57404c2c6edSjsg u_int32_t an_rates_mismatches; /* 0xEC */ 57504c2c6edSjsg u_int32_t an_auth_rejects; /* 0xF0 */ 57604c2c6edSjsg u_int32_t an_auth_timeouts; /* 0xF4 */ 57704c2c6edSjsg u_int32_t an_assoc_rejects; /* 0xF8 */ 57804c2c6edSjsg u_int32_t an_assoc_timeouts; /* 0xFC */ 57904c2c6edSjsg u_int32_t an_reason_outside_table;/* 0x100 */ 58004c2c6edSjsg u_int32_t an_reason1; /* 0x104 */ 58104c2c6edSjsg u_int32_t an_reason2; /* 0x108 */ 58204c2c6edSjsg u_int32_t an_reason3; /* 0x10C */ 58304c2c6edSjsg u_int32_t an_reason4; /* 0x110 */ 58404c2c6edSjsg u_int32_t an_reason5; /* 0x114 */ 58504c2c6edSjsg u_int32_t an_reason6; /* 0x118 */ 58604c2c6edSjsg u_int32_t an_reason7; /* 0x11C */ 58704c2c6edSjsg u_int32_t an_reason8; /* 0x120 */ 58804c2c6edSjsg u_int32_t an_reason9; /* 0x124 */ 58904c2c6edSjsg u_int32_t an_reason10; /* 0x128 */ 59004c2c6edSjsg u_int32_t an_reason11; /* 0x12C */ 59104c2c6edSjsg u_int32_t an_reason12; /* 0x130 */ 59204c2c6edSjsg u_int32_t an_reason13; /* 0x134 */ 59304c2c6edSjsg u_int32_t an_reason14; /* 0x138 */ 59404c2c6edSjsg u_int32_t an_reason15; /* 0x13C */ 59504c2c6edSjsg u_int32_t an_reason16; /* 0x140 */ 59604c2c6edSjsg u_int32_t an_reason17; /* 0x144 */ 59704c2c6edSjsg u_int32_t an_reason18; /* 0x148 */ 59804c2c6edSjsg u_int32_t an_reason19; /* 0x14C */ 59904c2c6edSjsg u_int32_t an_rx_mgmt_pkts; /* 0x150 */ 60004c2c6edSjsg u_int32_t an_tx_mgmt_pkts; /* 0x154 */ 60104c2c6edSjsg u_int32_t an_rx_refresh_pkts; /* 0x158 */ 60204c2c6edSjsg u_int32_t an_tx_refresh_pkts; /* 0x15C */ 60304c2c6edSjsg u_int32_t an_rx_poll_pkts; /* 0x160 */ 60404c2c6edSjsg u_int32_t an_tx_poll_pkts; /* 0x164 */ 60504c2c6edSjsg u_int32_t an_host_retries; /* 0x168 */ 60604c2c6edSjsg u_int32_t an_lostsync_hostreq; /* 0x16C */ 60704c2c6edSjsg u_int32_t an_host_tx_bytes; /* 0x170 */ 60804c2c6edSjsg u_int32_t an_host_rx_bytes; /* 0x174 */ 60904c2c6edSjsg u_int32_t an_uptime_usecs; /* 0x178 */ 61004c2c6edSjsg u_int32_t an_uptime_secs; /* 0x17C */ 61104c2c6edSjsg u_int32_t an_lostsync_better_ap; /* 0x180 */ 61204c2c6edSjsg u_int32_t an_rsvd[10]; 6138bfba773Sgilles } __packed; 61404c2c6edSjsg 61504c2c6edSjsg /* 61604c2c6edSjsg * Volatile WEP Key 61704c2c6edSjsg */ 61804c2c6edSjsg #define AN_RID_WEP_VOLATILE 0xFF15 /* Volatile WEP Key */ 61904c2c6edSjsg struct an_rid_wepkey { 62004c2c6edSjsg u_int16_t an_key_index; /* 0x02 */ 62104c2c6edSjsg u_int8_t an_mac_addr[6]; /* 0x04 */ 62204c2c6edSjsg u_int16_t an_key_len; /* 0x0A */ 62304c2c6edSjsg u_int8_t an_key[16]; /* 0x0C */ 6248bfba773Sgilles } __packed; 62504c2c6edSjsg 62604c2c6edSjsg /* 62704c2c6edSjsg * Persistent WEP Key 62804c2c6edSjsg */ 62904c2c6edSjsg #define AN_RID_WEP_PERSISTENT 0xFF16 /* Persistent WEP Key */ 63004c2c6edSjsg 63104c2c6edSjsg /* 63204c2c6edSjsg * LEAP Key 63304c2c6edSjsg */ 63404c2c6edSjsg #define AN_RID_LEAP_USER 0xFF23 /* User Name for LEAP */ 63504c2c6edSjsg #define AN_RID_LEAP_PASS 0xFF24 /* Password for LEAP */ 63604c2c6edSjsg struct an_rid_leapkey { 63704c2c6edSjsg u_int16_t an_key_len; /* 0x02 */ 63804c2c6edSjsg u_int8_t an_key[32]; /* 0x04 */ 6398bfba773Sgilles } __packed; 64004c2c6edSjsg 64104c2c6edSjsg /* 64204c2c6edSjsg * MIC 64304c2c6edSjsg */ 64404c2c6edSjsg #define AN_RID_MIC 0xFF57 /* Message Integrity Check */ 64504c2c6edSjsg struct an_rid_mic { 64604c2c6edSjsg u_int16_t an_mic_state; /* 0x02 */ 64704c2c6edSjsg u_int16_t an_mic_mcast_valid; /* 0x04 */ 64804c2c6edSjsg u_int8_t an_mic_mcast[16]; /* 0x06 */ 64904c2c6edSjsg u_int16_t an_mic_ucast_valid; /* 0x16 */ 65004c2c6edSjsg u_int8_t an_mic_ucast[16]; /* 0x18 */ 6518bfba773Sgilles } __packed; 65204c2c6edSjsg 65304c2c6edSjsg /* 654d7f83212Smickey * Receive frame structure. 655d7f83212Smickey */ 656d7f83212Smickey struct an_rxframe { 657d7f83212Smickey u_int32_t an_rx_time; /* 0x00 */ 658d7f83212Smickey u_int16_t an_rx_status; /* 0x04 */ 659d7f83212Smickey u_int16_t an_rx_payload_len; /* 0x06 */ 660d7f83212Smickey u_int8_t an_rsvd0; /* 0x08 */ 661d7f83212Smickey u_int8_t an_rx_signal_strength; /* 0x09 */ 662d7f83212Smickey u_int8_t an_rx_rate; /* 0x0A */ 663d7f83212Smickey u_int8_t an_rx_chan; /* 0x0B */ 664d7f83212Smickey u_int8_t an_rx_assoc_cnt; /* 0x0C */ 665d7f83212Smickey u_int8_t an_rsvd1[3]; /* 0x0D */ 666d7f83212Smickey u_int8_t an_plcp_hdr[4]; /* 0x10 */ 66704c2c6edSjsg struct ieee80211_frame_addr4 an_whdr; 668d7f83212Smickey u_int16_t an_gaplen; /* 0x32 */ 6698bfba773Sgilles } __packed; 670d7f83212Smickey #define AN_RXGAP_MAX 8 671d7f83212Smickey 672d7f83212Smickey /* 673d7f83212Smickey * Transmit frame structure. 674d7f83212Smickey */ 675d7f83212Smickey struct an_txframe { 676d7f83212Smickey u_int32_t an_tx_sw; /* 0x00 */ 677d7f83212Smickey u_int16_t an_tx_status; /* 0x04 */ 678d7f83212Smickey u_int16_t an_tx_payload_len; /* 0x06 */ 679d7f83212Smickey u_int16_t an_tx_ctl; /* 0x08 */ 680d7f83212Smickey u_int16_t an_tx_assoc_id; /* 0x0A */ 681d7f83212Smickey u_int16_t an_tx_retry; /* 0x0C */ 682d7f83212Smickey u_int8_t an_tx_assoc_cnt; /* 0x0E */ 683d7f83212Smickey u_int8_t an_tx_rate; /* 0x0F */ 684d7f83212Smickey u_int8_t an_tx_max_long_retries; /* 0x10 */ 685d7f83212Smickey u_int8_t an_tx_max_short_retries; /*0x11 */ 686d7f83212Smickey u_int8_t an_rsvd0[2]; /* 0x12 */ 68704c2c6edSjsg struct ieee80211_frame_addr4 an_whdr; 688d7f83212Smickey u_int16_t an_gaplen; /* 0x32 */ 6898bfba773Sgilles } __packed; 690d7f83212Smickey 69104c2c6edSjsg #define AN_TXGAP_802_3 0 69204c2c6edSjsg #define AN_TXGAP_802_11 6 693d7f83212Smickey 69404c2c6edSjsg struct an_802_3_hdr { 69504c2c6edSjsg u_int16_t an_802_3_status; 69604c2c6edSjsg u_int16_t an_802_3_payload_len; 69704c2c6edSjsg u_int8_t an_dst_addr[6]; 69804c2c6edSjsg u_int8_t an_src_addr[6]; 6998bfba773Sgilles } __packed; 700d7f83212Smickey 701d7f83212Smickey #define AN_TXSTAT_EXCESS_RETRY 0x0002 702d7f83212Smickey #define AN_TXSTAT_LIFE_EXCEEDED 0x0004 703d7f83212Smickey #define AN_TXSTAT_AID_FAIL 0x0008 704d7f83212Smickey #define AN_TXSTAT_MAC_DISABLED 0x0010 705d7f83212Smickey #define AN_TXSTAT_ASSOC_LOST 0x0020 706d7f83212Smickey 707d7f83212Smickey #define AN_TXCTL_RSVD 0x0001 708d7f83212Smickey #define AN_TXCTL_TXOK_INTR 0x0002 709d7f83212Smickey #define AN_TXCTL_TXERR_INTR 0x0004 710d7f83212Smickey #define AN_TXCTL_HEADER_TYPE 0x0008 711d7f83212Smickey #define AN_TXCTL_PAYLOAD_TYPE 0x0010 712d7f83212Smickey #define AN_TXCTL_NORELEASE 0x0020 713d7f83212Smickey #define AN_TXCTL_NORETRIES 0x0040 714d7f83212Smickey #define AN_TXCTL_CLEAR_AID 0x0080 715d7f83212Smickey #define AN_TXCTL_STRICT_ORDER 0x0100 716d7f83212Smickey #define AN_TXCTL_USE_RTS 0x0200 717d7f83212Smickey 718d7f83212Smickey #define AN_HEADERTYPE_8023 0x0000 719d7f83212Smickey #define AN_HEADERTYPE_80211 0x0008 720d7f83212Smickey 721d7f83212Smickey #define AN_PAYLOADTYPE_ETHER 0x0000 722d7f83212Smickey #define AN_PAYLOADTYPE_LLC 0x0010 723d7f83212Smickey 724d7f83212Smickey #define AN_TXCTL_80211 \ 725d7f83212Smickey (AN_TXCTL_TXOK_INTR|AN_TXCTL_TXERR_INTR|AN_HEADERTYPE_80211| \ 726d7f83212Smickey AN_PAYLOADTYPE_LLC|AN_TXCTL_NORELEASE) 727d7f83212Smickey 728d7f83212Smickey #define AN_TXCTL_8023 \ 729d7f83212Smickey (AN_TXCTL_TXOK_INTR|AN_TXCTL_TXERR_INTR|AN_HEADERTYPE_8023| \ 730d7f83212Smickey AN_PAYLOADTYPE_ETHER|AN_TXCTL_NORELEASE) 731d7f83212Smickey 732d7f83212Smickey #define AN_STAT_BADCRC 0x0001 733d7f83212Smickey #define AN_STAT_UNDECRYPTABLE 0x0002 734d7f83212Smickey #define AN_STAT_ERRSTAT 0x0003 735d7f83212Smickey #define AN_STAT_MAC_PORT 0x0700 736d7f83212Smickey #define AN_STAT_1042 0x2000 /* RFC1042 encoded */ 737d7f83212Smickey #define AN_STAT_TUNNEL 0x4000 /* Bridge-tunnel encoded */ 738d7f83212Smickey #define AN_STAT_WMP_MSG 0x6000 /* WaveLAN-II management protocol */ 739d7f83212Smickey #define AN_RXSTAT_MSG_TYPE 0xE000 740d7f83212Smickey 741d7f83212Smickey #define AN_ENC_TX_802_3 0x00 742d7f83212Smickey #define AN_ENC_TX_802_11 0x11 743d7f83212Smickey #define AN_ENC_TX_E_II 0x0E 744d7f83212Smickey 745d7f83212Smickey #define AN_ENC_TX_1042 0x00 746d7f83212Smickey #define AN_ENC_TX_TUNNEL 0xF8 747d7f83212Smickey 748d7f83212Smickey #define AN_TXCNTL_MACPORT 0x00FF 749d7f83212Smickey #define AN_TXCNTL_STRUCTTYPE 0xFF00 750d7f83212Smickey 75104c2c6edSjsg #endif /* _DEV_IC_ANREG_H */ 752