* [PATCH] smsc911x: convert driver to use net_device_ops
@ 2008-12-19 14:24 Steve Glendinning
2008-12-19 14:24 ` [PATCH] smsc911x: make smsc911x_ethtool_ops constant Steve Glendinning
2008-12-26 0:41 ` [PATCH] smsc911x: convert driver to use net_device_ops David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Steve Glendinning @ 2008-12-19 14:24 UTC (permalink / raw)
To: netdev; +Cc: Ian Saturley, Steve Glendinning
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
drivers/net/smsc911x.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index cd70c49..9e33d9f 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1732,6 +1732,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)
{
@@ -1827,20 +1840,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;
}
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] smsc911x: make smsc911x_ethtool_ops constant
2008-12-19 14:24 [PATCH] smsc911x: convert driver to use net_device_ops Steve Glendinning
@ 2008-12-19 14:24 ` Steve Glendinning
2008-12-26 0:41 ` David Miller
2008-12-26 0:41 ` [PATCH] smsc911x: convert driver to use net_device_ops David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Steve Glendinning @ 2008-12-19 14:24 UTC (permalink / raw)
To: netdev; +Cc: Ian Saturley, Steve Glendinning
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
drivers/net/smsc911x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c
index 9e33d9f..16d9e19 100644
--- a/drivers/net/smsc911x.c
+++ b/drivers/net/smsc911x.c
@@ -1717,7 +1717,7 @@ static int smsc911x_ethtool_set_eeprom(struct net_device *dev,
return ret;
}
-static struct ethtool_ops smsc911x_ethtool_ops = {
+static const struct ethtool_ops smsc911x_ethtool_ops = {
.get_settings = smsc911x_ethtool_getsettings,
.set_settings = smsc911x_ethtool_setsettings,
.get_link = ethtool_op_get_link,
--
1.6.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] smsc911x: convert driver to use net_device_ops
2008-12-19 14:24 [PATCH] smsc911x: convert driver to use net_device_ops Steve Glendinning
2008-12-19 14:24 ` [PATCH] smsc911x: make smsc911x_ethtool_ops constant Steve Glendinning
@ 2008-12-26 0:41 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2008-12-26 0:41 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev, ian.saturley
From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Fri, 19 Dec 2008 14:24:05 +0000
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] smsc911x: make smsc911x_ethtool_ops constant
2008-12-19 14:24 ` [PATCH] smsc911x: make smsc911x_ethtool_ops constant Steve Glendinning
@ 2008-12-26 0:41 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2008-12-26 0:41 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev, ian.saturley
From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Fri, 19 Dec 2008 14:24:06 +0000
> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Also applied, thanks Steve.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-26 0:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-19 14:24 [PATCH] smsc911x: convert driver to use net_device_ops Steve Glendinning
2008-12-19 14:24 ` [PATCH] smsc911x: make smsc911x_ethtool_ops constant Steve Glendinning
2008-12-26 0:41 ` David Miller
2008-12-26 0:41 ` [PATCH] smsc911x: convert driver to use net_device_ops David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.