summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bgmac-platform.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-02-16 17:11:19 +0300
committerDavid S. Miller <davem@davemloft.net>2017-02-17 21:03:39 +0300
commit6850f8b50928463213532d7812b74161d31d3cbd (patch)
tree4d78938d07ca136118438d39f4870f9092e3217c /drivers/net/ethernet/broadcom/bgmac-platform.c
parent3105dfb2a99f52c67cd40ec092373081f022ec28 (diff)
downloadlinux-6850f8b50928463213532d7812b74161d31d3cbd.tar.xz
net: bgmac: store MAC address directly in netdev->dev_addr
After commit 34a5102c3235 ("net: bgmac: allocate struct bgmac just once & don't copy it") the mac_addr member of struct bgmac is no longer necessary to pass the MAC address to bgmac_enet_probe(). Instead it can directly be stored in netdev->dev_addr. Also use eth_hw_addr_random() instead of eth_random_addr() in case a random MAC is nedded. This will make sure netdev->addr_assign_type will be properly set. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Jon Mason <jon.mason@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac-platform.c')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac-platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac-platform.c b/drivers/net/ethernet/broadcom/bgmac-platform.c
index 805e6ed6c390..7b1af950f312 100644
--- a/drivers/net/ethernet/broadcom/bgmac-platform.c
+++ b/drivers/net/ethernet/broadcom/bgmac-platform.c
@@ -169,7 +169,7 @@ static int bgmac_probe(struct platform_device *pdev)
mac_addr = of_get_mac_address(np);
if (mac_addr)
- ether_addr_copy(bgmac->mac_addr, mac_addr);
+ ether_addr_copy(bgmac->net_dev->dev_addr, mac_addr);
else
dev_warn(&pdev->dev, "MAC address not present in device tree\n");