diff options
Diffstat (limited to 'include/linux/etherdevice.h')
| -rw-r--r-- | include/linux/etherdevice.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index c623861964e4..d8b512496e50 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
| @@ -199,6 +199,21 @@ static inline void eth_hw_addr_random(struct net_device *dev) | |||
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | /** | 201 | /** |
| 202 | * eth_hw_addr_inherit - Copy dev_addr from another net_device | ||
| 203 | * @dst: pointer to net_device to copy dev_addr to | ||
| 204 | * @src: pointer to net_device to copy dev_addr from | ||
| 205 | * | ||
| 206 | * Copy the Ethernet address from one net_device to another along with | ||
| 207 | * the address attributes (addr_assign_type). | ||
| 208 | */ | ||
| 209 | static inline void eth_hw_addr_inherit(struct net_device *dst, | ||
| 210 | struct net_device *src) | ||
| 211 | { | ||
| 212 | dst->addr_assign_type = src->addr_assign_type; | ||
| 213 | memcpy(dst->dev_addr, src->dev_addr, ETH_ALEN); | ||
| 214 | } | ||
| 215 | |||
| 216 | /** | ||
| 202 | * compare_ether_addr - Compare two Ethernet addresses | 217 | * compare_ether_addr - Compare two Ethernet addresses |
| 203 | * @addr1: Pointer to a six-byte array containing the Ethernet address | 218 | * @addr1: Pointer to a six-byte array containing the Ethernet address |
| 204 | * @addr2: Pointer other six-byte array containing the Ethernet address | 219 | * @addr2: Pointer other six-byte array containing the Ethernet address |
