linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] compat: backport netdev_refcnt_read.
@ 2011-03-31 16:21 Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 2/4] compat: add support for kernel 2.6.39 Hauke Mehrtens
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-03-31 16:21 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

Backport of upstream commit:
	29b4433d991c88d86ca48a4c1cc33c671475be4b
	net: percpu net_device refcount

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

diff --git a/include/linux/compat-2.6.37.h b/include/linux/compat-2.6.37.h
index e993f75..cee23a8 100644
--- a/include/linux/compat-2.6.37.h
+++ b/include/linux/compat-2.6.37.h
@@ -108,6 +108,8 @@ extern void compat_led_brightness_set(struct led_classdev *led_cdev,
 
 #define alloc_ordered_workqueue(name, flags) create_singlethread_workqueue(name)
 
+#define netdev_refcnt_read(a) atomic_read(&a->refcnt)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) */
 
 #endif /* LINUX_26_37_COMPAT_H */
-- 
1.7.1


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

* [PATCH 2/4] compat: add support for kernel 2.6.39
  2011-03-31 16:21 [PATCH 1/4] compat: backport netdev_refcnt_read Hauke Mehrtens
@ 2011-03-31 16:21 ` Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 3/4] compat: fix build for kernel < 2.6.29 Hauke Mehrtens
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-03-31 16:21 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.39.h |   17 -----------------
 include/linux/compat-2.6.40.h |   27 +++++++++++++++++++++++++++
 include/linux/compat-2.6.h    |    1 +
 3 files changed, 28 insertions(+), 17 deletions(-)
 create mode 100644 include/linux/compat-2.6.40.h

diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h
index bf4442b..2c62d90 100644
--- a/include/linux/compat-2.6.39.h
+++ b/include/linux/compat-2.6.39.h
@@ -8,23 +8,6 @@
 #include <linux/tty.h>
 #include <linux/irq.h>
 
-/*
- * This is not part of The 2.6.37 kernel yet but we
- * we use it to optimize the backport code we
- * need to implement. Instead of using ifdefs
- * to check what version of the check we use
- * we just replace all checks on current code
- * with this. I'll submit this upstream too, that
- * way all we'd have to do is to implement this
- * for older kernels, then we would not have to
- * edit the upstrema code for backport efforts.
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-#define br_port_exists(dev)	(dev->priv_flags & IFF_BRIDGE_PORT)
-#else
-#define br_port_exists(dev)	(dev->br_port)
-#endif
-
 #define tiocmget(tty) tiocmget(tty, NULL)
 #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear)
 
diff --git a/include/linux/compat-2.6.40.h b/include/linux/compat-2.6.40.h
new file mode 100644
index 0000000..42f9fee
--- /dev/null
+++ b/include/linux/compat-2.6.40.h
@@ -0,0 +1,27 @@
+#ifndef LINUX_26_40_COMPAT_H
+#define LINUX_26_40_COMPAT_H
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
+
+/*
+ * This is not part of The 2.6.37 kernel yet but we
+ * we use it to optimize the backport code we
+ * need to implement. Instead of using ifdefs
+ * to check what version of the check we use
+ * we just replace all checks on current code
+ * with this. I'll submit this upstream too, that
+ * way all we'd have to do is to implement this
+ * for older kernels, then we would not have to
+ * edit the upstrema code for backport efforts.
+ */
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#define br_port_exists(dev)	(dev->priv_flags & IFF_BRIDGE_PORT)
+#else
+#define br_port_exists(dev)	(dev->br_port)
+#endif
+
+#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40)) */
+
+#endif /* LINUX_26_40_COMPAT_H */
diff --git a/include/linux/compat-2.6.h b/include/linux/compat-2.6.h
index 478f833..8e45fc0 100644
--- a/include/linux/compat-2.6.h
+++ b/include/linux/compat-2.6.h
@@ -32,5 +32,6 @@
 #include <linux/compat-2.6.37.h>
 #include <linux/compat-2.6.38.h>
 #include <linux/compat-2.6.39.h>
+#include <linux/compat-2.6.40.h>
 
 #endif /* LINUX_26_COMPAT_H */
-- 
1.7.1


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

* [PATCH 3/4] compat: fix build for kernel < 2.6.29
  2011-03-31 16:21 [PATCH 1/4] compat: backport netdev_refcnt_read Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 2/4] compat: add support for kernel 2.6.39 Hauke Mehrtens
@ 2011-03-31 16:21 ` Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 4/4] compat: semaphore.h mpoved from asm/ to linux/ Hauke Mehrtens
  2011-03-31 19:17 ` [PATCH 1/4] compat: backport netdev_refcnt_read Luis R. Rodriguez
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-03-31 16:21 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens, Thomas Gleixner

get_irq_desc_chip(), get_irq_desc_data(), get_irq_desc_chip_data() and
get_irq_desc_msi() are not available in kernel < 2.6.29.

Luis please add this into the linux-2.6.39.y branch.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.39.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h
index 2c62d90..104fce0 100644
--- a/include/linux/compat-2.6.39.h
+++ b/include/linux/compat-2.6.39.h
@@ -71,6 +71,8 @@ static inline void irq_set_probe(unsigned int irq)
 {
 	set_irq_probe(irq);
 }
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
 static inline struct irq_chip *irq_desc_get_chip(struct irq_desc *desc)
 {
 	return get_irq_desc_chip(desc);
@@ -89,6 +91,7 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct irq_desc *desc)
 {
 	return get_irq_desc_msi(desc);
 }
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) */
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */
 
-- 
1.7.1


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

* [PATCH 4/4] compat: semaphore.h mpoved from asm/ to linux/
  2011-03-31 16:21 [PATCH 1/4] compat: backport netdev_refcnt_read Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 2/4] compat: add support for kernel 2.6.39 Hauke Mehrtens
  2011-03-31 16:21 ` [PATCH 3/4] compat: fix build for kernel < 2.6.29 Hauke Mehrtens
@ 2011-03-31 16:21 ` Hauke Mehrtens
  2011-03-31 19:17 ` [PATCH 1/4] compat: backport netdev_refcnt_read Luis R. Rodriguez
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2011-03-31 16:21 UTC (permalink / raw)
  To: mcgrof, lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

In kernel <= 2.6.25 linux/semaphore.h does not exist.

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

diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h
new file mode 100644
index 0000000..78af4db
--- /dev/null
+++ b/include/linux/semaphore.h
@@ -0,0 +1,12 @@
+#ifndef _COMPAT_LINUX_SEMAPHORE_H
+#define _COMPAT_LINUX_SEMAPHORE_H 1
+
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
+#include_next <linux/semaphore.h>
+#else
+#include <asm/semaphore.h>
+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) */
+
+#endif	/* _COMPAT_LINUX_SEMAPHORE_H */
-- 
1.7.1


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

* Re: [PATCH 1/4] compat: backport netdev_refcnt_read.
  2011-03-31 16:21 [PATCH 1/4] compat: backport netdev_refcnt_read Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2011-03-31 16:21 ` [PATCH 4/4] compat: semaphore.h mpoved from asm/ to linux/ Hauke Mehrtens
@ 2011-03-31 19:17 ` Luis R. Rodriguez
  3 siblings, 0 replies; 5+ messages in thread
From: Luis R. Rodriguez @ 2011-03-31 19:17 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: mcgrof@gmail.com, Luis Rodriguez, linux-wireless@vger.kernel.org

On Thu, Mar 31, 2011 at 09:21:32AM -0700, Hauke Mehrtens wrote:
> Backport of upstream commit:
> 	29b4433d991c88d86ca48a4c1cc33c671475be4b
> 	net: percpu net_device refcount
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---

Great, thanks, applied and pushed!

  Luis

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

end of thread, other threads:[~2011-03-31 19:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-31 16:21 [PATCH 1/4] compat: backport netdev_refcnt_read Hauke Mehrtens
2011-03-31 16:21 ` [PATCH 2/4] compat: add support for kernel 2.6.39 Hauke Mehrtens
2011-03-31 16:21 ` [PATCH 3/4] compat: fix build for kernel < 2.6.29 Hauke Mehrtens
2011-03-31 16:21 ` [PATCH 4/4] compat: semaphore.h mpoved from asm/ to linux/ Hauke Mehrtens
2011-03-31 19:17 ` [PATCH 1/4] compat: backport netdev_refcnt_read 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).