]> git.proxmox.com Git - mirror_ubuntu-artful-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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:19:59 +0000 (10:19 +0100)
commitc1955f8dae3fe7258842107dbeabf35dbe930f03
treef82de43762c18ea8e3516ae1864e4973a098ba3b
parenta878f950de04c7f7c7ac96220e998a1574da3632
net: Add eth_platform_get_mac_address() helper.

BugLink: http://bugs.launchpad.net/bugs/1547674
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>
(cherry picked from net-next commit c7f5d105495a38ed09e70d825f75d9d7d5407264)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/sparc/kernel/idprom.c
include/linux/etherdevice.h
net/ethernet/eth.c