summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2012-11-23 18:46:04 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2012-11-23 18:46:04 +0000
commit937ba45cfaba46497bf3a2e8f8bbe0c23f07c8ba (patch)
treec75501e0bd215c142ee52c65dbcfc0234ccefca1
parent91744dfe061ac176c6e20642f95130d5cb143a0b (diff)
better way to set baudrate to 0; pointed out by gsoares@
-rw-r--r--sys/dev/pci/if_oce.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c
index 634b05dd7b6..45c0ab1fc3f 100644
--- a/sys/dev/pci/if_oce.c
+++ b/sys/dev/pci/if_oce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_oce.c,v 1.63 2012/11/21 11:24:16 mikeb Exp $ */
+/* $OpenBSD: if_oce.c,v 1.64 2012/11/23 18:46:03 mikeb Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
@@ -961,6 +961,7 @@ oce_link_status(struct oce_softc *sc)
link_state = LINK_STATE_FULL_DUPLEX;
if (ifp->if_link_state == link_state)
return;
+ ifp->if_baudrate = 0;
if (link_state != LINK_STATE_DOWN) {
switch (sc->sc_link_speed) {
case 1:
@@ -976,8 +977,7 @@ oce_link_status(struct oce_softc *sc)
ifp->if_baudrate = IF_Gbps(10);
break;
}
- } else
- ifp->if_baudrate = 0;
+ }
ifp->if_link_state = link_state;
if_link_state_change(ifp);
}