netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 3/4]: sunlance: Convert to net_device_ops.
Date: Mon, 23 Mar 2009 14:03:03 -0700	[thread overview]
Message-ID: <20090323140303.0eeb3844@nehalam> (raw)
In-Reply-To: <20090323.134719.234362924.davem@davemloft.net>

On Mon, 23 Mar 2009 13:47:19 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> 
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
>  drivers/net/sunlance.c |   14 +++++++++-----
>  1 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
> index 16c528d..3a2bb96 100644
> --- a/drivers/net/sunlance.c
> +++ b/drivers/net/sunlance.c
> @@ -1311,6 +1311,14 @@ static const struct ethtool_ops sparc_lance_ethtool_ops = {
>  	.get_link		= sparc_lance_get_link,
>  };
>  
> +static const struct net_device_ops sparc_lance_ops = {
> +	.ndo_open		= lance_open,
> +	.ndo_stop		= lance_close,
> +	.ndo_start_xmit		= lance_start_xmit,
> +	.ndo_set_multicast_list	= lance_set_multicast,
> +	.ndo_tx_timeout		= lance_tx_timeout,

You need to add the three entries that ether_setup() was doing
in the old code:
	.ndo_change_mtu		= eth_change_mtu,
	.ndo_set_mac_address	= eth_mac_addr,
	.ndo_validate_addr	= eth_validate_addr,



> +};
> +
>  static int __devinit sparc_lance_probe_one(struct of_device *op,
>  					   struct of_device *ledma,
>  					   struct of_device *lebuffer)
> @@ -1462,13 +1470,9 @@ no_link_test:
>  
>  	lp->dev = dev;
>  	SET_NETDEV_DEV(dev, &op->dev);
> -	dev->open = &lance_open;
> -	dev->stop = &lance_close;
> -	dev->hard_start_xmit = &lance_start_xmit;
> -	dev->tx_timeout = &lance_tx_timeout;
>  	dev->watchdog_timeo = 5*HZ;
> -	dev->set_multicast_list = &lance_set_multicast;
>  	dev->ethtool_ops = &sparc_lance_ethtool_ops;
> +	dev->netdev_ops = &sparc_lance_ops;
>  
>  	dev->irq = op->irqs[0];
>  

  reply	other threads:[~2009-03-23 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-23 20:47 [PATCH 3/4]: sunlance: Convert to net_device_ops David Miller
2009-03-23 21:03 ` Stephen Hemminger [this message]
2009-03-23 21:29   ` 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=20090323140303.0eeb3844@nehalam \
    --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).