diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-03-23 13:12:56 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-03-23 13:12:56 +0000 |
commit | 3f1cbf814e81930d859f43ea9e829e1702ce2f2d (patch) | |
tree | 0b588c91ab658322b2c7e798a3a227cbfebaeb47 /os/hal/platforms/STM32/mac_lld.c | |
parent | 5aa11291a362cfeb949dfe91397e8bbda46dc436 (diff) | |
download | ChibiOS-3f1cbf814e81930d859f43ea9e829e1702ce2f2d.tar.gz ChibiOS-3f1cbf814e81930d859f43ea9e829e1702ce2f2d.tar.bz2 ChibiOS-3f1cbf814e81930d859f43ea9e829e1702ce2f2d.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4053 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/mac_lld.c')
-rw-r--r-- | os/hal/platforms/STM32/mac_lld.c | 7 |
1 files changed, 6 insertions, 1 deletions
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.*/
|