Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/dev/ic Pull up revision 1.1 (new, requested by he):



details:   https://anonhg.NetBSD.org/src/rev/93ba0216d64b
branches:  netbsd-1-5
changeset: 490287:93ba0216d64b
user:      he <he%NetBSD.org@localhost>
date:      Tue Dec 12 21:26:08 2000 +0000

description:
Pull up revision 1.1 (new, requested by he):
  Add a driver for an(4), Aironet and Cisco wireless pcmcia cards.

diffstat:

 sys/dev/ic/anvar.h |  585 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 585 insertions(+), 0 deletions(-)

diffs (truncated from 589 to 300 lines):

diff -r ec030cb7928e -r 93ba0216d64b sys/dev/ic/anvar.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/ic/anvar.h        Tue Dec 12 21:26:08 2000 +0000
@@ -0,0 +1,585 @@
+/*     $NetBSD: anvar.h,v 1.2.2.2 2000/12/12 21:26:08 he Exp $ */
+/*
+ * Copyright (c) 1997, 1998, 1999
+ *     Bill Paul <wpaul%ctr.columbia.edu@localhost>.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by Bill Paul.
+ * 4. Neither the name of the author nor the names of any co-contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: src/sys/dev/an/if_aironet_ieee.h,v 1.2 2000/11/13 23:04:12 wpaul Exp $
+ */
+
+#ifndef _IF_AIRONET_IEEE_H
+#define _IF_AIRONET_IEEE_H
+
+/*
+ * This header defines a simple command interface to the FreeBSD
+ * Aironet driver (an) driver, which is used to set certain
+ * device-specific parameters which can't be easily managed through
+ * ifconfig(8). No, sysctl(2) is not the answer. I said a _simple_
+ * interface, didn't I.
+ */
+
+#ifndef SIOCSAIRONET
+#define SIOCSAIRONET   SIOCSIFGENERIC
+#endif
+
+#ifndef SIOCGAIRONET
+#define SIOCGAIRONET   SIOCGIFGENERIC
+#endif
+
+/*
+ * This is a make-predend RID value used only by the driver
+ * to allow the user to set the speed.
+ */
+#define AN_RID_TX_SPEED                0x1234
+
+/*
+ * Technically I don't think there's a limit to a record
+ * length. The largest record is the one that contains the CIS
+ * data, which is 240 words long, so 256 should be a safe
+ * value.
+ */
+#define AN_MAX_DATALEN 512
+
+struct an_req {
+       u_int16_t       an_len;
+       u_int16_t       an_type;
+       u_int16_t       an_val[AN_MAX_DATALEN];
+};
+
+/*
+ * Private LTV records (interpreted only by the driver). This is
+ * a minor kludge to allow reading the interface statistics from
+ * the driver.
+ */
+#define AN_RID_IFACE_STATS     0x0100
+#define AN_RID_MGMT_XMIT       0x0200
+#ifdef ANCACHE
+#define AN_RID_ZERO_CACHE      0x0300
+#define AN_RID_READ_CACHE      0x0400
+#endif
+
+struct an_80211_hdr {
+       u_int16_t               frame_ctl;
+       u_int16_t               dur_id;
+       u_int8_t                addr1[6];
+       u_int8_t                addr2[6];
+       u_int8_t                addr3[6];
+       u_int16_t               seq_ctl;
+       u_int8_t                addr4[6];
+};
+
+#define AN_FCTL_VERS           0x0002
+#define AN_FCTL_FTYPE          0x000C
+#define AN_FCTL_STYPE          0x00F0
+#define AN_FCTL_TODS           0x0100
+#define AN_FCTL_FROMDS         0x0200
+#define AN_FCTL_MOREFRAGS      0x0400
+#define AN_FCTL_RETRY          0x0800
+#define AN_FCTL_PM             0x1000
+#define AN_FCTL_MOREDATA       0x2000
+#define AN_FCTL_WEP            0x4000
+#define AN_FCTL_ORDER          0x8000
+
+#define AN_FTYPE_MGMT          0x0000
+#define AN_FTYPE_CTL           0x0004
+#define AN_FTYPE_DATA          0x0008
+
+#define AN_STYPE_MGMT_ASREQ    0x0000  /* association request */
+#define AN_STYPE_MGMT_ASRESP   0x0010  /* association response */
+#define AN_STYPE_MGMT_REASREQ  0x0020  /* reassociation request */
+#define AN_STYPE_MGMT_REASRESP 0x0030  /* reassociation response */
+#define AN_STYPE_MGMT_PROBEREQ 0x0040  /* probe request */
+#define AN_STYPE_MGMT_PROBERESP        0x0050  /* probe response */
+#define AN_STYPE_MGMT_BEACON   0x0080  /* beacon */
+#define AN_STYPE_MGMT_ATIM     0x0090  /* announcement traffic ind msg */
+#define AN_STYPE_MGMT_DISAS    0x00A0  /* disassociation */
+#define AN_STYPE_MGMT_AUTH     0x00B0  /* authentication */
+#define AN_STYPE_MGMT_DEAUTH   0x00C0  /* deauthentication */
+
+struct an_mgmt_hdr {
+       u_int16_t               frame_ctl;
+       u_int16_t               duration;
+       u_int8_t                dst_addr[6];
+       u_int8_t                src_addr[6];
+       u_int8_t                bssid[6];
+       u_int16_t               seq_ctl;
+};
+
+/* 
+ * Aironet IEEE signal strength cache
+ *
+ * driver keeps cache of last
+ * MAXANCACHE packets to arrive including signal strength info.
+ * daemons may read this via ioctl
+ *
+ * Each entry in the wi_sigcache has a unique macsrc.
+ */
+#ifdef ANCACHE
+#define MAXANCACHE      10
+
+struct an_sigcache {
+       char    macsrc[6];      /* unique MAC address for entry */
+       int     ipsrc;          /* ip address associated with packet */
+       int     signal;         /* signal strength of the packet */
+       int     noise;          /* noise value */
+       int     quality;        /* quality of the packet */
+};
+#endif
+
+struct an_ltv_key {
+       u_int16_t       an_len;
+       u_int16_t       an_type;
+       u_int16_t       kindex;
+       u_int8_t        mac[6];
+       u_int16_t       klen;
+       u_int8_t        key[16];  /* 40-bit keys */
+};
+
+#ifndef _KERNEL
+struct an_ltv_stats {
+       u_int16_t               an_fudge;
+       u_int16_t               an_len;                 /* 0x00 */
+       u_int16_t               an_type;                /* 0xXX */
+       u_int16_t               an_spacer;              /* 0x02 */
+       u_int32_t               an_rx_overruns;         /* 0x04 */
+       u_int32_t               an_rx_plcp_csum_errs;   /* 0x08 */
+       u_int32_t               an_rx_plcp_format_errs; /* 0x0C */
+       u_int32_t               an_rx_plcp_len_errs;    /* 0x10 */
+       u_int32_t               an_rx_mac_crc_errs;     /* 0x14 */
+       u_int32_t               an_rx_mac_crc_ok;       /* 0x18 */
+       u_int32_t               an_rx_wep_errs;         /* 0x1C */
+       u_int32_t               an_rx_wep_ok;           /* 0x20 */
+       u_int32_t               an_retry_long;          /* 0x24 */
+       u_int32_t               an_retry_short;         /* 0x28 */
+       u_int32_t               an_retry_max;           /* 0x2C */
+       u_int32_t               an_no_ack;              /* 0x30 */
+       u_int32_t               an_no_cts;              /* 0x34 */
+       u_int32_t               an_rx_ack_ok;           /* 0x38 */
+       u_int32_t               an_rx_cts_ok;           /* 0x3C */
+       u_int32_t               an_tx_ack_ok;           /* 0x40 */
+       u_int32_t               an_tx_rts_ok;           /* 0x44 */
+       u_int32_t               an_tx_cts_ok;           /* 0x48 */
+       u_int32_t               an_tx_lmac_mcasts;      /* 0x4C */
+       u_int32_t               an_tx_lmac_bcasts;      /* 0x50 */
+       u_int32_t               an_tx_lmac_ucast_frags; /* 0x54 */
+       u_int32_t               an_tx_lmac_ucasts;      /* 0x58 */
+       u_int32_t               an_tx_beacons;          /* 0x5C */
+       u_int32_t               an_rx_beacons;          /* 0x60 */
+       u_int32_t               an_tx_single_cols;      /* 0x64 */
+       u_int32_t               an_tx_multi_cols;       /* 0x68 */
+       u_int32_t               an_tx_defers_no;        /* 0x6C */
+       u_int32_t               an_tx_defers_prot;      /* 0x70 */
+       u_int32_t               an_tx_defers_energy;    /* 0x74 */
+       u_int32_t               an_rx_dups;             /* 0x78 */
+       u_int32_t               an_rx_partial;          /* 0x7C */
+       u_int32_t               an_tx_too_old;          /* 0x80 */
+       u_int32_t               an_rx_too_old;          /* 0x84 */
+       u_int32_t               an_lostsync_max_retries;/* 0x88 */
+       u_int32_t               an_lostsync_missed_beacons;/* 0x8C */
+       u_int32_t               an_lostsync_arl_exceeded;/*0x90 */
+       u_int32_t               an_lostsync_deauthed;   /* 0x94 */
+       u_int32_t               an_lostsync_disassociated;/*0x98 */
+       u_int32_t               an_lostsync_tsf_timing; /* 0x9C */
+       u_int32_t               an_tx_host_mcasts;      /* 0xA0 */
+       u_int32_t               an_tx_host_bcasts;      /* 0xA4 */
+       u_int32_t               an_tx_host_ucasts;      /* 0xA8 */
+       u_int32_t               an_tx_host_failed;      /* 0xAC */
+       u_int32_t               an_rx_host_mcasts;      /* 0xB0 */
+       u_int32_t               an_rx_host_bcasts;      /* 0xB4 */
+       u_int32_t               an_rx_host_ucasts;      /* 0xB8 */
+       u_int32_t               an_rx_host_discarded;   /* 0xBC */
+       u_int32_t               an_tx_hmac_mcasts;      /* 0xC0 */
+       u_int32_t               an_tx_hmac_bcasts;      /* 0xC4 */
+       u_int32_t               an_tx_hmac_ucasts;      /* 0xC8 */
+       u_int32_t               an_tx_hmac_failed;      /* 0xCC */
+       u_int32_t               an_rx_hmac_mcasts;      /* 0xD0 */
+       u_int32_t               an_rx_hmac_bcasts;      /* 0xD4 */
+       u_int32_t               an_rx_hmac_ucasts;      /* 0xD8 */
+       u_int32_t               an_rx_hmac_discarded;   /* 0xDC */
+       u_int32_t               an_tx_hmac_accepted;    /* 0xE0 */
+       u_int32_t               an_ssid_mismatches;     /* 0xE4 */
+       u_int32_t               an_ap_mismatches;       /* 0xE8 */
+       u_int32_t               an_rates_mismatches;    /* 0xEC */
+       u_int32_t               an_auth_rejects;        /* 0xF0 */
+       u_int32_t               an_auth_timeouts;       /* 0xF4 */
+       u_int32_t               an_assoc_rejects;       /* 0xF8 */
+       u_int32_t               an_assoc_timeouts;      /* 0xFC */
+       u_int32_t               an_reason_outside_table;/* 0x100 */
+       u_int32_t               an_reason1;             /* 0x104 */
+       u_int32_t               an_reason2;             /* 0x108 */
+       u_int32_t               an_reason3;             /* 0x10C */
+       u_int32_t               an_reason4;             /* 0x110 */
+       u_int32_t               an_reason5;             /* 0x114 */
+       u_int32_t               an_reason6;             /* 0x118 */
+       u_int32_t               an_reason7;             /* 0x11C */
+       u_int32_t               an_reason8;             /* 0x120 */
+       u_int32_t               an_reason9;             /* 0x124 */
+       u_int32_t               an_reason10;            /* 0x128 */
+       u_int32_t               an_reason11;            /* 0x12C */
+       u_int32_t               an_reason12;            /* 0x130 */
+       u_int32_t               an_reason13;            /* 0x134 */
+       u_int32_t               an_reason14;            /* 0x138 */
+       u_int32_t               an_reason15;            /* 0x13C */
+       u_int32_t               an_reason16;            /* 0x140 */
+       u_int32_t               an_reason17;            /* 0x144 */
+       u_int32_t               an_reason18;            /* 0x148 */
+       u_int32_t               an_reason19;            /* 0x14C */
+       u_int32_t               an_rx_mgmt_pkts;        /* 0x150 */
+       u_int32_t               an_tx_mgmt_pkts;        /* 0x154 */
+       u_int32_t               an_rx_refresh_pkts;     /* 0x158 */
+       u_int32_t               an_tx_refresh_pkts;     /* 0x15C */
+       u_int32_t               an_rx_poll_pkts;        /* 0x160 */
+       u_int32_t               an_tx_poll_pkts;        /* 0x164 */
+       u_int32_t               an_host_retries;        /* 0x168 */
+       u_int32_t               an_lostsync_hostreq;    /* 0x16C */
+       u_int32_t               an_host_tx_bytes;       /* 0x170 */
+       u_int32_t               an_host_rx_bytes;       /* 0x174 */
+       u_int32_t               an_uptime_usecs;        /* 0x178 */
+       u_int32_t               an_uptime_secs;         /* 0x17C */
+       u_int32_t               an_lostsync_better_ap;  /* 0x180 */
+       u_int32_t               an_rsvd[10];
+};
+
+struct an_ltv_genconfig {
+       /* General configuration. */
+       u_int16_t               an_len;                 /* 0x00 */
+       u_int16_t               an_type;                /* XXXX */
+       u_int16_t               an_opmode;              /* 0x02 */
+       u_int16_t               an_rxmode;              /* 0x04 */
+       u_int16_t               an_fragthresh;          /* 0x06 */
+       u_int16_t               an_rtsthresh;           /* 0x08 */
+       u_int8_t                an_macaddr[6];          /* 0x0A */
+       u_int8_t                an_rates[8];            /* 0x10 */
+       u_int16_t               an_shortretry_limit;    /* 0x18 */
+       u_int16_t               an_longretry_limit;     /* 0x1A */
+       u_int16_t               an_tx_msdu_lifetime;    /* 0x1C */
+       u_int16_t               an_rx_msdu_lifetime;    /* 0x1E */
+       u_int16_t               an_stationary;          /* 0x20 */
+       u_int16_t               an_ordering;            /* 0x22 */
+       u_int16_t               an_devtype;             /* 0x24 */
+       u_int16_t               an_rsvd0[5];            /* 0x26 */
+       /* Scanning associating. */
+       u_int16_t               an_scanmode;            /* 0x30 */
+       u_int16_t               an_probedelay;          /* 0x32 */
+       u_int16_t               an_probe_energy_timeout;/* 0x34 */
+       u_int16_t               an_probe_response_timeout;/*0x36 */
+       u_int16_t               an_beacon_listen_timeout;/*0x38 */
+       u_int16_t               an_ibss_join_net_timeout;/*0x3A */
+       u_int16_t               an_auth_timeout;        /* 0x3C */
+       u_int16_t               an_authtype;            /* 0x3E */
+       u_int16_t               an_assoc_timeout;       /* 0x40 */



Home | Main Index | Thread Index | Old Index