Commit ab2d95df authored by Alan Ott's avatar Alan Ott Committed by David S. Miller

6lowpan: Sync default hardware address of lowpan links to their wpan

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: default avatarAlan Ott <alan@signal11.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7adac1ec
...@@ -1388,6 +1388,9 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev, ...@@ -1388,6 +1388,9 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
entry->ldev = 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);
mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx); mutex_lock(&lowpan_dev_info(dev)->dev_list_mtx);
INIT_LIST_HEAD(&entry->list); INIT_LIST_HEAD(&entry->list);
list_add_tail(&entry->list, &lowpan_devices); list_add_tail(&entry->list, &lowpan_devices);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment