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/harp | |
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/harp')
-rw-r--r-- | sys/dev/harp/if_harp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/harp/if_harp.c b/sys/dev/harp/if_harp.c index 02e1aa7..ac38b02 100644 --- a/sys/dev/harp/if_harp.c +++ b/sys/dev/harp/if_harp.c @@ -160,7 +160,7 @@ static const struct { static int harp_check_if(const struct ifnet *ifp) { - if (ifp->if_type == IFT_ATM && strcmp(ifp->if_name, "en")) + if (ifp->if_type == IFT_ATM && strcmp(ifp->if_dname, "en")) return (0); else return (-1); @@ -386,7 +386,7 @@ harp_attach(struct ifnet *parent) sc = malloc(sizeof(*sc), M_HARP, M_WAITOK | M_ZERO); sc->parent = parent; - sc->cmn.cu_unit = parent->if_unit; + sc->cmn.cu_unit = parent->if_dunit; sc->cmn.cu_mtu = HARP_MTU; sc->cmn.cu_ioctl = harp_ioctl; sc->cmn.cu_instvcc = harp_instvcc; @@ -469,10 +469,10 @@ harp_attach(struct ifnet *parent) sc->cmn.cu_config.ac_macaddr.ma_data[5] = sc->cmn.cu_pif.pif_macaddr.ma_data[5] = mib->esi[5]; - error = atm_physif_register(&sc->cmn, parent->if_name, harp_services); + error = atm_physif_register(&sc->cmn, parent->if_dname, harp_services); if (error) { log(LOG_ERR, "%s: pif registration failed %d\n", - parent->if_name, error); + parent->if_dname, error); free(sc, M_HARP); return; } @@ -498,7 +498,7 @@ harp_detach(struct ifnet *ifp) error = atm_physif_deregister(&sc->cmn); if (error) - log(LOG_ERR, "%s: de-registration failed %d\n", ifp->if_name, + log(LOG_ERR, "%s: de-registration failed %d\n", ifp->if_dname, error); LIST_REMOVE(sc, link); |