aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-08-20 17:25:33 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-08-20 17:25:33 +0000
commitf51eefd3447c32f8f905d8027fdf060254313888 (patch)
treea88f3d442af9ce00c7d6a322852d39df60e14151 /package/mac80211/patches
parente06d472f3f8c885c29da892fe382ba60cc3ae161 (diff)
downloadupstream-f51eefd3447c32f8f905d8027fdf060254313888.tar.gz
upstream-f51eefd3447c32f8f905d8027fdf060254313888.tar.bz2
upstream-f51eefd3447c32f8f905d8027fdf060254313888.zip
mac80211: reorganize compat code to make cfg80211 load without usb
SVN-Revision: 17339
Diffstat (limited to 'package/mac80211/patches')
-rw-r--r--package/mac80211/patches/011-move_ar9170_usb_compat_code.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch b/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch
new file mode 100644
index 0000000000..07daada9e9
--- /dev/null
+++ b/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch
@@ -0,0 +1,72 @@
+--- a/drivers/net/wireless/ath/ar9170/usb.c
++++ b/drivers/net/wireless/ath/ar9170/usb.c
+@@ -96,6 +96,34 @@ static struct usb_device_id ar9170_usb_i
+ };
+ MODULE_DEVICE_TABLE(usb, ar9170_usb_ids);
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
++
++#ifdef CONFIG_AR9170_USB
++#include <linux/usb.h>
++
++/**
++ * usb_unpoison_anchored_urbs - let an anchor be used successfully again
++ * @anchor: anchor the requests are bound to
++ *
++ * Reverses the effect of usb_poison_anchored_urbs
++ * the anchor can be used normally after it returns
++ */
++void usb_unpoison_anchored_urbs(struct usb_anchor *anchor)
++{
++ unsigned long flags;
++ struct urb *lazarus;
++
++ spin_lock_irqsave(&anchor->lock, flags);
++ list_for_each_entry(lazarus, &anchor->urb_list, anchor_list) {
++ usb_unpoison_urb(lazarus);
++ }
++ //anchor->poisoned = 0; /* XXX: cannot backport */
++ spin_unlock_irqrestore(&anchor->lock, flags);
++}
++EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs);
++#endif /* CONFIG_AR9170_USB */
++
++
+ static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
+ {
+ struct urb *urb;
+--- a/net/wireless/compat-2.6.29.c
++++ b/net/wireless/compat-2.6.29.c
+@@ -12,31 +12,7 @@
+
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
+
+-#ifdef CONFIG_AR9170_USB
+-#include <linux/usb.h>
+-
+-/**
+- * usb_unpoison_anchored_urbs - let an anchor be used successfully again
+- * @anchor: anchor the requests are bound to
+- *
+- * Reverses the effect of usb_poison_anchored_urbs
+- * the anchor can be used normally after it returns
+- */
+-void usb_unpoison_anchored_urbs(struct usb_anchor *anchor)
+-{
+- unsigned long flags;
+- struct urb *lazarus;
+-
+- spin_lock_irqsave(&anchor->lock, flags);
+- list_for_each_entry(lazarus, &anchor->urb_list, anchor_list) {
+- usb_unpoison_urb(lazarus);
+- }
+- //anchor->poisoned = 0; /* XXX: cannot backport */
+- spin_unlock_irqrestore(&anchor->lock, flags);
+-}
+-EXPORT_SYMBOL_GPL(usb_unpoison_anchored_urbs);
+-#endif /* CONFIG_AR9170_USB */
+-
++/* 2.6.29 compat code goes here */
+
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) */
+