summaryrefslogtreecommitdiff
path: root/drivers/net/smsc911x.c
diff options
context:
space:
mode:
authorSteve Glendinning <steve.glendinning@smsc.com>2008-12-25 16:40:47 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-25 16:40:47 -0800
commit631b7568c7d8f0222773e1beb2460a86541ae394 (patch)
tree4092645b570e725f23d4196788d980802915257b /drivers/net/smsc911x.c
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>
Diffstat (limited to 'drivers/net/smsc911x.c')
-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 = {
.set_eeprom = smsc911x_ethtool_set_eeprom,
};
+static const struct net_device_ops smsc911x_netdev_ops = {
+ .ndo_open = smsc911x_open,
+ .ndo_stop = smsc911x_stop,
+ .ndo_start_xmit = smsc911x_hard_start_xmit,
+ .ndo_get_stats = smsc911x_get_stats,
+ .ndo_set_multicast_list = smsc911x_set_multicast_list,
+ .ndo_do_ioctl = smsc911x_do_ioctl,
+ .ndo_validate_addr = eth_validate_addr,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+ .ndo_poll_controller = smsc911x_poll_controller,
+#endif
+};
+
/* Initializing private device structures, only called from probe */
static int __devinit smsc911x_init(struct net_device *dev)
{
@@ -1828,20 +1841,11 @@ static int __devinit smsc911x_init(struct net_device *dev)
smsc911x_reg_write(pdata, INT_EN, 0);
ether_setup(dev);
- dev->open = smsc911x_open;
- dev->stop = smsc911x_stop;
- dev->hard_start_xmit = smsc911x_hard_start_xmit;
- dev->get_stats = smsc911x_get_stats;
- dev->set_multicast_list = smsc911x_set_multicast_list;
dev->flags |= IFF_MULTICAST;
- dev->do_ioctl = smsc911x_do_ioctl;
netif_napi_add(dev, &pdata->napi, smsc911x_poll, SMSC_NAPI_WEIGHT);
+ dev->netdev_ops = &smsc911x_netdev_ops;
dev->ethtool_ops = &smsc911x_ethtool_ops;
-#ifdef CONFIG_NET_POLL_CONTROLLER
- dev->poll_controller = smsc911x_poll_controller;
-#endif /* CONFIG_NET_POLL_CONTROLLER */
-
return 0;
}