From 506e9396e9bf6c735d4bd533fb39a616a61fa339 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 24 Dec 2010 12:11:53 +0000 Subject: [PATCH] mac80211: merge changes from trunk and add back the !LINUX_2_4 dependency SVN-Revision: 24820 --- package/mac80211/Makefile | 15 +++---- package/mac80211/files/lib/wifi/mac80211.sh | 2 + .../patches/019-remove_ath5k_pci_option.patch | 11 +++++ .../303-tpt_led_trigger_declaration_fix.patch | 35 +++++++++++++++ .../patches/310-ath9k_pending_work.patch | 44 ++++++++++++++++++- .../550-ath9k_intr_mitigation_tweak.patch | 13 ++++++ 6 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 package/mac80211/patches/019-remove_ath5k_pci_option.patch create mode 100644 package/mac80211/patches/303-tpt_led_trigger_declaration_fix.patch create mode 100644 package/mac80211/patches/550-ath9k_intr_mitigation_tweak.patch diff --git a/package/mac80211/Makefile b/package/mac80211/Makefile index d8af462bbc..2755cb0ad9 100644 --- a/package/mac80211/Makefile +++ b/package/mac80211/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 PKG_VERSION:=2010-12-16 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_MD5SUM:=39196307aa67c1f19f498b570b994112 @@ -35,7 +35,7 @@ define KernelPackage/mac80211/Default SUBMENU:=$(WMENU) URL:=http://linuxwireless.org/ MAINTAINER:=Felix Fietkau - DEPENDS:=@(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN) + DEPENDS:=@(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN) @!LINUX_2_4 endef define KernelPackage/cfg80211 @@ -868,7 +868,7 @@ BUILDFLAGS:= \ $(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 -DCONFIG_CARL9170_DEBUGFS) \ - $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG) \ + $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG -DCONFIG_ATH5K_DEBUG) \ -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \ -DCONFIG_MAC80211_RC_MINSTREL_HT \ $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \ @@ -881,8 +881,7 @@ BUILDFLAGS:= \ $(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),-DCONFIG_RT2X00_LIB_PCI) \ $(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),-DCONFIG_RT2X00_LIB_USB) \ $(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),-DCONFIG_RT2X00_LIB_SOC) \ - $(if $(CONFIG_PCI_SUPPORT),-DCONFIG_RT2800PCI_PCI) \ - $(if $(CONFIG_TARGET_ramips),-DCONFIG_RT2800PCI_SOC) \ + $(if $(CONFIG_TARGET_atheros),-DCONFIG_ATH5K_AHB,-DCONFIG_ATH5K_PCI) \ -DCONFIG_P54_SPI_DEFAULT_EEPROM MAKE_OPTS:= \ @@ -905,8 +904,11 @@ MAKE_OPTS:= \ CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \ CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \ CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \ + CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \ CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \ CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \ + CONFIG_ATH5K_PCI=$(if $(CONFIG_TARGET_atheros),,y) \ + CONFIG_ATH5K_AHB=$(if $(CONFIG_TARGET_atheros),y) \ 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) \ @@ -936,8 +938,6 @@ MAKE_OPTS:= \ CONFIG_RT73USB=$(if $(CONFIG_PACKAGE_kmod-rt73-usb),m) \ CONFIG_RT2800_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2800-lib),m) \ CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \ - CONFIG_RT2800PCI_PCI=$(if $(CONFIG_PCI_SUPPORT),y) \ - CONFIG_RT2800PCI_SOC=$(if $(CONFIG_TARGET_ramips),y) \ CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \ CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \ CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \ @@ -957,7 +957,6 @@ MAKE_OPTS:= \ CONFIG_LIB80211_CRYPT_WEP= \ CONFIG_LIB80211_CRYPT_CCMP= \ CONFIG_LIB80211_CRYPT_TKIP= \ - CONFIG_IWLWIFI= \ CONFIG_COMPAT_IWLWIFI= \ CONFIG_IWLAGN= \ CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \ diff --git a/package/mac80211/files/lib/wifi/mac80211.sh b/package/mac80211/files/lib/wifi/mac80211.sh index 9ebc0be032..2f4abd0852 100644 --- a/package/mac80211/files/lib/wifi/mac80211.sh +++ b/package/mac80211/files/lib/wifi/mac80211.sh @@ -105,11 +105,13 @@ mac80211_hostapd_setup_bss() { config_get macaddr "$vif" macaddr config_get_bool hidden "$vif" hidden 0 + config_get maxassoc "$vif" maxassoc cat >> /var/run/hostapd-$phy.conf < + +If CONFIG_MAC80211_LEDS is not set, ieee80211_i.h was failing to compile, +because struct led_trigger is only declared when CONFIG_LEDS_TRIGGERS is +set. + +This patch adds ifdefs around the tpt_led_trigger declaration in +ieee80211_i.h to avoid the problem. + +Cc: Johannes Berg +Signed-off-by: Luciano Coelho +--- + net/mac80211/ieee80211_i.h | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h +index 0817ec6..7541d42 100644 +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -631,6 +631,7 @@ enum queue_stop_reason { + IEEE80211_QUEUE_STOP_REASON_SKB_ADD, + }; + ++#ifdef CONFIG_MAC80211_LEDS + struct tpt_led_trigger { + struct led_trigger trig; + char name[32]; +@@ -642,6 +643,7 @@ struct tpt_led_trigger { + unsigned int active, want; + bool running; + }; ++#endif + + /** + * mac80211 scan flags - currently active scan mode diff --git a/package/mac80211/patches/310-ath9k_pending_work.patch b/package/mac80211/patches/310-ath9k_pending_work.patch index ec0a26197e..7278551d18 100644 --- a/package/mac80211/patches/310-ath9k_pending_work.patch +++ b/package/mac80211/patches/310-ath9k_pending_work.patch @@ -92,7 +92,49 @@ if (!ath9k_hw_private_ops(ah)->restore_chainmask) --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c -@@ -1399,7 +1399,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st +@@ -491,6 +491,17 @@ static int __ath9k_hw_init(struct ath_hw + if (ah->hw_version.devid == AR5416_AR9100_DEVID) + ah->hw_version.macVersion = AR_SREV_VERSION_9100; + ++ ath9k_hw_read_revisions(ah); ++ ++ /* ++ * Read back AR_WA into a permanent copy and set bits 14 and 17. ++ * We need to do this to avoid RMW of this register. We cannot ++ * read the reg when chip is asleep. ++ */ ++ ah->WARegVal = REG_READ(ah, AR_WA); ++ ah->WARegVal |= (AR_WA_D3_L1_DISABLE | ++ AR_WA_ASPM_TIMER_BASED_DISABLE); ++ + if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { + ath_err(common, "Couldn't reset chip\n"); + return -EIO; +@@ -559,14 +570,6 @@ static int __ath9k_hw_init(struct ath_hw + + ath9k_hw_init_mode_regs(ah); + +- /* +- * Read back AR_WA into a permanent copy and set bits 14 and 17. +- * We need to do this to avoid RMW of this register. We cannot +- * read the reg when chip is asleep. +- */ +- ah->WARegVal = REG_READ(ah, AR_WA); +- ah->WARegVal |= (AR_WA_D3_L1_DISABLE | +- AR_WA_ASPM_TIMER_BASED_DISABLE); + + if (ah->is_pciexpress) + ath9k_hw_configpcipowersave(ah, 0, 0); +@@ -1078,8 +1081,6 @@ static bool ath9k_hw_set_reset_power_on( + return false; + } + +- ath9k_hw_read_revisions(ah); +- + return ath9k_hw_set_reset(ah, ATH9K_RESET_WARM); + } + +@@ -1399,7 +1400,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st ath9k_hw_init_qos(ah); if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT) diff --git a/package/mac80211/patches/550-ath9k_intr_mitigation_tweak.patch b/package/mac80211/patches/550-ath9k_intr_mitigation_tweak.patch new file mode 100644 index 0000000000..be17062ccb --- /dev/null +++ b/package/mac80211/patches/550-ath9k_intr_mitigation_tweak.patch @@ -0,0 +1,13 @@ +--- a/drivers/net/wireless/ath/ath9k/hw.c ++++ b/drivers/net/wireless/ath/ath9k/hw.c +@@ -1426,8 +1426,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st + REG_WRITE(ah, AR_OBS, 8); + + if (ah->config.rx_intr_mitigation) { +- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); +- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000); ++ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 250); ++ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 500); + } + + if (ah->config.tx_intr_mitigation) { -- 2.30.2