aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@smsc.com>2008-12-25 19:40:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-25 19:40:47 -0500
commit631b7568c7d8f0222773e1beb2460a86541ae394 (patch)
tree4092645b570e725f23d4196788d980802915257b
parentdd0451938815d8b901488b1058f52023892c6cde (diff)
smsc911x: convert driver to use net_device_ops
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/smsc911x.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 8078f3545f16..761b96c1758d 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1733,6 +1733,19 @@ static struct ethtool_ops smsc911x_ethtool_ops = {
1733 .set_eeprom = smsc911x_ethtool_set_eeprom, 1733 .set_eeprom = smsc911x_ethtool_set_eeprom,
1734}; 1734};
1735 1735
1736static const struct net_device_ops smsc911x_netdev_ops = {
1737 .ndo_open = smsc911x_open,
1738 .ndo_stop = smsc911x_stop,
1739 .ndo_start_xmit = smsc911x_hard_start_xmit,
1740 .ndo_get_stats = smsc911x_get_stats,
1741 .ndo_set_multicast_list = smsc911x_set_multicast_list,
1742 .ndo_do_ioctl = smsc911x_do_ioctl,
1743 .ndo_validate_addr = eth_validate_addr,
1744#ifdef CONFIG_NET_POLL_CONTROLLER
1745 .ndo_poll_controller = smsc911x_poll_controller,
1746#endif
1747};
1748
1736/* Initializing private device structures, only called from probe */ 1749/* Initializing private device structures, only called from probe */
1737static int __devinit smsc911x_init(struct net_device *dev) 1750static int __devinit smsc911x_init(struct net_device *dev)
1738{ 1751{
@@ -1828,20 +1841,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
1828 smsc911x_reg_write(pdata, INT_EN, 0); 1841 smsc911x_reg_write(pdata, INT_EN, 0);
1829 1842
1830 ether_setup(dev); 1843 ether_setup(dev);
1831 dev->open = smsc911x_open;
1832 dev->stop = smsc911x_stop;
1833 dev->hard_start_xmit = smsc911x_hard_start_xmit;
1834 dev->get_stats = smsc911x_get_stats;
1835 dev->set_multicast_list = smsc911x_set_multicast_list;
1836 dev->flags |= IFF_MULTICAST; 1844 dev->flags |= IFF_MULTICAST;
1837 dev->do_ioctl = smsc911x_do_ioctl;
1838 netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT); 1845 netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
1846 dev->netdev_ops = &smsc911x_netdev_ops;
1839 dev->ethtool_ops = &smsc911x_ethtool_ops; 1847 dev->ethtool_ops = &smsc911x_ethtool_ops;
1840 1848
1841#ifdef CONFIG_NET_POLL_CONTROLLER
1842 dev->poll_controller = smsc911x_poll_controller;
1843#endif /* CONFIG_NET_POLL_CONTROLLER */
1844
1845 return 0; 1849 return 0;
1846} 1850}
1847 1851