summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev/if_ae.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-09 22:40:03 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-09 22:40:03 +0000
commitef4bbe04287b9bc9e7725b58234e1f8e12c50d03 (patch)
tree29936f3dfbff1d31db0624ba92ca8df08cdc311b /sys/arch/amiga/dev/if_ae.c
parentdbbd0bbcc2473d3a9bbd70ecc40e0fc4e83152e0 (diff)
From NetBSD:
Changed struct ifnet to have a pointer to the softc of the underlying device and a printable "external name" (name + unit number), thus eliminating if_name and if_unit. Updated interface to (*if_watchdog)() and (*if_start)() to take a struct ifnet *, rather than a unit number.
Diffstat (limited to 'sys/arch/amiga/dev/if_ae.c')
-rw-r--r--sys/arch/amiga/dev/if_ae.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/arch/amiga/dev/if_ae.c b/sys/arch/amiga/dev/if_ae.c
index 57d9e7f9983..a0ac1f62833 100644
--- a/sys/arch/amiga/dev/if_ae.c
+++ b/sys/arch/amiga/dev/if_ae.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: if_ae.c,v 1.6 1996/05/05 13:36:23 mickey Exp $ */
-/* $NetBSD: if_ae.c,v 1.7 1996/04/21 21:11:40 veego Exp $ */
+/* $OpenBSD: if_ae.c,v 1.7 1996/05/09 22:39:58 niklas Exp $ */
+/* $NetBSD: if_ae.c,v 1.8 1996/05/07 00:46:37 thorpej Exp $ */
/*
* Copyright (c) 1995 Bernd Ernesti and Klaus Burkert. All rights reserved.
@@ -121,7 +121,7 @@ static u_int16_t revision;
int aematch __P((struct device *, void *, void *));
void aeattach __P((struct device *, struct device *, void *));
-void aewatchdog __P((int));
+void aewatchdog __P((struct ifnet *));
void aestop __P((struct ae_softc *));
void aememinit __P((struct ae_softc *));
void aereset __P((struct ae_softc *));
@@ -221,8 +221,8 @@ aeattach(parent, self, aux)
splx (s);
- ifp->if_unit = sc->sc_dev.dv_unit;
- ifp->if_name = ae_cd.cd_name;
+ bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
+ ifp->if_softc = sc;
ifp->if_ioctl = aeioctl;
ifp->if_watchdog = aewatchdog;
ifp->if_output = ether_output;
@@ -244,10 +244,10 @@ aeattach(parent, self, aux)
}
void
-aewatchdog(unit)
- int unit;
+aewatchdog(ifp)
+ struct ifnet *ifp;
{
- struct ae_softc *sc = ae_cd.cd_devs[unit];
+ struct ae_softc *sc = ifp->if_softc;
log(LOG_ERR, "%s: device timeout\n", sc->sc_dev.dv_xname);
++sc->sc_arpcom.ac_if.if_oerrors;
@@ -432,7 +432,7 @@ void
aestart(ifp)
struct ifnet *ifp;
{
- register struct ae_softc *sc = ae_cd.cd_devs[ifp->if_unit];
+ register struct ae_softc *sc = ifp->if_softc;
register int bix;
register struct aetmd *tmd;
register struct mbuf *m;
@@ -943,7 +943,7 @@ aeioctl(ifp, cmd, data)
u_long cmd;
caddr_t data;
{
- struct ae_softc *sc = ae_cd.cd_devs[ifp->if_unit];
+ struct ae_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
struct ifreq *ifr = (struct ifreq *)data;
int s, error = 0;