Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/net Pull up revision 1.9 (requested by jhawk):



details:   https://anonhg.NetBSD.org/src/rev/a93713b2cce2
branches:  netbsd-1-4
changeset: 470577:a93713b2cce2
user:      he <he%NetBSD.org@localhost>
date:      Thu May 11 09:25:19 2000 +0000

description:
Pull up revision 1.9 (requested by jhawk):
  Add a driver for ``wi'', Lucent "Orinoco"/Wavelan.

diffstat:

 sys/net/if_media.c |  25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r 929ac975c618 -r a93713b2cce2 sys/net/if_media.c
--- a/sys/net/if_media.c        Thu May 11 09:15:57 2000 +0000
+++ b/sys/net/if_media.c        Thu May 11 09:25:19 2000 +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.3.6.1 2000/05/11 09:25:19 he Exp $      */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -392,6 +392,29 @@
        return match;
 }
 
+/*
+ * Compute the interface `baudrate' from the media, for the interface
+ * metrics (used by routing daemons).
+ */
+struct ifmedia_baudrate ifmedia_baudrate_descriptions[] =
+    IFM_BAUDRATE_DESCRIPTIONS;
+
+int
+ifmedia_baudrate(mword)
+       int mword;
+{
+       int i;
+
+       for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) {
+               if ((mword & (IFM_NMASK|IFM_TMASK)) ==
+                   ifmedia_baudrate_descriptions[i].ifmb_word)
+                       return (ifmedia_baudrate_descriptions[i].ifmb_baudrate);
+       }
+
+       /* Not known. */
+       return (0);
+}
+
 #ifdef IFMEDIA_DEBUG
 
 struct ifmedia_description ifm_type_descriptions[] =



Home | Main Index | Thread Index | Old Index