From 3f1cbf814e81930d859f43ea9e829e1702ce2f2d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 23 Mar 2012 13:12:56 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4053 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/mac_lld.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'os/hal/platforms/STM32/mac_lld.c') diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c index 849c7a39e..2918bb434 100644 --- a/os/hal/platforms/STM32/mac_lld.c +++ b/os/hal/platforms/STM32/mac_lld.c @@ -308,7 +308,11 @@ void mac_lld_start(MACDriver *macp) { /* Transmitter and receiver enabled. Note that the complete setup of the MAC is performed when the link status is detected.*/ +#if STM32_IP_CHECKSUM_OFFLOAD ETH->MACCR = ETH_MACCR_IPCO | ETH_MACCR_RE | ETH_MACCR_TE; +#else + ETH->MACCR = ETH_MACCR_RE | ETH_MACCR_TE; +#endif /* DMA configuration: Descriptor chains pointers.*/ @@ -457,7 +461,8 @@ void mac_lld_release_transmit_descriptor(MACTransmitDescriptor *tdp) { /* Unlocks the descriptor and returns it to the DMA engine.*/ tdp->physdesc->tdes1 = tdp->offset; - tdp->physdesc->tdes0 = STM32_TDES0_IC | STM32_TDES0_LS | STM32_TDES0_FS | + tdp->physdesc->tdes0 = (STM32_IP_CHECKSUM_OFFLOAD << 22) | + STM32_TDES0_IC | STM32_TDES0_LS | STM32_TDES0_FS | STM32_TDES0_TCH | STM32_TDES0_OWN; /* If the DMA engine is stalled then a restart request is issued.*/ -- cgit v1.2.3