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.
This commit is contained in:
parent
912ca7e3d8
commit
2334111e25
@ -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>
|
||||
@ -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 @@ mc_select_aui(struct mc_softc *sc)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user