]> git.baikalelectronics.ru Git - kernel.git/commit
net: Add eth_platform_get_mac_address() helper.
authorDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 16:34:57 +0000 (11:34 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jan 2016 21:31:56 +0000 (16:31 -0500)
commitadaaa7f4952fdfa11e81a312bab778bab366e8af
tree2c111b9bb5bb557400914e31839f0d41b1018da3
parent52e802b40b2ddc1fab81b2b019cbabd18fd6e57e
net: Add eth_platform_get_mac_address() helper.

A repeating pattern in drivers has become to use OF node information
and, if not found, platform specific host information to extract the
ethernet address for a given device.

Currently this is done with a call to of_get_mac_address() and then
some ifdef'd stuff for SPARC.

Consolidate this into a portable routine, and provide the
arch_get_platform_mac_address() weak function hook for all
architectures to implement if they want.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/kernel/idprom.c
include/linux/etherdevice.h
net/ethernet/eth.c