Commit 6e5928f6 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

arch: Use eth_random_addr

Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 006c9139
...@@ -873,7 +873,7 @@ static struct adf702x_platform_data adf7021_platform_data = { ...@@ -873,7 +873,7 @@ static struct adf702x_platform_data adf7021_platform_data = {
}; };
static inline void adf702x_mac_init(void) static inline void adf702x_mac_init(void)
{ {
random_ether_addr(adf7021_platform_data.mac_addr); eth_random_addr(adf7021_platform_data.mac_addr);
} }
#else #else
static inline void adf702x_mac_init(void) {} static inline void adf702x_mac_init(void) {}
......
...@@ -80,7 +80,7 @@ int soc_mac_addr(unsigned int index, u8 *addr) ...@@ -80,7 +80,7 @@ int soc_mac_addr(unsigned int index, u8 *addr)
if (have_fuse_mac) if (have_fuse_mac)
memcpy(addr, c6x_fuse_mac, 6); memcpy(addr, c6x_fuse_mac, 6);
else else
random_ether_addr(addr); eth_random_addr(addr);
} }
/* adjust for specific EMAC device */ /* adjust for specific EMAC device */
......
...@@ -310,10 +310,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr) ...@@ -310,10 +310,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
&dev_addr[4], &dev_addr[5]) != 6) { &dev_addr[4], &dev_addr[5]) != 6) {
pr_warning("cannot parse mac address, " pr_warning("cannot parse mac address, "
"using random address\n"); "using random address\n");
random_ether_addr(dev_addr); eth_random_addr(dev_addr);
} }
} else } else
random_ether_addr(dev_addr); eth_random_addr(dev_addr);
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -254,7 +254,7 @@ early_param("rfmac", rfmac_param); ...@@ -254,7 +254,7 @@ early_param("rfmac", rfmac_param);
* Generates an Ethernet MAC address that is highly likely to be unique for * Generates an Ethernet MAC address that is highly likely to be unique for
* this particular system on a network with other systems of the same type. * this particular system on a network with other systems of the same type.
* *
* The problem we are solving is that, when random_ether_addr() is used to * The problem we are solving is that, when eth_random_addr() is used to
* generate MAC addresses at startup, there isn't much entropy for the random * generate MAC addresses at startup, there isn't much entropy for the random
* number generator to use and the addresses it produces are fairly likely to * number generator to use and the addresses it produces are fairly likely to
* be the same as those of other identical systems on the same local network. * be the same as those of other identical systems on the same local network.
...@@ -269,7 +269,7 @@ early_param("rfmac", rfmac_param); ...@@ -269,7 +269,7 @@ early_param("rfmac", rfmac_param);
* Still, this does give us something to work with. * Still, this does give us something to work with.
* *
* The approach we take is: * The approach we take is:
* 1. If we can't get the RF MAC Address, just call random_ether_addr. * 1. If we can't get the RF MAC Address, just call eth_random_addr.
* 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24 * 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24
* bits of the new address. This is very likely to be unique, except for * bits of the new address. This is very likely to be unique, except for
* the current box. * the current box.
...@@ -299,7 +299,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN]) ...@@ -299,7 +299,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN])
if (!have_rfmac) { if (!have_rfmac) {
pr_warning("rfmac not available on command line; " pr_warning("rfmac not available on command line; "
"generating random MAC address\n"); "generating random MAC address\n");
random_ether_addr(addr); eth_random_addr(addr);
} }
else { else {
......
...@@ -339,7 +339,7 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name) ...@@ -339,7 +339,7 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name)
random: random:
printk(KERN_INFO printk(KERN_INFO
"Choosing a random ethernet address for device %s\n", name); "Choosing a random ethernet address for device %s\n", name);
random_ether_addr(addr); eth_random_addr(addr);
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment