Source-Changes-HG archive

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

[src/trunk]: src/sys/net If the driver only supports one media type, and ifme...



details:   https://anonhg.NetBSD.org/src/rev/dde18f3bf80b
branches:  trunk
changeset: 472495:dde18f3bf80b
user:      abs <abs%NetBSD.org@localhost>
date:      Fri Apr 30 17:30:49 1999 +0000

description:
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.

diffstat:

 sys/net/if_media.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 3bbcaa7f7768 -r dde18f3bf80b sys/net/if_media.c
--- a/sys/net/if_media.c        Fri Apr 30 16:50:44 1999 +0000
+++ b/sys/net/if_media.c        Fri Apr 30 17:30:49 1999 +0000
@@ -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 @@
                 *     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;
 



Home | Main Index | Thread Index | Old Index