summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/dev/dc/pnphy.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/dev/dc/pnphy.c')
-rw-r--r--freebsd/sys/dev/dc/pnphy.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/freebsd/sys/dev/dc/pnphy.c b/freebsd/sys/dev/dc/pnphy.c
index a9a8ec93..5f1c52f2 100644
--- a/freebsd/sys/dev/dc/pnphy.c
+++ b/freebsd/sys/dev/dc/pnphy.c
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
#include <sys/bus.h>
#include <net/if.h>
+#include <net/if_var.h>
#include <net/if_arp.h>
#include <net/if_media.h>
@@ -153,7 +154,7 @@ pnphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
/*
* If the interface is not up, don't do anything.
*/
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
+ if ((if_getflags(mii->mii_ifp) & IFF_UP) == 0)
break;
/*
@@ -181,7 +182,7 @@ pnphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd)
/*
* Is the interface even up?
*/
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
+ if ((if_getflags(mii->mii_ifp) & IFF_UP) == 0)
return (0);
break;
@@ -202,7 +203,7 @@ pnphy_status(struct mii_softc *sc)
int reg;
struct dc_softc *dc_sc;
- dc_sc = mii->mii_ifp->if_softc;
+ dc_sc = if_getsoftc(mii->mii_ifp);
mii->mii_media_status = IFM_AVALID;
mii->mii_media_active = IFM_ETHER;