Skip to content

Commit 6e5928f

Browse files
JoePerchesdavem330
authored andcommitted
arch: Use eth_random_addr
Convert the existing uses of random_ether_addr to the new eth_random_addr. Signed-off-by: Joe Perches <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 006c913 commit 6e5928f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

arch/blackfin/mach-bf537/boards/stamp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ static struct adf702x_platform_data adf7021_platform_data = {
873873
};
874874
static inline void adf702x_mac_init(void)
875875
{
876-
random_ether_addr(adf7021_platform_data.mac_addr);
876+
eth_random_addr(adf7021_platform_data.mac_addr);
877877
}
878878
#else
879879
static inline void adf702x_mac_init(void) {}

arch/c6x/kernel/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int soc_mac_addr(unsigned int index, u8 *addr)
8080
if (have_fuse_mac)
8181
memcpy(addr, c6x_fuse_mac, 6);
8282
else
83-
random_ether_addr(addr);
83+
eth_random_addr(addr);
8484
}
8585

8686
/* adjust for specific EMAC device */

arch/mips/ar7/platform.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,10 @@ static void __init cpmac_get_mac(int instance, unsigned char *dev_addr)
310310
&dev_addr[4], &dev_addr[5]) != 6) {
311311
pr_warning("cannot parse mac address, "
312312
"using random address\n");
313-
random_ether_addr(dev_addr);
313+
eth_random_addr(dev_addr);
314314
}
315315
} else
316-
random_ether_addr(dev_addr);
316+
eth_random_addr(dev_addr);
317317
}
318318

319319
/*****************************************************************************

arch/mips/powertv/powertv_setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ early_param("rfmac", rfmac_param);
254254
* Generates an Ethernet MAC address that is highly likely to be unique for
255255
* this particular system on a network with other systems of the same type.
256256
*
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
258258
* generate MAC addresses at startup, there isn't much entropy for the random
259259
* number generator to use and the addresses it produces are fairly likely to
260260
* be the same as those of other identical systems on the same local network.
@@ -269,7 +269,7 @@ early_param("rfmac", rfmac_param);
269269
* Still, this does give us something to work with.
270270
*
271271
* 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.
273273
* 2. Use the 24-bit NIC-specific bits of the RF MAC address as the last 24
274274
* bits of the new address. This is very likely to be unique, except for
275275
* the current box.
@@ -299,7 +299,7 @@ void platform_random_ether_addr(u8 addr[ETH_ALEN])
299299
if (!have_rfmac) {
300300
pr_warning("rfmac not available on command line; "
301301
"generating random MAC address\n");
302-
random_ether_addr(addr);
302+
eth_random_addr(addr);
303303
}
304304

305305
else {

arch/um/drivers/net_kern.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static int setup_etheraddr(char *str, unsigned char *addr, char *name)
339339
random:
340340
printk(KERN_INFO
341341
"Choosing a random ethernet address for device %s\n", name);
342-
random_ether_addr(addr);
342+
eth_random_addr(addr);
343343
return 1;
344344
}
345345

0 commit comments

Comments
 (0)