From: Ben Hutchings <bhutchings@solarflare.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: David Miller <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH 11/22] efx: convert to net_device_ops
Date: Sat, 22 Nov 2008 00:45:14 +0000 [thread overview]
Message-ID: <20081122004513.GE32518@solarflare.com> (raw)
In-Reply-To: <20081121232239.826434876@vyatta.com>
Stephen Hemminger wrote:
> Convert driver to new net_device_ops. Compile tested only.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
(But the driver name is sfc; "efx" is an historical reference.)
> --- a/drivers/net/sfc/efx.c 2008-11-21 13:57:58.000000000 -0800
> +++ b/drivers/net/sfc/efx.c 2008-11-21 14:09:48.000000000 -0800
> @@ -1433,12 +1433,28 @@ static void efx_set_multicast_list(struc
> falcon_set_multicast_hash(efx);
> }
>
> +static const struct net_device_ops efx_netdev_ops = {
> + .ndo_open = efx_net_open,
> + .ndo_stop = efx_net_stop,
> + .ndo_get_stats = efx_net_stats,
> + .ndo_tx_timeout = efx_watchdog,
> + .ndo_start_xmit = efx_hard_start_xmit,
> + .ndo_validate_addr = eth_validate_addr,
> + .ndo_do_ioctl = efx_ioctl,
> + .ndo_change_mtu = efx_change_mtu,
> + .ndo_set_mac_address = efx_set_mac_address,
> + .ndo_set_multicast_list = efx_set_multicast_list,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> + .ndo_poll_controller = efx_netpoll,
> +#endif
> +};
> +
> static int efx_netdev_event(struct notifier_block *this,
> unsigned long event, void *ptr)
> {
> struct net_device *net_dev = ptr;
>
> - if (net_dev->open == efx_net_open && event == NETDEV_CHANGENAME) {
> + if (net_dev->netdev_ops == &efx_netdev_ops && event == NETDEV_CHANGENAME) {
Also, this line should be wrapped now.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2008-11-22 0:45 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 [this message]
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 ` [PATCH 20/22] sc92031: " Stephen Hemminger
2008-11-22 1:37 ` 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=20081122004513.GE32518@solarflare.com \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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).