]> git.baikalelectronics.ru Git - kernel.git/commit
net: bgmac: store MAC address directly in netdev->dev_addr
authorTobias Klauser <tklauser@distanz.ch>
Thu, 16 Feb 2017 14:11:19 +0000 (15:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2017 18:03:39 +0000 (13:03 -0500)
commit84bea8a370e632439e184d7b432468d9aaadf00d
tree4d78938d07ca136118438d39f4870f9092e3217c
parentcca6d021a6dc8c743f5772d67783ac1483e818fa
net: bgmac: store MAC address directly in netdev->dev_addr

After commit 2cc7abab1a0f ("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>
drivers/net/ethernet/broadcom/bgmac-bcma.c
drivers/net/ethernet/broadcom/bgmac-platform.c
drivers/net/ethernet/broadcom/bgmac.c
drivers/net/ethernet/broadcom/bgmac.h