summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteven J. Magnani <steve@digidescorp.com>2010-02-17 07:55:07 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-17 13:35:36 -0800
commit8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc (patch)
treedeaa36b1cbd04a758bc2c662fdbc83040c8423ab /drivers
parentc3b7c12cd78d5c8264c87c29dcd9a8f1819f8313 (diff)
downloadlinux-stable-8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc.tar.gz
linux-stable-8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc.tar.bz2
linux-stable-8ea7a37c5a312bfee51ff7f12f78efe4fbc901cc.zip
ll_temac: Fix MAC address configuration from userland
A userland command to set the LLTEMAC MAC address, i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq", results in a device address of 00:01:xx:yy:zz:pp. Correct this. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ll_temac_main.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index d7eb24cc2648..e53440253748 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -224,6 +224,13 @@ static int temac_set_mac_address(struct net_device *ndev, void *address)
return 0;
}
+static int netdev_set_mac_address(struct net_device *ndev, void *p)
+{
+ struct sockaddr *addr = p;
+
+ return temac_set_mac_address(ndev, addr->sa_data);
+}
+
static void temac_set_multicast_list(struct net_device *ndev)
{
struct temac_local *lp = netdev_priv(ndev);
@@ -768,7 +775,7 @@ static const struct net_device_ops temac_netdev_ops = {
.ndo_open = temac_open,
.ndo_stop = temac_stop,
.ndo_start_xmit = temac_start_xmit,
- .ndo_set_mac_address = temac_set_mac_address,
+ .ndo_set_mac_address = netdev_set_mac_address,
//.ndo_set_multicast_list = temac_set_multicast_list,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = temac_poll_controller,