diff options
author | brooks <brooks@FreeBSD.org> | 2003-10-31 18:32:15 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2003-10-31 18:32:15 +0000 |
commit | f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda (patch) | |
tree | 4d9e6671d486576767506230a4240131526fea49 /sys/dev/firewire/if_fwe.c | |
parent | be546fdee455a96afdefee10d0bdba8547399f5b (diff) | |
download | FreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.zip FreeBSD-src-f1e94c6f29b079e4ad9d9305ef3e90a719bcbbda.tar.gz |
Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.
This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.
Approved By: re (in principle)
Reviewed By: njl, imp
Tested On: i386, amd64, sparc64
Obtained From: NetBSD (if_xname)
Diffstat (limited to 'sys/dev/firewire/if_fwe.c')
-rw-r--r-- | sys/dev/firewire/if_fwe.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/firewire/if_fwe.c b/sys/dev/firewire/if_fwe.c index b076497..92c0314 100644 --- a/sys/dev/firewire/if_fwe.c +++ b/sys/dev/firewire/if_fwe.c @@ -186,8 +186,7 @@ fwe_attach(device_t dev) ifp = &fwe->fwe_if; ifp->if_softc = &fwe->eth_softc; - ifp->if_unit = unit; - ifp->if_name = "fwe"; + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_init = fwe_init; ifp->if_output = ether_output; ifp->if_start = fwe_start; @@ -211,7 +210,7 @@ fwe_attach(device_t dev) #endif - FWEDEBUG("interface %s%d created.\n", ifp->if_name, ifp->if_unit); + FWEDEBUG("interface %s created.\n", ifp->if_xname); return 0; } @@ -287,7 +286,7 @@ fwe_init(void *arg) struct mbuf *m; int i; - FWEDEBUG("initializing %s%d\n", ifp->if_name, ifp->if_unit); + FWEDEBUG("initializing %s\n", ifp->if_xname); /* XXX keep promiscoud mode */ ifp->if_flags |= IFF_PROMISC; @@ -464,12 +463,12 @@ fwe_start(struct ifnet *ifp) struct fwe_softc *fwe = ((struct fwe_eth_softc *)ifp->if_softc)->fwe; int s; - FWEDEBUG("%s%d starting\n", ifp->if_name, ifp->if_unit); + FWEDEBUG("%s starting\n", ifp->if_xname); if (fwe->dma_ch < 0) { struct mbuf *m = NULL; - FWEDEBUG("%s%d not ready.\n", ifp->if_name, ifp->if_unit); + FWEDEBUG("%s not ready.\n", ifp->if_xname); s = splimp(); do { |