Thread (19 messages) flat view 19 messages, 4 authors, 2016-07-19

Re: [PATCH net-next v2 07/10] net/faraday: Read MAC address from chip

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2016-07-19 10:58:45

On Tue, 2016-07-19 at 10:50 +0000, David Laight wrote:
quoted
+     if (!is_valid_ether_addr(mac)) {
+             mac[5] = (m >> 8) & 0xff;
+             mac[4] = m & 0xff;
+             mac[3] = (l >> 24) & 0xff;
+             mac[2] = (l >> 16) & 0xff;
+             mac[1] = (l >>  8) & 0xff;
+             mac[0] = l & 0xff;
+     }
...

That is horrid, not all byte reversed addresses will be invalid.
Right, that's just a hack for a broken vendor uboot we had here, Gavin,
drop that part of the patch please.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help