All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Warren <biggerbadderben@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: ethoc: add write_hwaddr support
Date: Tue, 27 Apr 2010 10:03:25 -0700	[thread overview]
Message-ID: <4BD718DD.2000308@gmail.com> (raw)
In-Reply-To: <1272341346-25026-1-git-send-email-thomas@wytron.com.tw>

Hi Thomas,

On 4/26/2010 9:09 PM, Thomas Chou wrote:
> Signed-off-by: Thomas Chou<thomas@wytron.com.tw>
> ---
>   drivers/net/ethoc.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
> index b912e44..286fbe7 100644
> --- a/drivers/net/ethoc.c
> +++ b/drivers/net/ethoc.c
> @@ -215,13 +215,14 @@ static inline void ethoc_write_bd(struct eth_device *dev, int index,
>   	ethoc_write(dev, offset + 4, bd->addr);
>   }
>
> -static inline void ethoc_set_mac_address(struct eth_device *dev)
> +static int ethoc_set_mac_address(struct eth_device *dev)
>   {
>   	u8 *mac = dev->enetaddr;
>
>   	ethoc_write(dev, MAC_ADDR0, (mac[2]<<  24) | (mac[3]<<  16) |
>   		    (mac[4]<<  8) | (mac[5]<<  0));
>   	ethoc_write(dev, MAC_ADDR1, (mac[0]<<  8) | (mac[1]<<  0));
> +	return 0;
>   }
>
>   static inline void ethoc_ack_irq(struct eth_device *dev, u32 mask)
> @@ -504,6 +505,7 @@ int ethoc_initialize(u8 dev_num, int base_addr)
>   	dev->halt = ethoc_halt;
>   	dev->send = ethoc_send;
>   	dev->recv = ethoc_recv;
> +	dev->write_hwaddr = ethoc_set_mac_address;
>   	sprintf(dev->name, "%s-%hu", "ETHOC", dev_num);
>
>   	eth_register(dev);
>    
Applied to net repo.

thanks,
Ben

      parent reply	other threads:[~2010-04-27 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27  4:09 [U-Boot] [PATCH] net: ethoc: add write_hwaddr support Thomas Chou
2010-04-27 12:20 ` [U-Boot] [PATCH v2] " Thomas Chou
2010-04-27 17:10   ` Ben Warren
2010-04-27 17:03 ` Ben Warren [this message]

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=4BD718DD.2000308@gmail.com \
    --to=biggerbadderben@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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.