From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 2/9] dummy: convert to net_device_ops
Date: Thu, 20 Nov 2008 09:59:15 -0800 [thread overview]
Message-ID: <20081120175933.671331835@vyatta.com> (raw)
In-Reply-To: 20081120175913.943543638@vyatta.com
[-- Attachment #1: dummy-netdev_ops.patch --]
[-- Type: text/plain, Size: 1080 bytes --]
Convert to new network device ops interface.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/drivers/net/dummy.c 2008-11-20 08:27:06.000000000 -0800
+++ b/drivers/net/dummy.c 2008-11-20 09:09:58.000000000 -0800
@@ -57,18 +57,23 @@ static void set_multicast_list(struct ne
{
}
+static const struct net_device_ops dummy_netdev_ops = {
+ .ndo_start_xmit = dummy_xmit,
+ .ndo_validate_addr = eth_validate_addr,
+ .ndo_set_multicast_list = set_multicast_list,
+ .ndo_set_mac_address = dummy_set_address,
+};
+
static void dummy_setup(struct net_device *dev)
{
+ ether_setup(dev);
+
/* Initialize the device structure. */
- dev->hard_start_xmit = dummy_xmit;
- dev->set_multicast_list = set_multicast_list;
- dev->set_mac_address = dummy_set_address;
+ dev->netdev_ops = &dummy_netdev_ops;
dev->destructor = free_netdev;
/* Fill in device structure with ethernet-generic values. */
- ether_setup(dev);
dev->tx_queue_len = 0;
- dev->change_mtu = NULL;
dev->flags |= IFF_NOARP;
dev->flags &= ~IFF_MULTICAST;
random_ether_addr(dev->dev_addr);
--
next prev 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 ` Stephen Hemminger [this message]
2008-11-21 4:28 ` [PATCH 2/9] dummy: convert to net_device_ops 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 ` [PATCH 5/9] defxx: convert driver to net_device_ops Stephen Hemminger
2008-11-21 4:31 ` 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.671331835@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).