aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/net_kern.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-10-11 13:45:22 +0200
committerTakashi Iwai <tiwai@suse.de>2010-10-11 13:45:22 +0200
commit4e83998f5af010a928495988c586ea2926624db9 (patch)
treee72d346172a30bbee165d7f585784724906da416 /arch/um/drivers/net_kern.c
parentALSA: oxygen - Add a SSID for CMI8787-HG2PCI (diff)
parentOSS: soundcard: locking bug in sound_ioctl() (diff)
downloadlinux-dev-4e83998f5af010a928495988c586ea2926624db9.tar.xz
linux-dev-4e83998f5af010a928495988c586ea2926624db9.zip
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'arch/um/drivers/net_kern.c')
-rw-r--r--arch/um/drivers/net_kern.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 2ab233ba32c1..47d0c37897d5 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -255,18 +255,6 @@ static void uml_net_tx_timeout(struct net_device *dev)
netif_wake_queue(dev);
}
-static int uml_net_set_mac(struct net_device *dev, void *addr)
-{
- struct uml_net_private *lp = netdev_priv(dev);
- struct sockaddr *hwaddr = addr;
-
- spin_lock_irq(&lp->lock);
- eth_mac_addr(dev, hwaddr->sa_data);
- spin_unlock_irq(&lp->lock);
-
- return 0;
-}
-
static int uml_net_change_mtu(struct net_device *dev, int new_mtu)
{
dev->mtu = new_mtu;
@@ -373,7 +361,7 @@ static const struct net_device_ops uml_netdev_ops = {
.ndo_start_xmit = uml_net_start_xmit,
.ndo_set_multicast_list = uml_net_set_multicast_list,
.ndo_tx_timeout = uml_net_tx_timeout,
- .ndo_set_mac_address = uml_net_set_mac,
+ .ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = uml_net_change_mtu,
.ndo_validate_addr = eth_validate_addr,
};
@@ -472,7 +460,8 @@ static void eth_configure(int n, void *init, char *mac,
((*transport->user->init)(&lp->user, dev) != 0))
goto out_unregister;
- eth_mac_addr(dev, device->mac);
+ /* don't use eth_mac_addr, it will not work here */
+ memcpy(dev->dev_addr, device->mac, ETH_ALEN);
dev->mtu = transport->user->mtu;
dev->netdev_ops = &uml_netdev_ops;
dev->ethtool_ops = &uml_net_ethtool_ops;