Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

Bjørn Mork
2016-06-02T07:27:28Z

Greg KH <gregkh@linuxfoundation.org> writes:

> And finally, this seems odd overall given that a MAC address should be
> associated with the specific network device, not the overall system.

Definitely.

I wonder if this isn't a perfect candidate for an x86
arch_get_platform_mac_address() implementation? Then you could just use
the eth_platform_get_mac_address() helper in the driver and avoid any
platform specific code there. Which will automagically make it work as
expected on a Sparc too :)

This will also make your job next year much easier, when the hardeware
guys decided to replace the chip and you need to implement the exact
same code in some other driver...

See https://patchwork.ozlabs.org/patch/564100/ for a detailed
discussion of this interface.

Bjørn