From: Johannes Berg <johannes.berg@xxxxxxxxx> I intend to use these in nl80211. Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx> --- include/linux/compat-3.5.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h index 9cffead..28a1209 100644 --- a/include/linux/compat-3.5.h +++ b/include/linux/compat-3.5.h @@ -8,6 +8,32 @@ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) +#include <net/netlink.h> + +/* + * This backports: + * commit 569a8fc38367dfafd87454f27ac646c8e6b54bca + * Author: David S. Miller <davem@xxxxxxxxxxxxx> + * Date: Thu Mar 29 23:18:53 2012 -0400 + * + * netlink: Add nla_put_be{16,32,64}() helpers. + */ + +static inline int nla_put_be16(struct sk_buff *skb, int attrtype, __be16 value) +{ + return nla_put(skb, attrtype, sizeof(__be16), &value); +} + +static inline int nla_put_be32(struct sk_buff *skb, int attrtype, __be32 value) +{ + return nla_put(skb, attrtype, sizeof(__be32), &value); +} + +static inline int nla_put_be64(struct sk_buff *skb, int attrtype, __be64 value) +{ + return nla_put(skb, attrtype, sizeof(__be64), &value); +} + /* * This backports: * -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe backports" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html