[RFC/WIP 07/24] backports: move skb_add_rx_frag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 backport/backport-include/linux/compat-2.6.28.h |  3 ---
 backport/backport-include/linux/compat-3.4.h    |  8 --------
 backport/backport-include/linux/skbuff.h        | 16 ++++++++++++++++
 3 files changed, 16 insertions(+), 11 deletions(-)
 create mode 100644 backport/backport-include/linux/skbuff.h

diff --git a/backport/backport-include/linux/compat-2.6.28.h b/backport/backport-include/linux/compat-2.6.28.h
index 3b5f3ea..60f56f4 100644
--- a/backport/backport-include/linux/compat-2.6.28.h
+++ b/backport/backport-include/linux/compat-2.6.28.h
@@ -276,9 +276,6 @@ static inline void skb_queue_splice_tail(const struct sk_buff_head *list,
 #define round_jiffies_up LINUX_BACKPORT(round_jiffies_up)
 unsigned long round_jiffies_up(unsigned long j);
 
-extern void v2_6_28_skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
-			    int off, int size);
-
 #define wake_up_interruptible_poll(x, m)			\
 	__wake_up(x, TASK_INTERRUPTIBLE, 1, (void *) (m))
 
diff --git a/backport/backport-include/linux/compat-3.4.h b/backport/backport-include/linux/compat-3.4.h
index 45aef72..fafec0c 100644
--- a/backport/backport-include/linux/compat-3.4.h
+++ b/backport/backport-include/linux/compat-3.4.h
@@ -102,14 +102,6 @@ static inline void *kmalloc_array(size_t n, size_t size, gfp_t flags)
 extern const struct i2c_algorithm i2c_bit_algo;
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
-#define skb_add_rx_frag(skb, i, page, off, size, truesize) \
-	v2_6_28_skb_add_rx_frag(skb, i, page, off, size)
-#else
-#define skb_add_rx_frag(skb, i, page, off, size, truesize) \
-	skb_add_rx_frag(skb, i, page, off, size)
-#endif
-
 #ifdef CONFIG_X86_X32_ABI
 #define COMPAT_USE_64BIT_TIME \
 	(!!(task_pt_regs(current)->orig_ax & __X32_SYSCALL_BIT))
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
new file mode 100644
index 0000000..0c09f9b
--- /dev/null
+++ b/backport/backport-include/linux/skbuff.h
@@ -0,0 +1,16 @@
+#ifndef __BACKPORT_SKBUFF_H
+#define __BACKPORT_SKBUFF_H
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
+extern void v2_6_28_skb_add_rx_frag(struct sk_buff *skb, int i,
+				    struct page *page,
+				    int off, int size);
+
+#define skb_add_rx_frag(skb, i, page, off, size, truesize) \
+	v2_6_28_skb_add_rx_frag(skb, i, page, off, size)
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
+#define skb_add_rx_frag(skb, i, page, off, size, truesize) \
+	skb_add_rx_frag(skb, i, page, off, size)
+#endif
+
+#endif /* __BACKPORT_SKBUFF_H */
-- 
1.8.0

--
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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux