linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat: deal with backported codel
@ 2012-08-04 15:58 Johannes Berg
  2012-08-04 16:08 ` Johannes Berg
  2012-08-05 10:29 ` [PATCH v2] " Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: Johannes Berg @ 2012-08-04 15:58 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Hauke Mehrtens, linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

Some distro kernels (in particular the Debian 3.2.0-3
kernel I'm running) backport codel already, so trying
to backport it again causes issues. Protect the compat
backport with #ifdef TCA_CODEL_MAX.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/linux/compat-3.5.h |    2 ++
 include/net/codel.h        |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/compat-3.5.h b/include/linux/compat-3.5.h
index 6bb450d..7fadbf2 100644
--- a/include/linux/compat-3.5.h
+++ b/include/linux/compat-3.5.h
@@ -147,6 +147,7 @@ static inline int compat_vga_switcheroo_register_client(struct pci_dev *dev,
  *   Subject: [PATCH] codel: Controlled Delay AQM
  */
 
+#ifndef TCA_CODEL_MAX
 /* CODEL */
 
 enum {
@@ -234,6 +235,7 @@ struct tc_fq_codel_xstats {
 		struct tc_fq_codel_cl_stats class_stats;
 	};
 };
+#endif /* TCA_CODEL_MAX */
 
 
 /* Backports tty_lock: Localise the lock */
diff --git a/include/net/codel.h b/include/net/codel.h
index 128082e..ab901c5 100644
--- a/include/net/codel.h
+++ b/include/net/codel.h
@@ -1,6 +1,7 @@
 #include <linux/version.h>
+#include <linux/pkt_sched.h>
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) || defined(TCA_CODEL_MAX)
 #include_next <net/codel.h>
 #else
 
-- 
1.7.10.4




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

end of thread, other threads:[~2012-08-07 17:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-04 15:58 [PATCH] compat: deal with backported codel Johannes Berg
2012-08-04 16:08 ` Johannes Berg
2012-08-05 10:29 ` [PATCH v2] " Johannes Berg
2012-08-06 19:06   ` Luis R. Rodriguez
2012-08-06 19:53   ` Luis R. Rodriguez
2012-08-06 20:33     ` Hauke Mehrtens
2012-08-06 21:15       ` Luis R. Rodriguez
2012-08-06 21:45       ` Hauke Mehrtens
2012-08-07 17:09         ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).