[HAL][ETH] Fix the calculation of the tail pointer so that it points to the last updated descriptor
edit 5263450 [HAL][ETH] Fix the calculation of the tail pointer so that it points to the last updated descriptor
diff --git a/Src/stm32h7xx_hal_eth.c b/Src/stm32h7xx_hal_eth.c
index 2536a73..77cbabe 100644
--- a/Src/stm32h7xx_hal_eth.c
+++ b/Src/stm32h7xx_hal_eth.c
@@ -1209,7 +1209,7 @@
if (heth->RxDescList.RxBuildDescCnt != desccount)
{
/* Set the tail pointer index */
- tailidx = (descidx + 1U) % ETH_RX_DESC_CNT;
+ tailidx = (ETH_RX_DESC_CNT + descidx - 1U) % ETH_RX_DESC_CNT;
/* DMB instruction to avoid race condition */
__DMB();