Set ifp->if_baudrate as appropriate.

This commit is contained in:
thorpej 2000-03-06 21:02:37 +00:00
parent a6f861574a
commit 91c44a72b8
3 changed files with 18 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ti.c,v 1.4 2000/01/25 23:23:48 thorpej Exp $ */
/* $NetBSD: if_ti.c,v 1.5 2000/03/06 21:02:37 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -1870,8 +1870,8 @@ static void ti_attach(parent, self, aux)
#endif
ifp->if_start = ti_start;
ifp->if_watchdog = ti_watchdog;
ifp->if_baudrate = 10000000;
#if 0
ifp->if_baudrate = 10000000;
ifp->if_init = ti_init;
ifp->if_mtu = ETHERMTU;
#endif
@ -2515,6 +2515,9 @@ static int ti_ifmedia_upd(ifp)
break;
}
sc->ethercom.ec_if.if_baudrate =
ifmedia_baudrate(ifm->ifm_media);
return(0);
}
@ -2551,7 +2554,10 @@ static void ti_ifmedia_sts(ifp, ifmr)
if (media & TI_LNK_HALF_DUPLEX)
ifmr->ifm_active |= IFM_HDX;
}
sc->ethercom.ec_if.if_baudrate =
ifmedia_baudrate(sc->ifmedia.ifm_media);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cnw.c,v 1.8 2000/02/26 05:34:43 itojun Exp $ */
/* $NetBSD: if_cnw.c,v 1.9 2000/03/06 21:02:39 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -553,7 +553,7 @@ cnw_attach(parent, self, aux)
#endif
sc->sc_resource |= CNW_RES_NET;
ifp->if_baudrate = 1 * 1024 * 1024;
ifp->if_baudrate = IF_Mbps(1);
/* Disable the card now, and turn it on when the interface goes up */
pcmcia_function_disable(sc->sc_pf);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wi.c,v 1.12 2000/03/06 10:31:27 enami Exp $ */
/* $NetBSD: if_wi.c,v 1.13 2000/03/06 21:02:39 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@ -31,7 +31,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: if_wi.c,v 1.12 2000/03/06 10:31:27 enami Exp $
* $Id: if_wi.c,v 1.13 2000/03/06 21:02:39 thorpej Exp $
*/
/*
@ -116,7 +116,7 @@
#if !defined(lint)
static const char rcsid[] =
"$Id: if_wi.c,v 1.12 2000/03/06 10:31:27 enami Exp $";
"$Id: if_wi.c,v 1.13 2000/03/06 21:02:39 thorpej Exp $";
#endif
#ifdef foo
@ -292,7 +292,6 @@ wi_attach(parent, self, aux)
ifp->if_ioctl = wi_ioctl;
ifp->if_watchdog = wi_watchdog;
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
ifp->if_baudrate = 2000000;
(void)wi_set_ssid(&sc->wi_nodeid, WI_DEFAULT_NODENAME,
sizeof(WI_DEFAULT_NODENAME) - 1);
@ -356,6 +355,8 @@ wi_attach(parent, self, aux)
if_attach(ifp);
ether_ifattach(ifp, mac.wi_mac_addr);
ifp->if_baudrate = IF_Mbps(2);
#if NBPFILTER > 0
bpfattach(&sc->sc_ethercom.ec_if.if_bpf, ifp, DLT_EN10MB,
sizeof(struct ether_header));
@ -1696,6 +1697,8 @@ wi_media_change(ifp)
wi_init(sc);
}
ifp->if_baudrate = ifmedia_baudrate(sc->sc_media.ifm_cur->ifm_media);
return (0);
}