All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 5/9] defxx: convert driver to net_device_ops
Date: Thu, 20 Nov 2008 09:59:18 -0800	[thread overview]
Message-ID: <20081120175933.921580158@vyatta.com> (raw)
In-Reply-To: 20081120175913.943543638@vyatta.com

[-- Attachment #1: defxx-netdev_ops.patch --]
[-- Type: text/plain, Size: 1096 bytes --]

Convert this driver to net_device_ops.

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


--- a/drivers/net/defxx.c	2008-11-19 22:10:52.000000000 -0800
+++ b/drivers/net/defxx.c	2008-11-20 09:18:52.000000000 -0800
@@ -477,6 +477,15 @@ static void dfx_get_bars(struct device *
 	}
 }
 
+static const struct net_device_ops dfx_netdev_ops = {
+	.ndo_open		= dfx_open,
+	.ndo_stop		= dfx_close,
+	.ndo_start_xmit		= dfx_xmt_queue_pkt,
+	.ndo_get_stats		= dfx_ctl_get_stats,
+	.ndo_set_multicast_list	= dfx_ctl_set_multicast_list,
+	.ndo_set_mac_address	= dfx_ctl_set_mac_address,
+};
+
 /*
  * ================
  * = dfx_register =
@@ -573,13 +582,7 @@ static int __devinit dfx_register(struct
 	}
 
 	/* Initialize new device structure */
-
-	dev->get_stats			= dfx_ctl_get_stats;
-	dev->open			= dfx_open;
-	dev->stop			= dfx_close;
-	dev->hard_start_xmit		= dfx_xmt_queue_pkt;
-	dev->set_multicast_list		= dfx_ctl_set_multicast_list;
-	dev->set_mac_address		= dfx_ctl_set_mac_address;
+	dev->netdev_ops			= &dfx_netdev_ops;
 
 	if (dfx_bus_pci)
 		pci_set_master(to_pci_dev(bdev));

-- 


  parent reply	other threads:[~2008-11-20 18:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-20 17:59 [PATCH 0/9] Netdevice ops second wave Stephen Hemminger
2008-11-20 17:59 ` [PATCH 1/9] netdev: add more functions to netdevice ops Stephen Hemminger
2008-11-21  4:27   ` David Miller
2008-11-20 17:59 ` [PATCH 2/9] dummy: convert to net_device_ops Stephen Hemminger
2008-11-21  4:28   ` David Miller
2008-11-20 17:59 ` [PATCH 3/9] ipmr: convert ipmr virtual interface " Stephen Hemminger
2008-11-21  4:29   ` David Miller
2008-11-20 17:59 ` [PATCH 4/9] fddi: convert to new network device ops Stephen Hemminger
2008-11-21  4:31   ` David Miller
2008-11-20 17:59 ` Stephen Hemminger [this message]
2008-11-21  4:31   ` [PATCH 5/9] defxx: convert driver to net_device_ops David Miller
2008-11-20 17:59 ` [PATCH 6/9] hippi: " Stephen Hemminger
2008-11-21  4:32   ` David Miller
2008-11-20 17:59 ` [PATCH 7/9] ipip: convert " Stephen Hemminger
2008-11-21  4:33   ` David Miller
2008-11-20 17:59 ` [PATCH 8/9] ipv6: convert tunnels " Stephen Hemminger
2008-11-21  4:34   ` David Miller
2008-11-20 17:59 ` [PATCH 9/9] ipgre: convert to netdevice_ops Stephen Hemminger
2008-11-21  4:34   ` 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=20081120175933.921580158@vyatta.com \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --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.