From: Hauke Mehrtens Date: Wed, 28 Nov 2012 22:57:38 +0000 (+0100) Subject: compat: add eth_zero_addr() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=296a769e30752c469ca4f4dd88b80f1dd0731c57;p=openwrt%2Fstaging%2Fblogic.git compat: add eth_zero_addr() Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- diff --git a/include/linux/compat-3.7.h b/include/linux/compat-3.7.h index 2d7b6ddb1d2f..9e8d6750ac73 100644 --- a/include/linux/compat-3.7.h +++ b/include/linux/compat-3.7.h @@ -89,6 +89,25 @@ static inline int pcie_capability_clear_dword(struct pci_dev *dev, int pos, #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ +/* This backports: + * + * commit 6d57e9078e880a3dd232d579f42ac437a8f1ef7b + * Author: Duan Jiong + * Date: Sat Sep 8 16:32:28 2012 +0000 + * + * etherdevice: introduce help function eth_zero_addr() + */ +/** + * eth_zero_addr - Assign zero address + * @addr: Pointer to a six-byte array containing the Ethernet address + * + * Assign the zero address to the given address array. + */ +static inline void eth_zero_addr(u8 *addr) +{ + memset(addr, 0x00, ETH_ALEN); +} + #else /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,7,0)) */ #define netlink_notify_portid(__notify) (__notify->portid) #define genl_info_snd_portid(__genl_info) (__genl_info->snd_portid)