diff options
author | David S. Miller <davem@davemloft.net> | 2013-09-03 20:57:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-03 20:57:57 -0400 |
commit | 61c8106e296cbb51eec11f5cb0ffd6ac30672f55 (patch) | |
tree | 758a813e35f67ff4007a1f38bb12923315d7f1cf /drivers/net/wireless/hostap/hostap_main.c | |
parent | 5a17a390de7bdbcfff9b8f344273a886ca4cf8bf (diff) | |
parent | 314cb11b493e7b8cfc7e2db01ad8e4e8bc0a259d (diff) |
Merge branch 'addr_assign_type'
Bjørn Mork says:
====================
net: set addr_assign_type when inheriting a dev_addr
Copying the dev_addr from a parent device is an operation
common to a number of drivers. The addr_assign_type should
be updated accordingly, either by reusing the value from
the source device or explicitly indicating that the address
is stolen by setting addr_assign_type to NET_ADDR_STOLEN.
This patch set adds a helper copying both the dev_addr and
the addr_assign_type, and use this helper in drivers which
don't currently set the addr_assign_type. Using NET_ADDR_STOLEN
might be more appropriate in some of these cases. Please
let me know, and I'll update the patch accordingly.
Changes in v2:
- assuming addr_len == ETH_ALEN to allow optimized memcpy
- dropped the vt6656 patch due to addr_len being unset in that driver
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_main.c')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c index e4f56ad26cd..a1257c92afc 100644 --- a/drivers/net/wireless/hostap/hostap_main.c +++ b/drivers/net/wireless/hostap/hostap_main.c @@ -66,7 +66,7 @@ struct net_device * hostap_add_interface(struct local_info *local, list_add(&iface->list, &local->hostap_interfaces); mdev = local->dev; - memcpy(dev->dev_addr, mdev->dev_addr, ETH_ALEN); + eth_hw_addr_inherit(dev, mdev); dev->base_addr = mdev->base_addr; dev->irq = mdev->irq; dev->mem_start = mdev->mem_start; |