summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/mac80211/Makefile7
-rw-r--r--package/mac80211/patches/001-disable_b44.patch2
-rw-r--r--package/mac80211/patches/002-disable_rfkill.patch13
-rw-r--r--package/mac80211/patches/003-disable_bt.patch13
-rw-r--r--package/mac80211/patches/005-disable_ssb_build.patch17
-rw-r--r--package/mac80211/patches/007-remove_misc_drivers.patch32
-rw-r--r--package/mac80211/patches/009-remove_mac80211_module_dependence.patch2
-rw-r--r--package/mac80211/patches/010-b43_config.patch4
-rw-r--r--package/mac80211/patches/011-move_ar9170_usb_compat_code.patch515
-rw-r--r--package/mac80211/patches/020-fix_compat_h.patch11
-rw-r--r--package/mac80211/patches/021-fix_missing_ifdefs.patch18
-rw-r--r--package/mac80211/patches/200-mac80211_ibss_fix.patch20
-rw-r--r--package/mac80211/patches/401-ath9k-dont-register-leds-on-ar9100.patch4
-rw-r--r--package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch2
-rw-r--r--package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch6
-rw-r--r--package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch2
-rw-r--r--package/mac80211/patches/510-ath9k_debugfs_chainmask.patch4
-rw-r--r--package/mac80211/patches/520-ath9k_debugfs_regaccess.patch6
-rw-r--r--package/mac80211/patches/530-disable_interrupt_mitigation.patch11
-rw-r--r--package/mac80211/patches/530-mac80211_queue_fix.patch69
-rw-r--r--package/mac80211/patches/540-ath9k_tx_fix.patch23
-rw-r--r--package/mac80211/patches/540-mac80211_work_fix.patch30
-rw-r--r--package/mac80211/patches/550-queue_stop_fix.patch380
23 files changed, 213 insertions, 978 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index d500ed9b2e..9d57673820 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
-PKG_VERSION:=2009-12-05
+PKG_VERSION:=2010-01-07
PKG_RELEASE:=8
PKG_SOURCE_URL:= \
http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/12 \
http://wireless.kernel.org/download/compat-wireless-2.6
-PKG_MD5SUM:=5b432e35626af4036ed55da75fff3fca
+PKG_MD5SUM:=f783d3d4a140a76855916b54fa18be47
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
@@ -41,9 +41,10 @@ define KernelPackage/mac80211
TITLE:=Linux 802.11 Wireless Networking Stack
DEPENDS+= +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools +iw @!LINUX_2_6_21 @!LINUX_2_6_25
FILES:= \
+ $(PKG_BUILD_DIR)/compat/compat.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
$(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
- AUTOLOAD:=$(call AutoLoad,20,cfg80211 mac80211)
+ AUTOLOAD:=$(call AutoLoad,20,compat cfg80211 mac80211)
endef
define KernelPackage/mac80211/config
diff --git a/package/mac80211/patches/001-disable_b44.patch b/package/mac80211/patches/001-disable_b44.patch
index 4a442dbecc..165e7283f4 100644
--- a/package/mac80211/patches/001-disable_b44.patch
+++ b/package/mac80211/patches/001-disable_b44.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -242,10 +242,10 @@ endif
+@@ -270,10 +270,10 @@ endif
CONFIG_P54_PCI=m
diff --git a/package/mac80211/patches/002-disable_rfkill.patch b/package/mac80211/patches/002-disable_rfkill.patch
index c935fddf35..da07a76bd6 100644
--- a/package/mac80211/patches/002-disable_rfkill.patch
+++ b/package/mac80211/patches/002-disable_rfkill.patch
@@ -1,9 +1,18 @@
--- a/config.mk
+++ b/config.mk
-@@ -421,8 +421,8 @@ endif
+@@ -16,7 +16,7 @@ include $(KLIB_BUILD)/.config
+ endif
+
+ # These both are needed by compat-wireless || compat-bluetooth so enable them
+- CONFIG_COMPAT_RFKILL=y
++# CONFIG_COMPAT_RFKILL=y
+
+ ifeq ($(CONFIG_MAC80211),y)
+ $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
+@@ -463,8 +463,8 @@ endif
# We need the backported rfkill module on kernel < 2.6.31.
# In more recent kernel versions use the in kernel rfkill module.
- ifdef CONFIG_COMPAT_WIRELESS_31
+ ifdef CONFIG_COMPAT_KERNEL_31
-CONFIG_RFKILL_BACKPORT=m
-CONFIG_RFKILL_BACKPORT_LEDS=y
-CONFIG_RFKILL_BACKPORT_INPUT=y
diff --git a/package/mac80211/patches/003-disable_bt.patch b/package/mac80211/patches/003-disable_bt.patch
new file mode 100644
index 0000000000..c8ac124787
--- /dev/null
+++ b/package/mac80211/patches/003-disable_bt.patch
@@ -0,0 +1,13 @@
+--- a/config.mk
++++ b/config.mk
+@@ -36,8 +36,8 @@ endif
+ ifeq ($(CONFIG_BT),y)
+ # we'll ignore compiling bluetooth
+ else
+-CONFIG_COMPAT_BLUETOOTH=y
+-CONFIG_COMPAT_BLUETOOTH_MODULES=m
++# CONFIG_COMPAT_BLUETOOTH=y
++# CONFIG_COMPAT_BLUETOOTH_MODULES=m
+ endif
+
+ # We will warn when you don't have MQ support or NET_SCHED enabled.
diff --git a/package/mac80211/patches/005-disable_ssb_build.patch b/package/mac80211/patches/005-disable_ssb_build.patch
index deb9487120..d3154b089f 100644
--- a/package/mac80211/patches/005-disable_ssb_build.patch
+++ b/package/mac80211/patches/005-disable_ssb_build.patch
@@ -1,10 +1,11 @@
--- a/Makefile
+++ b/Makefile
-@@ -22,7 +22,6 @@ NOSTDINC_FLAGS := -I$(M)/include/ -inclu
- obj-y := net/wireless/ net/mac80211/ net/rfkill/
- ifeq ($(ONLY_CORE),)
- obj-m += \
-- drivers/ssb/ \
- drivers/misc/eeprom/ \
- drivers/net/ \
- drivers/net/usb/ \
+@@ -28,7 +28,7 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
+ obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
+
+ obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
+-obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/ drivers/misc/eeprom/
++obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
+ endif
+
+ obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
diff --git a/package/mac80211/patches/007-remove_misc_drivers.patch b/package/mac80211/patches/007-remove_misc_drivers.patch
new file mode 100644
index 0000000000..0730e504fd
--- /dev/null
+++ b/package/mac80211/patches/007-remove_misc_drivers.patch
@@ -0,0 +1,32 @@
+--- a/config.mk
++++ b/config.mk
+@@ -303,10 +303,10 @@ CONFIG_PCI_ATMEL=m
+ CONFIG_MWL8K=m
+
+ # Ethernet drivers go here
+-CONFIG_ATL1=m
+-CONFIG_ATL2=m
+-CONFIG_ATL1E=m
+-CONFIG_ATL1C=m
++# CONFIG_ATL1=m
++# CONFIG_ATL2=m
++# CONFIG_ATL1E=m
++# CONFIG_ATL1C=m
+
+ endif
+ ## end of PCI
+@@ -345,10 +345,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
+ CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
+ CONFIG_USB_NET_COMPAT_CDCETHER=n
+ else
+-CONFIG_USB_COMPAT_USBNET=m
+-CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
+-CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
+-CONFIG_USB_NET_COMPAT_CDCETHER=m
++# CONFIG_USB_COMPAT_USBNET=m
++# CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
++# CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
++# CONFIG_USB_NET_COMPAT_CDCETHER=m
+ endif
+
+
diff --git a/package/mac80211/patches/009-remove_mac80211_module_dependence.patch b/package/mac80211/patches/009-remove_mac80211_module_dependence.patch
index 14d42904a0..6efd127d7e 100644
--- a/package/mac80211/patches/009-remove_mac80211_module_dependence.patch
+++ b/package/mac80211/patches/009-remove_mac80211_module_dependence.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -49,21 +49,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
+@@ -69,21 +69,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
endif
endif
diff --git a/package/mac80211/patches/010-b43_config.patch b/package/mac80211/patches/010-b43_config.patch
index 8c5253550a..4aafdf32d5 100644
--- a/package/mac80211/patches/010-b43_config.patch
+++ b/package/mac80211/patches/010-b43_config.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -160,9 +160,9 @@ CONFIG_B43_HWRNG=y
+@@ -188,9 +188,9 @@ CONFIG_B43_HWRNG=y
CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y
ifneq ($(CONFIG_PCMCIA),)
@@ -12,7 +12,7 @@
CONFIG_B43_LEDS=y
CONFIG_B43_PHY_LP=y
# CONFIG_B43_DEBUG=y
-@@ -217,8 +217,8 @@ CONFIG_SSB_PCIHOST_POSSIBLE=y
+@@ -245,8 +245,8 @@ CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
CONFIG_SSB_B43_PCI_BRIDGE=y
ifneq ($(CONFIG_PCMCIA),)
diff --git a/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch b/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch
deleted file mode 100644
index 52b90b004d..0000000000
--- a/package/mac80211/patches/011-move_ar9170_usb_compat_code.patch
+++ /dev/null
@@ -1,515 +0,0 @@
---- a/drivers/net/wireless/ath/ar9170/usb.c
-+++ b/drivers/net/wireless/ath/ar9170/usb.c
-@@ -100,6 +100,225 @@ static struct usb_device_id ar9170_usb_i
- };
- MODULE_DEVICE_TABLE(usb, ar9170_usb_ids);
-
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-+
-+/**
-+ * 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 /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) */
-+
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
-+
-+/*
-+ * Compat-wireless notes for USB backport stuff:
-+ *
-+ * urb->reject exists on 2.6.27, the poison/unpoison helpers
-+ * did not though. The anchor poison does not exist so we cannot use them.
-+ *
-+ * USB anchor poising seems to exist to prevent future driver sumbissions
-+ * of usb_anchor_urb() to an anchor marked as poisoned. For older kernels
-+ * we cannot use that, so new usb_anchor_urb()s will be anchored. The down
-+ * side to this should be submission of URBs will continue being anchored
-+ * on an anchor instead of having them being rejected immediately when the
-+ * driver realized we needed to stop. For ar9170 we poison URBs upon the
-+ * ar9170 mac80211 stop callback(), don't think this should be so bad.
-+ * It mean there is period of time in older kernels for which we continue
-+ * to anchor new URBs to a known stopped anchor. We have two anchors
-+ * (TX, and RX)
-+ */
-+
-+#if 0
-+/**
-+ * usb_poison_urb - reliably kill a transfer and prevent further use of an URB
-+ * @urb: pointer to URB describing a previously submitted request,
-+ * may be NULL
-+ *
-+ * This routine cancels an in-progress request. It is guaranteed that
-+ * upon return all completion handlers will have finished and the URB
-+ * will be totally idle and cannot be reused. These features make
-+ * this an ideal way to stop I/O in a disconnect() callback.
-+ * If the request has not already finished or been unlinked
-+ * the completion handler will see urb->status == -ENOENT.
-+ *
-+ * After and while the routine runs, attempts to resubmit the URB will fail
-+ * with error -EPERM. Thus even if the URB's completion handler always
-+ * tries to resubmit, it will not succeed and the URB will become idle.
-+ *
-+ * This routine may not be used in an interrupt context (such as a bottom
-+ * half or a completion handler), or when holding a spinlock, or in other
-+ * situations where the caller can't schedule().
-+ *
-+ * This routine should not be called by a driver after its disconnect
-+ * method has returned.
-+ */
-+void usb_poison_urb(struct urb *urb)
-+{
-+ might_sleep();
-+ if (!(urb && urb->dev && urb->ep))
-+ return;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-+ spin_lock_irq(&usb_reject_lock);
-+#endif
-+ ++urb->reject;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-+ spin_unlock_irq(&usb_reject_lock);
-+#endif
-+ /*
-+ * XXX: usb_hcd_unlink_urb() needs backporting... this is defined
-+ * on usb hcd.c but urb.c gets access to it. That is, older kernels
-+ * have usb_hcd_unlink_urb() but its not exported, nor can we
-+ * re-implement it exactly. This essentially dequeues the urb from
-+ * hw, we need to figure out a way to backport this.
-+ */
-+ //usb_hcd_unlink_urb(urb, -ENOENT);
-+
-+ wait_event(usb_kill_urb_queue, atomic_read(&urb->use_count) == 0);
-+}
-+EXPORT_SYMBOL_GPL(usb_poison_urb);
-+#endif
-+
-+void usb_unpoison_urb(struct urb *urb)
-+{
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-+ unsigned long flags;
-+#endif
-+
-+ if (!urb)
-+ return;
-+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-+ spin_lock_irqsave(&usb_reject_lock, flags);
-+#endif
-+ --urb->reject;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-+ spin_unlock_irqrestore(&usb_reject_lock, flags);
-+#endif
-+}
-+EXPORT_SYMBOL_GPL(usb_unpoison_urb);
-+
-+
-+#if 0
-+/**
-+ * usb_poison_anchored_urbs - cease all traffic from an anchor
-+ * @anchor: anchor the requests are bound to
-+ *
-+ * this allows all outstanding URBs to be poisoned starting
-+ * from the back of the queue. Newly added URBs will also be
-+ * poisoned
-+ *
-+ * This routine should not be called by a driver after its disconnect
-+ * method has returned.
-+ */
-+void usb_poison_anchored_urbs(struct usb_anchor *anchor)
-+{
-+ struct urb *victim;
-+
-+ spin_lock_irq(&anchor->lock);
-+ // anchor->poisoned = 1; /* XXX: Cannot backport */
-+ while (!list_empty(&anchor->urb_list)) {
-+ victim = list_entry(anchor->urb_list.prev, struct urb,
-+ anchor_list);
-+ /* we must make sure the URB isn't freed before we kill it*/
-+ usb_get_urb(victim);
-+ spin_unlock_irq(&anchor->lock);
-+ /* this will unanchor the URB */
-+ usb_poison_urb(victim);
-+ usb_put_urb(victim);
-+ spin_lock_irq(&anchor->lock);
-+ }
-+ spin_unlock_irq(&anchor->lock);
-+}
-+EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs);
-+#endif
-+
-+/**
-+ * usb_get_from_anchor - get an anchor's oldest urb
-+ * @anchor: the anchor whose urb you want
-+ *
-+ * this will take the oldest urb from an anchor,
-+ * unanchor and return it
-+ */
-+struct urb *usb_get_from_anchor(struct usb_anchor *anchor)
-+{
-+ struct urb *victim;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&anchor->lock, flags);
-+ if (!list_empty(&anchor->urb_list)) {
-+ victim = list_entry(anchor->urb_list.next, struct urb,
-+ anchor_list);
-+ usb_get_urb(victim);
-+ spin_unlock_irqrestore(&anchor->lock, flags);
-+ usb_unanchor_urb(victim);
-+ } else {
-+ spin_unlock_irqrestore(&anchor->lock, flags);
-+ victim = NULL;
-+ }
-+
-+ return victim;
-+}
-+
-+EXPORT_SYMBOL_GPL(usb_get_from_anchor);
-+
-+/**
-+ * usb_scuttle_anchored_urbs - unanchor all an anchor's urbs
-+ * @anchor: the anchor whose urbs you want to unanchor
-+ *
-+ * use this to get rid of all an anchor's urbs
-+ */
-+void usb_scuttle_anchored_urbs(struct usb_anchor *anchor)
-+{
-+ struct urb *victim;
-+ unsigned long flags;
-+
-+ spin_lock_irqsave(&anchor->lock, flags);
-+ while (!list_empty(&anchor->urb_list)) {
-+ victim = list_entry(anchor->urb_list.prev, struct urb,
-+ anchor_list);
-+ usb_get_urb(victim);
-+ spin_unlock_irqrestore(&anchor->lock, flags);
-+ /* this may free the URB */
-+ usb_unanchor_urb(victim);
-+ usb_put_urb(victim);
-+ spin_lock_irqsave(&anchor->lock, flags);
-+ }
-+ spin_unlock_irqrestore(&anchor->lock, flags);
-+}
-+
-+EXPORT_SYMBOL_GPL(usb_scuttle_anchored_urbs);
-+
-+/**
-+ * usb_anchor_empty - is an anchor empty
-+ * @anchor: the anchor you want to query
-+ *
-+ * returns 1 if the anchor has no urbs associated with it
-+ */
-+int usb_anchor_empty(struct usb_anchor *anchor)
-+{
-+ return list_empty(&anchor->urb_list);
-+}
-+
-+EXPORT_SYMBOL_GPL(usb_anchor_empty);
-+
-+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) */
-+
- static void ar9170_usb_submit_urb(struct ar9170_usb *aru)
- {
- struct urb *urb;
---- a/net/wireless/compat-2.6.28.c
-+++ b/net/wireless/compat-2.6.28.c
-@@ -12,202 +12,8 @@
-
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28))
-
--#include <linux/usb.h>
--
- /* 2.6.28 compat code goes here */
-
--/*
-- * Compat-wireless notes for USB backport stuff:
-- *
-- * urb->reject exists on 2.6.27, the poison/unpoison helpers
-- * did not though. The anchor poison does not exist so we cannot use them.
-- *
-- * USB anchor poising seems to exist to prevent future driver sumbissions
-- * of usb_anchor_urb() to an anchor marked as poisoned. For older kernels
-- * we cannot use that, so new usb_anchor_urb()s will be anchored. The down
-- * side to this should be submission of URBs will continue being anchored
-- * on an anchor instead of having them being rejected immediately when the
-- * driver realized we needed to stop. For ar9170 we poison URBs upon the
-- * ar9170 mac80211 stop callback(), don't think this should be so bad.
-- * It mean there is period of time in older kernels for which we continue
-- * to anchor new URBs to a known stopped anchor. We have two anchors
-- * (TX, and RX)
-- */
--
--#if 0
--/**
-- * usb_poison_urb - reliably kill a transfer and prevent further use of an URB
-- * @urb: pointer to URB describing a previously submitted request,
-- * may be NULL
-- *
-- * This routine cancels an in-progress request. It is guaranteed that
-- * upon return all completion handlers will have finished and the URB
-- * will be totally idle and cannot be reused. These features make
-- * this an ideal way to stop I/O in a disconnect() callback.
-- * If the request has not already finished or been unlinked
-- * the completion handler will see urb->status == -ENOENT.
-- *
-- * After and while the routine runs, attempts to resubmit the URB will fail
-- * with error -EPERM. Thus even if the URB's completion handler always
-- * tries to resubmit, it will not succeed and the URB will become idle.
-- *
-- * This routine may not be used in an interrupt context (such as a bottom
-- * half or a completion handler), or when holding a spinlock, or in other
-- * situations where the caller can't schedule().
-- *
-- * This routine should not be called by a driver after its disconnect
-- * method has returned.
-- */
--void usb_poison_urb(struct urb *urb)
--{
-- might_sleep();
-- if (!(urb && urb->dev && urb->ep))
-- return;
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-- spin_lock_irq(&usb_reject_lock);
--#endif
-- ++urb->reject;
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-- spin_unlock_irq(&usb_reject_lock);
--#endif
-- /*
-- * XXX: usb_hcd_unlink_urb() needs backporting... this is defined
-- * on usb hcd.c but urb.c gets access to it. That is, older kernels
-- * have usb_hcd_unlink_urb() but its not exported, nor can we
-- * re-implement it exactly. This essentially dequeues the urb from
-- * hw, we need to figure out a way to backport this.
-- */
-- //usb_hcd_unlink_urb(urb, -ENOENT);
--
-- wait_event(usb_kill_urb_queue, atomic_read(&urb->use_count) == 0);
--}
--EXPORT_SYMBOL_GPL(usb_poison_urb);
--#endif
--
--void usb_unpoison_urb(struct urb *urb)
--{
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-- unsigned long flags;
--#endif
--
-- if (!urb)
-- return;
--
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-- spin_lock_irqsave(&usb_reject_lock, flags);
--#endif
-- --urb->reject;
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
-- spin_unlock_irqrestore(&usb_reject_lock, flags);
--#endif
--}
--EXPORT_SYMBOL_GPL(usb_unpoison_urb);
--
--
--#if 0
--/**
-- * usb_poison_anchored_urbs - cease all traffic from an anchor
-- * @anchor: anchor the requests are bound to
-- *
-- * this allows all outstanding URBs to be poisoned starting
-- * from the back of the queue. Newly added URBs will also be
-- * poisoned
-- *
-- * This routine should not be called by a driver after its disconnect
-- * method has returned.
-- */
--void usb_poison_anchored_urbs(struct usb_anchor *anchor)
--{
-- struct urb *victim;
--
-- spin_lock_irq(&anchor->lock);
-- // anchor->poisoned = 1; /* XXX: Cannot backport */
-- while (!list_empty(&anchor->urb_list)) {
-- victim = list_entry(anchor->urb_list.prev, struct urb,
-- anchor_list);
-- /* we must make sure the URB isn't freed before we kill it*/
-- usb_get_urb(victim);
-- spin_unlock_irq(&anchor->lock);
-- /* this will unanchor the URB */
-- usb_poison_urb(victim);
-- usb_put_urb(victim);
-- spin_lock_irq(&anchor->lock);
-- }
-- spin_unlock_irq(&anchor->lock);
--}
--EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs);
--#endif
--
--/**
-- * usb_get_from_anchor - get an anchor's oldest urb
-- * @anchor: the anchor whose urb you want
-- *
-- * this will take the oldest urb from an anchor,
-- * unanchor and return it
-- */
--struct urb *usb_get_from_anchor(struct usb_anchor *anchor)
--{
-- struct urb *victim;
-- unsigned long flags;
--
-- spin_lock_irqsave(&anchor->lock, flags);
-- if (!list_empty(&anchor->urb_list)) {
-- victim = list_entry(anchor->urb_list.next, struct urb,
-- anchor_list);
-- usb_get_urb(victim);
-- spin_unlock_irqrestore(&anchor->lock, flags);
-- usb_unanchor_urb(victim);
-- } else {
-- spin_unlock_irqrestore(&anchor->lock, flags);
-- victim = NULL;
-- }
--
-- return victim;
--}
--
--EXPORT_SYMBOL_GPL(usb_get_from_anchor);
--
--/**
-- * usb_scuttle_anchored_urbs - unanchor all an anchor's urbs
-- * @anchor: the anchor whose urbs you want to unanchor
-- *
-- * use this to get rid of all an anchor's urbs
-- */
--void usb_scuttle_anchored_urbs(struct usb_anchor *anchor)
--{
-- struct urb *victim;
-- unsigned long flags;
--
-- spin_lock_irqsave(&anchor->lock, flags);
-- while (!list_empty(&anchor->urb_list)) {
-- victim = list_entry(anchor->urb_list.prev, struct urb,
-- anchor_list);
-- usb_get_urb(victim);
-- spin_unlock_irqrestore(&anchor->lock, flags);
-- /* this may free the URB */
-- usb_unanchor_urb(victim);
-- usb_put_urb(victim);
-- spin_lock_irqsave(&anchor->lock, flags);
-- }
-- spin_unlock_irqrestore(&anchor->lock, flags);
--}
--
--EXPORT_SYMBOL_GPL(usb_scuttle_anchored_urbs);
--
--/**
-- * usb_anchor_empty - is an anchor empty
-- * @anchor: the anchor you want to query
-- *
-- * returns 1 if the anchor has no urbs associated with it
-- */
--int usb_anchor_empty(struct usb_anchor *anchor)
--{
-- return list_empty(&anchor->urb_list);
--}
--
--EXPORT_SYMBOL_GPL(usb_anchor_empty);
--
--
- void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
- {
- /*
---- a/net/wireless/compat-2.6.29.c
-+++ b/net/wireless/compat-2.6.29.c
-@@ -12,29 +12,7 @@
-
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-
--#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);
--
-+/* 2.6.29 compat code goes here */
-
- #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) */
-
---- a/include/net/compat-2.6.28.h
-+++ b/include/net/compat-2.6.28.h
-@@ -9,7 +9,6 @@
-
- #include <linux/skbuff.h>
- #include <linux/if_ether.h>
--#include <linux/usb.h>
-
- #ifndef ETH_P_PAE
- #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */
-@@ -37,19 +36,6 @@
- #define pcmcia_parse_tuple(tuple, parse) pccard_parse_tuple(tuple, parse)
- #endif
-
--#if 0
--extern void usb_poison_urb(struct urb *urb);
--#endif
--extern void usb_unpoison_urb(struct urb *urb);
--
--#if 0
--extern void usb_poison_anchored_urbs(struct usb_anchor *anchor);
--#endif
--
--extern struct urb *usb_get_from_anchor(struct usb_anchor *anchor);
--extern void usb_scuttle_anchored_urbs(struct usb_anchor *anchor);
--extern int usb_anchor_empty(struct usb_anchor *anchor);
--
-
- void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
-
---- a/include/net/compat-2.6.29.h
-+++ b/include/net/compat-2.6.29.h
-@@ -8,7 +8,6 @@
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29))
-
- #include <linux/skbuff.h>
--#include <linux/usb.h>
-
- /**
- * skb_queue_is_first - check if skb is the first entry in the queue
-@@ -41,8 +40,6 @@ static inline struct sk_buff *skb_queue_
- return skb->prev;
- }
-
--extern void usb_unpoison_anchored_urbs(struct usb_anchor *anchor);
--
- #define DIV_ROUND_CLOSEST(x, divisor)( \
- { \
- typeof(divisor) __divisor = divisor; \
diff --git a/package/mac80211/patches/020-fix_compat_h.patch b/package/mac80211/patches/020-fix_compat_h.patch
new file mode 100644
index 0000000000..7f90cf4dc9
--- /dev/null
+++ b/package/mac80211/patches/020-fix_compat_h.patch
@@ -0,0 +1,11 @@
+--- a/include/linux/compat-2.6.32.h
++++ b/include/linux/compat-2.6.32.h
+@@ -7,7 +7,7 @@
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32))
+
+ #include <linux/netdevice.h>
+-#include <asm/compat.h>
++#include <linux/compat.h>
+ #include <net/iw_handler.h>
+ #include <linux/workqueue.h>
+
diff --git a/package/mac80211/patches/021-fix_missing_ifdefs.patch b/package/mac80211/patches/021-fix_missing_ifdefs.patch
new file mode 100644
index 0000000000..2c838ebac5
--- /dev/null
+++ b/package/mac80211/patches/021-fix_missing_ifdefs.patch
@@ -0,0 +1,18 @@
+--- a/compat/compat-2.6.33.c
++++ b/compat/compat-2.6.33.c
+@@ -12,6 +12,7 @@
+
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
+
++#ifdef CONFIG_PCCARD
+
+ /**
+ * pccard_loop_tuple() - loop over tuples in the CIS
+@@ -125,6 +126,7 @@ int pcmcia_loop_tuple(struct pcmcia_devi
+ EXPORT_SYMBOL(pcmcia_loop_tuple);
+ /* Source: drivers/pcmcia/pcmcia_resource.c */
+
++#endif
+
+ #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
+
diff --git a/package/mac80211/patches/200-mac80211_ibss_fix.patch b/package/mac80211/patches/200-mac80211_ibss_fix.patch
deleted file mode 100644
index c2fb1d7a25..0000000000
--- a/package/mac80211/patches/200-mac80211_ibss_fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/mac80211/ibss.c
-+++ b/net/mac80211/ibss.c
-@@ -382,6 +382,7 @@ static void ieee80211_rx_bss_info(struct
- struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
- u8 *bssid,u8 *addr, u32 supp_rates)
- {
-+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
- struct sta_info *sta;
- int band = local->hw.conf.channel->band;
-@@ -397,6 +398,9 @@ struct sta_info *ieee80211_ibss_add_sta(
- return NULL;
- }
-
-+ if (ifibss->state == IEEE80211_IBSS_MLME_SEARCH)
-+ return NULL;
-+
- if (compare_ether_addr(bssid, sdata->u.ibss.bssid))
- return NULL;
-
diff --git a/package/mac80211/patches/401-ath9k-dont-register-leds-on-ar9100.patch b/package/mac80211/patches/401-ath9k-dont-register-leds-on-ar9100.patch
index 05b151b541..a4af5c98dc 100644
--- a/package/mac80211/patches/401-ath9k-dont-register-leds-on-ar9100.patch
+++ b/package/mac80211/patches/401-ath9k-dont-register-leds-on-ar9100.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1112,6 +1112,9 @@ static void ath_unregister_led(struct at
+@@ -1103,6 +1103,9 @@ static void ath_unregister_led(struct at
static void ath_deinit_leds(struct ath_softc *sc)
{
@@ -10,7 +10,7 @@
ath_unregister_led(&sc->assoc_led);
sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
ath_unregister_led(&sc->tx_led);
-@@ -1130,6 +1133,9 @@ static void ath_init_leds(struct ath_sof
+@@ -1121,6 +1124,9 @@ static void ath_init_leds(struct ath_sof
else
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
diff --git a/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch b/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch
index eabba06e7b..63cb3d979e 100644
--- a/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch
+++ b/package/mac80211/patches/403-ath9k-fix-invalid-mac-address-handling.patch
@@ -8,7 +8,7 @@
#include <asm/unaligned.h>
#include "hw.h"
-@@ -485,8 +486,18 @@ static int ath9k_hw_init_macaddr(struct
+@@ -461,8 +462,18 @@ static int ath9k_hw_init_macaddr(struct
common->macaddr[2 * i] = eeval >> 8;
common->macaddr[2 * i + 1] = eeval & 0xff;
}
diff --git a/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch b/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch
index 5e19f1255e..6be7888144 100644
--- a/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch
+++ b/package/mac80211/patches/406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -427,11 +427,8 @@ static void ath9k_hw_init_defaults(struc
+@@ -403,11 +403,8 @@ static void ath9k_hw_init_defaults(struc
ah->hw_version.magic = AR5416_MAGIC;
ah->hw_version.subvendorid = 0;
@@ -22,7 +22,7 @@
#include "ath9k.h"
#include "btcoex.h"
-@@ -1606,6 +1607,7 @@ static int ath_init_softc(u16 devid, str
+@@ -1597,6 +1598,7 @@ static int ath_init_softc(u16 devid, str
{
struct ath_hw *ah = NULL;
struct ath_common *common;
@@ -30,7 +30,7 @@
int r = 0, i;
int csz = 0;
int qnum;
-@@ -1629,6 +1631,10 @@ static int ath_init_softc(u16 devid, str
+@@ -1619,6 +1621,10 @@ static int ath_init_softc(u16 devid, str
ah->hw_version.devid = devid;
ah->hw_version.subsysid = subsysid;
diff --git a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
index e4aeab5cef..615de77a59 100644
--- a/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
+++ b/package/mac80211/patches/407-ath9k-override-mac-address-from-platform-data.patch
@@ -11,7 +11,7 @@
#include "hw.h"
#include "rc.h"
#include "initvals.h"
-@@ -472,17 +474,23 @@ static int ath9k_hw_rf_claim(struct ath_
+@@ -448,17 +450,23 @@ static int ath9k_hw_rf_claim(struct ath_
static int ath9k_hw_init_macaddr(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
diff --git a/package/mac80211/patches/510-ath9k_debugfs_chainmask.patch b/package/mac80211/patches/510-ath9k_debugfs_chainmask.patch
index a26b4dc8aa..157098a69d 100644
--- a/package/mac80211/patches/510-ath9k_debugfs_chainmask.patch
+++ b/package/mac80211/patches/510-ath9k_debugfs_chainmask.patch
@@ -91,7 +91,7 @@
static ssize_t read_file_dma(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
-@@ -574,6 +658,16 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -600,6 +684,16 @@ int ath9k_init_debug(struct ath_hw *ah)
goto err;
#endif
@@ -108,7 +108,7 @@
sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
sc->debug.debugfs_phy, sc, &fops_dma);
if (!sc->debug.debugfs_dma)
-@@ -617,6 +711,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
+@@ -643,6 +737,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv;
diff --git a/package/mac80211/patches/520-ath9k_debugfs_regaccess.patch b/package/mac80211/patches/520-ath9k_debugfs_regaccess.patch
index b927b55137..b9fa0221d7 100644
--- a/package/mac80211/patches/520-ath9k_debugfs_regaccess.patch
+++ b/package/mac80211/patches/520-ath9k_debugfs_regaccess.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -638,6 +638,86 @@ static const struct file_operations fops
+@@ -664,6 +664,86 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
@@ -87,7 +87,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
-@@ -700,6 +780,17 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -726,6 +806,17 @@ int ath9k_init_debug(struct ath_hw *ah)
if (!sc->debug.debugfs_xmit)
goto err;
@@ -105,7 +105,7 @@
return 0;
err:
ath9k_exit_debug(ah);
-@@ -713,6 +804,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
+@@ -739,6 +830,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
debugfs_remove(sc->debug.debugfs_tx_chainmask);
debugfs_remove(sc->debug.debugfs_rx_chainmask);
diff --git a/package/mac80211/patches/530-disable_interrupt_mitigation.patch b/package/mac80211/patches/530-disable_interrupt_mitigation.patch
deleted file mode 100644
index 916ffcbba9..0000000000
--- a/package/mac80211/patches/530-disable_interrupt_mitigation.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -395,7 +395,7 @@ static void ath9k_hw_init_config(struct
- ah->config.spurchans[i][1] = AR_NO_SPUR;
- }
-
-- ah->config.intr_mitigation = true;
-+ ah->config.intr_mitigation = false;
-
- /*
- * We need this for PCI devices only (Cardbus, PCI, miniPCI)
diff --git a/package/mac80211/patches/530-mac80211_queue_fix.patch b/package/mac80211/patches/530-mac80211_queue_fix.patch
new file mode 100644
index 0000000000..d84167392f
--- /dev/null
+++ b/package/mac80211/patches/530-mac80211_queue_fix.patch
@@ -0,0 +1,69 @@
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -329,7 +329,7 @@ static int ieee80211_open(struct net_dev
+ if (sdata->vif.type == NL80211_IFTYPE_STATION)
+ ieee80211_queue_work(&local->hw, &sdata->u.mgd.work);
+
+- netif_start_queue(dev);
++ netif_tx_start_all_queues(dev);
+
+ return 0;
+ err_del_interface:
+@@ -357,7 +357,7 @@ static int ieee80211_stop(struct net_dev
+ /*
+ * Stop TX on this interface first.
+ */
+- netif_stop_queue(dev);
++ netif_tx_stop_all_queues(dev);
+
+ /*
+ * Purge work for this interface.
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -723,7 +723,7 @@ static void ieee80211_set_associated(str
+ ieee80211_recalc_smps(local, sdata);
+ mutex_unlock(&local->iflist_mtx);
+
+- netif_start_queue(sdata->dev);
++ netif_tx_start_all_queues(sdata->dev);
+ netif_carrier_on(sdata->dev);
+ }
+
+@@ -759,7 +759,7 @@ static void ieee80211_set_disassoc(struc
+ * time -- we don't want the scan code to enable queues.
+ */
+
+- netif_stop_queue(sdata->dev);
++ netif_tx_stop_all_queues(sdata->dev);
+ netif_carrier_off(sdata->dev);
+
+ rcu_read_lock();
+--- a/net/mac80211/offchannel.c
++++ b/net/mac80211/offchannel.c
+@@ -113,7 +113,7 @@ void ieee80211_offchannel_stop_beaconing
+ */
+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_MONITOR)
+- netif_stop_queue(sdata->dev);
++ netif_tx_stop_all_queues(sdata->dev);
+ }
+ mutex_unlock(&local->iflist_mtx);
+ }
+@@ -131,7 +131,7 @@ void ieee80211_offchannel_stop_station(s
+ continue;
+
+ if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+- netif_stop_queue(sdata->dev);
++ netif_tx_stop_all_queues(sdata->dev);
+ if (sdata->u.mgd.associated)
+ ieee80211_offchannel_ps_enable(sdata);
+ }
+@@ -153,7 +153,7 @@ void ieee80211_offchannel_return(struct
+ if (sdata->vif.type == NL80211_IFTYPE_STATION) {
+ if (sdata->u.mgd.associated)
+ ieee80211_offchannel_ps_disable(sdata);
+- netif_wake_queue(sdata->dev);
++ netif_tx_wake_all_queues(sdata->dev);
+ }
+
+ /* re-enable beaconing */
diff --git a/package/mac80211/patches/540-ath9k_tx_fix.patch b/package/mac80211/patches/540-ath9k_tx_fix.patch
deleted file mode 100644
index 8965e5bba0..0000000000
--- a/package/mac80211/patches/540-ath9k_tx_fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -2078,7 +2078,7 @@ static void ath_tx_processq(struct ath_s
- &txq->axq_q, lastbf->list.prev);
-
- txq->axq_depth--;
-- txok = (ds->ds_txstat.ts_status == 0);
-+ txok = !(ds->ds_txstat.ts_status & ATH9K_TXERR_MASK);
- txq->axq_tx_inprogress = false;
- spin_unlock_bh(&txq->axq_lock);
-
---- a/drivers/net/wireless/ath/ath9k/mac.h
-+++ b/drivers/net/wireless/ath/ath9k/mac.h
-@@ -77,6 +77,9 @@
- #define ATH9K_TXERR_XTXOP 0x08
- #define ATH9K_TXERR_TIMER_EXPIRED 0x10
- #define ATH9K_TX_ACKED 0x20
-+#define ATH9K_TXERR_MASK \
-+ (ATH9K_TXERR_XRETRY | ATH9K_TXERR_FILT | ATH9K_TXERR_FIFO | \
-+ ATH9K_TXERR_XTXOP | ATH9K_TXERR_TIMER_EXPIRED)
-
- #define ATH9K_TX_BA 0x01
- #define ATH9K_TX_PWRMGMT 0x02
diff --git a/package/mac80211/patches/540-mac80211_work_fix.patch b/package/mac80211/patches/540-mac80211_work_fix.patch
new file mode 100644
index 0000000000..339a52d51d
--- /dev/null
+++ b/package/mac80211/patches/540-mac80211_work_fix.patch
@@ -0,0 +1,30 @@
+--- a/net/mac80211/scan.c
++++ b/net/mac80211/scan.c
+@@ -284,6 +284,7 @@ void ieee80211_scan_completed(struct iee
+ ieee80211_mlme_notify_scan_completed(local);
+ ieee80211_ibss_notify_scan_completed(local);
+ ieee80211_mesh_notify_scan_completed(local);
++ ieee80211_queue_work(&local->hw, &local->work_work);
+ }
+ EXPORT_SYMBOL(ieee80211_scan_completed);
+
+--- a/net/mac80211/work.c
++++ b/net/mac80211/work.c
+@@ -818,6 +818,7 @@ static void ieee80211_work_work(struct w
+ wk->chan == local->tmp_channel &&
+ wk->chan_type == local->tmp_channel_type) {
+ wk->started = true;
++ wk->timeout = jiffies;
+ }
+
+ if (!wk->started && !local->tmp_channel) {
+@@ -935,6 +936,9 @@ void ieee80211_add_work(struct ieee80211
+ if (WARN_ON(!wk->done))
+ return;
+
++ if (WARN_ON(!ieee80211_sdata_running(wk->sdata)))
++ return;
++
+ wk->started = false;
+
+ local = wk->sdata->local;
diff --git a/package/mac80211/patches/550-queue_stop_fix.patch b/package/mac80211/patches/550-queue_stop_fix.patch
deleted file mode 100644
index 8625fe38ba..0000000000
--- a/package/mac80211/patches/550-queue_stop_fix.patch
+++ /dev/null
@@ -1,380 +0,0 @@
---- a/net/mac80211/iface.c
-+++ b/net/mac80211/iface.c
-@@ -15,12 +15,14 @@
- #include <linux/netdevice.h>
- #include <linux/rtnetlink.h>
- #include <net/mac80211.h>
-+#include <net/ieee80211_radiotap.h>
- #include "ieee80211_i.h"
- #include "sta_info.h"
- #include "debugfs_netdev.h"
- #include "mesh.h"
- #include "led.h"
- #include "driver-ops.h"
-+#include "wme.h"
-
- /**
- * DOC: Interface list locking
-@@ -314,7 +316,7 @@ static int ieee80211_open(struct net_dev
- if (sdata->vif.type == NL80211_IFTYPE_STATION)
- ieee80211_queue_work(&local->hw, &sdata->u.mgd.work);
-
-- netif_start_queue(dev);
-+ netif_tx_start_all_queues(dev);
-
- return 0;
- err_del_interface:
-@@ -343,7 +345,7 @@ static int ieee80211_stop(struct net_dev
- /*
- * Stop TX on this interface first.
- */
-- netif_stop_queue(dev);
-+ netif_tx_stop_all_queues(dev);
-
- /*
- * Now delete all active aggregation sessions.
-@@ -644,6 +646,37 @@ static void ieee80211_teardown_sdata(str
- WARN_ON(flushed);
- }
-
-+static u16 ieee80211_netdev_select_queue(struct net_device *dev,
-+ struct sk_buff *skb)
-+{
-+ return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
-+}
-+
-+static u16 ieee80211_monitor_select_queue(struct net_device *dev,
-+ struct sk_buff *skb)
-+{
-+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
-+ struct ieee80211_local *local = sdata->local;
-+ struct ieee80211_hdr *hdr;
-+ struct ieee80211_radiotap_header *rtap = (void *)skb->data;
-+
-+ if (local->hw.queues < 4)
-+ return 0;
-+
-+ if (skb->len < 4 ||
-+ skb->len < rtap->it_len + 2 /* frame control */)
-+ return 0; /* doesn't matter, frame will be dropped */
-+
-+ hdr = (void *)((u8 *)skb->data + rtap->it_len);
-+
-+ if (!ieee80211_is_data(hdr->frame_control)) {
-+ skb->priority = 7;
-+ return ieee802_1d_to_ac[skb->priority];
-+ }
-+
-+ return ieee80211_downgrade_queue(local, skb);
-+}
-+
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- static const struct net_device_ops ieee80211_dataif_ops = {
- .ndo_open = ieee80211_open,
-@@ -653,6 +686,7 @@ static const struct net_device_ops ieee8
- .ndo_set_multicast_list = ieee80211_set_multicast_list,
- .ndo_change_mtu = ieee80211_change_mtu,
- .ndo_set_mac_address = eth_mac_addr,
-+ .ndo_select_queue = ieee80211_netdev_select_queue,
- };
-
- static const struct net_device_ops ieee80211_monitorif_ops = {
-@@ -663,6 +697,7 @@ static const struct net_device_ops ieee8
- .ndo_set_multicast_list = ieee80211_set_multicast_list,
- .ndo_change_mtu = ieee80211_change_mtu,
- .ndo_set_mac_address = eth_mac_addr,
-+ .ndo_select_queue = ieee80211_monitor_select_queue,
- };
- #endif
-
-@@ -677,6 +712,7 @@ static void ieee80211_if_setup(struct ne
- dev->change_mtu = ieee80211_change_mtu;
- dev->open = ieee80211_open;
- dev->stop = ieee80211_stop;
-+ dev->select_queue = ieee80211_netdev_select_queue;
- /* we will validate the address ourselves in ->open */
- dev->validate_addr = NULL;
- #endif
-@@ -725,6 +761,7 @@ static void ieee80211_setup_sdata(struct
- sdata->dev->netdev_ops = &ieee80211_monitorif_ops;
- #else
- sdata->dev->hard_start_xmit = ieee80211_monitor_start_xmit;
-+ sdata->dev->select_queue = ieee80211_monitor_select_queue;
- #endif
- sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
- MONITOR_FLAG_OTHER_BSS;
-@@ -794,8 +831,8 @@ int ieee80211_if_add(struct ieee80211_lo
-
- ASSERT_RTNL();
-
-- ndev = alloc_netdev(sizeof(*sdata) + local->hw.vif_data_size,
-- name, ieee80211_if_setup);
-+ ndev = alloc_netdev_mq(sizeof(*sdata) + local->hw.vif_data_size,
-+ name, ieee80211_if_setup, local->hw.queues);
- if (!ndev)
- return -ENOMEM;
- dev_net_set(ndev, wiphy_net(local->hw.wiphy));
---- a/net/mac80211/rx.c
-+++ b/net/mac80211/rx.c
-@@ -1747,7 +1747,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
- memset(info, 0, sizeof(*info));
- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
- info->control.vif = &rx->sdata->vif;
-- ieee80211_select_queue(local, fwd_skb);
-+ skb_set_queue_mapping(skb,
-+ ieee80211_select_queue(rx->sdata, fwd_skb));
-+ ieee80211_set_qos_hdr(local, skb);
- if (is_multicast_ether_addr(fwd_hdr->addr1))
- IEEE80211_IFSTA_MESH_CTR_INC(&sdata->u.mesh,
- fwded_mcast);
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -1507,7 +1507,7 @@ static void ieee80211_xmit(struct ieee80
- return;
- }
-
-- ieee80211_select_queue(local, skb);
-+ ieee80211_set_qos_hdr(local, skb);
- ieee80211_tx(sdata, skb, false);
- rcu_read_unlock();
- }
-@@ -2286,6 +2286,9 @@ void ieee80211_tx_skb(struct ieee80211_s
- skb_set_network_header(skb, 0);
- skb_set_transport_header(skb, 0);
-
-+ /* send all internal mgmt frames on VO */
-+ skb_set_queue_mapping(skb, 0);
-+
- /*
- * The other path calling ieee80211_xmit is from the tasklet,
- * and while we can handle concurrent transmissions locking
---- a/net/mac80211/util.c
-+++ b/net/mac80211/util.c
-@@ -269,6 +269,7 @@ static void __ieee80211_wake_queue(struc
- enum queue_stop_reason reason)
- {
- struct ieee80211_local *local = hw_to_local(hw);
-+ struct ieee80211_sub_if_data *sdata;
-
- if (WARN_ON(queue >= hw->queues))
- return;
-@@ -281,6 +282,11 @@ static void __ieee80211_wake_queue(struc
-
- if (!skb_queue_empty(&local->pending[queue]))
- tasklet_schedule(&local->tx_pending_tasklet);
-+
-+ rcu_read_lock();
-+ list_for_each_entry_rcu(sdata, &local->interfaces, list)
-+ netif_tx_wake_queue(netdev_get_tx_queue(sdata->dev, queue));
-+ rcu_read_unlock();
- }
-
- void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
-@@ -305,11 +311,17 @@ static void __ieee80211_stop_queue(struc
- enum queue_stop_reason reason)
- {
- struct ieee80211_local *local = hw_to_local(hw);
-+ struct ieee80211_sub_if_data *sdata;
-
- if (WARN_ON(queue >= hw->queues))
- return;
-
- __set_bit(reason, &local->queue_stop_reasons[queue]);
-+
-+ rcu_read_lock();
-+ list_for_each_entry_rcu(sdata, &local->interfaces, list)
-+ netif_tx_stop_queue(netdev_get_tx_queue(sdata->dev, queue));
-+ rcu_read_unlock();
- }
-
- void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
---- a/net/mac80211/wme.c
-+++ b/net/mac80211/wme.c
-@@ -44,22 +44,69 @@ static int wme_downgrade_ac(struct sk_bu
- }
-
-
--/* Indicate which queue to use. */
--static u16 classify80211(struct ieee80211_local *local, struct sk_buff *skb)
-+/* Indicate which queue to use. */
-+u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
-+ struct sk_buff *skb)
- {
-- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-+ struct ieee80211_local *local = sdata->local;
-+ struct sta_info *sta = NULL;
-+ u32 sta_flags = 0;
-+ const u8 *ra = NULL;
-+ bool qos = false;
-
-- if (!ieee80211_is_data(hdr->frame_control)) {
-- /* management frames go on AC_VO queue, but are sent
-- * without QoS control fields */
-- return 0;
-+ if (local->hw.queues < 4 || skb->len < 6) {
-+ skb->priority = 0; /* required for correct WPA/11i MIC */
-+ return min_t(u16, local->hw.queues - 1,
-+ ieee802_1d_to_ac[skb->priority]);
-+ }
-+
-+ rcu_read_lock();
-+ switch (sdata->vif.type) {
-+ case NL80211_IFTYPE_AP_VLAN:
-+ rcu_read_lock();
-+ sta = rcu_dereference(sdata->u.vlan.sta);
-+ if (sta)
-+ sta_flags = get_sta_flags(sta);
-+ rcu_read_unlock();
-+ if (sta)
-+ break;
-+ case NL80211_IFTYPE_AP:
-+ ra = skb->data;
-+ break;
-+ case NL80211_IFTYPE_WDS:
-+ ra = sdata->u.wds.remote_addr;
-+ break;
-+#ifdef CONFIG_MAC80211_MESH
-+ case NL80211_IFTYPE_MESH_POINT:
-+ /*
-+ * XXX: This is clearly broken ... but already was before,
-+ * because ieee80211_fill_mesh_addresses() would clear A1
-+ * except for multicast addresses.
-+ */
-+ break;
-+#endif
-+ case NL80211_IFTYPE_STATION:
-+ ra = sdata->u.mgd.bssid;
-+ break;
-+ case NL80211_IFTYPE_ADHOC:
-+ ra = skb->data;
-+ break;
-+ default:
-+ break;
- }
-
-- if (0 /* injected */) {
-- /* use AC from radiotap */
-+ if (!sta && ra && !is_multicast_ether_addr(ra)) {
-+ sta = sta_info_get(sdata->local, ra);
-+ if (sta)
-+ sta_flags = get_sta_flags(sta);
- }
-
-- if (!ieee80211_is_data_qos(hdr->frame_control)) {
-+ if (sta_flags & WLAN_STA_WME)
-+ qos = true;
-+
-+ rcu_read_unlock();
-+
-+ if (!qos) {
- skb->priority = 0; /* required for correct WPA/11i MIC */
- return ieee802_1d_to_ac[skb->priority];
- }
-@@ -68,6 +115,12 @@ static u16 classify80211(struct ieee8021
- * data frame has */
- skb->priority = cfg80211_classify8021d(skb);
-
-+ return ieee80211_downgrade_queue(local, skb);
-+}
-+
-+u16 ieee80211_downgrade_queue(struct ieee80211_local *local,
-+ struct sk_buff *skb)
-+{
- /* in case we are a client verify acm is not set for this ac */
- while (unlikely(local->wmm_acm & BIT(skb->priority))) {
- if (wme_downgrade_ac(skb)) {
-@@ -85,24 +138,17 @@ static u16 classify80211(struct ieee8021
- return ieee802_1d_to_ac[skb->priority];
- }
-
--void ieee80211_select_queue(struct ieee80211_local *local, struct sk_buff *skb)
-+void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb)
- {
-- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-- u16 queue;
-- u8 tid;
--
-- queue = classify80211(local, skb);
-- if (unlikely(queue >= local->hw.queues))
-- queue = local->hw.queues - 1;
--
-- /*
-- * Now we know the 1d priority, fill in the QoS header if
-- * there is one (and we haven't done this before).
-- */
-+ struct ieee80211_hdr *hdr = (void *)skb->data;
-+
-+ /* Fill in the QoS header if there is one. */
- if (ieee80211_is_data_qos(hdr->frame_control)) {
- u8 *p = ieee80211_get_qos_ctl(hdr);
-- u8 ack_policy = 0;
-+ u8 ack_policy = 0, tid;
-+
- tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
-+
- if (unlikely(local->wifi_wme_noack_test))
- ack_policy |= QOS_CONTROL_ACK_POLICY_NOACK <<
- QOS_CONTROL_ACK_POLICY_SHIFT;
-@@ -110,6 +156,4 @@ void ieee80211_select_queue(struct ieee8
- *p++ = ack_policy | tid;
- *p = 0;
- }
--
-- skb_set_queue_mapping(skb, queue);
- }
---- a/net/mac80211/wme.h
-+++ b/net/mac80211/wme.h
-@@ -20,7 +20,11 @@
-
- extern const int ieee802_1d_to_ac[8];
-
--void ieee80211_select_queue(struct ieee80211_local *local,
-- struct sk_buff *skb);
-+u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
-+ struct sk_buff *skb);
-+void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb);
-+u16 ieee80211_downgrade_queue(struct ieee80211_local *local,
-+ struct sk_buff *skb);
-+
-
- #endif /* _WME_H */
---- a/net/mac80211/mlme.c
-+++ b/net/mac80211/mlme.c
-@@ -934,7 +934,7 @@ static void ieee80211_set_associated(str
- ieee80211_recalc_ps(local, -1);
- mutex_unlock(&local->iflist_mtx);
-
-- netif_start_queue(sdata->dev);
-+ netif_tx_start_all_queues(sdata->dev);
- netif_carrier_on(sdata->dev);
- }
-
-@@ -1066,7 +1066,7 @@ static void ieee80211_set_disassoc(struc
- * time -- we don't want the scan code to enable queues.
- */
-
-- netif_stop_queue(sdata->dev);
-+ netif_tx_stop_all_queues(sdata->dev);
- netif_carrier_off(sdata->dev);
-
- rcu_read_lock();
---- a/net/mac80211/scan.c
-+++ b/net/mac80211/scan.c
-@@ -399,7 +399,7 @@ static int ieee80211_start_sw_scan(struc
- * are handled in the scan state machine
- */
- if (sdata->vif.type != NL80211_IFTYPE_STATION)
-- netif_stop_queue(sdata->dev);
-+ netif_tx_stop_all_queues(sdata->dev);
- }
- mutex_unlock(&local->iflist_mtx);
-
-@@ -563,7 +563,7 @@ static void ieee80211_scan_state_leave_o
- continue;
-
- if (sdata->vif.type == NL80211_IFTYPE_STATION) {
-- netif_stop_queue(sdata->dev);
-+ netif_tx_stop_all_queues(sdata->dev);
- if (sdata->u.mgd.associated)
- ieee80211_scan_ps_enable(sdata);
- }