diff options
author | Joakim Tjernlund <Joakim.Tjernlund@transmode.se> | 2009-03-20 16:09:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-24 19:29:22 -0400 |
commit | a9dbae78506b2099985c4ca9975f079c94cb8165 (patch) | |
tree | 80ae065c02158fd943b7728a7f1391c4c6de914c /drivers/net/ucc_geth.c | |
parent | b9d2fceecb6afd9dead4fd2488a543b302a3272e (diff) |
ucc_geth: Convert to net_device_ops
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ucc_geth.c')
-rw-r--r-- | drivers/net/ucc_geth.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 0b675127e83b..a110326dce6f 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3501,6 +3501,20 @@ static phy_interface_t to_phy_interface(const char *phy_connection_type) | |||
3501 | return PHY_INTERFACE_MODE_MII; | 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 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) | 3518 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) |
3505 | { | 3519 | { |
3506 | struct device *device = &ofdev->dev; | 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 | /* Fill in the dev structure */ | 3731 | /* Fill in the dev structure */ |
3718 | uec_set_ethtool_ops(dev); | 3732 | uec_set_ethtool_ops(dev); |
3719 | dev->open = ucc_geth_open; | 3733 | dev->netdev_ops = &ucc_geth_netdev_ops; |
3720 | dev->hard_start_xmit = ucc_geth_start_xmit; | ||
3721 | dev->tx_timeout = ucc_geth_timeout; | ||
3722 | dev->watchdog_timeo = TX_TIMEOUT; | 3734 | dev->watchdog_timeo = TX_TIMEOUT; |
3723 | INIT_WORK(&ugeth->timeout_work, ucc_geth_timeout_work); | 3735 | INIT_WORK(&ugeth->timeout_work, ucc_geth_timeout_work); |
3724 | netif_napi_add(dev, &ugeth->napi, ucc_geth_poll, UCC_GETH_DEV_WEIGHT); | 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 | dev->mtu = 1500; | 3737 | dev->mtu = 1500; |
3731 | dev->set_multicast_list = ucc_geth_set_multi; | ||
3732 | 3738 | ||
3733 | ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT); | 3739 | ugeth->msg_enable = netif_msg_init(debug.msg_enable, UGETH_MSG_DEFAULT); |
3734 | ugeth->phy_interface = phy_interface; | 3740 | ugeth->phy_interface = phy_interface; |