@@ -3501,6 +3501,20 @@ static phy_interface_t to_phy_interface(const char *phy_connection_type)
3501
3501
return PHY_INTERFACE_MODE_MII ;
3502
3502
}
3503
3503
3504
+ static const struct net_device_ops ucc_geth_netdev_ops = {
3505
+ .ndo_open = ucc_geth_open ,
3506
+ .ndo_stop = ucc_geth_close ,
3507
+ .ndo_start_xmit = ucc_geth_start_xmit ,
3508
+ .ndo_validate_addr = eth_validate_addr ,
3509
+ .ndo_set_mac_address = eth_mac_addr ,
3510
+ .ndo_change_mtu = eth_change_mtu ,
3511
+ .ndo_set_multicast_list = ucc_geth_set_multi ,
3512
+ .ndo_tx_timeout = ucc_geth_timeout ,
3513
+ #ifdef CONFIG_NET_POLL_CONTROLLER
3514
+ .ndo_poll_controller = ucc_netpoll ,
3515
+ #endif
3516
+ };
3517
+
3504
3518
static int ucc_geth_probe (struct of_device * ofdev , const struct of_device_id * match )
3505
3519
{
3506
3520
struct device * device = & ofdev -> dev ;
@@ -3716,19 +3730,11 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3716
3730
3717
3731
/* Fill in the dev structure */
3718
3732
uec_set_ethtool_ops (dev );
3719
- dev -> open = ucc_geth_open ;
3720
- dev -> hard_start_xmit = ucc_geth_start_xmit ;
3721
- dev -> tx_timeout = ucc_geth_timeout ;
3733
+ dev -> netdev_ops = & ucc_geth_netdev_ops ;
3722
3734
dev -> watchdog_timeo = TX_TIMEOUT ;
3723
3735
INIT_WORK (& ugeth -> timeout_work , ucc_geth_timeout_work );
3724
3736
netif_napi_add (dev , & ugeth -> napi , ucc_geth_poll , UCC_GETH_DEV_WEIGHT );
3725
- #ifdef CONFIG_NET_POLL_CONTROLLER
3726
- dev -> poll_controller = ucc_netpoll ;
3727
- #endif
3728
- dev -> stop = ucc_geth_close ;
3729
- // dev->change_mtu = ucc_geth_change_mtu;
3730
3737
dev -> mtu = 1500 ;
3731
- dev -> set_multicast_list = ucc_geth_set_multi ;
3732
3738
3733
3739
ugeth -> msg_enable = netif_msg_init (debug .msg_enable , UGETH_MSG_DEFAULT );
3734
3740
ugeth -> phy_interface = phy_interface ;
0 commit comments