summaryrefslogtreecommitdiffstats
path: root/sys/dev/utopia
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-06-22 06:51:52 +0000
committerharti <harti@FreeBSD.org>2005-06-22 06:51:52 +0000
commit37a4441439b6d47c934b7ca280a7c85f6cfd7b9e (patch)
tree66ef0d03062b986bc60da68e76418e65dbb3b7e7 /sys/dev/utopia
parent88579b1e2870864a5ed9e3b0340a9fa311420b5a (diff)
downloadFreeBSD-src-37a4441439b6d47c934b7ca280a7c85f6cfd7b9e.zip
FreeBSD-src-37a4441439b6d47c934b7ca280a7c85f6cfd7b9e.tar.gz
Struct ifatm isn't at the beginning of the softc anymore. Use the
correct way (IFP2IFATM()) to access it. Approved by: re
Diffstat (limited to 'sys/dev/utopia')
-rw-r--r--sys/dev/utopia/utopia.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/utopia/utopia.c b/sys/dev/utopia/utopia.c
index c4416a0..7480efc 100644
--- a/sys/dev/utopia/utopia.c
+++ b/sys/dev/utopia/utopia.c
@@ -223,7 +223,7 @@ static const struct utopia_chip utopia_chip_unknown = {
static int
utopia_media_change(struct ifnet *ifp)
{
- struct ifatm *ifatm = (struct ifatm *)ifp->if_softc;
+ struct ifatm *ifatm = IFP2IFATM(ifp);
struct utopia *utp = ifatm->phy;
int error = 0;
@@ -262,7 +262,7 @@ utopia_media_change(struct ifnet *ifp)
static void
utopia_media_status(struct ifnet *ifp, struct ifmediareq *ifmr)
{
- struct utopia *utp = ((struct ifatm *)ifp->if_softc)->phy;
+ struct utopia *utp = IFP2IFATM(ifp)->phy;
UTP_LOCK(utp);
if (utp->chip->type != UTP_TYPE_UNKNOWN && utp->state & UTP_ST_ACTIVE) {
OpenPOWER on IntegriCloud