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: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
44ac441a51
Коммит
b3ba206ce8
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче