All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] compat: backport skb_checksum_none_assert
@ 2010-09-11 16:19 Hauke Mehrtens
  2010-09-11 16:19 ` [PATCH 2/2] compat: backport printk_once Hauke Mehrtens
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2010-09-11 16:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

This is needed by atlx, b44, atl1c and atl1e.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.37.h |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.37.h b/include/linux/compat-2.6.37.h
index 5bd6edb..8ea0bab 100644
--- a/include/linux/compat-2.6.37.h
+++ b/include/linux/compat-2.6.37.h
@@ -5,6 +5,8 @@
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
 
+#include <linux/skbuff.h>
+
 /*
  * This is not part of The 2.6.37 kernel yet but we
  * we use it to optimize the backport code we
@@ -26,6 +28,21 @@
 
 extern struct kobj_ns_type_operations net_ns_type_operations;
 
+/**
+ * skb_checksum_none_assert - make sure skb ip_summed is CHECKSUM_NONE
+ * @skb: skb to check
+ *
+ * fresh skbs have their ip_summed set to CHECKSUM_NONE.
+ * Instead of forcing ip_summed to CHECKSUM_NONE, we can
+ * use this helper, to document places where we make this assertion.
+ */
+static inline void skb_checksum_none_assert(struct sk_buff *skb)
+{
+#ifdef DEBUG
+	BUG_ON(skb->ip_summed != CHECKSUM_NONE);
+#endif
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */
 
 #endif /* LINUX_26_37_COMPAT_H */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] compat: backport printk_once
  2010-09-11 16:19 [PATCH 1/2] compat: backport skb_checksum_none_assert Hauke Mehrtens
@ 2010-09-11 16:19 ` Hauke Mehrtens
  2010-09-13 17:59   ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2010-09-11 16:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens

This is needed by brcm80211.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.30.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.30.h b/include/linux/compat-2.6.30.h
index eface8c..28f3d54 100644
--- a/include/linux/compat-2.6.30.h
+++ b/include/linux/compat-2.6.30.h
@@ -30,6 +30,18 @@ static inline void dev_set_uevent_suppress(struct device *dev, int val)
 	dev->uevent_suppress = val;
 }
 
+/*
+ * Print a one-time message (analogous to WARN_ONCE() et al):
+ */
+#define printk_once(x...) ({			\
+	static bool __print_once;		\
+						\
+	if (!__print_once) {			\
+		__print_once = true;		\
+		printk(x);			\
+	}					\
+})
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)) */
 
 #endif /* LINUX_26_30_COMPAT_H */
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] compat: backport printk_once
  2010-09-11 16:19 ` [PATCH 2/2] compat: backport printk_once Hauke Mehrtens
@ 2010-09-13 17:59   ` Luis R. Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Luis R. Rodriguez @ 2010-09-13 17:59 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: Luis Rodriguez, linux-wireless, mcgrof

On Sat, Sep 11, 2010 at 09:19:59AM -0700, Hauke Mehrtens wrote:
> This is needed by brcm80211.

Applied both, thanks!

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-13 17:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11 16:19 [PATCH 1/2] compat: backport skb_checksum_none_assert Hauke Mehrtens
2010-09-11 16:19 ` [PATCH 2/2] compat: backport printk_once Hauke Mehrtens
2010-09-13 17:59   ` Luis R. Rodriguez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.