mirror of https://github.com/hak5/openwrt-owl.git
parent
e430c864f4
commit
ea63948914
|
@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2011-12-01
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=2012-02-06
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
PKG_MD5SUM:=8d1fe2fd6bbabc4fbbf31dfbf015c62c
|
||||
PKG_MD5SUM:=fae71c35ee3f3de6329f2db7aed6d265
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
@ -1100,7 +1100,7 @@ BUILDFLAGS:= \
|
|||
$(if $(CONFIG_PACKAGE_B43_PHY_N),-DCONFIG_B43_PHY_N) \
|
||||
$(if $(CONFIG_PACKAGE_B43_PHY_HT),-DCONFIG_B43_PHY_HT) \
|
||||
$(if $(CONFIG_PACKAGE_B43_PHY_LCN),-DCONFIG_B43_PHY_LCN) \
|
||||
-DCONFIG_B43_BCMA \
|
||||
-DCONFIG_B43_BCMA -DCONFIG_B43_BCMA_EXTRA \
|
||||
-DCONFIG_B43_SSB \
|
||||
$(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_RT2X00_DEBUG),-DCONFIG_RT2X00_DEBUG) \
|
||||
|
@ -1249,7 +1249,7 @@ MAKE_OPTS:= \
|
|||
CONFIG_BRCMUMAC= \
|
||||
CONFIG_BRCMSMAC= \
|
||||
KLIB_BUILD="$(LINUX_DIR)" \
|
||||
MODPROBE=: \
|
||||
MODPROBE=true \
|
||||
KLIB=$(TARGET_MODULES_DIR) \
|
||||
KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
|
||||
KBUILD_LDFLAGS_MODULE_PREREQ=
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -29,9 +29,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
@@ -32,9 +32,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
|
||||
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -378,8 +378,8 @@ CONFIG_B43_BCMA_PIO=y
|
||||
@@ -380,8 +380,8 @@ CONFIG_B43_BCMA_EXTRA=y
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
|
|
@ -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")
|
||||
@@ -671,10 +671,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
|
||||
@@ -684,10 +684,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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -29,7 +29,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
@@ -32,7 +32,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
|
||||
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -354,7 +353,8 @@ CONFIG_IPW2200_QOS=y
|
||||
@@ -356,7 +355,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
|
||||
|
||||
@@ -367,7 +367,7 @@ endif #CONFIG_PCMCIA
|
||||
@@ -369,7 +369,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
|
||||
@@ -574,7 +574,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -578,7 +578,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -29,7 +29,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
@@ -32,7 +32,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||
|
||||
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -369,12 +369,12 @@ CONFIG_SSB_DRIVER_PCICORE=y
|
||||
@@ -371,12 +371,12 @@ CONFIG_SSB_DRIVER_PCICORE=y
|
||||
CONFIG_B43_SSB=y
|
||||
endif #__CONFIG_SSB
|
||||
|
||||
|
@ -22,9 +22,9 @@
|
|||
+# CONFIG_BCMA_HOST_PCI=y
|
||||
# CONFIG_BCMA_DEBUG=y
|
||||
-CONFIG_B43_BCMA=y
|
||||
-CONFIG_B43_BCMA_PIO=y
|
||||
-CONFIG_B43_BCMA_EXTRA=y
|
||||
+# CONFIG_B43_BCMA=y
|
||||
+# CONFIG_B43_BCMA_PIO=y
|
||||
+# CONFIG_B43_BCMA_EXTRA=y
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -252,7 +252,7 @@ $(warning "WARNING: CONFIG_CFG80211_WEXT
|
||||
@@ -254,7 +254,7 @@ $(warning "WARNING: CONFIG_CFG80211_WEXT
|
||||
endif #CONFIG_WIRELESS_EXT
|
||||
|
||||
ifdef CONFIG_STAGING
|
||||
|
@ -9,7 +9,7 @@
|
|||
endif #CONFIG_STAGING
|
||||
|
||||
# mac80211 test driver
|
||||
@@ -406,13 +406,13 @@ endif #CONFIG_CRC_ITU_T
|
||||
@@ -408,13 +408,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
|
||||
@@ -471,21 +471,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
@@ -475,21 +475,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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -188,7 +188,7 @@ CONFIG_MAC80211_LEDS=y
|
||||
@@ -192,7 +192,7 @@ CONFIG_MAC80211_LEDS=y
|
||||
endif #CONFIG_LEDS_TRIGGERS
|
||||
|
||||
# enable mesh networking too
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -286,7 +286,7 @@ CONFIG_B43=m
|
||||
@@ -289,7 +289,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifdef CONFIG_PCMCIA
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -557,7 +557,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
@@ -561,7 +561,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -292,8 +292,8 @@ ifdef CONFIG_MAC80211_LEDS
|
||||
@@ -295,8 +295,8 @@ ifdef CONFIG_MAC80211_LEDS
|
||||
CONFIG_B43_LEDS=y
|
||||
endif #CONFIG_MAC80211_LEDS
|
||||
CONFIG_B43_PHY_LP=y
|
||||
|
@ -9,5 +9,5 @@
|
|||
+# CONFIG_B43_PHY_N=y
|
||||
+# CONFIG_B43_PHY_HT=y
|
||||
# CONFIG_B43_PHY_LCN=y
|
||||
# CONFIG_B43_FORCE_PIO=y
|
||||
# CONFIG_B43_DEBUG=y
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -368,7 +368,7 @@ CONFIG_RTL8180=m
|
||||
@@ -370,7 +370,7 @@ CONFIG_RTL8180=m
|
||||
|
||||
CONFIG_ADM8211=m
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
|||
CONFIG_RT2400PCI=m
|
||||
CONFIG_RT2500PCI=m
|
||||
ifdef CONFIG_CRC_CCITT
|
||||
@@ -506,7 +506,7 @@ CONFIG_RT2800USB_RT35XX=y
|
||||
# CONFIG_RT2800USB_RT53XX=y
|
||||
@@ -510,7 +510,7 @@ CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_RT53XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif #CONFIG_CRC_CCITT
|
||||
-CONFIG_RT2X00_LIB_USB=m
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -163,7 +163,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
|
||||
@@ -167,7 +167,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
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -259,7 +259,7 @@ CONFIG_ATH9K_COMMON=m
|
||||
@@ -261,7 +261,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.
|
||||
-CONFIG_ATH9K_RATE_CONTROL=y
|
||||
+# CONFIG_ATH9K_RATE_CONTROL=y
|
||||
|
||||
# PCI Drivers
|
||||
ifdef CONFIG_PCI
|
||||
CONFIG_ATH9K_BTCOEX_SUPPORT=y
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -339,83 +339,59 @@ static int b43_ratelimit(struct b43_wl *
|
||||
@@ -341,83 +341,59 @@ static int b43_ratelimit(struct b43_wl *
|
||||
|
||||
void b43info(struct b43_wl *wl, const char *fmt, ...)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -264,7 +264,7 @@ CONFIG_ATH9K_COMMON=m
|
||||
@@ -268,7 +268,7 @@ CONFIG_ATH9K_BTCOEX_SUPPORT=y
|
||||
# PCI Drivers
|
||||
ifdef CONFIG_PCI
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--- a/include/linux/compat-3.1.h
|
||||
+++ b/include/linux/compat-3.1.h
|
||||
@@ -5,6 +5,8 @@
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
|
||||
#include <linux/security.h>
|
||||
|
||||
+#include <linux/security.h>
|
||||
+
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
Do not activate the mac80211 tracing by default as it does not work with
|
||||
kernel <= 2.6.32. Compat also includes include/trace/define_trace.h over
|
||||
include/trace/events/module.h which makes this not compiling any more.
|
||||
|
||||
--- a/net/mac80211/Makefile
|
||||
+++ b/net/mac80211/Makefile
|
||||
@@ -24,8 +24,7 @@ mac80211-y := \
|
||||
util.o \
|
||||
wme.o \
|
||||
event.o \
|
||||
- chan.o \
|
||||
- driver-trace.o
|
||||
+ chan.o
|
||||
|
||||
mac80211-$(CONFIG_MAC80211_LEDS) += led.o
|
||||
mac80211-$(CONFIG_MAC80211_DEBUGFS) += \
|
||||
@@ -42,6 +41,7 @@ mac80211-$(CONFIG_MAC80211_MESH) += \
|
||||
|
||||
mac80211-$(CONFIG_PM) += pm.o
|
||||
|
||||
+mac80211-$(CONFIG_MAC80211_DRIVER_API_TRACER) += driver-trace.o
|
||||
CFLAGS_driver-trace.o := -I$(src)
|
||||
|
||||
# objects for PID algorithm
|
||||
--- a/net/mac80211/driver-trace.h
|
||||
+++ b/net/mac80211/driver-trace.h
|
||||
@@ -5,6 +5,17 @@
|
||||
#include <net/mac80211.h>
|
||||
#include "ieee80211_i.h"
|
||||
|
||||
+#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
|
||||
+#undef TRACE_EVENT
|
||||
+#define TRACE_EVENT(name, proto, ...) \
|
||||
+static inline void trace_ ## name(proto) {}
|
||||
+#undef DECLARE_EVENT_CLASS
|
||||
+#define DECLARE_EVENT_CLASS(...)
|
||||
+#undef DEFINE_EVENT
|
||||
+#define DEFINE_EVENT(evt_class, name, proto, ...) \
|
||||
+static inline void trace_ ## name(proto) {}
|
||||
+#endif
|
||||
+
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM mac80211
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
#endif
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -492,7 +492,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
|
||||
@@ -496,7 +496,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.
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
#include <linux/err.h>
|
||||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -33,6 +33,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/mesh_pathtbl.c
|
||||
+++ b/net/mac80211/mesh_pathtbl.c
|
||||
@@ -826,7 +826,6 @@ static void table_flush_by_iface(struct
|
||||
@@ -828,7 +828,6 @@ static void table_flush_by_iface(struct
|
||||
struct hlist_node *p;
|
||||
int i;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,17 +1,18 @@
|
|||
--- a/drivers/net/wireless/ath/Makefile
|
||||
+++ b/drivers/net/wireless/ath/Makefile
|
||||
@@ -8,6 +8,5 @@ obj-$(CONFIG_ATH_COMMON) += ath.o
|
||||
@@ -8,7 +8,7 @@ obj-$(CONFIG_ATH_COMMON) += ath.o
|
||||
ath-objs := main.o \
|
||||
regd.o \
|
||||
hw.o \
|
||||
- key.o
|
||||
-
|
||||
-ath-$(CONFIG_ATH_DEBUG) += debug.o
|
||||
+ key.o \
|
||||
+ debug.o
|
||||
|
||||
-ath-$(CONFIG_ATH_DEBUG) += debug.o
|
||||
ccflags-y += -D__CHECK_ENDIAN__
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -272,13 +272,6 @@ void ath_dbg(struct ath_common *common,
|
||||
@@ -281,13 +281,6 @@ void _ath_dbg(struct ath_common *common,
|
||||
#endif /* CONFIG_ATH_DEBUG */
|
||||
|
||||
/** Returns string describing opmode, or NULL if unknown mode. */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -194,6 +194,10 @@ ath_reg_apply_beaconing_flags(struct wip
|
||||
@@ -196,6 +196,10 @@ ath_reg_apply_beaconing_flags(struct wip
|
||||
u32 bandwidth = 0;
|
||||
int r;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
|
||||
if (!wiphy->bands[band])
|
||||
@@ -253,6 +257,10 @@ ath_reg_apply_active_scan_flags(struct w
|
||||
@@ -255,6 +259,10 @@ ath_reg_apply_active_scan_flags(struct w
|
||||
u32 bandwidth = 0;
|
||||
int r;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
if (!sband)
|
||||
return;
|
||||
@@ -302,6 +310,10 @@ static void ath_reg_apply_radar_flags(st
|
||||
@@ -304,6 +312,10 @@ static void ath_reg_apply_radar_flags(st
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
@@ -469,6 +481,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
@@ -510,6 +522,10 @@ ath_regd_init_wiphy(struct ath_regulator
|
||||
{
|
||||
const struct ieee80211_regdomain *regd;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/regd.c
|
||||
+++ b/drivers/net/wireless/ath/regd.c
|
||||
@@ -38,7 +38,8 @@
|
||||
@@ -40,7 +40,8 @@ static int __ath_regd_init(struct ath_re
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_OFDM)
|
||||
|
||||
/* We allow IBSS on these on a case by case basis by regulatory domain */
|
||||
|
@ -10,7 +10,7 @@
|
|||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
#define ATH9K_5GHZ_5470_5850 REG_RULE(5470-10, 5850+10, 40, 0, 30,\
|
||||
NL80211_RRF_PASSIVE_SCAN | NL80211_RRF_NO_IBSS)
|
||||
@@ -56,57 +57,56 @@
|
||||
@@ -58,57 +59,56 @@ static int __ath_regd_init(struct ath_re
|
||||
#define ATH9K_5GHZ_NO_MIDBAND ATH9K_5GHZ_5150_5350, \
|
||||
ATH9K_5GHZ_5725_5850
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/wireless/reg.c
|
||||
+++ b/net/wireless/reg.c
|
||||
@@ -1672,6 +1672,8 @@ void regulatory_hint_11d(struct wiphy *w
|
||||
@@ -1690,6 +1690,8 @@ void regulatory_hint_11d(struct wiphy *w
|
||||
enum environment_cap env = ENVIRON_ANY;
|
||||
struct regulatory_request *request;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
|||
mutex_lock(®_mutex);
|
||||
|
||||
if (unlikely(!last_request))
|
||||
@@ -1878,6 +1880,8 @@ static void restore_regulatory_settings(
|
||||
@@ -1925,6 +1927,8 @@ static void restore_regulatory_settings(
|
||||
|
||||
void regulatory_hint_disconnect(void)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1458,15 +1458,6 @@ static int ath9k_add_interface(struct ie
|
||||
@@ -1454,15 +1454,6 @@ static int ath9k_add_interface(struct ie
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,10 +13,10 @@
|
|||
- goto out;
|
||||
- }
|
||||
-
|
||||
ath_dbg(common, ATH_DBG_CONFIG,
|
||||
"Attach a VIF of type: %d\n", vif->type);
|
||||
ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type);
|
||||
|
||||
@@ -1492,15 +1483,6 @@ static int ath9k_change_interface(struct
|
||||
sc->nvifs++;
|
||||
@@ -1487,15 +1478,6 @@ static int ath9k_change_interface(struct
|
||||
mutex_lock(&sc->mutex);
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
if (fast && (ah->ah_radio != AR5K_RF2413) &&
|
||||
(ah->ah_radio != AR5K_RF5413))
|
||||
+#endif
|
||||
fast = 0;
|
||||
fast = false;
|
||||
|
||||
/* Disable sleep clock operation
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1674,6 +1721,9 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1677,6 +1724,9 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
|
||||
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1795,8 +1795,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1794,8 +1794,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
REG_WRITE(ah, AR_OBS, 8);
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -366,7 +366,7 @@ struct ath_vif {
|
||||
@@ -370,7 +370,7 @@ struct ath_vif {
|
||||
* number of beacon intervals, the game's up.
|
||||
*/
|
||||
#define BSTUCK_THRESH 9
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -591,6 +591,7 @@ struct ath_softc {
|
||||
@@ -595,6 +595,7 @@ struct ath_softc {
|
||||
struct ieee80211_hw *hw;
|
||||
struct device *dev;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
int chan_idx;
|
||||
int chan_is_ht;
|
||||
struct survey_info *cur_survey;
|
||||
@@ -655,6 +656,7 @@ struct ath_softc {
|
||||
@@ -659,6 +660,7 @@ struct ath_softc {
|
||||
u8 ant_tx, ant_rx;
|
||||
};
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
|||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -1724,6 +1768,9 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1727,6 +1771,9 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_eeprom);
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
|||
sc->debug.sampidx = 0;
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1564,7 +1564,7 @@ static void ath9k_disable_ps(struct ath_
|
||||
@@ -1559,7 +1559,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;
|
||||
@@ -1616,9 +1616,11 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1609,9 +1609,11 @@ static int ath9k_config(struct ieee80211
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||
struct ieee80211_channel *curchan = hw->conf.channel;
|
||||
|
@ -102,7 +102,7 @@
|
|||
|
||||
if (ah->curchan)
|
||||
old_pos = ah->curchan - &ah->channels[0];
|
||||
@@ -1667,7 +1669,23 @@ static int ath9k_config(struct ieee80211
|
||||
@@ -1659,7 +1661,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
|
||||
@@ -1609,6 +1609,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1608,6 +1608,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
caldata->rtt_hist.num_readings)
|
||||
allow_fbs = true;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -196,7 +196,9 @@ void ieee80211_bss_info_change_notify(st
|
||||
@@ -197,7 +197,9 @@ void ieee80211_bss_info_change_notify(st
|
||||
u32 changed)
|
||||
{
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
if (!changed)
|
||||
return;
|
||||
@@ -226,6 +228,22 @@ void ieee80211_bss_info_change_notify(st
|
||||
@@ -219,6 +221,22 @@ void ieee80211_bss_info_change_notify(st
|
||||
|
||||
switch (sdata->vif.type) {
|
||||
case NL80211_IFTYPE_AP:
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
u16 listen_interval;
|
||||
--- a/net/mac80211/cfg.c
|
||||
+++ b/net/mac80211/cfg.c
|
||||
@@ -1696,7 +1696,7 @@ static int ieee80211_get_tx_power(struct
|
||||
@@ -1739,7 +1739,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
|
||||
@@ -167,6 +167,7 @@ int ieee80211_hw_config(struct ieee80211
|
||||
@@ -168,6 +168,7 @@ int ieee80211_hw_config(struct ieee80211
|
||||
|
||||
if (local->hw.conf.power_level != power) {
|
||||
changed |= IEEE80211_CONF_CHANGE_POWER;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1691,6 +1691,8 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
@@ -1683,6 +1683,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
|
||||
@@ -1706,6 +1708,7 @@ int ath9k_config(struct ieee80211_hw *hw
|
||||
@@ -1697,6 +1699,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);
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -238,6 +238,7 @@ struct ath_atx_tid {
|
||||
@@ -242,6 +242,7 @@ struct ath_atx_tid {
|
||||
struct ath_node *an;
|
||||
struct ath_atx_ac *ac;
|
||||
unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
|
||||
+ int buf_pending;
|
||||
int bar_index;
|
||||
u16 seq_start;
|
||||
u16 seq_next;
|
||||
u16 baw_size;
|
||||
@@ -284,6 +285,9 @@ struct ath_tx_control {
|
||||
@@ -288,6 +289,9 @@ struct ath_tx_control {
|
||||
* (axq_qnum).
|
||||
*/
|
||||
struct ath_tx {
|
||||
|
@ -20,7 +20,7 @@
|
|||
spinlock_t txbuflock;
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -1729,6 +1729,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1732,6 +1732,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
sc, &fops_wiphy);
|
||||
debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_xmit);
|
||||
|
@ -33,7 +33,7 @@
|
|||
debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -355,6 +355,14 @@ static void ath_tx_count_frames(struct a
|
||||
@@ -392,6 +392,14 @@ static void ath_tx_count_frames(struct a
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
|||
|
||||
static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
||||
struct ath_buf *bf, struct list_head *bf_q,
|
||||
@@ -443,6 +451,8 @@ static void ath_tx_complete_aggr(struct
|
||||
@@ -486,6 +494,8 @@ static void ath_tx_complete_aggr(struct
|
||||
__skb_queue_head_init(&bf_pending);
|
||||
|
||||
ath_tx_count_frames(sc, bf, ts, txok, &nframes, &nbad);
|
||||
|
@ -57,7 +57,7 @@
|
|||
while (bf) {
|
||||
u16 seqno = bf->bf_state.seqno;
|
||||
|
||||
@@ -823,6 +833,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
|
||||
@@ -885,6 +895,7 @@ static enum ATH_AGGR_STATUS ath_tx_form_
|
||||
ath_tx_addto_baw(sc, tid, seqno);
|
||||
bf->bf_state.ndelim = ndelim;
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
|||
__skb_unlink(skb, &tid->buf_q);
|
||||
list_add_tail(&bf->list, bf_q);
|
||||
if (bf_prev)
|
||||
@@ -1682,6 +1693,8 @@ static void ath_tx_send_ampdu(struct ath
|
||||
@@ -1740,6 +1751,8 @@ static void ath_tx_send_ampdu(struct ath
|
||||
/* Add sub-frame to BAW */
|
||||
ath_tx_addto_baw(sc, tid, bf->bf_state.seqno);
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
/* Queue to h/w without aggregation */
|
||||
TX_STAT_INC(txctl->txq->axq_qnum, a_queued_hw);
|
||||
bf->bf_lastbf = bf;
|
||||
@@ -1810,23 +1823,13 @@ error:
|
||||
@@ -1864,22 +1877,11 @@ error:
|
||||
|
||||
/* FIXME: tx power */
|
||||
static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb,
|
||||
|
@ -87,8 +87,7 @@
|
|||
- struct ath_atx_tid *tid = NULL;
|
||||
struct ath_buf *bf;
|
||||
- u8 tidno;
|
||||
|
||||
spin_lock_bh(&txctl->txq->axq_lock);
|
||||
-
|
||||
- if ((sc->sc_flags & SC_OP_TXAGGR) && txctl->an &&
|
||||
- ieee80211_is_data_qos(hdr->frame_control)) {
|
||||
- tidno = ieee80211_get_qos_ctl(hdr)[0] &
|
||||
|
@ -100,7 +99,7 @@
|
|||
|
||||
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
|
||||
/*
|
||||
@@ -1861,6 +1864,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1911,6 +1913,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
struct ieee80211_vif *vif = info->control.vif;
|
||||
struct ath_softc *sc = hw->priv;
|
||||
struct ath_txq *txq = txctl->txq;
|
||||
|
@ -108,7 +107,7 @@
|
|||
int padpos, padsize;
|
||||
int frmlen = skb->len + FCS_LEN;
|
||||
int q;
|
||||
@@ -1903,6 +1907,24 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1953,6 +1956,24 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
|
||||
setup_frame_info(hw, skb, frmlen);
|
||||
|
||||
|
@ -133,12 +132,12 @@
|
|||
/*
|
||||
* At this point, the vif, hw_key and sta pointers in the tx control
|
||||
* info are no longer valid (overwritten by the ath_frame_info data.
|
||||
@@ -1917,7 +1939,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
@@ -1967,7 +1988,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
txq->stopped = true;
|
||||
}
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
- ath_tx_start_dma(sc, skb, txctl);
|
||||
+ ath_tx_start_dma(sc, skb, txctl, tid);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ath_txq_unlock(sc, txq);
|
||||
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -264,14 +264,17 @@ static void ath_tid_drain(struct ath_sof
|
||||
}
|
||||
|
||||
static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
|
||||
- struct sk_buff *skb)
|
||||
+ struct sk_buff *skb, int count)
|
||||
{
|
||||
struct ath_frame_info *fi = get_frame_info(skb);
|
||||
struct ath_buf *bf = fi->bf;
|
||||
struct ieee80211_hdr *hdr;
|
||||
+ int prev = fi->retries;
|
||||
|
||||
TX_STAT_INC(txq->axq_qnum, a_retries);
|
||||
- if (fi->retries++ > 0)
|
||||
+ fi->retries += count;
|
||||
+
|
||||
+ if (prev > 0)
|
||||
return;
|
||||
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -387,6 +390,7 @@ static void ath_tx_complete_aggr(struct
|
||||
int nframes;
|
||||
u8 tidno;
|
||||
bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
|
||||
+ int i, retries;
|
||||
|
||||
skb = bf->bf_mpdu;
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -395,6 +399,10 @@ static void ath_tx_complete_aggr(struct
|
||||
|
||||
memcpy(rates, tx_info->control.rates, sizeof(rates));
|
||||
|
||||
+ retries = ts->ts_longretry + 1;
|
||||
+ for (i = 0; i < ts->ts_rateindex; i++)
|
||||
+ retries += rates[i].count;
|
||||
+
|
||||
rcu_read_lock();
|
||||
|
||||
sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
|
||||
@@ -481,7 +489,8 @@ static void ath_tx_complete_aggr(struct
|
||||
txpending = 1;
|
||||
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
|
||||
if (txok || !an->sleeping)
|
||||
- ath_tx_set_retry(sc, txq, bf->bf_mpdu);
|
||||
+ ath_tx_set_retry(sc, txq, bf->bf_mpdu,
|
||||
+ retries);
|
||||
|
||||
txpending = 1;
|
||||
} else {
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -546,7 +546,7 @@ struct ath_ant_comb {
|
||||
#define DEFAULT_CACHELINE 32
|
||||
#define ATH_REGCLASSIDS_MAX 10
|
||||
#define ATH_CABQ_READY_TIME 80 /* % of beacon interval */
|
||||
-#define ATH_MAX_SW_RETRIES 10
|
||||
+#define ATH_MAX_SW_RETRIES 20
|
||||
#define ATH_CHAN_MAX 255
|
||||
|
||||
#define ATH_TXPOWER_MAX 100 /* .5 dBm units */
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1006,16 +1006,26 @@ void ath9k_hw_init_global_settings(struc
|
||||
@@ -1005,16 +1005,26 @@ void ath9k_hw_init_global_settings(struc
|
||||
|
||||
if (IS_CHAN_HALF_RATE(chan)) {
|
||||
eifs = 175;
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1007,31 +1007,35 @@ void ath9k_hw_init_global_settings(struc
|
||||
@@ -1006,31 +1006,35 @@ void ath9k_hw_init_global_settings(struc
|
||||
if (IS_CHAN_HALF_RATE(chan)) {
|
||||
eifs = 175;
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
RX_SAMP_DBG(rssi_ctl0) = rs->rs_rssi_ctl0;
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
||||
@@ -164,13 +164,6 @@ struct ath_rx_stats {
|
||||
@@ -165,13 +165,6 @@ struct ath_rx_stats {
|
||||
u32 post_delim_crc_err;
|
||||
u32 decrypt_busy_err;
|
||||
u32 phy_err_stats[ATH9K_PHYERR_MAX];
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
int antenna;
|
||||
--- a/net/mac80211/sta_info.h
|
||||
+++ b/net/mac80211/sta_info.h
|
||||
@@ -302,6 +302,11 @@ struct sta_info {
|
||||
@@ -312,6 +312,11 @@ struct sta_info {
|
||||
unsigned long rx_dropped;
|
||||
int last_signal;
|
||||
struct ewma avg_signal;
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1267,6 +1267,7 @@ ieee80211_rx_h_sta_process(struct ieee80
|
||||
@@ -1269,6 +1269,7 @@ ieee80211_rx_h_sta_process(struct ieee80
|
||||
struct sk_buff *skb = rx->skb;
|
||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
|
@ -45,7 +45,7 @@
|
|||
|
||||
if (!sta)
|
||||
return RX_CONTINUE;
|
||||
@@ -1309,6 +1310,19 @@ ieee80211_rx_h_sta_process(struct ieee80
|
||||
@@ -1311,6 +1312,19 @@ ieee80211_rx_h_sta_process(struct ieee80
|
||||
sta->last_signal = status->signal;
|
||||
ewma_add(&sta->avg_signal, -status->signal);
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
* exchange sequence.
|
||||
--- a/net/mac80211/sta_info.c
|
||||
+++ b/net/mac80211/sta_info.c
|
||||
@@ -304,6 +304,8 @@ struct sta_info *sta_info_alloc(struct i
|
||||
@@ -255,6 +255,8 @@ struct sta_info *sta_info_alloc(struct i
|
||||
do_posix_clock_monotonic_gettime(&uptime);
|
||||
sta->last_connected = uptime.tv_sec;
|
||||
ewma_init(&sta->avg_signal, 1024, 8);
|
||||
|
@ -78,27 +78,27 @@
|
|||
kfree(sta);
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -505,6 +505,8 @@ struct station_parameters {
|
||||
* @STATION_INFO_CONNECTED_TIME: @connected_time filled
|
||||
@@ -508,6 +508,8 @@ struct station_parameters {
|
||||
* @STATION_INFO_ASSOC_REQ_IES: @assoc_req_ies filled
|
||||
* @STATION_INFO_STA_FLAGS: @sta_flags filled
|
||||
* @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
|
||||
+ * @STATION_INFO_CHAIN_SIGNAL: @chain_signal filled
|
||||
+ * @STATION_INFO_CHAIN_SIGNAL_AVG: @chain_signal_avg filled
|
||||
*/
|
||||
enum station_info_flags {
|
||||
STATION_INFO_INACTIVE_TIME = 1<<0,
|
||||
@@ -525,7 +527,9 @@ enum station_info_flags {
|
||||
STATION_INFO_BSS_PARAM = 1<<15,
|
||||
@@ -529,7 +531,9 @@ enum station_info_flags {
|
||||
STATION_INFO_CONNECTED_TIME = 1<<16,
|
||||
STATION_INFO_ASSOC_REQ_IES = 1<<17,
|
||||
- STATION_INFO_STA_FLAGS = 1<<18
|
||||
+ STATION_INFO_STA_FLAGS = 1<<18,
|
||||
+ STATION_INFO_CHAIN_SIGNAL = 1<<19,
|
||||
+ STATION_INFO_CHAIN_SIGNAL_AVG = 1<<20,
|
||||
STATION_INFO_STA_FLAGS = 1<<18,
|
||||
- STATION_INFO_BEACON_LOSS_COUNT = 1<<19
|
||||
+ STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
|
||||
+ STATION_INFO_CHAIN_SIGNAL = 1<<20,
|
||||
+ STATION_INFO_CHAIN_SIGNAL_AVG = 1<<21,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -605,6 +609,9 @@ struct sta_bss_parameters {
|
||||
@@ -609,6 +613,9 @@ struct sta_bss_parameters {
|
||||
* @plink_state: mesh peer link state
|
||||
* @signal: signal strength of last received packet in dBm
|
||||
* @signal_avg: signal strength average in dBm
|
||||
|
@ -108,7 +108,7 @@
|
|||
* @txrate: current unicast bitrate from this station
|
||||
* @rxrate: current unicast bitrate to this station
|
||||
* @rx_packets: packets received from this station
|
||||
@@ -635,6 +642,11 @@ struct station_info {
|
||||
@@ -640,6 +647,11 @@ struct station_info {
|
||||
u8 plink_state;
|
||||
s8 signal;
|
||||
s8 signal_avg;
|
||||
|
@ -139,7 +139,7 @@
|
|||
u8 rs_num_delims;
|
||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -980,6 +980,7 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
@@ -987,6 +987,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));
|
||||
|
||||
@@ -1005,6 +1006,20 @@ static int ath9k_rx_skb_preprocess(struc
|
||||
@@ -1012,6 +1013,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;
|
||||
}
|
||||
|
||||
@@ -1535,14 +1550,14 @@ static void ath_ant_comb_scan(struct ath
|
||||
@@ -1542,14 +1557,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
|
||||
@@ -484,12 +484,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
@@ -483,12 +483,12 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
|
||||
/* XXX: Keycache */
|
||||
rxs->rs_rssi = MS(rxsp->status5, AR_RxRSSICombined);
|
||||
|
@ -210,7 +210,7 @@
|
|||
rxs->rs_keyix = MS(rxsp->status11, AR_KeyIdx);
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -559,25 +559,25 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
|
||||
@@ -556,25 +556,25 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
|
||||
|
||||
if (ads.ds_rxstatus8 & AR_PostDelimCRCErr) {
|
||||
rs->rs_rssi = ATH9K_RSSI_BAD;
|
||||
|
@ -271,19 +271,19 @@
|
|||
RX_SAMP_DBG(rate) = rs->rs_rate;
|
||||
--- a/include/linux/nl80211.h
|
||||
+++ b/include/linux/nl80211.h
|
||||
@@ -1651,6 +1651,8 @@ enum nl80211_sta_bss_param {
|
||||
* containing info as possible, see &enum nl80211_sta_bss_param
|
||||
@@ -1657,6 +1657,8 @@ 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.
|
||||
* @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
|
||||
+ * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
|
||||
+ * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
|
||||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
*/
|
||||
@@ -1673,6 +1675,8 @@ enum nl80211_sta_info {
|
||||
NL80211_STA_INFO_BSS_PARAM,
|
||||
@@ -1680,6 +1682,8 @@ enum nl80211_sta_info {
|
||||
NL80211_STA_INFO_CONNECTED_TIME,
|
||||
NL80211_STA_INFO_STA_FLAGS,
|
||||
NL80211_STA_INFO_BEACON_LOSS,
|
||||
+ NL80211_STA_INFO_CHAIN_SIGNAL,
|
||||
+ NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
|
||||
|
||||
|
@ -291,7 +291,7 @@
|
|||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -2322,6 +2322,33 @@ nla_put_failure:
|
||||
@@ -2347,6 +2347,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)
|
||||
@@ -2368,6 +2395,18 @@ static int nl80211_send_station(struct s
|
||||
@@ -2393,6 +2420,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);
|
||||
|
@ -354,7 +354,7 @@
|
|||
|
||||
sinfo->generation = sdata->local->sta_generation;
|
||||
|
||||
@@ -375,6 +376,17 @@ static void sta_set_sinfo(struct sta_inf
|
||||
@@ -377,6 +378,17 @@ static void sta_set_sinfo(struct sta_inf
|
||||
sinfo->signal = (s8)sta->last_signal;
|
||||
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -803,7 +803,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -817,7 +817,7 @@ int ath9k_init_device(u16 devid, struct
|
||||
|
||||
#ifdef CONFIG_MAC80211_LEDS
|
||||
/* must be initialized before ieee80211_register_hw */
|
||||
|
@ -244,7 +244,7 @@
|
|||
void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
|
||||
{
|
||||
#define ATH_SAMP_DBG(c) (sc->debug.bb_mac_samp[sc->debug.sampidx].c)
|
||||
@@ -1725,6 +1780,11 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
@@ -1728,6 +1783,11 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
debugfs_create_file("samples", S_IRUSR, sc->debug.debugfs_phy, sc,
|
||||
&fops_samps);
|
||||
|
|
@ -1,240 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -159,6 +159,9 @@ void ath_descdma_cleanup(struct ath_soft
|
||||
/* return block-ack bitmap index given sequence and starting sequence */
|
||||
#define ATH_BA_INDEX(_st, _seq) (((_seq) - (_st)) & (IEEE80211_SEQ_MAX - 1))
|
||||
|
||||
+/* return the seqno for _start + _offset */
|
||||
+#define ATH_BA_INDEX2SEQ(_seq, _offset) (((_seq) + (_offset)) & (IEEE80211_SEQ_MAX - 1))
|
||||
+
|
||||
/* returns delimiter padding required given the packet length */
|
||||
#define ATH_AGGR_GET_NDELIM(_len) \
|
||||
(((_len) >= ATH_AGGR_MINPLEN) ? 0 : \
|
||||
@@ -253,9 +256,9 @@ struct ath_atx_tid {
|
||||
struct ath_node {
|
||||
#ifdef CONFIG_ATH9K_DEBUGFS
|
||||
struct list_head list; /* for sc->nodes */
|
||||
+#endif
|
||||
struct ieee80211_sta *sta; /* station struct we're part of */
|
||||
struct ieee80211_vif *vif; /* interface with which we're associated */
|
||||
-#endif
|
||||
struct ath_atx_tid tid[WME_NUM_TID];
|
||||
struct ath_atx_ac ac[WME_NUM_AC];
|
||||
int ps_key;
|
||||
@@ -277,7 +280,6 @@ struct ath_tx_control {
|
||||
};
|
||||
|
||||
#define ATH_TX_ERROR 0x01
|
||||
-#define ATH_TX_BAR 0x02
|
||||
|
||||
/**
|
||||
* @txq_map: Index is mac80211 queue number. This is
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -644,9 +644,9 @@ static void ath_node_attach(struct ath_s
|
||||
spin_lock(&sc->nodes_lock);
|
||||
list_add(&an->list, &sc->nodes);
|
||||
spin_unlock(&sc->nodes_lock);
|
||||
+#endif
|
||||
an->sta = sta;
|
||||
an->vif = vif;
|
||||
-#endif
|
||||
if (sc->sc_flags & SC_OP_TXAGGR) {
|
||||
ath_tx_node_init(sc, an);
|
||||
an->maxampdu = 1 << (IEEE80211_HT_MAX_AMPDU_FACTOR +
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -53,7 +53,7 @@ static void ath_tx_complete(struct ath_s
|
||||
int tx_flags, struct ath_txq *txq);
|
||||
static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
|
||||
struct ath_txq *txq, struct list_head *bf_q,
|
||||
- struct ath_tx_status *ts, int txok, int sendbar);
|
||||
+ struct ath_tx_status *ts, int txok);
|
||||
static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
|
||||
struct list_head *head, bool internal);
|
||||
static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
|
||||
@@ -150,6 +150,12 @@ static struct ath_frame_info *get_frame_
|
||||
return (struct ath_frame_info *) &tx_info->rate_driver_data[0];
|
||||
}
|
||||
|
||||
+static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
|
||||
+{
|
||||
+ ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno,
|
||||
+ seqno << IEEE80211_SEQ_SEQ_SHIFT);
|
||||
+}
|
||||
+
|
||||
static void ath_tx_flush_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
|
||||
{
|
||||
struct ath_txq *txq = tid->ac->txq;
|
||||
@@ -158,6 +164,7 @@ static void ath_tx_flush_tid(struct ath_
|
||||
struct list_head bf_head;
|
||||
struct ath_tx_status ts;
|
||||
struct ath_frame_info *fi;
|
||||
+ bool sendbar = false;
|
||||
|
||||
INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
@@ -172,7 +179,8 @@ static void ath_tx_flush_tid(struct ath_
|
||||
if (bf && fi->retries) {
|
||||
list_add_tail(&bf->list, &bf_head);
|
||||
ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 1);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
+ sendbar = true;
|
||||
} else {
|
||||
ath_tx_send_normal(sc, txq, NULL, skb);
|
||||
}
|
||||
@@ -185,6 +193,9 @@ static void ath_tx_flush_tid(struct ath_
|
||||
}
|
||||
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ if (sendbar)
|
||||
+ ath_send_bar(tid, tid->seq_start);
|
||||
}
|
||||
|
||||
static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
@@ -255,7 +266,7 @@ static void ath_tid_drain(struct ath_sof
|
||||
ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
|
||||
|
||||
spin_unlock(&txq->axq_lock);
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
spin_lock(&txq->axq_lock);
|
||||
}
|
||||
|
||||
@@ -381,7 +392,7 @@ static void ath_tx_complete_aggr(struct
|
||||
struct ath_buf *bf_next, *bf_last = bf->bf_lastbf;
|
||||
struct list_head bf_head;
|
||||
struct sk_buff_head bf_pending;
|
||||
- u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0;
|
||||
+ u16 seq_st = 0, acked_cnt = 0, txfail_cnt = 0, seq_first;
|
||||
u32 ba[WME_BA_BMP_SIZE >> 5];
|
||||
int isaggr, txfail, txpending, sendbar = 0, needreset = 0, nbad = 0;
|
||||
bool rc_update = true;
|
||||
@@ -391,6 +402,7 @@ static void ath_tx_complete_aggr(struct
|
||||
u8 tidno;
|
||||
bool flush = !!(ts->ts_status & ATH9K_TX_FLUSH);
|
||||
int i, retries;
|
||||
+ int bar_index = -1;
|
||||
|
||||
skb = bf->bf_mpdu;
|
||||
hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -416,8 +428,7 @@ static void ath_tx_complete_aggr(struct
|
||||
if (!bf->bf_stale || bf_next != NULL)
|
||||
list_move_tail(&bf->list, &bf_head);
|
||||
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
|
||||
- 0, 0);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, ts, 0);
|
||||
|
||||
bf = bf_next;
|
||||
}
|
||||
@@ -427,6 +438,7 @@ static void ath_tx_complete_aggr(struct
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
tidno = ieee80211_get_qos_ctl(hdr)[0] & IEEE80211_QOS_CTL_TID_MASK;
|
||||
tid = ATH_AN_2_TID(an, tidno);
|
||||
+ seq_first = tid->seq_start;
|
||||
|
||||
/*
|
||||
* The hardware occasionally sends a tx status for the wrong TID.
|
||||
@@ -495,8 +507,9 @@ static void ath_tx_complete_aggr(struct
|
||||
txpending = 1;
|
||||
} else {
|
||||
txfail = 1;
|
||||
- sendbar = 1;
|
||||
txfail_cnt++;
|
||||
+ bar_index = max_t(int, bar_index,
|
||||
+ ATH_BA_INDEX(seq_first, seqno));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,7 +538,7 @@ static void ath_tx_complete_aggr(struct
|
||||
}
|
||||
|
||||
ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
|
||||
- !txfail, sendbar);
|
||||
+ !txfail);
|
||||
} else {
|
||||
/* retry the un-acked ones */
|
||||
if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
|
||||
@@ -545,8 +558,10 @@ static void ath_tx_complete_aggr(struct
|
||||
|
||||
ath_tx_complete_buf(sc, bf, txq,
|
||||
&bf_head,
|
||||
- ts, 0,
|
||||
- !flush);
|
||||
+ ts, 0);
|
||||
+ bar_index = max_t(int, bar_index,
|
||||
+ ATH_BA_INDEX(seq_first,
|
||||
+ seqno));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -564,6 +579,9 @@ static void ath_tx_complete_aggr(struct
|
||||
bf = bf_next;
|
||||
}
|
||||
|
||||
+ if (bar_index >= 0)
|
||||
+ ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
|
||||
+
|
||||
/* prepend un-acked frames to the beginning of the pending frame queue */
|
||||
if (!skb_queue_empty(&bf_pending)) {
|
||||
if (an->sleeping)
|
||||
@@ -1452,7 +1470,7 @@ static void ath_drain_txq_list(struct at
|
||||
ath_tx_complete_aggr(sc, txq, bf, &bf_head, &ts, 0,
|
||||
retry_tx);
|
||||
else
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
}
|
||||
}
|
||||
@@ -1967,9 +1985,6 @@ static void ath_tx_complete(struct ath_s
|
||||
|
||||
ath_dbg(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb);
|
||||
|
||||
- if (tx_flags & ATH_TX_BAR)
|
||||
- tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
|
||||
-
|
||||
if (!(tx_flags & ATH_TX_ERROR))
|
||||
/* Frame was ACKed */
|
||||
tx_info->flags |= IEEE80211_TX_STAT_ACK;
|
||||
@@ -2013,16 +2028,13 @@ static void ath_tx_complete(struct ath_s
|
||||
|
||||
static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
|
||||
struct ath_txq *txq, struct list_head *bf_q,
|
||||
- struct ath_tx_status *ts, int txok, int sendbar)
|
||||
+ struct ath_tx_status *ts, int txok)
|
||||
{
|
||||
struct sk_buff *skb = bf->bf_mpdu;
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
unsigned long flags;
|
||||
int tx_flags = 0;
|
||||
|
||||
- if (sendbar)
|
||||
- tx_flags = ATH_TX_BAR;
|
||||
-
|
||||
if (!txok)
|
||||
tx_flags |= ATH_TX_ERROR;
|
||||
|
||||
@@ -2129,7 +2141,7 @@ static void ath_tx_process_buffer(struct
|
||||
|
||||
if (!bf_isampdu(bf)) {
|
||||
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
||||
- ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok, 0);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
||||
} else
|
||||
ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok, true);
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -856,7 +856,7 @@ void ath_debug_stat_tx(struct ath_softc
|
||||
sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len;
|
||||
|
||||
if (bf_isampdu(bf)) {
|
||||
- if (flags & ATH_TX_BAR)
|
||||
+ if (flags & ATH_TX_ERROR)
|
||||
TX_STAT_INC(qnum, a_xretries);
|
||||
else
|
||||
TX_STAT_INC(qnum, a_completed);
|
|
@ -1,159 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -490,27 +490,25 @@ static void ath_tx_complete_aggr(struct
|
||||
} else if (!isaggr && txok) {
|
||||
/* transmit completion */
|
||||
acked_cnt++;
|
||||
+ } else if ((tid->state & AGGR_CLEANUP) || !retry) {
|
||||
+ /*
|
||||
+ * cleanup in progress, just fail
|
||||
+ * the un-acked sub-frames
|
||||
+ */
|
||||
+ txfail = 1;
|
||||
+ } else if (flush) {
|
||||
+ txpending = 1;
|
||||
+ } else if (fi->retries < ATH_MAX_SW_RETRIES) {
|
||||
+ if (txok || !an->sleeping)
|
||||
+ ath_tx_set_retry(sc, txq, bf->bf_mpdu,
|
||||
+ retries);
|
||||
+
|
||||
+ txpending = 1;
|
||||
} else {
|
||||
- if ((tid->state & AGGR_CLEANUP) || !retry) {
|
||||
- /*
|
||||
- * cleanup in progress, just fail
|
||||
- * the un-acked sub-frames
|
||||
- */
|
||||
- txfail = 1;
|
||||
- } else if (flush) {
|
||||
- txpending = 1;
|
||||
- } else if (fi->retries < ATH_MAX_SW_RETRIES) {
|
||||
- if (txok || !an->sleeping)
|
||||
- ath_tx_set_retry(sc, txq, bf->bf_mpdu,
|
||||
- retries);
|
||||
-
|
||||
- txpending = 1;
|
||||
- } else {
|
||||
- txfail = 1;
|
||||
- txfail_cnt++;
|
||||
- bar_index = max_t(int, bar_index,
|
||||
- ATH_BA_INDEX(seq_first, seqno));
|
||||
- }
|
||||
+ txfail = 1;
|
||||
+ txfail_cnt++;
|
||||
+ bar_index = max_t(int, bar_index,
|
||||
+ ATH_BA_INDEX(seq_first, seqno));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -541,32 +539,29 @@ static void ath_tx_complete_aggr(struct
|
||||
!txfail);
|
||||
} else {
|
||||
/* retry the un-acked ones */
|
||||
- if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)) {
|
||||
- if (bf->bf_next == NULL && bf_last->bf_stale) {
|
||||
- struct ath_buf *tbf;
|
||||
-
|
||||
- tbf = ath_clone_txbuf(sc, bf_last);
|
||||
- /*
|
||||
- * Update tx baw and complete the
|
||||
- * frame with failed status if we
|
||||
- * run out of tx buf.
|
||||
- */
|
||||
- if (!tbf) {
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
- ath_tx_update_baw(sc, tid, seqno);
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
-
|
||||
- ath_tx_complete_buf(sc, bf, txq,
|
||||
- &bf_head,
|
||||
- ts, 0);
|
||||
- bar_index = max_t(int, bar_index,
|
||||
- ATH_BA_INDEX(seq_first,
|
||||
- seqno));
|
||||
- break;
|
||||
- }
|
||||
+ if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
|
||||
+ bf->bf_next == NULL && bf_last->bf_stale) {
|
||||
+ struct ath_buf *tbf;
|
||||
|
||||
- fi->bf = tbf;
|
||||
+ tbf = ath_clone_txbuf(sc, bf_last);
|
||||
+ /*
|
||||
+ * Update tx baw and complete the
|
||||
+ * frame with failed status if we
|
||||
+ * run out of tx buf.
|
||||
+ */
|
||||
+ if (!tbf) {
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_tx_update_baw(sc, tid, seqno);
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ ath_tx_complete_buf(sc, bf, txq,
|
||||
+ &bf_head, ts, 0);
|
||||
+ bar_index = max_t(int, bar_index,
|
||||
+ ATH_BA_INDEX(seq_first, seqno));
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ fi->bf = tbf;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -654,24 +649,26 @@ static u32 ath_lookup_rate(struct ath_so
|
||||
max_4ms_framelen = ATH_AMPDU_LIMIT_MAX;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
- if (rates[i].count) {
|
||||
- int modeidx;
|
||||
- if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
|
||||
- legacy = 1;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
- if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
|
||||
- modeidx = MCS_HT40;
|
||||
- else
|
||||
- modeidx = MCS_HT20;
|
||||
+ int modeidx;
|
||||
|
||||
- if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
|
||||
- modeidx++;
|
||||
+ if (!rates[i].count)
|
||||
+ continue;
|
||||
|
||||
- frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
|
||||
- max_4ms_framelen = min(max_4ms_framelen, frmlen);
|
||||
+ if (!(rates[i].flags & IEEE80211_TX_RC_MCS)) {
|
||||
+ legacy = 1;
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ if (rates[i].flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
|
||||
+ modeidx = MCS_HT40;
|
||||
+ else
|
||||
+ modeidx = MCS_HT20;
|
||||
+
|
||||
+ if (rates[i].flags & IEEE80211_TX_RC_SHORT_GI)
|
||||
+ modeidx++;
|
||||
+
|
||||
+ frmlen = ath_max_4ms_framelen[modeidx][rates[i].idx];
|
||||
+ max_4ms_framelen = min(max_4ms_framelen, frmlen);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1598,11 +1595,9 @@ void ath_txq_schedule(struct ath_softc *
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!list_empty(&ac->tid_q)) {
|
||||
- if (!ac->sched) {
|
||||
- ac->sched = true;
|
||||
- list_add_tail(&ac->list, &txq->axq_acq);
|
||||
- }
|
||||
+ if (!list_empty(&ac->tid_q) && !ac->sched) {
|
||||
+ ac->sched = true;
|
||||
+ list_add_tail(&ac->list, &txq->axq_acq);
|
||||
}
|
||||
|
||||
if (ac == last_ac ||
|
|
@ -1,13 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1742,10 +1742,6 @@ static void ath_tx_send_normal(struct at
|
||||
list_add_tail(&bf->list, &bf_head);
|
||||
bf->bf_state.bf_type = 0;
|
||||
|
||||
- /* update starting sequence number for subsequent ADDBA request */
|
||||
- if (tid)
|
||||
- INCR(tid->seq_start, IEEE80211_SEQ_MAX);
|
||||
-
|
||||
bf->bf_lastbf = bf;
|
||||
ath_tx_fill_desc(sc, bf, txq, fi->framelen);
|
||||
ath_tx_txqaddbuf(sc, txq, &bf_head, false);
|
|
@ -1,214 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -169,13 +169,11 @@ static void ath_tx_flush_tid(struct ath_
|
||||
INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
memset(&ts, 0, sizeof(ts));
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
|
||||
while ((skb = __skb_dequeue(&tid->buf_q))) {
|
||||
fi = get_frame_info(skb);
|
||||
bf = fi->bf;
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
if (bf && fi->retries) {
|
||||
list_add_tail(&bf->list, &bf_head);
|
||||
ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
|
||||
@@ -184,7 +182,6 @@ static void ath_tx_flush_tid(struct ath_
|
||||
} else {
|
||||
ath_tx_send_normal(sc, txq, NULL, skb);
|
||||
}
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
}
|
||||
|
||||
if (tid->baw_head == tid->baw_tail) {
|
||||
@@ -192,8 +189,6 @@ static void ath_tx_flush_tid(struct ath_
|
||||
tid->state &= ~AGGR_CLEANUP;
|
||||
}
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
-
|
||||
if (sendbar)
|
||||
ath_send_bar(tid, tid->seq_start);
|
||||
}
|
||||
@@ -254,9 +249,7 @@ static void ath_tid_drain(struct ath_sof
|
||||
bf = fi->bf;
|
||||
|
||||
if (!bf) {
|
||||
- spin_unlock(&txq->axq_lock);
|
||||
ath_tx_complete(sc, skb, ATH_TX_ERROR, txq);
|
||||
- spin_lock(&txq->axq_lock);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -265,9 +258,7 @@ static void ath_tid_drain(struct ath_sof
|
||||
if (fi->retries)
|
||||
ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
|
||||
|
||||
- spin_unlock(&txq->axq_lock);
|
||||
ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
- spin_lock(&txq->axq_lock);
|
||||
}
|
||||
|
||||
tid->seq_next = tid->seq_start;
|
||||
@@ -525,9 +516,7 @@ static void ath_tx_complete_aggr(struct
|
||||
* complete the acked-ones/xretried ones; update
|
||||
* block-ack window
|
||||
*/
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
ath_tx_update_baw(sc, tid, seqno);
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) {
|
||||
memcpy(tx_info->control.rates, rates, sizeof(rates));
|
||||
@@ -550,9 +539,7 @@ static void ath_tx_complete_aggr(struct
|
||||
* run out of tx buf.
|
||||
*/
|
||||
if (!tbf) {
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
ath_tx_update_baw(sc, tid, seqno);
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
ath_tx_complete_buf(sc, bf, txq,
|
||||
&bf_head, ts, 0);
|
||||
@@ -582,7 +569,6 @@ static void ath_tx_complete_aggr(struct
|
||||
if (an->sleeping)
|
||||
ieee80211_sta_set_buffered(sta, tid->tidno, true);
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
skb_queue_splice(&bf_pending, &tid->buf_q);
|
||||
if (!an->sleeping) {
|
||||
ath_tx_queue_tid(txq, tid);
|
||||
@@ -590,7 +576,6 @@ static void ath_tx_complete_aggr(struct
|
||||
if (ts->ts_status & ATH9K_TXERR_FILT)
|
||||
tid->ac->clear_ps_filter = true;
|
||||
}
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
}
|
||||
|
||||
if (tid->state & AGGR_CLEANUP)
|
||||
@@ -1190,9 +1175,9 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
txtid->state |= AGGR_CLEANUP;
|
||||
else
|
||||
txtid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
ath_tx_flush_tid(sc, txtid);
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
}
|
||||
|
||||
void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
|
||||
@@ -1434,8 +1419,6 @@ static bool bf_is_ampdu_not_probing(stru
|
||||
|
||||
static void ath_drain_txq_list(struct ath_softc *sc, struct ath_txq *txq,
|
||||
struct list_head *list, bool retry_tx)
|
||||
- __releases(txq->axq_lock)
|
||||
- __acquires(txq->axq_lock)
|
||||
{
|
||||
struct ath_buf *bf, *lastbf;
|
||||
struct list_head bf_head;
|
||||
@@ -1462,13 +1445,11 @@ static void ath_drain_txq_list(struct at
|
||||
if (bf_is_ampdu_not_probing(bf))
|
||||
txq->axq_ampdu_depth--;
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
if (bf_isampdu(bf))
|
||||
ath_tx_complete_aggr(sc, txq, bf, &bf_head, &ts, 0,
|
||||
retry_tx);
|
||||
else
|
||||
ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1847,8 +1828,6 @@ static void ath_tx_start_dma(struct ath_
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
struct ath_buf *bf;
|
||||
|
||||
- spin_lock_bh(&txctl->txq->axq_lock);
|
||||
-
|
||||
if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
|
||||
/*
|
||||
* Try aggregation if it's a unicast data frame
|
||||
@@ -1858,7 +1837,7 @@ static void ath_tx_start_dma(struct ath_
|
||||
} else {
|
||||
bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb);
|
||||
if (!bf)
|
||||
- goto out;
|
||||
+ return;
|
||||
|
||||
bf->bf_state.bfs_paprd = txctl->paprd;
|
||||
|
||||
@@ -1867,9 +1846,6 @@ static void ath_tx_start_dma(struct ath_
|
||||
|
||||
ath_tx_send_normal(sc, txctl->txq, tid, skb);
|
||||
}
|
||||
-
|
||||
-out:
|
||||
- spin_unlock_bh(&txctl->txq->axq_lock);
|
||||
}
|
||||
|
||||
/* Upon failure caller should free skb */
|
||||
@@ -1949,15 +1925,19 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
*/
|
||||
|
||||
q = skb_get_queue_mapping(skb);
|
||||
+
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
+
|
||||
if (txq == sc->tx.txq_map[q] &&
|
||||
++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) {
|
||||
ieee80211_stop_queue(sc->hw, q);
|
||||
txq->stopped = 1;
|
||||
}
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
ath_tx_start_dma(sc, skb, txctl, tid);
|
||||
+
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2003,7 +1983,6 @@ static void ath_tx_complete(struct ath_s
|
||||
|
||||
q = skb_get_queue_mapping(skb);
|
||||
if (txq == sc->tx.txq_map[q]) {
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
if (WARN_ON(--txq->pending_frames < 0))
|
||||
txq->pending_frames = 0;
|
||||
|
||||
@@ -2011,7 +1990,6 @@ static void ath_tx_complete(struct ath_s
|
||||
ieee80211_wake_queue(sc->hw, q);
|
||||
txq->stopped = 0;
|
||||
}
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
}
|
||||
|
||||
ieee80211_tx_status(hw, skb);
|
||||
@@ -2117,8 +2095,6 @@ static void ath_tx_rc_status(struct ath_
|
||||
static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq,
|
||||
struct ath_tx_status *ts, struct ath_buf *bf,
|
||||
struct list_head *bf_head)
|
||||
- __releases(txq->axq_lock)
|
||||
- __acquires(txq->axq_lock)
|
||||
{
|
||||
int txok;
|
||||
|
||||
@@ -2128,16 +2104,12 @@ static void ath_tx_process_buffer(struct
|
||||
if (bf_is_ampdu_not_probing(bf))
|
||||
txq->axq_ampdu_depth--;
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
-
|
||||
if (!bf_isampdu(bf)) {
|
||||
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
||||
ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
||||
} else
|
||||
ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok, true);
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
-
|
||||
if (sc->sc_flags & SC_OP_TXAGGR)
|
||||
ath_txq_schedule(sc, txq);
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -242,6 +242,7 @@ struct ath_atx_tid {
|
||||
struct ath_atx_ac *ac;
|
||||
unsigned long tx_buf[BITS_TO_LONGS(ATH_TID_MAX_BUFS)];
|
||||
int buf_pending;
|
||||
+ int bar_index;
|
||||
u16 seq_start;
|
||||
u16 seq_next;
|
||||
u16 baw_size;
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -206,6 +206,8 @@ static void ath_tx_update_baw(struct ath
|
||||
while (tid->baw_head != tid->baw_tail && !test_bit(tid->baw_head, tid->tx_buf)) {
|
||||
INCR(tid->seq_start, IEEE80211_SEQ_MAX);
|
||||
INCR(tid->baw_head, ATH_TID_MAX_BUFS);
|
||||
+ if (tid->bar_index >= 0)
|
||||
+ tid->bar_index--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,6 +265,7 @@ static void ath_tid_drain(struct ath_sof
|
||||
|
||||
tid->seq_next = tid->seq_start;
|
||||
tid->baw_tail = tid->baw_head;
|
||||
+ tid->bar_index = -1;
|
||||
}
|
||||
|
||||
static void ath_tx_set_retry(struct ath_softc *sc, struct ath_txq *txq,
|
||||
@@ -561,8 +564,12 @@ static void ath_tx_complete_aggr(struct
|
||||
bf = bf_next;
|
||||
}
|
||||
|
||||
- if (bar_index >= 0)
|
||||
+ if (bar_index >= 0) {
|
||||
+ u16 bar_seq = ATH_BA_INDEX2SEQ(seq_first, bar_index);
|
||||
ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
|
||||
+ if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq))
|
||||
+ tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq);
|
||||
+ }
|
||||
|
||||
/* prepend un-acked frames to the beginning of the pending frame queue */
|
||||
if (!skb_queue_empty(&bf_pending)) {
|
||||
@@ -789,8 +796,6 @@ static enum ATH_AGGR_STATUS ath_tx_form_
|
||||
|
||||
bf->bf_state.bf_type = BUF_AMPDU | BUF_AGGR;
|
||||
seqno = bf->bf_state.seqno;
|
||||
- if (!bf_first)
|
||||
- bf_first = bf;
|
||||
|
||||
/* do not step over block-ack window */
|
||||
if (!BAW_WITHIN(tid->seq_start, tid->baw_size, seqno)) {
|
||||
@@ -798,6 +803,21 @@ static enum ATH_AGGR_STATUS ath_tx_form_
|
||||
break;
|
||||
}
|
||||
|
||||
+ if (tid->bar_index > ATH_BA_INDEX(tid->seq_start, seqno)) {
|
||||
+ struct ath_tx_status ts = {};
|
||||
+ struct list_head bf_head;
|
||||
+
|
||||
+ INIT_LIST_HEAD(&bf_head);
|
||||
+ list_add(&bf->list, &bf_head);
|
||||
+ __skb_unlink(skb, &tid->buf_q);
|
||||
+ ath_tx_update_baw(sc, tid, seqno);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!bf_first)
|
||||
+ bf_first = bf;
|
||||
+
|
||||
if (!rl) {
|
||||
aggr_limit = ath_lookup_rate(sc, bf, tid);
|
||||
rl = 1;
|
||||
@@ -1141,6 +1161,7 @@ int ath_tx_aggr_start(struct ath_softc *
|
||||
txtid->state |= AGGR_ADDBA_PROGRESS;
|
||||
txtid->paused = true;
|
||||
*ssn = txtid->seq_start = txtid->seq_next;
|
||||
+ txtid->bar_index = -1;
|
||||
|
||||
memset(txtid->tx_buf, 0, sizeof(txtid->tx_buf));
|
||||
txtid->baw_head = txtid->baw_tail = 0;
|
|
@ -1,299 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -104,6 +104,29 @@ static int ath_max_4ms_framelen[4][32] =
|
||||
/* Aggregation logic */
|
||||
/*********************/
|
||||
|
||||
+static void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq)
|
||||
+{
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+}
|
||||
+
|
||||
+static void ath_txq_unlock(struct ath_softc *sc, struct ath_txq *txq)
|
||||
+{
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+}
|
||||
+
|
||||
+static void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq)
|
||||
+{
|
||||
+ struct sk_buff_head q;
|
||||
+ struct sk_buff *skb;
|
||||
+
|
||||
+ __skb_queue_head_init(&q);
|
||||
+ skb_queue_splice_init(&txq->complete_q, &q);
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ while ((skb = __skb_dequeue(&q)))
|
||||
+ ieee80211_tx_status(sc->hw, skb);
|
||||
+}
|
||||
+
|
||||
static void ath_tx_queue_tid(struct ath_txq *txq, struct ath_atx_tid *tid)
|
||||
{
|
||||
struct ath_atx_ac *ac = tid->ac;
|
||||
@@ -130,7 +153,7 @@ static void ath_tx_resume_tid(struct ath
|
||||
|
||||
WARN_ON(!tid->paused);
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
tid->paused = false;
|
||||
|
||||
if (skb_queue_empty(&tid->buf_q))
|
||||
@@ -139,7 +162,7 @@ static void ath_tx_resume_tid(struct ath
|
||||
ath_tx_queue_tid(txq, tid);
|
||||
ath_txq_schedule(sc, txq);
|
||||
unlock:
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
|
||||
static struct ath_frame_info *get_frame_info(struct sk_buff *skb)
|
||||
@@ -189,8 +212,11 @@ static void ath_tx_flush_tid(struct ath_
|
||||
tid->state &= ~AGGR_CLEANUP;
|
||||
}
|
||||
|
||||
- if (sendbar)
|
||||
+ if (sendbar) {
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
ath_send_bar(tid, tid->seq_start);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
@@ -564,13 +590,6 @@ static void ath_tx_complete_aggr(struct
|
||||
bf = bf_next;
|
||||
}
|
||||
|
||||
- if (bar_index >= 0) {
|
||||
- u16 bar_seq = ATH_BA_INDEX2SEQ(seq_first, bar_index);
|
||||
- ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
|
||||
- if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq))
|
||||
- tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq);
|
||||
- }
|
||||
-
|
||||
/* prepend un-acked frames to the beginning of the pending frame queue */
|
||||
if (!skb_queue_empty(&bf_pending)) {
|
||||
if (an->sleeping)
|
||||
@@ -585,6 +604,17 @@ static void ath_tx_complete_aggr(struct
|
||||
}
|
||||
}
|
||||
|
||||
+ if (bar_index >= 0) {
|
||||
+ u16 bar_seq = ATH_BA_INDEX2SEQ(seq_first, bar_index);
|
||||
+
|
||||
+ if (BAW_WITHIN(tid->seq_start, tid->baw_size, bar_seq))
|
||||
+ tid->bar_index = ATH_BA_INDEX(tid->seq_start, bar_seq);
|
||||
+
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
+ ath_send_bar(tid, ATH_BA_INDEX2SEQ(seq_first, bar_index + 1));
|
||||
+ ath_txq_lock(sc, txq);
|
||||
+ }
|
||||
+
|
||||
if (tid->state & AGGR_CLEANUP)
|
||||
ath_tx_flush_tid(sc, tid);
|
||||
|
||||
@@ -1183,7 +1213,7 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
return;
|
||||
}
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
txtid->paused = true;
|
||||
|
||||
/*
|
||||
@@ -1198,7 +1228,7 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
txtid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
|
||||
ath_tx_flush_tid(sc, txtid);
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
|
||||
void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
|
||||
@@ -1219,7 +1249,7 @@ void ath_tx_aggr_sleep(struct ieee80211_
|
||||
ac = tid->ac;
|
||||
txq = ac->txq;
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
|
||||
buffered = !skb_queue_empty(&tid->buf_q);
|
||||
|
||||
@@ -1231,7 +1261,7 @@ void ath_tx_aggr_sleep(struct ieee80211_
|
||||
list_del(&ac->list);
|
||||
}
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
|
||||
ieee80211_sta_set_buffered(sta, tidno, buffered);
|
||||
}
|
||||
@@ -1250,7 +1280,7 @@ void ath_tx_aggr_wakeup(struct ath_softc
|
||||
ac = tid->ac;
|
||||
txq = ac->txq;
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
ac->clear_ps_filter = true;
|
||||
|
||||
if (!skb_queue_empty(&tid->buf_q) && !tid->paused) {
|
||||
@@ -1258,7 +1288,7 @@ void ath_tx_aggr_wakeup(struct ath_softc
|
||||
ath_txq_schedule(sc, txq);
|
||||
}
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1358,6 +1388,7 @@ struct ath_txq *ath_txq_setup(struct ath
|
||||
txq->axq_qnum = axq_qnum;
|
||||
txq->mac80211_qnum = -1;
|
||||
txq->axq_link = NULL;
|
||||
+ __skb_queue_head_init(&txq->complete_q);
|
||||
INIT_LIST_HEAD(&txq->axq_q);
|
||||
INIT_LIST_HEAD(&txq->axq_acq);
|
||||
spin_lock_init(&txq->axq_lock);
|
||||
@@ -1482,7 +1513,8 @@ static void ath_drain_txq_list(struct at
|
||||
*/
|
||||
void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx)
|
||||
{
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
+
|
||||
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
|
||||
int idx = txq->txq_tailidx;
|
||||
|
||||
@@ -1503,7 +1535,7 @@ void ath_draintxq(struct ath_softc *sc,
|
||||
if ((sc->sc_flags & SC_OP_TXAGGR) && !retry_tx)
|
||||
ath_txq_drain_pending_buffers(sc, txq);
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
|
||||
bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
|
||||
@@ -1947,7 +1979,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
|
||||
q = skb_get_queue_mapping(skb);
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
|
||||
if (txq == sc->tx.txq_map[q] &&
|
||||
++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) {
|
||||
@@ -1957,7 +1989,7 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
|
||||
ath_tx_start_dma(sc, skb, txctl, tid);
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1969,7 +2001,6 @@ int ath_tx_start(struct ieee80211_hw *hw
|
||||
static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
|
||||
int tx_flags, struct ath_txq *txq)
|
||||
{
|
||||
- struct ieee80211_hw *hw = sc->hw;
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
|
||||
@@ -2013,7 +2044,7 @@ static void ath_tx_complete(struct ath_s
|
||||
}
|
||||
}
|
||||
|
||||
- ieee80211_tx_status(hw, skb);
|
||||
+ __skb_queue_tail(&txq->complete_q, skb);
|
||||
}
|
||||
|
||||
static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
|
||||
@@ -2149,7 +2180,7 @@ static void ath_tx_processq(struct ath_s
|
||||
txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum),
|
||||
txq->axq_link);
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
for (;;) {
|
||||
if (work_pending(&sc->hw_reset_work))
|
||||
break;
|
||||
@@ -2208,7 +2239,7 @@ static void ath_tx_processq(struct ath_s
|
||||
|
||||
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
|
||||
}
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
|
||||
static void ath_tx_complete_poll_work(struct work_struct *work)
|
||||
@@ -2225,17 +2256,17 @@ static void ath_tx_complete_poll_work(st
|
||||
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
|
||||
if (ATH_TXQ_SETUP(sc, i)) {
|
||||
txq = &sc->tx.txq[i];
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
if (txq->axq_depth) {
|
||||
if (txq->axq_tx_inprogress) {
|
||||
needreset = true;
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
break;
|
||||
} else {
|
||||
txq->axq_tx_inprogress = true;
|
||||
}
|
||||
}
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
|
||||
if (needreset) {
|
||||
@@ -2293,10 +2324,10 @@ void ath_tx_edma_tasklet(struct ath_soft
|
||||
|
||||
txq = &sc->tx.txq[ts.qid];
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
|
||||
if (list_empty(&txq->txq_fifo[txq->txq_tailidx])) {
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2322,7 +2353,7 @@ void ath_tx_edma_tasklet(struct ath_soft
|
||||
}
|
||||
|
||||
ath_tx_process_buffer(sc, txq, &ts, bf, &bf_head);
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock_complete(sc, txq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2460,7 +2491,7 @@ void ath_tx_node_cleanup(struct ath_soft
|
||||
ac = tid->ac;
|
||||
txq = ac->txq;
|
||||
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ ath_txq_lock(sc, txq);
|
||||
|
||||
if (tid->sched) {
|
||||
list_del(&tid->list);
|
||||
@@ -2476,6 +2507,6 @@ void ath_tx_node_cleanup(struct ath_soft
|
||||
tid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
tid->state &= ~AGGR_CLEANUP;
|
||||
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
+ ath_txq_unlock(sc, txq);
|
||||
}
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -196,6 +196,7 @@ struct ath_txq {
|
||||
u8 txq_headidx;
|
||||
u8 txq_tailidx;
|
||||
int pending_frames;
|
||||
+ struct sk_buff_head complete_q;
|
||||
};
|
||||
|
||||
struct ath_atx_ac {
|
|
@ -1,32 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
@@ -558,10 +558,11 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
else if (rxsp->status11 & AR_MichaelErr)
|
||||
rxs->rs_status |= ATH9K_RXERR_MIC;
|
||||
- if (rxsp->status11 & AR_KeyMiss)
|
||||
- rxs->rs_status |= ATH9K_RXERR_KEYMISS;
|
||||
}
|
||||
|
||||
+ if (rxsp->status11 & AR_KeyMiss)
|
||||
+ rxs->rs_status |= ATH9K_RXERR_KEYMISS;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_process_rxdesc_edma);
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -621,10 +621,11 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
|
||||
rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
else if (ads.ds_rxstatus8 & AR_MichaelErr)
|
||||
rs->rs_status |= ATH9K_RXERR_MIC;
|
||||
- if (ads.ds_rxstatus8 & AR_KeyMiss)
|
||||
- rs->rs_status |= ATH9K_RXERR_KEYMISS;
|
||||
}
|
||||
|
||||
+ if (ads.ds_rxstatus8 & AR_KeyMiss)
|
||||
+ rs->rs_status |= ATH9K_RXERR_KEYMISS;
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_rxprocdesc);
|
|
@ -1,17 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -823,6 +823,14 @@ static bool ath9k_rx_accept(struct ath_c
|
||||
(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
|
||||
ATH9K_RXERR_KEYMISS));
|
||||
|
||||
+ /*
|
||||
+ * Key miss events are only relevant for pairwise keys where the
|
||||
+ * descriptor does contain a valid key index. This has been observed
|
||||
+ * mostly with CCMP encryption.
|
||||
+ */
|
||||
+ if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID)
|
||||
+ rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS;
|
||||
+
|
||||
if (!rx_stats->rs_datalen)
|
||||
return false;
|
||||
/*
|
|
@ -1,21 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1061,13 +1061,16 @@ void ath9k_hw_init_global_settings(struc
|
||||
|
||||
/*
|
||||
* Workaround for early ACK timeouts, add an offset to match the
|
||||
- * initval's 64us ack timeout value.
|
||||
+ * initval's 64us ack timeout value. Use 48us for the CTS timeout.
|
||||
* This was initially only meant to work around an issue with delayed
|
||||
* BA frames in some implementations, but it has been found to fix ACK
|
||||
* timeout issues in other cases as well.
|
||||
*/
|
||||
- if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ) {
|
||||
acktimeout += 64 - sifstime - ah->slottime;
|
||||
+ ctstimeout += 48 - sifstime - ah->slottime;
|
||||
+ }
|
||||
+
|
||||
|
||||
ath9k_hw_set_sifs_time(ah, sifstime);
|
||||
ath9k_hw_setslottime(ah, slottime);
|
|
@ -1,37 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/mci.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mci.c
|
||||
@@ -234,8 +234,8 @@ static void ath_mci_cal_msg(struct ath_s
|
||||
}
|
||||
}
|
||||
|
||||
-void ath_mci_process_profile(struct ath_softc *sc,
|
||||
- struct ath_mci_profile_info *info)
|
||||
+static void ath_mci_process_profile(struct ath_softc *sc,
|
||||
+ struct ath_mci_profile_info *info)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ath_btcoex *btcoex = &sc->btcoex;
|
||||
@@ -261,8 +261,8 @@ void ath_mci_process_profile(struct ath_
|
||||
ath_mci_update_scheme(sc);
|
||||
}
|
||||
|
||||
-void ath_mci_process_status(struct ath_softc *sc,
|
||||
- struct ath_mci_profile_status *status)
|
||||
+static void ath_mci_process_status(struct ath_softc *sc,
|
||||
+ struct ath_mci_profile_status *status)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
struct ath_btcoex *btcoex = &sc->btcoex;
|
||||
--- a/drivers/net/wireless/ath/ath9k/mci.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mci.h
|
||||
@@ -128,10 +128,6 @@ struct ath_mci_coex {
|
||||
};
|
||||
|
||||
void ath_mci_flush_profile(struct ath_mci_profile *mci);
|
||||
-void ath_mci_process_profile(struct ath_softc *sc,
|
||||
- struct ath_mci_profile_info *info);
|
||||
-void ath_mci_process_status(struct ath_softc *sc,
|
||||
- struct ath_mci_profile_status *status);
|
||||
int ath_mci_setup(struct ath_softc *sc);
|
||||
void ath_mci_cleanup(struct ath_softc *sc);
|
||||
void ath_mci_intr(struct ath_softc *sc);
|
|
@ -1,544 +0,0 @@
|
|||
--- a/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
|
||||
@@ -59,6 +59,14 @@ config ATH9K_RATE_CONTROL
|
||||
Say Y, if you want to use the ath9k specific rate control
|
||||
module instead of minstrel_ht.
|
||||
|
||||
+config ATH9K_BTCOEX_SUPPORT
|
||||
+ bool "Atheros ath9k bluetooth coexistence support"
|
||||
+ depends on ATH9K
|
||||
+ default y
|
||||
+ ---help---
|
||||
+ Say Y, if you want to use the ath9k radios together with
|
||||
+ Bluetooth modules in the same system.
|
||||
+
|
||||
config ATH9K_HTC
|
||||
tristate "Atheros HTC based wireless cards support"
|
||||
depends on USB && MAC80211
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -210,7 +210,11 @@ enum ath9k_hw_caps {
|
||||
ATH9K_HW_CAP_5GHZ = BIT(14),
|
||||
ATH9K_HW_CAP_APM = BIT(15),
|
||||
ATH9K_HW_CAP_RTT = BIT(16),
|
||||
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
|
||||
ATH9K_HW_CAP_MCI = BIT(17),
|
||||
+#else
|
||||
+ ATH9K_HW_CAP_MCI = 0,
|
||||
+#endif
|
||||
};
|
||||
|
||||
struct ath9k_hw_capabilities {
|
||||
@@ -1229,6 +1233,16 @@ void ar9003_mci_sync_bt_state(struct ath
|
||||
void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr,
|
||||
u32 *rx_msg_intr);
|
||||
|
||||
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
|
||||
+static inline enum ath_btcoex_scheme
|
||||
+ath9k_hw_get_btcoex_scheme(struct ath_hw *ah)
|
||||
+{
|
||||
+ return ah->btcoex_hw.scheme;
|
||||
+}
|
||||
+#else
|
||||
+#define ath9k_hw_get_btcoex_scheme(...) ATH_BTCOEX_CFG_NONE
|
||||
+#endif
|
||||
+
|
||||
#define ATH9K_CLOCK_RATE_CCK 22
|
||||
#define ATH9K_CLOCK_RATE_5GHZ_OFDM 40
|
||||
#define ATH9K_CLOCK_RATE_2GHZ_OFDM 44
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -411,7 +411,7 @@ static int ath9k_init_btcoex(struct ath_
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
int r;
|
||||
|
||||
- switch (sc->sc_ah->btcoex_hw.scheme) {
|
||||
+ switch (ath9k_hw_get_btcoex_scheme(sc->sc_ah)) {
|
||||
case ATH_BTCOEX_CFG_NONE:
|
||||
break;
|
||||
case ATH_BTCOEX_CFG_2WIRE:
|
||||
@@ -866,10 +866,10 @@ static void ath9k_deinit_softc(struct at
|
||||
kfree(sc->sbands[IEEE80211_BAND_5GHZ].channels);
|
||||
|
||||
if ((sc->btcoex.no_stomp_timer) &&
|
||||
- sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
+ ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
|
||||
ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
|
||||
|
||||
- if (sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_MCI)
|
||||
+ if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_MCI)
|
||||
ath_mci_cleanup(sc);
|
||||
|
||||
for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)
|
||||
--- a/drivers/net/wireless/ath/ath9k/pci.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/pci.c
|
||||
@@ -121,7 +121,7 @@ static void ath_pci_aspm_init(struct ath
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
- if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) {
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
|
||||
/* Bluetooth coexistance requires disabling ASPM. */
|
||||
pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm);
|
||||
aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1);
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
|
||||
@@ -610,7 +610,7 @@ static void ath9k_init_btcoex(struct ath
|
||||
{
|
||||
int qnum;
|
||||
|
||||
- switch (priv->ah->btcoex_hw.scheme) {
|
||||
+ switch (ath9k_hw_get_btcoex_scheme(priv->ah)) {
|
||||
case ATH_BTCOEX_CFG_NONE:
|
||||
break;
|
||||
case ATH_BTCOEX_CFG_3WIRE:
|
||||
@@ -704,7 +704,8 @@ static int ath9k_init_priv(struct ath9k_
|
||||
|
||||
if (product && strncmp(product, ATH_HTC_BTCOEX_PRODUCT_ID, 5) == 0) {
|
||||
ah->btcoex_hw.scheme = ATH_BTCOEX_CFG_3WIRE;
|
||||
- ath9k_init_btcoex(priv);
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE)
|
||||
+ ath9k_init_btcoex(priv);
|
||||
}
|
||||
|
||||
return 0;
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
@@ -958,7 +958,7 @@ static int ath9k_htc_start(struct ieee80
|
||||
mod_timer(&priv->tx.cleanup_timer,
|
||||
jiffies + msecs_to_jiffies(ATH9K_HTC_TX_CLEANUP_INTERVAL));
|
||||
|
||||
- if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) {
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE) {
|
||||
ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
|
||||
AR_STOMP_LOW_WLAN_WGHT);
|
||||
ath9k_hw_btcoex_enable(ah);
|
||||
@@ -1010,7 +1010,8 @@ static void ath9k_htc_stop(struct ieee80
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
|
||||
- if (ah->btcoex_hw.enabled) {
|
||||
+ if (ah->btcoex_hw.enabled &&
|
||||
+ ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
|
||||
ath9k_hw_btcoex_disable(ah);
|
||||
if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
ath_htc_cancel_btcoex_work(priv);
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -742,11 +742,11 @@ void ath9k_tasklet(unsigned long data)
|
||||
ath_tx_tasklet(sc);
|
||||
}
|
||||
|
||||
- if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
|
||||
if (status & ATH9K_INT_GENTIMER)
|
||||
ath_gen_timer_isr(sc->sc_ah);
|
||||
|
||||
- if (status & ATH9K_INT_MCI)
|
||||
+ if ((status & ATH9K_INT_MCI) && ATH9K_HW_CAP_MCI)
|
||||
ath_mci_intr(sc);
|
||||
|
||||
out:
|
||||
@@ -1083,14 +1083,14 @@ static int ath9k_start(struct ieee80211_
|
||||
|
||||
spin_unlock_bh(&sc->sc_pcu_lock);
|
||||
|
||||
- if ((ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) &&
|
||||
+ if ((ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) &&
|
||||
!ah->btcoex_hw.enabled) {
|
||||
if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI))
|
||||
ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
|
||||
AR_STOMP_LOW_WLAN_WGHT);
|
||||
ath9k_hw_btcoex_enable(ah);
|
||||
|
||||
- if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
|
||||
ath9k_btcoex_timer_resume(sc);
|
||||
}
|
||||
|
||||
@@ -1194,9 +1194,10 @@ static void ath9k_stop(struct ieee80211_
|
||||
/* Ensure HW is awake when we try to shut it down. */
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
- if (ah->btcoex_hw.enabled) {
|
||||
+ if (ah->btcoex_hw.enabled &&
|
||||
+ ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) {
|
||||
ath9k_hw_btcoex_disable(ah);
|
||||
- if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_3WIRE)
|
||||
ath9k_btcoex_timer_pause(sc);
|
||||
ath_mci_flush_profile(&sc->btcoex.mci);
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -253,6 +253,9 @@ int ath_init_btcoex_timer(struct ath_sof
|
||||
{
|
||||
struct ath_btcoex *btcoex = &sc->btcoex;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return 0;
|
||||
+
|
||||
btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD * 1000;
|
||||
btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
|
||||
btcoex->btcoex_period / 100;
|
||||
@@ -286,6 +289,9 @@ void ath9k_btcoex_timer_resume(struct at
|
||||
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX,
|
||||
"Starting btcoex timers\n");
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
/* make sure duty cycle timer is also stopped when resuming */
|
||||
if (btcoex->hw_timer_enabled)
|
||||
ath9k_gen_timer_stop(sc->sc_ah, btcoex->no_stomp_timer);
|
||||
@@ -306,6 +312,9 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
struct ath_btcoex *btcoex = &sc->btcoex;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
del_timer_sync(&btcoex->period_timer);
|
||||
|
||||
if (btcoex->hw_timer_enabled)
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1932,7 +1932,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
#endif
|
||||
}
|
||||
|
||||
- if (ah->btcoex_hw.enabled)
|
||||
+ if (ah->btcoex_hw.enabled &&
|
||||
+ ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE)
|
||||
ath9k_hw_btcoex_enable(ah);
|
||||
|
||||
if (mci && mci_hw->ready) {
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
|
||||
@@ -116,6 +116,9 @@ void ath_htc_init_btcoex_work(struct ath
|
||||
{
|
||||
struct ath_btcoex *btcoex = &priv->btcoex;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD;
|
||||
btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) *
|
||||
btcoex->btcoex_period / 100;
|
||||
@@ -134,6 +137,9 @@ void ath_htc_resume_btcoex_work(struct a
|
||||
struct ath_btcoex *btcoex = &priv->btcoex;
|
||||
struct ath_hw *ah = priv->ah;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, "Starting btcoex work\n");
|
||||
|
||||
btcoex->bt_priority_cnt = 0;
|
||||
@@ -148,6 +154,9 @@ void ath_htc_resume_btcoex_work(struct a
|
||||
*/
|
||||
void ath_htc_cancel_btcoex_work(struct ath9k_htc_priv *priv)
|
||||
{
|
||||
+ if (ath9k_hw_get_btcoex_scheme(priv->ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
cancel_delayed_work_sync(&priv->coex_period_work);
|
||||
cancel_delayed_work_sync(&priv->duty_cycle_work);
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/btcoex.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/btcoex.c
|
||||
@@ -68,6 +68,9 @@ void ath9k_hw_init_btcoex_hw(struct ath_
|
||||
u32 i, idx;
|
||||
bool rxclear_polarity = ath_bt_config.bt_rxclear_polarity;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
rxclear_polarity = !ath_bt_config.bt_rxclear_polarity;
|
||||
|
||||
@@ -99,6 +102,9 @@ void ath9k_hw_btcoex_init_2wire(struct a
|
||||
{
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
/* connect bt_active to baseband */
|
||||
REG_CLR_BIT(ah, AR_GPIO_INPUT_EN_VAL,
|
||||
(AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_DEF |
|
||||
@@ -121,6 +127,9 @@ void ath9k_hw_btcoex_init_3wire(struct a
|
||||
{
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
/* btcoex 3-wire */
|
||||
REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
|
||||
(AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB |
|
||||
@@ -147,6 +156,9 @@ static void ath9k_hw_btcoex_enable_2wire
|
||||
{
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
/* Configure the desired GPIO port for TX_FRAME output */
|
||||
ath9k_hw_cfg_output(ah, btcoex_hw->wlanactive_gpio,
|
||||
AR_GPIO_OUTPUT_MUX_AS_TX_FRAME);
|
||||
@@ -158,6 +170,9 @@ void ath9k_hw_btcoex_set_weight(struct a
|
||||
{
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
|
||||
SM(wlan_weight, AR_BTCOEX_WL_WGHT);
|
||||
}
|
||||
@@ -219,9 +234,9 @@ void ath9k_hw_btcoex_enable(struct ath_h
|
||||
{
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
|
||||
- switch (btcoex_hw->scheme) {
|
||||
+ switch (ath9k_hw_get_btcoex_scheme(ah)) {
|
||||
case ATH_BTCOEX_CFG_NONE:
|
||||
- break;
|
||||
+ return;
|
||||
case ATH_BTCOEX_CFG_2WIRE:
|
||||
ath9k_hw_btcoex_enable_2wire(ah);
|
||||
break;
|
||||
@@ -246,6 +261,9 @@ void ath9k_hw_btcoex_disable(struct ath_
|
||||
struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
|
||||
int i;
|
||||
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
btcoex_hw->enabled = false;
|
||||
if (btcoex_hw->scheme == ATH_BTCOEX_CFG_MCI) {
|
||||
ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
|
||||
@@ -294,6 +312,9 @@ static void ar9003_btcoex_bt_stomp(struc
|
||||
void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah,
|
||||
enum ath_stomp_type stomp_type)
|
||||
{
|
||||
+ if (ath9k_hw_get_btcoex_scheme(ah) == ATH_BTCOEX_CFG_NONE)
|
||||
+ return;
|
||||
+
|
||||
if (AR_SREV_9300_20_OR_LATER(ah)) {
|
||||
ar9003_btcoex_bt_stomp(ah, stomp_type);
|
||||
return;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
|
||||
@@ -85,6 +85,9 @@ void ar9003_mci_remote_reset(struct ath_
|
||||
{
|
||||
u32 payload[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffff00};
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ar9003_mci_send_message(ah, MCI_REMOTE_RESET, 0, payload, 16,
|
||||
wait_done, false);
|
||||
udelay(5);
|
||||
@@ -94,6 +97,9 @@ void ar9003_mci_send_lna_transfer(struct
|
||||
{
|
||||
u32 payload = 0x00000000;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ar9003_mci_send_message(ah, MCI_LNA_TRANS, 0, &payload, 1,
|
||||
wait_done, false);
|
||||
}
|
||||
@@ -107,6 +113,9 @@ static void ar9003_mci_send_req_wake(str
|
||||
|
||||
void ar9003_mci_send_sys_waking(struct ath_hw *ah, bool wait_done)
|
||||
{
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ar9003_mci_send_message(ah, MCI_SYS_WAKING, MCI_FLAG_DISABLE_TIMESTAMP,
|
||||
NULL, 0, wait_done, false);
|
||||
}
|
||||
@@ -221,6 +230,9 @@ void ar9003_mci_send_coex_halt_bt_gpm(st
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
u32 payload[4] = {0, 0, 0, 0};
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ath_dbg(common, ATH_DBG_MCI, "MCI Send Coex %s BT GPM.\n",
|
||||
(halt) ? "halt" : "unhalt");
|
||||
|
||||
@@ -381,12 +393,17 @@ static void ar9003_mci_prep_interface(st
|
||||
|
||||
void ar9003_mci_disable_interrupt(struct ath_hw *ah)
|
||||
{
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
REG_WRITE(ah, AR_MCI_INTERRUPT_EN, 0);
|
||||
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN, 0);
|
||||
}
|
||||
|
||||
void ar9003_mci_enable_interrupt(struct ath_hw *ah)
|
||||
{
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
|
||||
REG_WRITE(ah, AR_MCI_INTERRUPT_EN, AR_MCI_INTERRUPT_DEFAULT);
|
||||
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN,
|
||||
@@ -397,6 +414,9 @@ bool ar9003_mci_check_int(struct ath_hw
|
||||
{
|
||||
u32 intr;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return false;
|
||||
+
|
||||
intr = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW);
|
||||
return ((intr & ints) == ints);
|
||||
}
|
||||
@@ -405,6 +425,10 @@ void ar9003_mci_get_interrupt(struct ath
|
||||
u32 *rx_msg_intr)
|
||||
{
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
+
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
*raw_intr = mci->raw_intr;
|
||||
*rx_msg_intr = mci->rx_msg_intr;
|
||||
|
||||
@@ -418,6 +442,9 @@ void ar9003_mci_2g5g_changed(struct ath_
|
||||
{
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
if (!mci->update_2g5g &&
|
||||
(mci->is_2g != is_2g))
|
||||
mci->update_2g5g = true;
|
||||
@@ -531,6 +558,9 @@ void ar9003_mci_reset(struct ath_hw *ah,
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
u32 regval, thresh;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ath_dbg(common, ATH_DBG_MCI, "MCI full_sleep = %d, is_2g = %d\n",
|
||||
is_full_sleep, is_2g);
|
||||
|
||||
@@ -661,6 +691,9 @@ void ar9003_mci_mute_bt(struct ath_hw *a
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
/* disable all MCI messages */
|
||||
REG_WRITE(ah, AR_MCI_MSG_ATTRIBUTES_TABLE, 0xffff0000);
|
||||
REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS0, 0xffffffff);
|
||||
@@ -693,6 +726,9 @@ void ar9003_mci_sync_bt_state(struct ath
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
u32 cur_bt_state;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
cur_bt_state = ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL);
|
||||
|
||||
if (mci->bt_state != cur_bt_state) {
|
||||
@@ -857,6 +893,9 @@ void ar9003_mci_2g5g_switch(struct ath_h
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
if (mci->update_2g5g) {
|
||||
if (mci->is_2g) {
|
||||
|
||||
@@ -908,6 +947,9 @@ bool ar9003_mci_send_message(struct ath_
|
||||
u32 saved_mci_int_en;
|
||||
int i;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return false;
|
||||
+
|
||||
saved_mci_int_en = REG_READ(ah, AR_MCI_INTERRUPT_EN);
|
||||
regval = REG_READ(ah, AR_BTCOEX_CTRL);
|
||||
|
||||
@@ -973,6 +1015,9 @@ void ar9003_mci_setup(struct ath_hw *ah,
|
||||
struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
|
||||
void *sched_buf = (void *)((char *) gpm_buf + (sched_addr - gpm_addr));
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
mci->gpm_addr = gpm_addr;
|
||||
mci->gpm_buf = gpm_buf;
|
||||
mci->gpm_len = len;
|
||||
@@ -987,6 +1032,9 @@ void ar9003_mci_cleanup(struct ath_hw *a
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
/* Turn off MCI and Jupiter mode. */
|
||||
REG_WRITE(ah, AR_BTCOEX_CTRL, 0x00);
|
||||
ath_dbg(common, ATH_DBG_MCI, "MCI ar9003_mci_cleanup\n");
|
||||
@@ -1056,6 +1104,9 @@ u32 ar9003_mci_wait_for_gpm(struct ath_h
|
||||
u8 recv_type = 0, recv_opcode = 0;
|
||||
bool b_is_bt_cal_done = (gpm_type == MCI_GPM_BT_CAL_DONE);
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return 0;
|
||||
+
|
||||
more_data = time_out ? MCI_GPM_NOMORE : MCI_GPM_MORE;
|
||||
|
||||
while (time_out > 0) {
|
||||
@@ -1188,6 +1239,9 @@ u32 ar9003_mci_state(struct ath_hw *ah,
|
||||
u32 value = 0, more_gpm = 0, gpm_ptr;
|
||||
u8 query_type;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return 0;
|
||||
+
|
||||
switch (state_type) {
|
||||
case MCI_STATE_ENABLE:
|
||||
if (mci->ready) {
|
||||
--- a/drivers/net/wireless/ath/ath9k/mci.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mci.c
|
||||
@@ -425,6 +425,9 @@ int ath_mci_setup(struct ath_softc *sc)
|
||||
struct ath_mci_coex *mci = &sc->mci_coex;
|
||||
int error = 0;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return 0;
|
||||
+
|
||||
mci->sched_buf.bf_len = ATH_MCI_SCHED_BUF_SIZE + ATH_MCI_GPM_BUF_SIZE;
|
||||
|
||||
if (ath_mci_buf_alloc(sc, &mci->sched_buf)) {
|
||||
@@ -458,6 +461,9 @@ void ath_mci_cleanup(struct ath_softc *s
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_mci_coex *mci = &sc->mci_coex;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
/*
|
||||
* both schedule and gpm buffers will be released
|
||||
*/
|
||||
@@ -476,6 +482,9 @@ void ath_mci_intr(struct ath_softc *sc)
|
||||
u32 more_data = MCI_GPM_MORE;
|
||||
bool skip_gpm = false;
|
||||
|
||||
+ if (!ATH9K_HW_CAP_MCI)
|
||||
+ return;
|
||||
+
|
||||
ar9003_mci_get_interrupt(sc->sc_ah, &mci_int, &mci_int_rxmsg);
|
||||
|
||||
if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) == 0) {
|
|
@ -229,7 +229,7 @@
|
|||
* Initialization functions.
|
||||
*/
|
||||
static bool rt2800pci_get_entry_state(struct queue_entry *entry)
|
||||
@@ -1052,6 +1056,7 @@ static const struct rt2x00lib_ops rt2800
|
||||
@@ -1040,6 +1044,7 @@ static const struct rt2x00lib_ops rt2800
|
||||
.get_firmware_name = rt2800pci_get_firmware_name,
|
||||
.check_firmware = rt2800_check_firmware,
|
||||
.load_firmware = rt2800_load_firmware,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -606,6 +606,7 @@ CONFIG_RT2X00=y
|
||||
@@ -611,6 +611,7 @@ CONFIG_RT2X00=y
|
||||
CONFIG_RT2X00_LIB=m
|
||||
CONFIG_RT2800_LIB=m
|
||||
CONFIG_RT2X00_LIB_FIRMWARE=y
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{
|
||||
memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
|
||||
}
|
||||
@@ -938,8 +938,9 @@ static int rt2800pci_validate_eeprom(str
|
||||
@@ -926,8 +926,9 @@ static int rt2800pci_validate_eeprom(str
|
||||
/*
|
||||
* Read EEPROM into buffer
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/mwl8k.c
|
||||
+++ b/drivers/net/wireless/mwl8k.c
|
||||
@@ -5193,6 +5193,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
@@ -5297,6 +5297,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -791,6 +791,7 @@ struct b43_wldev {
|
||||
@@ -803,6 +803,7 @@ struct b43_wldev {
|
||||
bool qos_enabled; /* TRUE, if QoS is used. */
|
||||
bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
|
||||
bool use_pio; /* TRUE if next init should use PIO */
|
||||
|
@ -22,12 +22,12 @@
|
|||
static int modparam_bad_frames_preempt;
|
||||
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
|
||||
MODULE_PARM_DESC(bad_frames_preempt,
|
||||
@@ -2686,10 +2691,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
& ~B43_MACCTL_GPOUTSMSK);
|
||||
@@ -2674,10 +2679,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
u32 mask, set;
|
||||
|
||||
b43_write16(dev, B43_MMIO_GPIO_MASK, b43_read16(dev, B43_MMIO_GPIO_MASK)
|
||||
- | 0x000F);
|
||||
+ | modparam_gpiomask);
|
||||
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
|
||||
- b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, 0xF);
|
||||
+ b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, modparam_gpiomask);
|
||||
|
||||
mask = 0x0000001F;
|
||||
- set = 0x0000000F;
|
||||
|
|
|
@ -11,18 +11,19 @@
|
|||
b43-$(CONFIG_B43_PCMCIA) += pcmcia.o
|
||||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -1893,9 +1893,11 @@ static void b43_do_interrupt_thread(stru
|
||||
@@ -1885,10 +1885,12 @@ static void b43_do_interrupt_thread(stru
|
||||
dma_reason[0], dma_reason[1],
|
||||
dma_reason[2], dma_reason[3],
|
||||
dma_reason[4], dma_reason[5]);
|
||||
+#ifdef CONFIG_B43_PIO
|
||||
b43err(dev->wl, "This device does not support DMA "
|
||||
"on your system. It will now be switched to PIO.\n");
|
||||
+#ifdef CONFIG_B43_PIO
|
||||
/* Fall back to PIO transfers if we get fatal DMA errors! */
|
||||
dev->use_pio = 1;
|
||||
b43_controller_restart(dev, "DMA error");
|
||||
dev->use_pio = true;
|
||||
+#endif
|
||||
b43_controller_restart(dev, "DMA error");
|
||||
return;
|
||||
}
|
||||
if (merged_dma_reason & B43_DMAIRQ_NONFATALMASK) {
|
||||
--- a/drivers/net/wireless/b43/pio.h
|
||||
+++ b/drivers/net/wireless/b43/pio.h
|
||||
@@ -150,7 +150,7 @@ static inline void b43_piorx_write32(str
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -1535,7 +1535,7 @@ static void b43_write_beacon_template(st
|
||||
@@ -1529,7 +1529,7 @@ static void b43_write_beacon_template(st
|
||||
len, ram_offset, shm_size_offset, rate);
|
||||
|
||||
/* Write the PHY TX control parameters. */
|
||||
|
@ -9,7 +9,7 @@
|
|||
antenna = b43_antenna_to_phyctl(antenna);
|
||||
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
|
||||
/* We can't send beacons with short preamble. Would get PHY errors. */
|
||||
@@ -3052,8 +3052,8 @@ static int b43_chip_init(struct b43_wlde
|
||||
@@ -3031,8 +3031,8 @@ static int b43_chip_init(struct b43_wlde
|
||||
|
||||
/* Select the antennae */
|
||||
if (phy->ops->set_rx_antenna)
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
if (phy->type == B43_PHYTYPE_B) {
|
||||
value16 = b43_read16(dev, 0x005E);
|
||||
@@ -3782,7 +3782,6 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3775,7 +3775,6 @@ static int b43_op_config(struct ieee8021
|
||||
struct b43_wldev *dev;
|
||||
struct b43_phy *phy;
|
||||
struct ieee80211_conf *conf = &hw->conf;
|
||||
|
@ -28,7 +28,7 @@
|
|||
int err = 0;
|
||||
bool reload_bss = false;
|
||||
|
||||
@@ -3836,11 +3835,9 @@ static int b43_op_config(struct ieee8021
|
||||
@@ -3829,11 +3828,9 @@ static int b43_op_config(struct ieee8021
|
||||
}
|
||||
|
||||
/* Antennas for RX and management frame TX. */
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
if (wl->radio_enabled != phy->radio_on) {
|
||||
if (wl->radio_enabled) {
|
||||
@@ -4910,6 +4907,47 @@ static int b43_op_get_survey(struct ieee
|
||||
@@ -4905,6 +4902,47 @@ static int b43_op_get_survey(struct ieee
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@
|
|||
static const struct ieee80211_ops b43_hw_ops = {
|
||||
.tx = b43_op_tx,
|
||||
.conf_tx = b43_op_conf_tx,
|
||||
@@ -4931,6 +4969,8 @@ static const struct ieee80211_ops b43_hw
|
||||
@@ -4926,6 +4964,8 @@ static const struct ieee80211_ops b43_hw
|
||||
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
|
||||
.get_survey = b43_op_get_survey,
|
||||
.rfkill_poll = b43_rfkill_poll,
|
||||
|
@ -99,7 +99,7 @@
|
|||
};
|
||||
|
||||
/* Hard-reset the chip. Do not call this directly.
|
||||
@@ -5177,6 +5217,8 @@ static int b43_one_core_attach(struct b4
|
||||
@@ -5172,6 +5212,8 @@ static int b43_one_core_attach(struct b4
|
||||
if (!wldev)
|
||||
goto out;
|
||||
|
||||
|
@ -108,19 +108,19 @@
|
|||
wldev->use_pio = b43_modparam_pio;
|
||||
wldev->dev = dev;
|
||||
wldev->wl = wl;
|
||||
@@ -5264,6 +5306,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
@@ -5260,6 +5302,9 @@ static struct b43_wl *b43_wireless_init(
|
||||
BIT(NL80211_IFTYPE_WDS) |
|
||||
BIT(NL80211_IFTYPE_ADHOC);
|
||||
|
||||
+ hw->wiphy->available_antennas_rx = 0x3;
|
||||
+ hw->wiphy->available_antennas_tx = 0x3;
|
||||
+
|
||||
hw->queues = modparam_qos ? 4 : 1;
|
||||
hw->queues = modparam_qos ? B43_QOS_QUEUE_NUM : 1;
|
||||
wl->mac80211_initially_registered_queues = hw->queues;
|
||||
hw->max_rates = 2;
|
||||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -792,6 +792,8 @@ struct b43_wldev {
|
||||
@@ -804,6 +804,8 @@ struct b43_wldev {
|
||||
bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
|
||||
bool use_pio; /* TRUE if next init should use PIO */
|
||||
int gpiomask; /* GPIO LED mask as a module parameter */
|
||||
|
|
|
@ -19,7 +19,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
|
||||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -1016,6 +1016,32 @@ static inline bool b43_using_pio_transfe
|
||||
@@ -1044,6 +1044,32 @@ static inline bool b43_using_pio_transfe
|
||||
return dev->__using_pio_transfers;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
dev->phy.writes_counter = 0;
|
||||
--- a/drivers/net/wireless/b43/phy_n.c
|
||||
+++ b/drivers/net/wireless/b43/phy_n.c
|
||||
@@ -4104,14 +4104,14 @@ static inline void check_phyreg(struct b
|
||||
@@ -4837,14 +4837,14 @@ static inline void check_phyreg(struct b
|
||||
static u16 b43_nphy_op_read(struct b43_wldev *dev, u16 reg)
|
||||
{
|
||||
check_phyreg(dev, reg);
|
||||
|
@ -105,16 +105,16 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
b43_write16(dev, B43_MMIO_PHY_DATA, value);
|
||||
}
|
||||
|
||||
@@ -4119,7 +4119,7 @@ static void b43_nphy_op_maskset(struct b
|
||||
@@ -4852,7 +4852,7 @@ static void b43_nphy_op_maskset(struct b
|
||||
u16 set)
|
||||
{
|
||||
check_phyreg(dev, reg);
|
||||
- b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
|
||||
+ b43_wflush16(dev, B43_MMIO_PHY_CONTROL, reg);
|
||||
b43_write16(dev, B43_MMIO_PHY_DATA,
|
||||
(b43_read16(dev, B43_MMIO_PHY_DATA) & mask) | set);
|
||||
b43_maskset16(dev, B43_MMIO_PHY_DATA, mask, set);
|
||||
}
|
||||
@@ -4131,7 +4131,7 @@ static u16 b43_nphy_op_radio_read(struct
|
||||
|
||||
@@ -4863,7 +4863,7 @@ static u16 b43_nphy_op_radio_read(struct
|
||||
/* N-PHY needs 0x100 for read access */
|
||||
reg |= 0x100;
|
||||
|
||||
|
@ -123,7 +123,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
|
|||
return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
|
||||
}
|
||||
|
||||
@@ -4140,7 +4140,7 @@ static void b43_nphy_op_radio_write(stru
|
||||
@@ -4872,7 +4872,7 @@ static void b43_nphy_op_radio_write(stru
|
||||
/* Register 1 is a 32-bit register. */
|
||||
B43_WARN_ON(reg == 1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue