Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev Revert if_mc.c rev. 1.25. It's not requi...



details:   https://anonhg.NetBSD.org/src/rev/18cf662b4443
branches:  trunk
changeset: 465836:18cf662b4443
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Dec 05 06:28:20 2019 +0000

description:
Revert if_mc.c rev. 1.25. It's not required to check ifm->ifm_cur->ifm_media
instead of ifm->ifm_media.

diffstat:

 sys/arch/macppc/dev/if_mc.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r acd90f1585fa -r 18cf662b4443 sys/arch/macppc/dev/if_mc.c
--- a/sys/arch/macppc/dev/if_mc.c       Thu Dec 05 06:28:09 2019 +0000
+++ b/sys/arch/macppc/dev/if_mc.c       Thu Dec 05 06:28:20 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 msaitoh Exp $       */
+/*     $NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $       */
 
 /*-
  * Copyright (c) 1997 David Huang <khym%bga.com@localhost>
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.26 2019/12/05 06:28:20 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -362,12 +362,12 @@
 int
 mc_mediachange(struct mc_softc *sc)
 {
-       struct ifmedia_entry *ife = sc->sc_media.ifm_cur;
+       struct ifmedia *ifm = &sc->sc_media;
 
-       if (IFM_TYPE(ife->ifm_media) != IFM_ETHER)
+       if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
                return EINVAL;
 
-       switch (IFM_SUBTYPE(ife->ifm_media)) {
+       switch (IFM_SUBTYPE(ifm->ifm_media)) {
 
        case IFM_10_T:
                mc_select_utp(sc);



Home | Main Index | Thread Index | Old Index