diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-16 02:09:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-19 19:02:42 -0500 |
commit | fa63c6da22b4a6ea6e7d04e3dc9178dd72304903 (patch) | |
tree | 6b3ece0cb2f9648c04089ed610e823cd96af258d /arch/blackfin/mach-bf518 | |
parent | 772301b6187a88359b9514bdd023becf31e7f013 (diff) |
arch/blackfin: don't generate random mac in bfin_get_ether_addr()
Changed bfin_get_ether_addr() to return a state and to
set no random mac address if the board don't provide one.
Let the caller of bfin_get_ether_addr() set a random mac
address if the return value is not 0.
v2: don't set random mac in bfin_get_ether_addr()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/blackfin/mach-bf518')
-rw-r--r-- | arch/blackfin/mach-bf518/boards/ezbrd.c | 3 | ||||
-rw-r--r-- | arch/blackfin/mach-bf518/boards/tcm-bf518.c | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index a2d96d31bbf1..a17395727efa 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -821,7 +821,7 @@ void native_machine_restart(char *cmd) | |||
821 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); | 821 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
822 | } | 822 | } |
823 | 823 | ||
824 | void bfin_get_ether_addr(char *addr) | 824 | int bfin_get_ether_addr(char *addr) |
825 | { | 825 | { |
826 | /* the MAC is stored in OTP memory page 0xDF */ | 826 | /* the MAC is stored in OTP memory page 0xDF */ |
827 | u32 ret; | 827 | u32 ret; |
@@ -834,5 +834,6 @@ void bfin_get_ether_addr(char *addr) | |||
834 | for (ret = 0; ret < 6; ++ret) | 834 | for (ret = 0; ret < 6; ++ret) |
835 | addr[ret] = otp_mac_p[5 - ret]; | 835 | addr[ret] = otp_mac_p[5 - ret]; |
836 | } | 836 | } |
837 | return 0; | ||
837 | } | 838 | } |
838 | EXPORT_SYMBOL(bfin_get_ether_addr); | 839 | EXPORT_SYMBOL(bfin_get_ether_addr); |
diff --git a/arch/blackfin/mach-bf518/boards/tcm-bf518.c b/arch/blackfin/mach-bf518/boards/tcm-bf518.c index f271310f739d..6eebee4e4217 100644 --- a/arch/blackfin/mach-bf518/boards/tcm-bf518.c +++ b/arch/blackfin/mach-bf518/boards/tcm-bf518.c | |||
@@ -730,9 +730,8 @@ void native_machine_restart(char *cmd) | |||
730 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); | 730 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
731 | } | 731 | } |
732 | 732 | ||
733 | void bfin_get_ether_addr(char *addr) | 733 | int bfin_get_ether_addr(char *addr) |
734 | { | 734 | { |
735 | random_ether_addr(addr); | 735 | return 1; |
736 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
737 | } | 736 | } |
738 | EXPORT_SYMBOL(bfin_get_ether_addr); | 737 | EXPORT_SYMBOL(bfin_get_ether_addr); |