Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Update awi driver, which now supports AMD 79c930 based 8...
details: https://anonhg.NetBSD.org/src/rev/d8521759ee65
branches: trunk
changeset: 483981:d8521759ee65
user: onoe <onoe%NetBSD.org@localhost>
date: Wed Mar 22 11:22:20 2000 +0000
description:
Update awi driver, which now supports AMD 79c930 based 802.11 DS cards
as well as 802.11 FH cards. Also, it can operate in infrastructure mode,
adhoc mode, and wi(4) (aka WaveLAN/IEEE) compatible adhoc mode.
diffstat:
sys/arch/i386/conf/GENERIC | 6 +-
sys/dev/ic/Makefile | 8 +-
sys/dev/ic/am79c930.c | 18 +-
sys/dev/ic/am79c930reg.h | 3 +-
sys/dev/ic/awi.c | 4720 ++++++++++++++++++++-------------------
sys/dev/ic/awireg.h | 444 +--
sys/dev/ic/awivar.h | 220 +-
sys/dev/pcmcia/if_awi_pcmcia.c | 242 +-
8 files changed, 2882 insertions(+), 2779 deletions(-)
diffs (truncated from 6438 to 300 lines):
diff -r 00229728150c -r d8521759ee65 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Wed Mar 22 10:39:25 2000 +0000
+++ b/sys/arch/i386/conf/GENERIC Wed Mar 22 11:22:20 2000 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: GENERIC,v 1.315 2000/03/22 00:58:20 cgd Exp $
+# $NetBSD: GENERIC,v 1.316 2000/03/22 11:22:21 onoe Exp $
#
# GENERIC -- everything that's currently supported
#
include "arch/i386/conf/std.i386"
-#ident "GENERIC-$Revision: 1.315 $"
+#ident "GENERIC-$Revision: 1.316 $"
maxusers 32 # estimated number of users
@@ -524,7 +524,7 @@
tr* at isapnp? # IBM/3COM TROPIC Token-Ring
# PCMCIA network interfaces
-awi* at pcmcia? function ? # BayStack 650 (802.11FH)
+awi* at pcmcia? function ? # BayStack 650/660 (802.11FH/DS)
cnw* at pcmcia? function ? # Xircom/Netwave AirSurfer
ep* at pcmcia? function ? # 3Com 3c589 and 3c562 Ethernet
mbe* at pcmcia? function ? # MB8696x based Ethernet
diff -r 00229728150c -r d8521759ee65 sys/dev/ic/Makefile
--- a/sys/dev/ic/Makefile Wed Mar 22 10:39:25 2000 +0000
+++ b/sys/dev/ic/Makefile Wed Mar 22 11:22:20 2000 +0000
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.9 2000/03/20 18:07:59 ad Exp $
+# $NetBSD: Makefile,v 1.10 2000/03/22 11:22:22 onoe Exp $
INCSDIR= /usr/include/dev/ic
INCS= ad1848reg.h ahareg.h ahavar.h aic6360reg.h aic6360var.h \
aic77xxreg.h aic77xxvar.h aic7xxxvar.h am7930reg.h am7990reg.h \
- am7990var.h bhareg.h bhavar.h bt431reg.h bt459reg.h bt463reg.h \
- bt485reg.h cacreg.h cacvar.h cd1190reg.h cd1400reg.h comreg.h \
- comvar.h cs4231reg.h cyreg.h \
+ am7990var.h awictl.h bhareg.h bhavar.h bt431reg.h bt459reg.h \
+ bt463reg.h bt485reg.h cacreg.h cacvar.h cd1190reg.h cd1400reg.h \
+ comreg.h comvar.h cs4231reg.h cyreg.h \
cyvar.h dc21040reg.h dp8390reg.h dp8390var.h dptreg.h dptvar.h ds.h \
elink3reg.h elink3var.h hayespreg.h i8042reg.h i82365reg.h \
i82365var.h i8237reg.h i8253reg.h i82586reg.h i82586var.h \
diff -r 00229728150c -r d8521759ee65 sys/dev/ic/am79c930.c
--- a/sys/dev/ic/am79c930.c Wed Mar 22 10:39:25 2000 +0000
+++ b/sys/dev/ic/am79c930.c Wed Mar 22 11:22:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: am79c930.c,v 1.3 2000/02/17 17:37:23 sommerfeld Exp $ */
+/* $NetBSD: am79c930.c,v 1.4 2000/03/22 11:22:22 onoe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -63,16 +63,30 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
+#ifndef __FreeBSD__
#include <sys/device.h>
+#endif
#include <machine/cpu.h>
+#ifdef __FreeBSD__
+#include <machine/bus_pio.h>
+#include <machine/bus_memio.h>
+#endif
#include <machine/bus.h>
+#ifdef __NetBSD__
#include <machine/intr.h>
+#endif
+#ifdef __NetBSD__
#include <dev/ic/am79c930reg.h>
#include <dev/ic/am79c930var.h>
+#endif
+#ifdef __FreeBSD__
+#include <dev/awi/am79c930reg.h>
+#include <dev/awi/am79c930var.h>
+#endif
-#define AM930_DELAY(x) /*nothing*/;
+#define AM930_DELAY(x) /*nothing*/
void am79c930_regdump __P((struct am79c930_softc *sc));
diff -r 00229728150c -r d8521759ee65 sys/dev/ic/am79c930reg.h
--- a/sys/dev/ic/am79c930reg.h Wed Mar 22 10:39:25 2000 +0000
+++ b/sys/dev/ic/am79c930reg.h Wed Mar 22 11:22:20 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: am79c930reg.h,v 1.2 1999/11/05 05:13:36 sommerfeld Exp $ */
+/* $NetBSD: am79c930reg.h,v 1.3 2000/03/22 11:22:22 onoe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -66,6 +66,7 @@
#define AM79C930_IO_BASE 0
#define AM79C930_IO_SIZE 16
#define AM79C930_IO_SIZE_BIG 40
+#define AM79C930_IO_ALIGN 0x40 /* am79c930 decodes lower 6bits */
#define AM79C930_GCR 0 /* General Config Register */
diff -r 00229728150c -r d8521759ee65 sys/dev/ic/awi.c
--- a/sys/dev/ic/awi.c Wed Mar 22 10:39:25 2000 +0000
+++ b/sys/dev/ic/awi.c Wed Mar 22 11:22:20 2000 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: awi.c,v 1.9 2000/02/17 15:58:33 sommerfeld Exp $ */
+/* $NetBSD: awi.c,v 1.10 2000/03/22 11:22:22 onoe Exp $ */
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
+/*
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
- * by Bill Sommerfeld
+ * by Atsushi Onoe.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -17,8 +17,8 @@
* 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 the NetBSD
- * Foundation, Inc. and its contributors.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
@@ -35,75 +35,82 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- * Driver for AMD 802.11 firmware.
- * Uses am79c930 chip driver to talk to firmware running on the am79c930.
- *
- * More-or-less a generic ethernet-like if driver, with 802.11 gorp added.
- */
/*
- * todo:
- * - flush tx queue on resynch.
- * - clear oactive on "down".
- * - rewrite copy-into-mbuf code
- * - mgmt state machine gets stuck retransmitting assoc requests.
- * - multicast filter.
- * - fix device reset so it's more likely to work
- * - show status goo through ifmedia.
+ * Driver for AMD 802.11 PCnetMobile firmware.
+ * Uses am79c930 chip driver to talk to firmware running on the am79c930.
+ *
+ * The awi device driver first appeared in NetBSD 1.5.
*
- * more todo:
- * - deal with more 802.11 frames.
- * - send reassoc request
- * - deal with reassoc response
- * - send/deal with disassociation
- * - deal with "full" access points (no room for me).
- * - power save mode
- *
- * later:
- * - SSID preferences
- * - need ioctls for poking at the MIBs
- * - implement ad-hoc mode (including bss creation).
- * - decide when to do "ad hoc" vs. infrastructure mode (IFF_LINK flags?)
- * (focus on inf. mode since that will be needed for ietf)
- * - deal with DH vs. FH versions of the card
- * - deal with faster cards (2mb/s)
- * - ?WEP goo (mmm, rc4) (it looks not particularly useful).
- * - ifmedia revision.
- * - common 802.11 mibish things.
- * - common 802.11 media layer.
+ * The initial version of the driver was written by
+ * Bill Sommerfeld <sommerfeld%netbsd.org@localhost>.
+ * Then the driver module completely rewritten to support cards with DS phy
+ * and to support adhoc mode by Atsushi Onoe <onoe%netbsd.org@localhost>
*/
+#ifdef __NetBSD__
#include "opt_inet.h"
#include "opt_ns.h"
#include "bpfilter.h"
#include "rnd.h"
+#endif
+#ifdef __FreeBSD__
+#if __FreeBSD__ >= 3
+#include "opt_inet.h"
+#endif
+#if __FreeBSD__ >= 4
+#include "bpf.h"
+#define NBPFILTER NBPF
+#else
+#include "bpfilter.h"
+#endif
+#endif
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
+#include <sys/malloc.h>
+#include <sys/proc.h>
#include <sys/socket.h>
+#ifdef __FreeBSD__
+#include <sys/sockio.h>
+#else
#include <sys/ioctl.h>
+#endif
#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/select.h>
+#if defined(__FreeBSD__) && __FreeBSD__ >= 4
+#include <sys/bus.h>
+#else
#include <sys/device.h>
+#endif
#if NRND > 0
#include <sys/rnd.h>
#endif
#include <net/if.h>
#include <net/if_dl.h>
+#ifdef __FreeBSD__
+#include <net/ethernet.h>
+#else
#include <net/if_ether.h>
+#endif
#include <net/if_media.h>
+#include <net/if_llc.h>
+#include <net/if_ieee80211.h>
#ifdef INET
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
+#ifdef __NetBSD__
#include <netinet/if_inarp.h>
+#else
+#include <netinet/if_ether.h>
+#endif
#endif
#ifdef NS
@@ -118,2499 +125,2644 @@
#include <machine/cpu.h>
#include <machine/bus.h>
+#ifdef __NetBSD__
#include <machine/intr.h>
+#endif
+#ifdef __FreeBSD__
+#include <machine/clock.h>
+#endif
+#ifdef __NetBSD__
#include <dev/ic/am79c930reg.h>
#include <dev/ic/am79c930var.h>
#include <dev/ic/awireg.h>
#include <dev/ic/awivar.h>
-
-void awi_insane __P((struct awi_softc *sc));
-int awi_intlock __P((struct awi_softc *sc));
-void awi_intunlock __P((struct awi_softc *sc));
-void awi_intrinit __P((struct awi_softc *sc));
-u_int8_t awi_read_intst __P((struct awi_softc *sc));
-void awi_stop __P((struct awi_softc *sc));
-void awi_flush __P((struct awi_softc *sc));
-void awi_init __P((struct awi_softc *sc));
-void awi_set_mc __P((struct awi_softc *sc));
-void awi_rxint __P((struct awi_softc *));
-void awi_txint __P((struct awi_softc *));
-void awi_tx_packet __P((struct awi_softc *, int, struct mbuf *));
-
-void awi_rcv __P((struct awi_softc *, struct mbuf *, u_int32_t, u_int8_t));
-void awi_rcv_mgt __P((struct awi_softc *, struct mbuf *, u_int32_t, u_int8_t));
-void awi_rcv_data __P((struct awi_softc *, struct mbuf *));
-void awi_rcv_ctl __P((struct awi_softc *, struct mbuf *));
-
-int awi_enable __P((struct awi_softc *sc));
-void awi_disable __P((struct awi_softc *sc));
-
-void awi_zero __P((struct awi_softc *, u_int32_t, u_int32_t));
+#include <dev/ic/awictl.h>
+#endif
+#ifdef __FreeBSD__
+#include <dev/awi/am79c930reg.h>
+#include <dev/awi/am79c930var.h>
+#include <dev/awi/awireg.h>
+#include <dev/awi/awivar.h>
+#include <dev/awi/awictl.h>
+#endif
Home |
Main Index |
Thread Index |
Old Index