X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=include%2Flinux%2Fetherdevice.h;fp=include%2Flinux%2Fetherdevice.h;h=aa8bfd6f738c7fac838b31de87ec390cf0a81d3c;hb=1c5c12ee308aacf635c8819cd4baa3bd58f8a8b7;hp=e2f3b21cd72a28d16cf2324d308e13dc64c86f59;hpb=ffbf9870dcf1342592a1a26f4cf70bda39046134;p=linux-2.6-microblaze.git 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 @@ -448,6 +448,18 @@ static inline void eth_addr_dec(u8 *addr) u64_to_ether_addr(u, 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