On Fri, Apr 16, 2021 at 01:49:07AM +0200, Andrew Lunn wrote:
> > - memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
> > + if (mac_addr) {
> > + ether_addr_copy(dev->dev_addr, mac_addr);
> > + } else {
> > + u8 ofmac[ETH_ALEN];
> > +
> > + if (of_get_mac_address(pdev->d
> - memcpy(dev->dev_addr, mac_addr, ETH_ALEN);
> + if (mac_addr) {
> + ether_addr_copy(dev->dev_addr, mac_addr);
> + } else {
> + u8 ofmac[ETH_ALEN];
> +
> + if (of_get_mac_address(pdev->dev.of_node, ofmac) == 0)
> + ether_addr_cop
If there is no mac address passed via platform data try to get it via
device tree and fall back to a random mac address, if all fail.
Signed-off-by: Thomas Bogendoerfer
---
drivers/net/ethernet/korina.c | 28 ++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --g