mac80211: fix compile errors on platforms with power management enabled
authorFelix Fietkau <nbd@openwrt.org>
Thu, 2 May 2013 13:28:32 +0000 (13:28 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 2 May 2013 13:28:32 +0000 (13:28 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 36520

package/mac80211/patches/050-compat_backport.patch [new file with mode: 0644]
package/mac80211/patches/100-pm_export_symbol.patch [new file with mode: 0644]

diff --git a/package/mac80211/patches/050-compat_backport.patch b/package/mac80211/patches/050-compat_backport.patch
new file mode 100644 (file)
index 0000000..7503de2
--- /dev/null
@@ -0,0 +1,35 @@
+--- 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@davemloft.net>
++ * 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:
+  *
diff --git a/package/mac80211/patches/100-pm_export_symbol.patch b/package/mac80211/patches/100-pm_export_symbol.patch
new file mode 100644 (file)
index 0000000..25fdc8c
--- /dev/null
@@ -0,0 +1,7 @@
+--- a/net/mac80211/pm.c
++++ b/net/mac80211/pm.c
+@@ -1,3 +1,4 @@
++#include <linux/export.h>
+ #include <net/mac80211.h>
+ #include <net/rtnetlink.h>