.ndo_open = ndeth_open,
.ndo_stop = ndeth_stop,
.ndo_start_xmit = ndeth_tx,
+ .ndo_set_mac_address = eth_mac_addr,
};
struct net_device *ndeth;
static __init int ndeth_init(void)
{
int r = -ENOMEM;
+ char addr[ETH_ALEN];
ndeth = alloc_etherdev(0);
if (!ndeth)
goto out;
ndeth->netdev_ops = &ndeth_ops;
+ random_ether_addr(addr);
+ memcpy(ndeth->dev_addr, addr, ETH_ALEN);
r = register_netdev(ndeth);
if (r)
goto reg_out;