summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2010-01-09 05:44:42 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2010-01-09 05:44:42 +0000
commit41729229b246c8cfb2e967af20f031a6ddab27da (patch)
treecc7837c054ea44bcbe375d1723af912f61bae1b4
parente9a68fe6e9900ab2d5649aea8afdba5fa425509d (diff)
replace an #ifdef IX_CSUM_OFFLOAD with an IFCAP_CSUM_IPv4 capability check,
this allows to enable/disable checksum offloading at one point in the driver without the need to care about stupid #defines. no functional change.
-rw-r--r--sys/dev/pci/if_ix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index deef029f47e..d6862de24a0 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.31 2010/01/09 05:30:19 reyk Exp $ */
+/* $OpenBSD: if_ix.c,v 1.32 2010/01/09 05:44:41 reyk Exp $ */
/******************************************************************************
@@ -2490,9 +2490,9 @@ ixgbe_initialize_receive_units(struct ix_softc *sc)
rxcsum |= IXGBE_RXCSUM_PCSD;
}
-#if defined(IX_CSUM_OFFLOAD)
- rxcsum |= IXGBE_RXCSUM_PCSD;
-#endif
+ if (ifp->if_capabilities & IFCAP_CSUM_IPv4)
+ rxcsum |= IXGBE_RXCSUM_PCSD;
+
if (!(rxcsum & IXGBE_RXCSUM_PCSD))
rxcsum |= IXGBE_RXCSUM_IPPCSE;