diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2003-10-30 19:45:58 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2003-10-30 19:45:58 +0000 |
| commit | c020a92f9f30edcefb75c81b8882ada6e6d50b8d (patch) | |
| tree | 7d01fdeb4d415c1bae5c7bd03a9a32e71d3a786d /sys/dev/ed | |
| parent | fbd00896e28474899e78fad8321664333122c98f (diff) | |
Notes
Diffstat (limited to 'sys/dev/ed')
| -rw-r--r-- | sys/dev/ed/if_ed.c | 84 |
1 files changed, 41 insertions, 43 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 0f584aa2ce30..0c6a0f64fb1c 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -1713,51 +1713,49 @@ ed_attach(sc, unit, flags) */ ed_stop(sc); - if (!ifp->if_name) { - /* - * Initialize ifnet structure - */ - ifp->if_softc = sc; - ifp->if_unit = unit; - ifp->if_name = "ed"; - ifp->if_output = ether_output; - ifp->if_start = ed_start; - ifp->if_ioctl = ed_ioctl; - ifp->if_watchdog = ed_watchdog; - ifp->if_init = ed_init; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; - ifp->if_linkmib = &sc->mibdata; - ifp->if_linkmiblen = sizeof sc->mibdata; - /* - * XXX - should do a better job. - */ - if (sc->chip_type == ED_CHIP_TYPE_WD790) - sc->mibdata.dot3StatsEtherChipSet = - DOT3CHIPSET(dot3VendorWesternDigital, - dot3ChipSetWesternDigital83C790); - else - sc->mibdata.dot3StatsEtherChipSet = - DOT3CHIPSET(dot3VendorNational, - dot3ChipSetNational8390); - sc->mibdata.dot3Compliance = DOT3COMPLIANCE_COLLS; + /* + * Initialize ifnet structure + */ + ifp->if_softc = sc; + ifp->if_unit = unit; + ifp->if_name = "ed"; + ifp->if_output = ether_output; + ifp->if_start = ed_start; + ifp->if_ioctl = ed_ioctl; + ifp->if_watchdog = ed_watchdog; + ifp->if_init = ed_init; + ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + ifp->if_linkmib = &sc->mibdata; + ifp->if_linkmiblen = sizeof sc->mibdata; + /* + * XXX - should do a better job. + */ + if (sc->chip_type == ED_CHIP_TYPE_WD790) + sc->mibdata.dot3StatsEtherChipSet = + DOT3CHIPSET(dot3VendorWesternDigital, + dot3ChipSetWesternDigital83C790); + else + sc->mibdata.dot3StatsEtherChipSet = + DOT3CHIPSET(dot3VendorNational, + dot3ChipSetNational8390); + sc->mibdata.dot3Compliance = DOT3COMPLIANCE_COLLS; - /* - * Set default state for ALTPHYS flag (used to disable the - * tranceiver for AUI operation), based on compile-time - * config option. - */ - if (flags & ED_FLAGS_DISABLE_TRANCEIVER) - ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | - IFF_MULTICAST | IFF_ALTPHYS); - else - ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | - IFF_MULTICAST); + /* + * Set default state for ALTPHYS flag (used to disable the + * tranceiver for AUI operation), based on compile-time + * config option. + */ + if (flags & ED_FLAGS_DISABLE_TRANCEIVER) + ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | + IFF_MULTICAST | IFF_ALTPHYS); + else + ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | + IFF_MULTICAST); - /* - * Attach the interface - */ - ether_ifattach(ifp, sc->arpcom.ac_enaddr); - } + /* + * Attach the interface + */ + ether_ifattach(ifp, sc->arpcom.ac_enaddr); /* device attach does transition from UNCONFIGURED to IDLE state */ /* |
