Thread (13 messages) 13 messages, 5 authors, 2022-12-01

Re: [PATCH] net: atlantic: fix check for invalid ethernet addresses

From: Andrew Lunn <andrew@lunn.ch>
Date: 2022-11-30 21:33:35
Also in: lkml

quoted
quoted
-	return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0);
+	return !(addr[0] == 0 && addr[1] == 0 && addr[2] == 0) &&
+		!(addr[3] == 0 && addr[4] == 0 && addr[5] == 0);
Hi Brian

is_valid_ether_addr()
aq_nic_ndev_register() already calls is_valid_ether_addr():

	if (is_valid_ether_addr(addr) &&
	    aq_nic_is_valid_ether_addr(addr)) {
		(self->ndev, addr);
	} else {
		...
	}

That won't work for this board since that function only checks that the
MAC "is not 00:00:00:00:00:00, is not a multicast address, and is not
FF:FF:FF:FF:FF:FF." The MAC address that we get on all of our boards is
00:17:b6:00:00:00.
Which is a valid MAC address. So i don't see why the kernel should
reject it and use a random one.

Maybe you should talk to Marvell about how you can program the
e-fuses. You can then use MAC addresses from A8-97-DC etc.

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