All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes
@ 2009-10-12 21:19 Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
                   ` (10 more replies)
  0 siblings, 11 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

This patch series is for compat-2.6 and compat-stable-2.6.32. I have
compiled compat-wireless against mainline kernel 2.6.25 to 2.6.32. This
was all done with Ubuntu 9.04. compat-wireless should still compile with
openSuse, but I have not tried it.

The compat-stable fixes are addressing some compile problems with older
kernel versions. I have not tested all supported kernels.

The last stable kernel was added later so the number does not match.

Hauke Mehrtens (10):
  [compat-2.6 and compat-stable] Export round_jiffies_up again.
  [compat-2.6 and compat-stable] Remove unused code
  [compat-2.6] Move trace headers
  [compat-2.6] Fix compile bug with kernel 2.6.32
  [compat-2.6] Remove temporary fix
  [compat-2.6] Fix build with kernel < 2.6.27
  [compat-2.6] b44 fix
  [compat-2.6] refresh patches
  [compat-2.6] Add skb_add_rx_frag to backport.
  [compat-stable] fix build with recent mainline kernel

 compat/compat-2.6.27.h                             |   20 +++++
 compat/compat-2.6.28.c                             |   12 +++-
 compat/compat-2.6.28.h                             |   32 ++------
 compat/patches/01-netdev.patch                     |   77 ++++++--------------
 compat/patches/06-header-changes.patch             |   19 -----
 compat/patches/08-rename-iwl4965-config.patch      |    2 +-
 compat/patches/09-threaded-irq.patch               |    4 +-
 .../patches/10-add-wext-handlers-to-netdev.patch   |    2 +-
 compat/patches/12-iw_handler-changes.patch         |    7 ++-
 compat/patches/13-trace.patch                      |   35 ++++++++-
 scripts/admin-update.sh                            |    2 +-
 11 files changed, 101 insertions(+), 111 deletions(-)


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

* [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again.
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-13 19:39   ` Luis R. Rodriguez
  2009-10-12 21:19 ` [compat-stable] fix build with recent mainline kernel Hauke Mehrtens
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens, larry.finger

The 2.6.27 mainline kernel does not export round_jiffies_up. It looks
like the openSuse kernel 2.6.27 does export this symbol. Rename the
compat symbol to not conflict with the openSuse kernel.

CC: larry.finger@gmail.com
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat-2.6.28.c |    2 --
 compat/compat-2.6.28.h |    5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/compat/compat-2.6.28.c b/compat/compat-2.6.28.c
index 613b009..33871a2 100644
--- a/compat/compat-2.6.28.c
+++ b/compat/compat-2.6.28.c
@@ -260,7 +260,6 @@ static unsigned long round_jiffies_common(unsigned long j, int cpu,
 	return j;
 }
 
-#if 0
 /**
  * round_jiffies_up - function to round jiffies up to a full second
  * @j: the time in (absolute) jiffies that should be rounded
@@ -275,6 +274,5 @@ unsigned long round_jiffies_up(unsigned long j)
 	return round_jiffies_common(j, raw_smp_processor_id(), true);
 }
 EXPORT_SYMBOL_GPL(round_jiffies_up);
-#endif
 
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) */
diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
index 4e5a2ef..90d080c 100644
--- a/compat/compat-2.6.28.h
+++ b/compat/compat-2.6.28.h
@@ -195,6 +195,11 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin,
 
 #endif
 
+/* openSuse includes round_jiffies_up in it's kernel 2.6.27.
+ * This is needed to prevent conflicts with the openSuse definition.
+ */
+#define round_jiffies_up backport_round_jiffies_up
+
 unsigned long round_jiffies_up(unsigned long j);
 
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */
-- 
1.6.2.1


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

* [compat-stable] fix build with recent mainline kernel
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code Hauke Mehrtens
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

DIV_ROUND_CLOSEST is needed by the b44 driver
refresh patch for rfkill

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat-2.6.29.h         |    7 +++++++
 compat/patches/03-rfkill.patch |   22 +++++++++++-----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/compat/compat-2.6.29.h b/compat/compat-2.6.29.h
index 8ea43cb..fc7d983 100644
--- a/compat/compat-2.6.29.h
+++ b/compat/compat-2.6.29.h
@@ -43,6 +43,13 @@ static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list,
 
 extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor);
 
+#define DIV_ROUND_CLOSEST(x, divisor)(			\
+{							\
+	typeof(divisor) __divisor = divisor;		\
+	(((x) + ((__divisor) / 2)) / (__divisor));	\
+}							\
+)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)) */
 
 #endif /*  LINUX_26_29_COMPAT_H */
diff --git a/compat/patches/03-rfkill.patch b/compat/patches/03-rfkill.patch
index dadcb9a..d7a7e7f 100644
--- a/compat/patches/03-rfkill.patch
+++ b/compat/patches/03-rfkill.patch
@@ -71,10 +71,10 @@ This would do the policing from within mac80211.
  #include <linux/mutex.h>
 -#include <linux/rfkill.h>
 +#include <linux/rfkill_backport.h>
+ #include <linux/sched.h>
  #include <linux/spinlock.h>
  #include <linux/miscdevice.h>
- #include <linux/wait.h>
-@@ -61,7 +61,7 @@
+@@ -62,7 +62,7 @@
  	const struct rfkill_ops	*ops;
  	void			*data;
  
@@ -83,7 +83,7 @@ This would do the policing from within mac80211.
  	struct led_trigger	led_trigger;
  	const char		*ledtrigname;
  #endif
-@@ -122,7 +122,7 @@
+@@ -123,7 +123,7 @@
  static bool rfkill_epo_lock_active;
  
  
@@ -92,7 +92,7 @@ This would do the policing from within mac80211.
  static void rfkill_led_trigger_event(struct rfkill *rfkill)
  {
  	struct led_trigger *trigger;
-@@ -316,7 +316,7 @@
+@@ -317,7 +317,7 @@
  	rfkill_event(rfkill);
  }
  
@@ -101,7 +101,7 @@ This would do the policing from within mac80211.
  static atomic_t rfkill_input_disabled = ATOMIC_INIT(0);
  
  /**
-@@ -776,7 +776,7 @@
+@@ -777,7 +777,7 @@
  }
  
  static struct class rfkill_class = {
@@ -110,7 +110,7 @@ This would do the policing from within mac80211.
  	.dev_release	= rfkill_release,
  	.dev_attrs	= rfkill_dev_attrs,
  	.dev_uevent	= rfkill_dev_uevent,
-@@ -922,7 +922,7 @@
+@@ -923,7 +923,7 @@
  	if (!rfkill->persistent || rfkill_epo_lock_active) {
  		schedule_work(&rfkill->sync_work);
  	} else {
@@ -119,7 +119,7 @@ This would do the policing from within mac80211.
  		bool soft_blocked = !!(rfkill->state & RFKILL_BLOCK_SW);
  
  		if (!atomic_read(&rfkill_input_disabled))
-@@ -1150,7 +1150,7 @@
+@@ -1151,7 +1151,7 @@
  	list_for_each_entry_safe(ev, tmp, &data->events, list)
  		kfree(ev);
  
@@ -128,7 +128,7 @@ This would do the policing from within mac80211.
  	if (data->input_handler)
  		if (atomic_dec_return(&rfkill_input_disabled) == 0)
  			printk(KERN_DEBUG "rfkill: input handler enabled\n");
-@@ -1161,7 +1161,7 @@
+@@ -1162,7 +1162,7 @@
  	return 0;
  }
  
@@ -137,7 +137,7 @@ This would do the policing from within mac80211.
  static long rfkill_fop_ioctl(struct file *file, unsigned int cmd,
  			     unsigned long arg)
  {
-@@ -1193,7 +1193,7 @@
+@@ -1194,7 +1194,7 @@
  	.write		= rfkill_fop_write,
  	.poll		= rfkill_fop_poll,
  	.release	= rfkill_fop_release,
@@ -146,7 +146,7 @@ This would do the policing from within mac80211.
  	.unlocked_ioctl	= rfkill_fop_ioctl,
  	.compat_ioctl	= rfkill_fop_ioctl,
  #endif
-@@ -1223,7 +1223,7 @@
+@@ -1224,7 +1224,7 @@
  		goto out;
  	}
  
@@ -155,7 +155,7 @@ This would do the policing from within mac80211.
  	error = rfkill_handler_init();
  	if (error) {
  		misc_deregister(&rfkill_miscdev);
-@@ -1239,7 +1239,7 @@
+@@ -1240,7 +1240,7 @@
  
  static void __exit rfkill_exit(void)
  {
-- 
1.6.2.1


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

* [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
  2009-10-12 21:19 ` [compat-stable] fix build with recent mainline kernel Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-13  2:32   ` Hin-Tak Leung
  2009-10-12 21:19 ` [PATCH 3/9] [compat-2.6] Move trace headers Hauke Mehrtens
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) can not be true in
compat-2.6.28.h. The definitions are not needed in compat-wireless any
more. Removing this does not break compiling with mainline kernel 2.6.25
to 2.6.32

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

diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
index 90d080c..dd223c6 100644
--- a/compat/compat-2.6.28.h
+++ b/compat/compat-2.6.28.h
@@ -146,22 +146,6 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
 	}
 } /* From include/linux/skbuff.h */
 
-struct module;
-struct tracepoint;
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-struct tracepoint {
-	const char *name;		/* Tracepoint name */
-	int state;			/* State. */
-	void **funcs;
-} __attribute__((aligned(32)));		/*
-					 * Aligned on 32 bytes because it is
-					 * globally visible and gcc happily
-					 * align these on the structure size.
-					 * Keep in sync with vmlinux.lds.h.
-					 */
-#endif
-
 #ifndef DECLARE_TRACE
 
 #define TP_PROTO(args...)	args
@@ -181,17 +165,9 @@ struct tracepoint {
 		return -ENOSYS;						\
 	}
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-#define DEFINE_TRACE(name)
-#endif
 #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
 #define EXPORT_TRACEPOINT_SYMBOL(name)
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-static inline void tracepoint_update_probe_range(struct tracepoint *begin,
-	struct tracepoint *end)
-{ }
-#endif
 
 #endif
 
-- 
1.6.2.1


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

* [PATCH 3/9] [compat-2.6] Move trace headers
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32 Hauke Mehrtens
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

Move tracepoint headers into own patch file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/patches/06-header-changes.patch |   19 -----------------
 compat/patches/13-trace.patch          |   35 +++++++++++++++++++++++++++++--
 2 files changed, 32 insertions(+), 22 deletions(-)

diff --git a/compat/patches/06-header-changes.patch b/compat/patches/06-header-changes.patch
index b2e8fd8..ee0be7f 100644
--- a/compat/patches/06-header-changes.patch
+++ b/compat/patches/06-header-changes.patch
@@ -40,25 +40,6 @@ cases.
  #include <linux/spi/spi.h>
  #include <linux/spi/wl12xx.h>
  
---- a/net/mac80211/driver-trace.h	2009-08-18 16:19:34.574352433 -0700
-+++ b/net/mac80211/driver-trace.h	2009-08-18 16:19:35.694367614 -0700
-@@ -1,7 +1,9 @@
- #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
- #define __MAC80211_DRIVER_TRACE
- 
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
- #include <linux/tracepoint.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
- #include <net/mac80211.h>
- #include "ieee80211_i.h"
- 
-@@ -669,4 +671,6 @@ TRACE_EVENT(drv_ampdu_action,
- #define TRACE_INCLUDE_PATH .
- #undef TRACE_INCLUDE_FILE
- #define TRACE_INCLUDE_FILE driver-trace
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
- #include <trace/define_trace.h>
-+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) */
 --- a/net/mac80211/key.c
 +++ b/net/mac80211/key.c
 @@ -21,6 +21,9 @@
diff --git a/compat/patches/13-trace.patch b/compat/patches/13-trace.patch
index c43e723..144cae5 100644
--- a/compat/patches/13-trace.patch
+++ b/compat/patches/13-trace.patch
@@ -4,12 +4,41 @@ in or compat headers.
 
 [1] http://lxr.linux.no/#linux+v2.6.31/include/trace/define_trace.h
 
---- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h	2009-10-08 16:21:09.000000000 -0400
-+++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h	2009-10-08 16:23:34.000000000 -0400
+--- a/drivers/net/wireless/iwlwifi/iwl-devtrace.h
++++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.h
+@@ -1,7 +1,9 @@
+ #if !defined(__IWLWIFI_DEVICE_TRACE) || defined(TRACE_HEADER_MULTI_READ)
+ #define __IWLWIFI_DEVICE_TRACE
+ 
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+ #include <linux/tracepoint.h>
++#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
+ #include "iwl-dev.h"
+ 
+ #if !defined(CONFIG_IWLWIFI_DEVICE_TRACING) || defined(__CHECKER__)
 @@ -175,4 +175,6 @@
  #define TRACE_INCLUDE_PATH .
  #undef TRACE_INCLUDE_FILE
  #define TRACE_INCLUDE_FILE iwl-devtrace
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31))
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
  #include <trace/define_trace.h>
 +#endif
+--- a/net/mac80211/driver-trace.h	2009-08-18 16:19:34.574352433 -0700
++++ b/net/mac80211/driver-trace.h	2009-08-18 16:19:35.694367614 -0700
+@@ -1,7 +1,9 @@
+ #if !defined(__MAC80211_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
+ #define __MAC80211_DRIVER_TRACE
+ 
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+ #include <linux/tracepoint.h>
++#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
+ #include <net/mac80211.h>
+ #include "ieee80211_i.h"
+ 
+@@ -669,4 +671,6 @@ TRACE_EVENT(drv_ampdu_action,
+ #define TRACE_INCLUDE_PATH .
+ #undef TRACE_INCLUDE_FILE
+ #define TRACE_INCLUDE_FILE driver-trace
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
+ #include <trace/define_trace.h>
++#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30)) */
-- 
1.6.2.1


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

* [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (3 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 3/9] [compat-2.6] Move trace headers Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 5/9] [compat-2.6] Remove temporary fix Hauke Mehrtens
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/patches/12-iw_handler-changes.patch |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/compat/patches/12-iw_handler-changes.patch b/compat/patches/12-iw_handler-changes.patch
index 50c9b1a..7a700b1 100644
--- a/compat/patches/12-iw_handler-changes.patch
+++ b/compat/patches/12-iw_handler-changes.patch
@@ -1,11 +1,14 @@
 --- a/drivers/net/wireless/ipw2x00/ipw2100.c	2009-10-08 11:01:52.000000000 -0400
 +++ b/drivers/net/wireless/ipw2x00/ipw2100.c	2009-10-08 11:01:43.000000000 -0400
-@@ -6057,7 +6057,7 @@
+@@ -6057,7 +6057,11 @@
  
  	dev->ethtool_ops = &ipw2100_ethtool_ops;
  	dev->wireless_handlers = &ipw2100_wx_handler_def;
--	priv->wireless_data.libipw = priv->ieee;
++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+ 	priv->wireless_data.libipw = priv->ieee;
++#else
 +	priv->wireless_data.ieee80211 = (struct ieee80211_device *) priv->ieee;
++#endif
  	dev->wireless_data = &priv->wireless_data;
  	dev->watchdog_timeo = 3 * HZ;
  	dev->irq = 0;
-- 
1.6.2.1


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

* [PATCH 5/9] [compat-2.6] Remove temporary fix
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (4 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32 Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27 Hauke Mehrtens
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

Remove temporary fix from 6dae19ce42f4f6424a37c25f9ec393c1b4bc5c32
it is now in John's tree

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/patches/01-netdev.patch |   35 -----------------------------------
 1 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch
index a619a01..6ec1827 100644
--- a/compat/patches/01-netdev.patch
+++ b/compat/patches/01-netdev.patch
@@ -534,38 +534,3 @@ without creating a headache on maintenance of the pathes.
  	dev->destructor = free_netdev;
  	ether_setup(dev);
  	dev->tx_queue_len = 0;
-
-
-Remove this after John picks this up:
-
-From 8fe3f6159c61a7c88a2bd160e8281d62e3978bed Mon Sep 17 00:00:00 2001
-From: Luis R. Rodriguez <lrodriguez@atheros.com>
-Date: Thu, 8 Oct 2009 16:43:57 -0400
-Subject: [PATCH] libertas: remove double assignment of dev->netdev_ops
-
-This came in through the patch titled:
-    libertas: first stab at cfg80211 support
-
-I only noticed it because it breaks compat-wireless :)
-
-Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
-Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
----
- drivers/net/wireless/libertas/main.c |    1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
-
-diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
-index e6da1df..87bfd17 100644
---- a/drivers/net/wireless/libertas/main.c
-+++ b/drivers/net/wireless/libertas/main.c
-@@ -1276,7 +1276,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
- 		goto err_adapter;
- 	}
- 
--	dev->netdev_ops = &lbs_netdev_ops;
- 	dev->ieee80211_ptr = wdev;
- 	dev->ml_priv = priv;
- 	SET_NETDEV_DEV(dev, dmdev);
--- 
-1.6.0.4
-
-- 
1.6.2.1


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

* [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (5 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 5/9] [compat-2.6] Remove temporary fix Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-13 19:56   ` Luis R. Rodriguez
  2009-10-12 21:19 ` [PATCH 7/9] [compat-2.6] b44 fix Hauke Mehrtens
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

iw_handler.h have changed in kernel 2.6.27.
For older kernel we need some extra backport code.

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

diff --git a/compat/compat-2.6.27.h b/compat/compat-2.6.27.h
index 2543482..8cc6c22 100644
--- a/compat/compat-2.6.27.h
+++ b/compat/compat-2.6.27.h
@@ -163,6 +163,26 @@ static inline void list_splice_tail_init(struct list_head *list,
 extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
 extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
 
+/** Include iw_handler.h before we redefine some methods **/
+#include <net/iw_handler.h>
+
+#define iwe_stream_add_value(info, event, value, ends, iwe, event_len) iwe_stream_add_value(event, value, ends, iwe, event_len)
+#define iwe_stream_add_point(info, stream, ends, iwe, extra) iwe_stream_add_point(stream, ends, iwe, extra)
+#define iwe_stream_add_event(info, stream, ends, iwe, event_len) iwe_stream_add_event(stream, ends, iwe, event_len)
+
+/* Flags available in struct iw_request_info */
+#define IW_REQUEST_FLAG_COMPAT	0x0001	/* Compat ioctl call */
+
+static inline int iwe_stream_lcp_len(struct iw_request_info *info)
+{
+#ifdef CONFIG_COMPAT
+	if (info->flags & IW_REQUEST_FLAG_COMPAT)
+		return IW_EV_COMPAT_LCP_LEN;
+#endif
+	return IW_EV_LCP_LEN;
+}
+/** source: include/net/iw_handler.h **/
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
 
 #endif /* LINUX_26_27_COMPAT_H */
-- 
1.6.2.1


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

* [PATCH 7/9] [compat-2.6] b44 fix
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (6 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27 Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 8/9] [compat-2.6] refresh patches Hauke Mehrtens
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

encapsulate $ in bash script

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 scripts/admin-update.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 84f58a4..f85dacf 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -149,7 +149,7 @@ done
 # b44 is dependent on ssb, so its has to be rebuilt as well.
 DIR="drivers/net"
 cp $GIT_TREE/$DIR/b44.[ch] $DIR
-echo "obj-$(CONFIG_B44) += b44.o" > $DIR/Makefile
+echo "obj-\$(CONFIG_B44) += b44.o" > $DIR/Makefile
 
 # Misc
 mkdir -p drivers/misc/eeprom/
-- 
1.6.2.1


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

* [PATCH 8/9] [compat-2.6] refresh patches
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (7 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 7/9] [compat-2.6] b44 fix Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-12 21:19 ` [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport Hauke Mehrtens
  2009-10-13 20:11 ` [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Luis R. Rodriguez
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/patches/01-netdev.patch                     |   42 ++++++++++----------
 compat/patches/08-rename-iwl4965-config.patch      |    2 +-
 compat/patches/09-threaded-irq.patch               |    4 +-
 .../patches/10-add-wext-handlers-to-netdev.patch   |    2 +-
 4 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/compat/patches/01-netdev.patch b/compat/patches/01-netdev.patch
index 6ec1827..dd2e33d 100644
--- a/compat/patches/01-netdev.patch
+++ b/compat/patches/01-netdev.patch
@@ -102,7 +102,7 @@ without creating a headache on maintenance of the pathes.
  	retval = rndis_set_oid(usbdev, OID_GEN_CURRENT_PACKET_FILTER, &tmp,
 --- a/net/mac80211/iface.c	2009-09-02 14:09:58.557123328 -0700
 +++ b/net/mac80211/iface.c	2009-09-02 14:10:02.137093336 -0700
-@@ -642,6 +642,7 @@
+@@ -644,6 +644,7 @@
  	WARN_ON(flushed);
  }
  
@@ -110,7 +110,7 @@ without creating a headache on maintenance of the pathes.
  static const struct net_device_ops ieee80211_dataif_ops = {
  	.ndo_open		= ieee80211_open,
  	.ndo_stop		= ieee80211_stop,
-@@ -661,11 +662,22 @@
+@@ -663,11 +664,22 @@
  	.ndo_change_mtu 	= ieee80211_change_mtu,
  	.ndo_set_mac_address 	= eth_mac_addr,
  };
@@ -133,7 +133,7 @@ without creating a headache on maintenance of the pathes.
  	dev->destructor = free_netdev;
  }
  
-@@ -680,7 +692,11 @@
+@@ -682,7 +694,11 @@
  
  	/* and set some type-dependent values */
  	sdata->vif.type = type;
@@ -145,7 +145,7 @@ without creating a headache on maintenance of the pathes.
  	sdata->wdev.iftype = type;
  
  	/* only monitor differs */
-@@ -703,7 +719,11 @@
+@@ -705,7 +721,11 @@
  		break;
  	case NL80211_IFTYPE_MONITOR:
  		sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
@@ -157,7 +157,7 @@ without creating a headache on maintenance of the pathes.
  		sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
  				      MONITOR_FLAG_OTHER_BSS;
  		break;
-@@ -774,6 +794,8 @@
+@@ -776,6 +796,8 @@
  		return -ENOMEM;
  	dev_net_set(ndev, wiphy_net(local->hw.wiphy));
  
@@ -166,7 +166,7 @@ without creating a headache on maintenance of the pathes.
  	ndev->needed_headroom = local->tx_headroom +
  				4*6 /* four MAC addresses */
  				+ 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
-@@ -782,6 +804,7 @@
+@@ -784,6 +806,7 @@
  				- ETH_HLEN /* ethernet hard_header_len */
  				+ IEEE80211_ENCRYPT_HEADROOM;
  	ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
@@ -174,7 +174,7 @@ without creating a headache on maintenance of the pathes.
  
  	ret = dev_alloc_name(ndev, ndev->name);
  	if (ret < 0)
-@@ -815,6 +838,10 @@
+@@ -818,6 +841,10 @@
  	if (ret)
  		goto fail;
  
@@ -335,7 +335,7 @@ without creating a headache on maintenance of the pathes.
  	priv->wireless_data.libipw = priv->ieee;
 --- a/drivers/net/wireless/ipw2x00/ipw2200.c	2009-08-20 13:47:07.311291621 -0700
 +++ b/drivers/net/wireless/ipw2x00/ipw2200.c	2009-08-20 13:47:07.783268230 -0700
-@@ -11624,6 +11624,7 @@
+@@ -11626,6 +11626,7 @@
  	return NETDEV_TX_OK;
  }
  
@@ -343,7 +343,7 @@ without creating a headache on maintenance of the pathes.
  static const struct net_device_ops ipw_prom_netdev_ops = {
  	.ndo_open 		= ipw_prom_open,
  	.ndo_stop		= ipw_prom_stop,
-@@ -11632,6 +11633,7 @@
+@@ -11634,6 +11635,7 @@
  	.ndo_set_mac_address 	= eth_mac_addr,
  	.ndo_validate_addr	= eth_validate_addr,
  };
@@ -351,7 +351,7 @@ without creating a headache on maintenance of the pathes.
  
  static int ipw_prom_alloc(struct ipw_priv *priv)
  {
-@@ -11652,7 +11654,13 @@
+@@ -11654,7 +11656,13 @@
  	memcpy(priv->prom_net_dev->dev_addr, priv->mac_addr, ETH_ALEN);
  
  	priv->prom_net_dev->type = ARPHRD_IEEE80211_RADIOTAP;
@@ -365,7 +365,7 @@ without creating a headache on maintenance of the pathes.
  
  	priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
  	SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
-@@ -11680,6 +11688,7 @@
+@@ -11682,6 +11690,7 @@
  
  #endif
  
@@ -373,7 +373,7 @@ without creating a headache on maintenance of the pathes.
  static const struct net_device_ops ipw_netdev_ops = {
  	.ndo_init		= ipw_net_init,
  	.ndo_open		= ipw_net_open,
-@@ -11690,6 +11699,7 @@
+@@ -11692,6 +11701,7 @@
  	.ndo_change_mtu		= libipw_change_mtu,
  	.ndo_validate_addr	= eth_validate_addr,
  };
@@ -381,7 +381,7 @@ without creating a headache on maintenance of the pathes.
  
  static int __devinit ipw_pci_probe(struct pci_dev *pdev,
  				   const struct pci_device_id *ent)
-@@ -11791,7 +11801,15 @@
+@@ -11793,7 +11803,15 @@
  	priv->ieee->perfect_rssi = -20;
  	priv->ieee->worst_rssi = -85;
  
@@ -399,7 +399,7 @@ without creating a headache on maintenance of the pathes.
  	net_dev->wireless_handlers = &ipw_wx_handler_def;
 --- a/drivers/net/wireless/libertas/main.c	2009-10-07 01:42:20.000000000 -0400
 +++ b/drivers/net/wireless/libertas/main.c	2009-10-07 01:42:21.000000000 -0400
-@@ -1227,6 +1227,7 @@
+@@ -1229,6 +1229,7 @@
  	lbs_deb_leave(LBS_DEB_MAIN);
  }
  
@@ -407,7 +407,7 @@ without creating a headache on maintenance of the pathes.
  static const struct net_device_ops lbs_netdev_ops = {
  	.ndo_open 		= lbs_dev_open,
  	.ndo_stop		= lbs_eth_stop,
-@@ -1237,6 +1238,7 @@
+@@ -1239,6 +1240,7 @@
  	.ndo_change_mtu		= eth_change_mtu,
  	.ndo_validate_addr	= eth_validate_addr,
  };
@@ -415,7 +415,7 @@ without creating a headache on maintenance of the pathes.
  
  /**
   * @brief This function adds the card. it will probe the
-@@ -1283,7 +1285,16 @@
+@@ -1284,7 +1286,16 @@
  	wdev->netdev = dev;
  	priv->dev = dev;
  
@@ -432,7 +432,7 @@ without creating a headache on maintenance of the pathes.
  	dev->watchdog_timeo = 5 * HZ;
  	dev->ethtool_ops = &lbs_ethtool_ops;
  #ifdef	WIRELESS_EXT
-@@ -1530,6 +1541,7 @@
+@@ -1531,6 +1542,7 @@
  EXPORT_SYMBOL_GPL(lbs_stop_card);
  
  
@@ -440,7 +440,7 @@ without creating a headache on maintenance of the pathes.
  static const struct net_device_ops mesh_netdev_ops = {
  	.ndo_open		= lbs_dev_open,
  	.ndo_stop 		= lbs_mesh_stop,
-@@ -1537,6 +1549,7 @@
+@@ -1538,6 +1550,7 @@
  	.ndo_set_mac_address	= lbs_set_mac_address,
  	.ndo_set_multicast_list = lbs_set_multicast_list,
  };
@@ -448,7 +448,7 @@ without creating a headache on maintenance of the pathes.
  
  /**
   * @brief This function adds mshX interface
-@@ -1560,7 +1573,15 @@
+@@ -1561,7 +1574,15 @@
  	mesh_dev->ml_priv = priv;
  	priv->mesh_dev = mesh_dev;
  
@@ -464,7 +464,7 @@ without creating a headache on maintenance of the pathes.
  	mesh_dev->ethtool_ops = &lbs_ethtool_ops;
  	memcpy(mesh_dev->dev_addr, priv->dev->dev_addr,
  			sizeof(priv->dev->dev_addr));
-@@ -1776,11 +1797,13 @@
+@@ -1777,11 +1798,13 @@
  	lbs_deb_leave(LBS_DEB_MAIN);
  }
  
@@ -478,7 +478,7 @@ without creating a headache on maintenance of the pathes.
  
  static int lbs_add_rtap(struct lbs_private *priv)
  {
-@@ -1801,7 +1824,13 @@
+@@ -1802,7 +1825,13 @@
  
  	memcpy(rtap_dev->dev_addr, priv->current_addr, ETH_ALEN);
  	rtap_dev->type = ARPHRD_IEEE80211_RADIOTAP;
diff --git a/compat/patches/08-rename-iwl4965-config.patch b/compat/patches/08-rename-iwl4965-config.patch
index cbb47a7..b0add39 100644
--- a/compat/patches/08-rename-iwl4965-config.patch
+++ b/compat/patches/08-rename-iwl4965-config.patch
@@ -16,7 +16,7 @@ CONFIG_IWL4965 has to be set to y, to build correctly.
  iwlagn-$(CONFIG_IWL5000) += iwl-1000.o
 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c	2009-10-06 12:57:49.000000000 -0400
 +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c	2009-10-06 12:57:50.000000000 -0400
-@@ -3244,10 +3244,10 @@
+@@ -3239,10 +3239,10 @@
  
  /* Hardware specific file defines the PCI IDs table for that hardware module */
  static struct pci_device_id iwl_hw_card_ids[] = {
diff --git a/compat/patches/09-threaded-irq.patch b/compat/patches/09-threaded-irq.patch
index 6658e2f..68689e2 100644
--- a/compat/patches/09-threaded-irq.patch
+++ b/compat/patches/09-threaded-irq.patch
@@ -52,7 +52,7 @@ thread in process context as well.
  static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
 --- a/drivers/net/wireless/b43/b43.h	2009-10-07 01:45:01.000000000 -0400
 +++ b/drivers/net/wireless/b43/b43.h	2009-10-07 01:45:02.000000000 -0400
-@@ -831,6 +831,9 @@
+@@ -747,6 +747,9 @@
  	unsigned int tx_count;
  	unsigned int rx_count;
  #endif
@@ -61,4 +61,4 @@ thread in process context as well.
 +#endif
  };
  
- static inline struct b43_wl *hw_to_b43_wl(struct ieee80211_hw *hw)
+ /*
diff --git a/compat/patches/10-add-wext-handlers-to-netdev.patch b/compat/patches/10-add-wext-handlers-to-netdev.patch
index 9172c20..ec2249c 100644
--- a/compat/patches/10-add-wext-handlers-to-netdev.patch
+++ b/compat/patches/10-add-wext-handlers-to-netdev.patch
@@ -13,7 +13,7 @@ the struct wiphy wireless handler.
 
 --- a/net/wireless/core.c	2009-10-06 13:23:34.000000000 -0400
 +++ b/net/wireless/core.c	2009-10-06 13:25:31.000000000 -0400
-@@ -671,6 +671,10 @@
+@@ -672,6 +672,10 @@
  		wdev->sme_state = CFG80211_SME_IDLE;
  		mutex_unlock(&rdev->devlist_mtx);
  #ifdef CONFIG_CFG80211_WEXT
-- 
1.6.2.1


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

* [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport.
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (8 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 8/9] [compat-2.6] refresh patches Hauke Mehrtens
@ 2009-10-12 21:19 ` Hauke Mehrtens
  2009-10-13 20:11 ` [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Luis R. Rodriguez
  10 siblings, 0 replies; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-12 21:19 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, Hauke Mehrtens

This is needed by iwl-3945.c.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 compat/compat-2.6.28.c |   10 ++++++++++
 compat/compat-2.6.28.h |    3 +++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/compat/compat-2.6.28.c b/compat/compat-2.6.28.c
index 33871a2..c379b19 100644
--- a/compat/compat-2.6.28.c
+++ b/compat/compat-2.6.28.c
@@ -275,4 +275,14 @@ unsigned long round_jiffies_up(unsigned long j)
 }
 EXPORT_SYMBOL_GPL(round_jiffies_up);
 
+void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
+		int size)
+{
+	skb_fill_page_desc(skb, i, page, off, size);
+	skb->len += size;
+	skb->data_len += size;
+	skb->truesize += size;
+}
+EXPORT_SYMBOL(skb_add_rx_frag);
+
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) */
diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
index dd223c6..f158cbe 100644
--- a/compat/compat-2.6.28.h
+++ b/compat/compat-2.6.28.h
@@ -178,6 +178,9 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
 
 unsigned long round_jiffies_up(unsigned long j);
 
+extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
+			    int off, int size);
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */
 
 #endif /* LINUX_26_28_COMPAT_H */
-- 
1.6.2.1


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

* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-12 21:19 ` [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code Hauke Mehrtens
@ 2009-10-13  2:32   ` Hin-Tak Leung
  2009-10-13 21:12     ` Hauke Mehrtens
  0 siblings, 1 reply; 20+ messages in thread
From: Hin-Tak Leung @ 2009-10-13  2:32 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless

On Mon, Oct 12, 2009 at 10:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) can not be true in
> compat-2.6.28.h. The definitions are not needed in compat-wireless any
> more. Removing this does not break compiling with mainline kernel 2.6.25
> to 2.6.32

Hmm, I am not questioning your decision for removing unused code, but
if they are genuinely unused, why were they introduced in the first
place?

As a side comment, while it is unusual (compared to the usual <
version_X), it is a possible scenario for compat-X.h to have codes
that conditions on LINUX_VERSION_CODE >= version_X - and if memory
serves the bits you are removing were added only recently; and they
looks like what they are (i.e. public kernel symbols became
private-static during 2.6.27<->2.6.28 or the other way round).

I guess I am looking for a reason why they were added in the first
place, if they serve no purpose.

>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  compat/compat-2.6.28.h |   24 ------------------------
>  1 files changed, 0 insertions(+), 24 deletions(-)
>
> diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
> index 90d080c..dd223c6 100644
> --- a/compat/compat-2.6.28.h
> +++ b/compat/compat-2.6.28.h
> @@ -146,22 +146,6 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
>        }
>  } /* From include/linux/skbuff.h */
>
> -struct module;
> -struct tracepoint;
> -
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -struct tracepoint {
> -       const char *name;               /* Tracepoint name */
> -       int state;                      /* State. */
> -       void **funcs;
> -} __attribute__((aligned(32)));                /*
> -                                        * Aligned on 32 bytes because it is
> -                                        * globally visible and gcc happily
> -                                        * align these on the structure size.
> -                                        * Keep in sync with vmlinux.lds.h.
> -                                        */
> -#endif
> -
>  #ifndef DECLARE_TRACE
>
>  #define TP_PROTO(args...)      args
> @@ -181,17 +165,9 @@ struct tracepoint {
>                return -ENOSYS;                                         \
>        }
>
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -#define DEFINE_TRACE(name)
> -#endif
>  #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
>  #define EXPORT_TRACEPOINT_SYMBOL(name)
>
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
> -static inline void tracepoint_update_probe_range(struct tracepoint *begin,
> -       struct tracepoint *end)
> -{ }
> -#endif
>
>  #endif
>
> --
> 1.6.2.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again.
  2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
@ 2009-10-13 19:39   ` Luis R. Rodriguez
  2009-10-13 20:07     ` Luis R. Rodriguez
  0 siblings, 1 reply; 20+ messages in thread
From: Luis R. Rodriguez @ 2009-10-13 19:39 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, larry.finger, Greg KH

On Mon, Oct 12, 2009 at 2:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> The 2.6.27 mainline kernel does not export round_jiffies_up. It looks
> like the openSuse kernel 2.6.27 does export this symbol. Rename the
> compat symbol to not conflict with the openSuse kernel.
>
> CC: larry.finger@gmail.com
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  compat/compat-2.6.28.c |    2 --
>  compat/compat-2.6.28.h |    5 +++++
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/compat/compat-2.6.28.c b/compat/compat-2.6.28.c
> index 613b009..33871a2 100644
> --- a/compat/compat-2.6.28.c
> +++ b/compat/compat-2.6.28.c
> @@ -260,7 +260,6 @@ static unsigned long round_jiffies_common(unsigned long j, int cpu,
>        return j;
>  }
>
> -#if 0
>  /**
>  * round_jiffies_up - function to round jiffies up to a full second
>  * @j: the time in (absolute) jiffies that should be rounded
> @@ -275,6 +274,5 @@ unsigned long round_jiffies_up(unsigned long j)
>        return round_jiffies_common(j, raw_smp_processor_id(), true);
>  }
>  EXPORT_SYMBOL_GPL(round_jiffies_up);
> -#endif

Did you then mean to rename the above to backport_round_jiffies_up then?

>  #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) */
> diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
> index 4e5a2ef..90d080c 100644
> --- a/compat/compat-2.6.28.h
> +++ b/compat/compat-2.6.28.h
> @@ -195,6 +195,11 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin,
>
>  #endif
>
> +/* openSuse includes round_jiffies_up in it's kernel 2.6.27.
> + * This is needed to prevent conflicts with the openSuse definition.
> + */
> +#define round_jiffies_up backport_round_jiffies_up
> +
>  unsigned long round_jiffies_up(unsigned long j);
>
>  #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)) */

because otherwise then we have here the define so existing
wireless-testing code maps to the backport_round_jiffies_up(), and the
declaration of round_jiffies_up() also gets preprocessed as
backport_round_jiffies_up() -- the only thing missing would be the
compat exported symbol but I saw that didn't change.

  Luis

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

* Re: [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27
  2009-10-12 21:19 ` [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27 Hauke Mehrtens
@ 2009-10-13 19:56   ` Luis R. Rodriguez
  0 siblings, 0 replies; 20+ messages in thread
From: Luis R. Rodriguez @ 2009-10-13 19:56 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless

On Mon, Oct 12, 2009 at 2:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> iw_handler.h have changed in kernel 2.6.27.
> For older kernel we need some extra backport code.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  compat/compat-2.6.27.h |   20 ++++++++++++++++++++
>  1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/compat/compat-2.6.27.h b/compat/compat-2.6.27.h
> index 2543482..8cc6c22 100644
> --- a/compat/compat-2.6.27.h
> +++ b/compat/compat-2.6.27.h
> @@ -163,6 +163,26 @@ static inline void list_splice_tail_init(struct list_head *list,
>  extern unsigned int mmc_align_data_size(struct mmc_card *, unsigned int);
>  extern unsigned int sdio_align_size(struct sdio_func *func, unsigned int sz);
>
> +/** Include iw_handler.h before we redefine some methods **/
> +#include <net/iw_handler.h>
> +
> +#define iwe_stream_add_value(info, event, value, ends, iwe, event_len) iwe_stream_add_value(event, value, ends, iwe, event_len)
> +#define iwe_stream_add_point(info, stream, ends, iwe, extra) iwe_stream_add_point(stream, ends, iwe, extra)
> +#define iwe_stream_add_event(info, stream, ends, iwe, event_len) iwe_stream_add_event(stream, ends, iwe, event_len)
> +
> +/* Flags available in struct iw_request_info */
> +#define IW_REQUEST_FLAG_COMPAT 0x0001  /* Compat ioctl call */
> +
> +static inline int iwe_stream_lcp_len(struct iw_request_info *info)
> +{
> +#ifdef CONFIG_COMPAT
> +       if (info->flags & IW_REQUEST_FLAG_COMPAT)
> +               return IW_EV_COMPAT_LCP_LEN;
> +#endif
> +       return IW_EV_LCP_LEN;
> +}
> +/** source: include/net/iw_handler.h **/
> +
>  #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
>
>  #endif /* LINUX_26_27_COMPAT_H */

I guess for older releases where we copied over the iw_handler.h we
were then sending the kernel the wrong data for these callers. We
could just try to propagate the iw_handler changes to
compat-wireless-stable. This would probably fix a few unreported
issues.

  Luis

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

* Re: [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again.
  2009-10-13 19:39   ` Luis R. Rodriguez
@ 2009-10-13 20:07     ` Luis R. Rodriguez
  0 siblings, 0 replies; 20+ messages in thread
From: Luis R. Rodriguez @ 2009-10-13 20:07 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, larry.finger, Greg KH

On Tue, Oct 13, 2009 at 12:39 PM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:

> because otherwise then we have here the define so existing
> wireless-testing code maps to the backport_round_jiffies_up(), and the
> declaration of round_jiffies_up() also gets preprocessed as
> backport_round_jiffies_up() -- the only thing missing would be the
> compat exported symbol but I saw that didn't change.

Come to think of it -- because of the define you added the
compat-2.6.28 code *will* rename the code to add the backport_ prefix
so that is why this compiles. I'll leave it like that. Thanks.

  Luis

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

* Re: [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes
  2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
                   ` (9 preceding siblings ...)
  2009-10-12 21:19 ` [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport Hauke Mehrtens
@ 2009-10-13 20:11 ` Luis R. Rodriguez
  10 siblings, 0 replies; 20+ messages in thread
From: Luis R. Rodriguez @ 2009-10-13 20:11 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless

On Mon, Oct 12, 2009 at 2:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This patch series is for compat-2.6 and compat-stable-2.6.32. I have
> compiled compat-wireless against mainline kernel 2.6.25 to 2.6.32. This
> was all done with Ubuntu 9.04. compat-wireless should still compile with
> openSuse, but I have not tried it.
>
> The compat-stable fixes are addressing some compile problems with older
> kernel versions. I have not tested all supported kernels.
>
> The last stable kernel was added later so the number does not match.

Thanks -- I've applied all these patches to bleeding edge, will apply
the stable patches to stable now. I was doubtful of propagating the
iw_handler changes to stable compat-wireless releases but your patch
clarifies we should otherwise we end up sending incorrect data.

  Luis

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

* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-13  2:32   ` Hin-Tak Leung
@ 2009-10-13 21:12     ` Hauke Mehrtens
  2009-10-14  0:12       ` Hin-Tak Leung
  0 siblings, 1 reply; 20+ messages in thread
From: Hauke Mehrtens @ 2009-10-13 21:12 UTC (permalink / raw)
  To: Hin-Tak Leung; +Cc: lrodriguez, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 3374 bytes --]

Hin-Tak Leung wrote:
> On Mon, Oct 12, 2009 at 10:19 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>> LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) can not be true in
>> compat-2.6.28.h. The definitions are not needed in compat-wireless any
>> more. Removing this does not break compiling with mainline kernel 2.6.25
>> to 2.6.32
> 
> Hmm, I am not questioning your decision for removing unused code, but
> if they are genuinely unused, why were they introduced in the first
> place?

I have added them in edcf845e4bd65d00132f02237bee3fd3daca318f but I can
not find any references to them in compat-wireless. For me it looks like
it was a mistake to introduce them. The commit comment does not say
anything about it (my bad) and I forgot why I added it.

> As a side comment, while it is unusual (compared to the usual <
> version_X), it is a possible scenario for compat-X.h to have codes
> that conditions on LINUX_VERSION_CODE >= version_X - and if memory
> serves the bits you are removing were added only recently; and they
> looks like what they are (i.e. public kernel symbols became
> private-static during 2.6.27<->2.6.28 or the other way round).

The condition #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) was
added recently because without it openSuse with kernel 2.6.27 will not
compile. OpenSuse backports the tracepoint part into their 2.6.27 kernel.

> I guess I am looking for a reason why they were added in the first
> place, if they serve no purpose.
>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>>  compat/compat-2.6.28.h |   24 ------------------------
>>  1 files changed, 0 insertions(+), 24 deletions(-)
>>
>> diff --git a/compat/compat-2.6.28.h b/compat/compat-2.6.28.h
>> index 90d080c..dd223c6 100644
>> --- a/compat/compat-2.6.28.h
>> +++ b/compat/compat-2.6.28.h
>> @@ -146,22 +146,6 @@ static inline void skb_queue_splice_tail_init(struct sk_buff_head *list,
>>        }
>>  } /* From include/linux/skbuff.h */
>>
>> -struct module;
>> -struct tracepoint;
>> -
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
>> -struct tracepoint {
>> -       const char *name;               /* Tracepoint name */
>> -       int state;                      /* State. */
>> -       void **funcs;
>> -} __attribute__((aligned(32)));                /*
>> -                                        * Aligned on 32 bytes because it is
>> -                                        * globally visible and gcc happily
>> -                                        * align these on the structure size.
>> -                                        * Keep in sync with vmlinux.lds.h.
>> -                                        */
>> -#endif
>> -
>>  #ifndef DECLARE_TRACE
>>
>>  #define TP_PROTO(args...)      args
>> @@ -181,17 +165,9 @@ struct tracepoint {
>>                return -ENOSYS;                                         \
>>        }
>>
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
>> -#define DEFINE_TRACE(name)
>> -#endif
>>  #define EXPORT_TRACEPOINT_SYMBOL_GPL(name)
>>  #define EXPORT_TRACEPOINT_SYMBOL(name)
>>
>> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
>> -static inline void tracepoint_update_probe_range(struct tracepoint *begin,
>> -       struct tracepoint *end)
>> -{ }
>> -#endif
>>
>>  #endif
>>
>> --
>> 1.6.2.1



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 898 bytes --]

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

* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-13 21:12     ` Hauke Mehrtens
@ 2009-10-14  0:12       ` Hin-Tak Leung
  2009-10-14  0:18         ` Luis R. Rodriguez
  0 siblings, 1 reply; 20+ messages in thread
From: Hin-Tak Leung @ 2009-10-14  0:12 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless

On Tue, Oct 13, 2009 at 10:12 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:

> The condition #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) was
> added recently because without it openSuse with kernel 2.6.27 will not
> compile. OpenSuse backports the tracepoint part into their 2.6.27 kernel.

I remember that thread now. It is probably wrong as a matter of policy
to incorporate patches for distro kernels with backport bits through.
- I am not saying you shouldn't be helpful and provide them - after
all, more users == better testing, and no doubt the investigation
itself throws more insights on the detailed mechanisms - but it is
just that compat-wireless probably should not try to support arbitrary
and substantial changes from a vanilla kernel. I know Suse is popular
so it is important to support Suse users, but I am wondering if
distro-specific changes should be separate or at least, clearly
documented.

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

* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-14  0:12       ` Hin-Tak Leung
@ 2009-10-14  0:18         ` Luis R. Rodriguez
  2009-10-14  4:10           ` Greg KH
  0 siblings, 1 reply; 20+ messages in thread
From: Luis R. Rodriguez @ 2009-10-14  0:18 UTC (permalink / raw)
  To: Hin-Tak Leung; +Cc: Hauke Mehrtens, linux-wireless, Greg KH

On Tue, Oct 13, 2009 at 5:12 PM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:
> On Tue, Oct 13, 2009 at 10:12 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
>> The condition #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) was
>> added recently because without it openSuse with kernel 2.6.27 will not
>> compile. OpenSuse backports the tracepoint part into their 2.6.27 kernel.
>
> I remember that thread now. It is probably wrong as a matter of policy
> to incorporate patches for distro kernels with backport bits through.
> - I am not saying you shouldn't be helpful and provide them - after
> all, more users == better testing, and no doubt the investigation
> itself throws more insights on the detailed mechanisms - but it is
> just that compat-wireless probably should not try to support arbitrary
> and substantial changes from a vanilla kernel. I know Suse is popular
> so it is important to support Suse users, but I am wondering if
> distro-specific changes should be separate or at least, clearly
> documented.

Not sure why opensuse added round_jiffies_up() to their 2.6.27
kernels, greg may know better, but since its only once change I'm
willing to live with what we did to resolve for it.

  Luis

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

* Re: [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code
  2009-10-14  0:18         ` Luis R. Rodriguez
@ 2009-10-14  4:10           ` Greg KH
  0 siblings, 0 replies; 20+ messages in thread
From: Greg KH @ 2009-10-14  4:10 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Hin-Tak Leung, Hauke Mehrtens, linux-wireless

On Tue, Oct 13, 2009 at 05:18:04PM -0700, Luis R. Rodriguez wrote:
> On Tue, Oct 13, 2009 at 5:12 PM, Hin-Tak Leung <hintak.leung@gmail.com> wrote:
> > On Tue, Oct 13, 2009 at 10:12 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> >
> >> The condition #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)) was
> >> added recently because without it openSuse with kernel 2.6.27 will not
> >> compile. OpenSuse backports the tracepoint part into their 2.6.27 kernel.
> >
> > I remember that thread now. It is probably wrong as a matter of policy
> > to incorporate patches for distro kernels with backport bits through.
> > - I am not saying you shouldn't be helpful and provide them - after
> > all, more users == better testing, and no doubt the investigation
> > itself throws more insights on the detailed mechanisms - but it is
> > just that compat-wireless probably should not try to support arbitrary
> > and substantial changes from a vanilla kernel. I know Suse is popular
> > so it is important to support Suse users, but I am wondering if
> > distro-specific changes should be separate or at least, clearly
> > documented.
> 
> Not sure why opensuse added round_jiffies_up() to their 2.6.27
> kernels, greg may know better, but since its only once change I'm
> willing to live with what we did to resolve for it.

We added that to the SLE 11 kernel as it was requred for a bunch of
block layer backports to resolve a number of issues that we needed to
do.

Hope this helps explain things,

greg k-h

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

end of thread, other threads:[~2009-10-14  4:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-12 21:19 [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 1/9] [compat-2.6 and compat-stable] Export round_jiffies_up again Hauke Mehrtens
2009-10-13 19:39   ` Luis R. Rodriguez
2009-10-13 20:07     ` Luis R. Rodriguez
2009-10-12 21:19 ` [compat-stable] fix build with recent mainline kernel Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 2/9] [compat-2.6 and compat-stable] Remove unused code Hauke Mehrtens
2009-10-13  2:32   ` Hin-Tak Leung
2009-10-13 21:12     ` Hauke Mehrtens
2009-10-14  0:12       ` Hin-Tak Leung
2009-10-14  0:18         ` Luis R. Rodriguez
2009-10-14  4:10           ` Greg KH
2009-10-12 21:19 ` [PATCH 3/9] [compat-2.6] Move trace headers Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 4/9] [compat-2.6] Fix compile bug with kernel 2.6.32 Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 5/9] [compat-2.6] Remove temporary fix Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 6/9] [compat-2.6] Fix build with kernel < 2.6.27 Hauke Mehrtens
2009-10-13 19:56   ` Luis R. Rodriguez
2009-10-12 21:19 ` [PATCH 7/9] [compat-2.6] b44 fix Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 8/9] [compat-2.6] refresh patches Hauke Mehrtens
2009-10-12 21:19 ` [PATCH 9/9] [compat-2.6] Add skb_add_rx_frag to backport Hauke Mehrtens
2009-10-13 20:11 ` [PATCH 0/10] [compat-2.6 and compat-stable] Mostly build fixes 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.