mac80211: update to 2011-12-01

SVN-Revision: 29436
This commit is contained in:
Felix Fietkau 2011-12-05 14:20:17 +00:00
parent 4cc2b9bb06
commit aa63f0bef6
49 changed files with 385 additions and 765 deletions

View file

@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211 PKG_NAME:=mac80211
PKG_VERSION:=2011-11-15 PKG_VERSION:=2011-12-01
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_MD5SUM:=0bb667c7fecbc244840d806df0604661 PKG_MD5SUM:=8d1fe2fd6bbabc4fbbf31dfbf015c62c
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
@ -704,7 +704,7 @@ define KernelPackage/iwl-legacy
$(call KernelPackage/mac80211/Default) $(call KernelPackage/mac80211/Default)
DEPENDS:= +kmod-mac80211 @PCI_SUPPORT DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
TITLE:=Intel legacy Wireless 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) AUTOLOAD:=$(call AutoLoad,60,iwl-legacy)
endef endef
@ -1169,7 +1169,7 @@ MAKE_OPTS:= \
CONFIG_LIB80211_CRYPT_CCMP=$(if $(CONFIG_PACKAGE_kmod-lib80211),m) \ CONFIG_LIB80211_CRYPT_CCMP=$(if $(CONFIG_PACKAGE_kmod-lib80211),m) \
CONFIG_LIB80211_CRYPT_TKIP=$(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=$(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_COMPAT_IWL4965=$(if $(CONFIG_PACKAGE_kmod-iwl4965),m) \
CONFIG_IWL3945=$(if $(CONFIG_PACKAGE_kmod-iwl3945),m) \ CONFIG_IWL3945=$(if $(CONFIG_PACKAGE_kmod-iwl3945),m) \
CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \ CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 CONFIG_P54_PCI=m

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -87,7 +87,7 @@ endif # build check @@ -95,7 +95,7 @@ endif # build check
endif # kernel Makefile check endif # kernel Makefile check
# These both are needed by compat-wireless || compat-bluetooth so enable them # These both are needed by compat-wireless || compat-bluetooth so enable them
@ -9,7 +9,7 @@
ifeq ($(CONFIG_MAC80211),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") $(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. # We need the backported rfkill module on kernel < 2.6.31.
# In more recent kernel versions use the in kernel rfkill module. # In more recent kernel versions use the in kernel rfkill module.
ifdef CONFIG_COMPAT_KERNEL_2_6_31 ifdef CONFIG_COMPAT_KERNEL_2_6_31

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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) ifeq ($(CONFIG_BT),y)
# we'll ignore compiling bluetooth # we'll ignore compiling bluetooth
else else

View file

@ -18,7 +18,7 @@
else else
include $(KLIB_BUILD)/.config include $(KLIB_BUILD)/.config
endif 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 # % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
endif #CONFIG_WIRELESS_EXT endif #CONFIG_WIRELESS_EXT
@ -28,7 +28,7 @@
# Sonics Silicon Backplane # Sonics Silicon Backplane
CONFIG_SSB_SPROM=y CONFIG_SSB_SPROM=y
@@ -328,7 +328,7 @@ endif #CONFIG_PCMCIA @@ -367,7 +367,7 @@ endif #CONFIG_PCMCIA
# CONFIG_SSB_DEBUG=y # CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_PCICORE=y CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_B43_SSB=y CONFIG_B43_SSB=y
@ -37,7 +37,7 @@
CONFIG_BCMA=m CONFIG_BCMA=m
CONFIG_BCMA_BLOCKIO=y 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 ifdef CONFIG_MMC

View file

@ -10,7 +10,7 @@
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),) ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
--- a/config.mk --- a/config.mk
+++ b/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 CONFIG_B43_SSB=y
endif #__CONFIG_SSB endif #__CONFIG_SSB

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 endif #CONFIG_WIRELESS_EXT
ifdef CONFIG_STAGING ifdef CONFIG_STAGING
@ -9,7 +9,7 @@
endif #CONFIG_STAGING endif #CONFIG_STAGING
# mac80211 test driver # mac80211 test driver
@@ -367,13 +367,13 @@ endif #CONFIG_CRC_ITU_T @@ -406,13 +406,13 @@ endif #CONFIG_CRC_ITU_T
CONFIG_MWL8K=m CONFIG_MWL8K=m
# Ethernet drivers go here # Ethernet drivers go here
@ -28,7 +28,7 @@
endif #CONFIG_COMPAT_KERNEL_2_6_27 endif #CONFIG_COMPAT_KERNEL_2_6_27
ifdef CONFIG_WIRELESS_EXT 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 # 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 # it also requires new RNDIS_HOST and CDC_ETHER modules which we add
ifdef CONFIG_COMPAT_KERNEL_2_6_29 ifdef CONFIG_COMPAT_KERNEL_2_6_29

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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
endif endif

View file

@ -9,7 +9,7 @@
else else
include $(KLIB_BUILD)/.config include $(KLIB_BUILD)/.config
endif endif
@@ -247,7 +247,7 @@ CONFIG_B43=m @@ -286,7 +286,7 @@ CONFIG_B43=m
CONFIG_B43_HWRNG=y CONFIG_B43_HWRNG=y
CONFIG_B43_PCI_AUTOSELECT=y CONFIG_B43_PCI_AUTOSELECT=y
ifdef CONFIG_PCMCIA ifdef CONFIG_PCMCIA

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 ifdef CONFIG_MMC

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 CONFIG_B43_LEDS=y
endif #CONFIG_MAC80211_LEDS endif #CONFIG_MAC80211_LEDS
CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_LP=y

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -329,7 +329,7 @@ CONFIG_RTL8180=m @@ -368,7 +368,7 @@ CONFIG_RTL8180=m
CONFIG_ADM8211=m CONFIG_ADM8211=m
@ -9,7 +9,7 @@
CONFIG_RT2400PCI=m CONFIG_RT2400PCI=m
CONFIG_RT2500PCI=m CONFIG_RT2500PCI=m
ifdef CONFIG_CRC_CCITT 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_RT53XX=y
CONFIG_RT2800USB_UNKNOWN=y CONFIG_RT2800USB_UNKNOWN=y
endif #CONFIG_CRC_CCITT endif #CONFIG_CRC_CCITT

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 # 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. # in case you have and old kernel which is overriding this to pid.
CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel_ht

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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 # as default once we get minstrel properly tested and blessed by
# our systems engineering team. CCK rates also need to be used # our systems engineering team. CCK rates also need to be used
# for long range considerations. # for long range considerations.

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -225,7 +225,7 @@ CONFIG_ATH9K_COMMON=m @@ -264,7 +264,7 @@ CONFIG_ATH9K_COMMON=m
# PCI Drivers # PCI Drivers
ifdef CONFIG_PCI ifdef CONFIG_PCI
@ -8,4 +8,4 @@
+# CONFIG_ATH5K_PCI=y +# CONFIG_ATH5K_PCI=y
CONFIG_ATH9K_PCI=y CONFIG_ATH9K_PCI=y
CONFIG_IWLAGN=m CONFIG_IWLWIFI=m

View file

@ -1,8 +1,8 @@
--- a/include/linux/compat-3.0.h --- a/include/linux/compat-3.0.h
+++ b/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> +#include <linux/mod_devicetable.h>
+ +

View file

@ -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 */

View file

@ -17,7 +17,7 @@
compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o compat-$(CONFIG_COMPAT_KERNEL_2_6_18) += compat-2.6.18.o
--- a/compat/compat_firmware_class.c --- a/compat/compat_firmware_class.c
+++ b/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; return 0;
} }

View file

@ -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 */
-

View file

@ -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

View file

@ -51,7 +51,7 @@
#include <pcmcia/cs_types.h> #include <pcmcia/cs_types.h>
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/ds.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; return skb;
} }

View file

@ -33,7 +33,7 @@
#endif #endif
--- a/config.mk --- a/config.mk
+++ b/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 activates a threading fix for usb urb.
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351 # this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
# This fix will be included in some stable releases. # This fix will be included in some stable releases.

View file

@ -1,5 +1,5 @@
--- a/drivers/net/wireless/iwlegacy/iwl3945-base.c --- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
* *
*****************************************************************************/ *****************************************************************************/
@ -78,8 +78,8 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c --- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c +++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
* *
*****************************************************************************/ *****************************************************************************/

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/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') KERNEL_VERSION := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^\([0-9]\)\..*/\1/p')
ifneq ($(KERNEL_VERSION),2) 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) +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)) $(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')

View file

@ -1,6 +1,6 @@
--- a/net/mac80211/mesh_pathtbl.c --- a/net/mac80211/mesh_pathtbl.c
+++ b/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; struct hlist_node *p;
int i; int i;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath5k/initvals.c --- a/drivers/net/wireless/ath/ath5k/initvals.c
+++ b/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_IMR, 0 },
{ AR5K_IER, AR5K_IER_DISABLE }, { AR5K_IER, AR5K_IER_DISABLE },
{ AR5K_BSR, 0, AR5K_INI_READ }, { AR5K_BSR, 0, AR5K_INI_READ },
@ -17,7 +17,7 @@
{ AR5K_RXNOFRM, 8 }, { AR5K_RXNOFRM, 8 },
--- a/drivers/net/wireless/ath/ath5k/dma.c --- a/drivers/net/wireless/ath/ath5k/dma.c
+++ b/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 ;-) * guess we can tweak it and see how it goes ;-)
*/ */
if (ah->ah_version != AR5K_AR5210) { if (ah->ah_version != AR5K_AR5210) {

View file

@ -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 --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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 * @@ -118,7 +118,7 @@ void ath9k_ps_restore(struct ath_softc *
@ -19,7 +75,48 @@
fastcc = false; fastcc = false;
if (!ath_prepare_reset(sc, retry_tx, flush)) 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 #undef SCHED_INTR
} }
@ -102,7 +199,7 @@
static int ath_reset(struct ath_softc *sc, bool retry_tx) static int ath_reset(struct ath_softc *sc, bool retry_tx)
{ {
int r; 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. * and then setup of the interrupt mask.
*/ */
spin_lock_bh(&sc->sc_pcu_lock); spin_lock_bh(&sc->sc_pcu_lock);
@ -112,7 +209,7 @@
r = ath9k_hw_reset(ah, init_channel, ah->caldata, false); r = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
if (r) { if (r) {
ath_err(common, 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; goto mutex_unlock;
} }
@ -131,7 +228,7 @@
spin_unlock_bh(&sc->sc_pcu_lock); spin_unlock_bh(&sc->sc_pcu_lock);
if ((ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) && 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)) { if (unlikely(sc->sc_ah->power_mode != ATH9K_PM_AWAKE)) {
/* /*
* We are using PS-Poll and mac80211 can request TX while in * 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_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@ -153,7 +250,7 @@
mutex_lock(&sc->mutex); 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. */ * before setting the invalid flag. */
ath9k_hw_disable_interrupts(ah); ath9k_hw_disable_interrupts(ah);
@ -216,7 +313,7 @@
mutex_unlock(&sc->mutex); 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_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
@ -226,7 +323,7 @@
mutex_lock(&sc->mutex); 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) { if (changed & IEEE80211_CONF_CHANGE_IDLE) {
sc->ps_idle = !!(conf->flags & IEEE80211_CONF_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, ath_dbg(common, ATH_DBG_CONFIG,
"Set power: %d\n", conf->power_level); "Set power: %d\n", conf->power_level);
sc->config.txpowlimit = 2 * conf->power_level; sc->config.txpowlimit = 2 * conf->power_level;
@ -262,7 +359,7 @@
return 0; return 0;
} }
@@ -2324,9 +2271,6 @@ static void ath9k_flush(struct ieee80211 @@ -2331,9 +2281,6 @@ static void ath9k_flush(struct ieee80211
return; return;
} }
@ -272,7 +369,7 @@
for (j = 0; j < timeout; j++) { for (j = 0; j < timeout; j++) {
bool npend = false; 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) if (!npend)
@ -346,36 +443,7 @@
--- a/drivers/net/wireless/ath/ath9k/xmit.c --- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/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_ @@ -1954,7 +1954,7 @@ static void ath_tx_complete(struct ath_s
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
skb_pull(skb, padsize); skb_pull(skb, padsize);
} }
@ -384,9 +452,23 @@
sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, ATH_DBG_PS,
"Going back to sleep after having received TX status (0x%lx)\n", "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 --- a/include/net/cfg80211.h
+++ b/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 *ssid;
u8 *bssid; u8 *bssid;
struct ieee80211_channel *channel; struct ieee80211_channel *channel;
@ -394,17 +476,17 @@
u8 *ie; u8 *ie;
u8 ssid_len, ie_len; u8 ssid_len, ie_len;
u16 beacon_interval; 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, const u8 *frame, size_t len,
int freq, gfp_t gfp); 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 + * @wiphy: the wiphy
+ * @chan: main channel + * @chan: main channel
+ * @channel_type: HT mode + * @channel_type: HT mode
+ */ + */
+bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, +int cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
+ struct ieee80211_channel *chan, + struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type); + enum nl80211_channel_type channel_type);
+ +
@ -413,14 +495,14 @@
/* wiphy_printk helpers, similar to dev_printk */ /* wiphy_printk helpers, similar to dev_printk */
--- a/net/mac80211/agg-rx.c --- a/net/mac80211/agg-rx.c
+++ b/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); memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION) else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 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) + else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+ memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN); + 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 | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); IEEE80211_STYPE_ACTION);
@ -441,28 +523,56 @@
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_ACTION); 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 && if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT && sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN && sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
- sdata->vif.type != NL80211_IFTYPE_AP) - sdata->vif.type != NL80211_IFTYPE_AP)
+ 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; return -EINVAL;
if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) { 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 --- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c
@@ -63,11 +63,11 @@ static ssize_t sta_flags_read(struct fil @@ -63,11 +63,11 @@ static ssize_t sta_flags_read(struct fil
test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : "" test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
int res = scnprintf(buf, sizeof(buf), 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(AUTH), TEST(ASSOC), TEST(PS_STA),
TEST(PS_DRIVER), TEST(AUTHORIZED), 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(WDS), TEST(CLEAR_PS_FILT),
+ TEST(WME), TEST(CLEAR_PS_FILT), + TEST(WME), TEST(CLEAR_PS_FILT),
TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL), TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
@ -470,7 +580,7 @@
TEST(TDLS_PEER_AUTH)); TEST(TDLS_PEER_AUTH));
--- a/net/mac80211/ht.c --- a/net/mac80211/ht.c
+++ b/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); memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == NL80211_IFTYPE_STATION) else if (sdata->vif.type == NL80211_IFTYPE_STATION)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
@ -508,7 +618,7 @@
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL); ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
sband = local->hw.wiphy->bands[chan->band]; 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), memcpy(skb_put(skb, ifibss->ie_len),
ifibss->ie, ifibss->ie_len); ifibss->ie, ifibss->ie_len);
@ -517,7 +627,8 @@
+ pos = skb_put(skb, 4 + + pos = skb_put(skb, 4 +
+ sizeof(struct ieee80211_ht_cap) + + sizeof(struct ieee80211_ht_cap) +
+ sizeof(struct ieee80211_ht_info)); + 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, + pos = ieee80211_ie_build_ht_info(pos,
+ &sband->ht_cap, + &sband->ht_cap,
+ chan, + chan,
@ -527,7 +638,7 @@
if (local->hw.queues >= 4) { if (local->hw.queues >= 4) {
pos = skb_put(skb, 9); pos = skb_put(skb, 9);
*pos++ = WLAN_EID_VENDOR_SPECIFIC; *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;
bss_change |= BSS_CHANGED_BEACON_ENABLED; bss_change |= BSS_CHANGED_BEACON_ENABLED;
bss_change |= BSS_CHANGED_BASIC_RATES; bss_change |= BSS_CHANGED_BASIC_RATES;
@ -535,72 +646,69 @@
bss_change |= BSS_CHANGED_IBSS; bss_change |= BSS_CHANGED_IBSS;
sdata->vif.bss_conf.ibss_joined = true; sdata->vif.bss_conf.ibss_joined = true;
ieee80211_bss_info_change_notify(sdata, bss_change); 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; u64 beacon_timestamp, rx_timestamp;
u32 supp_rates = 0; u32 supp_rates = 0;
enum ieee80211_band band = rx_status->band; enum ieee80211_band band = rx_status->band;
+ struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; + struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
+ bool rates_updated = false;
if (elems->ds_params && elems->ds_params_len == 1) if (elems->ds_params && elems->ds_params_len == 1)
freq = ieee80211_channel_to_frequency(elems->ds_params[0], freq = ieee80211_channel_to_frequency(elems->ds_params[0],
@@ -277,7 +300,10 @@ static void ieee80211_rx_bss_info(struct @@ -307,7 +332,7 @@ static void ieee80211_rx_bss_info(struct
prev_rates,
channel = ieee80211_get_channel(local->hw.wiphy, freq); sta->sta.supp_rates[band]);
#endif
- if (!channel || channel->flags & IEEE80211_CHAN_DISABLED) - rate_control_rate_init(sta);
+ if (!channel || + rates_updated = true;
+ 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);
} }
} 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->wmm_info) + if (sta && elems->ht_info_elem && elems->ht_cap_elem &&
- set_sta_flag(sta, WLAN_STA_WME); + sdata->u.ibss.channel_type != NL80211_CHAN_NO_HT) {
+ if (sta) {
+ if (elems->wmm_info)
+ set_sta_flag(sta, WLAN_STA_WME);
+
+ /* we both use HT */ + /* we both use HT */
+ if (elems->ht_info_elem && elems->ht_cap_elem && + struct ieee80211_sta_ht_cap sta_ht_cap_new;
+ sdata->u.ibss.channel_type) {
+ enum nl80211_channel_type channel_type = + enum nl80211_channel_type channel_type =
+ ieee80211_ht_info_to_channel_type( + ieee80211_ht_info_to_channel_type(
+ elems->ht_info_elem); + elems->ht_info_elem);
+ struct ieee80211_sta_ht_cap sta_ht_cap_new; +
+ 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 + * fall back to HT20 if we don't use or use
+ * the other extension channel + * the other extension channel
+ */ + */
+ if (channel_type > NL80211_CHAN_HT20 && + if ((channel_type == NL80211_CHAN_HT40MINUS ||
+ channel_type == NL80211_CHAN_HT40PLUS) &&
+ channel_type != sdata->u.ibss.channel_type) + channel_type != sdata->u.ibss.channel_type)
+ channel_type = NL80211_CHAN_HT20; + sta_ht_cap_new.cap &=
+ ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+ +
+ 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, + if (memcmp(&sta->sta.ht_cap, &sta_ht_cap_new,
+ sizeof(sta_ht_cap_new))) { + sizeof(sta_ht_cap_new))) {
+ memcpy(&sta->sta.ht_cap, + memcpy(&sta->sta.ht_cap, &sta_ht_cap_new,
+ &sta_ht_cap_new,
+ sizeof(sta_ht_cap_new)); + sizeof(sta_ht_cap_new));
+ rate_control_rate_update(local, sband, + rates_updated = true;
+ sta,
+ IEEE80211_RC_HT_CHANGED,
+ channel_type);
+ } + }
+ } + }
+ } +
+ if (sta && rates_updated)
+ rate_control_rate_init(sta);
+
rcu_read_unlock(); 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; struct sk_buff *skb;
+ u32 changed = 0;
skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom +
- 36 /* bitrates */ + - 36 /* bitrates */ +
@ -637,9 +745,33 @@
} }
if (params->ie) { 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 --- a/net/mac80211/ieee80211_i.h
+++ b/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 ssid_len, ie_len;
u8 *ie; u8 *ie;
struct ieee80211_channel *channel; struct ieee80211_channel *channel;
@ -695,7 +827,7 @@
err_stop: err_stop:
if (!local->open_count) if (!local->open_count)
drv_stop(local); 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; dev->destructor = free_netdev;
} }
@ -748,7 +880,7 @@
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates; + sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
+ +
+ if (elems.ht_cap_elem) + 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); + elems.ht_cap_elem, &sta->sta.ht_cap);
+ +
+ if (elems.wmm_param) + if (elems.wmm_param)
@ -766,7 +898,7 @@
static void ieee80211_iface_work(struct work_struct *work) static void ieee80211_iface_work(struct work_struct *work)
{ {
struct ieee80211_sub_if_data *sdata = 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; break;
ieee80211_mesh_rx_queued_mgmt(sdata, skb); ieee80211_mesh_rx_queued_mgmt(sdata, skb);
break; break;
@ -776,85 +908,32 @@
default: default:
WARN(1, "frame for unexpected interface type"); WARN(1, "frame for unexpected interface type");
break; break;
--- a/net/mac80211/mlme.c --- a/net/mac80211/main.c
+++ b/net/mac80211/mlme.c +++ b/net/mac80211/main.c
@@ -1359,9 +1359,6 @@ static void __ieee80211_connection_loss( @@ -574,7 +574,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(
ieee80211_set_disassoc(sdata, true, true); WIPHY_FLAG_OFFCHAN_TX |
mutex_unlock(&ifmgd->mtx); WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
- mutex_lock(&local->mtx); - wiphy->features = NL80211_FEATURE_SK_TX_STATUS;
- ieee80211_recalc_idle(local); + wiphy->features = NL80211_FEATURE_SK_TX_STATUS |
- mutex_unlock(&local->mtx); + NL80211_FEATURE_HT_IBSS;
/*
* 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);
}
if (!ops->set_key)
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
--- a/net/mac80211/rx.c --- a/net/mac80211/rx.c
+++ b/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 && if (sdata->vif.type != NL80211_IFTYPE_STATION &&
sdata->vif.type != NL80211_IFTYPE_MESH_POINT && sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
sdata->vif.type != NL80211_IFTYPE_AP_VLAN && sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
- sdata->vif.type != NL80211_IFTYPE_AP) - sdata->vif.type != NL80211_IFTYPE_AP)
+ 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; break;
/* verify action_code is present */ /* 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) && if (!ieee80211_vif_is_mesh(&sdata->vif) &&
sdata->vif.type != NL80211_IFTYPE_ADHOC && sdata->vif.type != NL80211_IFTYPE_ADHOC &&
@ -871,7 +950,7 @@
break; break;
case cpu_to_le16(IEEE80211_STYPE_DEAUTH): case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
case cpu_to_le16(IEEE80211_STYPE_DISASSOC): 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; break;
case NL80211_IFTYPE_WDS: case NL80211_IFTYPE_WDS:
@ -892,38 +971,60 @@
/* should never get here */ /* should never get here */
--- a/net/mac80211/sta_info.h --- a/net/mac80211/sta_info.h
+++ b/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. * 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_WME: Station is a QoS-STA.
- * @WLAN_STA_WDS: Station is one of our WDS peers. - * @WLAN_STA_WDS: Station is one of our WDS peers.
* @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the * @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
* IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next * IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
* frame to this station is transmitted. * 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_SHORT_PREAMBLE,
WLAN_STA_ASSOC_AP,
WLAN_STA_WME, WLAN_STA_WME,
- WLAN_STA_WDS, - WLAN_STA_WDS,
WLAN_STA_CLEAR_PS_FILT, WLAN_STA_CLEAR_PS_FILT,
WLAN_STA_MFP, WLAN_STA_MFP,
WLAN_STA_BLOCK_BA, 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 --- a/net/wireless/chan.c
+++ b/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; return chan;
} }
-static bool can_beacon_sec_chan(struct wiphy *wiphy, -static bool can_beacon_sec_chan(struct wiphy *wiphy,
- struct ieee80211_channel *chan, - struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type) - 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, + struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type) + enum nl80211_channel_type channel_type)
{ {
struct ieee80211_channel *sec_chan; struct ieee80211_channel *sec_chan;
int diff; 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; return true;
} }
@ -931,7 +1032,7 @@
int cfg80211_set_freq(struct cfg80211_registered_device *rdev, int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, int freq, 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) { switch (channel_type) {
case NL80211_CHAN_HT40PLUS: case NL80211_CHAN_HT40PLUS:
case NL80211_CHAN_HT40MINUS: case NL80211_CHAN_HT40MINUS:
@ -944,7 +1045,7 @@
"allowed to initiate communication\n"); "allowed to initiate communication\n");
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/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]); ibss.ie_len = nla_len(info->attrs[NL80211_ATTR_IE]);
} }
@ -955,8 +1056,16 @@
+ +
+ channel_type = nla_get_u32( + channel_type = nla_get_u32(
+ info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]); + 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; + return -EINVAL;
+
+ if (channel_type != NL80211_CHAN_NO_HT &&
+ !(wiphy->features & NL80211_FEATURE_HT_IBSS))
+ return -EINVAL;
+
+ ibss.channel_type = channel_type; + ibss.channel_type = channel_type;
+ } else { + } else {
+ ibss.channel_type = NL80211_CHAN_NO_HT; + ibss.channel_type = NL80211_CHAN_NO_HT;
@ -966,7 +1075,6 @@
+ nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]), + nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]),
+ ibss.channel_type); + ibss.channel_type);
if (!ibss.channel || if (!ibss.channel ||
+ ibss.channel->flags & IEEE80211_CHAN_RADAR ||
ibss.channel->flags & IEEE80211_CHAN_NO_IBSS || ibss.channel->flags & IEEE80211_CHAN_NO_IBSS ||
ibss.channel->flags & IEEE80211_CHAN_DISABLED) ibss.channel->flags & IEEE80211_CHAN_DISABLED)
return -EINVAL; return -EINVAL;

View file

@ -1,6 +1,6 @@
--- a/net/wireless/reg.c --- a/net/wireless/reg.c
+++ b/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; enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request; struct regulatory_request *request;
@ -9,7 +9,7 @@
mutex_lock(&reg_mutex); mutex_lock(&reg_mutex);
if (unlikely(!last_request)) 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) void regulatory_hint_disconnect(void)
{ {

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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, ath_dbg(common, ATH_DBG_CONFIG,
"Attach a VIF of type: %d\n", vif->type); "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); mutex_lock(&sc->mutex);
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);

View file

@ -18,7 +18,7 @@
goto end; goto end;
--- a/drivers/net/wireless/ath/ath5k/base.c --- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/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; ah->bmisscount = 0;
} }
@ -27,7 +27,7 @@
ah->opmode == NL80211_IFTYPE_MESH_POINT) { ah->opmode == NL80211_IFTYPE_MESH_POINT) {
u64 tsf = ath5k_hw_get_tsf64(ah); u64 tsf = ath5k_hw_get_tsf64(ah);
u32 tsftu = TSF_TO_TU(tsf); 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; u64 hw_tsf;
intval = ah->bintval & AR5K_BEACON_PERIOD; intval = ah->bintval & AR5K_BEACON_PERIOD;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath5k/reset.c --- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/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; tsf_lo = 0;
mode = 0; mode = 0;
@ -8,7 +8,7 @@
/* /*
* Sanity check for fast flag * Sanity check for fast flag
* Fast channel change only available * 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) && if (fast && (ah->ah_radio != AR5K_RF2413) &&
(ah->ah_radio != AR5K_RF5413)) (ah->ah_radio != AR5K_RF5413))

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/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); REG_WRITE(ah, AR_OBS, 8);
if (ah->config.rx_intr_mitigation) { if (ah->config.rx_intr_mitigation) {

View file

@ -8,7 +8,7 @@
int chan_idx; int chan_idx;
int chan_is_ht; int chan_is_ht;
struct survey_info *cur_survey; struct survey_info *cur_survey;
@@ -654,6 +655,7 @@ struct ath_softc { @@ -655,6 +656,7 @@ struct ath_softc {
u8 ant_tx, ant_rx; u8 ant_tx, ant_rx;
}; };
@ -81,7 +81,7 @@
sc->debug.sampidx = 0; sc->debug.sampidx = 0;
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah; 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) { if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
struct ieee80211_channel *curchan = hw->conf.channel; struct ieee80211_channel *curchan = hw->conf.channel;
@ -102,7 +102,7 @@
unsigned long flags; unsigned long flags;
if (ah->curchan) 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)); memset(&sc->survey[pos], 0, sizeof(struct survey_info));
} }
@ -129,7 +129,7 @@
return -EINVAL; return -EINVAL;
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/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) caldata->rtt_hist.num_readings)
allow_fbs = true; allow_fbs = true;

View file

@ -1,6 +1,6 @@
--- a/net/mac80211/main.c --- a/net/mac80211/main.c
+++ b/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) u32 changed)
{ {
struct ieee80211_local *local = sdata->local; struct ieee80211_local *local = sdata->local;
@ -10,7 +10,7 @@
if (!changed) if (!changed)
return; 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) { switch (sdata->vif.type) {
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:

View file

@ -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 {

View file

@ -1,6 +1,6 @@
--- a/net/mac80211/iface.c --- a/net/mac80211/iface.c
+++ b/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) static void ieee80211_if_setup(struct net_device *dev)
{ {
ether_setup(dev); ether_setup(dev);

View file

@ -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:

View file

@ -11,7 +11,7 @@
u16 listen_interval; u16 listen_interval;
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/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); struct ieee80211_local *local = wiphy_priv(wiphy);
@ -22,7 +22,7 @@
} }
--- a/net/mac80211/main.c --- a/net/mac80211/main.c
+++ b/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) { if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER; changed |= IEEE80211_CONF_CHANGE_POWER;

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/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; return -EINVAL;
} }
@ -9,7 +9,7 @@
/* /*
* The most recent snapshot of channel->noisefloor for the old * The most recent snapshot of channel->noisefloor for the old
* channel is only available after the hardware reset. Copy it to * 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; sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow, ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow); sc->config.txpowlimit, &sc->curtxpow);

View file

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/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, static bool ath9k_hw_chip_reset(struct ath_hw *ah,
struct ath9k_channel *chan) struct ath9k_channel *chan)
{ {

View file

@ -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);
}

View file

@ -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);
}
/*

View file

@ -139,7 +139,7 @@
u8 rs_num_delims; u8 rs_num_delims;
--- a/drivers/net/wireless/ath/ath9k/recv.c --- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/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) bool *decrypt_error)
{ {
struct ath_hw *ah = common->ah; struct ath_hw *ah = common->ah;
@ -147,7 +147,7 @@
memset(rx_status, 0, sizeof(struct ieee80211_rx_status)); 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->antenna = rx_stats->rs_antenna;
rx_status->flag |= RX_FLAG_MACTIME_MPDU; rx_status->flag |= RX_FLAG_MACTIME_MPDU;
@ -168,7 +168,7 @@
return 0; 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; struct ath_ant_comb *antcomb = &sc->ant_comb;
int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set; int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
int curr_main_set; int curr_main_set;
@ -189,7 +189,7 @@
/* Record packet only when both main_rssi and alt_rssi is positive */ /* Record packet only when both main_rssi and alt_rssi is positive */
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/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 */ /* XXX: Keycache */
rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined); rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
@ -271,7 +271,7 @@
RX_SAMP_DBG(rate) = rs->rs_rate; RX_SAMP_DBG(rate) = rs->rs_rate;
--- a/include/linux/nl80211.h --- a/include/linux/nl80211.h
+++ b/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 * 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_CONNECTED_TIME: time since the station is last connected
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. * @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_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute * @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_BSS_PARAM,
NL80211_STA_INFO_CONNECTED_TIME, NL80211_STA_INFO_CONNECTED_TIME,
NL80211_STA_INFO_STA_FLAGS, NL80211_STA_INFO_STA_FLAGS,
@ -291,7 +291,7 @@
__NL80211_STA_INFO_AFTER_LAST, __NL80211_STA_INFO_AFTER_LAST,
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/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; return false;
} }
@ -325,7 +325,7 @@
static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
int flags, struct net_device *dev, int flags, struct net_device *dev,
const u8 *mac_addr, struct station_info *sinfo) 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) if (sinfo->filled & STATION_INFO_SIGNAL_AVG)
NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG, NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG,
sinfo->signal_avg); sinfo->signal_avg);
@ -346,7 +346,7 @@
NL80211_STA_INFO_TX_BITRATE)) NL80211_STA_INFO_TX_BITRATE))
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/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 ieee80211_sub_if_data *sdata = sta->sdata;
struct timespec uptime; struct timespec uptime;
@ -354,7 +354,7 @@
sinfo->generation = sdata->local->sta_generation; 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 = (s8)sta->last_signal;
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal); sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
} }

View file

@ -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;

View file

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -567,6 +567,7 @@ CONFIG_RT2X00=y @@ -606,6 +606,7 @@ CONFIG_RT2X00=y
CONFIG_RT2X00_LIB=m CONFIG_RT2X00_LIB=m
CONFIG_RT2800_LIB=m CONFIG_RT2800_LIB=m
CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_FIRMWARE=y

View file

@ -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;

View file

@ -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);

View file

@ -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)

View file

@ -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()