summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2013-03-11 23:42:19 +0000
committerbrad <brad@openbsd.org>2013-03-11 23:42:19 +0000
commite8d2e996f3a334e9bc2a0b367b37e146cb8743d6 (patch)
tree01a6bdbdd86fcf5a9cc59cf2fbb641e761a51e22
parentderivated -> derived; from daniel dickman (diff)
downloadwireguard-openbsd-e8d2e996f3a334e9bc2a0b367b37e146cb8743d6.tar.xz
wireguard-openbsd-e8d2e996f3a334e9bc2a0b367b37e146cb8743d6.zip
Separate out the common capabilities flags from the switch statement
added in the last commit. No functional change. ok sthen@
-rw-r--r--sys/dev/ic/re.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index 39f824e609b..0f14dda7510 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.140 2013/03/09 17:17:12 bluhm Exp $ */
+/* $OpenBSD: re.c,v 1.141 2013/03/11 23:42:19 brad Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -1139,6 +1139,9 @@ re_attach(struct rl_softc *sc, const char *intrstr)
m_clsetwms(ifp, MCLBYTES, 2, RL_RX_DESC_CNT);
+ ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_TCPv4 |
+ IFCAP_CSUM_UDPv4;
+
/*
* RTL8168/8111C generates wrong IP checksummed frame if the
* packet has IP options so disable TX IP checksum offloading.
@@ -1147,12 +1150,9 @@ re_attach(struct rl_softc *sc, const char *intrstr)
case RL_HWREV_8168C:
case RL_HWREV_8168C_SPIN2:
case RL_HWREV_8168CP:
- ifp->if_capabilities = IFCAP_VLAN_MTU |
- IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
break;
default:
- ifp->if_capabilities = IFCAP_VLAN_MTU | IFCAP_CSUM_IPv4 |
- IFCAP_CSUM_TCPv4 | IFCAP_CSUM_UDPv4;
+ ifp->if_capabilities |= IFCAP_CSUM_IPv4;
}
#if NVLAN > 0