From: Thierry Escande Date: Mon, 8 Apr 2013 10:26:08 +0000 (+0200) Subject: compat: backport MODULE_ALIAS_GENL_FAMILY macro X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=762f6a4550b0445ce60a18a2d96f298af82bcdd6;p=openwrt%2Fstaging%2Fblogic.git compat: backport MODULE_ALIAS_GENL_FAMILY macro This also backports MODULE_ALIAS_NET_PF_PROTO_NAME used by MODULE_ALIAS_GENL_FAMILY Signed-off-by: Thierry Escande Signed-off-by: Johannes Berg --- diff --git a/backport/include/linux/compat-3.5.h b/backport/include/linux/compat-3.5.h index 57b06b04f975..7e9e65ac21eb 100644 --- a/backport/include/linux/compat-3.5.h +++ b/backport/include/linux/compat-3.5.h @@ -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 + * 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 + * 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 */