Re: [PATCH] of: net: Add option for random mac address

From: Andrew Lunn
Date: Thu Oct 10 2024 - 15:53:31 EST


On Thu, Oct 10, 2024 at 03:05:03PM -0400, Iulian Gilca wrote:
> Embedded devices that may not have fixed mac address
> may want to use a randomly generated one.
> DSA switch ports are some of these.

Sorry, i don't follow what this patch is doing. You are looking in DT
for a property "random-address". DT is static, so how is it going to
be random?

I also don't understand you use case. Generally, a MAC driver will try
to find a fixed MAC address. If one cannot be found, it generates a
random one.

For DSA, it takes the MAC address from the conduit interface for the
user interfaces. If userspace whats to use come other MAC address on
user ports, it can change the MAC address in the usual way.

Andrew