drivers: ethernet: fix error UDP server on STM32
With ETH_STM32_HAL_API_V2 avoid log error message
if error log report:
we have problems if the traffic is high
@@ -931,28 +931,10 @@ void HAL_ETH_TxCpltCallback(ETH_HandleTypeDef *heth_handle)
#if defined(CONFIG_ETH_STM32_HAL_API_V2)
void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
{
- __ASSERT_NO_MSG(heth != NULL);
-
- const uint32_t error_code = HAL_ETH_GetError(heth);
-
- switch (error_code) {
- case HAL_ETH_ERROR_DMA:
- LOG_ERR("%s errorcode:%x dmaerror:%x",
- __func__,
- error_code,
- HAL_ETH_GetDMAError(heth));
- break;
- case HAL_ETH_ERROR_MAC:
- LOG_ERR("%s errorcode:%x macerror:%x",
- __func__,
- error_code,
- HAL_ETH_GetMACError(heth));
- break;
- default:
- LOG_ERR("%s errorcode:%x",
- __func__,
- error_code);
- }
+ /* Do nothing */
+ /* Do not log errors. If errors are reported du to high traffic,
+ * logging errors will only increase traffic issues
+ */
}
#elif defined(CONFIG_SOC_SERIES_STM32H7X)
/* DMA and MAC errors callback only appear in H7 series */
