If the driver only supports one media type, and ifmedia_ioctl() is called to
select the current medium, (and it is not autoselect), assume no change and do not try to select the medium. Fixes 'ifconfig le0 medium 10base5' on sparc2 without requiring a 'do nothing' mediachange callback.
This commit is contained in:
parent
ef6e15ad0e
commit
175b821dfe
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_media.c,v 1.3 1998/08/30 07:39:39 enami Exp $ */
|
||||
/* $NetBSD: if_media.c,v 1.4 1999/04/30 17:30:49 abs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -260,7 +260,8 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
|
|||
* Similarly, if best match changed (kernel debugger?).
|
||||
*/
|
||||
if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
|
||||
(newmedia == ifm->ifm_media) &&
|
||||
(newmedia == ifm->ifm_media || (ifm->ifm_media == 0 &&
|
||||
LIST_NEXT(ifm->ifm_list.lh_first,ifm_list)==0)) &&
|
||||
(match == ifm->ifm_cur))
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue