summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVaishali Thakkar <vthakkar1994@gmail.com>2015-07-08 10:49:30 +0530
committerDavid S. Miller <davem@davemloft.net>2015-07-09 14:51:15 -0700
commitadb3505086def6d3e37013ec6cf8313cc719cbb6 (patch)
tree077b78dd94078882951e843c5cae593e93d2b773
parentd5de1987853a7778bb048a9e52b3486eb9aceb17 (diff)
downloadop-kernel-dev-adb3505086def6d3e37013ec6cf8313cc719cbb6.zip
op-kernel-dev-adb3505086def6d3e37013ec6cf8313cc719cbb6.tar.gz
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 <vthakkar1994@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 909ad7a..4566cdf 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -1793,7 +1793,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)
macaddr = of_get_mac_address(dn);
if (!macaddr || !is_valid_ether_addr(macaddr)) {
dev_warn(&pdev->dev, "using random Ethernet MAC\n");
- random_ether_addr(dev->dev_addr);
+ eth_hw_addr_random(dev);
} else {
ether_addr_copy(dev->dev_addr, macaddr);
}
OpenPOWER on IntegriCloud