This is a fix to a regression introduced in r27572.

Here's a fix, but...  my kernel doesn't have CONFIG_GENERIC_ATOMIC64 set... yet 
compat-wireless is still trying to compile and link it.  Why is that?
Index: package/mac80211/patches/022-atomic64_backport.patch
===================================================================
--- package/mac80211/patches/022-atomic64_backport.patch        (revision 27601)
+++ package/mac80211/patches/022-atomic64_backport.patch        (working copy)
@@ -11,11 +11,12 @@
 +endif
 --- a/include/linux/compat-2.6.31.h
 +++ b/include/linux/compat-2.6.31.h
-@@ -199,6 +199,20 @@ void compat_synchronize_threaded_irq(str
+@@ -199,6 +199,22 @@ void compat_synchronize_threaded_irq(str
  #define list_entry_rcu(ptr, type, member) \
        container_of(rcu_dereference(ptr), type, member)
  
 +#ifndef CONFIG_64BIT
++#ifndef __i386__
 +
 +typedef struct {
 +      long long counter;
@@ -27,6 +28,7 @@
 +#define atomic64_inc_return(v)          atomic64_add_return(1LL, (v))
 +
 +#endif
++#endif
 +
 +
  #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */
@@ -34,10 +36,11 @@
  #endif /* LINUX_26_31_COMPAT_H */
 --- /dev/null
 +++ b/compat/compat_atomic.c
-@@ -0,0 +1,29 @@
+@@ -0,0 +1,31 @@
 +#include <linux/spinlock.h>
 +#include <linux/module.h>
 +
++#ifndef __i386__
 +static DEFINE_SPINLOCK(lock);
 +
 +long long atomic64_read(const atomic64_t *v)
@@ -63,6 +66,7 @@
 +    return val;
 +}
 +EXPORT_SYMBOL(atomic64_add_return);
++#endif
 +
 --- a/include/linux/compat-3.1.h
 +++ b/include/linux/compat-3.1.h
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to