diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2012-11-28 01:15:34 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2012-11-28 01:15:34 +0000 |
commit | 96ec03b564a0dfc86855d7c5d7a3853dd0b0e8a7 (patch) | |
tree | b70820ba966a28377f63bd788e3a81800b6a63fc | |
parent | 4b4b0ef0a4a37726cc1d927025e4647b2521bc1f (diff) |
- Use IF_Gbps(1) instead of IF_Mbps(1000)
- Use IF_Mbps() instead of multiplying the link speed by a bare value
- Remove a useless comment as baudrate is already handled properly
- Remove some commented out bits of code
- Use IF_Mbps() instead of the bare value
ok sthen@
-rw-r--r-- | sys/arch/octeon/dev/cn30xxgmx.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/if_em.c | 4 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_xe.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_upl.c | 4 |
5 files changed, 8 insertions, 14 deletions
diff --git a/sys/arch/octeon/dev/cn30xxgmx.c b/sys/arch/octeon/dev/cn30xxgmx.c index 550133dadde..b647f5c19dc 100644 --- a/sys/arch/octeon/dev/cn30xxgmx.c +++ b/sys/arch/octeon/dev/cn30xxgmx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cn30xxgmx.c,v 1.3 2011/07/03 20:31:39 yasuoka Exp $ */ +/* $OpenBSD: cn30xxgmx.c,v 1.4 2012/11/28 01:15:33 brad Exp $ */ /* * Copyright (c) 2007 Internet Initiative Japan, Inc. @@ -672,7 +672,7 @@ cn30xxgmx_rgmii_speed(struct cn30xxgmx_port_softc *sc) baudrate = IF_Mbps(100); break; case RXN_RX_INBND_SPEED_125: - baudrate = IF_Mbps(1000); + baudrate = IF_Gbps(1); break; default: baudrate = 0/* XXX */; diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index 53cebc7deb7..ba9aa81558d 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.267 2012/08/16 09:31:53 mikeb Exp $ */ +/* $OpenBSD: if_em.c,v 1.268 2012/11/28 01:15:33 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -1485,7 +1485,7 @@ em_update_link_status(struct em_softc *sc) } sc->link_active = 1; sc->smartspeed = 0; - ifp->if_baudrate = sc->link_speed * 1000000; + ifp->if_baudrate = IF_Mbps(sc->link_speed); } if (!LINK_STATE_IS_UP(ifp->if_link_state)) { if (sc->link_duplex == FULL_DUPLEX) diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index 96395f0b496..b2d10ad02cb 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.40 2011/07/03 15:47:17 matthew Exp $ */ +/* $OpenBSD: if_xe.c,v 1.41 2012/11/28 01:15:33 brad Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -986,7 +986,6 @@ void xe_statchg(self) struct device *self; { - /* XXX Update ifp->if_baudrate */ } /* diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 7012f3df093..82f2537effd 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.113 2012/11/21 05:26:18 kirby Exp $ */ +/* $OpenBSD: if_axe.c,v 1.114 2012/11/28 01:15:33 brad Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -794,12 +794,7 @@ axe_attach(struct device *parent, struct device *self, void *aux) ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = axe_ioctl; ifp->if_start = axe_start; - ifp->if_watchdog = axe_watchdog; - -/* ifp->if_baudrate = 10000000; */ -/* ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;*/ - IFQ_SET_READY(&ifp->if_snd); ifp->if_capabilities = IFCAP_VLAN_MTU; diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 29afec72365..a42b850336b 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.48 2011/07/03 15:47:17 matthew Exp $ */ +/* $OpenBSD: if_upl.c,v 1.49 2012/11/28 01:15:33 brad Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -292,7 +292,7 @@ upl_attach(struct device *parent, struct device *self, void *aux) ifp->if_addrlen = 0; ifp->if_hdrlen = 0; ifp->if_output = upl_output; - ifp->if_baudrate = 12000000; + ifp->if_baudrate = IF_Mbps(12); IFQ_SET_READY(&ifp->if_snd); /* Attach the interface. */ |