Commit b3ba206c authored by Linus Walleij's avatar Linus Walleij Committed by David S. Miller

ixp4xx_eth: Fall back to random MAC address

If the firmware does not provide a MAC address to the driver,
fall back to generating a random MAC address.
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 44ac441a
......@@ -1487,7 +1487,10 @@ static int ixp4xx_eth_probe(struct platform_device *pdev)
port->plat = plat;
npe_port_tab[NPE_ID(port->id)] = port;
eth_hw_addr_set(ndev, plat->hwaddr);
if (is_valid_ether_addr(plat->hwaddr))
eth_hw_addr_set(ndev, plat->hwaddr);
else
eth_hw_addr_random(ndev);
platform_set_drvdata(pdev, ndev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment