summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-11-25 15:20:45 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-21 15:00:20 +0100
commitdec6b678bba05624335c87b73dc160b54d845cbd (patch)
treee5541f82b2a1069094851b206951093da150450a
parent911f517d2da7856b652995eb13aefcfd0d50f47a (diff)
downloadrtems-libbsd-dec6b678bba05624335c87b73dc160b54d845cbd.tar.bz2
if_cgem: Enable hardware checksum assist
-rw-r--r--freebsd/sys/dev/cadence/if_cgem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/freebsd/sys/dev/cadence/if_cgem.c b/freebsd/sys/dev/cadence/if_cgem.c
index f4580435..fb498502 100644
--- a/freebsd/sys/dev/cadence/if_cgem.c
+++ b/freebsd/sys/dev/cadence/if_cgem.c
@@ -1770,10 +1770,15 @@ cgem_attach(device_t dev)
ifp->if_init = cgem_init;
ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 |
IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM;
+#ifndef __rtems__
/* Disable hardware checksumming by default. */
ifp->if_hwassist = 0;
ifp->if_capenable = ifp->if_capabilities &
~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM);
+#else /* __rtems__ */
+ ifp->if_hwassist = CGEM_CKSUM_ASSIST;
+ ifp->if_capenable = ifp->if_capabilities;
+#endif /* __rtems__ */
ifp->if_snd.ifq_drv_maxlen = CGEM_NUM_TX_DESCS;
IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
IFQ_SET_READY(&ifp->if_snd);