Patchwork [11/26] jazzsonic: convert to net_device_ops

login
register
mail settings
Submitter Alexander Beregalov
Date April 15, 2009, 10:52 p.m.
Message ID <1239835980-22502-11-git-send-email-a.beregalov@gmail.com>
Download mbox | patch
Permalink /patch/26035/
State Accepted
Delegated to: David Miller
Headers show

Comments

Alexander Beregalov - April 15, 2009, 10:52 p.m.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
 drivers/net/jazzsonic.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

Patch

diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 14248cf..d12106b 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -96,6 +96,18 @@  static int jazzsonic_close(struct net_device* dev)
 	return err;
 }
 
+static const struct net_device_ops sonic_netdev_ops = {
+	.ndo_open		= jazzsonic_open,
+	.ndo_stop		= jazzsonic_close,
+	.ndo_start_xmit		= sonic_send_packet,
+	.ndo_get_stats		= sonic_get_stats,
+	.ndo_set_multicast_list	= sonic_multicast_list,
+	.ndo_tx_timeout		= sonic_tx_timeout,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_set_mac_address	= eth_mac_addr,
+};
+
 static int __init sonic_probe1(struct net_device *dev)
 {
 	static unsigned version_printed;
@@ -179,12 +191,7 @@  static int __init sonic_probe1(struct net_device *dev)
 	lp->rra_laddr = lp->rda_laddr + (SIZEOF_SONIC_RD * SONIC_NUM_RDS
 	                     * SONIC_BUS_SCALE(lp->dma_bitmode));
 
-	dev->open = jazzsonic_open;
-	dev->stop = jazzsonic_close;
-	dev->hard_start_xmit = sonic_send_packet;
-	dev->get_stats = sonic_get_stats;
-	dev->set_multicast_list = &sonic_multicast_list;
-	dev->tx_timeout = sonic_tx_timeout;
+	dev->netdev_ops = &sonic_netdev_ops;
 	dev->watchdog_timeo = TX_TIMEOUT;
 
 	/*