From 428a4245816fb5e015d972f259698e9456c63c6c Mon Sep 17 00:00:00 2001 From: krzysztof-cabaj Date: Tue, 3 Dec 2024 17:11:11 +0100 Subject: [PATCH 1/2] cpu/stm32/eth: fix RX_DESC_STAT_ES define --- cpu/stm32/include/periph/cpu_eth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu/stm32/include/periph/cpu_eth.h b/cpu/stm32/include/periph/cpu_eth.h index e3c1db6890d2..8100f5940082 100644 --- a/cpu/stm32/include/periph/cpu_eth.h +++ b/cpu/stm32/include/periph/cpu_eth.h @@ -96,7 +96,7 @@ typedef struct eth_dma_desc { */ #define RX_DESC_STAT_FL (0x3FFF0000) /* bits 16-29 */ #define RX_DESC_STAT_DE (BIT14) /**< If set, a frame too large to fit buffers given by descriptors was received */ -#define RX_DESC_STAT_ES (BIT14) /**< If set, an error occurred during RX */ +#define RX_DESC_STAT_ES (BIT15) /**< If set, an error occurred during RX */ #define RX_DESC_STAT_OWN (BIT31) /**< If set, descriptor is owned by DMA, otherwise by CPU */ /** @} */ /** From bb982ad3b26d5a93856d3e6f4d713b6f3ebd7411 Mon Sep 17 00:00:00 2001 From: krzysztof-cabaj Date: Tue, 10 Dec 2024 17:49:03 +0100 Subject: [PATCH 2/2] cpu/stm32/eth: improve defines concerning checksum --- cpu/stm32/include/periph/cpu_eth.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpu/stm32/include/periph/cpu_eth.h b/cpu/stm32/include/periph/cpu_eth.h index 8100f5940082..c2888f502c2b 100644 --- a/cpu/stm32/include/periph/cpu_eth.h +++ b/cpu/stm32/include/periph/cpu_eth.h @@ -140,7 +140,11 @@ typedef struct eth_dma_desc { * | `0b10` | Calculate and insert IPv4 checksum, insert pre-calculated payload checksum | * | `0b11 | Calculated and insert both IPv4 and payload checksum | */ -#define TX_DESC_STAT_CIC (BIT22 | BIT23) +#define TX_DESC_STAT_CIC (BIT22 | BIT23) +#define TX_DESC_STAT_CIC_NO_HW_CHECKSUM (0) /**< Do not compute checksums in hardware */ +#define TX_DESC_STAT_CIC_HW_CHECKSUM_IPV4 (BIT22) /**< Compute the IPv4 header checksum in hardware */ +#define TX_DESC_STAT_CIC_HW_CHECKSUM_BOTH (BIT22 | BIT32) /**< Compute the IPv4 header and payload checksum in hardware */ + #define TX_DESC_STAT_TTSE (BIT25) /**< If set, an PTP timestamp is added to the descriptor after TX completed */ #define TX_DESC_STAT_FS (BIT28) /**< If set, buffer contains first segment of frame to transmit */ #define TX_DESC_STAT_LS (BIT29) /**< If set, buffer contains last segment of frame to transmit */