Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

arch: Use eth_random_addr

Convert the existing uses of random_ether_addr to
the new eth_random_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
6e5928f6 006c9139

+8 -8
+1 -1
arch/blackfin/mach-bf537/boards/stamp.c
··· 873 873 }; 874 874 static inline void adf702x_mac_init(void) 875 875 { 876 - random_ether_addr(adf7021_platform_data.mac_addr); 876 + eth_random_addr(adf7021_platform_data.mac_addr); 877 877 } 878 878 #else 879 879 static inline void adf702x_mac_init(void) {}
+1 -1
arch/c6x/kernel/soc.c
··· 80 80 if (have_fuse_mac) 81 81 memcpy(addr, c6x_fuse_mac, 6); 82 82 else 83 - random_ether_addr(addr); 83 + eth_random_addr(addr); 84 84 } 85 85 86 86 /* adjust for specific EMAC device */
+2 -2
arch/mips/ar7/platform.c
··· 310 310 &dev_addr[4], &dev_addr[5]) != 6) { 311 311 pr_warning("cannot parse mac address, " 312 312 "using random address\n"); 313 - random_ether_addr(dev_addr); 313 + eth_random_addr(dev_addr); 314 314 } 315 315 } else 316 - random_ether_addr(dev_addr); 316 + eth_random_addr(dev_addr); 317 317 } 318 318 319 319 /*****************************************************************************
+3 -3
arch/mips/powertv/powertv_setup.c
··· 254 254 * Generates an Ethernet MAC address that is highly likely to be unique for 255 255 * this particular system on a network with other systems of the same type. 256 256 * 257 - * The problem we are solving is that, when random_ether_addr() is used to 257 + * The problem we are solving is that, when eth_random_addr() is used to 258 258 * generate MAC addresses at startup, there isn't much entropy for the random 259 259 * number generator to use and the addresses it produces are fairly likely to 260 260 * be the same as those of other identical systems on the same local network. ··· 269 269 * Still, this does give us something to work with. 270 270 * 271 271 * The approach we take is: 272 - * 1. If we can't get the RF MAC Address, just call random_ether_addr. 272 + * 1. If we can't get the RF MAC Address, just call eth_random_addr. 273 273 * 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24 274 274 * bits of the new address. This is very likely to be unique, except for 275 275 * the current box. ··· 299 299 if (!have_rfmac) { 300 300 pr_warning("rfmac not available on command line; " 301 301 "generating random MAC address\n"); 302 - random_ether_addr(addr); 302 + eth_random_addr(addr); 303 303 } 304 304 305 305 else {
+1 -1
arch/um/drivers/net_kern.c
··· 339 339 random: 340 340 printk(KERN_INFO 341 341 "Choosing a random ethernet address for device %s\n", name); 342 - random_ether_addr(addr); 342 + eth_random_addr(addr); 343 343 return 1; 344 344 } 345 345