All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>, Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@vger.kernel.org
Subject: [PATCH 20/22] sc92031: convert to net_device_ops
Date: Fri, 21 Nov 2008 15:21:58 -0800	[thread overview]
Message-ID: <20081121232240.588502223@vyatta.com> (raw)
In-Reply-To: 20081121232138.343333942@vyatta.com

[-- Attachment #1: sc92031.patch --]
[-- Type: text/plain, Size: 2032 bytes --]

Convert this driver to net_device_ops. Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--- a/drivers/net/sc92031.c	2008-11-21 14:41:41.000000000 -0800
+++ b/drivers/net/sc92031.c	2008-11-21 14:43:39.000000000 -0800
@@ -1386,7 +1386,7 @@ static void sc92031_ethtool_get_ethtool_
 	spin_unlock_bh(&priv->lock);
 }
 
-static struct ethtool_ops sc92031_ethtool_ops = {
+static const struct ethtool_ops sc92031_ethtool_ops = {
 	.get_settings		= sc92031_ethtool_get_settings,
 	.set_settings		= sc92031_ethtool_set_settings,
 	.get_drvinfo		= sc92031_ethtool_get_drvinfo,
@@ -1399,6 +1399,21 @@ static struct ethtool_ops sc92031_ethtoo
 	.get_ethtool_stats	= sc92031_ethtool_get_ethtool_stats,
 };
 
+
+static const struct net_device_ops sc92031_netdev_ops = {
+	.ndo_get_stats		= sc92031_get_stats,
+	.ndo_start_xmit		= sc92031_start_xmit,
+	.ndo_open		= sc92031_open,
+	.ndo_stop		= sc92031_stop,
+	.ndo_set_multicast_list	= sc92031_set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
+	.ndo_validate_addr	= eth_validate_addr,
+	.ndo_tx_timeout		= sc92031_tx_timeout,
+#ifdef CONFIG_NET_POLL_CONTROLLER
+	.ndo_poll_controller	= sc92031_poll_controller,
+#endif
+};
+
 static int __devinit sc92031_probe(struct pci_dev *pdev,
 		const struct pci_device_id *id)
 {
@@ -1452,17 +1467,9 @@ static int __devinit sc92031_probe(struc
 	/* faked with skb_copy_and_csum_dev */
 	dev->features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
 
-	dev->get_stats		= sc92031_get_stats;
-	dev->ethtool_ops	= &sc92031_ethtool_ops;
-	dev->hard_start_xmit	= sc92031_start_xmit;
+	dev->netdev_ops		= &sc92031_netdev_ops;
 	dev->watchdog_timeo	= TX_TIMEOUT;
-	dev->open		= sc92031_open;
-	dev->stop		= sc92031_stop;
-	dev->set_multicast_list	= sc92031_set_multicast_list;
-	dev->tx_timeout		= sc92031_tx_timeout;
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	dev->poll_controller	= sc92031_poll_controller;
-#endif
+	dev->ethtool_ops	= &sc92031_ethtool_ops;
 
 	priv = netdev_priv(dev);
 	spin_lock_init(&priv->lock);

-- 


  parent reply	other threads:[~2008-11-21 23:23 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 23:21 [PATCH 00/22] Network device ops (phase 3) Stephen Hemminger
2008-11-21 23:21 ` [PATCH 01/22] jme: convert driver to net_device_ops Stephen Hemminger
2008-11-22  1:28   ` David Miller
2008-11-21 23:21 ` [PATCH 02/22] s2io: convert " Stephen Hemminger
2008-11-22  1:29   ` David Miller
2008-11-21 23:21 ` [PATCH 03/22] qlge: " Stephen Hemminger
2008-11-22  1:29   ` David Miller
2008-11-21 23:21 ` [PATCH 04/22] Subject qlge: fix sparse warnings Stephen Hemminger
2008-11-22  1:29   ` David Miller
2008-11-21 23:21 ` [PATCH 05/22] via-rhine: convert to net_device_ops Stephen Hemminger
2008-11-22  1:30   ` David Miller
2008-11-21 23:21 ` [PATCH 06/22] myri10ge: " Stephen Hemminger
2008-11-22  1:30   ` David Miller
2008-11-21 23:21 ` [PATCH 07/22] mlx4: " Stephen Hemminger
2008-11-22  1:31   ` David Miller
2008-11-21 23:21 ` [PATCH 08/22] bnx2: " Stephen Hemminger
2008-11-22  1:31   ` David Miller
2008-11-21 23:21 ` [PATCH 09/22] dl2k: " Stephen Hemminger
2008-11-22  1:31   ` David Miller
2008-11-21 23:21 ` [PATCH 10/22] netxen: " Stephen Hemminger
2008-11-22  1:32   ` David Miller
2008-11-21 23:21 ` [PATCH 11/22] efx: " Stephen Hemminger
2008-11-22  0:45   ` Ben Hutchings
2008-11-22  1:33     ` David Miller
2008-11-21 23:21 ` [PATCH 12/22] tehuti: " Stephen Hemminger
2008-11-22  1:34   ` David Miller
2008-11-21 23:21 ` [PATCH 13/22] sis900: " Stephen Hemminger
2008-11-22  1:34   ` David Miller
2008-11-21 23:21 ` [PATCH 14/22] r6040: " Stephen Hemminger
2008-11-22  1:35   ` David Miller
2008-11-21 23:21 ` [PATCH 15/22] yellowfin: " Stephen Hemminger
2008-11-22  1:35   ` David Miller
2008-11-21 23:21 ` [PATCH 16/22] ns83820: " Stephen Hemminger
2008-11-22  1:35   ` David Miller
2008-11-21 23:21 ` [PATCH 17/22] bnx2x: " Stephen Hemminger
2008-11-22  1:36   ` David Miller
2008-11-21 23:21 ` [PATCH 18/22] hamachi: " Stephen Hemminger
2008-11-22  1:36   ` David Miller
2008-11-21 23:21 ` [PATCH 19/22] qla3xxx: " Stephen Hemminger
2008-11-22  1:37   ` David Miller
2008-11-21 23:21 ` Stephen Hemminger [this message]
2008-11-22  1:37   ` [PATCH 20/22] sc92031: " David Miller
2008-11-21 23:21 ` [PATCH 21/22] eql: " Stephen Hemminger
2008-11-22  1:38   ` David Miller
2008-11-21 23:22 ` [PATCH 22/22] ne2k: " Stephen Hemminger
2008-11-22  1:39   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081121232240.588502223@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.