File tree Expand file tree Collapse file tree 3 files changed +2
-13
lines changed Expand file tree Collapse file tree 3 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,11 @@ static int eth_initialize(const struct device *dev)
217
217
218
218
heth -> Init .MACAddr = dev_data -> mac_addr ;
219
219
220
- #if defined(CONFIG_ETH_STM32_HAL_API_V1 )
221
220
ret = eth_stm32_hal_init (dev );
222
221
if (ret ) {
223
222
LOG_ERR ("Failed to initialize HAL" );
224
223
return - EIO ;
225
224
}
226
- #endif /* !CONFIG_ETH_STM32_HAL_API_V1 */
227
225
228
226
LOG_DBG ("MAC %02x:%02x:%02x:%02x:%02x:%02x" ,
229
227
dev_data -> mac_addr [0 ], dev_data -> mac_addr [1 ],
@@ -325,14 +323,6 @@ static void eth_iface_init(struct net_if *iface)
325
323
326
324
ethernet_init (iface );
327
325
328
- #if defined(CONFIG_ETH_STM32_HAL_API_V2 )
329
- /* This function requires the Ethernet interface to be
330
- * properly initialized. In auto-negotiation mode, it reads the speed
331
- * and duplex settings to configure the driver accordingly.
332
- */
333
- eth_stm32_hal_init (dev );
334
- #endif /* CONFIG_ETH_STM32_HAL_API_V2 */
335
-
336
326
eth_stm32_setup_mac_filter (heth );
337
327
338
328
net_if_carrier_off (iface );
Original file line number Diff line number Diff line change @@ -190,7 +190,6 @@ int eth_stm32_hal_init(const struct device *dev)
190
190
struct eth_stm32_hal_dev_data * dev_data = dev -> data ;
191
191
ETH_HandleTypeDef * heth = & dev_data -> heth ;
192
192
HAL_StatusTypeDef hal_ret = HAL_OK ;
193
- int ret = 0 ;
194
193
195
194
if (!ETH_STM32_AUTO_NEGOTIATION_ENABLE ) {
196
195
struct phy_link_state state ;
@@ -223,7 +222,7 @@ int eth_stm32_hal_init(const struct device *dev)
223
222
HAL_ETH_DMARxDescListInit (heth , dma_rx_desc_tab ,
224
223
& dma_rx_buffer [0 ][0 ], ETH_RXBUFNB );
225
224
226
- return ret ;
225
+ return 0 ;
227
226
}
228
227
229
228
void eth_stm32_set_mac_config (const struct device * dev , struct phy_link_state * state )
Original file line number Diff line number Diff line change @@ -476,9 +476,9 @@ void HAL_ETH_ErrorCallback(ETH_HandleTypeDef *heth)
476
476
477
477
int eth_stm32_hal_init (const struct device * dev )
478
478
{
479
- HAL_StatusTypeDef hal_ret = HAL_OK ;
480
479
struct eth_stm32_hal_dev_data * dev_data = dev -> data ;
481
480
ETH_HandleTypeDef * heth = & dev_data -> heth ;
481
+ HAL_StatusTypeDef hal_ret = HAL_OK ;
482
482
483
483
#if DT_HAS_COMPAT_STATUS_OKAY (st_stm32n6_ethernet )
484
484
for (int ch = 0 ; ch < ETH_DMA_CH_CNT ; ch ++ ) {
You can’t perform that action at this time.
0 commit comments