diff options
author | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
commit | 24e218260af83b7292524d1581b8dfcf5d3c8c5b (patch) | |
tree | 5d1fe7fa29fd95ce356cefa187ddba64b0b97b6d /sys/dev/lnc | |
parent | c2771d0d1bd4ee9f81f73a838d7aa075897c1b71 (diff) | |
download | FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.zip FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.tar.gz |
Add support for devconf to a large number of device drivers, and do
the right thing in dev_goawayall() when kdc_goaway is null.
Diffstat (limited to 'sys/dev/lnc')
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 57 |
1 files changed, 38 insertions, 19 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 89cec80..1c6911a 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -51,31 +51,34 @@ #define MULTICAST_ADDR_LEN 8 #define ETHER_MIN_LEN 64 -#include "param.h" -#include "systm.h" -#include "errno.h" -#include "ioctl.h" -#include "mbuf.h" -#include "socket.h" -#include "syslog.h" -#include "net/if.h" -#include "net/if_dl.h" -#include "net/if_types.h" +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/errno.h> +#include <sys/ioccom.h> +#include <sys/sockio.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/syslog.h> +#include <sys/devconf.h> + +#include <net/if.h> +#include <net/if_dl.h> +#include <net/if_types.h> #ifdef INET -#include "netinet/in.h" -#include "netinet/in_systm.h" -#include "netinet/in_var.h" -#include "netinet/ip.h" -#include "netinet/if_ether.h" +#include <netinet/in.h> +#include <netinet/in_systm.h> +#include <netinet/in_var.h> +#include <netinet/ip.h> +#include <netinet/if_ether.h> #endif #if NBPFILTER > 0 -#include "net/bpf.h" -#include "net/bpfdesc.h" +#include <net/bpf.h> +#include <net/bpfdesc.h> #endif -#include "i386/isa/isa_device.h" -#include "i386/isa/if_lnc.h" +#include <i386/isa/isa_device.h> +#include <i386/isa/if_lnc.h> struct lnc_softc { struct arpcom arpcom; /* see ../../netinet/if_ether.h */ @@ -725,6 +728,22 @@ lnc_tint(int unit) } +static struct kern_devconf kdc_lnc[NLNC] = { { + 0, 0, 0, /* filled in by dev_attach */ + "lnc", 0, { "isa0", MDDT_ISA, 0 }, + isa_generic_externalize, 0, 0, ISA_EXTERNALLEN +} }; + +static inline void +lnc_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_lnc[id->id_unit] = kdc_lnc[0]; + kdc_lnc[id->id_unit].kdc_unit = id->id_unit; + kdc_lnc[id->id_unit].kdc_isa = id; + dev_attach(&kdc_lnc[id->id_unit]); +} + int lnc_probe(struct isa_device * isa_dev) { |