[v2,2/2] 6lowpan: Sync default hardware address of lowpan links to their wpan

Message ID 1381029319-6835-3-git-send-email-alan@signal11.us
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Alan Ott Oct. 6, 2013, 3:15 a.m.
When a lowpan link to a wpan device is created, set the hardware address
of the lowpan link to that of the wpan device.

Signed-off-by: Alan Ott <alan@signal11.us>
 net/ieee802154/6lowpan.c | 3 +++
 1 file changed, 3 insertions(+)


diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 8f56b2b..ff41b4d 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1388,6 +1388,9 @@  static int lowpan_newlink(struct net *src_net, struct net_device *dev,
 	entry->ldev = dev;
+	/* Set the lowpan harware address to the wpan hardware address. */
+	memcpy(dev->dev_addr, real_dev->dev_addr, IEEE802154_ADDR_LEN);
 	list_add_tail(&entry->list, &lowpan_devices);