aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/Makefile8
-rw-r--r--package/mac80211/patches/001-disable_b44.patch2
-rw-r--r--package/mac80211/patches/002-disable_rfkill.patch4
-rw-r--r--package/mac80211/patches/003-disable_bt.patch2
-rw-r--r--package/mac80211/patches/005-disable_ssb_build.patch6
-rw-r--r--package/mac80211/patches/006-disable_bcma_build.patch2
-rw-r--r--package/mac80211/patches/007-remove_misc_drivers.patch6
-rw-r--r--package/mac80211/patches/009-remove_mac80211_module_dependence.patch2
-rw-r--r--package/mac80211/patches/010-no_pcmcia.patch2
-rw-r--r--package/mac80211/patches/011-no_sdio.patch2
-rw-r--r--package/mac80211/patches/013-disable_b43_nphy.patch2
-rw-r--r--package/mac80211/patches/015-remove-rt2x00-options.patch4
-rw-r--r--package/mac80211/patches/016-remove_pid_algo.patch2
-rw-r--r--package/mac80211/patches/017-remove_ath9k_rc.patch2
-rw-r--r--package/mac80211/patches/019-remove_ath5k_pci_option.patch4
-rw-r--r--package/mac80211/patches/021-add_include_for_bcma.patch4
-rw-r--r--package/mac80211/patches/022-atomic64_backport.patch91
-rw-r--r--package/mac80211/patches/050-compat_firmware.patch2
-rw-r--r--package/mac80211/patches/051-compat_workqueue.patch18
-rw-r--r--package/mac80211/patches/060-fix_compat_security.patch11
-rw-r--r--package/mac80211/patches/100-disable_pcmcia_compat.patch2
-rw-r--r--package/mac80211/patches/110-disable_usb_compat.patch2
-rw-r--r--package/mac80211/patches/120-pr_fmt_warnings.patch8
-rw-r--r--package/mac80211/patches/130-fix_sublevel_check.patch4
-rw-r--r--package/mac80211/patches/140-mesh_pathtbl_backport.patch2
-rw-r--r--package/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch4
-rw-r--r--package/mac80211/patches/300-pending_work.patch506
-rw-r--r--package/mac80211/patches/406-regd_no_assoc_hints.patch4
-rw-r--r--package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch4
-rw-r--r--package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch4
-rw-r--r--package/mac80211/patches/430-ath5k_disable_fast_cc.patch4
-rw-r--r--package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch2
-rw-r--r--package/mac80211/patches/513-ath9k_channelbw_debugfs.patch10
-rw-r--r--package/mac80211/patches/520-mac80211_ht_change_rate_update.patch (renamed from package/mac80211/patches/521-mac80211_ht_change_rate_update.patch)4
-rw-r--r--package/mac80211/patches/520-mac80211_minstrel_ht_aggr_delay.patch49
-rw-r--r--package/mac80211/patches/522-mac80211_reduce_txqueuelen.patch2
-rw-r--r--package/mac80211/patches/523-minstrel_ht_optimize.patch167
-rw-r--r--package/mac80211/patches/530-mac80211_cur_txpower.patch4
-rw-r--r--package/mac80211/patches/531-ath9k_cur_txpower.patch4
-rw-r--r--package/mac80211/patches/542-ath9k_ar9280_cold_reset.patch2
-rw-r--r--package/mac80211/patches/543-ath9k_enable_ar9100_ani.patch11
-rw-r--r--package/mac80211/patches/544-ath9k_fix_sleep_mode_reg.patch12
-rw-r--r--package/mac80211/patches/551-ath9k_per_chain_signal_strength.patch20
-rw-r--r--package/mac80211/patches/560-mac80211_fix_ap_vlan_aggr.patch95
-rw-r--r--package/mac80211/patches/604-rt2x00-add-CONFIG_RT2X00_LIB_EEPROM-option.patch2
-rw-r--r--package/mac80211/patches/850-p54spi-lock-fix.patch10
-rw-r--r--package/mac80211/patches/851-p54spi-mutex-fix.patch15
-rw-r--r--package/mac80211/patches/852-p54spi-cancel-workqueue-fix.patch20
-rw-r--r--package/mac80211/patches/910-fix-reversed-warn-on-workqueue.patch11
49 files changed, 390 insertions, 770 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile
index 25df7aa319..493336bfc3 100644
--- a/package/mac80211/Makefile
+++ b/package/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
-PKG_VERSION:=2011-11-15
+PKG_VERSION:=2011-12-01
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=0bb667c7fecbc244840d806df0604661
+PKG_MD5SUM:=8d1fe2fd6bbabc4fbbf31dfbf015c62c
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
@@ -704,7 +704,7 @@ define KernelPackage/iwl-legacy
$(call KernelPackage/mac80211/Default)
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
TITLE:=Intel legacy Wireless support
- FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl-legacy.ko
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwlegacy.ko
AUTOLOAD:=$(call AutoLoad,60,iwl-legacy)
endef
@@ -1169,7 +1169,7 @@ MAKE_OPTS:= \
CONFIG_LIB80211_CRYPT_CCMP=$(if $(CONFIG_PACKAGE_kmod-lib80211),m) \
CONFIG_LIB80211_CRYPT_TKIP=$(if $(CONFIG_PACKAGE_kmod-lib80211),m) \
CONFIG_IWLWIFI=$(if $(CONFIG_PACKAGE_kmod-iwlagn),m) \
- CONFIG_IWLWIFI_LEGACY=$(if $(CONFIG_PACKAGE_kmod-iwl-legacy),m) \
+ CONFIG_IWLEGACY=$(if $(CONFIG_PACKAGE_kmod-iwl-legacy),m) \
CONFIG_COMPAT_IWL4965=$(if $(CONFIG_PACKAGE_kmod-iwl4965),m) \
CONFIG_IWL3945=$(if $(CONFIG_PACKAGE_kmod-iwl3945),m) \
CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \
diff --git a/package/mac80211/patches/001-disable_b44.patch b/package/mac80211/patches/001-disable_b44.patch
index 547a453eac..52564d1d8d 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
-@@ -339,8 +339,8 @@ CONFIG_B43_BCMA_PIO=y
+@@ -378,8 +378,8 @@ CONFIG_B43_BCMA_PIO=y
CONFIG_P54_PCI=m
diff --git a/package/mac80211/patches/002-disable_rfkill.patch b/package/mac80211/patches/002-disable_rfkill.patch
index 4ba30479fa..82f31ae638 100644
--- a/package/mac80211/patches/002-disable_rfkill.patch
+++ b/package/mac80211/patches/002-disable_rfkill.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -87,7 +87,7 @@ endif # build check
+@@ -95,7 +95,7 @@ endif # build check
endif # kernel Makefile check
# These both are needed by compat-wireless || compat-bluetooth so enable them
@@ -9,7 +9,7 @@
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")
-@@ -632,10 +632,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
+@@ -671,10 +671,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
# 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_KERNEL_2_6_31
diff --git a/package/mac80211/patches/003-disable_bt.patch b/package/mac80211/patches/003-disable_bt.patch
index ebccddde6e..d93b0cd2c0 100644
--- a/package/mac80211/patches/003-disable_bt.patch
+++ b/package/mac80211/patches/003-disable_bt.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -109,8 +109,8 @@ ifndef CONFIG_COMPAT_KERNEL_2_6_27
+@@ -117,8 +117,8 @@ ifndef CONFIG_COMPAT_KERNEL_2_6_27
ifeq ($(CONFIG_BT),y)
# we'll ignore compiling bluetooth
else
diff --git a/package/mac80211/patches/005-disable_ssb_build.patch b/package/mac80211/patches/005-disable_ssb_build.patch
index ac95769059..8e898145e6 100644
--- a/package/mac80211/patches/005-disable_ssb_build.patch
+++ b/package/mac80211/patches/005-disable_ssb_build.patch
@@ -18,7 +18,7 @@
else
include $(KLIB_BUILD)/.config
endif
-@@ -315,7 +314,8 @@ CONFIG_IPW2200_QOS=y
+@@ -354,7 +353,8 @@ CONFIG_IPW2200_QOS=y
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
endif #CONFIG_WIRELESS_EXT
@@ -28,7 +28,7 @@
# Sonics Silicon Backplane
CONFIG_SSB_SPROM=y
-@@ -328,7 +328,7 @@ endif #CONFIG_PCMCIA
+@@ -367,7 +367,7 @@ endif #CONFIG_PCMCIA
# CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_B43_SSB=y
@@ -37,7 +37,7 @@
CONFIG_BCMA=m
CONFIG_BCMA_BLOCKIO=y
-@@ -535,7 +535,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
+@@ -574,7 +574,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
ifdef CONFIG_MMC
diff --git a/package/mac80211/patches/006-disable_bcma_build.patch b/package/mac80211/patches/006-disable_bcma_build.patch
index 8a82d7ed96..2d8cdd8f2b 100644
--- a/package/mac80211/patches/006-disable_bcma_build.patch
+++ b/package/mac80211/patches/006-disable_bcma_build.patch
@@ -10,7 +10,7 @@
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
--- a/config.mk
+++ b/config.mk
-@@ -330,12 +330,12 @@ CONFIG_SSB_DRIVER_PCICORE=y
+@@ -369,12 +369,12 @@ CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_B43_SSB=y
endif #__CONFIG_SSB
diff --git a/package/mac80211/patches/007-remove_misc_drivers.patch b/package/mac80211/patches/007-remove_misc_drivers.patch
index 0b4b26ef57..1181c42af5 100644
--- a/package/mac80211/patches/007-remove_misc_drivers.patch
+++ b/package/mac80211/patches/007-remove_misc_drivers.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -213,7 +213,7 @@ $(warning "WARNING: CONFIG_CFG80211_WEXT
+@@ -252,7 +252,7 @@ $(warning "WARNING: CONFIG_CFG80211_WEXT
endif #CONFIG_WIRELESS_EXT
ifdef CONFIG_STAGING
@@ -9,7 +9,7 @@
endif #CONFIG_STAGING
# mac80211 test driver
-@@ -367,13 +367,13 @@ endif #CONFIG_CRC_ITU_T
+@@ -406,13 +406,13 @@ endif #CONFIG_CRC_ITU_T
CONFIG_MWL8K=m
# Ethernet drivers go here
@@ -28,7 +28,7 @@
endif #CONFIG_COMPAT_KERNEL_2_6_27
ifdef CONFIG_WIRELESS_EXT
-@@ -432,21 +432,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
+@@ -471,21 +471,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add
ifdef CONFIG_COMPAT_KERNEL_2_6_29
diff --git a/package/mac80211/patches/009-remove_mac80211_module_dependence.patch b/package/mac80211/patches/009-remove_mac80211_module_dependence.patch
index ed67de27c9..2e3753e13c 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
-@@ -50,23 +50,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
+@@ -58,23 +58,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
endif
endif
diff --git a/package/mac80211/patches/010-no_pcmcia.patch b/package/mac80211/patches/010-no_pcmcia.patch
index f6b89d86bc..4cb88a96f9 100644
--- a/package/mac80211/patches/010-no_pcmcia.patch
+++ b/package/mac80211/patches/010-no_pcmcia.patch
@@ -9,7 +9,7 @@
else
include $(KLIB_BUILD)/.config
endif
-@@ -247,7 +247,7 @@ CONFIG_B43=m
+@@ -286,7 +286,7 @@ CONFIG_B43=m
CONFIG_B43_HWRNG=y
CONFIG_B43_PCI_AUTOSELECT=y
ifdef CONFIG_PCMCIA
diff --git a/package/mac80211/patches/011-no_sdio.patch b/package/mac80211/patches/011-no_sdio.patch
index fc2e6d9b60..919f1ac5ac 100644
--- a/package/mac80211/patches/011-no_sdio.patch
+++ b/package/mac80211/patches/011-no_sdio.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -518,7 +518,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
+@@ -557,7 +557,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
ifdef CONFIG_MMC
diff --git a/package/mac80211/patches/013-disable_b43_nphy.patch b/package/mac80211/patches/013-disable_b43_nphy.patch
index f9f13e21bd..287285fc03 100644
--- a/package/mac80211/patches/013-disable_b43_nphy.patch
+++ b/package/mac80211/patches/013-disable_b43_nphy.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -253,8 +253,8 @@ ifdef CONFIG_MAC80211_LEDS
+@@ -292,8 +292,8 @@ ifdef CONFIG_MAC80211_LEDS
CONFIG_B43_LEDS=y
endif #CONFIG_MAC80211_LEDS
CONFIG_B43_PHY_LP=y
diff --git a/package/mac80211/patches/015-remove-rt2x00-options.patch b/package/mac80211/patches/015-remove-rt2x00-options.patch
index 18490c584a..fdf34c3a14 100644
--- a/package/mac80211/patches/015-remove-rt2x00-options.patch
+++ b/package/mac80211/patches/015-remove-rt2x00-options.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -329,7 +329,7 @@ CONFIG_RTL8180=m
+@@ -368,7 +368,7 @@ CONFIG_RTL8180=m
CONFIG_ADM8211=m
@@ -9,7 +9,7 @@
CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m
ifdef CONFIG_CRC_CCITT
-@@ -467,7 +467,7 @@ CONFIG_RT2800USB_RT35XX=y
+@@ -506,7 +506,7 @@ CONFIG_RT2800USB_RT35XX=y
# CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_UNKNOWN=y
endif #CONFIG_CRC_CCITT
diff --git a/package/mac80211/patches/016-remove_pid_algo.patch b/package/mac80211/patches/016-remove_pid_algo.patch
index b003f4c525..9d22e75385 100644
--- a/package/mac80211/patches/016-remove_pid_algo.patch
+++ b/package/mac80211/patches/016-remove_pid_algo.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -124,7 +124,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+@@ -163,7 +163,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
# This is the one used by our compat-wireless net/mac80211/rate.c
# in case you have and old kernel which is overriding this to pid.
CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht
diff --git a/package/mac80211/patches/017-remove_ath9k_rc.patch b/package/mac80211/patches/017-remove_ath9k_rc.patch
index f3415564dd..ad1f1466d2 100644
--- a/package/mac80211/patches/017-remove_ath9k_rc.patch
+++ b/package/mac80211/patches/017-remove_ath9k_rc.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -220,7 +220,7 @@ CONFIG_ATH9K_COMMON=m
+@@ -259,7 +259,7 @@ CONFIG_ATH9K_COMMON=m
# as default once we get minstrel properly tested and blessed by
# our systems engineering team. CCK rates also need to be used
# for long range considerations.
diff --git a/package/mac80211/patches/019-remove_ath5k_pci_option.patch b/package/mac80211/patches/019-remove_ath5k_pci_option.patch
index 9de0418562..513d435d38 100644
--- a/package/mac80211/patches/019-remove_ath5k_pci_option.patch
+++ b/package/mac80211/patches/019-remove_ath5k_pci_option.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -225,7 +225,7 @@ CONFIG_ATH9K_COMMON=m
+@@ -264,7 +264,7 @@ CONFIG_ATH9K_COMMON=m
# PCI Drivers
ifdef CONFIG_PCI
@@ -8,4 +8,4 @@
+# CONFIG_ATH5K_PCI=y
CONFIG_ATH9K_PCI=y
- CONFIG_IWLAGN=m
+ CONFIG_IWLWIFI=m
diff --git a/package/mac80211/patches/021-add_include_for_bcma.patch b/package/mac80211/patches/021-add_include_for_bcma.patch
index 6d1bc64461..21b624e791 100644
--- a/package/mac80211/patches/021-add_include_for_bcma.patch
+++ b/package/mac80211/patches/021-add_include_for_bcma.patch
@@ -1,8 +1,8 @@
--- a/include/linux/compat-3.0.h
+++ b/include/linux/compat-3.0.h
-@@ -5,6 +5,8 @@
+@@ -7,6 +7,8 @@
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
+ #include <linux/rcupdate.h>
+#include <linux/mod_devicetable.h>
+
diff --git a/package/mac80211/patches/022-atomic64_backport.patch b/package/mac80211/patches/022-atomic64_backport.patch
deleted file mode 100644
index 673b7c336a..0000000000
--- a/package/mac80211/patches/022-atomic64_backport.patch
+++ /dev/null
@@ -1,91 +0,0 @@
---- a/compat/Makefile
-+++ b/compat/Makefile
-@@ -38,3 +38,8 @@ compat-$(CONFIG_COMPAT_KERNEL_3_1) += \
- cordic.o \
- crc8.o
-
-+ifndef CONFIG_64BIT
-+ifndef CONFIG_GENERIC_ATOMIC64
-+ compat-y += compat_atomic.o
-+endif
-+endif
---- a/include/linux/compat-2.6.31.h
-+++ b/include/linux/compat-2.6.31.h
-@@ -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
-+
-+typedef struct {
-+ long long counter;
-+} atomic64_t;
-+
-+extern long long atomic64_read(const atomic64_t *v);
-+extern long long atomic64_add_return(long long a, atomic64_t *v);
-+
-+#define atomic64_inc_return(v) atomic64_add_return(1LL, (v))
-+
-+#endif
-+
-+
- #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)) */
-
- #endif /* LINUX_26_31_COMPAT_H */
---- /dev/null
-+++ b/compat/compat_atomic.c
-@@ -0,0 +1,33 @@
-+#include <linux/spinlock.h>
-+#include <linux/module.h>
-+
-+#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)
-+{
-+ unsigned long flags;
-+ long long val;
-+
-+ spin_lock_irqsave(&lock, flags);
-+ val = v->counter;
-+ spin_unlock_irqrestore(&lock, flags);
-+ return val;
-+}
-+EXPORT_SYMBOL(atomic64_read);
-+
-+long long atomic64_add_return(long long a, atomic64_t *v)
-+{
-+ unsigned long flags;
-+ long long val;
-+
-+ spin_lock_irqsave(&lock, flags);
-+ val = v->counter += a;
-+ spin_unlock_irqrestore(&lock, flags);
-+ return val;
-+}
-+EXPORT_SYMBOL(atomic64_add_return);
-+
-+#endif
-+
---- a/include/linux/compat-3.1.h
-+++ b/include/linux/compat-3.1.h
-@@ -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
-+ * atomic64_t implementation, and do not include the software emulation from
-+ * asm-generic/atomic64_t.
-+ * Detect and handle this here.
-+ */
-+#include <asm/atomic.h>
-+
-+#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 <asm-generic/atomic64.h>
-+#endif
-+
- #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) */
-
- #endif /* LINUX_3_1_COMPAT_H */
diff --git a/package/mac80211/patches/050-compat_firmware.patch b/package/mac80211/patches/050-compat_firmware.patch
index c51c672139..af7c4fec62 100644
--- a/package/mac80211/patches/050-compat_firmware.patch
+++ b/package/mac80211/patches/050-compat_firmware.patch
@@ -17,7 +17,7 @@
compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o
--- a/compat/compat_firmware_class.c
+++ b/compat/compat_firmware_class.c
-@@ -729,19 +729,16 @@ request_firmware_nowait(
+@@ -741,19 +741,16 @@ request_firmware_nowait(
return 0;
}
diff --git a/package/mac80211/patches/051-compat_workqueue.patch b/package/mac80211/patches/051-compat_workqueue.patch
deleted file mode 100644
index d94507db71..0000000000
--- a/package/mac80211/patches/051-compat_workqueue.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/compat/compat-2.6.36.c
-+++ b/compat/compat-2.6.36.c
-@@ -93,6 +93,8 @@ void compat_usb_scuttle_anchored_urbs(st
- }
- EXPORT_SYMBOL_GPL(compat_usb_scuttle_anchored_urbs);
-
-+#endif /* CONFIG_COMPAT_USB_URB_THREAD_FIX */
-+
- struct workqueue_struct *system_nrt_wq __read_mostly;
- EXPORT_SYMBOL_GPL(system_nrt_wq);
-
-@@ -106,6 +108,3 @@ void compat_system_workqueue_destroy()
- {
- destroy_workqueue(system_nrt_wq);
- }
--
--#endif /* CONFIG_COMPAT_USB_URB_THREAD_FIX */
--
diff --git a/package/mac80211/patches/060-fix_compat_security.patch b/package/mac80211/patches/060-fix_compat_security.patch
new file mode 100644
index 0000000000..1942499913
--- /dev/null
+++ b/package/mac80211/patches/060-fix_compat_security.patch
@@ -0,0 +1,11 @@
+--- a/include/linux/compat-3.1.h
++++ b/include/linux/compat-3.1.h
+@@ -5,6 +5,8 @@
+
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
+
++#include <linux/security.h>
++
+ #define genl_dump_check_consistent(cb, user_hdr, family)
+
+ #define IFF_TX_SKB_SHARING 0x10000 /* The interface supports sharing
diff --git a/package/mac80211/patches/100-disable_pcmcia_compat.patch b/package/mac80211/patches/100-disable_pcmcia_compat.patch
index 52979ad880..fb5ae7d628 100644
--- a/package/mac80211/patches/100-disable_pcmcia_compat.patch
+++ b/package/mac80211/patches/100-disable_pcmcia_compat.patch
@@ -51,7 +51,7 @@
#include <pcmcia/cs_types.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
-@@ -68,9 +68,9 @@ static inline struct sk_buff *netdev_all
+@@ -74,9 +74,9 @@ static inline struct sk_buff *netdev_all
return skb;
}
diff --git a/package/mac80211/patches/110-disable_usb_compat.patch b/package/mac80211/patches/110-disable_usb_compat.patch
index 7318cf935d..67a5527939 100644
--- a/package/mac80211/patches/110-disable_usb_compat.patch
+++ b/package/mac80211/patches/110-disable_usb_compat.patch
@@ -33,7 +33,7 @@
#endif
--- a/config.mk
+++ b/config.mk
-@@ -453,7 +453,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
+@@ -492,7 +492,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
# This activates a threading fix for usb urb.
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
# This fix will be included in some stable releases.
diff --git a/package/mac80211/patches/120-pr_fmt_warnings.patch b/package/mac80211/patches/120-pr_fmt_warnings.patch
index 53add829ba..44c1f3c9c3 100644
--- a/package/mac80211/patches/120-pr_fmt_warnings.patch
+++ b/package/mac80211/patches/120-pr_fmt_warnings.patch
@@ -1,5 +1,5 @@
---- a/drivers/net/wireless/iwlegacy/iwl3945-base.c
-+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c
+--- a/drivers/net/wireless/iwlegacy/3945-mac.c
++++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -27,6 +27,7 @@
*
*****************************************************************************/
@@ -78,8 +78,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
---- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
-+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
+--- a/drivers/net/wireless/iwlegacy/4965-mac.c
++++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -27,6 +27,7 @@
*
*****************************************************************************/
diff --git a/package/mac80211/patches/130-fix_sublevel_check.patch b/package/mac80211/patches/130-fix_sublevel_check.patch
index b233311ab1..9dfa90af32 100644
--- a/package/mac80211/patches/130-fix_sublevel_check.patch
+++ b/package/mac80211/patches/130-fix_sublevel_check.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -20,16 +20,16 @@ COMPAT_LATEST_VERSION = 1
+@@ -20,16 +20,16 @@ COMPAT_LATEST_VERSION = 3
KERNEL_VERSION := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^\([0-9]\)\..*/\1/p')
ifneq ($(KERNEL_VERSION),2)
@@ -19,4 +19,4 @@
+COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(COMPAT_KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_3_$(ver)=y))
- ifdef CONFIG_COMPAT_KERNEL_2_6_24
+ RHEL_MAJOR := $(shell grep ^RHEL_MAJOR $(KLIB_BUILD)/Makefile | sed -n 's/.*= *\(.*\)/\1/p')
diff --git a/package/mac80211/patches/140-mesh_pathtbl_backport.patch b/package/mac80211/patches/140-mesh_pathtbl_backport.patch
index 2a3591373d..817060d42a 100644
--- a/package/mac80211/patches/140-mesh_pathtbl_backport.patch
+++ b/package/mac80211/patches/140-mesh_pathtbl_backport.patch
@@ -1,6 +1,6 @@
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
-@@ -841,7 +841,6 @@ static void table_flush_by_iface(struct
+@@ -826,7 +826,6 @@ static void table_flush_by_iface(struct
struct hlist_node *p;
int i;
diff --git a/package/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch b/package/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
index c1f18af080..72274eefe9 100644
--- a/package/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
+++ b/package/mac80211/patches/201-ath5k-WAR-for-AR71xx-PCI-bug.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath5k/initvals.c
+++ b/drivers/net/wireless/ath/ath5k/initvals.c
-@@ -57,8 +57,14 @@ static const struct ath5k_ini ar5210_ini
+@@ -60,8 +60,14 @@ static const struct ath5k_ini ar5210_ini
{ AR5K_IMR, 0 },
{ AR5K_IER, AR5K_IER_DISABLE },
{ AR5K_BSR, 0, AR5K_INI_READ },
@@ -17,7 +17,7 @@
{ AR5K_RXNOFRM, 8 },
--- a/drivers/net/wireless/ath/ath5k/dma.c
+++ b/drivers/net/wireless/ath/ath5k/dma.c
-@@ -786,10 +786,18 @@ void ath5k_hw_dma_init(struct ath5k_hw *
+@@ -858,10 +858,18 @@ ath5k_hw_dma_init(struct ath5k_hw *ah)
* guess we can tweak it and see how it goes ;-)
*/
if (ah->ah_version != AR5K_AR5210) {
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index e86505368d..4493579131 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -1,3 +1,59 @@
+--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+@@ -203,7 +203,7 @@ static void ar9002_hw_iqcalibrate(struct
+ i);
+
+ ath_dbg(common, ATH_DBG_CALIBRATE,
+- "Orignal: Chn %diq_corr_meas = 0x%08x\n",
++ "Original: Chn %d iq_corr_meas = 0x%08x\n",
+ i, ah->totalIqCorrMeas[i]);
+
+ iqCorrNeg = 0;
+--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
+@@ -226,7 +226,7 @@ static void ar9003_hw_iqcalibrate(struct
+ i);
+
+ ath_dbg(common, ATH_DBG_CALIBRATE,
+- "Orignal: Chn %diq_corr_meas = 0x%08x\n",
++ "Original: Chn %d iq_corr_meas = 0x%08x\n",
+ i, ah->totalIqCorrMeas[i]);
+
+ iqCorrNeg = 0;
+--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
++++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+@@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_stru
+ }
+
+ /* Verify whether we must check ANI */
+- if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
++ if (ah->config.enable_ani &&
++ (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
+ aniflag = true;
+ common->ani.checkani_timer = timestamp;
+ }
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -504,7 +504,7 @@ static int ath9k_hw_post_init(struct ath
+ return ecode;
+ }
+
+- if (!AR_SREV_9100(ah) && !AR_SREV_9340(ah)) {
++ if (ah->config.enable_ani) {
+ ath9k_hw_ani_setup(ah);
+ ath9k_hw_ani_init(ah);
+ }
+@@ -610,6 +610,10 @@ static int __ath9k_hw_init(struct ath_hw
+ if (!AR_SREV_9300_20_OR_LATER(ah))
+ ah->ani_function &= ~ATH9K_ANI_MRC_CCK;
+
++ /* disable ANI for 9340 */
++ if (AR_SREV_9340(ah))
++ ah->config.enable_ani = false;
++
+ ath9k_hw_init_mode_regs(ah);
+
+ if (!ah->is_pciexpress)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -118,7 +118,7 @@ void ath9k_ps_restore(struct ath_softc *
@@ -19,7 +75,48 @@
fastcc = false;
if (!ath_prepare_reset(sc, retry_tx, flush))
-@@ -882,82 +883,6 @@ chip_reset:
+@@ -561,7 +562,6 @@ void ath_ani_calibrate(unsigned long dat
+ /* Long calibration runs independently of short calibration. */
+ if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
+ longcal = true;
+- ath_dbg(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
+ common->ani.longcal_timer = timestamp;
+ }
+
+@@ -569,8 +569,6 @@ void ath_ani_calibrate(unsigned long dat
+ if (!common->ani.caldone) {
+ if ((timestamp - common->ani.shortcal_timer) >= short_cal_interval) {
+ shortcal = true;
+- ath_dbg(common, ATH_DBG_ANI,
+- "shortcal @%lu\n", jiffies);
+ common->ani.shortcal_timer = timestamp;
+ common->ani.resetcal_timer = timestamp;
+ }
+@@ -584,8 +582,9 @@ void ath_ani_calibrate(unsigned long dat
+ }
+
+ /* Verify whether we must check ANI */
+- if ((timestamp - common->ani.checkani_timer) >=
+- ah->config.ani_poll_interval) {
++ if (sc->sc_ah->config.enable_ani
++ && (timestamp - common->ani.checkani_timer) >=
++ ah->config.ani_poll_interval) {
+ aniflag = true;
+ common->ani.checkani_timer = timestamp;
+ }
+@@ -605,6 +604,11 @@ void ath_ani_calibrate(unsigned long dat
+ ah->rxchainmask, longcal);
+ }
+
++ ath_dbg(common, ATH_DBG_ANI,
++ "Calibration @%lu finished: %s %s %s, caldone: %s\n", jiffies,
++ longcal ? "long" : "", shortcal ? "short" : "",
++ aniflag ? "ani" : "", common->ani.caldone ? "true" : "false");
++
+ ath9k_ps_restore(sc);
+
+ set_timer:
+@@ -886,82 +890,6 @@ chip_reset:
#undef SCHED_INTR
}
@@ -102,7 +199,7 @@
static int ath_reset(struct ath_softc *sc, bool retry_tx)
{
int r;
-@@ -1093,6 +1018,9 @@ static int ath9k_start(struct ieee80211_
+@@ -1097,6 +1025,9 @@ static int ath9k_start(struct ieee80211_
* and then setup of the interrupt mask.
*/
spin_lock_bh(&sc->sc_pcu_lock);
@@ -112,7 +209,7 @@
r = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
if (r) {
ath_err(common,
-@@ -1131,6 +1059,18 @@ static int ath9k_start(struct ieee80211_
+@@ -1138,6 +1069,18 @@ static int ath9k_start(struct ieee80211_
goto mutex_unlock;
}
@@ -131,7 +228,7 @@
spin_unlock_bh(&sc->sc_pcu_lock);
if ((ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) &&
-@@ -1176,6 +1116,13 @@ static void ath9k_tx(struct ieee80211_hw
+@@ -1183,6 +1126,13 @@ static void ath9k_tx(struct ieee80211_hw
}
}
@@ -145,7 +242,7 @@
if (unlikely(sc->sc_ah->power_mode != ATH9K_PM_AWAKE)) {
/*
* We are using PS-Poll and mac80211 can request TX while in
-@@ -1222,6 +1169,7 @@ static void ath9k_stop(struct ieee80211_
+@@ -1229,6 +1179,7 @@ static void ath9k_stop(struct ieee80211_
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
@@ -153,7 +250,7 @@
mutex_lock(&sc->mutex);
-@@ -1252,35 +1200,45 @@ static void ath9k_stop(struct ieee80211_
+@@ -1259,35 +1210,45 @@ static void ath9k_stop(struct ieee80211_
* before setting the invalid flag. */
ath9k_hw_disable_interrupts(ah);
@@ -216,7 +313,7 @@
mutex_unlock(&sc->mutex);
-@@ -1620,8 +1578,8 @@ static int ath9k_config(struct ieee80211
+@@ -1627,8 +1588,8 @@ static int ath9k_config(struct ieee80211
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &hw->conf;
@@ -226,7 +323,7 @@
mutex_lock(&sc->mutex);
/*
-@@ -1632,13 +1590,8 @@ static int ath9k_config(struct ieee80211
+@@ -1639,13 +1600,8 @@ static int ath9k_config(struct ieee80211
*/
if (changed & IEEE80211_CONF_CHANGE_IDLE) {
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
@@ -242,7 +339,7 @@
}
/*
-@@ -1745,18 +1698,12 @@ static int ath9k_config(struct ieee80211
+@@ -1752,18 +1708,12 @@ static int ath9k_config(struct ieee80211
ath_dbg(common, ATH_DBG_CONFIG,
"Set power: %d\n", conf->power_level);
sc->config.txpowlimit = 2 * conf->power_level;
@@ -262,7 +359,7 @@
return 0;
}
-@@ -2324,9 +2271,6 @@ static void ath9k_flush(struct ieee80211
+@@ -2331,9 +2281,6 @@ static void ath9k_flush(struct ieee80211
return;
}
@@ -272,7 +369,7 @@
for (j = 0; j < timeout; j++) {
bool npend = false;
-@@ -2344,21 +2288,22 @@ static void ath9k_flush(struct ieee80211
+@@ -2351,21 +2298,22 @@ static void ath9k_flush(struct ieee80211
}
if (!npend)
@@ -346,36 +443,7 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -179,6 +179,11 @@ static void ath_tx_flush_tid(struct ath_
- spin_lock_bh(&txq->axq_lock);
- }
-
-+ if (tid->baw_head == tid->baw_tail) {
-+ tid->state &= ~AGGR_ADDBA_COMPLETE;
-+ tid->state &= ~AGGR_CLEANUP;
-+ }
-+
- spin_unlock_bh(&txq->axq_lock);
- }
-
-@@ -556,15 +561,9 @@ static void ath_tx_complete_aggr(struct
- spin_unlock_bh(&txq->axq_lock);
- }
-
-- if (tid->state & AGGR_CLEANUP) {
-+ if (tid->state & AGGR_CLEANUP)
- ath_tx_flush_tid(sc, tid);
-
-- if (tid->baw_head == tid->baw_tail) {
-- tid->state &= ~AGGR_ADDBA_COMPLETE;
-- tid->state &= ~AGGR_CLEANUP;
-- }
-- }
--
- rcu_read_unlock();
-
- if (needreset) {
-@@ -1955,7 +1954,7 @@ static void ath_tx_complete(struct ath_s
+@@ -1954,7 +1954,7 @@ static void ath_tx_complete(struct ath_s
skb_pull(skb, padsize);
}
@@ -384,9 +452,23 @@
sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
ath_dbg(common, ATH_DBG_PS,
"Going back to sleep after having received TX status (0x%lx)\n",
+--- a/include/linux/nl80211.h
++++ b/include/linux/nl80211.h
+@@ -2785,9 +2785,11 @@ enum nl80211_ap_sme_features {
+ * @NL80211_FEATURE_SK_TX_STATUS: This driver supports reflecting back
+ * TX status to the socket error queue when requested with the
+ * socket option.
++ * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates.
+ */
+ enum nl80211_feature_flags {
+ NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
++ NL80211_FEATURE_HT_IBSS = 1 << 1,
+ };
+
+ /**
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -1130,6 +1130,7 @@ struct cfg80211_ibss_params {
+@@ -1149,6 +1149,7 @@ struct cfg80211_ibss_params {
u8 *ssid;
u8 *bssid;
struct ieee80211_channel *channel;
@@ -394,33 +476,33 @@
u8 *ie;
u8 ssid_len, ie_len;
u16 beacon_interval;
-@@ -3292,6 +3293,16 @@ void cfg80211_report_obss_beacon(struct
+@@ -3270,6 +3271,16 @@ void cfg80211_report_obss_beacon(struct
const u8 *frame, size_t len,
int freq, gfp_t gfp);
-+/**
-+ * cfg80211_can_use_ext_chan - test if ht40 on extension channel can be used
++/*
++ * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used
+ * @wiphy: the wiphy
+ * @chan: main channel
+ * @channel_type: HT mode
+ */
-+bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
-+ struct ieee80211_channel *chan,
-+ enum nl80211_channel_type channel_type);
++int cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
++ struct ieee80211_channel *chan,
++ enum nl80211_channel_type channel_type);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
-@@ -182,6 +182,10 @@ static void ieee80211_send_addba_resp(st
+@@ -185,6 +185,10 @@ static void ieee80211_send_addba_resp(st
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
-+ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
-+ memcpy(mgmt->bssid, da, ETH_ALEN);
+ else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+ memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
++ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
++ memcpy(mgmt->bssid, da, ETH_ALEN);
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION);
@@ -441,28 +523,56 @@
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION);
-@@ -394,7 +397,9 @@ int ieee80211_start_tx_ba_session(struct
+@@ -437,7 +440,9 @@ int ieee80211_start_tx_ba_session(struct
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
- sdata->vif.type != NL80211_IFTYPE_AP)
+ sdata->vif.type != NL80211_IFTYPE_AP &&
-+ sdata->vif.type != NL80211_IFTYPE_ADHOC &&
-+ sdata->vif.type != NL80211_IFTYPE_WDS)
++ sdata->vif.type != NL80211_IFTYPE_WDS &&
++ sdata->vif.type != NL80211_IFTYPE_ADHOC)
return -EINVAL;
if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
+@@ -448,6 +453,27 @@ int ieee80211_start_tx_ba_session(struct
+ return -EINVAL;
+ }
+
++ /*
++ * 802.11n-2009 11.5.1.1: If the initiating STA is an HT STA, is a
++ * member of an IBSS, and has no other existing Block Ack agreement
++ * with the recipient STA, then the initiating STA shall transmit a
++ * Probe Request frame to the recipient STA and shall not transmit an
++ * ADDBA Request frame unless it receives a Probe Response frame
++ * from the recipient within dot11ADDBAFailureTimeout.
++ *
++ * The probe request mechanism for ADDBA is currently not implemented,
++ * but we only build up Block Ack session with HT STAs. This information
++ * is set when we receive a bss info from a probe response or a beacon.
++ */
++ if (sta->sdata->vif.type == NL80211_IFTYPE_ADHOC &&
++ !sta->sta.ht_cap.ht_supported) {
++#ifdef CONFIG_MAC80211_HT_DEBUG
++ printk(KERN_DEBUG "BA request denied - IBSS STA %pM"
++ "does not advertise HT support\n", pubsta->addr);
++#endif /* CONFIG_MAC80211_HT_DEBUG */
++ return -EINVAL;
++ }
++
+ spin_lock_bh(&sta->lock);
+
+ /* we have tried too many times, receiver does not want A-MPDU */
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -63,11 +63,11 @@ static ssize_t sta_flags_read(struct fil
test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
int res = scnprintf(buf, sizeof(buf),
-- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
-+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
+- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
++ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
TEST(AUTH), TEST(ASSOC), TEST(PS_STA),
TEST(PS_DRIVER), TEST(AUTHORIZED),
- TEST(SHORT_PREAMBLE), TEST(ASSOC_AP),
+ TEST(SHORT_PREAMBLE),
- TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT),
+ TEST(WME), TEST(CLEAR_PS_FILT),
TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
@@ -470,7 +580,7 @@
TEST(TDLS_PEER_AUTH));
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
-@@ -201,6 +201,8 @@ void ieee80211_send_delba(struct ieee802
+@@ -282,6 +282,8 @@ void ieee80211_send_delba(struct ieee802
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
@@ -508,7 +618,7 @@
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
sband = local->hw.wiphy->bands[chan->band];
-@@ -172,6 +181,18 @@ static void __ieee80211_sta_join_ibss(st
+@@ -172,6 +181,19 @@ static void __ieee80211_sta_join_ibss(st
memcpy(skb_put(skb, ifibss->ie_len),
ifibss->ie, ifibss->ie_len);
@@ -517,7 +627,8 @@
+ pos = skb_put(skb, 4 +
+ sizeof(struct ieee80211_ht_cap) +
+ sizeof(struct ieee80211_ht_info));
-+ pos = ieee80211_ie_build_ht_cap(pos, sband, sband->ht_cap.cap);
++ pos = ieee80211_ie_build_ht_cap(pos, &sband->ht_cap,
++ sband->ht_cap.cap);
+ pos = ieee80211_ie_build_ht_info(pos,
+ &sband->ht_cap,
+ chan,
@@ -527,7 +638,7 @@
if (local->hw.queues >= 4) {
pos = skb_put(skb, 9);
*pos++ = WLAN_EID_VENDOR_SPECIFIC;
-@@ -195,6 +216,7 @@ static void __ieee80211_sta_join_ibss(st
+@@ -195,6 +217,7 @@ static void __ieee80211_sta_join_ibss(st
bss_change |= BSS_CHANGED_BEACON;
bss_change |= BSS_CHANGED_BEACON_ENABLED;
bss_change |= BSS_CHANGED_BASIC_RATES;
@@ -535,72 +646,69 @@
bss_change |= BSS_CHANGED_IBSS;
sdata->vif.bss_conf.ibss_joined = true;
ieee80211_bss_info_change_notify(sdata, bss_change);
-@@ -268,6 +290,7 @@ static void ieee80211_rx_bss_info(struct
+@@ -268,6 +291,8 @@ static void ieee80211_rx_bss_info(struct
u64 beacon_timestamp, rx_timestamp;
u32 supp_rates = 0;
enum ieee80211_band band = rx_status->band;
+ struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
++ bool rates_updated = false;
if (elems->ds_params && elems->ds_params_len == 1)
freq = ieee80211_channel_to_frequency(elems->ds_params[0],
-@@ -277,7 +300,10 @@ static void ieee80211_rx_bss_info(struct
-
- channel = ieee80211_get_channel(local->hw.wiphy, freq);
-
-- if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
-+ if (!channel ||
-+ channel->flags & (IEEE80211_CHAN_DISABLED ||
-+ IEEE80211_CHAN_NO_IBSS ||
-+ IEEE80211_CHAN_RADAR))
- return;
-
- if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
-@@ -315,8 +341,41 @@ static void ieee80211_rx_bss_info(struct
- GFP_ATOMIC);
- }
-
-- if (sta && elems->wmm_info)
-- set_sta_flag(sta, WLAN_STA_WME);
-+ if (sta) {
-+ if (elems->wmm_info)
-+ set_sta_flag(sta, WLAN_STA_WME);
-+
+@@ -307,7 +332,7 @@ static void ieee80211_rx_bss_info(struct
+ prev_rates,
+ sta->sta.supp_rates[band]);
+ #endif
+- rate_control_rate_init(sta);
++ rates_updated = true;
+ }
+ } else
+ sta = ieee80211_ibss_add_sta(sdata, mgmt->bssid,
+@@ -318,6 +343,39 @@ static void ieee80211_rx_bss_info(struct
+ if (sta && elems->wmm_info)
+ set_sta_flag(sta, WLAN_STA_WME);
+
++ if (sta && elems->ht_info_elem && elems->ht_cap_elem &&
++ sdata->u.ibss.channel_type != NL80211_CHAN_NO_HT) {
+ /* we both use HT */
-+ if (elems->ht_info_elem && elems->ht_cap_elem &&
-+ sdata->u.ibss.channel_type) {
-+ enum nl80211_channel_type channel_type =
-+ ieee80211_ht_info_to_channel_type(
-+ elems->ht_info_elem);
-+ struct ieee80211_sta_ht_cap sta_ht_cap_new;
-+
-+ /*
-+ * fall back to HT20 if we don't use or use
-+ * the other extension channel
-+ */
-+ if (channel_type > NL80211_CHAN_HT20 &&
-+ channel_type != sdata->u.ibss.channel_type)
-+ channel_type = NL80211_CHAN_HT20;
-+
-+ ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
-+ elems->ht_cap_elem,
-+ &sta_ht_cap_new);
-+ if (memcmp(&sta->sta.ht_cap, &sta_ht_cap_new,
-+ sizeof(sta_ht_cap_new))) {
-+ memcpy(&sta->sta.ht_cap,
-+ &sta_ht_cap_new,
-+ sizeof(sta_ht_cap_new));
-+ rate_control_rate_update(local, sband,
-+ sta,
-+ IEEE80211_RC_HT_CHANGED,
-+ channel_type);
-+ }
++ struct ieee80211_sta_ht_cap sta_ht_cap_new;
++ enum nl80211_channel_type channel_type =
++ ieee80211_ht_info_to_channel_type(
++ elems->ht_info_elem);
++
++ ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
++ elems->ht_cap_elem,
++ &sta_ht_cap_new);
++
++ /*
++ * fall back to HT20 if we don't use or use
++ * the other extension channel
++ */
++ if ((channel_type == NL80211_CHAN_HT40MINUS ||
++ channel_type == NL80211_CHAN_HT40PLUS) &&
++ channel_type != sdata->u.ibss.channel_type)
++ sta_ht_cap_new.cap &=
++ ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
++
++ if (memcmp(&sta->sta.ht_cap, &sta_ht_cap_new,
++ sizeof(sta_ht_cap_new))) {
++ memcpy(&sta->sta.ht_cap, &sta_ht_cap_new,
++ sizeof(sta_ht_cap_new));
++ rates_updated = true;
+ }
+ }
-
++
++ if (sta && rates_updated)
++ rate_control_rate_init(sta);
++
rcu_read_unlock();
}
-@@ -898,10 +957,15 @@ int ieee80211_ibss_join(struct ieee80211
+
+@@ -896,12 +954,18 @@ int ieee80211_ibss_join(struct ieee80211
+ struct cfg80211_ibss_params *params)
+ {
struct sk_buff *skb;
++ u32 changed = 0;
skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom +
- 36 /* bitrates */ +
@@ -637,9 +745,33 @@
}
if (params->ie) {
+@@ -951,6 +1017,23 @@ int ieee80211_ibss_join(struct ieee80211
+ ieee80211_recalc_idle(sdata->local);
+ mutex_unlock(&sdata->local->mtx);
+
++ /*
++ * 802.11n-2009 9.13.3.1: In an IBSS, the HT Protection field is
++ * reserved, but an HT STA shall protect HT transmissions as though
++ * the HT Protection field were set to non-HT mixed mode.
++ *
++ * In an IBSS, the RIFS Mode field of the HT Operation element is
++ * also reserved, but an HT STA shall operate as though this field
++ * were set to 1.
++ */
++
++ sdata->vif.bss_conf.ht_operation_mode |=
++ IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED
++ | IEEE80211_HT_PARAM_RIFS_MODE;
++
++ changed |= BSS_CHANGED_HT;
++ ieee80211_bss_info_change_notify(sdata, changed);
++
+ ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+
+ return 0;
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -470,6 +470,7 @@ struct ieee80211_if_ibss {
+@@ -474,6 +474,7 @@ struct ieee80211_if_ibss {
u8 ssid_len, ie_len;
u8 *ie;
struct ieee80211_channel *channel;
@@ -695,7 +827,7 @@
err_stop:
if (!local->open_count)
drv_stop(local);
-@@ -732,6 +709,70 @@ static void ieee80211_if_setup(struct ne
+@@ -719,6 +696,70 @@ static void ieee80211_if_setup(struct ne
dev->destructor = free_netdev;
}
@@ -748,7 +880,7 @@
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
+
+ if (elems.ht_cap_elem)
-+ ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
++ ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
+ elems.ht_cap_elem, &sta->sta.ht_cap);
+
+ if (elems.wmm_param)
@@ -766,7 +898,7 @@
static void ieee80211_iface_work(struct work_struct *work)
{
struct ieee80211_sub_if_data *sdata =
-@@ -836,6 +877,9 @@ static void ieee80211_iface_work(struct
+@@ -823,6 +864,9 @@ static void ieee80211_iface_work(struct
break;
ieee80211_mesh_rx_queued_mgmt(sdata, skb);
break;
@@ -776,85 +908,32 @@
default:
WARN(1, "frame for unexpected interface type");
break;
---- a/net/mac80211/mlme.c
-+++ b/net/mac80211/mlme.c
-@@ -1359,9 +1359,6 @@ static void __ieee80211_connection_loss(
- ieee80211_set_disassoc(sdata, true, true);
- mutex_unlock(&ifmgd->mtx);
-
-- mutex_lock(&local->mtx);
-- ieee80211_recalc_idle(local);
-- mutex_unlock(&local->mtx);
- /*
- * must be outside lock due to cfg80211,
- * but that's not a problem.
-@@ -1370,6 +1367,10 @@ static void __ieee80211_connection_loss(
- IEEE80211_STYPE_DEAUTH,
- WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY,
- NULL, true);
-+
-+ mutex_lock(&local->mtx);
-+ ieee80211_recalc_idle(local);
-+ mutex_unlock(&local->mtx);
- }
-
- void ieee80211_beacon_connection_loss_work(struct work_struct *work)
-@@ -2136,9 +2137,6 @@ static void ieee80211_sta_connection_los
-
- ieee80211_set_disassoc(sdata, true, true);
- mutex_unlock(&ifmgd->mtx);
-- mutex_lock(&local->mtx);
-- ieee80211_recalc_idle(local);
-- mutex_unlock(&local->mtx);
- /*
- * must be outside lock due to cfg80211,
- * but that's not a problem.
-@@ -2146,6 +2144,11 @@ static void ieee80211_sta_connection_los
- ieee80211_send_deauth_disassoc(sdata, bssid,
- IEEE80211_STYPE_DEAUTH, reason,
- NULL, true);
-+
-+ mutex_lock(&local->mtx);
-+ ieee80211_recalc_idle(local);
-+ mutex_unlock(&local->mtx);
-+
- mutex_lock(&ifmgd->mtx);
- }
-
---- a/net/mac80211/offchannel.c
-+++ b/net/mac80211/offchannel.c
-@@ -212,8 +212,6 @@ static void ieee80211_hw_roc_start(struc
- return;
- }
-
-- ieee80211_recalc_idle(local);
--
- if (local->hw_roc_skb) {
- sdata = IEEE80211_DEV_TO_SUB_IF(local->hw_roc_dev);
- ieee80211_tx_skb(sdata, local->hw_roc_skb);
-@@ -227,6 +225,8 @@ static void ieee80211_hw_roc_start(struc
- GFP_KERNEL);
- }
-
-+ ieee80211_recalc_idle(local);
-+
- mutex_unlock(&local->mtx);
- }
-
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -574,7 +574,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(
+ WIPHY_FLAG_OFFCHAN_TX |
+ WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
+
+- wiphy->features = NL80211_FEATURE_SK_TX_STATUS;
++ wiphy->features = NL80211_FEATURE_SK_TX_STATUS |
++ NL80211_FEATURE_HT_IBSS;
+
+ if (!ops->set_key)
+ wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2250,7 +2250,9 @@ ieee80211_rx_h_action(struct ieee80211_r
+@@ -2237,7 +2237,9 @@ ieee80211_rx_h_action(struct ieee80211_r
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
- sdata->vif.type != NL80211_IFTYPE_AP)
+ sdata->vif.type != NL80211_IFTYPE_AP &&
-+ sdata->vif.type != NL80211_IFTYPE_ADHOC &&
-+ sdata->vif.type != NL80211_IFTYPE_WDS)
++ sdata->vif.type != NL80211_IFTYPE_WDS &&
++ sdata->vif.type != NL80211_IFTYPE_ADHOC)
break;
/* verify action_code is present */
-@@ -2465,13 +2467,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
+@@ -2452,13 +2454,14 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
if (!ieee80211_vif_is_mesh(&sdata->vif) &&
sdata->vif.type != NL80211_IFTYPE_ADHOC &&
@@ -871,7 +950,7 @@
break;
case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
case cpu_to_le16(IEEE80211_STYPE_DISASSOC):
-@@ -2818,10 +2821,16 @@ static int prepare_for_handlers(struct i
+@@ -2805,10 +2808,16 @@ static int prepare_for_handlers(struct i
}
break;
case NL80211_IFTYPE_WDS:
@@ -892,38 +971,60 @@
/* should never get here */
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
-@@ -32,7 +32,6 @@
+@@ -31,7 +31,6 @@
+ * @WLAN_STA_SHORT_PREAMBLE: Station is capable of receiving short-preamble
* frames.
- * @WLAN_STA_ASSOC_AP: We're associated to that station, it is an AP.
* @WLAN_STA_WME: Station is a QoS-STA.
- * @WLAN_STA_WDS: Station is one of our WDS peers.
* @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
* IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
* frame to this station is transmitted.
-@@ -62,7 +61,6 @@ enum ieee80211_sta_info_flags {
+@@ -60,7 +59,6 @@ enum ieee80211_sta_info_flags {
+ WLAN_STA_AUTHORIZED,
WLAN_STA_SHORT_PREAMBLE,
- WLAN_STA_ASSOC_AP,
WLAN_STA_WME,
- WLAN_STA_WDS,
WLAN_STA_CLEAR_PS_FILT,
WLAN_STA_MFP,
WLAN_STA_BLOCK_BA,
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -1612,6 +1612,11 @@ u8 *ieee80211_ie_build_ht_info(u8 *pos,
+ }
+ if (ht_cap->cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)
+ ht_info->ht_param |= IEEE80211_HT_PARAM_CHAN_WIDTH_ANY;
++
++ /*
++ * Note: According to 802.11n-2009 9.13.3.1, HT Protection field and
++ * RIFS Mode are reserved in IBSS mode, therefore keep them at 0
++ */
+ ht_info->operation_mode = 0x0000;
+ ht_info->stbc_param = 0x0000;
+
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
-@@ -44,9 +44,9 @@ rdev_freq_to_chan(struct cfg80211_regist
+@@ -6,6 +6,7 @@
+ * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
+ */
+
++#include <linux/export.h>
+ #include <net/cfg80211.h>
+ #include "core.h"
+
+@@ -44,9 +45,9 @@ rdev_freq_to_chan(struct cfg80211_regist
return chan;
}
-static bool can_beacon_sec_chan(struct wiphy *wiphy,
- struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type)
-+bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
++int cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
+ struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type)
{
struct ieee80211_channel *sec_chan;
int diff;
-@@ -75,6 +75,7 @@ static bool can_beacon_sec_chan(struct w
+@@ -75,6 +76,7 @@ static bool can_beacon_sec_chan(struct w
return true;
}
@@ -931,7 +1032,7 @@
int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, int freq,
-@@ -109,8 +110,8 @@ int cfg80211_set_freq(struct cfg80211_re
+@@ -109,8 +111,8 @@ int cfg80211_set_freq(struct cfg80211_re
switch (channel_type) {
case NL80211_CHAN_HT40PLUS:
case NL80211_CHAN_HT40MINUS:
@@ -944,7 +1045,7 @@
"allowed to initiate communication\n");
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -4604,13 +4604,34 @@ static int nl80211_join_ibss(struct sk_b
+@@ -4684,13 +4684,41 @@ static int nl80211_join_ibss(struct sk_b
ibss.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
}
@@ -955,8 +1056,16 @@
+
+ channel_type = nla_get_u32(
+ info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]);
-+ if (channel_type > NL80211_CHAN_HT40PLUS)
++ if (channel_type != NL80211_CHAN_NO_HT &&
++ channel_type != NL80211_CHAN_HT20 &&
++ channel_type != NL80211_CHAN_HT40MINUS &&
++ channel_type != NL80211_CHAN_HT40PLUS)
+ return -EINVAL;
++
++ if (channel_type != NL80211_CHAN_NO_HT &&
++ !(wiphy->features & NL80211_FEATURE_HT_IBSS))
++ return -EINVAL;
++
+ ibss.channel_type = channel_type;
+ } else {
+ ibss.channel_type = NL80211_CHAN_NO_HT;
@@ -966,7 +1075,6 @@
+ nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]),
+ ibss.channel_type);
if (!ibss.channel ||
-+ ibss.channel->flags & IEEE80211_CHAN_RADAR ||
ibss.channel->flags & IEEE80211_CHAN_NO_IBSS ||
ibss.channel->flags & IEEE80211_CHAN_DISABLED)
return -EINVAL;
diff --git a/package/mac80211/patches/406-regd_no_assoc_hints.patch b/package/mac80211/patches/406-regd_no_assoc_hints.patch
index 19336830fe..8ed03c6430 100644
--- a/package/mac80211/patches/406-regd_no_assoc_hints.patch
+++ b/package/mac80211/patches/406-regd_no_assoc_hints.patch
@@ -1,6 +1,6 @@
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
-@@ -1656,6 +1656,8 @@ void regulatory_hint_11d(struct wiphy *w
+@@ -1672,6 +1672,8 @@ void regulatory_hint_11d(struct wiphy *w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request;
@@ -9,7 +9,7 @@
mutex_lock(&reg_mutex);
if (unlikely(!last_request))
-@@ -1862,6 +1864,8 @@ static void restore_regulatory_settings(
+@@ -1878,6 +1880,8 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void)
{
diff --git a/package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch b/package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
index 0dbb950319..09522cda6e 100644
--- a/package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
+++ b/package/mac80211/patches/410-ath9k_allow_adhoc_and_ap.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1448,15 +1448,6 @@ static int ath9k_add_interface(struct ie
+@@ -1458,15 +1458,6 @@ static int ath9k_add_interface(struct ie
}
}
@@ -16,7 +16,7 @@
ath_dbg(common, ATH_DBG_CONFIG,
"Attach a VIF of type: %d\n", vif->type);
-@@ -1482,15 +1473,6 @@ static int ath9k_change_interface(struct
+@@ -1492,15 +1483,6 @@ static int ath9k_change_interface(struct
mutex_lock(&sc->mutex);
ath9k_ps_wakeup(sc);
diff --git a/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch b/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
index a964e70e52..29a79569c9 100644
--- a/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
+++ b/package/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
@@ -18,7 +18,7 @@
goto end;
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -1860,7 +1860,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
+@@ -1867,7 +1867,7 @@ ath5k_beacon_send(struct ath5k_hw *ah)
ah->bmisscount = 0;
}
@@ -27,7 +27,7 @@
ah->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf);
-@@ -1945,7 +1945,7 @@ ath5k_beacon_update_timers(struct ath5k_
+@@ -1952,7 +1952,7 @@ ath5k_beacon_update_timers(struct ath5k_
u64 hw_tsf;
intval = ah->bintval & AR5K_BEACON_PERIOD;
diff --git a/package/mac80211/patches/430-ath5k_disable_fast_cc.patch b/package/mac80211/patches/430-ath5k_disable_fast_cc.patch
index 8ca821ced6..1948714313 100644
--- a/package/mac80211/patches/430-ath5k_disable_fast_cc.patch
+++ b/package/mac80211/patches/430-ath5k_disable_fast_cc.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
-@@ -1040,6 +1040,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
+@@ -1152,6 +1152,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum
tsf_lo = 0;
mode = 0;
@@ -8,7 +8,7 @@
/*
* Sanity check for fast flag
* Fast channel change only available
-@@ -1047,6 +1048,7 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
+@@ -1159,6 +1160,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum
*/
if (fast && (ah->ah_radio != AR5K_RF2413) &&
(ah->ah_radio != AR5K_RF5413))
diff --git a/package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch b/package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch
index 72da8d8315..87e695b115 100644
--- a/package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch
+++ b/package/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1715,8 +1715,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1795,8 +1795,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
REG_WRITE(ah, AR_OBS, 8);
if (ah->config.rx_intr_mitigation) {
diff --git a/package/mac80211/patches/513-ath9k_channelbw_debugfs.patch b/package/mac80211/patches/513-ath9k_channelbw_debugfs.patch
index ef568dc2ad..c5ca0e2b57 100644
--- a/package/mac80211/patches/513-ath9k_channelbw_debugfs.patch
+++ b/package/mac80211/patches/513-ath9k_channelbw_debugfs.patch
@@ -8,7 +8,7 @@
int chan_idx;
int chan_is_ht;
struct survey_info *cur_survey;
-@@ -654,6 +655,7 @@ struct ath_softc {
+@@ -655,6 +656,7 @@ struct ath_softc {
u8 ant_tx, ant_rx;
};
@@ -81,7 +81,7 @@
sc->debug.sampidx = 0;
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1554,7 +1554,7 @@ static void ath9k_disable_ps(struct ath_
+@@ -1564,7 +1564,7 @@ static void ath9k_disable_ps(struct ath_
}
@@ -90,7 +90,7 @@
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
-@@ -1606,9 +1606,10 @@ static int ath9k_config(struct ieee80211
+@@ -1616,9 +1616,10 @@ static int ath9k_config(struct ieee80211
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
struct ieee80211_channel *curchan = hw->conf.channel;
@@ -102,7 +102,7 @@
unsigned long flags;
if (ah->curchan)
-@@ -1661,7 +1662,23 @@ static int ath9k_config(struct ieee80211
+@@ -1671,7 +1672,23 @@ static int ath9k_config(struct ieee80211
memset(&sc->survey[pos], 0, sizeof(struct survey_info));
}
@@ -129,7 +129,7 @@
return -EINVAL;
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1549,6 +1549,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -1609,6 +1609,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
caldata->rtt_hist.num_readings)
allow_fbs = true;
diff --git a/package/mac80211/patches/521-mac80211_ht_change_rate_update.patch b/package/mac80211/patches/520-mac80211_ht_change_rate_update.patch
index 75087028a2..3ffa31d66d 100644
--- a/package/mac80211/patches/521-mac80211_ht_change_rate_update.patch
+++ b/package/mac80211/patches/520-mac80211_ht_change_rate_update.patch
@@ -1,6 +1,6 @@
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
-@@ -237,7 +237,9 @@ void ieee80211_bss_info_change_notify(st
+@@ -196,7 +196,9 @@ void ieee80211_bss_info_change_notify(st
u32 changed)
{
struct ieee80211_local *local = sdata->local;
@@ -10,7 +10,7 @@
if (!changed)
return;
-@@ -267,6 +269,22 @@ void ieee80211_bss_info_change_notify(st
+@@ -226,6 +228,22 @@ void ieee80211_bss_info_change_notify(st
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP:
diff --git a/package/mac80211/patches/520-mac80211_minstrel_ht_aggr_delay.patch b/package/mac80211/patches/520-mac80211_minstrel_ht_aggr_delay.patch
deleted file mode 100644
index 8f074f0217..0000000000
--- a/package/mac80211/patches/520-mac80211_minstrel_ht_aggr_delay.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/net/mac80211/rc80211_minstrel_ht.c
-+++ b/net/mac80211/rc80211_minstrel_ht.c
-@@ -357,10 +357,12 @@ minstrel_downgrade_rate(struct minstrel_
- }
-
- static void
--minstrel_aggr_check(struct minstrel_priv *mp, struct ieee80211_sta *pubsta, struct sk_buff *skb)
-+minstrel_aggr_check(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
-+ struct ieee80211_sta *pubsta, struct sk_buff *skb)
- {
- struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
-+ unsigned long t1, t2;
- u16 tid;
-
- if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
-@@ -376,6 +378,12 @@ minstrel_aggr_check(struct minstrel_priv
- if (skb_get_queue_mapping(skb) == IEEE80211_AC_VO)
- return;
-
-+ t1 = mi->last_aggr_start_time[tid];
-+ t2 = t1 + msecs_to_jiffies(5000);
-+ if (unlikely(time_in_range(jiffies, t1, t2)))
-+ return;
-+
-+ mi->last_aggr_start_time[tid] = jiffies;
- ieee80211_start_tx_ba_session(pubsta, tid, 5000);
- }
-
-@@ -455,7 +463,7 @@ minstrel_ht_tx_status(void *priv, struct
- if (time_after(jiffies, mi->stats_update + (mp->update_interval / 2 * HZ) / 1000)) {
- minstrel_ht_update_stats(mp, mi);
- if (!(info->flags & IEEE80211_TX_CTL_AMPDU))
-- minstrel_aggr_check(mp, sta, skb);
-+ minstrel_aggr_check(mp, mi, sta, skb);
- }
- }
-
---- a/net/mac80211/rc80211_minstrel_ht.h
-+++ b/net/mac80211/rc80211_minstrel_ht.h
-@@ -109,6 +109,8 @@ struct minstrel_ht_sta {
-
- /* MCS rate group info and statistics */
- struct minstrel_mcs_group_data groups[MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS];
-+
-+ unsigned long last_aggr_start_time[IEEE80211_QOS_CTL_TID_MASK + 1];
- };
-
- struct minstrel_ht_sta_priv {
diff --git a/package/mac80211/patches/522-mac80211_reduce_txqueuelen.patch b/package/mac80211/patches/522-mac80211_reduce_txqueuelen.patch
index 51e649ee81..4e4dcb8d4e 100644
--- a/package/mac80211/patches/522-mac80211_reduce_txqueuelen.patch
+++ b/package/mac80211/patches/522-mac80211_reduce_txqueuelen.patch
@@ -1,6 +1,6 @@
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
-@@ -699,6 +699,7 @@ static const struct net_device_ops ieee8
+@@ -686,6 +686,7 @@ static const struct net_device_ops ieee8
static void ieee80211_if_setup(struct net_device *dev)
{
ether_setup(dev);
diff --git a/package/mac80211/patches/523-minstrel_ht_optimize.patch b/package/mac80211/patches/523-minstrel_ht_optimize.patch
deleted file mode 100644
index 8e804cae8b..0000000000
--- a/package/mac80211/patches/523-minstrel_ht_optimize.patch
+++ /dev/null
@@ -1,167 +0,0 @@
---- a/net/mac80211/rc80211_minstrel_ht.h
-+++ b/net/mac80211/rc80211_minstrel_ht.h
-@@ -70,6 +70,8 @@ struct minstrel_mcs_group_data {
- };
-
- struct minstrel_ht_sta {
-+ struct ieee80211_tx_rate tx_rates[3];
-+
- /* ampdu length (average, per sampling interval) */
- unsigned int ampdu_len;
- unsigned int ampdu_packets;
---- a/net/mac80211/rc80211_minstrel_ht.c
-+++ b/net/mac80211/rc80211_minstrel_ht.c
-@@ -87,6 +87,10 @@ const struct mcs_group minstrel_mcs_grou
-
- static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES];
-
-+static void
-+minstrel_ht_set_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
-+ struct ieee80211_tx_rate *rate, int index,
-+ bool sample, bool rtscts);
- /*
- * Perform EWMA (Exponentially Weighted Moving Average) calculation
- */
-@@ -174,6 +178,17 @@ minstrel_ht_calc_tp(struct minstrel_priv
- mr->cur_tp = MINSTREL_TRUNC((1000000 / usecs) * mr->probability);
- }
-
-+static void
-+minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
-+{
-+ minstrel_ht_set_rate(mp, mi, &mi->tx_rates[0], mi->max_tp_rate,
-+ false, false);
-+ minstrel_ht_set_rate(mp, mi, &mi->tx_rates[1], mi->max_tp_rate2,
-+ false, true);
-+ minstrel_ht_set_rate(mp, mi, &mi->tx_rates[2], mi->max_prob_rate,
-+ false, true);
-+}
-+
- /*
- * Update rate statistics and select new primary rates
- *
-@@ -294,6 +309,7 @@ minstrel_ht_update_stats(struct minstrel
- }
- }
-
-+ minstrel_ht_update_rates(mp, mi);
- mi->stats_update = jiffies;
- }
-
-@@ -332,8 +348,8 @@ minstrel_next_sample_idx(struct minstrel
- }
-
- static void
--minstrel_downgrade_rate(struct minstrel_ht_sta *mi, unsigned int *idx,
-- bool primary)
-+minstrel_downgrade_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
-+ unsigned int *idx, bool primary)
- {
- int group, orig_group;
-
-@@ -352,6 +368,7 @@ minstrel_downgrade_rate(struct minstrel_
- *idx = mi->groups[group].max_tp_rate;
- else
- *idx = mi->groups[group].max_tp_rate2;
-+ minstrel_ht_update_rates(mp, mi);
- break;
- }
- }
-@@ -452,13 +469,13 @@ minstrel_ht_tx_status(void *priv, struct
- if (rate->attempts > 30 &&
- MINSTREL_FRAC(rate->success, rate->attempts) <
- MINSTREL_FRAC(20, 100))
-- minstrel_downgrade_rate(mi, &mi->max_tp_rate, true);
-+ minstrel_downgrade_rate(mp, mi, &mi->max_tp_rate, true);
-
- rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate2);
- if (rate2->attempts > 30 &&
- MINSTREL_FRAC(rate2->success, rate2->attempts) <
- MINSTREL_FRAC(20, 100))
-- minstrel_downgrade_rate(mi, &mi->max_tp_rate2, false);
-+ minstrel_downgrade_rate(mp, mi, &mi->max_tp_rate2, false);
-
- if (time_after(jiffies, mi->stats_update + (mp->update_interval / 2 * HZ) / 1000)) {
- minstrel_ht_update_stats(mp, mi);
-@@ -523,7 +540,6 @@ minstrel_calc_retransmit(struct minstrel
- static void
- minstrel_ht_set_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
- struct ieee80211_tx_rate *rate, int index,
-- struct ieee80211_tx_rate_control *txrc,
- bool sample, bool rtscts)
- {
- const struct mcs_group *group = &minstrel_mcs_groups[index / MCS_GROUP_RATES];
-@@ -611,6 +627,7 @@ minstrel_ht_get_rate(void *priv, struct
- struct minstrel_priv *mp = priv;
- int sample_idx;
- bool sample = false;
-+ int last = 0;
-
- if (rate_control_send_low(sta, priv_sta, txrc))
- return;
-@@ -636,11 +653,10 @@ minstrel_ht_get_rate(void *priv, struct
- if (sample_idx >= 0) {
- sample = true;
- minstrel_ht_set_rate(mp, mi, &ar[0], sample_idx,
-- txrc, true, false);
-+ true, false);
- info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
- } else {
-- minstrel_ht_set_rate(mp, mi, &ar[0], mi->max_tp_rate,
-- txrc, false, false);
-+ ar[0] = mi->tx_rates[0];
- }
-
- if (mp->hw->max_rates >= 3) {
-@@ -650,33 +666,27 @@ minstrel_ht_get_rate(void *priv, struct
- * max_tp_rate -> max_tp_rate2 -> max_prob_rate by default.
- */
- if (sample_idx >= 0)
-- minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate,
-- txrc, false, false);
-+ ar[1] = mi->tx_rates[0];
- else
-- minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_tp_rate2,
-- txrc, false, true);
--
-- minstrel_ht_set_rate(mp, mi, &ar[2], mi->max_prob_rate,
-- txrc, false, !sample);
-+ ar[1] = mi->tx_rates[1];
-
-- ar[3].count = 0;
-- ar[3].idx = -1;
-+ ar[2] = mi->tx_rates[2];
-+ last = 3;
- } else if (mp->hw->max_rates == 2) {
- /*
- * Only 2 tx rates supported, use
- * sample_rate -> max_prob_rate for sampling and
- * max_tp_rate -> max_prob_rate by default.
- */
-- minstrel_ht_set_rate(mp, mi, &ar[1], mi->max_prob_rate,
-- txrc, false, !sample);
--
-- ar[2].count = 0;
-- ar[2].idx = -1;
-+ ar[1] = mi->tx_rates[2];
-+ last = 2;
- } else {
- /* Not using MRR, only use the first rate */
-- ar[1].count = 0;
-- ar[1].idx = -1;
-+ last = 1;
-+
- }
-+ ar[last].count = 0;
-+ ar[last].idx = -1;
-
- mi->total_packets++;
-
-@@ -768,6 +778,7 @@ minstrel_ht_update_caps(void *priv, stru
- if (!n_supported)
- goto use_legacy;
-
-+ minstrel_ht_update_rates(mp, mi);
- return;
-
- use_legacy:
diff --git a/package/mac80211/patches/530-mac80211_cur_txpower.patch b/package/mac80211/patches/530-mac80211_cur_txpower.patch
index 0fa6a229fd..8ed9216a7d 100644
--- a/package/mac80211/patches/530-mac80211_cur_txpower.patch
+++ b/package/mac80211/patches/530-mac80211_cur_txpower.patch
@@ -11,7 +11,7 @@
u16 listen_interval;
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1677,7 +1677,7 @@ static int ieee80211_get_tx_power(struct
+@@ -1696,7 +1696,7 @@ static int ieee80211_get_tx_power(struct
{
struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -22,7 +22,7 @@
}
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
-@@ -208,6 +208,7 @@ int ieee80211_hw_config(struct ieee80211
+@@ -167,6 +167,7 @@ int ieee80211_hw_config(struct ieee80211
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
diff --git a/package/mac80211/patches/531-ath9k_cur_txpower.patch b/package/mac80211/patches/531-ath9k_cur_txpower.patch
index 760f4d754e..bedfef8fd8 100644
--- a/package/mac80211/patches/531-ath9k_cur_txpower.patch
+++ b/package/mac80211/patches/531-ath9k_cur_txpower.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -1684,6 +1684,8 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1694,6 +1694,8 @@ int ath9k_config(struct ieee80211_hw *hw
return -EINVAL;
}
@@ -9,7 +9,7 @@
/*
* The most recent snapshot of channel->noisefloor for the old
* channel is only available after the hardware reset. Copy it to
-@@ -1699,6 +1701,7 @@ int ath9k_config(struct ieee80211_hw *hw
+@@ -1709,6 +1711,7 @@ int ath9k_config(struct ieee80211_hw *hw
sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow);
diff --git a/package/mac80211/patches/542-ath9k_ar9280_cold_reset.patch b/package/mac80211/patches/542-ath9k_ar9280_cold_reset.patch
index fe7afdedc5..70889d69d6 100644
--- a/package/mac80211/patches/542-ath9k_ar9280_cold_reset.patch
+++ b/package/mac80211/patches/542-ath9k_ar9280_cold_reset.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1382,10 +1382,16 @@ static bool ath9k_hw_set_reset_reg(struc
+@@ -1394,10 +1394,16 @@ static bool ath9k_hw_set_reset_reg(struc
static bool ath9k_hw_chip_reset(struct ath_hw *ah,
struct ath9k_channel *chan)
{
diff --git a/package/mac80211/patches/543-ath9k_enable_ar9100_ani.patch b/package/mac80211/patches/543-ath9k_enable_ar9100_ani.patch
deleted file mode 100644
index 80b8d2e5f6..0000000000
--- a/package/mac80211/patches/543-ath9k_enable_ar9100_ani.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -513,7 +513,7 @@ static int ath9k_hw_post_init(struct ath
- return ecode;
- }
-
-- if (!AR_SREV_9100(ah) && !AR_SREV_9340(ah)) {
-+ if (!AR_SREV_9340(ah)) {
- ath9k_hw_ani_setup(ah);
- ath9k_hw_ani_init(ah);
- }
diff --git a/package/mac80211/patches/544-ath9k_fix_sleep_mode_reg.patch b/package/mac80211/patches/544-ath9k_fix_sleep_mode_reg.patch
deleted file mode 100644
index 2231b444e6..0000000000
--- a/package/mac80211/patches/544-ath9k_fix_sleep_mode_reg.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/net/wireless/ath/ath9k/hw.c
-+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1846,7 +1846,8 @@ static void ath9k_set_power_sleep(struct
- }
-
- /* Clear Bit 14 of AR_WA after putting chip into Full Sleep mode. */
-- REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
-+ if (AR_SREV_9300_20_OR_LATER(ah))
-+ REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
- }
-
- /*
diff --git a/package/mac80211/patches/551-ath9k_per_chain_signal_strength.patch b/package/mac80211/patches/551-ath9k_per_chain_signal_strength.patch
index 378fb090b0..4040f865bb 100644
--- a/package/mac80211/patches/551-ath9k_per_chain_signal_strength.patch
+++ b/package/mac80211/patches/551-ath9k_per_chain_signal_strength.patch
@@ -139,7 +139,7 @@
u8 rs_num_delims;
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
-@@ -981,6 +981,7 @@ static int ath9k_rx_skb_preprocess(struc
+@@ -980,6 +980,7 @@ static int ath9k_rx_skb_preprocess(struc
bool *decrypt_error)
{
struct ath_hw *ah = common->ah;
@@ -147,7 +147,7 @@
memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
-@@ -1006,6 +1007,20 @@ static int ath9k_rx_skb_preprocess(struc
+@@ -1005,6 +1006,20 @@ static int ath9k_rx_skb_preprocess(struc
rx_status->antenna = rx_stats->rs_antenna;
rx_status->flag |= RX_FLAG_MACTIME_MPDU;
@@ -168,7 +168,7 @@
return 0;
}
-@@ -1536,14 +1551,14 @@ static void ath_ant_comb_scan(struct ath
+@@ -1535,14 +1550,14 @@ static void ath_ant_comb_scan(struct ath
struct ath_ant_comb *antcomb = &sc->ant_comb;
int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
int curr_main_set;
@@ -189,7 +189,7 @@
/* Record packet only when both main_rssi and alt_rssi is positive */
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
-@@ -452,12 +452,12 @@ int ath9k_hw_process_rxdesc_edma(struct
+@@ -484,12 +484,12 @@ int ath9k_hw_process_rxdesc_edma(struct
/* XXX: Keycache */
rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
@@ -271,7 +271,7 @@
RX_SAMP_DBG(rate) = rs->rs_rate;
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
-@@ -1621,6 +1621,8 @@ enum nl80211_sta_bss_param {
+@@ -1651,6 +1651,8 @@ enum nl80211_sta_bss_param {
* containing info as possible, see &enum nl80211_sta_bss_param
* @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
@@ -280,7 +280,7 @@
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
-@@ -1643,6 +1645,8 @@ enum nl80211_sta_info {
+@@ -1673,6 +1675,8 @@ enum nl80211_sta_info {
NL80211_STA_INFO_BSS_PARAM,
NL80211_STA_INFO_CONNECTED_TIME,
NL80211_STA_INFO_STA_FLAGS,
@@ -291,7 +291,7 @@
__NL80211_STA_INFO_AFTER_LAST,
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -2287,6 +2287,33 @@ nla_put_failure:
+@@ -2322,6 +2322,33 @@ nla_put_failure:
return false;
}
@@ -325,7 +325,7 @@
static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
int flags, struct net_device *dev,
const u8 *mac_addr, struct station_info *sinfo)
-@@ -2333,6 +2360,18 @@ static int nl80211_send_station(struct s
+@@ -2368,6 +2395,18 @@ static int nl80211_send_station(struct s
if (sinfo->filled & STATION_INFO_SIGNAL_AVG)
NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG,
sinfo->signal_avg);
@@ -346,7 +346,7 @@
NL80211_STA_INFO_TX_BITRATE))
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -330,6 +330,7 @@ static void sta_set_sinfo(struct sta_inf
+@@ -340,6 +340,7 @@ static void sta_set_sinfo(struct sta_inf
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct timespec uptime;
@@ -354,7 +354,7 @@
sinfo->generation = sdata->local->sta_generation;
-@@ -365,6 +366,17 @@ static void sta_set_sinfo(struct sta_inf
+@@ -375,6 +376,17 @@ static void sta_set_sinfo(struct sta_inf
sinfo->signal = (s8)sta->last_signal;
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
}
diff --git a/package/mac80211/patches/560-mac80211_fix_ap_vlan_aggr.patch b/package/mac80211/patches/560-mac80211_fix_ap_vlan_aggr.patch
deleted file mode 100644
index 051f1a91d1..0000000000
--- a/package/mac80211/patches/560-mac80211_fix_ap_vlan_aggr.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/net/mac80211/driver-ops.h
-+++ b/net/mac80211/driver-ops.h
-@@ -10,6 +10,16 @@ static inline void check_sdata_in_driver
- WARN_ON(!(sdata->flags & IEEE80211_SDATA_IN_DRIVER));
- }
-
-+static inline struct ieee80211_sub_if_data *
-+get_bss_sdata(struct ieee80211_sub_if_data *sdata)
-+{
-+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
-+ sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
-+ u.ap);
-+
-+ return sdata;
-+}
-+
- static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
- {
- local->ops->tx(&local->hw, skb);
-@@ -427,6 +437,7 @@ static inline void drv_sta_notify(struct
- enum sta_notify_cmd cmd,
- struct ieee80211_sta *sta)
- {
-+ sdata = get_bss_sdata(sdata);
- check_sdata_in_driver(sdata);
-
- trace_drv_sta_notify(local, sdata, cmd, sta);
-@@ -443,6 +454,7 @@ static inline int drv_sta_add(struct iee
-
- might_sleep();
-
-+ sdata = get_bss_sdata(sdata);
- check_sdata_in_driver(sdata);
-
- trace_drv_sta_add(local, sdata, sta);
-@@ -460,6 +472,7 @@ static inline void drv_sta_remove(struct
- {
- might_sleep();
-
-+ sdata = get_bss_sdata(sdata);
- check_sdata_in_driver(sdata);
-
- trace_drv_sta_remove(local, sdata, sta);
-@@ -553,6 +566,7 @@ static inline int drv_ampdu_action(struc
-
- might_sleep();
-
-+ sdata = get_bss_sdata(sdata);
- check_sdata_in_driver(sdata);
-
- trace_drv_ampdu_action(local, sdata, action, sta, tid, ssn, buf_size);
---- a/net/mac80211/sta_info.c
-+++ b/net/mac80211/sta_info.c
-@@ -353,10 +353,6 @@ static int sta_info_finish_insert(struct
-
- if (!sta->dummy || dummy_reinsert) {
- /* notify driver */
-- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
-- sdata = container_of(sdata->bss,
-- struct ieee80211_sub_if_data,
-- u.ap);
- err = drv_sta_add(local, sdata, &sta->sta);
- if (err) {
- if (!async)
---- a/net/mac80211/agg-tx.c
-+++ b/net/mac80211/agg-tx.c
-@@ -550,7 +550,7 @@ void ieee80211_start_tx_ba_cb(struct iee
- }
-
- mutex_lock(&local->sta_mtx);
-- sta = sta_info_get(sdata, ra);
-+ sta = sta_info_get_bss(sdata, ra);
- if (!sta) {
- mutex_unlock(&local->sta_mtx);
- #ifdef CONFIG_MAC80211_HT_DEBUG
-@@ -679,7 +679,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee
-
- mutex_lock(&local->sta_mtx);
-
-- sta = sta_info_get(sdata, ra);
-+ sta = sta_info_get_bss(sdata, ra);
- if (!sta) {
- #ifdef CONFIG_MAC80211_HT_DEBUG
- printk(KERN_DEBUG "Could not find station: %pM\n", ra);
---- a/net/mac80211/agg-rx.c
-+++ b/net/mac80211/agg-rx.c
-@@ -109,7 +109,7 @@ void ieee80211_stop_rx_ba_session(struct
- int i;
-
- rcu_read_lock();
-- sta = sta_info_get(sdata, addr);
-+ sta = sta_info_get_bss(sdata, addr);
- if (!sta) {
- rcu_read_unlock();
- return;
diff --git a/package/mac80211/patches/604-rt2x00-add-CONFIG_RT2X00_LIB_EEPROM-option.patch b/package/mac80211/patches/604-rt2x00-add-CONFIG_RT2X00_LIB_EEPROM-option.patch
index 25709b85b1..3d2b9b80fe 100644
--- a/package/mac80211/patches/604-rt2x00-add-CONFIG_RT2X00_LIB_EEPROM-option.patch
+++ b/package/mac80211/patches/604-rt2x00-add-CONFIG_RT2X00_LIB_EEPROM-option.patch
@@ -1,6 +1,6 @@
--- a/config.mk
+++ b/config.mk
-@@ -567,6 +567,7 @@ CONFIG_RT2X00=y
+@@ -606,6 +606,7 @@ CONFIG_RT2X00=y
CONFIG_RT2X00_LIB=m
CONFIG_RT2800_LIB=m
CONFIG_RT2X00_LIB_FIRMWARE=y
diff --git a/package/mac80211/patches/850-p54spi-lock-fix.patch b/package/mac80211/patches/850-p54spi-lock-fix.patch
deleted file mode 100644
index d19ba61702..0000000000
--- a/package/mac80211/patches/850-p54spi-lock-fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/net/wireless/p54/p54spi.c
-+++ b/drivers/net/wireless/p54/p54spi.c
-@@ -656,6 +656,7 @@ static int __devinit p54spi_probe(struct
- init_completion(&priv->fw_comp);
- INIT_LIST_HEAD(&priv->tx_pending);
- mutex_init(&priv->mutex);
-+ spin_lock_init(&priv->tx_lock);
- SET_IEEE80211_DEV(hw, &spi->dev);
- priv->common.open = p54spi_op_start;
- priv->common.stop = p54spi_op_stop;
diff --git a/package/mac80211/patches/851-p54spi-mutex-fix.patch b/package/mac80211/patches/851-p54spi-mutex-fix.patch
deleted file mode 100644
index e974e9ddae..0000000000
--- a/package/mac80211/patches/851-p54spi-mutex-fix.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/drivers/net/wireless/p54/p54spi.c
-+++ b/drivers/net/wireless/p54/p54spi.c
-@@ -581,11 +581,7 @@ static void p54spi_op_stop(struct ieee80
- struct p54s_priv *priv = dev->priv;
- unsigned long flags;
-
-- if (mutex_lock_interruptible(&priv->mutex)) {
-- /* FIXME: how to handle this error? */
-- return;
-- }
--
-+ mutex_lock(&priv->mutex);
- WARN_ON(priv->fw_state != FW_STATE_READY);
-
- cancel_work_sync(&priv->work);
diff --git a/package/mac80211/patches/852-p54spi-cancel-workqueue-fix.patch b/package/mac80211/patches/852-p54spi-cancel-workqueue-fix.patch
deleted file mode 100644
index f8d36ca049..0000000000
--- a/package/mac80211/patches/852-p54spi-cancel-workqueue-fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/drivers/net/wireless/p54/p54spi.c
-+++ b/drivers/net/wireless/p54/p54spi.c
-@@ -584,8 +584,6 @@ static void p54spi_op_stop(struct ieee80
- mutex_lock(&priv->mutex);
- WARN_ON(priv->fw_state != FW_STATE_READY);
-
-- cancel_work_sync(&priv->work);
--
- p54spi_power_off(priv);
- spin_lock_irqsave(&priv->tx_lock, flags);
- INIT_LIST_HEAD(&priv->tx_pending);
-@@ -593,6 +591,8 @@ static void p54spi_op_stop(struct ieee80
-
- priv->fw_state = FW_STATE_OFF;
- mutex_unlock(&priv->mutex);
-+
-+ cancel_work_sync(&priv->work);
- }
-
- static int __devinit p54spi_probe(struct spi_device *spi)
diff --git a/package/mac80211/patches/910-fix-reversed-warn-on-workqueue.patch b/package/mac80211/patches/910-fix-reversed-warn-on-workqueue.patch
deleted file mode 100644
index b5985741ca..0000000000
--- a/package/mac80211/patches/910-fix-reversed-warn-on-workqueue.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/compat/compat-2.6.36.c
-+++ b/compat/compat-2.6.36.c
-@@ -101,7 +101,7 @@ EXPORT_SYMBOL_GPL(system_nrt_wq);
- void compat_system_workqueue_create()
- {
- system_nrt_wq = create_singlethread_workqueue("events_nrt");
-- WARN_ON(system_nrt_wq);
-+ WARN_ON(!system_nrt_wq);
- }
-
- void compat_system_workqueue_destroy()