diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-10-02 00:28:10 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-10-02 00:28:10 +0000 |
commit | bf623a072ce59a756646174a25a931b756f8da00 (patch) | |
tree | d8cbe5af4cd29134e4d240528a5230f568e3c943 /sys | |
parent | b0001c059a4798c9f55e154b22ce74073e028512 (diff) |
move the checksum stuff under IXGB_CSUM_OFFLOAD.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_ixgb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ixgb.c b/sys/dev/pci/if_ixgb.c index 914354633ad..79ca38fc0ef 100644 --- a/sys/dev/pci/if_ixgb.c +++ b/sys/dev/pci/if_ixgb.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_ixgb.c,v 1.29 2006/08/18 06:02:45 brad Exp $ */ +/* $OpenBSD: if_ixgb.c,v 1.30 2006/10/02 00:28:09 brad Exp $ */ #include <dev/pci/if_ixgb.h> @@ -697,10 +697,11 @@ ixgb_encap(struct ixgb_softc *sc, struct mbuf *m_head) return (ENOBUFS); } -#if 0 +#ifdef IXGB_CSUM_OFFLOAD ixgb_transmit_checksum_setup(sc, m_head, &txd_popts); -#endif +#else txd_popts = 0; +#endif i = sc->next_avail_tx_desc; for (j = 0; j < q.map->dm_nsegs; j++) { @@ -1042,6 +1043,10 @@ ixgb_setup_interface(struct ixgb_softc *sc) ifp->if_capabilities = IFCAP_VLAN_MTU; +#ifdef IXGB_CSUM_OFFLOAD + ifp->if_capabilities |= IFCAP_CSUM_TCPv4|IFCAP_CSUM_UDPv4; +#endif + /* * Specify the media types supported by this adapter and register * callbacks to update media and link information |