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: Gavin Shan <hidden>
Date: 2016-07-19 23:40:17

On Tue, Jul 19, 2016 at 08:57:53PM +1000, Benjamin Herrenschmidt wrote:
On Tue, 2016-07-19 at 10:50 +0000, David Laight wrote:
quoted
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.
Sure, I'll drop it in v4 or a followup patch. v3 is being reviewed this
moment.

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