@@ -243,32 +243,6 @@ static int eth_nxp_enet_tx(const struct device *dev, struct net_pkt *pkt)
243
243
return ret ;
244
244
}
245
245
246
- static void eth_nxp_enet_iface_init (struct net_if * iface )
247
- {
248
- const struct device * dev = net_if_get_device (iface );
249
- struct nxp_enet_mac_data * data = dev -> data ;
250
- const struct nxp_enet_mac_config * config = dev -> config ;
251
-
252
- net_if_set_link_addr (iface , data -> mac_addr ,
253
- sizeof (data -> mac_addr ),
254
- NET_LINK_ETHERNET );
255
-
256
- if (data -> iface == NULL ) {
257
- data -> iface = iface ;
258
- }
259
-
260
- #if defined(CONFIG_NET_DSA )
261
- dsa_register_master_tx (iface , & eth_nxp_enet_tx );
262
- #endif
263
-
264
- ethernet_init (iface );
265
- net_if_carrier_off (data -> iface );
266
-
267
- config -> irq_config_func ();
268
-
269
- nxp_enet_driver_cb (config -> mdio , NXP_ENET_MDIO , NXP_ENET_INTERRUPT_ENABLED , NULL );
270
- }
271
-
272
246
static enum ethernet_hw_caps eth_nxp_enet_get_capabilities (const struct device * dev )
273
247
{
274
248
#if defined(CONFIG_ETH_NXP_ENET_1G )
@@ -523,6 +497,31 @@ static void nxp_enet_phy_cb(const struct device *phy,
523
497
}
524
498
}
525
499
500
+ static void eth_nxp_enet_iface_init (struct net_if * iface )
501
+ {
502
+ const struct device * dev = net_if_get_device (iface );
503
+ struct nxp_enet_mac_data * data = dev -> data ;
504
+ const struct nxp_enet_mac_config * config = dev -> config ;
505
+
506
+ net_if_set_link_addr (iface , data -> mac_addr ,
507
+ sizeof (data -> mac_addr ),
508
+ NET_LINK_ETHERNET );
509
+
510
+ if (data -> iface == NULL ) {
511
+ data -> iface = iface ;
512
+ }
513
+
514
+ #if defined(CONFIG_NET_DSA )
515
+ dsa_register_master_tx (iface , & eth_nxp_enet_tx );
516
+ #endif
517
+
518
+ ethernet_init (iface );
519
+ net_if_carrier_off (iface );
520
+
521
+ config -> irq_config_func ();
522
+
523
+ nxp_enet_driver_cb (config -> mdio , NXP_ENET_MDIO , NXP_ENET_INTERRUPT_ENABLED , NULL );
524
+ }
526
525
527
526
static int nxp_enet_phy_init (const struct device * dev )
528
527
{
0 commit comments