aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-01-31 16:13:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-01-31 16:13:23 +0000
commit7695d614df8c4877c081de737e56eee8cacddbd8 (patch)
tree380be22e789245e59d09147899e5510f24ddedd3 /package/kernel/mac80211
parent5ab4db376abfde0599d4ec8160ceaead7fec3666 (diff)
downloadupstream-7695d614df8c4877c081de737e56eee8cacddbd8.tar.gz
upstream-7695d614df8c4877c081de737e56eee8cacddbd8.tar.bz2
upstream-7695d614df8c4877c081de737e56eee8cacddbd8.zip
mac80211: backport skb_free_frag and napi_alloc_frag
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48582
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/004-backports-add-skb_free_frag.patch21
-rw-r--r--package/kernel/mac80211/patches/005-backports-add-napi_alloc_frag.patch20
2 files changed, 41 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/004-backports-add-skb_free_frag.patch b/package/kernel/mac80211/patches/004-backports-add-skb_free_frag.patch
new file mode 100644
index 0000000000..9adfd8f719
--- /dev/null
+++ b/package/kernel/mac80211/patches/004-backports-add-skb_free_frag.patch
@@ -0,0 +1,21 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 28 Jan 2016 15:16:35 +0100
+Subject: [PATCH] backports: add skb_free_frag()
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/backport-include/linux/skbuff.h
++++ b/backport-include/linux/skbuff.h
+@@ -300,4 +300,11 @@ int skb_ensure_writable(struct sk_buff *
+
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) */
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
++static inline void skb_free_frag(void *data)
++{
++ put_page(virt_to_head_page(data));
++}
++#endif
++
+ #endif /* __BACKPORT_SKBUFF_H */
diff --git a/package/kernel/mac80211/patches/005-backports-add-napi_alloc_frag.patch b/package/kernel/mac80211/patches/005-backports-add-napi_alloc_frag.patch
new file mode 100644
index 0000000000..9b672a8d14
--- /dev/null
+++ b/package/kernel/mac80211/patches/005-backports-add-napi_alloc_frag.patch
@@ -0,0 +1,20 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Thu, 28 Jan 2016 15:19:22 +0100
+Subject: [PATCH] backports: add napi_alloc_frag
+
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/backport-include/linux/netdevice.h
++++ b/backport-include/linux/netdevice.h
+@@ -232,6 +232,10 @@ static inline void backport_unregister_n
+ #define unregister_netdevice_many LINUX_BACKPORT(unregister_netdevice_many)
+ #endif
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#define napi_alloc_frag netdev_alloc_frag
++#endif
++
+ /*
+ * Complicated way of saying: We only backport netdev_rss_key stuff on kernels
+ * that either already have net_get_random_once() (>= 3.13) or where we've been