diff options
Diffstat (limited to 'sys/dev/mii/nsphy.c')
| -rw-r--r-- | sys/dev/mii/nsphy.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/mii/nsphy.c b/sys/dev/mii/nsphy.c index fd5472c09078a..748e02a419916 100644 --- a/sys/dev/mii/nsphy.c +++ b/sys/dev/mii/nsphy.c @@ -129,15 +129,13 @@ nsphy_probe(device_t dev) static int nsphy_attach(device_t dev) { - const char *nic; u_int flags; - nic = device_get_name(device_get_parent(device_get_parent(dev))); flags = MIIF_NOMANPAUSE; /* * Am79C971 wedge when isolating all of their external PHYs. */ - if (strcmp(nic, "pcn") == 0) + if (mii_dev_mac_match(dev,"pcn")) flags |= MIIF_NOISOLATE; mii_phy_dev_attach(dev, flags, &nsphy_funcs, 1); return (0); @@ -186,7 +184,7 @@ nsphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) */ reg |= 0x0100 | 0x0400; - if (strcmp(if_getdname(mii->mii_ifp), "fxp") == 0) + if (mii_phy_mac_match(sc, "fxp")) PHY_WRITE(sc, MII_NSPHY_PCR, reg); mii_phy_setmedia(sc); |
