aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:14 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:23 -0500
commit3186ae8f3f5a30ecfed9faa76ce113830da39fbd (patch)
treeb91f1986409b75c0df4504c50998d890104716d4
parent1722de5098cb5a680945cb68c57be5b2bf67b52d (diff)
3c509: convert to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/3c509.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 535c234286ea..d58919c7032e 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -537,6 +537,21 @@ static struct mca_driver el3_mca_driver = {
537static int mca_registered; 537static int mca_registered;
538#endif /* CONFIG_MCA */ 538#endif /* CONFIG_MCA */
539 539
540static const struct net_device_ops netdev_ops = {
541 .ndo_open = el3_open,
542 .ndo_stop = el3_close,
543 .ndo_start_xmit = el3_start_xmit,
544 .ndo_get_stats = el3_get_stats,
545 .ndo_set_multicast_list = set_multicast_list,
546 .ndo_tx_timeout = el3_tx_timeout,
547 .ndo_change_mtu = eth_change_mtu,
548 .ndo_set_mac_address = eth_mac_addr,
549 .ndo_validate_addr = eth_validate_addr,
550#ifdef CONFIG_NET_POLL_CONTROLLER
551 .ndo_poll_controller = el3_poll_controller,
552#endif
553};
554
540static int __devinit el3_common_init(struct net_device *dev) 555static int __devinit el3_common_init(struct net_device *dev)
541{ 556{
542 struct el3_private *lp = netdev_priv(dev); 557 struct el3_private *lp = netdev_priv(dev);
@@ -553,16 +568,8 @@ static int __devinit el3_common_init(struct net_device *dev)
553 } 568 }
554 569
555 /* The EL3-specific entries in the device structure. */ 570 /* The EL3-specific entries in the device structure. */
556 dev->open = &el3_open; 571 dev->netdev_ops = &netdev_ops;
557 dev->hard_start_xmit = &el3_start_xmit;
558 dev->stop = &el3_close;
559 dev->get_stats = &el3_get_stats;
560 dev->set_multicast_list = &set_multicast_list;
561 dev->tx_timeout = el3_tx_timeout;
562 dev->watchdog_timeo = TX_TIMEOUT; 572 dev->watchdog_timeo = TX_TIMEOUT;
563#ifdef CONFIG_NET_POLL_CONTROLLER
564 dev->poll_controller = el3_poll_controller;
565#endif
566 SET_ETHTOOL_OPS(dev, &ethtool_ops); 573 SET_ETHTOOL_OPS(dev, &ethtool_ops);
567 574
568 err = register_netdev(dev); 575 err = register_netdev(dev);