compat: add eth_zero_addr()
authorHauke Mehrtens <hauke@hauke-m.de>
Wed, 28 Nov 2012 22:57:38 +0000 (23:57 +0100)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 29 Nov 2012 21:21:44 +0000 (13:21 -0800)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
include/linux/compat-3.7.h

index 2d7b6ddb1d2faa8325a66b83b5a117e638d32b7c..9e8d6750ac73e81c6964e5a8d117fec6ad8356ee 100644 (file)
@@ -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 <djduanjiong@gmail.com>
+ * 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)