diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-02-02 20:34:43 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-02-02 20:34:43 +0000 |
commit | 93f77001b9dd9910e6514cbbb3cd7dd7e19526bf (patch) | |
tree | ef4de99fe86a3b1fbfa3255b3aed6b0f612fd3c4 | |
parent | 65b117ceb1a975c785cde0216d6be668b7145057 (diff) |
Correct the baudrate handling.
ok dlg@
-rw-r--r-- | sys/dev/pci/if_tht.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index 2faeee40ab2..16f54402881 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.111 2008/01/17 20:45:16 thib Exp $ */ +/* $OpenBSD: if_tht.c,v 1.112 2008/02/02 20:34:42 brad Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -788,7 +788,6 @@ tht_attach(struct device *parent, struct device *self, void *aux) strlcpy(ifp->if_xname, DEVNAME(sc), IFNAMSIZ); IFQ_SET_MAXLEN(&ifp->if_snd, 400); IFQ_SET_READY(&ifp->if_snd); - ifp->if_baudrate = IF_Gbps(10); ifmedia_init(&sc->sc_media, 0, tht_media_change, tht_media_status); ifmedia_add(&sc->sc_media, IFM_ETHER|IFM_AUTO, 0, NULL); @@ -1772,6 +1771,11 @@ tht_link_state(struct tht_softc *sc) ifp->if_link_state = link_state; if_link_state_change(ifp); } + + if (ifp->if_link_state == LINK_STATE_UP) + ifp->if_baudrate = IF_Gbps(10); + else + ifp->if_baudrate = 0; } u_int32_t |