summaryrefslogtreecommitdiffstats
path: root/sys/dev/lnc
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-07-13 22:54:34 +0000
committerarchie <archie@FreeBSD.org>2000-07-13 22:54:34 +0000
commit7357df6b4854f9914c605ad7c7cf3c01ea7700fd (patch)
treef79218274bf72874f2d01c6213ea088c3a3e768d /sys/dev/lnc
parentef18034ac19957f4a94d28dd906d02cf32260a83 (diff)
downloadFreeBSD-src-7357df6b4854f9914c605ad7c7cf3c01ea7700fd.zip
FreeBSD-src-7357df6b4854f9914c605ad7c7cf3c01ea7700fd.tar.gz
Make all Ethernet drivers attach using ether_ifattach() and detach using
ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net
Diffstat (limited to 'sys/dev/lnc')
-rw-r--r--sys/dev/lnc/if_lnc.c9
-rw-r--r--sys/dev/lnc/if_lnc_isa.c4
2 files changed, 3 insertions, 10 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index d1c6e68..f56a56d 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -895,12 +895,7 @@ lnc_attach_sc(lnc_softc_t *sc, int unit)
sc->arpcom.ac_if.if_hdrlen = ETHER_HDR_LEN;
sc->arpcom.ac_if.if_snd.ifq_maxlen = IFQ_MAXLEN;
- /*
- * XXX -- should check return status of if_attach
- */
-
- if_attach(&sc->arpcom.ac_if);
- ether_ifattach(&sc->arpcom.ac_if);
+ ether_ifattach(&sc->arpcom.ac_if, ETHER_BPF_SUPPORTED);
printf("lnc%d: ", unit);
if (sc->nic.ic == LANCE || sc->nic.ic == C_LANCE)
@@ -910,8 +905,6 @@ lnc_attach_sc(lnc_softc_t *sc, int unit)
printf("%s", ic_ident[sc->nic.ic]);
printf(" address %6D\n", sc->arpcom.ac_enaddr, ":");
- bpfattach(&sc->arpcom.ac_if, DLT_EN10MB, sizeof(struct ether_header));
-
return (1);
}
diff --git a/sys/dev/lnc/if_lnc_isa.c b/sys/dev/lnc/if_lnc_isa.c
index fe98027..ce501b5 100644
--- a/sys/dev/lnc/if_lnc_isa.c
+++ b/sys/dev/lnc/if_lnc_isa.c
@@ -315,8 +315,8 @@ lnc_attach(struct isa_device * isa_dev)
#ifndef PC98
/*
- * XXX - is it safe to call isa_dmacascade() after if_attach()
- * and ether_ifattach() have been called in lnc_attach() ???
+ * XXX - is it safe to call isa_dmacascade() after
+ * ether_ifattach() has been called in lnc_attach() ???
*/
if ((sc->nic.mem_mode != SHMEM) &&
(sc->nic.ic < PCnet_32))
OpenPOWER on IntegriCloud