mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-23 23:16:16 +02:00
mac80211: merge version 2010-09-14 from trunk
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@23107 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
7673898bcb
commit
0ec7c74cd2
@ -1,90 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=carl9170
|
||||
PKG_VERSION:=1.0.5.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/chr/carl9170/$(PKG_VERSION) \
|
||||
@KERNEL/linux/kernel/people/chr/carl9170/old/$(PKG_VERSION)
|
||||
PKG_MD5SUM:=91d714d1e5c5c62da1191ac5afd8bcb0
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_CARL9170_DEBUGFS \
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
DRV_PATH:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170
|
||||
|
||||
define KernelPackage/carl9170
|
||||
SUBMENU:=Wireless Drivers
|
||||
TITLE:=Driver for Atheros AR9170 USB sticks
|
||||
DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core
|
||||
URL:=http://www.kernel.org/pub/linux/kernel/people/chr/carl9170
|
||||
FILES:=$(DRV_PATH)/carl9170usb.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,60,carl9170usb)
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/config
|
||||
menu "Configuration"
|
||||
depends PACKAGE_kmod-carl9170
|
||||
|
||||
config PACKAGE_CARL9170_DEBUGFS
|
||||
bool "Enable Debugging (DebugFS) Support"
|
||||
depends PACKAGE_MAC80211_DEBUGFS
|
||||
help
|
||||
Say Y if you need access to carl9170usb's statistics for QoS queue
|
||||
status, rate control, etc...
|
||||
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/description
|
||||
This package contains a driver for Atheros AR9170 USB sticks using the free firmware
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
rm -rf $(PKG_BUILD_DIR)
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(HOST_TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_SOURCE)
|
||||
$(HOST_TAR) -C $(PKG_BUILD_DIR) -xf $(PKG_BUILD_DIR)/$(PKG_VERSION)/driver/carl9170-driver-$(PKG_VERSION).tar
|
||||
ln -s $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)/drivers/net/wireless/ath/
|
||||
$(Build/Patch)
|
||||
endef
|
||||
|
||||
BUILDFLAGS = \
|
||||
CONFIG_CARL9170_USB=m \
|
||||
CONFIG_CARL9170_LEDS=$(if $(CONFIG_LEDS_TRIGGERS),y) \
|
||||
CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_CARL9170_DEBUGFS),y) \
|
||||
CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
|
||||
EXTRA_CFLAGS = \
|
||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD) \
|
||||
$(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_CARL9170_LEDS) \
|
||||
$(if $(CONFIG_PACKAGE_CARL9170_DEBUGFS),-DCONFIG_CARL9170_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS) \
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(LINUX_DIR) \
|
||||
SUBDIRS="$(DRV_PATH)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
CC="$(TARGET_CC) -I$(STAGING_DIR)/usr/include/mac80211 $(EXTRA_CFLAGS)" \
|
||||
$(BUILDFLAGS)
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_VERSION)/firmware_build/carl9170-1.fw $(1)/lib/firmware/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,carl9170))
|
@ -1,31 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/carl9170/usb.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/usb.c
|
||||
@@ -1000,11 +1000,28 @@ err_failed:
|
||||
ar9170_usb_firmware_failed(aru);
|
||||
}
|
||||
|
||||
+
|
||||
+
|
||||
static int ar9170_usb_request_firmware(struct ar9170_usb *aru)
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
+ const struct firmware *fw;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = request_firmware(&fw,
|
||||
+ ar9170_fws[aru->fw_load].files[aru->fw_files].name,
|
||||
+ &aru->udev->dev);
|
||||
+
|
||||
+ if (ret < 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ ar9170_usb_firmware_step2(fw, aru);
|
||||
+ return 0;
|
||||
+#else
|
||||
return request_firmware_nowait(THIS_MODULE, 1,
|
||||
ar9170_fws[aru->fw_load].files[aru->fw_files].name,
|
||||
&aru->udev->dev, GFP_KERNEL, aru, ar9170_usb_firmware_step2);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void ar9170_usb_disconnect(struct usb_interface *intf)
|
@ -1,11 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/carl9170/main.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/main.c
|
||||
@@ -51,7 +51,7 @@ static int modparam_nohwcrypt;
|
||||
module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
|
||||
|
||||
-int modparam_ht;
|
||||
+int modparam_ht = 1;
|
||||
module_param_named(ht, modparam_ht, bool, S_IRUGO);
|
||||
MODULE_PARM_DESC(ht, "enable MPDU aggregation.");
|
||||
|
@ -10,15 +10,16 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-07-29
|
||||
PKG_VERSION:=2010-09-14
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=fcfb757939c4718efbf9c87ca59c6932
|
||||
PKG_MD5SUM:=88511287e013ff0f2843b3679f52f335
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_kmod-mac80211 \
|
||||
@ -27,6 +28,8 @@ PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_ATH_DEBUG \
|
||||
CONFIG_ATH_USER_REGD \
|
||||
|
||||
CARL9170_FW_VERSION:=1.8.8.2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
WMENU:=Wireless Drivers
|
||||
@ -35,23 +38,23 @@ define KernelPackage/mac80211/Default
|
||||
SUBMENU:=$(WMENU)
|
||||
URL:=http://linuxwireless.org/
|
||||
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
DEPENDS:=@!LINUX_2_4 @(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
|
||||
DEPENDS:=@(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
|
||||
endef
|
||||
|
||||
define KernelPackage/cfg80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=cfg80211 - wireless configuration API
|
||||
DEPENDS+= +wireless-tools +iw @!LINUX_2_6_25
|
||||
DEPENDS+= +wireless-tools +iw @!LINUX_2_6_25 +crda
|
||||
ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1)
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/compat/compat.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
|
||||
$(PKG_BUILD_DIR)/compat/compat.ko \
|
||||
$(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,compat cfg80211)
|
||||
else
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/compat/compat.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/compat/compat_firmware_class.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
|
||||
$(PKG_BUILD_DIR)/compat/compat.ko \
|
||||
$(PKG_BUILD_DIR)/compat/compat_firmware_class.ko \
|
||||
$(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
|
||||
AUTOLOAD:=$(call AutoLoad,20,compat compat_firmware_class cfg80211)
|
||||
endif
|
||||
endef
|
||||
@ -64,7 +67,7 @@ define KernelPackage/mac80211
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Linux 802.11 Wireless Networking Stack
|
||||
DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-cfg80211
|
||||
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
|
||||
AUTOLOAD:=$(call AutoLoad,21,mac80211)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -92,6 +95,8 @@ endef
|
||||
# Prism54 drivers
|
||||
P54PCIFW:=2.13.12.0.arm
|
||||
P54USBFW:=2.13.24.0.lm87.arm
|
||||
P54SPIFW:=2.13.0.0.a.13.14.arm
|
||||
CARL9170_FW:=carl9170-1.fw
|
||||
|
||||
define Download/p54usb
|
||||
FILE:=$(P54USBFW)
|
||||
@ -107,6 +112,20 @@ define Download/p54pci
|
||||
endef
|
||||
$(eval $(call Download,p54pci))
|
||||
|
||||
define Download/p54spi
|
||||
FILE:=$(P54SPIFW)
|
||||
URL:=http://daemonizer.de/prism54/prism54-fw/stlc4560
|
||||
MD5SUM:=42661f8ecbadd88012807493f596081d
|
||||
endef
|
||||
$(eval $(call Download,p54spi))
|
||||
|
||||
define Download/carl9170
|
||||
FILE:=$(CARL9170_FW)
|
||||
URL:=http://www.kernel.org/pub/linux/kernel/people/chr/carl9170/fw/$(CARL9170_FW_VERSION)
|
||||
MD5SUM:=114c43846ed1d2f89cc92bd0e2ec0589
|
||||
endef
|
||||
$(eval $(call Download,carl9170))
|
||||
|
||||
define KernelPackage/p54/Default
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Prism54 Drivers
|
||||
@ -118,9 +137,9 @@ endef
|
||||
|
||||
define KernelPackage/p54-common
|
||||
$(call KernelPackage/p54/Default)
|
||||
DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211
|
||||
DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211
|
||||
TITLE+= (COMMON)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,p54common)
|
||||
endef
|
||||
|
||||
@ -128,7 +147,7 @@ define KernelPackage/p54-pci
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (PCI)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-p54-common
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,p54pci)
|
||||
endef
|
||||
|
||||
@ -136,10 +155,18 @@ define KernelPackage/p54-usb
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (USB)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,p54usb)
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-spi
|
||||
$(call KernelPackage/p54/Default)
|
||||
TITLE+= (SPI)
|
||||
DEPENDS+= @TARGET_omap24xx +kmod-p54-common
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54spi.ko
|
||||
AUTOLOAD:=$(call AutoLoad,31,p54spi)
|
||||
endef
|
||||
|
||||
# Ralink rt2x00 drivers
|
||||
RT61FW:=RT61_Firmware_V1.2.zip
|
||||
RT71FW:=RT71W_Firmware_V1.8.zip
|
||||
@ -197,7 +224,7 @@ define KernelPackage/rt2x00-lib
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-mac80211 +kmod-crc-itu-t
|
||||
TITLE+= (LIB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.ko
|
||||
AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -226,7 +253,7 @@ define KernelPackage/rt2x00-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-eeprom-93cx6
|
||||
TITLE+= (PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
|
||||
endef
|
||||
|
||||
@ -234,7 +261,7 @@ define KernelPackage/rt2x00-usb
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
|
||||
TITLE+= (USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
|
||||
endef
|
||||
|
||||
@ -242,7 +269,7 @@ define KernelPackage/rt2x00-soc
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @TARGET_ramips +kmod-rt2x00-lib
|
||||
TITLE+= (SoC)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.ko
|
||||
AUTOLOAD:=$(call AutoLoad,26,rt2x00soc)
|
||||
endef
|
||||
|
||||
@ -250,7 +277,7 @@ define KernelPackage/rt2800-lib
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +USB_SUPPORT:kmod-rt2x00-usb +TARGET_ramips:kmod-rt2x00-soc
|
||||
TITLE+= (rt2800 LIB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt2800lib)
|
||||
endef
|
||||
|
||||
@ -258,7 +285,7 @@ define KernelPackage/rt2400-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
|
||||
TITLE+= (RT2400 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
|
||||
endef
|
||||
|
||||
@ -266,7 +293,7 @@ define KernelPackage/rt2500-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
|
||||
TITLE+= (RT2500 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
|
||||
endef
|
||||
|
||||
@ -274,7 +301,7 @@ define KernelPackage/rt2500-usb
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
|
||||
TITLE+= (RT2500 USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
|
||||
endef
|
||||
|
||||
@ -282,7 +309,7 @@ define KernelPackage/rt61-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
|
||||
TITLE+= (RT2x61 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt61pci)
|
||||
endef
|
||||
|
||||
@ -290,7 +317,7 @@ define KernelPackage/rt73-usb
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
|
||||
TITLE+= (RT73 USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rt73usb)
|
||||
endef
|
||||
|
||||
@ -298,7 +325,7 @@ define KernelPackage/rt2800-pci
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-crc-ccitt +TARGET_ramips:kmod-rt2x00-soc
|
||||
TITLE+= (RT2860 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,rt2800pci)
|
||||
endef
|
||||
|
||||
@ -306,7 +333,7 @@ define KernelPackage/rt2800-usb
|
||||
$(call KernelPackage/rt2x00/Default)
|
||||
DEPENDS+= +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-crc-ccitt
|
||||
TITLE+= (RT2870 USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.ko
|
||||
AUTOLOAD:=$(call AutoLoad,28,rt2800usb)
|
||||
endef
|
||||
|
||||
@ -321,7 +348,7 @@ define KernelPackage/rtl8180
|
||||
$(call KernelPackage/rtl818x/Default)
|
||||
DEPENDS+= @PCI_SUPPORT
|
||||
TITLE+= (RTL8180 PCI)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rtl8180)
|
||||
endef
|
||||
|
||||
@ -329,7 +356,7 @@ define KernelPackage/rtl8187
|
||||
$(call KernelPackage/rtl818x/Default)
|
||||
DEPENDS+= @USB_SUPPORT
|
||||
TITLE+= (RTL8187 USB)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,rtl8187)
|
||||
endef
|
||||
|
||||
@ -346,7 +373,7 @@ define KernelPackage/zd1211rw
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Zydas ZD1211 support
|
||||
DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
|
||||
endef
|
||||
|
||||
@ -378,7 +405,7 @@ define KernelPackage/ath
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros common driver part
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-mac80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
|
||||
AUTOLOAD:=$(call AutoLoad,26,ath)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -392,7 +419,7 @@ define KernelPackage/ath5k
|
||||
TITLE:=Atheros 5xxx wireless cards support
|
||||
URL:=http://linuxwireless.org/en/users/Drivers/ath5k
|
||||
DEPENDS+= +kmod-ath
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,ath5k)
|
||||
endef
|
||||
|
||||
@ -407,9 +434,9 @@ define KernelPackage/ath9k
|
||||
URL:=http://linuxwireless.org/en/users/Drivers/ath9k
|
||||
DEPENDS+= +kmod-ath
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,ath9k_hw ath9k_common ath9k)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -430,6 +457,20 @@ define KernelPackage/ath9k/config
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Driver for Atheros AR9170 USB sticks
|
||||
DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,carl9170)
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(CARL9170_FW) $(1)/lib/firmware/
|
||||
endef
|
||||
|
||||
|
||||
USB8388FW_NAME:=usb8388
|
||||
USB8388FW_VERSION:=5.110.22.p23
|
||||
|
||||
@ -464,8 +505,8 @@ define KernelPackage/libertas-usb
|
||||
DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
|
||||
TITLE:=Marvell 88W8015 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.$(LINUX_KMOD_SUFFIX)
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
|
||||
endef
|
||||
|
||||
@ -474,29 +515,16 @@ define KernelPackage/libertas-sd
|
||||
DEPENDS+= +kmod-mac80211 +kmod-lib80211
|
||||
TITLE:=Marvell 88W8686 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.$(LINUX_KMOD_SUFFIX)
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,libertas libertas_sdio)
|
||||
endef
|
||||
|
||||
define KernelPackage/ar9170
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Atheros AR9170 802.11n USB support
|
||||
URL:=http://wireless.kernel.org/en/users/Drivers/ar9170
|
||||
DEPENDS+= @USB_SUPPORT @!LINUX_2_6_25 +kmod-ath +kmod-usb-core
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ar9170/ar9170usb.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,27,ar9170usb)
|
||||
endef
|
||||
|
||||
define KernelPackage/ar9170/description
|
||||
This is a driver for the Atheros "otus" 802.11n USB devices.
|
||||
endef
|
||||
|
||||
define KernelPackage/mac80211-hwsim
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=mac80211 HW simulation device
|
||||
DEPENDS+= +kmod-mac80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
|
||||
AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
|
||||
endef
|
||||
|
||||
@ -504,7 +532,7 @@ define KernelPackage/net-libipw
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=libipw for ipw2100 and ipw2200
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211 +kmod-cfg80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.ko
|
||||
AUTOLOAD:=$(call AutoLoad,49,libipw)
|
||||
endef
|
||||
|
||||
@ -526,7 +554,7 @@ define KernelPackage/net-ipw2100
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Intel IPW2100 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ipw2100)
|
||||
endef
|
||||
|
||||
@ -550,7 +578,7 @@ define KernelPackage/net-ipw2200
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
TITLE:=Intel IPW2200 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ipw2200)
|
||||
endef
|
||||
|
||||
@ -566,7 +594,7 @@ define KernelPackage/mwl8k
|
||||
TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
|
||||
URL:=http://wireless.kernel.org/en/users/Drivers/mwl8k
|
||||
DEPENDS+= @PCI_SUPPORT +kmod-mac80211
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.ko
|
||||
AUTOLOAD:=$(call AutoLoad,27,mwl8k)
|
||||
endef
|
||||
|
||||
@ -661,7 +689,7 @@ endef
|
||||
define KernelPackage/b43
|
||||
$(call KernelPackage/b43-common)
|
||||
TITLE:=Broadcom 43xx wireless support
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,b43)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -759,7 +787,7 @@ endef
|
||||
define KernelPackage/b43legacy
|
||||
$(call KernelPackage/b43-common)
|
||||
TITLE:=Broadcom 43xx-legacy wireless support
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.$(LINUX_KMOD_SUFFIX)
|
||||
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,b43legacy)
|
||||
MENU:=1
|
||||
endef
|
||||
@ -804,7 +832,7 @@ BUILDFLAGS:= \
|
||||
$(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT) \
|
||||
$(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
|
||||
-DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
|
||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS -DCONFIG_CARL9170_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG) \
|
||||
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
|
||||
-DCONFIG_MAC80211_RC_MINSTREL_HT \
|
||||
@ -821,6 +849,7 @@ BUILDFLAGS:= \
|
||||
$(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),-DCONFIG_RT2X00_LIB_SOC) \
|
||||
$(if $(CONFIG_PCI_SUPPORT),-DCONFIG_RT2800PCI_PCI) \
|
||||
$(if $(CONFIG_TARGET_ramips),-DCONFIG_RT2800PCI_SOC) \
|
||||
-DCONFIG_P54_SPI_DEFAULT_EEPROM
|
||||
|
||||
MAKE_OPTS:= \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
@ -845,12 +874,17 @@ MAKE_OPTS:= \
|
||||
CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
|
||||
CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
|
||||
CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
|
||||
CONFIG_ATH9K_HW=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
|
||||
CONFIG_ATH9K_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
|
||||
CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
CONFIG_CARL9170=$(if $(CONFIG_PACKAGE_kmod-carl9170),m) \
|
||||
CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
CONFIG_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
|
||||
CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
|
||||
CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
|
||||
CONFIG_P54_USB=$(if $(CONFIG_PACKAGE_kmod-p54-usb),m) \
|
||||
CONFIG_P54_SPI= \
|
||||
CONFIG_P54_SPI=$(if $(CONFIG_PACKAGE_kmod-p54-spi),m) \
|
||||
CONFIG_P54_SPI_DEFAULT_EEPROM=y \
|
||||
CONFIG_RT2X00=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
|
||||
CONFIG_RT2X00_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
|
||||
CONFIG_RT2X00_LIB_PCI=$(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),m) \
|
||||
@ -890,6 +924,7 @@ MAKE_OPTS:= \
|
||||
CONFIG_LIB80211_CRYPT_CCMP= \
|
||||
CONFIG_LIB80211_CRYPT_TKIP= \
|
||||
CONFIG_IWLWIFI= \
|
||||
CONFIG_COMPAT_IWLWIFI= \
|
||||
CONFIG_IWLAGN= \
|
||||
CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \
|
||||
CONFIG_ATMEL= \
|
||||
@ -935,7 +970,7 @@ endef
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)
|
||||
define Build/Compile/kmod
|
||||
rm -rf $(PKG_BUILD_DIR)/modules
|
||||
$(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
|
||||
$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -980,6 +1015,11 @@ define KernelPackage/p54-usb/install
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
|
||||
endef
|
||||
|
||||
define KernelPackage/p54-spi/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(P54SPIFW) $(1)/lib/firmware/3826.arm
|
||||
endef
|
||||
|
||||
define KernelPackage/rt61-pci/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
|
||||
@ -1076,6 +1116,7 @@ $(eval $(call KernelPackage,mac80211))
|
||||
$(eval $(call KernelPackage,p54-common))
|
||||
$(eval $(call KernelPackage,p54-pci))
|
||||
$(eval $(call KernelPackage,p54-usb))
|
||||
$(eval $(call KernelPackage,p54-spi))
|
||||
$(eval $(call KernelPackage,rt2x00-lib))
|
||||
$(eval $(call KernelPackage,rt2x00-pci))
|
||||
$(eval $(call KernelPackage,rt2x00-usb))
|
||||
@ -1094,7 +1135,7 @@ $(eval $(call KernelPackage,zd1211rw))
|
||||
$(eval $(call KernelPackage,mac80211-hwsim))
|
||||
$(eval $(call KernelPackage,ath9k))
|
||||
$(eval $(call KernelPackage,ath))
|
||||
$(eval $(call KernelPackage,ar9170))
|
||||
$(eval $(call KernelPackage,carl9170))
|
||||
$(eval $(call KernelPackage,b43))
|
||||
$(eval $(call KernelPackage,b43legacy))
|
||||
$(eval $(call KernelPackage,net-libipw))
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -268,8 +268,8 @@ endif
|
||||
@@ -297,8 +297,8 @@ endif #CONFIG_SSB
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -72,7 +72,7 @@ endif # build check
|
||||
@@ -74,7 +74,7 @@ endif # build check
|
||||
endif # kernel Makefile check
|
||||
|
||||
# These both are needed by compat-wireless || compat-bluetooth so enable them
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
ifeq ($(CONFIG_MAC80211),y)
|
||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||
@@ -495,8 +495,8 @@ endif
|
||||
@@ -572,8 +572,8 @@ endif #CONFIG_COMPAT_KERNEL_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_31
|
||||
@ -19,5 +19,5 @@
|
||||
+# CONFIG_RFKILL_BACKPORT=m
|
||||
+# CONFIG_RFKILL_BACKPORT_LEDS=y
|
||||
+# CONFIG_RFKILL_BACKPORT_INPUT=y
|
||||
endif
|
||||
endif #CONFIG_COMPAT_KERNEL_31
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -94,8 +94,8 @@ ifndef CONFIG_COMPAT_KERNEL_27
|
||||
@@ -96,8 +96,8 @@ ifndef CONFIG_COMPAT_KERNEL_27
|
||||
ifeq ($(CONFIG_BT),y)
|
||||
# we'll ignore compiling bluetooth
|
||||
else
|
||||
@ -9,5 +9,5 @@
|
||||
+# CONFIG_COMPAT_BLUETOOTH=y
|
||||
+# CONFIG_COMPAT_BLUETOOTH_MODULES=m
|
||||
endif
|
||||
endif # Kernel >= 2.6.26
|
||||
endif #CONFIG_COMPAT_KERNEL_27
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -251,21 +250,6 @@ CONFIG_IPW2200_QOS=y
|
||||
#
|
||||
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
|
||||
@@ -280,21 +279,6 @@ endif #CONFIG_WEXT_PRIV
|
||||
endif #CONFIG_WEXT_SPY
|
||||
endif #CONFIG_WIRELESS_EXT
|
||||
|
||||
-ifneq ($(CONFIG_SSB),)
|
||||
-ifdef CONFIG_SSB
|
||||
-# Sonics Silicon Backplane
|
||||
-CONFIG_SSB_SPROM=y
|
||||
-# CONFIG_SSB_DEBUG=y
|
||||
@ -31,21 +31,21 @@
|
||||
-CONFIG_SSB_BLOCKIO=y
|
||||
-CONFIG_SSB_PCIHOST=y
|
||||
-CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
-ifneq ($(CONFIG_PCMCIA),)
|
||||
-ifdef CONFIG_PCMCIA
|
||||
-CONFIG_SSB_PCMCIAHOST=y
|
||||
-endif
|
||||
-endif #CONFIG_PCMCIA
|
||||
-# CONFIG_SSB_DEBUG=y
|
||||
-CONFIG_SSB_DRIVER_PCICORE=y
|
||||
-endif
|
||||
-endif #CONFIG_SSB
|
||||
-
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
# CONFIG_B44=m
|
||||
@@ -429,7 +413,6 @@ endif # end of SPI driver list
|
||||
@@ -474,7 +458,6 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
-CONFIG_SSB_SDIOHOST=y
|
||||
CONFIG_B43_SDIO=y
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
||||
ifdef CONFIG_CRC7
|
||||
|
@ -1,6 +1,15 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -282,13 +282,13 @@ endif
|
||||
@@ -196,7 +196,7 @@ $(warning "WARNING: CONFIG_CFG80211_WEXT
|
||||
endif #CONFIG_WIRELESS_EXT
|
||||
|
||||
ifneq ($(CONFIG_STAGING),)
|
||||
- CONFIG_COMPAT_STAGING=m
|
||||
+# CONFIG_COMPAT_STAGING=m
|
||||
endif
|
||||
|
||||
# mac80211 test driver
|
||||
@@ -311,13 +311,13 @@ endif #CONFIG_CRC_ITU_T
|
||||
CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
@ -13,24 +22,35 @@
|
||||
ifdef CONFIG_COMPAT_KERNEL_27
|
||||
-CONFIG_ATL1C=n
|
||||
+# CONFIG_ATL1C=n
|
||||
else
|
||||
else #CONFIG_COMPAT_KERNEL_27
|
||||
-CONFIG_ATL1C=m
|
||||
+# CONFIG_ATL1C=m
|
||||
endif
|
||||
endif #CONFIG_COMPAT_KERNEL_27
|
||||
|
||||
CONFIG_HERMES=m
|
||||
@@ -342,10 +342,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
else
|
||||
ifdef CONFIG_WIRELESS_EXT
|
||||
@@ -372,17 +372,17 @@ CONFIG_ZD1211RW=m
|
||||
# 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_29
|
||||
-CONFIG_USB_COMPAT_USBNET=n
|
||||
-CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
-CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
-CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
+# CONFIG_USB_COMPAT_USBNET=n
|
||||
+# CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
+# CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
+# CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
else #CONFIG_COMPAT_KERNEL_29
|
||||
-CONFIG_USB_COMPAT_USBNET=m
|
||||
+# CONFIG_USB_COMPAT_USBNET=m
|
||||
ifdef CONFIG_USB_NET_CDCETHER
|
||||
-CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
|
||||
-CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
|
||||
-CONFIG_USB_NET_COMPAT_CDCETHER=m
|
||||
+# CONFIG_USB_COMPAT_USBNET=m
|
||||
+# CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
|
||||
+# CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
|
||||
endif #CONFIG_USB_NET_CDCETHER
|
||||
-CONFIG_USB_NET_COMPAT_CDCETHER=m
|
||||
+# CONFIG_USB_NET_COMPAT_CDCETHER=m
|
||||
endif
|
||||
endif #CONFIG_COMPAT_KERNEL_29
|
||||
|
||||
|
||||
|
127
package/mac80211/patches/008-led_default.patch
Normal file
127
package/mac80211/patches/008-led_default.patch
Normal file
@ -0,0 +1,127 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -132,7 +132,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr
|
||||
CONFIG_MAC80211_RC_PID=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
CONFIG_MAC80211_RC_MINSTREL_HT=y
|
||||
-CONFIG_MAC80211_LEDS=y
|
||||
+# CONFIG_MAC80211_LEDS=y
|
||||
|
||||
# enable mesh networking too
|
||||
CONFIG_MAC80211_MESH=y
|
||||
@@ -233,7 +233,7 @@ CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifdef CONFIG_PCMCIA
|
||||
CONFIG_B43_PCMCIA=y
|
||||
endif #CONFIG_PCMCIA
|
||||
-CONFIG_B43_LEDS=y
|
||||
+# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
CONFIG_B43_NPHY=y
|
||||
# CONFIG_B43_FORCE_PIO=y
|
||||
@@ -242,7 +242,7 @@ CONFIG_B43_NPHY=y
|
||||
CONFIG_B43LEGACY=m
|
||||
CONFIG_B43LEGACY_HWRNG=y
|
||||
CONFIG_B43LEGACY_PCI_AUTOSELECT=y
|
||||
-CONFIG_B43LEGACY_LEDS=y
|
||||
+# CONFIG_B43LEGACY_LEDS=y
|
||||
# CONFIG_B43LEGACY_DEBUG=y
|
||||
CONFIG_B43LEGACY_DMA=y
|
||||
CONFIG_B43LEGACY_PIO=y
|
||||
@@ -529,7 +529,7 @@ endif
|
||||
|
||||
# p54
|
||||
CONFIG_P54_COMMON=m
|
||||
-CONFIG_P54_LEDS=y
|
||||
+# CONFIG_P54_LEDS=y
|
||||
|
||||
# Atheros
|
||||
CONFIG_ATH_COMMON=m
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -54,6 +54,7 @@ static void ath_led_blink_work(struct wo
|
||||
sc->sc_flags |= SC_OP_LED_ON;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
static void ath_led_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
@@ -90,10 +91,12 @@ static void ath_led_brightness(struct le
|
||||
break;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
static int ath_register_led(struct ath_softc *sc, struct ath_led *led,
|
||||
char *trigger)
|
||||
{
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
int ret;
|
||||
|
||||
led->sc = sc;
|
||||
@@ -108,14 +111,19 @@ static int ath_register_led(struct ath_s
|
||||
else
|
||||
led->registered = 1;
|
||||
return ret;
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void ath_unregister_led(struct ath_led *led)
|
||||
{
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
if (led->registered) {
|
||||
led_classdev_unregister(&led->led_cdev);
|
||||
led->registered = 0;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ath_deinit_leds(struct ath_softc *sc)
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
@@ -871,6 +871,7 @@ static void ath9k_led_brightness_work(st
|
||||
}
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
static void ath9k_led_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness)
|
||||
{
|
||||
@@ -882,6 +883,7 @@ static void ath9k_led_brightness(struct
|
||||
ieee80211_queue_delayed_work(priv->hw,
|
||||
&led->brightness_work, 0);
|
||||
}
|
||||
+#endif
|
||||
|
||||
static void ath9k_led_stop_brightness(struct ath9k_htc_priv *priv)
|
||||
{
|
||||
@@ -894,6 +896,7 @@ static void ath9k_led_stop_brightness(st
|
||||
static int ath9k_register_led(struct ath9k_htc_priv *priv, struct ath_led *led,
|
||||
char *trigger)
|
||||
{
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
int ret;
|
||||
|
||||
led->priv = priv;
|
||||
@@ -911,14 +914,19 @@ static int ath9k_register_led(struct ath
|
||||
INIT_DELAYED_WORK(&led->brightness_work, ath9k_led_brightness_work);
|
||||
|
||||
return ret;
|
||||
+#else
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void ath9k_unregister_led(struct ath_led *led)
|
||||
{
|
||||
+#ifdef CONFIG_LEDS_CLASS
|
||||
if (led->registered) {
|
||||
led_classdev_unregister(&led->led_cdev);
|
||||
led->registered = 0;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ath9k_deinit_leds(struct ath9k_htc_priv *priv)
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -42,21 +42,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
|
||||
@@ -42,23 +42,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -13,9 +13,11 @@
|
||||
-#
|
||||
-# skb->requeue
|
||||
-#
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 27 && echo yes),yes)
|
||||
-# In kernel 2.6.32 both attributes were removed.
|
||||
-#
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 27 -a $(KERNEL_SUBLEVEL) -le 31 && echo yes),yes)
|
||||
-ifeq ($(CONFIG_MAC80211),)
|
||||
-$(error "ERROR: Your >=2.6.27 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
|
||||
-$(error "ERROR: Your >=2.6.27 and <= 2.6.31 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
|
@ -9,12 +9,12 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -192,7 +192,7 @@ CONFIG_B43=m
|
||||
@@ -214,7 +214,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
ifdef CONFIG_PCMCIA
|
||||
-CONFIG_B43_PCMCIA=y
|
||||
+# CONFIG_B43_PCMCIA=y
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
endif #CONFIG_PCMCIA
|
||||
# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -398,7 +398,7 @@ endif # end of SPI driver list
|
||||
@@ -441,7 +441,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
ifdef CONFIG_MMC
|
||||
|
||||
-CONFIG_B43_SDIO=y
|
||||
+# CONFIG_B43_SDIO=y
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
||||
ifndef CONFIG_COMPAT_KERNEL_32
|
||||
ifdef CONFIG_CRC7
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
@ -1,8 +1,8 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -196,7 +196,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
@@ -218,7 +218,7 @@ ifdef CONFIG_PCMCIA
|
||||
endif #CONFIG_PCMCIA
|
||||
# CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
-CONFIG_B43_NPHY=y
|
||||
+# CONFIG_B43_NPHY is not set
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -244,12 +244,12 @@ CONFIG_RTL8180=m
|
||||
@@ -271,12 +271,12 @@ CONFIG_RTL8180=m
|
||||
|
||||
CONFIG_ADM8211=m
|
||||
|
||||
@ -8,19 +8,19 @@
|
||||
+# CONFIG_RT2X00_LIB_PCI=m
|
||||
CONFIG_RT2400PCI=m
|
||||
CONFIG_RT2500PCI=m
|
||||
ifneq ($(CONFIG_CRC_CCITT),)
|
||||
ifdef CONFIG_CRC_CCITT
|
||||
CONFIG_RT2800PCI=m
|
||||
-CONFIG_RT2800PCI_PCI=y
|
||||
+# CONFIG_RT2800PCI_PCI=y
|
||||
# CONFIG_RT2800PCI_RT30XX=y
|
||||
# CONFIG_RT2800PCI_RT35XX=y
|
||||
# CONFIG_RT2800PCI_SOC=y
|
||||
@@ -355,7 +355,7 @@ CONFIG_RT2800USB_RT30XX=y
|
||||
@@ -391,7 +391,7 @@ CONFIG_RT2800USB_RT30XX=y
|
||||
CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif
|
||||
endif #CONFIG_CRC_CCITT
|
||||
-CONFIG_RT2X00_LIB_USB=m
|
||||
+# CONFIG_RT2X00_LIB_USB=m
|
||||
NEED_RT2X00=y
|
||||
# RT73USB requires firmware
|
||||
ifneq ($(CONFIG_CRC_ITU_T),)
|
||||
ifdef CONFIG_CRC_ITU_T
|
||||
|
@ -8,4 +8,4 @@
|
||||
+# CONFIG_MAC80211_RC_PID=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
CONFIG_MAC80211_RC_MINSTREL_HT=y
|
||||
CONFIG_MAC80211_LEDS=y
|
||||
# CONFIG_MAC80211_LEDS=y
|
||||
|
38
package/mac80211/patches/017-carl9170_addr_backport.patch
Normal file
38
package/mac80211/patches/017-carl9170_addr_backport.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- a/drivers/net/wireless/ath/carl9170/main.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/main.c
|
||||
@@ -811,16 +811,34 @@ out:
|
||||
}
|
||||
|
||||
static u64 carl9170_op_prepare_multicast(struct ieee80211_hw *hw,
|
||||
- struct netdev_hw_addr_list *mc_list)
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
+ struct netdev_hw_addr_list *mc_list)
|
||||
+#else
|
||||
+ int mc_count, struct dev_addr_list *ha)
|
||||
+#endif
|
||||
{
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
struct netdev_hw_addr *ha;
|
||||
+#else
|
||||
+ int i;
|
||||
+#endif
|
||||
u64 mchash;
|
||||
|
||||
/* always get broadcast frames */
|
||||
mchash = 1ULL << (0xff >> 2);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
netdev_hw_addr_list_for_each(ha, mc_list)
|
||||
mchash |= 1ULL << (ha->addr[5] >> 2);
|
||||
+#else
|
||||
+ for (i = 0; i < mc_count; i++) {
|
||||
+ if (!ha)
|
||||
+ break;
|
||||
+
|
||||
+ mchash |= 1ULL << (ha->dmi_addr[5] >> 2);
|
||||
+ ha = ha->next;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
return mchash;
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
--- a/include/linux/compat-2.6.33.h
|
||||
+++ b/include/linux/compat-2.6.33.h
|
||||
@@ -98,6 +98,12 @@ int pccard_loop_tuple(struct pcmcia_sock
|
||||
#define kfifo_out(a, b, c) __kfifo_get(*a, b, c)
|
||||
#define kfifo_len(a) __kfifo_len(*a)
|
||||
|
||||
+#define list_for_each_entry_continue_rcu(pos, head, member) \
|
||||
+ for (pos = list_entry_rcu(pos->member.next, typeof(*pos), member); \
|
||||
+ prefetch(pos->member.next), &pos->member != (head); \
|
||||
+ pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
|
||||
+
|
||||
+
|
||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
|
||||
|
||||
#endif /* LINUX_26_33_COMPAT_H */
|
@ -1,15 +0,0 @@
|
||||
--- a/scripts/gen-compat-autoconf.sh
|
||||
+++ b/scripts/gen-compat-autoconf.sh
|
||||
@@ -191,10 +191,8 @@ if [ -f $KLIB_BUILD/Makefile ]; then
|
||||
echo CONFIG_NETDEVICES_MULTIQUEUE >> $MULT_DEP_FILE
|
||||
define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
|
||||
rm -f $MULT_DEP_FILE
|
||||
- # Kernels >= 2.6.32 can disable WEXT :D
|
||||
- if [ $SUBLEVEL -le 32 ]; then
|
||||
- define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
|
||||
- fi
|
||||
+ # Up to kernel 2.6.35 we still need the following:
|
||||
+ define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
|
||||
fi
|
||||
fi
|
||||
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
|
@ -1,8 +1,8 @@
|
||||
--- a/include/linux/compat-2.6.36.h
|
||||
+++ b/include/linux/compat-2.6.36.h
|
||||
@@ -8,6 +8,8 @@
|
||||
#define kparam_block_sysfs_write(a)
|
||||
#define kparam_unblock_sysfs_write(a)
|
||||
@@ -15,6 +15,8 @@ struct va_format {
|
||||
|
||||
#define device_rename(dev, new_name) device_rename(dev, (char *)new_name)
|
||||
|
||||
+#define PCI_EEPROM_WIDTH_93C86 8
|
||||
+
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/compat/compat-2.6.28.c
|
||||
+++ b/compat/compat-2.6.28.c
|
||||
@@ -87,7 +87,7 @@ EXPORT_SYMBOL_GPL(usb_poison_urb);
|
||||
@@ -89,7 +89,7 @@ EXPORT_SYMBOL_GPL(usb_poison_urb);
|
||||
#endif
|
||||
#endif /* CONFIG_USB */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/compat/compat-2.6.28.c
|
||||
+++ b/compat/compat-2.6.28.c
|
||||
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(pcmcia_loop_config);
|
||||
@@ -168,7 +168,7 @@ EXPORT_SYMBOL(pcmcia_loop_config);
|
||||
|
||||
#endif /* CONFIG_PCMCIA */
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{
|
||||
--- a/compat/compat-2.6.29.c
|
||||
+++ b/compat/compat-2.6.29.c
|
||||
@@ -51,7 +51,7 @@ void netdev_attach_ops(struct net_device
|
||||
@@ -52,7 +52,7 @@ void netdev_attach_ops(struct net_device
|
||||
EXPORT_SYMBOL(netdev_attach_ops);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
|
||||
|
@ -1,61 +0,0 @@
|
||||
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
|
||||
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
|
||||
@@ -174,7 +174,9 @@ that only one external action is invoked
|
||||
#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver"
|
||||
#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
static struct pm_qos_request_list *ipw2100_pm_qos_req;
|
||||
+#endif
|
||||
|
||||
/* Debugging stuff */
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
@@ -1741,7 +1743,11 @@ static int ipw2100_up(struct ipw2100_pri
|
||||
/* the ipw2100 hardware really doesn't want power management delays
|
||||
* longer than 175usec
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_update_request(ipw2100_pm_qos_req, 175);
|
||||
+#else
|
||||
+ pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100", 175);
|
||||
+#endif
|
||||
|
||||
/* If the interrupt is enabled, turn it off... */
|
||||
spin_lock_irqsave(&priv->low_lock, flags);
|
||||
@@ -1889,7 +1895,12 @@ static void ipw2100_down(struct ipw2100_
|
||||
ipw2100_disable_interrupts(priv);
|
||||
spin_unlock_irqrestore(&priv->low_lock, flags);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_update_request(ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
|
||||
+#else
|
||||
+ pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
|
||||
+ PM_QOS_DEFAULT_VALUE);
|
||||
+#endif
|
||||
|
||||
/* We have to signal any supplicant if we are disassociating */
|
||||
if (associated)
|
||||
@@ -6669,7 +6680,11 @@ static int __init ipw2100_init(void)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
ipw2100_pm_qos_req = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY,
|
||||
+#else
|
||||
+ pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
|
||||
+#endif
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
ipw2100_debug_level = debug;
|
||||
@@ -6692,7 +6707,11 @@ static void __exit ipw2100_exit(void)
|
||||
&driver_attr_debug_level);
|
||||
#endif
|
||||
pci_unregister_driver(&ipw2100_pci_driver);
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_remove_request(ipw2100_pm_qos_req);
|
||||
+#else
|
||||
+ pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100");
|
||||
+#endif
|
||||
}
|
||||
|
||||
module_init(ipw2100_init);
|
@ -1,6 +1,6 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -2443,9 +2443,8 @@ void cfg80211_cqm_rssi_notify(struct net
|
||||
@@ -2574,9 +2574,8 @@ void cfg80211_cqm_rssi_notify(struct net
|
||||
wiphy_printk(KERN_NOTICE, wiphy, format, ##args)
|
||||
#define wiphy_info(wiphy, format, args...) \
|
||||
wiphy_printk(KERN_INFO, wiphy, format, ##args)
|
||||
@ -14,7 +14,7 @@
|
||||
#define wiphy_dbg(wiphy, format, args...) \
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -921,52 +921,3 @@ static void __exit cfg80211_exit(void)
|
||||
@@ -936,52 +936,3 @@ static void __exit cfg80211_exit(void)
|
||||
destroy_workqueue(cfg80211_wq);
|
||||
}
|
||||
module_exit(cfg80211_exit);
|
||||
|
@ -0,0 +1,25 @@
|
||||
[PATCH] mac80211: hoist sta->lock from reorder release timer
|
||||
|
||||
The patch "mac80211: AMPDU rx reorder timeout timer" clashes
|
||||
with "mac80211: use netif_receive_skb in ieee80211_rx callpath"
|
||||
|
||||
The timer itself is part of the station's private struct and
|
||||
it gets killed whenever the station is removed. Therefore
|
||||
the extra sta->lock protection (that can interferes with the
|
||||
tx path) is not necessary.
|
||||
|
||||
Reported-by: Ming Lei <tom.leiming@gmail.com>
|
||||
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
||||
---
|
||||
--- a/net/mac80211/agg-rx.c
|
||||
+++ b/net/mac80211/agg-rx.c
|
||||
@@ -129,9 +129,7 @@ static void sta_rx_agg_reorder_timer_exp
|
||||
timer_to_tid[0]);
|
||||
|
||||
rcu_read_lock();
|
||||
- spin_lock(&sta->lock);
|
||||
ieee80211_release_reorder_timeout(sta, *ptid);
|
||||
- spin_unlock(&sta->lock);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -120,6 +120,9 @@ static void ath_unregister_led(struct at
|
||||
@@ -128,6 +128,9 @@ static void ath_unregister_led(struct at
|
||||
|
||||
void ath_deinit_leds(struct ath_softc *sc)
|
||||
{
|
||||
@ -10,7 +10,7 @@
|
||||
ath_unregister_led(&sc->assoc_led);
|
||||
sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
|
||||
ath_unregister_led(&sc->tx_led);
|
||||
@@ -133,6 +136,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
@@ -141,6 +144,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
char *trigger;
|
||||
int ret;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
+#endif
|
||||
--- a/drivers/net/wireless/ath/regd.h
|
||||
+++ b/drivers/net/wireless/ath/regd.h
|
||||
@@ -250,6 +250,41 @@ enum CountryCode {
|
||||
@@ -249,6 +249,41 @@ enum CountryCode {
|
||||
CTRY_BELGIUM2 = 5002
|
||||
};
|
||||
|
||||
@ -60,7 +60,7 @@
|
||||
bool ath_is_world_regd(struct ath_regulatory *reg);
|
||||
int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy,
|
||||
int (*reg_notifier)(struct wiphy *wiphy,
|
||||
@@ -261,3 +296,5 @@ int ath_reg_notifier_apply(struct wiphy
|
||||
@@ -260,3 +295,5 @@ int ath_reg_notifier_apply(struct wiphy
|
||||
struct ath_regulatory *reg);
|
||||
|
||||
#endif
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -538,6 +538,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -540,6 +540,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
{
|
||||
struct ath_hw *ah = NULL;
|
||||
struct ath_common *common;
|
||||
@ -18,7 +18,7 @@
|
||||
int ret = 0, i;
|
||||
int csz = 0;
|
||||
|
||||
@@ -549,6 +550,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -551,6 +552,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
ah->hw_version.subsysid = subsysid;
|
||||
sc->sc_ah = ah;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1418,7 +1418,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1427,7 +1427,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ath9k.h"
|
||||
|
||||
static char *dev_info = "ath9k";
|
||||
@@ -553,6 +554,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -555,6 +556,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
||||
if (!pdata)
|
||||
ah->ah_flags |= AH_USE_EEPROM;
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
common->ops = &ath9k_common_ops;
|
||||
@@ -675,6 +678,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -677,6 +680,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -693,6 +714,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -695,6 +716,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
common = ath9k_hw_common(ah);
|
||||
ath9k_set_hw_capab(sc, hw);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
ath9k_reg_notifier);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -596,6 +596,8 @@ struct ath_softc {
|
||||
@@ -643,6 +643,8 @@ struct ath_softc {
|
||||
|
||||
int beacon_interval;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -139,7 +139,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
@@ -147,7 +147,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
if (AR_SREV_9100(sc->sc_ah))
|
||||
return;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -467,6 +467,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -460,6 +460,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
@ -1,6 +1,5 @@
|
||||
diff -Nur a/include/linux/ath5k_platform.h b/include/linux/ath5k_platform.h
|
||||
--- a/include/linux/ath5k_platform.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/include/linux/ath5k_platform.h 2010-06-21 00:19:52.000000000 +0200
|
||||
--- /dev/null
|
||||
+++ b/include/linux/ath5k_platform.h
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2008 Atheros Communications Inc.
|
||||
@ -32,4 +31,3 @@ diff -Nur a/include/linux/ath5k_platform.h b/include/linux/ath5k_platform.h
|
||||
+};
|
||||
+
|
||||
+#endif /* _LINUX_ATH5K_PLATFORM_H */
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath5k/eeprom.c 2010-06-23 03:08:32.000000000 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c 2010-06-23 05:59:30.000000000 +0200
|
||||
@@ -22,6 +23,8 @@
|
||||
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
|
||||
@@ -22,6 +22,8 @@
|
||||
\*************************************/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
#include "ath5k.h"
|
||||
#include "reg.h"
|
||||
@@ -34,6 +37,18 @@
|
||||
@@ -34,6 +36,18 @@
|
||||
static int ath5k_hw_eeprom_read(struct ath5k_hw *ah, u32 offset, u16 *data)
|
||||
{
|
||||
u32 status, timeout;
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
/*
|
||||
* Initialize EEPROM access
|
||||
@@ -1788,7 +1802,7 @@
|
||||
@@ -1788,7 +1802,7 @@ ath5k_eeprom_init(struct ath5k_hw *ah)
|
||||
}
|
||||
|
||||
/*
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
|
||||
{
|
||||
@@ -1796,6 +1810,16 @@
|
||||
@@ -1796,6 +1810,16 @@ int ath5k_eeprom_read_mac(struct ath5k_h
|
||||
u32 total, offset;
|
||||
u16 data;
|
||||
int octet, ret;
|
||||
@ -54,4 +54,3 @@
|
||||
|
||||
ret = ath5k_hw_eeprom_read(ah, 0x20, &data);
|
||||
if (ret)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -659,7 +659,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -661,7 +661,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
hw->sta_data_size = sizeof(struct ath_node);
|
||||
hw->vif_data_size = sizeof(struct ath_vif);
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -713,6 +713,8 @@ 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;
|
||||
+ else if (ads.ds_rxstatus8 & AR_KeyMiss)
|
||||
+ rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
@@ -616,7 +616,8 @@ 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;
|
||||
- }
|
||||
+ } else if (rxsp->status11 & AR_KeyMiss)
|
||||
+ rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
}
|
||||
|
||||
return 0;
|
@ -1,993 +0,0 @@
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -103,11 +103,13 @@ int ieee80211_hw_config(struct ieee80211
|
||||
int ret = 0;
|
||||
int power;
|
||||
enum nl80211_channel_type channel_type;
|
||||
+ u32 offchannel_flag;
|
||||
|
||||
might_sleep();
|
||||
|
||||
scan_chan = local->scan_channel;
|
||||
|
||||
+ offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
|
||||
if (scan_chan) {
|
||||
chan = scan_chan;
|
||||
channel_type = NL80211_CHAN_NO_HT;
|
||||
@@ -121,8 +123,9 @@ int ieee80211_hw_config(struct ieee80211
|
||||
channel_type = local->_oper_channel_type;
|
||||
local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
|
||||
}
|
||||
+ offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
|
||||
|
||||
- if (chan != local->hw.conf.channel ||
|
||||
+ if (offchannel_flag || chan != local->hw.conf.channel ||
|
||||
channel_type != local->hw.conf.channel_type) {
|
||||
local->hw.conf.channel = chan;
|
||||
local->hw.conf.channel_type = channel_type;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
||||
@@ -63,6 +63,7 @@ static bool ar9002_hw_per_calibration(st
|
||||
u8 rxchainmask,
|
||||
struct ath9k_cal_list *currCal)
|
||||
{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
bool iscaldone = false;
|
||||
|
||||
if (currCal->calState == CAL_RUNNING) {
|
||||
@@ -81,14 +82,14 @@ static bool ar9002_hw_per_calibration(st
|
||||
}
|
||||
|
||||
currCal->calData->calPostProc(ah, numChains);
|
||||
- ichan->CalValid |= currCal->calData->calType;
|
||||
+ caldata->CalValid |= currCal->calData->calType;
|
||||
currCal->calState = CAL_DONE;
|
||||
iscaldone = true;
|
||||
} else {
|
||||
ar9002_hw_setup_calibration(ah, currCal);
|
||||
}
|
||||
}
|
||||
- } else if (!(ichan->CalValid & currCal->calData->calType)) {
|
||||
+ } else if (!(caldata->CalValid & currCal->calData->calType)) {
|
||||
ath9k_hw_reset_calibration(ah, currCal);
|
||||
}
|
||||
|
||||
@@ -686,8 +687,13 @@ static bool ar9002_hw_calibrate(struct a
|
||||
{
|
||||
bool iscaldone = true;
|
||||
struct ath9k_cal_list *currCal = ah->cal_list_curr;
|
||||
+ bool nfcal, nfcal_pending = false;
|
||||
|
||||
- if (currCal &&
|
||||
+ nfcal = !!(REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF);
|
||||
+ if (ah->caldata)
|
||||
+ nfcal_pending = ah->caldata->nfcal_pending;
|
||||
+
|
||||
+ if (currCal && !nfcal &&
|
||||
(currCal->calState == CAL_RUNNING ||
|
||||
currCal->calState == CAL_WAITING)) {
|
||||
iscaldone = ar9002_hw_per_calibration(ah, chan,
|
||||
@@ -703,7 +709,7 @@ static bool ar9002_hw_calibrate(struct a
|
||||
}
|
||||
|
||||
/* Do NF cal only at longer intervals */
|
||||
- if (longcal) {
|
||||
+ if (longcal || nfcal_pending) {
|
||||
/* Do periodic PAOffset Cal */
|
||||
ar9002_hw_pa_cal(ah, false);
|
||||
ar9002_hw_olc_temp_compensation(ah);
|
||||
@@ -712,16 +718,18 @@ static bool ar9002_hw_calibrate(struct a
|
||||
* Get the value from the previous NF cal and update
|
||||
* history buffer.
|
||||
*/
|
||||
- ath9k_hw_getnf(ah, chan);
|
||||
-
|
||||
- /*
|
||||
- * Load the NF from history buffer of the current channel.
|
||||
- * NF is slow time-variant, so it is OK to use a historical
|
||||
- * value.
|
||||
- */
|
||||
- ath9k_hw_loadnf(ah, ah->curchan);
|
||||
+ if (ath9k_hw_getnf(ah, chan)) {
|
||||
+ /*
|
||||
+ * Load the NF from history buffer of the current
|
||||
+ * channel.
|
||||
+ * NF is slow time-variant, so it is OK to use a
|
||||
+ * historical value.
|
||||
+ */
|
||||
+ ath9k_hw_loadnf(ah, ah->curchan);
|
||||
+ }
|
||||
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ if (longcal)
|
||||
+ ath9k_hw_start_nfcal(ah, false);
|
||||
}
|
||||
|
||||
return iscaldone;
|
||||
@@ -869,8 +877,10 @@ static bool ar9002_hw_init_cal(struct at
|
||||
ar9002_hw_pa_cal(ah, true);
|
||||
|
||||
/* Do NF Calibration after DC offset and other calibrations */
|
||||
- REG_WRITE(ah, AR_PHY_AGC_CONTROL,
|
||||
- REG_READ(ah, AR_PHY_AGC_CONTROL) | AR_PHY_AGC_CONTROL_NF);
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->nfcal_pending = true;
|
||||
|
||||
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
||||
|
||||
@@ -901,7 +911,8 @@ static bool ar9002_hw_init_cal(struct at
|
||||
ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
|
||||
}
|
||||
|
||||
- chan->CalValid = 0;
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->CalValid = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
|
||||
@@ -68,6 +68,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
u8 rxchainmask,
|
||||
struct ath9k_cal_list *currCal)
|
||||
{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
/* Cal is assumed not done until explicitly set below */
|
||||
bool iscaldone = false;
|
||||
|
||||
@@ -95,7 +96,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
currCal->calData->calPostProc(ah, numChains);
|
||||
|
||||
/* Calibration has finished. */
|
||||
- ichan->CalValid |= currCal->calData->calType;
|
||||
+ caldata->CalValid |= currCal->calData->calType;
|
||||
currCal->calState = CAL_DONE;
|
||||
iscaldone = true;
|
||||
} else {
|
||||
@@ -106,7 +107,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
ar9003_hw_setup_calibration(ah, currCal);
|
||||
}
|
||||
}
|
||||
- } else if (!(ichan->CalValid & currCal->calData->calType)) {
|
||||
+ } else if (!(caldata->CalValid & currCal->calData->calType)) {
|
||||
/* If current cal is marked invalid in channel, kick it off */
|
||||
ath9k_hw_reset_calibration(ah, currCal);
|
||||
}
|
||||
@@ -149,6 +150,12 @@ static bool ar9003_hw_calibrate(struct a
|
||||
/* Do NF cal only at longer intervals */
|
||||
if (longcal) {
|
||||
/*
|
||||
+ * Get the value from the previous NF cal and update
|
||||
+ * history buffer.
|
||||
+ */
|
||||
+ ath9k_hw_getnf(ah, chan);
|
||||
+
|
||||
+ /*
|
||||
* Load the NF from history buffer of the current channel.
|
||||
* NF is slow time-variant, so it is OK to use a historical
|
||||
* value.
|
||||
@@ -156,7 +163,7 @@ static bool ar9003_hw_calibrate(struct a
|
||||
ath9k_hw_loadnf(ah, ah->curchan);
|
||||
|
||||
/* start NF calibration, without updating BB NF register */
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ ath9k_hw_start_nfcal(ah, false);
|
||||
}
|
||||
|
||||
return iscaldone;
|
||||
@@ -762,6 +769,8 @@ static bool ar9003_hw_init_cal(struct at
|
||||
/* Revert chainmasks to their original values before NF cal */
|
||||
ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
|
||||
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+
|
||||
/* Initialize list pointers */
|
||||
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
||||
|
||||
@@ -785,7 +794,8 @@ static bool ar9003_hw_init_cal(struct at
|
||||
if (ah->cal_list_curr)
|
||||
ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
|
||||
|
||||
- chan->CalValid = 0;
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->CalValid = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -542,7 +542,11 @@ static void ar9003_hw_prog_ini(struct at
|
||||
u32 reg = INI_RA(iniArr, i, 0);
|
||||
u32 val = INI_RA(iniArr, i, column);
|
||||
|
||||
- REG_WRITE(ah, reg, val);
|
||||
+ if (reg >= 0x16000 && reg < 0x17000)
|
||||
+ ath9k_hw_analog_shift_regwrite(ah, reg, val);
|
||||
+ else
|
||||
+ REG_WRITE(ah, reg, val);
|
||||
+
|
||||
DO_DELAY(regWrites);
|
||||
}
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -22,23 +22,6 @@
|
||||
/* We can tune this as we go by monitoring really low values */
|
||||
#define ATH9K_NF_TOO_LOW -60
|
||||
|
||||
-/* AR5416 may return very high value (like -31 dBm), in those cases the nf
|
||||
- * is incorrect and we should use the static NF value. Later we can try to
|
||||
- * find out why they are reporting these values */
|
||||
-
|
||||
-static bool ath9k_hw_nf_in_range(struct ath_hw *ah, s16 nf)
|
||||
-{
|
||||
- if (nf > ATH9K_NF_TOO_LOW) {
|
||||
- ath_print(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
|
||||
- "noise floor value detected (%d) is "
|
||||
- "lower than what we think is a "
|
||||
- "reasonable value (%d)\n",
|
||||
- nf, ATH9K_NF_TOO_LOW);
|
||||
- return false;
|
||||
- }
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer)
|
||||
{
|
||||
int16_t nfval;
|
||||
@@ -121,6 +104,19 @@ void ath9k_hw_reset_calibration(struct a
|
||||
ah->cal_samples = 0;
|
||||
}
|
||||
|
||||
+static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ struct ath_nf_limits *limit;
|
||||
+
|
||||
+ if (!chan || IS_CHAN_2GHZ(chan))
|
||||
+ limit = &ah->nf_2g;
|
||||
+ else
|
||||
+ limit = &ah->nf_5g;
|
||||
+
|
||||
+ return limit->nominal;
|
||||
+}
|
||||
+
|
||||
/* This is done for the currently configured channel */
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
|
||||
{
|
||||
@@ -128,7 +124,7 @@ bool ath9k_hw_reset_calvalid(struct ath_
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
struct ath9k_cal_list *currCal = ah->cal_list_curr;
|
||||
|
||||
- if (!ah->curchan)
|
||||
+ if (!ah->caldata)
|
||||
return true;
|
||||
|
||||
if (!AR_SREV_9100(ah) && !AR_SREV_9160_10_OR_LATER(ah))
|
||||
@@ -151,37 +147,55 @@ bool ath9k_hw_reset_calvalid(struct ath_
|
||||
"Resetting Cal %d state for channel %u\n",
|
||||
currCal->calData->calType, conf->channel->center_freq);
|
||||
|
||||
- ah->curchan->CalValid &= ~currCal->calData->calType;
|
||||
+ ah->caldata->CalValid &= ~currCal->calData->calType;
|
||||
currCal->calState = CAL_WAITING;
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_reset_calvalid);
|
||||
|
||||
-void ath9k_hw_start_nfcal(struct ath_hw *ah)
|
||||
+void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
|
||||
{
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->nfcal_pending = true;
|
||||
+
|
||||
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
AR_PHY_AGC_CONTROL_ENABLE_NF);
|
||||
- REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
+
|
||||
+ if (update)
|
||||
+ REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
+ AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
|
||||
+ else
|
||||
+ REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
|
||||
+
|
||||
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
|
||||
}
|
||||
|
||||
void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
- struct ath9k_nfcal_hist *h;
|
||||
+ struct ath9k_nfcal_hist *h = NULL;
|
||||
unsigned i, j;
|
||||
int32_t val;
|
||||
u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ s16 default_nf = ath9k_hw_get_default_nf(ah, chan);
|
||||
|
||||
- h = ah->nfCalHist;
|
||||
+ if (ah->caldata)
|
||||
+ h = ah->caldata->nfCalHist;
|
||||
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
if (chainmask & (1 << i)) {
|
||||
+ s16 nfval;
|
||||
+
|
||||
+ if (h)
|
||||
+ nfval = h[i].privNF;
|
||||
+ else
|
||||
+ nfval = default_nf;
|
||||
+
|
||||
val = REG_READ(ah, ah->nf_regs[i]);
|
||||
val &= 0xFFFFFE00;
|
||||
- val |= (((u32) (h[i].privNF) << 1) & 0x1ff);
|
||||
+ val |= (((u32) nfval << 1) & 0x1ff);
|
||||
REG_WRITE(ah, ah->nf_regs[i], val);
|
||||
}
|
||||
}
|
||||
@@ -277,22 +291,25 @@ static void ath9k_hw_nf_sanitize(struct
|
||||
}
|
||||
}
|
||||
|
||||
-int16_t ath9k_hw_getnf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan)
|
||||
+bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
int16_t nf, nfThresh;
|
||||
int16_t nfarray[NUM_NF_READINGS] = { 0 };
|
||||
struct ath9k_nfcal_hist *h;
|
||||
struct ieee80211_channel *c = chan->chan;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
+
|
||||
+ if (!caldata)
|
||||
+ return false;
|
||||
|
||||
chan->channelFlags &= (~CHANNEL_CW_INT);
|
||||
if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF did not complete in calibration window\n");
|
||||
nf = 0;
|
||||
- chan->rawNoiseFloor = nf;
|
||||
- return chan->rawNoiseFloor;
|
||||
+ caldata->rawNoiseFloor = nf;
|
||||
+ return false;
|
||||
} else {
|
||||
ath9k_hw_do_getnf(ah, nfarray);
|
||||
ath9k_hw_nf_sanitize(ah, nfarray);
|
||||
@@ -307,47 +324,40 @@ int16_t ath9k_hw_getnf(struct ath_hw *ah
|
||||
}
|
||||
}
|
||||
|
||||
- h = ah->nfCalHist;
|
||||
-
|
||||
+ h = caldata->nfCalHist;
|
||||
+ caldata->nfcal_pending = false;
|
||||
ath9k_hw_update_nfcal_hist_buffer(h, nfarray);
|
||||
- chan->rawNoiseFloor = h[0].privNF;
|
||||
-
|
||||
- return chan->rawNoiseFloor;
|
||||
+ caldata->rawNoiseFloor = h[0].privNF;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
-void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah)
|
||||
+void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
{
|
||||
- struct ath_nf_limits *limit;
|
||||
+ struct ath9k_nfcal_hist *h;
|
||||
+ s16 default_nf;
|
||||
int i, j;
|
||||
|
||||
- if (!ah->curchan || IS_CHAN_2GHZ(ah->curchan))
|
||||
- limit = &ah->nf_2g;
|
||||
- else
|
||||
- limit = &ah->nf_5g;
|
||||
+ if (!ah->caldata)
|
||||
+ return;
|
||||
|
||||
+ h = ah->caldata->nfCalHist;
|
||||
+ default_nf = ath9k_hw_get_default_nf(ah, chan);
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
- ah->nfCalHist[i].currIndex = 0;
|
||||
- ah->nfCalHist[i].privNF = limit->nominal;
|
||||
- ah->nfCalHist[i].invalidNFcount =
|
||||
- AR_PHY_CCA_FILTERWINDOW_LENGTH;
|
||||
+ h[i].currIndex = 0;
|
||||
+ h[i].privNF = default_nf;
|
||||
+ h[i].invalidNFcount = AR_PHY_CCA_FILTERWINDOW_LENGTH;
|
||||
for (j = 0; j < ATH9K_NF_CAL_HIST_MAX; j++) {
|
||||
- ah->nfCalHist[i].nfCalBuffer[j] = limit->nominal;
|
||||
+ h[i].nfCalBuffer[j] = default_nf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
- s16 nf;
|
||||
-
|
||||
- if (chan->rawNoiseFloor == 0)
|
||||
- nf = -96;
|
||||
- else
|
||||
- nf = chan->rawNoiseFloor;
|
||||
-
|
||||
- if (!ath9k_hw_nf_in_range(ah, nf))
|
||||
- nf = ATH_DEFAULT_NOISE_FLOOR;
|
||||
+ if (!ah->caldata || !ah->caldata->rawNoiseFloor)
|
||||
+ return ath9k_hw_get_default_nf(ah, chan);
|
||||
|
||||
- return nf;
|
||||
+ return ah->caldata->rawNoiseFloor;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_getchan_noise);
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.h
|
||||
@@ -108,11 +108,11 @@ struct ath9k_pacal_info{
|
||||
};
|
||||
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah);
|
||||
-void ath9k_hw_start_nfcal(struct ath_hw *ah);
|
||||
+void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update);
|
||||
void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
-int16_t ath9k_hw_getnf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan);
|
||||
-void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah);
|
||||
+bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
+void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan);
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_hw_reset_calibration(struct ath_hw *ah,
|
||||
struct ath9k_cal_list *currCal);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -622,7 +622,6 @@ static int __ath9k_hw_init(struct ath_hw
|
||||
else
|
||||
ah->tx_trig_level = (AR_FTRIG_512B >> AR_FTRIG_S);
|
||||
|
||||
- ath9k_init_nfcal_hist_buffer(ah);
|
||||
ah->bb_watchdog_timeout_ms = 25;
|
||||
|
||||
common->state = ATH_HW_INITIALIZED;
|
||||
@@ -1195,9 +1194,6 @@ static bool ath9k_hw_channel_change(stru
|
||||
|
||||
ath9k_hw_spur_mitigate_freq(ah, chan);
|
||||
|
||||
- if (!chan->oneTimeCalsDone)
|
||||
- chan->oneTimeCalsDone = true;
|
||||
-
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1230,7 +1226,7 @@ bool ath9k_hw_check_alive(struct ath_hw
|
||||
EXPORT_SYMBOL(ath9k_hw_check_alive);
|
||||
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- bool bChannelChange)
|
||||
+ struct ath9k_hw_cal_data *caldata, bool bChannelChange)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
u32 saveLedState;
|
||||
@@ -1255,9 +1251,19 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
|
||||
return -EIO;
|
||||
|
||||
- if (curchan && !ah->chip_fullsleep)
|
||||
+ if (curchan && !ah->chip_fullsleep && ah->caldata)
|
||||
ath9k_hw_getnf(ah, curchan);
|
||||
|
||||
+ ah->caldata = caldata;
|
||||
+ if (caldata &&
|
||||
+ (chan->channel != caldata->channel ||
|
||||
+ (chan->channelFlags & ~CHANNEL_CW_INT) !=
|
||||
+ (caldata->channelFlags & ~CHANNEL_CW_INT))) {
|
||||
+ /* Operating channel changed, reset channel calibration data */
|
||||
+ memset(caldata, 0, sizeof(*caldata));
|
||||
+ ath9k_init_nfcal_hist_buffer(ah, chan);
|
||||
+ }
|
||||
+
|
||||
if (bChannelChange &&
|
||||
(ah->chip_fullsleep != true) &&
|
||||
(ah->curchan != NULL) &&
|
||||
@@ -1268,7 +1274,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
|
||||
if (ath9k_hw_channel_change(ah, chan)) {
|
||||
ath9k_hw_loadnf(ah, ah->curchan);
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1473,11 +1479,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (ah->btcoex_hw.enabled)
|
||||
ath9k_hw_btcoex_enable(ah);
|
||||
|
||||
- if (AR_SREV_9300_20_OR_LATER(ah)) {
|
||||
- ath9k_hw_loadnf(ah, curchan);
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
ar9003_hw_bb_watchdog_config(ah);
|
||||
- }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -155,6 +155,27 @@ void ath9k_ps_restore(struct ath_softc *
|
||||
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
|
||||
}
|
||||
|
||||
+static void ath_start_ani(struct ath_common *common)
|
||||
+{
|
||||
+ struct ath_hw *ah = common->ah;
|
||||
+ unsigned long timestamp = jiffies_to_msecs(jiffies);
|
||||
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
+
|
||||
+ if (!(sc->sc_flags & SC_OP_ANI_RUN))
|
||||
+ return;
|
||||
+
|
||||
+ if (sc->sc_flags & SC_OP_OFFCHANNEL)
|
||||
+ return;
|
||||
+
|
||||
+ common->ani.longcal_timer = timestamp;
|
||||
+ common->ani.shortcal_timer = timestamp;
|
||||
+ common->ani.checkani_timer = timestamp;
|
||||
+
|
||||
+ mod_timer(&common->ani.timer,
|
||||
+ jiffies +
|
||||
+ msecs_to_jiffies((u32)ah->config.ani_poll_interval));
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Set/change channels. If the channel is really being changed, it's done
|
||||
* by reseting the chip. To accomplish this we must first cleanup any pending
|
||||
@@ -163,16 +184,23 @@ void ath9k_ps_restore(struct ath_softc *
|
||||
int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
|
||||
struct ath9k_channel *hchan)
|
||||
{
|
||||
+ struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
bool fastcc = true, stopped;
|
||||
struct ieee80211_channel *channel = hw->conf.channel;
|
||||
+ struct ath9k_hw_cal_data *caldata = NULL;
|
||||
int r;
|
||||
|
||||
if (sc->sc_flags & SC_OP_INVALID)
|
||||
return -EIO;
|
||||
|
||||
+ del_timer_sync(&common->ani.timer);
|
||||
+ cancel_work_sync(&sc->paprd_work);
|
||||
+ cancel_work_sync(&sc->hw_check_work);
|
||||
+ cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
+
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
/*
|
||||
@@ -192,9 +220,12 @@ int ath_set_channel(struct ath_softc *sc
|
||||
* to flush data frames already in queue because of
|
||||
* changing channel. */
|
||||
|
||||
- if (!stopped || (sc->sc_flags & SC_OP_FULL_RESET))
|
||||
+ if (!stopped || !(sc->sc_flags & SC_OP_OFFCHANNEL))
|
||||
fastcc = false;
|
||||
|
||||
+ if (!(sc->sc_flags & SC_OP_OFFCHANNEL))
|
||||
+ caldata = &aphy->caldata;
|
||||
+
|
||||
ath_print(common, ATH_DBG_CONFIG,
|
||||
"(%u MHz) -> (%u MHz), conf_is_ht40: %d\n",
|
||||
sc->sc_ah->curchan->channel,
|
||||
@@ -202,7 +233,7 @@ int ath_set_channel(struct ath_softc *sc
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
|
||||
- r = ath9k_hw_reset(ah, hchan, fastcc);
|
||||
+ r = ath9k_hw_reset(ah, hchan, caldata, fastcc);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -213,8 +244,6 @@ int ath_set_channel(struct ath_softc *sc
|
||||
}
|
||||
spin_unlock_bh(&sc->sc_resetlock);
|
||||
|
||||
- sc->sc_flags &= ~SC_OP_FULL_RESET;
|
||||
-
|
||||
if (ath_startrecv(sc) != 0) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to restart recv logic\n");
|
||||
@@ -226,6 +255,12 @@ int ath_set_channel(struct ath_softc *sc
|
||||
ath_update_txpow(sc);
|
||||
ath9k_hw_set_interrupts(ah, ah->imask);
|
||||
|
||||
+ if (!(sc->sc_flags & (SC_OP_OFFCHANNEL | SC_OP_SCANNING))) {
|
||||
+ ath_start_ani(common);
|
||||
+ ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
|
||||
+ ath_beacon_config(sc, NULL);
|
||||
+ }
|
||||
+
|
||||
ps_restore:
|
||||
ath9k_ps_restore(sc);
|
||||
return r;
|
||||
@@ -234,17 +269,19 @@ int ath_set_channel(struct ath_softc *sc
|
||||
static void ath_paprd_activate(struct ath_softc *sc)
|
||||
{
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
int chain;
|
||||
|
||||
- if (!ah->curchan->paprd_done)
|
||||
+ if (!caldata || !caldata->paprd_done)
|
||||
return;
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
+ ar9003_paprd_enable(ah, false);
|
||||
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
|
||||
if (!(ah->caps.tx_chainmask & BIT(chain)))
|
||||
continue;
|
||||
|
||||
- ar9003_paprd_populate_single_table(ah, ah->curchan, chain);
|
||||
+ ar9003_paprd_populate_single_table(ah, caldata, chain);
|
||||
}
|
||||
|
||||
ar9003_paprd_enable(ah, true);
|
||||
@@ -262,6 +299,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
int band = hw->conf.channel->band;
|
||||
struct ieee80211_supported_band *sband = &sc->sbands[band];
|
||||
struct ath_tx_control txctl;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
int qnum, ftype;
|
||||
int chain_ok = 0;
|
||||
int chain;
|
||||
@@ -269,6 +307,9 @@ void ath_paprd_calibrate(struct work_str
|
||||
int time_left;
|
||||
int i;
|
||||
|
||||
+ if (!caldata)
|
||||
+ return;
|
||||
+
|
||||
skb = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return;
|
||||
@@ -323,7 +364,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
if (!ar9003_paprd_is_done(ah))
|
||||
break;
|
||||
|
||||
- if (ar9003_paprd_create_curve(ah, ah->curchan, chain) != 0)
|
||||
+ if (ar9003_paprd_create_curve(ah, caldata, chain) != 0)
|
||||
break;
|
||||
|
||||
chain_ok = 1;
|
||||
@@ -331,7 +372,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
kfree_skb(skb);
|
||||
|
||||
if (chain_ok) {
|
||||
- ah->curchan->paprd_done = true;
|
||||
+ caldata->paprd_done = true;
|
||||
ath_paprd_activate(sc);
|
||||
}
|
||||
|
||||
@@ -440,33 +481,14 @@ set_timer:
|
||||
cal_interval = min(cal_interval, (u32)short_cal_interval);
|
||||
|
||||
mod_timer(&common->ani.timer, jiffies + msecs_to_jiffies(cal_interval));
|
||||
- if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) &&
|
||||
- !(sc->sc_flags & SC_OP_SCANNING)) {
|
||||
- if (!sc->sc_ah->curchan->paprd_done)
|
||||
+ if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) && ah->caldata) {
|
||||
+ if (!ah->caldata->paprd_done)
|
||||
ieee80211_queue_work(sc->hw, &sc->paprd_work);
|
||||
else
|
||||
ath_paprd_activate(sc);
|
||||
}
|
||||
}
|
||||
|
||||
-static void ath_start_ani(struct ath_common *common)
|
||||
-{
|
||||
- struct ath_hw *ah = common->ah;
|
||||
- unsigned long timestamp = jiffies_to_msecs(jiffies);
|
||||
- struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
-
|
||||
- if (!(sc->sc_flags & SC_OP_ANI_RUN))
|
||||
- return;
|
||||
-
|
||||
- common->ani.longcal_timer = timestamp;
|
||||
- common->ani.shortcal_timer = timestamp;
|
||||
- common->ani.checkani_timer = timestamp;
|
||||
-
|
||||
- mod_timer(&common->ani.timer,
|
||||
- jiffies +
|
||||
- msecs_to_jiffies((u32)ah->config.ani_poll_interval));
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* Update tx/rx chainmask. For legacy association,
|
||||
* hard code chainmask to 1x1, for 11n association, use
|
||||
@@ -478,7 +500,7 @@ void ath_update_chainmask(struct ath_sof
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
- if ((sc->sc_flags & SC_OP_SCANNING) || is_ht ||
|
||||
+ if ((sc->sc_flags & SC_OP_OFFCHANNEL) || is_ht ||
|
||||
(ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE)) {
|
||||
common->tx_chainmask = ah->caps.tx_chainmask;
|
||||
common->rx_chainmask = ah->caps.rx_chainmask;
|
||||
@@ -818,7 +840,7 @@ void ath_radio_enable(struct ath_softc *
|
||||
ah->curchan = ath_get_curchannel(sc, sc->hw);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -878,7 +900,7 @@ void ath_radio_disable(struct ath_softc
|
||||
ah->curchan = ath_get_curchannel(sc, hw);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -911,7 +933,7 @@ int ath_reset(struct ath_softc *sc, bool
|
||||
ath_flushrecv(sc);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false);
|
||||
if (r)
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d\n", r);
|
||||
@@ -1086,7 +1108,7 @@ static int ath9k_start(struct ieee80211_
|
||||
* and then setup of the interrupt mask.
|
||||
*/
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, init_channel, false);
|
||||
+ r = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1580,6 +1602,10 @@ static int ath9k_config(struct ieee80211
|
||||
|
||||
aphy->chan_idx = pos;
|
||||
aphy->chan_is_ht = conf_is_ht(conf);
|
||||
+ if (hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
|
||||
+ sc->sc_flags |= SC_OP_OFFCHANNEL;
|
||||
+ else
|
||||
+ sc->sc_flags &= ~SC_OP_OFFCHANNEL;
|
||||
|
||||
if (aphy->state == ATH_WIPHY_SCAN ||
|
||||
aphy->state == ATH_WIPHY_ACTIVE)
|
||||
@@ -1991,7 +2017,6 @@ static void ath9k_sw_scan_start(struct i
|
||||
{
|
||||
struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
if (ath9k_wiphy_scanning(sc)) {
|
||||
@@ -2009,10 +2034,6 @@ static void ath9k_sw_scan_start(struct i
|
||||
aphy->state = ATH_WIPHY_SCAN;
|
||||
ath9k_wiphy_pause_all_forced(sc, aphy);
|
||||
sc->sc_flags |= SC_OP_SCANNING;
|
||||
- del_timer_sync(&common->ani.timer);
|
||||
- cancel_work_sync(&sc->paprd_work);
|
||||
- cancel_work_sync(&sc->hw_check_work);
|
||||
- cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
|
||||
@@ -2024,15 +2045,10 @@ static void ath9k_sw_scan_complete(struc
|
||||
{
|
||||
struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
aphy->state = ATH_WIPHY_ACTIVE;
|
||||
sc->sc_flags &= ~SC_OP_SCANNING;
|
||||
- sc->sc_flags |= SC_OP_FULL_RESET;
|
||||
- ath_start_ani(common);
|
||||
- ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
|
||||
- ath_beacon_config(sc, NULL);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
@@ -577,10 +577,11 @@ static bool create_pa_curve(u32 *data_L,
|
||||
}
|
||||
|
||||
void ar9003_paprd_populate_single_table(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan, int chain)
|
||||
+ struct ath9k_hw_cal_data *caldata,
|
||||
+ int chain)
|
||||
{
|
||||
- u32 *paprd_table_val = chan->pa_table[chain];
|
||||
- u32 small_signal_gain = chan->small_signal_gain[chain];
|
||||
+ u32 *paprd_table_val = caldata->pa_table[chain];
|
||||
+ u32 small_signal_gain = caldata->small_signal_gain[chain];
|
||||
u32 training_power;
|
||||
u32 reg = 0;
|
||||
int i;
|
||||
@@ -654,17 +655,17 @@ int ar9003_paprd_setup_gain_table(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ar9003_paprd_setup_gain_table);
|
||||
|
||||
-int ar9003_paprd_create_curve(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- int chain)
|
||||
+int ar9003_paprd_create_curve(struct ath_hw *ah,
|
||||
+ struct ath9k_hw_cal_data *caldata, int chain)
|
||||
{
|
||||
- u16 *small_signal_gain = &chan->small_signal_gain[chain];
|
||||
- u32 *pa_table = chan->pa_table[chain];
|
||||
+ u16 *small_signal_gain = &caldata->small_signal_gain[chain];
|
||||
+ u32 *pa_table = caldata->pa_table[chain];
|
||||
u32 *data_L, *data_U;
|
||||
int i, status = 0;
|
||||
u32 *buf;
|
||||
u32 reg;
|
||||
|
||||
- memset(chan->pa_table[chain], 0, sizeof(chan->pa_table[chain]));
|
||||
+ memset(caldata->pa_table[chain], 0, sizeof(caldata->pa_table[chain]));
|
||||
|
||||
buf = kmalloc(2 * 48 * sizeof(u32), GFP_ATOMIC);
|
||||
if (!buf)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -511,7 +511,7 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
#define SC_OP_BEACONS BIT(1)
|
||||
#define SC_OP_RXAGGR BIT(2)
|
||||
#define SC_OP_TXAGGR BIT(3)
|
||||
-#define SC_OP_FULL_RESET BIT(4)
|
||||
+#define SC_OP_OFFCHANNEL BIT(4)
|
||||
#define SC_OP_PREAMBLE_SHORT BIT(5)
|
||||
#define SC_OP_PROTECT_ENABLE BIT(6)
|
||||
#define SC_OP_RXFLUSH BIT(7)
|
||||
@@ -612,6 +612,7 @@ struct ath_softc {
|
||||
struct ath_wiphy {
|
||||
struct ath_softc *sc; /* shared for all virtual wiphys */
|
||||
struct ieee80211_hw *hw;
|
||||
+ struct ath9k_hw_cal_data caldata;
|
||||
enum ath_wiphy_state {
|
||||
ATH_WIPHY_INACTIVE,
|
||||
ATH_WIPHY_ACTIVE,
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc.h
|
||||
@@ -353,6 +353,8 @@ struct ath9k_htc_priv {
|
||||
u16 seq_no;
|
||||
u32 bmiss_cnt;
|
||||
|
||||
+ struct ath9k_hw_cal_data caldata[38];
|
||||
+
|
||||
spinlock_t beacon_lock;
|
||||
|
||||
bool tx_queues_stop;
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
@@ -125,6 +125,7 @@ static int ath9k_htc_set_channel(struct
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
bool fastcc = true;
|
||||
struct ieee80211_channel *channel = hw->conf.channel;
|
||||
+ struct ath9k_hw_cal_data *caldata;
|
||||
enum htc_phymode mode;
|
||||
__be16 htc_mode;
|
||||
u8 cmd_rsp;
|
||||
@@ -149,7 +150,8 @@ static int ath9k_htc_set_channel(struct
|
||||
priv->ah->curchan->channel,
|
||||
channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf));
|
||||
|
||||
- ret = ath9k_hw_reset(ah, hchan, fastcc);
|
||||
+ caldata = &priv->caldata[channel->hw_value];
|
||||
+ ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u Mhz) "
|
||||
@@ -1028,7 +1030,7 @@ static void ath9k_htc_radio_enable(struc
|
||||
ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
|
||||
|
||||
/* Reset the HW */
|
||||
- ret = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1091,7 +1093,7 @@ static void ath9k_htc_radio_disable(stru
|
||||
ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
|
||||
|
||||
/* Reset the HW */
|
||||
- ret = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1179,7 +1181,7 @@ static int ath9k_htc_start(struct ieee80
|
||||
ath9k_hw_configpcipowersave(ah, 0, 0);
|
||||
|
||||
ath9k_hw_htc_resetinit(ah);
|
||||
- ret = ath9k_hw_reset(ah, init_channel, false);
|
||||
+ ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -346,19 +346,25 @@ enum ath9k_int {
|
||||
CHANNEL_HT40PLUS | \
|
||||
CHANNEL_HT40MINUS)
|
||||
|
||||
-struct ath9k_channel {
|
||||
- struct ieee80211_channel *chan;
|
||||
+struct ath9k_hw_cal_data {
|
||||
u16 channel;
|
||||
u32 channelFlags;
|
||||
- u32 chanmode;
|
||||
int32_t CalValid;
|
||||
- bool oneTimeCalsDone;
|
||||
int8_t iCoff;
|
||||
int8_t qCoff;
|
||||
int16_t rawNoiseFloor;
|
||||
bool paprd_done;
|
||||
+ bool nfcal_pending;
|
||||
u16 small_signal_gain[AR9300_MAX_CHAINS];
|
||||
u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ];
|
||||
+ struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
||||
+};
|
||||
+
|
||||
+struct ath9k_channel {
|
||||
+ struct ieee80211_channel *chan;
|
||||
+ u16 channel;
|
||||
+ u32 channelFlags;
|
||||
+ u32 chanmode;
|
||||
};
|
||||
|
||||
#define IS_CHAN_G(_c) ((((_c)->channelFlags & (CHANNEL_G)) == CHANNEL_G) || \
|
||||
@@ -669,7 +675,7 @@ struct ath_hw {
|
||||
enum nl80211_iftype opmode;
|
||||
enum ath9k_power_mode power_mode;
|
||||
|
||||
- struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
||||
+ struct ath9k_hw_cal_data *caldata;
|
||||
struct ath9k_pacal_info pacal_info;
|
||||
struct ar5416Stats stats;
|
||||
struct ath9k_tx_queue_info txq[ATH9K_NUM_TX_QUEUES];
|
||||
@@ -863,7 +869,7 @@ const char *ath9k_hw_probe(u16 vendorid,
|
||||
void ath9k_hw_deinit(struct ath_hw *ah);
|
||||
int ath9k_hw_init(struct ath_hw *ah);
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- bool bChannelChange);
|
||||
+ struct ath9k_hw_cal_data *caldata, bool bChannelChange);
|
||||
int ath9k_hw_fill_cap_info(struct ath_hw *ah);
|
||||
u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan);
|
||||
|
||||
@@ -958,9 +964,10 @@ void ar9003_hw_bb_watchdog_read(struct a
|
||||
void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah);
|
||||
void ar9003_paprd_enable(struct ath_hw *ah, bool val);
|
||||
void ar9003_paprd_populate_single_table(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan, int chain);
|
||||
-int ar9003_paprd_create_curve(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- int chain);
|
||||
+ struct ath9k_hw_cal_data *caldata,
|
||||
+ int chain);
|
||||
+int ar9003_paprd_create_curve(struct ath_hw *ah,
|
||||
+ struct ath9k_hw_cal_data *caldata, int chain);
|
||||
int ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain);
|
||||
int ar9003_paprd_init_table(struct ath_hw *ah);
|
||||
bool ar9003_paprd_is_done(struct ath_hw *ah);
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1181,7 +1181,7 @@ void ath_drain_all_txq(struct ath_softc
|
||||
"Failed to stop TX DMA. Resetting hardware!\n");
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false);
|
||||
if (r)
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d\n",
|
55
package/mac80211/patches/521-ath9k_aggr_race_fix.patch
Normal file
55
package/mac80211/patches/521-ath9k_aggr_race_fix.patch
Normal file
@ -0,0 +1,55 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -784,17 +784,23 @@ static void ath_tx_sched_aggr(struct ath
|
||||
status != ATH_AGGR_BAW_CLOSED);
|
||||
}
|
||||
|
||||
-void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn)
|
||||
+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
+ u16 tid, u16 *ssn)
|
||||
{
|
||||
struct ath_atx_tid *txtid;
|
||||
struct ath_node *an;
|
||||
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
txtid = ATH_AN_2_TID(an, tid);
|
||||
+
|
||||
+ if (txtid->state & (AGGR_CLEANUP | AGGR_ADDBA_COMPLETE))
|
||||
+ return -EAGAIN;
|
||||
+
|
||||
txtid->state |= AGGR_ADDBA_PROGRESS;
|
||||
txtid->paused = true;
|
||||
*ssn = txtid->seq_start;
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -346,8 +346,8 @@ void ath_tx_tasklet(struct ath_softc *sc
|
||||
void ath_tx_edma_tasklet(struct ath_softc *sc);
|
||||
void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
|
||||
bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno);
|
||||
-void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn);
|
||||
+int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
|
||||
+ u16 tid, u16 *ssn);
|
||||
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
|
||||
void ath9k_enable_ps(struct ath_softc *sc);
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -1968,8 +1968,9 @@ static int ath9k_ampdu_action(struct iee
|
||||
break;
|
||||
case IEEE80211_AMPDU_TX_START:
|
||||
ath9k_ps_wakeup(sc);
|
||||
- ath_tx_aggr_start(sc, sta, tid, ssn);
|
||||
- ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
||||
+ ret = ath_tx_aggr_start(sc, sta, tid, ssn);
|
||||
+ if (!ret)
|
||||
+ ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
|
||||
ath9k_ps_restore(sc);
|
||||
break;
|
||||
case IEEE80211_AMPDU_TX_STOP:
|
131
package/mac80211/patches/522-ath9k_aggr_flush.patch
Normal file
131
package/mac80211/patches/522-ath9k_aggr_flush.patch
Normal file
@ -0,0 +1,131 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -61,6 +61,8 @@ static int ath_tx_num_badfrms(struct ath
|
||||
struct ath_tx_status *ts, int txok);
|
||||
static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
|
||||
int nbad, int txok, bool update_rc);
|
||||
+static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
|
||||
+ int seqno);
|
||||
|
||||
enum {
|
||||
MCS_HT20,
|
||||
@@ -144,18 +146,23 @@ static void ath_tx_flush_tid(struct ath_
|
||||
struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
struct ath_buf *bf;
|
||||
struct list_head bf_head;
|
||||
- INIT_LIST_HEAD(&bf_head);
|
||||
+ struct ath_tx_status ts;
|
||||
|
||||
- WARN_ON(!tid->paused);
|
||||
+ INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
+ memset(&ts, 0, sizeof(ts));
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
- tid->paused = false;
|
||||
|
||||
while (!list_empty(&tid->buf_q)) {
|
||||
bf = list_first_entry(&tid->buf_q, struct ath_buf, list);
|
||||
- BUG_ON(bf_isretried(bf));
|
||||
list_move_tail(&bf->list, &bf_head);
|
||||
- ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
|
||||
+
|
||||
+ if (bf_isretried(bf)) {
|
||||
+ ath_tx_update_baw(sc, tid, bf->bf_seqno);
|
||||
+ ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
+ } else {
|
||||
+ ath_tx_send_ht_normal(sc, txq, tid, &bf_head);
|
||||
+ }
|
||||
}
|
||||
|
||||
spin_unlock_bh(&txq->axq_lock);
|
||||
@@ -430,7 +437,7 @@ static void ath_tx_complete_aggr(struct
|
||||
list_move_tail(&bf->list, &bf_head);
|
||||
}
|
||||
|
||||
- if (!txpending) {
|
||||
+ if (!txpending || (tid->state & AGGR_CLEANUP)) {
|
||||
/*
|
||||
* complete the acked-ones/xretried ones; update
|
||||
* block-ack window
|
||||
@@ -451,6 +458,7 @@ static void ath_tx_complete_aggr(struct
|
||||
!txfail, sendbar);
|
||||
} 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;
|
||||
@@ -509,15 +517,12 @@ static void ath_tx_complete_aggr(struct
|
||||
}
|
||||
|
||||
if (tid->state & AGGR_CLEANUP) {
|
||||
+ ath_tx_flush_tid(sc, tid);
|
||||
+
|
||||
if (tid->baw_head == tid->baw_tail) {
|
||||
tid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
tid->state &= ~AGGR_CLEANUP;
|
||||
-
|
||||
- /* send buffered frames as singles */
|
||||
- ath_tx_flush_tid(sc, tid);
|
||||
}
|
||||
- rcu_read_unlock();
|
||||
- return;
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
@@ -808,12 +813,6 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
struct ath_node *an = (struct ath_node *)sta->drv_priv;
|
||||
struct ath_atx_tid *txtid = ATH_AN_2_TID(an, tid);
|
||||
struct ath_txq *txq = &sc->tx.txq[txtid->ac->qnum];
|
||||
- struct ath_tx_status ts;
|
||||
- struct ath_buf *bf;
|
||||
- struct list_head bf_head;
|
||||
-
|
||||
- memset(&ts, 0, sizeof(ts));
|
||||
- INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
if (txtid->state & AGGR_CLEANUP)
|
||||
return;
|
||||
@@ -823,31 +822,22 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
return;
|
||||
}
|
||||
|
||||
- /* drop all software retried frames and mark this TID */
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
txtid->paused = true;
|
||||
- while (!list_empty(&txtid->buf_q)) {
|
||||
- bf = list_first_entry(&txtid->buf_q, struct ath_buf, list);
|
||||
- if (!bf_isretried(bf)) {
|
||||
- /*
|
||||
- * NB: it's based on the assumption that
|
||||
- * software retried frame will always stay
|
||||
- * at the head of software queue.
|
||||
- */
|
||||
- break;
|
||||
- }
|
||||
- list_move_tail(&bf->list, &bf_head);
|
||||
- ath_tx_update_baw(sc, txtid, bf->bf_seqno);
|
||||
- ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0, 0);
|
||||
- }
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
|
||||
- if (txtid->baw_head != txtid->baw_tail) {
|
||||
+ /*
|
||||
+ * If frames are still being transmitted for this TID, they will be
|
||||
+ * cleaned up during tx completion. To prevent race conditions, this
|
||||
+ * TID can only be reused after all in-progress subframes have been
|
||||
+ * completed.
|
||||
+ */
|
||||
+ if (txtid->baw_head != txtid->baw_tail)
|
||||
txtid->state |= AGGR_CLEANUP;
|
||||
- } else {
|
||||
+ else
|
||||
txtid->state &= ~AGGR_ADDBA_COMPLETE;
|
||||
- ath_tx_flush_tid(sc, txtid);
|
||||
- }
|
||||
+ spin_unlock_bh(&txq->axq_lock);
|
||||
+
|
||||
+ ath_tx_flush_tid(sc, txtid);
|
||||
}
|
||||
|
||||
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid)
|
@ -1,72 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -120,26 +120,14 @@ static void ath_tx_queue_tid(struct ath_
|
||||
list_add_tail(&ac->list, &txq->axq_acq);
|
||||
}
|
||||
|
||||
-static void ath_tx_pause_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
|
||||
-{
|
||||
- struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
-
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
- tid->paused++;
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
-}
|
||||
-
|
||||
static void ath_tx_resume_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
|
||||
{
|
||||
struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
|
||||
- BUG_ON(tid->paused <= 0);
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
-
|
||||
- tid->paused--;
|
||||
+ WARN_ON(!tid->paused);
|
||||
|
||||
- if (tid->paused > 0)
|
||||
- goto unlock;
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+ tid->paused = false;
|
||||
|
||||
if (list_empty(&tid->buf_q))
|
||||
goto unlock;
|
||||
@@ -157,15 +145,10 @@ static void ath_tx_flush_tid(struct ath_
|
||||
struct list_head bf_head;
|
||||
INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
- BUG_ON(tid->paused <= 0);
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ WARN_ON(!tid->paused);
|
||||
|
||||
- tid->paused--;
|
||||
-
|
||||
- if (tid->paused > 0) {
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
- return;
|
||||
- }
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+ tid->paused = false;
|
||||
|
||||
while (!list_empty(&tid->buf_q)) {
|
||||
bf = list_first_entry(&tid->buf_q, struct ath_buf, list);
|
||||
@@ -811,7 +794,7 @@ void ath_tx_aggr_start(struct ath_softc
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
txtid = ATH_AN_2_TID(an, tid);
|
||||
txtid->state |= AGGR_ADDBA_PROGRESS;
|
||||
- ath_tx_pause_tid(sc, txtid);
|
||||
+ txtid->paused = true;
|
||||
*ssn = txtid->seq_start;
|
||||
}
|
||||
|
||||
@@ -835,10 +818,9 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
return;
|
||||
}
|
||||
|
||||
- ath_tx_pause_tid(sc, txtid);
|
||||
-
|
||||
/* drop all software retried frames and mark this TID */
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
+ txtid->paused = true;
|
||||
while (!list_empty(&txtid->buf_q)) {
|
||||
bf = list_first_entry(&txtid->buf_q, struct ath_buf, list);
|
||||
if (!bf_isretried(bf)) {
|
67
package/mac80211/patches/530-ath9k_eeprom_debugfs.patch
Normal file
67
package/mac80211/patches/530-ath9k_eeprom_debugfs.patch
Normal file
@ -0,0 +1,67 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
||||
@@ -897,6 +897,53 @@ static const struct file_operations fops
|
||||
.owner = THIS_MODULE
|
||||
};
|
||||
|
||||
+static ssize_t read_file_eeprom(struct file *file, char __user *user_buf,
|
||||
+ size_t count, loff_t *ppos)
|
||||
+{
|
||||
+ struct ath_softc *sc = file->private_data;
|
||||
+ struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ int bytes = 0;
|
||||
+ int pos = *ppos;
|
||||
+ int size = 4096;
|
||||
+ u16 val;
|
||||
+ int i;
|
||||
+
|
||||
+ if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
+ size = 16384;
|
||||
+
|
||||
+ if (*ppos < 0)
|
||||
+ return -EINVAL;
|
||||
+
|
||||
+ if (count > size - *ppos)
|
||||
+ count = size - *ppos;
|
||||
+
|
||||
+ for (i = *ppos / 2; count > 0; count -= bytes, *ppos += bytes, i++) {
|
||||
+ void *from = &val;
|
||||
+
|
||||
+ if (!common->bus_ops->eeprom_read(common, i, &val))
|
||||
+ val = 0xffff;
|
||||
+
|
||||
+ if (*ppos % 2) {
|
||||
+ from++;
|
||||
+ bytes = 1;
|
||||
+ } else if (count == 1) {
|
||||
+ bytes = 1;
|
||||
+ } else {
|
||||
+ bytes = 2;
|
||||
+ }
|
||||
+ copy_to_user(user_buf, from, bytes);
|
||||
+ user_buf += bytes;
|
||||
+ }
|
||||
+ return *ppos - pos;
|
||||
+}
|
||||
+
|
||||
+static const struct file_operations fops_eeprom = {
|
||||
+ .read = read_file_eeprom,
|
||||
+ .open = ath9k_debugfs_open,
|
||||
+ .owner = THIS_MODULE
|
||||
+};
|
||||
+
|
||||
int ath9k_init_debug(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
@@ -960,6 +1007,10 @@ int ath9k_init_debug(struct ath_hw *ah)
|
||||
sc->debug.debugfs_phy, &ah->config.cwm_ignore_extcca))
|
||||
goto err;
|
||||
|
||||
+ if (!debugfs_create_file("eeprom", S_IRUSR,
|
||||
+ sc->debug.debugfs_phy, sc, &fops_eeprom))
|
||||
+ goto err;
|
||||
+
|
||||
sc->debug.regidx = 0;
|
||||
return 0;
|
||||
err:
|
@ -1,43 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/debug.h
|
||||
+++ b/drivers/net/wireless/ath/debug.h
|
||||
@@ -36,6 +36,7 @@
|
||||
* @ATH_DBG_PS: power save processing
|
||||
* @ATH_DBG_HWTIMER: hardware timer handling
|
||||
* @ATH_DBG_BTCOEX: bluetooth coexistance
|
||||
+ * @ATH_DBG_BSTUCK: stuck beacons
|
||||
* @ATH_DBG_ANY: enable all debugging
|
||||
*
|
||||
* The debug level is used to control the amount and type of debugging output
|
||||
@@ -60,6 +61,7 @@ enum ATH_DEBUG {
|
||||
ATH_DBG_HWTIMER = 0x00001000,
|
||||
ATH_DBG_BTCOEX = 0x00002000,
|
||||
ATH_DBG_WMI = 0x00004000,
|
||||
+ ATH_DBG_BSTUCK = 0x00008000,
|
||||
ATH_DBG_ANY = 0xffffffff
|
||||
};
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
@@ -359,11 +359,11 @@ void ath_beacon_tasklet(unsigned long da
|
||||
sc->beacon.bmisscnt++;
|
||||
|
||||
if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"missed %u consecutive beacons\n",
|
||||
sc->beacon.bmisscnt);
|
||||
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"beacon is officially stuck\n");
|
||||
sc->sc_flags |= SC_OP_TSF_RESET;
|
||||
ath_reset(sc, false);
|
||||
@@ -373,7 +373,7 @@ void ath_beacon_tasklet(unsigned long da
|
||||
}
|
||||
|
||||
if (sc->beacon.bmisscnt != 0) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"resume beacon xmit after %u misses\n",
|
||||
sc->beacon.bmisscnt);
|
||||
sc->beacon.bmisscnt = 0;
|
@ -1,101 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -19,8 +19,7 @@
|
||||
|
||||
/* Common calibration code */
|
||||
|
||||
-/* We can tune this as we go by monitoring really low values */
|
||||
-#define ATH9K_NF_TOO_LOW -60
|
||||
+#define ATH9K_NF_TOO_HIGH -60
|
||||
|
||||
static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer)
|
||||
{
|
||||
@@ -45,11 +44,35 @@ static int16_t ath9k_hw_get_nf_hist_mid(
|
||||
return nfval;
|
||||
}
|
||||
|
||||
-static void ath9k_hw_update_nfcal_hist_buffer(struct ath9k_nfcal_hist *h,
|
||||
+static struct ath_nf_limits *ath9k_hw_get_nf_limits(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ struct ath_nf_limits *limit;
|
||||
+
|
||||
+ if (!chan || IS_CHAN_2GHZ(chan))
|
||||
+ limit = &ah->nf_2g;
|
||||
+ else
|
||||
+ limit = &ah->nf_5g;
|
||||
+
|
||||
+ return limit;
|
||||
+}
|
||||
+
|
||||
+static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ return ath9k_hw_get_nf_limits(ah, chan)->nominal;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_nfcal_hist *h,
|
||||
int16_t *nfarray)
|
||||
{
|
||||
+ struct ath_nf_limits *limit;
|
||||
int i;
|
||||
|
||||
+ limit = ath9k_hw_get_nf_limits(ah, ah->curchan);
|
||||
+
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
h[i].nfCalBuffer[h[i].currIndex] = nfarray[i];
|
||||
|
||||
@@ -63,6 +86,9 @@ static void ath9k_hw_update_nfcal_hist_b
|
||||
h[i].privNF =
|
||||
ath9k_hw_get_nf_hist_mid(h[i].nfCalBuffer);
|
||||
}
|
||||
+
|
||||
+ if (h[i].privNF > limit->max)
|
||||
+ h[i].privNF = limit->max;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,19 +130,6 @@ void ath9k_hw_reset_calibration(struct a
|
||||
ah->cal_samples = 0;
|
||||
}
|
||||
|
||||
-static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan)
|
||||
-{
|
||||
- struct ath_nf_limits *limit;
|
||||
-
|
||||
- if (!chan || IS_CHAN_2GHZ(chan))
|
||||
- limit = &ah->nf_2g;
|
||||
- else
|
||||
- limit = &ah->nf_5g;
|
||||
-
|
||||
- return limit->nominal;
|
||||
-}
|
||||
-
|
||||
/* This is done for the currently configured channel */
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
|
||||
{
|
||||
@@ -277,10 +290,10 @@ static void ath9k_hw_nf_sanitize(struct
|
||||
"NF calibrated [%s] [chain %d] is %d\n",
|
||||
(i >= 3 ? "ext" : "ctl"), i % 3, nf[i]);
|
||||
|
||||
- if (nf[i] > limit->max) {
|
||||
+ if (nf[i] > ATH9K_NF_TOO_HIGH) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF[%d] (%d) > MAX (%d), correcting to MAX",
|
||||
- i, nf[i], limit->max);
|
||||
+ i, nf[i], ATH9K_NF_TOO_HIGH);
|
||||
nf[i] = limit->max;
|
||||
} else if (nf[i] < limit->min) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
@@ -326,7 +339,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, s
|
||||
|
||||
h = caldata->nfCalHist;
|
||||
caldata->nfcal_pending = false;
|
||||
- ath9k_hw_update_nfcal_hist_buffer(h, nfarray);
|
||||
+ ath9k_hw_update_nfcal_hist_buffer(ah, h, nfarray);
|
||||
caldata->rawNoiseFloor = h[0].privNF;
|
||||
return true;
|
||||
}
|
@ -1,129 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
@@ -362,6 +362,7 @@ void ath_beacon_tasklet(unsigned long da
|
||||
ath_print(common, ATH_DBG_BSTUCK,
|
||||
"missed %u consecutive beacons\n",
|
||||
sc->beacon.bmisscnt);
|
||||
+ ath9k_hw_bstuck_nfcal(ah);
|
||||
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
|
||||
ath_print(common, ATH_DBG_BSTUCK,
|
||||
"beacon is officially stuck\n");
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -65,12 +65,16 @@ static s16 ath9k_hw_get_default_nf(struc
|
||||
|
||||
|
||||
static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
- struct ath9k_nfcal_hist *h,
|
||||
+ struct ath9k_hw_cal_data *cal,
|
||||
int16_t *nfarray)
|
||||
{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_nf_limits *limit;
|
||||
+ struct ath9k_nfcal_hist *h;
|
||||
+ bool high_nf_mid = false;
|
||||
int i;
|
||||
|
||||
+ h = cal->nfCalHist;
|
||||
limit = ath9k_hw_get_nf_limits(ah, ah->curchan);
|
||||
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
@@ -87,9 +91,38 @@ static void ath9k_hw_update_nfcal_hist_b
|
||||
ath9k_hw_get_nf_hist_mid(h[i].nfCalBuffer);
|
||||
}
|
||||
|
||||
- if (h[i].privNF > limit->max)
|
||||
- h[i].privNF = limit->max;
|
||||
+ if (!h[i].privNF)
|
||||
+ continue;
|
||||
+
|
||||
+ if (h[i].privNF > limit->max) {
|
||||
+ high_nf_mid = true;
|
||||
+
|
||||
+ ath_print(common, ATH_DBG_CALIBRATE,
|
||||
+ "NFmid[%d] (%d) > MAX (%d), %s\n",
|
||||
+ i, h[i].privNF, limit->max,
|
||||
+ (cal->nfcal_interference ?
|
||||
+ "not corrected (due to interference)" :
|
||||
+ "correcting to MAX"));
|
||||
+
|
||||
+ /*
|
||||
+ * Normally we limit the average noise floor by the
|
||||
+ * hardware specific maximum here. However if we have
|
||||
+ * encountered stuck beacons because of interference,
|
||||
+ * we bypass this limit here in order to better deal
|
||||
+ * with our environment.
|
||||
+ */
|
||||
+ if (!cal->nfcal_interference)
|
||||
+ h[i].privNF = limit->max;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * If the noise floor seems normal for all chains, assume that
|
||||
+ * there is no significant interference in the environment anymore.
|
||||
+ * Re-enable the enforcement of the NF maximum again.
|
||||
+ */
|
||||
+ if (!high_nf_mid)
|
||||
+ cal->nfcal_interference = false;
|
||||
}
|
||||
|
||||
static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah,
|
||||
@@ -339,7 +372,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, s
|
||||
|
||||
h = caldata->nfCalHist;
|
||||
caldata->nfcal_pending = false;
|
||||
- ath9k_hw_update_nfcal_hist_buffer(ah, h, nfarray);
|
||||
+ ath9k_hw_update_nfcal_hist_buffer(ah, caldata, nfarray);
|
||||
caldata->rawNoiseFloor = h[0].privNF;
|
||||
return true;
|
||||
}
|
||||
@@ -374,3 +407,28 @@ s16 ath9k_hw_getchan_noise(struct ath_hw
|
||||
return ah->caldata->rawNoiseFloor;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_getchan_noise);
|
||||
+
|
||||
+void ath9k_hw_bstuck_nfcal(struct ath_hw *ah)
|
||||
+{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
+
|
||||
+ if (unlikely(!caldata))
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
+ * If beacons are stuck, the most likely cause is interference.
|
||||
+ * Triggering a noise floor calibration at this point helps the
|
||||
+ * hardware adapt to a noisy environment much faster.
|
||||
+ * To ensure that we recover from stuck beacons quickly, let
|
||||
+ * the baseband update the internal NF value itself, similar to
|
||||
+ * what is being done after a full reset.
|
||||
+ */
|
||||
+ if (!caldata->nfcal_pending)
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+ else if (!(REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF))
|
||||
+ ath9k_hw_getnf(ah, ah->curchan);
|
||||
+
|
||||
+ caldata->nfcal_interference = true;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath9k_hw_bstuck_nfcal);
|
||||
+
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.h
|
||||
@@ -113,6 +113,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah,
|
||||
bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan);
|
||||
+void ath9k_hw_bstuck_nfcal(struct ath_hw *ah);
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_hw_reset_calibration(struct ath_hw *ah,
|
||||
struct ath9k_cal_list *currCal);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -355,6 +355,7 @@ struct ath9k_hw_cal_data {
|
||||
int16_t rawNoiseFloor;
|
||||
bool paprd_done;
|
||||
bool nfcal_pending;
|
||||
+ bool nfcal_interference;
|
||||
u16 small_signal_gain[AR9300_MAX_CHAINS];
|
||||
u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ];
|
||||
struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
@ -1,35 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -423,6 +423,7 @@ int ath_beaconq_config(struct ath_softc
|
||||
#define ATH_AP_SHORT_CALINTERVAL 100 /* 100 ms */
|
||||
#define ATH_ANI_POLLINTERVAL_OLD 100 /* 100 ms */
|
||||
#define ATH_ANI_POLLINTERVAL_NEW 1000 /* 1000 ms */
|
||||
+#define ATH_LONG_CALINTERVAL_INT 1000 /* 1000 ms */
|
||||
#define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
|
||||
#define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -396,7 +396,12 @@ void ath_ani_calibrate(unsigned long dat
|
||||
bool shortcal = false;
|
||||
bool aniflag = false;
|
||||
unsigned int timestamp = jiffies_to_msecs(jiffies);
|
||||
- u32 cal_interval, short_cal_interval;
|
||||
+ u32 cal_interval, short_cal_interval, long_cal_interval;
|
||||
+
|
||||
+ if (ah->caldata && ah->caldata->nfcal_interference)
|
||||
+ long_cal_interval = ATH_LONG_CALINTERVAL_INT;
|
||||
+ else
|
||||
+ long_cal_interval = ATH_LONG_CALINTERVAL;
|
||||
|
||||
short_cal_interval = (ah->opmode == NL80211_IFTYPE_AP) ?
|
||||
ATH_AP_SHORT_CALINTERVAL : ATH_STA_SHORT_CALINTERVAL;
|
||||
@@ -408,7 +413,7 @@ void ath_ani_calibrate(unsigned long dat
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
/* Long calibration runs independently of short calibration. */
|
||||
- if ((timestamp - common->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) {
|
||||
+ if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
|
||||
longcal = true;
|
||||
ath_print(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
|
||||
common->ani.longcal_timer = timestamp;
|
@ -1,44 +0,0 @@
|
||||
ath9k_rx_skb_preprocess nulls rxs and the mactime is never set again -
|
||||
mactime is always 0. This causes problems in IBSS mode.
|
||||
|
||||
ieee80211_rx_bss_info uses mactime to decide if an IBSS merge is needed.
|
||||
Without this patch the merge is triggered by each beacon received.
|
||||
|
||||
This can be recognized by the "beacon TSF higher than local TSF - IBSS
|
||||
merge with BSSID" log message accompanying each beacon.
|
||||
|
||||
This problem was not completely fixed in commit
|
||||
a6d2055b02dde1067075795274672720baadd3ca and is not a stable kernel fix.
|
||||
It is solely intended for wireless-testing.
|
||||
|
||||
Signed-off-by: Jan Friedrich <jft@dev2day.de>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/recv.c | 10 +++++-----
|
||||
1 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -1140,6 +1140,11 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
||||
if (flush)
|
||||
goto requeue;
|
||||
|
||||
+ retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
|
||||
+ rxs, &decrypt_error);
|
||||
+ if (retval)
|
||||
+ goto requeue;
|
||||
+
|
||||
rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
|
||||
if (rs.rs_tstamp > tsf_lower &&
|
||||
unlikely(rs.rs_tstamp - tsf_lower > 0x10000000))
|
||||
@@ -1149,11 +1154,6 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
||||
unlikely(tsf_lower - rs.rs_tstamp > 0x10000000))
|
||||
rxs->mactime += 0x100000000ULL;
|
||||
|
||||
- retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
|
||||
- rxs, &decrypt_error);
|
||||
- if (retval)
|
||||
- goto requeue;
|
||||
-
|
||||
/* Ensure we always have an skb to requeue once we are done
|
||||
* processing the current buffer's skb */
|
||||
requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC);
|
@ -1,85 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath.h
|
||||
+++ b/drivers/net/wireless/ath/ath.h
|
||||
@@ -119,6 +119,7 @@ struct ath_common {
|
||||
|
||||
u32 keymax;
|
||||
DECLARE_BITMAP(keymap, ATH_KEYMAX);
|
||||
+ DECLARE_BITMAP(tkip_keymap, ATH_KEYMAX);
|
||||
u8 splitmic;
|
||||
|
||||
struct ath_regulatory regulatory;
|
||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||
@@ -366,9 +366,13 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||
set_bit(idx, common->keymap);
|
||||
if (key->alg == ALG_TKIP) {
|
||||
set_bit(idx + 64, common->keymap);
|
||||
+ set_bit(idx, common->tkip_keymap);
|
||||
+ set_bit(idx + 64, common->tkip_keymap);
|
||||
if (common->splitmic) {
|
||||
set_bit(idx + 32, common->keymap);
|
||||
set_bit(idx + 64 + 32, common->keymap);
|
||||
+ set_bit(idx + 32, common->tkip_keymap);
|
||||
+ set_bit(idx + 64 + 32, common->tkip_keymap);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,10 +397,17 @@ void ath9k_cmn_key_delete(struct ath_com
|
||||
return;
|
||||
|
||||
clear_bit(key->hw_key_idx + 64, common->keymap);
|
||||
+
|
||||
+ clear_bit(key->hw_key_idx, common->tkip_keymap);
|
||||
+ clear_bit(key->hw_key_idx + 64, common->tkip_keymap);
|
||||
+
|
||||
if (common->splitmic) {
|
||||
ath9k_hw_keyreset(ah, key->hw_key_idx + 32);
|
||||
clear_bit(key->hw_key_idx + 32, common->keymap);
|
||||
clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
|
||||
+
|
||||
+ clear_bit(key->hw_key_idx + 32, common->tkip_keymap);
|
||||
+ clear_bit(key->hw_key_idx + 64 + 32, common->tkip_keymap);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_cmn_key_delete);
|
||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -870,15 +870,18 @@ static bool ath9k_rx_accept(struct ath_c
|
||||
if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
|
||||
*decrypt_error = true;
|
||||
} else if (rx_stats->rs_status & ATH9K_RXERR_MIC) {
|
||||
- if (ieee80211_is_ctl(fc))
|
||||
- /*
|
||||
- * Sometimes, we get invalid
|
||||
- * MIC failures on valid control frames.
|
||||
- * Remove these mic errors.
|
||||
- */
|
||||
- rx_stats->rs_status &= ~ATH9K_RXERR_MIC;
|
||||
- else
|
||||
+ /*
|
||||
+ * The MIC error bit is only valid if the frame
|
||||
+ * is not a control frame or fragment, and it was
|
||||
+ * decrypted using a valid TKIP key.
|
||||
+ */
|
||||
+ if (!ieee80211_is_ctl(fc) &&
|
||||
+ !ieee80211_has_morefrags(fc) &&
|
||||
+ !(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
|
||||
+ test_bit(rx_stats->rs_keyix, common->tkip_keymap))
|
||||
rxs->flag |= RX_FLAG_MMIC_ERROR;
|
||||
+ else
|
||||
+ rx_stats->rs_status &= ~ATH9K_RXERR_MIC;
|
||||
}
|
||||
/*
|
||||
* Reject error frames with the exception of
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -711,7 +711,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
|
||||
rs->rs_phyerr = phyerr;
|
||||
} else if (ads.ds_rxstatus8 & AR_DecryptCRCErr)
|
||||
rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
- else if (ads.ds_rxstatus8 & AR_MichaelErr)
|
||||
+ else if ((ads.ds_rxstatus8 & AR_MichaelErr) &&
|
||||
+ rs->rs_keyix != ATH9K_RXKEYIX_INVALID)
|
||||
rs->rs_status |= ATH9K_RXERR_MIC;
|
||||
else if (ads.ds_rxstatus8 & AR_KeyMiss)
|
||||
rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
@ -8,7 +8,7 @@
|
||||
/*
|
||||
* PCI driver handlers.
|
||||
*/
|
||||
@@ -382,6 +383,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
@@ -381,6 +382,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
@@ -661,6 +661,10 @@ static void rt2800pci_kill_tx_queue(stru
|
||||
@@ -585,6 +585,10 @@ static void rt2800pci_kill_tx_queue(stru
|
||||
return;
|
||||
}
|
||||
|
||||
@ -25,5 +25,5 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
||||
+ rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
|
||||
+
|
||||
rt2800_register_read(rt2x00dev, WPDMA_RST_IDX, ®);
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, (qid == QID_AC_BE));
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX1, (qid == QID_AC_BK));
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX0, (queue->qid == QID_AC_BE));
|
||||
rt2x00_set_field32(®, WPDMA_RST_IDX_DTX_IDX1, (queue->qid == QID_AC_BK));
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/mwl8k.c
|
||||
+++ b/drivers/net/wireless/mwl8k.c
|
||||
@@ -3884,6 +3884,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||
@@ -3897,6 +3897,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||
|
@ -0,0 +1,50 @@
|
||||
--- a/drivers/net/wireless/b43/b43.h
|
||||
+++ b/drivers/net/wireless/b43/b43.h
|
||||
@@ -704,6 +704,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 */
|
||||
+ int gpiomask; /* GPIO LED mask as a module parameter */
|
||||
|
||||
/* PHY/Radio device. */
|
||||
struct b43_phy phy;
|
||||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -75,6 +75,11 @@ MODULE_FIRMWARE("b43/ucode15.fw");
|
||||
MODULE_FIRMWARE("b43/ucode5.fw");
|
||||
MODULE_FIRMWARE("b43/ucode9.fw");
|
||||
|
||||
+static int modparam_gpiomask = 0x000F;
|
||||
+module_param_named(gpiomask, modparam_gpiomask, int, 0444);
|
||||
+MODULE_PARM_DESC(gpiomask,
|
||||
+ "GPIO mask for LED control (default 0x000F)");
|
||||
+
|
||||
static int modparam_bad_frames_preempt;
|
||||
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
|
||||
MODULE_PARM_DESC(bad_frames_preempt,
|
||||
@@ -2534,10 +2539,10 @@ static int b43_gpio_init(struct b43_wlde
|
||||
& ~B43_MACCTL_GPOUTSMSK);
|
||||
|
||||
b43_write16(dev, B43_MMIO_GPIO_MASK, b43_read16(dev, B43_MMIO_GPIO_MASK)
|
||||
- | 0x000F);
|
||||
+ | modparam_gpiomask);
|
||||
|
||||
mask = 0x0000001F;
|
||||
- set = 0x0000000F;
|
||||
+ set = modparam_gpiomask;
|
||||
if (dev->dev->bus->chip_id == 0x4301) {
|
||||
mask |= 0x0060;
|
||||
set |= 0x0060;
|
||||
@@ -5094,10 +5099,10 @@ static void b43_print_driverinfo(void)
|
||||
feat_sdio = "S";
|
||||
#endif
|
||||
printk(KERN_INFO "Broadcom 43xx driver loaded "
|
||||
- "[ Features: %s%s%s%s%s, Firmware-ID: "
|
||||
+ "[ Features: %s%s%s%s%s, GPIO LED Mask: 0x%04x, Firmware-ID: "
|
||||
B43_SUPPORTED_FIRMWARE_ID " ]\n",
|
||||
feat_pci, feat_pcmcia, feat_nphy,
|
||||
- feat_leds, feat_sdio);
|
||||
+ feat_leds, feat_sdio, modparam_gpiomask);
|
||||
}
|
||||
|
||||
static int __init b43_init(void)
|
70
package/mac80211/patches/810-b43_no_pio.patch
Normal file
70
package/mac80211/patches/810-b43_no_pio.patch
Normal file
@ -0,0 +1,70 @@
|
||||
--- a/drivers/net/wireless/b43/Makefile
|
||||
+++ b/drivers/net/wireless/b43/Makefile
|
||||
@@ -12,7 +12,7 @@ b43-y += xmit.o
|
||||
b43-y += lo.o
|
||||
b43-y += wa.o
|
||||
b43-y += dma.o
|
||||
-b43-y += pio.o
|
||||
+# b43-y += pio.o
|
||||
b43-y += rfkill.o
|
||||
b43-$(CONFIG_B43_LEDS) += leds.o
|
||||
b43-$(CONFIG_B43_PCMCIA) += pcmcia.o
|
||||
--- a/drivers/net/wireless/b43/main.c
|
||||
+++ b/drivers/net/wireless/b43/main.c
|
||||
@@ -1810,9 +1810,11 @@ static void b43_do_interrupt_thread(stru
|
||||
dma_reason[4], dma_reason[5]);
|
||||
b43err(dev->wl, "This device does not support DMA "
|
||||
"on your system. It will now be switched to PIO.\n");
|
||||
+#if 0
|
||||
/* Fall back to PIO transfers if we get fatal DMA errors! */
|
||||
dev->use_pio = 1;
|
||||
b43_controller_restart(dev, "DMA error");
|
||||
+#endif
|
||||
return;
|
||||
}
|
||||
if (merged_dma_reason & B43_DMAIRQ_NONFATALMASK) {
|
||||
--- a/drivers/net/wireless/b43/pio.h
|
||||
+++ b/drivers/net/wireless/b43/pio.h
|
||||
@@ -151,15 +151,34 @@ static inline void b43_piorx_write32(str
|
||||
}
|
||||
|
||||
|
||||
-int b43_pio_init(struct b43_wldev *dev);
|
||||
-void b43_pio_free(struct b43_wldev *dev);
|
||||
+static inline int b43_pio_init(struct b43_wldev *dev)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static inline void b43_pio_free(struct b43_wldev *dev)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static inline int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
|
||||
+{
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
-int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb);
|
||||
-void b43_pio_handle_txstatus(struct b43_wldev *dev,
|
||||
- const struct b43_txstatus *status);
|
||||
-void b43_pio_rx(struct b43_pio_rxqueue *q);
|
||||
+static inline void b43_pio_handle_txstatus(struct b43_wldev *dev,
|
||||
+ const struct b43_txstatus *status)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+static inline void b43_pio_rx(struct b43_pio_rxqueue *q)
|
||||
+{
|
||||
+}
|
||||
|
||||
-void b43_pio_tx_suspend(struct b43_wldev *dev);
|
||||
-void b43_pio_tx_resume(struct b43_wldev *dev);
|
||||
+static inline void b43_pio_tx_suspend(struct b43_wldev *dev)
|
||||
+{
|
||||
+}
|
||||
+static inline void b43_pio_tx_resume(struct b43_wldev *dev)
|
||||
+{
|
||||
+}
|
||||
|
||||
#endif /* B43_PIO_H_ */
|
Loading…
Reference in New Issue
Block a user