All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt.org>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops.
Date: Mon, 1 Jun 2009 20:10:08 +0200	[thread overview]
Message-ID: <200906012010.09162.florian@openwrt.org> (raw)
In-Reply-To: <1243876918-9905-4-git-send-email-mbizon@freebox.fr>

Le Monday 01 June 2009 19:21:51 Maxime Bizon, vous avez écrit :
> This patch makes bcm63xx_enet driver use netdevice ops.
>
> Signed-off-by: Maxime Bizon <mbizon@freebox.fr>

Acked-by: Florian Fainelli <florian@openwrt.org>

> ---
>  drivers/net/bcm63xx_enet.c |   24 ++++++++++++++----------
>  1 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
> index 20e08ef..36324b3 100644
> --- a/drivers/net/bcm63xx_enet.c
> +++ b/drivers/net/bcm63xx_enet.c
> @@ -1551,6 +1551,19 @@ static void bcm_enet_hw_preinit(struct bcm_enet_priv
> *priv) enet_writel(priv, val, ENET_MIBCTL_REG);
>  }
>
> +static const struct net_device_ops bcm_enet_ops = {
> +	.ndo_open		= bcm_enet_open,
> +	.ndo_stop		= bcm_enet_stop,
> +	.ndo_start_xmit		= bcm_enet_start_xmit,
> +	.ndo_get_stats		= bcm_enet_get_stats,
> +	.ndo_set_mac_address	= bcm_enet_set_mac_address,
> +	.ndo_set_multicast_list = bcm_enet_set_multicast_list,
> +	.ndo_do_ioctl		= bcm_enet_ioctl,
> +#ifdef CONFIG_NET_POLL_CONTROLLER
> +	.ndo_poll_controller = bcm_enet_netpoll,
> +#endif
> +};
> +
>  /*
>   * allocate netdevice, request register memory and register device.
>   */
> @@ -1716,17 +1729,8 @@ static int __devinit bcm_enet_probe(struct
> platform_device *pdev) enet_writel(priv, 0, ENET_MIB_REG(i));
>
>  	/* register netdevice */
> -	dev->open = bcm_enet_open;
> -	dev->stop = bcm_enet_stop;
> -	dev->hard_start_xmit = bcm_enet_start_xmit;
> -	dev->get_stats = bcm_enet_get_stats;
> -	dev->set_mac_address = bcm_enet_set_mac_address;
> -	dev->set_multicast_list = bcm_enet_set_multicast_list;
> +	dev->netdev_ops = &bcm_enet_ops;
>  	netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
> -	dev->do_ioctl = bcm_enet_ioctl;
> -#ifdef CONFIG_NET_POLL_CONTROLLER
> -	dev->poll_controller = bcm_enet_netpoll;
> -#endif
>
>  	SET_ETHTOOL_OPS(dev, &bcm_enet_ethtool_ops);



-- 
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------

  reply	other threads:[~2009-06-01 18:10 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 17:21 More updates to bcm63xx support (resend) Maxime Bizon
2009-06-01 17:21 ` [PATCH 01/10] bcm63xx: remove duplicate init fields Maxime Bizon
2009-06-01 18:07   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 02/10] bcm63xx: use napi_complete instead of __napi_complete Maxime Bizon
2009-06-01 18:09   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 03/10] bcm63xx: convert bcm63xx_enet to netdev ops Maxime Bizon
2009-06-01 18:10   ` Florian Fainelli [this message]
2009-06-01 17:21 ` [PATCH 04/10] bcm63xx: limit number of usb port to 1 Maxime Bizon
2009-06-01 18:10   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 05/10] bcm63xx: use platform_get_irq in ohci-bcm63xx.c Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 06/10] bcm63xx: don't set bus type " Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 07/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
2009-06-01 18:11   ` Florian Fainelli
2009-06-01 18:38   ` [PATCH 07/10 (v2)] " Maxime Bizon
2009-06-01 17:21 ` [PATCH 08/10] bcm63xx: use platform_get_irq in ehci-bcm63xx.c Maxime Bizon
2009-06-01 18:12   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 09/10] bcm63xx: don't set bus type " Maxime Bizon
2009-06-01 18:12   ` Florian Fainelli
2009-06-01 17:21 ` [PATCH 10/10] bcm63xx: clarify meaning of the magical value " Maxime Bizon
2009-06-01 17:57   ` Sergei Shtylyov
2009-06-01 18:36     ` [PATCH 10/10 (v2)] " Maxime Bizon
2009-06-01 18:12   ` [PATCH 10/10] " Florian Fainelli
2009-06-02  9:41 ` More updates to bcm63xx support (resend) Ralf Baechle

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=200906012010.09162.florian@openwrt.org \
    --to=florian@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mbizon@freebox.fr \
    --cc=ralf@linux-mips.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.