Skip to content

Commit adb3505

Browse files
v-thakkardavem330
authored andcommitted
net: systemport: Use eth_hw_addr_random
Use eth_hw_addr_random() instead of calling random_ether_addr(). Here, this change is setting addr_assign_type to NET_ADDR_RANDOM. The Coccinelle semantic patch that performs this transformation is as follows: @@ identifier a,b; @@ -random_ether_addr(a->b); +eth_hw_addr_random(a); Signed-off-by: Vaishali Thakkar <[email protected]> Tested-by: Florian Fainelli <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d5de198 commit adb3505

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
17931793
macaddr = of_get_mac_address(dn);
17941794
if (!macaddr || !is_valid_ether_addr(macaddr)) {
17951795
dev_warn(&pdev->dev, "using random Ethernet MAC\n");
1796-
random_ether_addr(dev->dev_addr);
1796+
eth_hw_addr_random(dev);
17971797
} else {
17981798
ether_addr_copy(dev->dev_addr, macaddr);
17991799
}

0 commit comments

Comments
 (0)