X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=package%2Fmac80211%2Fpatches%2F022-atomic64_backport.patch;h=673b7c336a6b5a3777718cf8e66f51a458b4489a;hp=27e2edb711978c6d39124438a4a16b9b08135b0c;hb=7f442d0583cffab97a742d81498c37fd85b5455a;hpb=c9ce2d52d9963b1309fadcd9cb9971ebbddb5560 diff --git a/package/mac80211/patches/022-atomic64_backport.patch b/package/mac80211/patches/022-atomic64_backport.patch index 27e2edb71..673b7c336 100644 --- a/package/mac80211/patches/022-atomic64_backport.patch +++ b/package/mac80211/patches/022-atomic64_backport.patch @@ -1,8 +1,8 @@ --- a/compat/Makefile +++ b/compat/Makefile -@@ -34,3 +34,8 @@ compat-$(CONFIG_COMPAT_KERNEL_2_6_39) += - compat-2.6.39.o \ - kstrtox.o +@@ -38,3 +38,8 @@ compat-$(CONFIG_COMPAT_KERNEL_3_1) += \ + cordic.o \ + crc8.o +ifndef CONFIG_64BIT +ifndef CONFIG_GENERIC_ATOMIC64 @@ -11,9 +11,9 @@ +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 - #define list_entry_rcu(ptr, type, member) \ - container_of(rcu_dereference(ptr), type, member) +@@ -202,6 +202,20 @@ void compat_synchronize_threaded_irq(str + #define skb_walk_frags(skb, iter) \ + for (iter = skb_shinfo(skb)->frag_list; iter; iter = iter->next) +#ifndef CONFIG_64BIT + @@ -34,10 +34,12 @@ #endif /* LINUX_26_31_COMPAT_H */ --- /dev/null +++ b/compat/compat_atomic.c -@@ -0,0 +1,29 @@ +@@ -0,0 +1,33 @@ +#include +#include + ++#if !((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && (defined(CONFIG_UML) || defined(CONFIG_X86))) && !((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) && defined(CONFIG_ARM) && !defined(CONFIG_GENERIC_ATOMIC64)) ++ +static DEFINE_SPINLOCK(lock); + +long long atomic64_read(const atomic64_t *v) @@ -64,11 +66,13 @@ +} +EXPORT_SYMBOL(atomic64_add_return); + ++#endif ++ --- a/include/linux/compat-3.1.h +++ b/include/linux/compat-3.1.h -@@ -24,6 +24,18 @@ - - #define genl_dump_check_consistent(...) do {} while(0) +@@ -19,6 +19,18 @@ + .prod_id = { NULL, NULL, (v3), NULL }, \ + .prod_id_hash = { 0, 0, (vh3), 0 }, } +/* + * In many versions, several architectures do not seem to include an @@ -78,7 +82,7 @@ + */ +#include + -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && !defined(ATOMIC64_INIT) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)) && !defined(ATOMIC64_INIT) && !defined(CONFIG_X86) && !((LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) && defined(CONFIG_ARM) && !defined(CONFIG_GENERIC_ATOMIC64)) +#include +#endif +