diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-05-13 21:30:15 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-05-13 21:30:15 +0300 |
commit | 82045dd85566d87128dcc66277cf1177d9930a4a (patch) | |
tree | 22fea6311a4866293005a1a44f34310e4007a3c9 /include/linux/etherdevice.h | |
parent | e0478542cfd4d993e38d5f92a3f3ecd238805e96 (diff) | |
parent | ffa6f55eb6188ee73339cab710fabf30d13110a7 (diff) | |
download | linux-82045dd85566d87128dcc66277cf1177d9930a4a.tar.xz |
Merge branch 'linus' into core/urgent, to merge in dependent changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r-- | include/linux/etherdevice.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index e2f3b21cd72a..aa8bfd6f738c 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h @@ -449,6 +449,18 @@ static inline void eth_addr_dec(u8 *addr) } /** + * eth_addr_inc() - Increment the given MAC address. + * @addr: Pointer to a six-byte array containing Ethernet address to increment. + */ +static inline void eth_addr_inc(u8 *addr) +{ + u64 u = ether_addr_to_u64(addr); + + u++; + u64_to_ether_addr(u, addr); +} + +/** * is_etherdev_addr - Tell if given Ethernet address belongs to the device. * @dev: Pointer to a device structure * @addr: Pointer to a six-byte array containing the Ethernet address |