From: Yang Hongyang <yanghy@cn.fujitsu.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH]: sunvnet netdev ops conversion...
Date: Fri, 20 Mar 2009 16:30:59 +0800 [thread overview]
Message-ID: <49C35443.8020604@cn.fujitsu.com> (raw)
In-Reply-To: <20090320.005205.65922171.davem@davemloft.net>
David Miller wrote:
> Committed to net-next-2.6...
>
> sunvnet: Convert to net_device_ops.
I noticed that there are other drivers's net_device_ops
need to be converted,is these convert nessary?
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> drivers/net/sunvnet.c | 18 +++++++++++-------
> 1 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/sunvnet.c b/drivers/net/sunvnet.c
> index 611230f..a82fb2a 100644
> --- a/drivers/net/sunvnet.c
> +++ b/drivers/net/sunvnet.c
> @@ -1012,6 +1012,16 @@ err_out:
> static LIST_HEAD(vnet_list);
> static DEFINE_MUTEX(vnet_list_mutex);
>
> +static const struct net_device_ops vnet_ops = {
> + .ndo_open = vnet_open,
> + .ndo_stop = vnet_close,
> + .ndo_set_multicast_list = vnet_set_rx_mode,
> + .ndo_set_mac_address = vnet_set_mac_addr,
> + .ndo_tx_timeout = vnet_tx_timeout,
> + .ndo_change_mtu = vnet_change_mtu,
> + .ndo_start_xmit = vnet_start_xmit,
> +};
> +
> static struct vnet * __devinit vnet_new(const u64 *local_mac)
> {
> struct net_device *dev;
> @@ -1040,15 +1050,9 @@ static struct vnet * __devinit vnet_new(const u64 *local_mac)
> INIT_LIST_HEAD(&vp->list);
> vp->local_mac = *local_mac;
>
> - dev->open = vnet_open;
> - dev->stop = vnet_close;
> - dev->set_multicast_list = vnet_set_rx_mode;
> - dev->set_mac_address = vnet_set_mac_addr;
> - dev->tx_timeout = vnet_tx_timeout;
> + dev->netdev_ops = &vnet_ops;
> dev->ethtool_ops = &vnet_ethtool_ops;
> dev->watchdog_timeo = VNET_TX_TIMEOUT;
> - dev->change_mtu = vnet_change_mtu;
> - dev->hard_start_xmit = vnet_start_xmit;
>
> err = register_netdev(dev);
> if (err) {
--
Regards
Yang Hongyang
next prev parent reply other threads:[~2009-03-20 8:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 7:52 [PATCH]: sunvnet netdev ops conversion David Miller
2009-03-20 8:30 ` Yang Hongyang [this message]
2009-03-20 8:34 ` David Miller
2009-03-20 11:43 ` Bjørn Mork
2009-03-20 14:19 ` Jiri Pirko
2009-03-20 16:16 ` Stephen Hemminger
2009-03-20 22:54 ` 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=49C35443.8020604@cn.fujitsu.com \
--to=yanghy@cn.fujitsu.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.