summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/platforms
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2013-11-10 16:05:48 +0400
committerChris Zankel <chris@zankel.net>2014-01-14 10:19:50 -0800
commitf6ac5a177db24379e7a7a7d44b1ae7d1036042ec (patch)
tree50a04b222a29957926da8ca3624d20275730ca37 /arch/xtensa/platforms
parent8991fd88354f924cc3f4e6386c619fc39fb48f21 (diff)
downloadlinux-f6ac5a177db24379e7a7a7d44b1ae7d1036042ec.tar.bz2
xtensa: ISS: enable iss_net_set_mac
This allows changing MAC address of the device. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/platforms')
-rw-r--r--arch/xtensa/platforms/iss/network.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/xtensa/platforms/iss/network.c b/arch/xtensa/platforms/iss/network.c
index f7709c7efca4..b33ed0c53547 100644
--- a/arch/xtensa/platforms/iss/network.c
+++ b/arch/xtensa/platforms/iss/network.c
@@ -467,15 +467,14 @@ static void iss_net_tx_timeout(struct net_device *dev)
static int iss_net_set_mac(struct net_device *dev, void *addr)
{
-#if 0
struct iss_net_private *lp = netdev_priv(dev);
struct sockaddr *hwaddr = addr;
+ if (!is_valid_ether_addr(hwaddr->sa_data))
+ return -EADDRNOTAVAIL;
spin_lock(&lp->lock);
memcpy(dev->dev_addr, hwaddr->sa_data, ETH_ALEN);
spin_unlock(&lp->lock);
-#endif
-
return 0;
}