diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-08-31 23:34:21 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-08-31 23:34:21 +0000 |
commit | 2cedae1d3dade3c015557fa9d45e1bea1c758b9d (patch) | |
tree | f703d25b1cacd5642f4db8864f8dbf8e9c870fbe | |
parent | 0e41d925ccc939b84db0e17065bf28445cf3c21d (diff) |
mac80211: update to wireless-testing 2010-08-31
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22865 3c298f89-4303-0410-b956-a3cf2f4a3e73
37 files changed, 162 insertions, 1744 deletions
diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile index 4cc0dab28..4c167341f 100644 --- a/package/mac80211/Makefile +++ b/package/mac80211/Makefile @@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=2010-07-29 +PKG_VERSION:=2010-08-31 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:=5d720b6d8de97ae61a4c3e4ee10a6de1 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION) diff --git a/package/mac80211/patches/000-compile_fix.patch b/package/mac80211/patches/000-compile_fix.patch new file mode 100644 index 000000000..97ad8d948 --- /dev/null +++ b/package/mac80211/patches/000-compile_fix.patch @@ -0,0 +1,11 @@ +--- a/config.mk ++++ b/config.mk +@@ -502,7 +502,7 @@ CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS + # CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set + CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y + CONFIG_ATH6K_LEGACY=m +-endif ++endif #CONFIG_COMPAT_KERNEL_32 + endif + + diff --git a/package/mac80211/patches/001-disable_b44.patch b/package/mac80211/patches/001-disable_b44.patch index 31976bd64..ad9c1ee43 100644 --- a/package/mac80211/patches/001-disable_b44.patch +++ b/package/mac80211/patches/001-disable_b44.patch @@ -1,6 +1,6 @@ --- a/config.mk +++ b/config.mk -@@ -268,8 +268,8 @@ endif +@@ -292,8 +292,8 @@ endif CONFIG_P54_PCI=m diff --git a/package/mac80211/patches/002-disable_rfkill.patch b/package/mac80211/patches/002-disable_rfkill.patch index c5d1ccc50..20257972b 100644 --- a/package/mac80211/patches/002-disable_rfkill.patch +++ b/package/mac80211/patches/002-disable_rfkill.patch @@ -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 +@@ -557,8 +557,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 diff --git a/package/mac80211/patches/003-disable_bt.patch b/package/mac80211/patches/003-disable_bt.patch index e1e7443ab..59d2197e9 100644 --- a/package/mac80211/patches/003-disable_bt.patch +++ b/package/mac80211/patches/003-disable_bt.patch @@ -9,5 +9,5 @@ +# CONFIG_COMPAT_BLUETOOTH=y +# CONFIG_COMPAT_BLUETOOTH_MODULES=m endif - endif # Kernel >= 2.6.26 + endif #CONFIG_COMPAT_KERNEL_27 diff --git a/package/mac80211/patches/005-disable_ssb_build.patch b/package/mac80211/patches/005-disable_ssb_build.patch index 7207d7b84..e62d48f95 100644 --- a/package/mac80211/patches/005-disable_ssb_build.patch +++ b/package/mac80211/patches/005-disable_ssb_build.patch @@ -19,7 +19,7 @@ else include $(KLIB_BUILD)/.config endif -@@ -251,21 +250,6 @@ CONFIG_IPW2200_QOS=y +@@ -275,21 +274,6 @@ CONFIG_IPW2200_QOS=y # # % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface @@ -41,11 +41,11 @@ CONFIG_P54_PCI=m # CONFIG_B44=m -@@ -429,7 +413,6 @@ endif # end of SPI driver list +@@ -463,7 +447,6 @@ endif # end of SPI driver list ifneq ($(CONFIG_MMC),) -CONFIG_SSB_SDIOHOST=y CONFIG_B43_SDIO=y - CONFIG_WL1251_SDIO=m + ifneq ($(CONFIG_CRC7),) diff --git a/package/mac80211/patches/007-remove_misc_drivers.patch b/package/mac80211/patches/007-remove_misc_drivers.patch index 1fb835333..89757b064 100644 --- a/package/mac80211/patches/007-remove_misc_drivers.patch +++ b/package/mac80211/patches/007-remove_misc_drivers.patch @@ -1,6 +1,15 @@ --- a/config.mk +++ b/config.mk -@@ -282,13 +282,13 @@ endif +@@ -196,7 +196,7 @@ ifneq ($(CONFIG_WIRELESS_EXT),) + endif + + ifneq ($(CONFIG_STAGING),) +-CONFIG_COMPAT_STAGING=m ++# CONFIG_COMPAT_STAGING=m + endif + + # mac80211 test driver +@@ -306,13 +306,13 @@ endif CONFIG_MWL8K=m # Ethernet drivers go here @@ -13,24 +22,58 @@ 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 +@@ -361,17 +361,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 +@@ -474,17 +474,17 @@ CONFIG_BT_MRVL_SDIO=m + + ifneq ($(CONFIG_COMPAT_STAGING),) + ifdef CONFIG_COMPAT_KERNEL_32 +-CONFIG_ATH6KL_CFG80211=y +-CONFIG_ATH6KL_DEBUG=y ++# CONFIG_ATH6KL_CFG80211=y ++# CONFIG_ATH6KL_DEBUG=y + # CONFIG_ATH6KL_DISABLE_TARGET_DBGLOGS is not set + # CONFIG_ATH6KL_ENABLE_COEXISTENCE is not set + # CONFIG_ATH6KL_ENABLE_HOST_DEBUG is not set +-CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y ++# CONFIG_ATH6KL_ENABLE_TARGET_DEBUG_PRINTS=y + # CONFIG_ATH6KL_HCI_BRIDGE is not set + # CONFIG_ATH6KL_HTC_RAW_INTERFACE is not set + # CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK is not set +-CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y +-CONFIG_ATH6K_LEGACY=m ++# CONFIG_ATH6KL_VIRTUAL_SCATTER_GATHER=y ++# CONFIG_ATH6K_LEGACY=m + endif #CONFIG_COMPAT_KERNEL_32 + endif + diff --git a/package/mac80211/patches/010-no_pcmcia.patch b/package/mac80211/patches/010-no_pcmcia.patch index 0c8072a3e..25d14c178 100644 --- a/package/mac80211/patches/010-no_pcmcia.patch +++ b/package/mac80211/patches/010-no_pcmcia.patch @@ -9,7 +9,7 @@ else include $(KLIB_BUILD)/.config endif -@@ -192,7 +192,7 @@ CONFIG_B43=m +@@ -216,7 +216,7 @@ CONFIG_B43=m CONFIG_B43_HWRNG=y CONFIG_B43_PCI_AUTOSELECT=y ifneq ($(CONFIG_PCMCIA),) diff --git a/package/mac80211/patches/011-no_sdio.patch b/package/mac80211/patches/011-no_sdio.patch index 3f7fd5a2c..cd39dd4c6 100644 --- a/package/mac80211/patches/011-no_sdio.patch +++ b/package/mac80211/patches/011-no_sdio.patch @@ -1,11 +1,11 @@ --- a/config.mk +++ b/config.mk -@@ -398,7 +398,7 @@ endif # end of SPI driver list +@@ -432,7 +432,7 @@ endif # end of SPI driver list ifneq ($(CONFIG_MMC),) -CONFIG_B43_SDIO=y +# CONFIG_B43_SDIO=y - CONFIG_WL1251_SDIO=m - ifndef CONFIG_COMPAT_KERNEL_32 + ifneq ($(CONFIG_CRC7),) + CONFIG_WL1251_SDIO=m diff --git a/package/mac80211/patches/013-disable_b43_nphy.patch b/package/mac80211/patches/013-disable_b43_nphy.patch index f71d3b288..80c0fa915 100644 --- a/package/mac80211/patches/013-disable_b43_nphy.patch +++ b/package/mac80211/patches/013-disable_b43_nphy.patch @@ -1,6 +1,6 @@ --- a/config.mk +++ b/config.mk -@@ -196,7 +196,7 @@ ifneq ($(CONFIG_PCMCIA),) +@@ -220,7 +220,7 @@ ifneq ($(CONFIG_PCMCIA),) endif CONFIG_B43_LEDS=y CONFIG_B43_PHY_LP=y diff --git a/package/mac80211/patches/015-remove-rt2x00-options.patch b/package/mac80211/patches/015-remove-rt2x00-options.patch index 694694870..9cc04d0ad 100644 --- a/package/mac80211/patches/015-remove-rt2x00-options.patch +++ b/package/mac80211/patches/015-remove-rt2x00-options.patch @@ -1,6 +1,6 @@ --- a/config.mk +++ b/config.mk -@@ -244,12 +244,12 @@ CONFIG_RTL8180=m +@@ -268,12 +268,12 @@ CONFIG_RTL8180=m CONFIG_ADM8211=m @@ -15,7 +15,7 @@ # CONFIG_RT2800PCI_RT30XX=y # CONFIG_RT2800PCI_RT35XX=y # CONFIG_RT2800PCI_SOC=y -@@ -355,7 +355,7 @@ CONFIG_RT2800USB_RT30XX=y +@@ -382,7 +382,7 @@ CONFIG_RT2800USB_RT30XX=y CONFIG_RT2800USB_RT35XX=y CONFIG_RT2800USB_UNKNOWN=y endif diff --git a/package/mac80211/patches/030-backport_93c86_eeprom.patch b/package/mac80211/patches/030-backport_93c86_eeprom.patch index d76f39ed9..b2a855d45 100644 --- a/package/mac80211/patches/030-backport_93c86_eeprom.patch +++ b/package/mac80211/patches/030-backport_93c86_eeprom.patch @@ -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 + diff --git a/package/mac80211/patches/100-disable_pcmcia_compat.patch b/package/mac80211/patches/100-disable_pcmcia_compat.patch index ebfe5ce65..affdc3864 100644 --- a/package/mac80211/patches/100-disable_pcmcia_compat.patch +++ b/package/mac80211/patches/100-disable_pcmcia_compat.patch @@ -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 */ diff --git a/package/mac80211/patches/110-disable_usb_compat.patch b/package/mac80211/patches/110-disable_usb_compat.patch index c60705a53..76f3fb24b 100644 --- a/package/mac80211/patches/110-disable_usb_compat.patch +++ b/package/mac80211/patches/110-disable_usb_compat.patch @@ -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)) diff --git a/package/mac80211/patches/120-pm_qos_params.patch b/package/mac80211/patches/120-pm_qos_params.patch deleted file mode 100644 index ca4b7bfe3..000000000 --- a/package/mac80211/patches/120-pm_qos_params.patch +++ /dev/null @@ -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); diff --git a/package/mac80211/patches/130-printk_debug_revert.patch b/package/mac80211/patches/130-printk_debug_revert.patch index 232902e8c..5483573b2 100644 --- a/package/mac80211/patches/130-printk_debug_revert.patch +++ b/package/mac80211/patches/130-printk_debug_revert.patch @@ -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) +@@ -929,52 +929,3 @@ static void __exit cfg80211_exit(void) destroy_workqueue(cfg80211_wq); } module_exit(cfg80211_exit); diff --git a/package/mac80211/patches/404-ath_regd_optional.patch b/package/mac80211/patches/404-ath_regd_optional.patch index 927aeb4b6..cf4929e16 100644 --- a/package/mac80211/patches/404-ath_regd_optional.patch +++ b/package/mac80211/patches/404-ath_regd_optional.patch @@ -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 diff --git a/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch b/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch index f987e8a54..cf3f402c7 100644 --- a/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch +++ b/package/mac80211/patches/408-ath9k_tweak_rx_intr_mitigation.patch @@ -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 +@@ -1425,7 +1425,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); diff --git a/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch b/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch index 6d275f81e..bc336fabd 100644 --- a/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch +++ b/package/mac80211/patches/409-ath9k-add-wndr3700-antenna-initialization.patch @@ -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 { +@@ -589,6 +589,8 @@ struct ath_softc { int beacon_interval; diff --git a/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch b/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch index d6d2634c1..d69fd8f76 100644 --- a/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch +++ b/package/mac80211/patches/410-ath9k-wndr3700-led-pin-fix.patch @@ -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 diff --git a/package/mac80211/patches/450-add-ath5k-platform.patch b/package/mac80211/patches/450-add-ath5k-platform.patch index 77717b993..b213e2a81 100644 --- a/package/mac80211/patches/450-add-ath5k-platform.patch +++ b/package/mac80211/patches/450-add-ath5k-platform.patch @@ -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 */ - diff --git a/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch b/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch index 717acd234..a03b59944 100644 --- a/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch +++ b/package/mac80211/patches/451-add-platform-eeprom-support-to-ath5k.patch @@ -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) - diff --git a/package/mac80211/patches/510-ath9k_handle_keymiss.patch b/package/mac80211/patches/510-ath9k_handle_keymiss.patch index f4ff69b16..c63ad3fcf 100644 --- a/package/mac80211/patches/510-ath9k_handle_keymiss.patch +++ b/package/mac80211/patches/510-ath9k_handle_keymiss.patch @@ -1,8 +1,8 @@ --- 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) +@@ -714,6 +714,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a + 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; diff --git a/package/mac80211/patches/560-ath9k_baw_fix.patch b/package/mac80211/patches/520-ath9k_baw_fix.patch index 50e4b99e4..50e4b99e4 100644 --- a/package/mac80211/patches/560-ath9k_baw_fix.patch +++ b/package/mac80211/patches/520-ath9k_baw_fix.patch diff --git a/package/mac80211/patches/520-pending_work.patch b/package/mac80211/patches/520-pending_work.patch deleted file mode 100644 index bcbbaf66b..000000000 --- a/package/mac80211/patches/520-pending_work.patch +++ /dev/null @@ -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", diff --git a/package/mac80211/patches/580-ath9k_aggr_start_fix.patch b/package/mac80211/patches/530-ath9k_aggr_start_fix.patch index 1dcac53e4..1dcac53e4 100644 --- a/package/mac80211/patches/580-ath9k_aggr_start_fix.patch +++ b/package/mac80211/patches/530-ath9k_aggr_start_fix.patch diff --git a/package/mac80211/patches/530-ath9k_aggr_state_fix.patch b/package/mac80211/patches/530-ath9k_aggr_state_fix.patch deleted file mode 100644 index d3a784948..000000000 --- a/package/mac80211/patches/530-ath9k_aggr_state_fix.patch +++ /dev/null @@ -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)) { diff --git a/package/mac80211/patches/540-ath9k_bstuck_debug.patch b/package/mac80211/patches/540-ath9k_bstuck_debug.patch deleted file mode 100644 index b2d44c5bb..000000000 --- a/package/mac80211/patches/540-ath9k_bstuck_debug.patch +++ /dev/null @@ -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; diff --git a/package/mac80211/patches/541-ath9k_nf_validate.patch b/package/mac80211/patches/541-ath9k_nf_validate.patch deleted file mode 100644 index 7e3cb350f..000000000 --- a/package/mac80211/patches/541-ath9k_nf_validate.patch +++ /dev/null @@ -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; - } diff --git a/package/mac80211/patches/542-ath9k_bstuck_nf_calibrate.patch b/package/mac80211/patches/542-ath9k_bstuck_nf_calibrate.patch deleted file mode 100644 index 4ac4ab210..000000000 --- a/package/mac80211/patches/542-ath9k_bstuck_nf_calibrate.patch +++ /dev/null @@ -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]; diff --git a/package/mac80211/patches/543-ath9k_interference_nf_cal.patch b/package/mac80211/patches/543-ath9k_interference_nf_cal.patch deleted file mode 100644 index 74bee3e14..000000000 --- a/package/mac80211/patches/543-ath9k_interference_nf_cal.patch +++ /dev/null @@ -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; diff --git a/package/mac80211/patches/550-ath9k_tsf_fix.patch b/package/mac80211/patches/550-ath9k_tsf_fix.patch deleted file mode 100644 index 8a99ed7a2..000000000 --- a/package/mac80211/patches/550-ath9k_tsf_fix.patch +++ /dev/null @@ -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); diff --git a/package/mac80211/patches/570-ath9k_mic_failure_fix.patch b/package/mac80211/patches/570-ath9k_mic_failure_fix.patch deleted file mode 100644 index fbd188d6f..000000000 --- a/package/mac80211/patches/570-ath9k_mic_failure_fix.patch +++ /dev/null @@ -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; diff --git a/package/mac80211/patches/600-rt2x00-disable-pci-code-if-CONFIG_PCI-not-defined.patch b/package/mac80211/patches/600-rt2x00-disable-pci-code-if-CONFIG_PCI-not-defined.patch index 3364b8bcc..28009bce0 100644 --- a/package/mac80211/patches/600-rt2x00-disable-pci-code-if-CONFIG_PCI-not-defined.patch +++ b/package/mac80211/patches/600-rt2x00-disable-pci-code-if-CONFIG_PCI-not-defined.patch @@ -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 */ diff --git a/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch b/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch index b90539e5e..c0e918e8f 100644 --- a/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch +++ b/package/mac80211/patches/700-mwl8k-missing-pci-id-for-WNR854T.patch @@ -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) = { diff --git a/package/mac80211/patches/800-nuke_led_code.patch b/package/mac80211/patches/800-nuke_led_code.patch index f4eb30123..76d8d5a5b 100644 --- a/package/mac80211/patches/800-nuke_led_code.patch +++ b/package/mac80211/patches/800-nuke_led_code.patch @@ -16,8 +16,8 @@ net/mac80211/util.c | 6 ++++++ 15 files changed, 69 insertions(+), 7 deletions(-) ---- compat-wireless-2010-07-29.orig/config.mk -+++ compat-wireless-2010-07-29/config.mk +--- a/config.mk ++++ b/config.mk @@ -115,7 +115,7 @@ CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstr # CONFIG_MAC80211_RC_PID=y CONFIG_MAC80211_RC_MINSTREL=y @@ -27,7 +27,7 @@ # enable mesh networking too CONFIG_MAC80211_MESH=y -@@ -194,7 +194,7 @@ CONFIG_B43_PCI_AUTOSELECT=y +@@ -218,7 +218,7 @@ CONFIG_B43_PCI_AUTOSELECT=y ifneq ($(CONFIG_PCMCIA),) # CONFIG_B43_PCMCIA=y endif @@ -36,7 +36,7 @@ CONFIG_B43_PHY_LP=y # CONFIG_B43_NPHY is not set # CONFIG_B43_FORCE_PIO=y -@@ -203,7 +203,7 @@ CONFIG_B43_PHY_LP=y +@@ -227,7 +227,7 @@ CONFIG_B43_PHY_LP=y CONFIG_B43LEGACY=m CONFIG_B43LEGACY_HWRNG=y CONFIG_B43LEGACY_PCI_AUTOSELECT=y @@ -45,32 +45,7 @@ # CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y -@@ -336,13 +336,13 @@ endif - - CONFIG_P54_USB=m - CONFIG_RTL8187=m --CONFIG_RTL8187_LEDS=y -+# CONFIG_RTL8187_LEDS=y - - CONFIG_AT76C50X_USB=m - - ifndef CONFIG_COMPAT_KERNEL_28 - CONFIG_AR9170_USB=m --CONFIG_AR9170_LEDS=y -+# CONFIG_AR9170_LEDS=y - endif - - CONFIG_ATH9K_HTC=m -@@ -426,7 +426,7 @@ CONFIG_RT2800_LIB=m - CONFIG_RT2X00_LIB_HT=y - CONFIG_RT2X00_LIB_FIRMWARE=y - CONFIG_RT2X00_LIB_CRYPTO=y --CONFIG_RT2X00_LIB_LEDS=y -+# CONFIG_RT2X00_LIB_LEDS=y - # CONFIG_RT2X00_DEBUG=y - # CONFIG_RT2X00_LIB_DEBUGFS - endif -@@ -437,7 +437,7 @@ endif +@@ -499,7 +499,7 @@ endif # p54 CONFIG_P54_COMMON=m @@ -79,9 +54,9 @@ # Atheros CONFIG_ATH_COMMON=m ---- compat-wireless-2010-07-29.orig/include/linux/compat-2.6.25.h -+++ compat-wireless-2010-07-29/include/linux/compat-2.6.25.h -@@ -146,10 +146,12 @@ static inline void __hwrng_unregister(st +--- a/include/linux/compat-2.6.25.h ++++ b/include/linux/compat-2.6.25.h +@@ -148,10 +148,12 @@ static inline void __hwrng_unregister(st hwrng_unregister(rng); } @@ -94,8 +69,8 @@ /** * The following things are out of ./include/linux/kernel.h ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/gpio.c -+++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/gpio.c +--- a/drivers/net/wireless/ath/ath9k/gpio.c ++++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -20,6 +20,7 @@ /* LED functions */ /********************************/ @@ -112,8 +87,8 @@ /*******************/ /* Rfkill */ ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/pci.c -+++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/pci.c +--- a/drivers/net/wireless/ath/ath9k/pci.c ++++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -273,7 +273,9 @@ static int ath_pci_suspend(struct pci_de struct ath_wiphy *aphy = hw->priv; struct ath_softc *sc = aphy->sc; @@ -137,9 +112,9 @@ return 0; } ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/ath9k.h -+++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/ath9k.h -@@ -465,6 +465,7 @@ void ath9k_btcoex_timer_pause(struct ath +--- a/drivers/net/wireless/ath/ath9k/ath9k.h ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h +@@ -457,6 +457,7 @@ void ath9k_btcoex_timer_pause(struct ath /********************/ /* LED Control */ /********************/ @@ -147,7 +122,7 @@ #define ATH_LED_PIN_DEF 1 #define ATH_LED_PIN_9287 8 -@@ -489,6 +490,7 @@ struct ath_led { +@@ -481,6 +482,7 @@ struct ath_led { void ath_init_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc); @@ -155,7 +130,7 @@ /********************/ /* Main driver core */ -@@ -586,6 +588,7 @@ struct ath_softc { +@@ -578,6 +580,7 @@ struct ath_softc { enum wireless_mode cur_rate_mode; struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; @@ -163,7 +138,7 @@ struct ath_led radio_led; struct ath_led assoc_led; struct ath_led tx_led; -@@ -595,6 +598,7 @@ struct ath_softc { +@@ -587,6 +590,7 @@ struct ath_softc { int led_off_duration; int led_on_cnt; int led_off_cnt; @@ -171,21 +146,9 @@ int beacon_interval; ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/init.c -+++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/init.c -@@ -34,9 +34,11 @@ int modparam_nohwcrypt; - module_param_named(nohwcrypt, modparam_nohwcrypt, int, 0444); - MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption"); - -+#ifdef CONFIG_MAC80211_LEDS - int led_blink = 1; - module_param_named(blink, led_blink, int, 0444); - MODULE_PARM_DESC(blink, "Enable LED blink on activity"); -+#endif - - /* We use the hw_value as an index into our private channel structure */ - -@@ -757,7 +759,9 @@ int ath9k_init_device(u16 devid, struct +--- a/drivers/net/wireless/ath/ath9k/init.c ++++ b/drivers/net/wireless/ath/ath9k/init.c +@@ -757,7 +757,9 @@ int ath9k_init_device(u16 devid, struct INIT_DELAYED_WORK(&sc->wiphy_work, ath9k_wiphy_work); sc->wiphy_scheduler_int = msecs_to_jiffies(500); @@ -195,7 +158,7 @@ ath_start_rfkill_poll(sc); return 0; -@@ -810,7 +814,9 @@ void ath9k_deinit_device(struct ath_soft +@@ -810,7 +812,9 @@ void ath9k_deinit_device(struct ath_soft ath9k_ps_wakeup(sc); wiphy_rfkill_stop_polling(sc->hw->wiphy); @@ -205,9 +168,9 @@ for (i = 0; i < sc->num_sec_wiphy; i++) { struct ath_wiphy *aphy = sc->sec_wiphy[i]; ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/ath/ath9k/main.c -+++ compat-wireless-2010-07-29/drivers/net/wireless/ath/ath9k/main.c -@@ -868,9 +868,11 @@ void ath_radio_enable(struct ath_softc * +--- a/drivers/net/wireless/ath/ath9k/main.c ++++ b/drivers/net/wireless/ath/ath9k/main.c +@@ -869,9 +869,11 @@ void ath_radio_enable(struct ath_softc * ath9k_hw_set_interrupts(ah, ah->imask); /* Enable LED */ @@ -219,7 +182,7 @@ ieee80211_wake_queues(hw); ath9k_ps_restore(sc); -@@ -889,10 +891,12 @@ void ath_radio_disable(struct ath_softc +@@ -890,10 +892,12 @@ void ath_radio_disable(struct ath_softc * Keep the LED on when the radio is disabled * during idle unassociated state. */ @@ -232,7 +195,7 @@ /* Disable interrupts */ ath9k_hw_set_interrupts(ah, 0); -@@ -1303,8 +1307,10 @@ static void ath9k_stop(struct ieee80211_ +@@ -1304,8 +1308,10 @@ static void ath9k_stop(struct ieee80211_ aphy->state = ATH_WIPHY_INACTIVE; @@ -243,8 +206,8 @@ cancel_delayed_work_sync(&sc->tx_complete_work); cancel_work_sync(&sc->paprd_work); ---- compat-wireless-2010-07-29.orig/net/mac80211/iface.c -+++ compat-wireless-2010-07-29/net/mac80211/iface.c +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c @@ -21,7 +21,9 @@ #include "sta_info.h" #include "debugfs_netdev.h" @@ -255,8 +218,8 @@ #include "driver-ops.h" #include "wme.h" -@@ -189,7 +191,9 @@ static int ieee80211_open(struct net_dev - goto err_del_bss; +@@ -201,7 +203,9 @@ static int ieee80211_do_open(struct net_ + napi_enable(&local->napi); /* we're brought up, everything changes */ hw_reconf_flags = ~0; +#ifdef CONFIG_MAC80211_LEDS @@ -265,8 +228,8 @@ } /* ---- compat-wireless-2010-07-29.orig/net/mac80211/main.c -+++ compat-wireless-2010-07-29/net/mac80211/main.c +--- a/net/mac80211/main.c ++++ b/net/mac80211/main.c @@ -29,7 +29,9 @@ #include "rate.h" #include "mesh.h" @@ -277,7 +240,7 @@ #include "cfg.h" #include "debugfs.h" -@@ -674,7 +676,9 @@ int ieee80211_register_hw(struct ieee802 +@@ -778,7 +780,9 @@ int ieee80211_register_hw(struct ieee802 rtnl_unlock(); @@ -287,9 +250,9 @@ local->network_latency_notifier.notifier_call = ieee80211_max_network_latency; -@@ -699,7 +703,9 @@ int ieee80211_register_hw(struct ieee802 - &local->network_latency_notifier); +@@ -808,7 +812,9 @@ int ieee80211_register_hw(struct ieee802 rtnl_lock(); + #endif fail_pm_qos: +#ifdef CONFIG_MAC80211_LEDS ieee80211_led_exit(local); @@ -297,7 +260,7 @@ ieee80211_remove_interfaces(local); fail_rate: rtnl_unlock(); -@@ -755,7 +761,9 @@ void ieee80211_unregister_hw(struct ieee +@@ -872,7 +878,9 @@ void ieee80211_unregister_hw(struct ieee destroy_workqueue(local->workqueue); wiphy_unregister(local->hw.wiphy); ieee80211_wep_free(local); @@ -307,8 +270,8 @@ kfree(local->int_scan_req); } EXPORT_SYMBOL(ieee80211_unregister_hw); ---- compat-wireless-2010-07-29.orig/net/mac80211/mlme.c -+++ compat-wireless-2010-07-29/net/mac80211/mlme.c +--- a/net/mac80211/mlme.c ++++ b/net/mac80211/mlme.c @@ -26,7 +26,9 @@ #include "ieee80211_i.h" #include "driver-ops.h" @@ -319,7 +282,7 @@ #define IEEE80211_MAX_PROBE_TRIES 5 -@@ -872,7 +874,9 @@ static void ieee80211_set_associated(str +@@ -879,7 +881,9 @@ static void ieee80211_set_associated(str */ sdata->u.mgd.wmm_last_param_set = -1; @@ -329,7 +292,7 @@ if (local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD) bss_conf->dtim_period = bss->dtim_period; -@@ -958,7 +962,9 @@ static void ieee80211_set_disassoc(struc +@@ -965,7 +969,9 @@ static void ieee80211_set_disassoc(struc changed |= ieee80211_reset_erp_info(sdata); @@ -339,8 +302,8 @@ changed |= BSS_CHANGED_ASSOC; sdata->vif.bss_conf.assoc = false; ---- compat-wireless-2010-07-29.orig/net/mac80211/pm.c -+++ compat-wireless-2010-07-29/net/mac80211/pm.c +--- a/net/mac80211/pm.c ++++ b/net/mac80211/pm.c @@ -4,7 +4,9 @@ #include "ieee80211_i.h" #include "mesh.h" @@ -351,8 +314,8 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) { ---- compat-wireless-2010-07-29.orig/net/mac80211/rx.c -+++ compat-wireless-2010-07-29/net/mac80211/rx.c +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c @@ -21,7 +21,9 @@ #include "ieee80211_i.h" @@ -363,7 +326,7 @@ #include "mesh.h" #include "wep.h" #include "wpa.h" -@@ -1342,8 +1344,10 @@ ieee80211_rx_h_defragment(struct ieee802 +@@ -1377,8 +1379,10 @@ ieee80211_rx_h_defragment(struct ieee802 rx->sta->rx_packets++; if (is_multicast_ether_addr(hdr->addr1)) rx->local->dot11MulticastReceivedFrameCount++; @@ -374,8 +337,8 @@ return RX_CONTINUE; } ---- compat-wireless-2010-07-29.orig/net/mac80211/status.c -+++ compat-wireless-2010-07-29/net/mac80211/status.c +--- a/net/mac80211/status.c ++++ b/net/mac80211/status.c @@ -13,7 +13,9 @@ #include "ieee80211_i.h" #include "rate.h" @@ -386,7 +349,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, -@@ -247,7 +249,9 @@ void ieee80211_tx_status(struct ieee8021 +@@ -246,7 +248,9 @@ void ieee80211_tx_status(struct ieee8021 rcu_read_unlock(); @@ -396,8 +359,8 @@ /* SNMP counters * Fragments are passed to low-level drivers as separate skbs, so these ---- compat-wireless-2010-07-29.orig/net/mac80211/tx.c -+++ compat-wireless-2010-07-29/net/mac80211/tx.c +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c @@ -26,7 +26,9 @@ #include "ieee80211_i.h" @@ -408,7 +371,7 @@ #include "mesh.h" #include "wep.h" #include "wpa.h" -@@ -1312,7 +1314,9 @@ static int __ieee80211_tx(struct ieee802 +@@ -1334,7 +1336,9 @@ static int __ieee80211_tx(struct ieee802 } *skbp = skb = next; @@ -418,8 +381,8 @@ fragm = true; } ---- compat-wireless-2010-07-29.orig/net/mac80211/util.c -+++ compat-wireless-2010-07-29/net/mac80211/util.c +--- a/net/mac80211/util.c ++++ b/net/mac80211/util.c @@ -29,7 +29,9 @@ #include "rate.h" #include "mesh.h" @@ -430,7 +393,7 @@ #include "wep.h" /* privid for wiphys to determine whether they belong to us or not */ -@@ -1107,7 +1109,9 @@ u32 ieee80211_sta_get_rates(struct ieee8 +@@ -1110,7 +1112,9 @@ u32 ieee80211_sta_get_rates(struct ieee8 void ieee80211_stop_device(struct ieee80211_local *local) { @@ -440,7 +403,7 @@ cancel_work_sync(&local->reconfig_filter); -@@ -1141,7 +1145,9 @@ int ieee80211_reconfig(struct ieee80211_ +@@ -1144,7 +1148,9 @@ int ieee80211_reconfig(struct ieee80211_ return res; } diff --git a/package/mac80211/patches/810-p54-fix-ps.patch b/package/mac80211/patches/810-p54-fix-ps.patch deleted file mode 100644 index 60ca12034..000000000 --- a/package/mac80211/patches/810-p54-fix-ps.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Christian Lamparter <chunkeey@googlemail.com>
-
-Michael reported that p54* never really entered power
-save mode, even tough it was enabled.
-
-It turned out that upon a power save mode change the
-firmware will set a special flag onto the last outgoing
-frame tx status (which in this case is almost always the
-designated PSM nullfunc frame). This flag confused the
-driver; It erroneously reported transmission failures
-to the stack, which then generated the next nullfunc.
-and so on...
-
-Cc: <stable@kernel.org>
-Reported-by: Michael Buesch <mb@bu3sch.de>
-Tested-by: Michael Buesch <mb@bu3sch.de>
-Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
----
---- - drivers/net/wireless/p54/txrx.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- compat-wireless-2010-07-29.orig/drivers/net/wireless/p54/txrx.c -+++ compat-wireless-2010-07-29/drivers/net/wireless/p54/txrx.c -@@ -446,7 +446,7 @@ static void p54_rx_frame_sent(struct p54 - } - - if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && -- (!payload->status)) -+ !(payload->status & P54_TX_FAILED)) - info->flags |= IEEE80211_TX_STAT_ACK; - if (payload->status & P54_TX_PSM_CANCELLED) - info->flags |= IEEE80211_TX_STAT_TX_FILTERED; |