summaryrefslogtreecommitdiff
path: root/include/linux/etherdevice.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-05-13 21:30:15 +0300
committerIngo Molnar <mingo@kernel.org>2019-05-13 21:30:15 +0300
commit82045dd85566d87128dcc66277cf1177d9930a4a (patch)
tree22fea6311a4866293005a1a44f34310e4007a3c9 /include/linux/etherdevice.h
parente0478542cfd4d993e38d5f92a3f3ecd238805e96 (diff)
parentffa6f55eb6188ee73339cab710fabf30d13110a7 (diff)
downloadlinux-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.h12
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