summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/mesh.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2009-12-24 08:11:24 +0000
committerDavid S. Miller <davem@davemloft.net>2009-12-26 20:24:45 -0800
commit1f04493123763f5b8bc6d5de9aed0222345c052c (patch)
tree85b27e8a82a63a875740b67e9016fc11f432c453 /drivers/net/wireless/libertas/mesh.c
parentf74dac0859bd9678b289ad9dc215026fd7ce033e (diff)
downloadtalos-op-linux-1f04493123763f5b8bc6d5de9aed0222345c052c.tar.gz
talos-op-linux-1f04493123763f5b8bc6d5de9aed0222345c052c.zip
Fix MAC address access in 3c507, ibmlana, pcnet32 and libertas
Commit f001fde5eadd915f4858d22ed70d7040f48767cf changed net_device.dev_addr from a 32-byte array to a pointer. I found 4 ethernet drivers which rely on sizeof(dev_addr), which are now only copying 4 bytes of the address information on 32bit systems. Fix them to use ETH_ALEN. Signed-off-by: Daniel Drake <dsd@laptop.org> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/libertas/mesh.c')
-rw-r--r--drivers/net/wireless/libertas/mesh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index 2f91c9b808af..92b7a357a5e4 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -2,6 +2,7 @@
#include <linux/delay.h>
#include <linux/etherdevice.h>
#include <linux/netdevice.h>
+#include <linux/if_ether.h>
#include <linux/if_arp.h>
#include <linux/kthread.h>
#include <linux/kfifo.h>
@@ -351,8 +352,7 @@ int lbs_add_mesh(struct lbs_private *priv)
mesh_dev->netdev_ops = &mesh_netdev_ops;
mesh_dev->ethtool_ops = &lbs_ethtool_ops;
- memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
- sizeof(priv->dev->dev_addr));
+ memcpy(mesh_dev->dev_addr, priv->dev->dev_addr, ETH_ALEN);
SET_NETDEV_DEV(priv->mesh_dev, priv->dev->dev.parent);
OpenPOWER on IntegriCloud