From 1d199e177e4c009aee0d165ac9033e6838c601a4 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 24 Mar 2012 09:17:35 +0000 Subject: Checksum offload in STM32 MAC driver tested. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4054 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/mac_lld.c | 2 +- os/hal/platforms/STM32/mac_lld.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'os') diff --git a/os/hal/platforms/STM32/mac_lld.c b/os/hal/platforms/STM32/mac_lld.c index 2918bb434..72fb2a004 100644 --- a/os/hal/platforms/STM32/mac_lld.c +++ b/os/hal/platforms/STM32/mac_lld.c @@ -461,7 +461,7 @@ 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_IP_CHECKSUM_OFFLOAD << 22) | + tdp->physdesc->tdes0 = STM32_TDES0_CIC(STM32_IP_CHECKSUM_OFFLOAD) | STM32_TDES0_IC | STM32_TDES0_LS | STM32_TDES0_FS | STM32_TDES0_TCH | STM32_TDES0_OWN; diff --git a/os/hal/platforms/STM32/mac_lld.h b/os/hal/platforms/STM32/mac_lld.h index ffb187bba..81050053c 100644 --- a/os/hal/platforms/STM32/mac_lld.h +++ b/os/hal/platforms/STM32/mac_lld.h @@ -84,6 +84,7 @@ #define STM32_TDES0_TTSE 0x02000000 #define STM32_TDES0_LOCKED 0x01000000 /* NOTE: Pseudo flag. */ #define STM32_TDES0_CIC_MASK 0x00C00000 +#define STM32_TDES0_CIC(n) ((n) << 22) #define STM32_TDES0_TER 0x00200000 #define STM32_TDES0_TCH 0x00100000 #define STM32_TDES0_TTSS 0x00020000 -- cgit v1.2.3