summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-06-14 03:27:59 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-06-14 03:27:59 +0000
commite3a9f56a21c229235d07f6485450001e89401681 (patch)
tree5069120622b67abcd4a97815670263a86f389fb4
parentdda8d6c459407e0c05213fe1102fa1721a877709 (diff)
at least allow the transmit checksum code to compile
though this hasn't been re-enabled yet.
-rw-r--r--sys/dev/pci/if_em.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 188c09012ad..10a5f5daef6 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
-/* $OpenBSD: if_em.c,v 1.57 2005/06/14 03:24:32 brad Exp $ */
+/* $OpenBSD: if_em.c,v 1.58 2005/06/14 03:27:58 brad Exp $ */
#include "bpfilter.h"
#include "vlan.h"
@@ -56,6 +56,8 @@ POSSIBILITY OF SUCH DAMAGE.
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/if_ether.h>
+#include <netinet/tcp.h>
+#include <netinet/udp.h>
#endif
#if NVLAN > 0
@@ -1990,7 +1992,6 @@ em_free_transmit_structures(struct em_softc *sc)
* context only if the protocol type changes.
*
**********************************************************************/
-#if 0
void
em_transmit_checksum_setup(struct em_softc *sc,
struct mbuf *mp,
@@ -2003,7 +2004,7 @@ em_transmit_checksum_setup(struct em_softc *sc,
if (mp->m_pkthdr.csum_flags) {
- if (mp->m_pkthdr.csum_flags & CSUM_TCP) {
+ if (mp->m_pkthdr.csum_flags & M_TCPV4_CSUM_OUT) {
*txd_upper = E1000_TXD_POPTS_TXSM << 8;
*txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D;
if (sc->active_checksum_context == OFFLOAD_TCP_IP)
@@ -2011,7 +2012,7 @@ em_transmit_checksum_setup(struct em_softc *sc,
else
sc->active_checksum_context = OFFLOAD_TCP_IP;
- } else if (mp->m_pkthdr.csum_flags & CSUM_UDP) {
+ } else if (mp->m_pkthdr.csum_flags & M_UDPV4_CSUM_OUT) {
*txd_upper = E1000_TXD_POPTS_TXSM << 8;
*txd_lower = E1000_TXD_CMD_DEXT | E1000_TXD_DTYP_D;
if (sc->active_checksum_context == OFFLOAD_UDP_IP)
@@ -2069,7 +2070,6 @@ em_transmit_checksum_setup(struct em_softc *sc,
return;
}
-#endif
/**********************************************************************
*