linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27
@ 2009-10-02  1:23 Larry Finger
  2009-10-02 20:48 ` Luis R. Rodriguez
  2009-10-11 19:00 ` Hauke Mehrtens
  0 siblings, 2 replies; 4+ messages in thread
From: Larry Finger @ 2009-10-02  1:23 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless

When building the bleeding-edge compat-wireless for kernel 2.6.27,
several compilation errors were detected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Luis,

I checked these patches on 2.6.27 and 2.6.31, but not for the intermediate
releases.

Larry
---

Index: compat-wireless-2009-09-05/include/net/compat-2.6.28.h
===================================================================
--- compat-wireless-2009-09-05.orig/include/net/compat-2.6.28.h
+++ compat-wireless-2009-09-05/include/net/compat-2.6.28.h
@@ -149,6 +149,7 @@ static inline void skb_queue_splice_tail
 struct module;
 struct tracepoint;
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
 struct tracepoint {
 	const char *name;		/* Tracepoint name */
 	int state;			/* State. */
@@ -159,6 +160,7 @@ struct tracepoint {
 					 * align these on the structure size.
 					 * Keep in sync with vmlinux.lds.h.
 					 */
+#endif
 
 #ifndef DECLARE_TRACE
 
@@ -179,13 +181,17 @@ 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
 
Index: compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
===================================================================
--- compat-wireless-2009-09-05.orig/net/wireless/compat-2.6.28.c
+++ compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
@@ -260,6 +260,7 @@ static unsigned long round_jiffies_commo
 	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
@@ -274,5 +275,6 @@ unsigned long round_jiffies_up(unsigned
 	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) */
Index: compat-wireless-2009-09-05/net/wireless/scan.c
===================================================================
--- compat-wireless-2009-09-05.orig/net/wireless/scan.c
+++ compat-wireless-2009-09-05/net/wireless/scan.c
@@ -499,8 +499,10 @@ cfg80211_inform_bss(struct wiphy *wiphy,
 
 	kref_init(&res->ref);
 
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
 	/* cfg80211_bss_update() eats up res - we ensure we free it there */
 	kmemleak_ignore(res);
+#endif
 
 	res = cfg80211_bss_update(wiphy_to_dev(wiphy), res, 0);
 	if (!res)

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

* Re: [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27
  2009-10-02  1:23 [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27 Larry Finger
@ 2009-10-02 20:48 ` Luis R. Rodriguez
  2009-10-11 19:00 ` Hauke Mehrtens
  1 sibling, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-10-02 20:48 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

On Thu, Oct 1, 2009 at 6:23 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:

> I checked these patches on 2.6.27 and 2.6.31, but not for the intermediate
> releases.

That works for me thanks, applied with some minor modifications.

> Index: compat-wireless-2009-09-05/include/net/compat-2.6.28.h
> ===================================================================
> --- compat-wireless-2009-09-05.orig/include/net/compat-2.6.28.h
> +++ compat-wireless-2009-09-05/include/net/compat-2.6.28.h


> Index: compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
> ===================================================================
> --- compat-wireless-2009-09-05.orig/net/wireless/compat-2.6.28.c
> +++ compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c

Just a heads up, I don't keep these file at include/net or
net/wireless on my git tree, instead I stash them into compat/. The
./scripts/admin-update.sh then is used to cp then. I did this to make
it clear that the compat stuff comes from outside.

> Index: compat-wireless-2009-09-05/net/wireless/scan.c
> ===================================================================
> --- compat-wireless-2009-09-05.orig/net/wireless/scan.c
> +++ compat-wireless-2009-09-05/net/wireless/scan.c
> @@ -499,8 +499,10 @@ cfg80211_inform_bss(struct wiphy *wiphy,
>
>        kref_init(&res->ref);
>
> +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
>        /* cfg80211_bss_update() eats up res - we ensure we free it there */
>        kmemleak_ignore(res);
> +#endif

And this hunk should no longer be present on bleeding edge.

Thanks!

  Luis

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

* Re: [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27
  2009-10-02  1:23 [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27 Larry Finger
  2009-10-02 20:48 ` Luis R. Rodriguez
@ 2009-10-11 19:00 ` Hauke Mehrtens
  2009-10-11 21:31   ` Larry Finger
  1 sibling, 1 reply; 4+ messages in thread
From: Hauke Mehrtens @ 2009-10-11 19:00 UTC (permalink / raw)
  To: Larry Finger; +Cc: lrodriguez, linux-wireless

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

Larry Finger wrote:
> When building the bleeding-edge compat-wireless for kernel 2.6.27,
> several compilation errors were detected.
> 
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> 
> Luis,
> 
> I checked these patches on 2.6.27 and 2.6.31, but not for the intermediate
> releases.
> 
> Larry
> ---
> 
> Index: compat-wireless-2009-09-05/include/net/compat-2.6.28.h
> ===================================================================
> --- compat-wireless-2009-09-05.orig/include/net/compat-2.6.28.h
> +++ compat-wireless-2009-09-05/include/net/compat-2.6.28.h
> @@ -149,6 +149,7 @@ static inline void skb_queue_splice_tail
>  struct module;
>  struct tracepoint;
>  
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
>  struct tracepoint {
>  	const char *name;		/* Tracepoint name */
>  	int state;			/* State. */
> @@ -159,6 +160,7 @@ struct tracepoint {
>  					 * align these on the structure size.
>  					 * Keep in sync with vmlinux.lds.h.
>  					 */
> +#endif
>  
>  #ifndef DECLARE_TRACE
>  
> @@ -179,13 +181,17 @@ 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
>  

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

> Index: compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
> ===================================================================
> --- compat-wireless-2009-09-05.orig/net/wireless/compat-2.6.28.c
> +++ compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
> @@ -260,6 +260,7 @@ static unsigned long round_jiffies_commo
>  	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
> @@ -274,5 +275,6 @@ unsigned long round_jiffies_up(unsigned
>  	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) */

The mainline kernel 2.6.27 does not contain round_jiffies_up. Are you
using Suse? Suse adds some extra extensions into the kernel, we need an
other way to deactivate the round_jiffies_up export. With this patch
this symbol is missing while compiling against mainline kernel <=
2.6.27. An other user reported a problem with the Suse kernel in:
http://marc.info/?l=linux-wireless&m=125393384728475

> Index: compat-wireless-2009-09-05/net/wireless/scan.c
> ===================================================================
> --- compat-wireless-2009-09-05.orig/net/wireless/scan.c
> +++ compat-wireless-2009-09-05/net/wireless/scan.c
> @@ -499,8 +499,10 @@ cfg80211_inform_bss(struct wiphy *wiphy,
>  
>  	kref_init(&res->ref);
>  
> +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
>  	/* cfg80211_bss_update() eats up res - we ensure we free it there */
>  	kmemleak_ignore(res);
> +#endif
>  
>  	res = cfg80211_bss_update(wiphy_to_dev(wiphy), res, 0);
>  	if (!res)

Hauke


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

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

* Re: [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27
  2009-10-11 19:00 ` Hauke Mehrtens
@ 2009-10-11 21:31   ` Larry Finger
  0 siblings, 0 replies; 4+ messages in thread
From: Larry Finger @ 2009-10-11 21:31 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: lrodriguez, linux-wireless

On 10/11/2009 02:00 PM, Hauke Mehrtens wrote:
> Larry Finger wrote:
>> When building the bleeding-edge compat-wireless for kernel 2.6.27,
>> several compilation errors were detected.
>>
>> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
>> ---
>>
>> Luis,
>>
>> I checked these patches on 2.6.27 and 2.6.31, but not for the intermediate
>> releases.
>>
>> Larry
>> ---
>>
>> Index: compat-wireless-2009-09-05/include/net/compat-2.6.28.h
>> ===================================================================
>> --- compat-wireless-2009-09-05.orig/include/net/compat-2.6.28.h
>> +++ compat-wireless-2009-09-05/include/net/compat-2.6.28.h
>> @@ -149,6 +149,7 @@ static inline void skb_queue_splice_tail
>>  struct module;
>>  struct tracepoint;
>>  
>> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
>>  struct tracepoint {
>>  	const char *name;		/* Tracepoint name */
>>  	int state;			/* State. */
>> @@ -159,6 +160,7 @@ struct tracepoint {
>>  					 * align these on the structure size.
>>  					 * Keep in sync with vmlinux.lds.h.
>>  					 */
>> +#endif
>>  
>>  #ifndef DECLARE_TRACE
>>  
>> @@ -179,13 +181,17 @@ 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
>>  
> 
> 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

Well... I was using the openSUSE 2.6.27 kernel, and it broke without
this statement, as did the compilation of the user on the o-penSUSE
forums!

>> Index: compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
>> ===================================================================
>> --- compat-wireless-2009-09-05.orig/net/wireless/compat-2.6.28.c
>> +++ compat-wireless-2009-09-05/net/wireless/compat-2.6.28.c
>> @@ -260,6 +260,7 @@ static unsigned long round_jiffies_commo
>>  	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
>> @@ -274,5 +275,6 @@ unsigned long round_jiffies_up(unsigned
>>  	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) */
> 
> The mainline kernel 2.6.27 does not contain round_jiffies_up. Are you
> using Suse? Suse adds some extra extensions into the kernel, we need an
> other way to deactivate the round_jiffies_up export. With this patch
> this symbol is missing while compiling against mainline kernel <=
> 2.6.27. An other user reported a problem with the Suse kernel in:
> http://marc.info/?l=linux-wireless&m=125393384728475

Yes, the openSUSE patched kernel sources for 2.6.27.

Larry

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-02  1:23 [PATCH] compat-wireless: Fix the bleeding-edge version to build on 2.6.27 Larry Finger
2009-10-02 20:48 ` Luis R. Rodriguez
2009-10-11 19:00 ` Hauke Mehrtens
2009-10-11 21:31   ` Larry Finger

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