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

Andrew Lunn
2024-10-10T23:01:13Z

On Thu, Oct 10, 2024 at 05:54:17PM -0400, Iulian Gilca wrote:
> Embedded devices that don't have a fixed mac address may want
> to use this property. For example dsa switch ports may use this property in
> order avoid setting this from user space. Sometimes, in case of DSA switch
> ports is desirable to use a random mac address rather than using the
> conduit interface mac address.
>
> example device tree config :
>
> ....
> netswitch: swdev@5f {
> compatible = "microchip,ksz9897";
> ...
> ports {
> port@0 {
> reg = <0>;
> label = "eth0";
> random-address;
> }
> ...
> }
> }
>
> ...
>
> This way the switch ports that have the "random-address" property
> will use a random mac address rather than the conduit mac address.
>
> PS. Sorry for the previous malformed patch

In addition to Russells emai:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

and it is much better to answer questions asked than post yet another
patch. Yes, the commit message is better, but it still does not fully
explain 'Why?' and convince us this is the correct solution to your
problem. What _is_ the problem you are trying to solve?

Andrew

---
pw-bot: cr