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 Fix macppc/dev/if_mc.c::mc_mediachange()...
details: https://anonhg.NetBSD.org/src/rev/3883494e0d06
branches: trunk
changeset: 846913:3883494e0d06
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Dec 04 07:03:46 2019 +0000
description:
Fix macppc/dev/if_mc.c::mc_mediachange(). Not tested.
ifmedia_change() is used to change the device's media setting from
user-selected media. The user-selected media is not sc->sc_media.ifm_media but
sc->sc_media.ifm_cur->ifm_media. Note that mc_mediachange() is not called from
anywhere because it's disabled with #ifdef NOTYET.
diffstat:
sys/arch/macppc/dev/if_mc.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r 53b2da310add -r 3883494e0d06 sys/arch/macppc/dev/if_mc.c
--- a/sys/arch/macppc/dev/if_mc.c Wed Dec 04 06:28:35 2019 +0000
+++ b/sys/arch/macppc/dev/if_mc.c Wed Dec 04 07:03:46 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mc.c,v 1.24 2019/04/25 10:08:45 msaitoh Exp $ */
+/* $NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 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.24 2019/04/25 10:08:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mc.c,v 1.25 2019/12/04 07:03:46 msaitoh Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -362,12 +362,12 @@
int
mc_mediachange(struct mc_softc *sc)
{
- struct ifmedia *ifm = &sc->sc_media;
+ struct ifmedia_entry *ife = sc->sc_media.ifm_cur;
- if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
+ if (IFM_TYPE(ife->ifm_media) != IFM_ETHER)
return EINVAL;
- switch (IFM_SUBTYPE(ifm->ifm_media)) {
+ switch (IFM_SUBTYPE(ife->ifm_media)) {
case IFM_10_T:
mc_select_utp(sc);
Home |
Main Index |
Thread Index |
Old Index