compat: backport MODULE_ALIAS_GENL_FAMILY macro
authorThierry Escande <thierry.escande@linux.intel.com>
Mon, 8 Apr 2013 10:26:08 +0000 (12:26 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2013 19:54:38 +0000 (21:54 +0200)
This also backports MODULE_ALIAS_NET_PF_PROTO_NAME used by MODULE_ALIAS_GENL_FAMILY

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
backport/include/linux/compat-3.5.h

index 57b06b04f975e5f9d31dd60e546894c1b2e152fc..7e9e65ac21ebe269e1e33cc785a4029ba42ac834 100644 (file)
@@ -297,6 +297,31 @@ do {                                                               \
 #define ktime_get_monotonic_offset LINUX_BACKPORT(ktime_get_monotonic_offset)
 extern ktime_t ktime_get_monotonic_offset(void);
 
+/* This backports:
+ *
+ * commit 2033e9bf06f07e049bbc77e9452856df846714cc
+ * Author: Neil Horman <nhorman@tuxdriver.com>
+ * Date:   Tue May 29 09:30:40 2012 +0000
+ *
+ *     net: add MODULE_ALIAS_NET_PF_PROTO_NAME
+ */
+
+#define MODULE_ALIAS_NET_PF_PROTO_NAME(pf, proto, name) \
+       MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
+                    name)
+
+/* This backports:
+ *
+ * commit e9412c37082b5c932e83364aaed0c38c2ce33acb
+ * Author: Neil Horman <nhorman@tuxdriver.com>
+ * Date:   Tue May 29 09:30:41 2012 +0000
+ *
+ *     genetlink: Build a generic netlink family module alias
+ */
+
+#define MODULE_ALIAS_GENL_FAMILY(family)\
+ MODULE_ALIAS_NET_PF_PROTO_NAME(PF_NETLINK, NETLINK_GENERIC, "-family-" family)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
 
 #endif /* LINUX_3_5_COMPAT_H */