| To: | David Miller <davem@davemloft.net> |
|---|---|
| Subject: | Re: [PATCH] METH: fix MAC address handling |
| From: | tsbogend@alpha.franken.de (Thomas Bogendoerfer) |
| Date: | Sun, 6 Jan 2008 12:38:16 +0100 |
| Cc: | netdev@vger.kernel.org, linux-mips@linux-mips.org, ralf@linux-mips.org, jgarzik@pobox.com |
| In-reply-to: | <20080106.002305.99653155.davem@davemloft.net> |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <20080105224842.78EDCC2EFB@solo.franken.de> <20080106.002305.99653155.davem@davemloft.net> |
| Sender: | linux-mips-bounce@linux-mips.org |
| User-agent: | Mutt/1.5.13 (2006-08-11) |
On Sun, Jan 06, 2008 at 12:23:05AM -0800, David Miller wrote:
> > + u64 macaddr;
> >
> > - for (i = 0; i < 6; i++)
> > - dev->dev_addr[i] = o2meth_eaddr[i];
> > DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr));
> > - mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16;
> > + macaddr = 0;
> > + for (i = 0; i < 6; i++)
> > + macaddr |= dev->dev_addr[i] << ((5 - i) * 8);
> > +
> > + mace->eth.mac_addr = macaddr;
> > }
> >
> > /*
>
> Can you double-check that this conversion is equivalent.
yes, I did.
> I know that this whole driver is full of assumptions about
> the endianness of the system this chip is found on, so
> I'm only interested in if the transformation is equivalent
> and the driver will keep working properly.
I've tested the driver and it's still working :-)
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea. [ RFC1925, 2.3 ]
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] METH: fix MAC address handling, David Miller |
|---|---|
| Next by Date: | Re: [PATCH] Fix IP32 breakage, Martin Michlmayr |
| Previous by Thread: | Re: [PATCH] METH: fix MAC address handling, David Miller |
| Next by Thread: | Re: [PATCH] METH: fix MAC address handling, David Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |