summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2012-12-01 09:55:04 +0000
committerBrad Smith <brad@cvs.openbsd.org>2012-12-01 09:55:04 +0000
commit42fdbab24c29f93fd5f74334afbf1e60f0431b44 (patch)
treee2608a981bea4041ed7ce984c584b0952c635392 /sys
parent3e6fcd1934bc3f9d800d1fc56a993ebb66705191 (diff)
Don't bother to zero initialize the if_capabilities field first and
then set the flags. Just set the flags as is done everywhere else. ok sthen@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_txp.c5
-rw-r--r--sys/dev/pci/if_vr.c9
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c
index 11e58db1641..df50e119bdb 100644
--- a/sys/dev/pci/if_txp.c
+++ b/sys/dev/pci/if_txp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_txp.c,v 1.105 2012/11/23 18:40:30 gsoares Exp $ */
+/* $OpenBSD: if_txp.c,v 1.106 2012/12/01 09:55:03 brad Exp $ */
/*
* Copyright (c) 2001
@@ -228,7 +228,6 @@ txp_attachhook(void *vsc)
ifp->if_baudrate = IF_Mbps(10);
IFQ_SET_MAXLEN(&ifp->if_snd, TX_ENTRIES);
IFQ_SET_READY(&ifp->if_snd);
- ifp->if_capabilities = 0;
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
txp_capabilities(sc);
@@ -1924,7 +1923,7 @@ txp_capabilities(struct txp_softc *sc)
sc->sc_tx_capability = ext->ext_1 & OFFLOAD_MASK;
sc->sc_rx_capability = ext->ext_2 & OFFLOAD_MASK;
- ifp->if_capabilities |= IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU;
#if NVLAN > 0
if (rsp->rsp_par2 & rsp->rsp_par3 & OFFLOAD_VLAN) {
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 99e5a66da3f..31c5e89e5aa 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.120 2012/11/29 21:10:32 brad Exp $ */
+/* $OpenBSD: if_vr.c,v 1.121 2012/12/01 09:55:03 brad Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -623,14 +623,15 @@ vr_attach(struct device *parent, struct device *self, void *aux)
ifp->if_ioctl = vr_ioctl;
ifp->if_start = vr_start;
ifp->if_watchdog = vr_watchdog;
- ifp->if_capabilities = 0;
IFQ_SET_READY(&ifp->if_snd);
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
- ifp->if_capabilities |= IFCAP_VLAN_MTU;
+ ifp->if_capabilities = IFCAP_VLAN_MTU;
+
if (sc->vr_quirks & VR_Q_CSUM)
- ifp->if_capabilities |= IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
+ ifp->if_capabilities |= IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 |
IFCAP_CSUM_UDPv4;
+
#ifndef SMALL_KERNEL
if (sc->vr_revid >= REV_ID_VT3065_A) {
ifp->if_capabilities |= IFCAP_WOL;