From: Alexey Dobriyan <adobriyan@gmail.com>
To: Alexander Beregalov <a.beregalov@gmail.com>, davem@davemloft.net
Cc: linux-next@vger.kernel.org, Netdev <netdev@vger.kernel.org>,
linux-ia64@vger.kernel.org
Subject: [PATCH] simnet: convert to net_device_ops
Date: Tue, 09 Dec 2008 15:08:27 +0000 [thread overview]
Message-ID: <20081209150827.GA8134@x200.localdomain> (raw)
In-Reply-To: <a4423d670812090611v715309adq3e9d2d95254e2e16@mail.gmail.com>
On Tue, Dec 09, 2008 at 05:11:17PM +0300, Alexander Beregalov wrote:
> CC arch/ia64/hp/sim/simeth.o
> arch/ia64/hp/sim/simeth.c: In function 'simeth_probe1':
> arch/ia64/hp/sim/simeth.c:212: error: 'struct net_device' has no member named 'open'
[PATCH] simeth: convert to net_device_ops
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/ia64/hp/sim/simeth.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -167,6 +167,15 @@ netdev_read(int fd, unsigned char *buf, unsigned int len)
return ia64_ssc(fd, __pa(buf), len, 0, SSC_NETDEV_RECV);
}
+static const struct net_device_ops simeth_netdev_ops = {
+ .ndo_open = simeth_open,
+ .ndo_stop = simeth_close,
+ .ndo_start_xmit = simeth_tx,
+ .ndo_get_stats = simeth_get_stats,
+ .ndo_set_multicast_list = set_multicast_list, /* not yet used */
+
+};
+
/*
* Function shared with module code, so cannot be in init section
*
@@ -209,11 +218,7 @@ simeth_probe1(void)
local = netdev_priv(dev);
local->simfd = fd; /* keep track of underlying file descriptor */
- dev->open = simeth_open;
- dev->stop = simeth_close;
- dev->hard_start_xmit = simeth_tx;
- dev->get_stats = simeth_get_stats;
- dev->set_multicast_list = set_multicast_list; /* no yet used */
+ dev->netdev_ops = &simeth_netdev_ops;
err = register_netdev(dev);
if (err) {
next prev parent reply other threads:[~2008-12-09 15:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 14:11 next-20081209: build problem at arch/ia64/hp/sim/simeth.c Alexander Beregalov
2008-12-09 15:08 ` Alexey Dobriyan [this message]
2008-12-10 6:57 ` [PATCH] simnet: convert to net_device_ops David Miller
2008-12-10 11:21 ` Alexander Beregalov
2008-12-10 23:25 ` David Miller
2008-12-10 11:54 ` Alexey Dobriyan
2008-12-16 9:56 ` David Miller
2008-12-10 6:41 ` next-20081209: build problem at arch/ia64/hp/sim/simeth.c 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=20081209150827.GA8134@x200.localdomain \
--to=adobriyan@gmail.com \
--cc=a.beregalov@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--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