1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 01:43:08 +02:00

mac80211: update to latest version, fix tx gain patch

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32655 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2012-07-10 00:21:25 +00:00
parent 718ffca583
commit b01eb369ce
78 changed files with 1896 additions and 8328 deletions

View File

@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211 PKG_NAME:=mac80211
PKG_VERSION:=2012-06-14 PKG_VERSION:=2012-07-06
PKG_RELEASE:=2 PKG_RELEASE:=1
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_MD5SUM:=009fd7aa420693e30df9090cee9ea189 PKG_MD5SUM:=71e1ba84a7d1c3ab69ee1b68fa9e1269
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)

View File

@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -44,9 +44,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += @@ -45,9 +45,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/ obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -371,8 +371,8 @@ export CONFIG_B43_BCMA_EXTRA=y @@ -376,8 +376,8 @@ export CONFIG_B43_BCMA_EXTRA=y
export CONFIG_P54_PCI=m export CONFIG_P54_PCI=m

View File

@ -9,7 +9,7 @@
ifeq ($(CONFIG_MAC80211),y) ifeq ($(CONFIG_MAC80211),y)
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular") $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
@@ -683,10 +683,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27 @@ -688,10 +688,10 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
# We need the backported rfkill module on kernel < 2.6.31. # We need the backported rfkill module on kernel < 2.6.31.
# In more recent kernel versions use the in kernel rfkill module. # In more recent kernel versions use the in kernel rfkill module.
ifdef CONFIG_COMPAT_KERNEL_2_6_31 ifdef CONFIG_COMPAT_KERNEL_2_6_31

View File

@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -44,7 +44,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += @@ -45,7 +45,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/ obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
@ -19,7 +19,7 @@
else else
include $(KLIB_BUILD)/.config include $(KLIB_BUILD)/.config
endif endif
@@ -347,7 +347,8 @@ export CONFIG_IPW2200_QOS=y @@ -352,7 +352,8 @@ export CONFIG_IPW2200_QOS=y
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface # % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
endif #CONFIG_WIRELESS_EXT endif #CONFIG_WIRELESS_EXT
@ -29,7 +29,7 @@
# Sonics Silicon Backplane # Sonics Silicon Backplane
export CONFIG_SSB_SPROM=y export CONFIG_SSB_SPROM=y
@@ -360,7 +361,7 @@ endif #CONFIG_PCMCIA @@ -365,7 +366,7 @@ endif #CONFIG_PCMCIA
# export CONFIG_SSB_DEBUG=y # export CONFIG_SSB_DEBUG=y
export CONFIG_SSB_DRIVER_PCICORE=y export CONFIG_SSB_DRIVER_PCICORE=y
export CONFIG_B43_SSB=y export CONFIG_B43_SSB=y
@ -38,7 +38,7 @@
export CONFIG_BCMA=m export CONFIG_BCMA=m
export CONFIG_BCMA_BLOCKIO=y export CONFIG_BCMA_BLOCKIO=y
@@ -577,7 +578,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv @@ -582,7 +583,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
ifdef CONFIG_MMC ifdef CONFIG_MMC

View File

@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -44,7 +44,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += @@ -45,7 +45,6 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/ obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
@ -10,7 +10,7 @@
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),) ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -363,12 +363,12 @@ export CONFIG_SSB_DRIVER_PCICORE=y @@ -368,12 +368,12 @@ export CONFIG_SSB_DRIVER_PCICORE=y
export CONFIG_B43_SSB=y export CONFIG_B43_SSB=y
endif #__CONFIG_SSB endif #__CONFIG_SSB

View File

@ -9,7 +9,7 @@
endif #CONFIG_STAGING endif #CONFIG_STAGING
# mac80211 test driver # mac80211 test driver
@@ -400,15 +400,15 @@ endif #CONFIG_CRC_ITU_T @@ -405,15 +405,15 @@ endif #CONFIG_CRC_ITU_T
export CONFIG_MWL8K=m export CONFIG_MWL8K=m
# Ethernet drivers go here # Ethernet drivers go here
@ -32,7 +32,7 @@
endif #CONFIG_COMPAT_KERNEL_2_6_28 endif #CONFIG_COMPAT_KERNEL_2_6_28
ifdef CONFIG_WIRELESS_EXT ifdef CONFIG_WIRELESS_EXT
@@ -469,21 +469,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29 @@ -474,21 +474,21 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
# Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER # Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
# it also requires new RNDIS_HOST and CDC_ETHER modules which we add # it also requires new RNDIS_HOST and CDC_ETHER modules which we add
ifdef CONFIG_COMPAT_KERNEL_2_6_29 ifdef CONFIG_COMPAT_KERNEL_2_6_29

View File

@ -9,7 +9,7 @@
# export CONFIG_SSB=m # export CONFIG_SSB=m
else else
include $(KLIB_BUILD)/.config include $(KLIB_BUILD)/.config
@@ -298,7 +298,7 @@ export CONFIG_B43=m @@ -303,7 +303,7 @@ export CONFIG_B43=m
export CONFIG_B43_HWRNG=y export CONFIG_B43_HWRNG=y
export CONFIG_B43_PCI_AUTOSELECT=y export CONFIG_B43_PCI_AUTOSELECT=y
ifdef CONFIG_PCMCIA ifdef CONFIG_PCMCIA

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -579,7 +579,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv @@ -584,7 +584,7 @@ endif #CONFIG_SPI_MASTER end of SPI driv
ifdef CONFIG_MMC ifdef CONFIG_MMC
# export CONFIG_SSB_SDIOHOST=y # export CONFIG_SSB_SDIOHOST=y

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -304,8 +304,8 @@ ifdef CONFIG_MAC80211_LEDS @@ -309,8 +309,8 @@ ifdef CONFIG_MAC80211_LEDS
export CONFIG_B43_LEDS=y export CONFIG_B43_LEDS=y
endif #CONFIG_MAC80211_LEDS endif #CONFIG_MAC80211_LEDS
export CONFIG_B43_PHY_LP=y export CONFIG_B43_PHY_LP=y

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -379,7 +379,7 @@ export CONFIG_RTL8180=m @@ -384,7 +384,7 @@ export CONFIG_RTL8180=m
export CONFIG_ADM8211=m export CONFIG_ADM8211=m
@ -9,7 +9,7 @@
export CONFIG_RT2400PCI=m export CONFIG_RT2400PCI=m
export CONFIG_RT2500PCI=m export CONFIG_RT2500PCI=m
ifdef CONFIG_CRC_CCITT ifdef CONFIG_CRC_CCITT
@@ -525,7 +525,7 @@ export CONFIG_RT2800USB_RT35XX=y @@ -530,7 +530,7 @@ export CONFIG_RT2800USB_RT35XX=y
export CONFIG_RT2800USB_RT53XX=y export CONFIG_RT2800USB_RT53XX=y
export CONFIG_RT2800USB_UNKNOWN=y export CONFIG_RT2800USB_UNKNOWN=y
endif #CONFIG_CRC_CCITT endif #CONFIG_CRC_CCITT

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -276,7 +276,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27 @@ -281,7 +281,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_27
# PCI Drivers # PCI Drivers
ifdef CONFIG_PCI ifdef CONFIG_PCI

View File

@ -1,8 +1,8 @@
--- a/include/linux/compat-3.0.h --- a/include/linux/compat-3.0.h
+++ b/include/linux/compat-3.0.h +++ b/include/linux/compat-3.0.h
@@ -7,6 +7,8 @@ @@ -36,6 +36,8 @@ static inline struct page *shmem_read_ma
#endif
#include <linux/rcupdate.h>
+#include <linux/mod_devicetable.h> +#include <linux/mod_devicetable.h>
+ +

View File

@ -7,5 +7,5 @@
-export CONFIG_ATH9K_BTCOEX_SUPPORT=y -export CONFIG_ATH9K_BTCOEX_SUPPORT=y
+# export CONFIG_ATH9K_BTCOEX_SUPPORT=y +# export CONFIG_ATH9K_BTCOEX_SUPPORT=y
ifndef CONFIG_COMPAT_KERNEL_2_6_27 # WIL6210 requires MSI only available >= 2.6.30
export CONFIG_ATH6KL=m ifndef CONFIG_COMPAT_KERNEL_2_6_30

View File

@ -1,6 +1,6 @@
--- a/include/linux/compat-3.4.h --- a/include/linux/compat-3.4.h
+++ b/include/linux/compat-3.4.h +++ b/include/linux/compat-3.4.h
@@ -77,6 +77,19 @@ static inline void eth_hw_addr_random(st @@ -81,6 +81,19 @@ static inline void eth_hw_addr_random(st
module_driver(__pci_driver, pci_register_driver, \ module_driver(__pci_driver, pci_register_driver, \
pci_unregister_driver) pci_unregister_driver)

View File

@ -9,7 +9,7 @@
/* /*
* This backports: * This backports:
* *
@@ -106,6 +108,7 @@ struct vga_switcheroo_client_ops { @@ -135,6 +137,7 @@ static inline int compat_vga_switcheroo_
#define SIZE_MAX (~(size_t)0) #define SIZE_MAX (~(size_t)0)

View File

@ -33,7 +33,7 @@
#endif #endif
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -507,7 +507,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29 @@ -512,7 +512,7 @@ endif #CONFIG_COMPAT_KERNEL_2_6_29
# This activates a threading fix for usb urb. # This activates a threading fix for usb urb.
# this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351 # this is mainline commit: b3e670443b7fb8a2d29831b62b44a039c283e351
# This fix will be included in some stable releases. # This fix will be included in some stable releases.

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/mesh_pathtbl.c --- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c
@@ -826,7 +826,6 @@ static void table_flush_by_iface(struct @@ -817,7 +817,6 @@ static void table_flush_by_iface(struct
struct hlist_node *p; struct hlist_node *p;
int i; int i;

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,7 @@
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include "hw.h" #include "hw.h"
@@ -523,8 +524,16 @@ static int ath9k_hw_init_macaddr(struct @@ -526,8 +527,16 @@ static int ath9k_hw_init_macaddr(struct
common->macaddr[2 * i] = eeval >> 8; common->macaddr[2 * i] = eeval >> 8;
common->macaddr[2 * i + 1] = eeval & 0xff; common->macaddr[2 * i + 1] = eeval & 0xff;
} }

View File

@ -1,6 +1,6 @@
--- a/net/wireless/reg.c --- a/net/wireless/reg.c
+++ b/net/wireless/reg.c +++ b/net/wireless/reg.c
@@ -1699,6 +1699,8 @@ void regulatory_hint_11d(struct wiphy *w @@ -1702,6 +1702,8 @@ void regulatory_hint_11d(struct wiphy *w
enum environment_cap env = ENVIRON_ANY; enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request; struct regulatory_request *request;
@ -9,7 +9,7 @@
mutex_lock(&reg_mutex); mutex_lock(&reg_mutex);
if (unlikely(!last_request)) if (unlikely(!last_request))
@@ -1934,6 +1936,8 @@ static void restore_regulatory_settings( @@ -1937,6 +1939,8 @@ static void restore_regulatory_settings(
void regulatory_hint_disconnect(void) void regulatory_hint_disconnect(void)
{ {

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/main.c --- a/net/mac80211/main.c
+++ b/net/mac80211/main.c +++ b/net/mac80211/main.c
@@ -776,17 +776,11 @@ int ieee80211_register_hw(struct ieee802 @@ -786,17 +786,11 @@ int ieee80211_register_hw(struct ieee802
*/ */
for (i = 0; i < hw->wiphy->n_iface_combinations; i++) { for (i = 0; i < hw->wiphy->n_iface_combinations; i++) {
const struct ieee80211_iface_combination *c; const struct ieee80211_iface_combination *c;

View File

@ -9,11 +9,9 @@ Other devices will need to be added to the switch in write_file_bwmode
drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++
1 files changed, 86 insertions(+), 0 deletions(-) 1 files changed, 86 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 8c5ce8b..bb41066 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c --- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -815,6 +815,89 @@ static const struct file_operations fops_ani = { @@ -812,6 +812,89 @@ static const struct file_operations fops
.llseek = default_llseek, .llseek = default_llseek,
}; };
@ -103,7 +101,7 @@ index 8c5ce8b..bb41066 100644
/* debugfs: queues etc */ /* debugfs: queues etc */
@@ -906,6 +989,9 @@ ath5k_debug_init_device(struct ath5k_hw *ah) @@ -903,6 +986,9 @@ ath5k_debug_init_device(struct ath5k_hw
debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah, debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
&fops_beacon); &fops_beacon);
@ -113,4 +111,3 @@ index 8c5ce8b..bb41066 100644
debugfs_create_file("reset", S_IWUSR, phydir, ah, &fops_reset); debugfs_create_file("reset", S_IWUSR, phydir, ah, &fops_reset);
debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, ah, debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, ah,
--

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1533,6 +1533,53 @@ static const struct file_operations fops @@ -1532,6 +1532,53 @@ static const struct file_operations fops
#endif #endif
@ -54,7 +54,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@@ -1596,5 +1643,8 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1595,5 +1642,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR, debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val); sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);

View File

@ -71,7 +71,7 @@
ath_err(common, "Reading Magic # failed\n"); ath_err(common, "Reading Magic # failed\n");
--- a/drivers/net/wireless/ath/ath9k/hw.h --- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -657,6 +657,7 @@ enum ath_cal_list { @@ -658,6 +658,7 @@ enum ath_cal_list {
#define AH_USE_EEPROM 0x1 #define AH_USE_EEPROM 0x1
#define AH_UNPLUGGED 0x2 /* The card has been physically removed. */ #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
#define AH_FASTCC 0x4 #define AH_FASTCC 0x4

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1928,8 +1928,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st @@ -1956,8 +1956,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
REG_WRITE(ah, AR_OBS, 8); REG_WRITE(ah, AR_OBS, 8);
if (ah->config.rx_intr_mitigation) { if (ah->config.rx_intr_mitigation) {

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h --- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -641,6 +641,7 @@ struct ath_softc { @@ -649,6 +649,7 @@ struct ath_softc {
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
struct device *dev; struct device *dev;
@ -8,7 +8,7 @@
struct survey_info *cur_survey; struct survey_info *cur_survey;
struct survey_info survey[ATH9K_NUM_CHANNELS]; struct survey_info survey[ATH9K_NUM_CHANNELS];
@@ -709,6 +710,7 @@ struct ath_softc { @@ -717,6 +718,7 @@ struct ath_softc {
struct dfs_pattern_detector *dfs_detector; struct dfs_pattern_detector *dfs_detector;
}; };
@ -18,7 +18,7 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1580,6 +1580,50 @@ static const struct file_operations fops @@ -1579,6 +1579,50 @@ static const struct file_operations fops
.owner = THIS_MODULE .owner = THIS_MODULE
}; };
@ -69,7 +69,7 @@
int ath9k_init_debug(struct ath_hw *ah) int ath9k_init_debug(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
@@ -1646,5 +1690,8 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1645,5 +1689,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc, debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom); &fops_eeprom);
@ -80,7 +80,7 @@
} }
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1124,7 +1124,7 @@ static void ath9k_disable_ps(struct ath_ @@ -1084,7 +1084,7 @@ static void ath9k_disable_ps(struct ath_
ath_dbg(common, PS, "PowerSave disabled\n"); ath_dbg(common, PS, "PowerSave disabled\n");
} }
@ -89,7 +89,7 @@
{ {
struct ath_softc *sc = hw->priv; struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
@@ -1175,9 +1175,11 @@ static int ath9k_config(struct ieee80211 @@ -1138,9 +1138,11 @@ static int ath9k_config(struct ieee80211
if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) { if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) || reset_channel) {
struct ieee80211_channel *curchan = hw->conf.channel; struct ieee80211_channel *curchan = hw->conf.channel;
@ -101,7 +101,7 @@
if (ah->curchan) if (ah->curchan)
old_pos = ah->curchan - &ah->channels[0]; old_pos = ah->curchan - &ah->channels[0];
@@ -1220,7 +1222,23 @@ static int ath9k_config(struct ieee80211 @@ -1183,7 +1185,23 @@ static int ath9k_config(struct ieee80211
memset(&sc->survey[pos], 0, sizeof(struct survey_info)); memset(&sc->survey[pos], 0, sizeof(struct survey_info));
} }

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/iface.c --- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c +++ b/net/mac80211/iface.c
@@ -814,6 +814,7 @@ static const struct net_device_ops ieee8 @@ -916,6 +916,7 @@ static const struct net_device_ops ieee8
static void ieee80211_if_setup(struct net_device *dev) static void ieee80211_if_setup(struct net_device *dev)
{ {
ether_setup(dev); ether_setup(dev);

View File

@ -11,7 +11,7 @@
u16 listen_interval; u16 listen_interval;
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -1940,7 +1940,7 @@ static int ieee80211_get_tx_power(struct @@ -1956,7 +1956,7 @@ static int ieee80211_get_tx_power(struct
{ {
struct ieee80211_local *local = wiphy_priv(wiphy); struct ieee80211_local *local = wiphy_priv(wiphy);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1245,6 +1245,8 @@ int ath9k_config(struct ieee80211_hw *hw @@ -1208,6 +1208,8 @@ int ath9k_config(struct ieee80211_hw *hw
return -EINVAL; return -EINVAL;
} }
@ -9,7 +9,7 @@
/* /*
* The most recent snapshot of channel->noisefloor for the old * The most recent snapshot of channel->noisefloor for the old
* channel is only available after the hardware reset. Copy it to * channel is only available after the hardware reset. Copy it to
@@ -1259,6 +1261,7 @@ int ath9k_config(struct ieee80211_hw *hw @@ -1222,6 +1224,7 @@ int ath9k_config(struct ieee80211_hw *hw
sc->config.txpowlimit = 2 * conf->power_level; sc->config.txpowlimit = 2 * conf->power_level;
ath9k_cmn_update_txpow(ah, sc->curtxpow, ath9k_cmn_update_txpow(ah, sc->curtxpow,
sc->config.txpowlimit, &sc->curtxpow); sc->config.txpowlimit, &sc->curtxpow);

View File

@ -37,7 +37,7 @@
--- a/net/mac80211/rx.c --- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c +++ b/net/mac80211/rx.c
@@ -1263,6 +1263,7 @@ ieee80211_rx_h_sta_process(struct ieee80 @@ -1254,6 +1254,7 @@ ieee80211_rx_h_sta_process(struct ieee80
struct sk_buff *skb = rx->skb; struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@ -45,7 +45,7 @@
if (!sta) if (!sta)
return RX_CONTINUE; return RX_CONTINUE;
@@ -1307,6 +1308,19 @@ ieee80211_rx_h_sta_process(struct ieee80 @@ -1298,6 +1299,19 @@ ieee80211_rx_h_sta_process(struct ieee80
ewma_add(&sta->avg_signal, -status->signal); ewma_add(&sta->avg_signal, -status->signal);
} }
@ -67,7 +67,7 @@
* exchange sequence. * exchange sequence.
--- a/net/mac80211/sta_info.c --- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c
@@ -256,6 +256,8 @@ struct sta_info *sta_info_alloc(struct i @@ -254,6 +254,8 @@ struct sta_info *sta_info_alloc(struct i
do_posix_clock_monotonic_gettime(&uptime); do_posix_clock_monotonic_gettime(&uptime);
sta->last_connected = uptime.tv_sec; sta->last_connected = uptime.tv_sec;
ewma_init(&sta->avg_signal, 1024, 8); ewma_init(&sta->avg_signal, 1024, 8);
@ -78,7 +78,7 @@
kfree(sta); kfree(sta);
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -527,6 +527,8 @@ struct station_parameters { @@ -546,6 +546,8 @@ struct station_parameters {
* @STATION_INFO_STA_FLAGS: @sta_flags filled * @STATION_INFO_STA_FLAGS: @sta_flags filled
* @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled * @STATION_INFO_BEACON_LOSS_COUNT: @beacon_loss_count filled
* @STATION_INFO_T_OFFSET: @t_offset filled * @STATION_INFO_T_OFFSET: @t_offset filled
@ -87,7 +87,7 @@
*/ */
enum station_info_flags { enum station_info_flags {
STATION_INFO_INACTIVE_TIME = 1<<0, STATION_INFO_INACTIVE_TIME = 1<<0,
@@ -550,6 +552,8 @@ enum station_info_flags { @@ -569,6 +571,8 @@ enum station_info_flags {
STATION_INFO_STA_FLAGS = 1<<18, STATION_INFO_STA_FLAGS = 1<<18,
STATION_INFO_BEACON_LOSS_COUNT = 1<<19, STATION_INFO_BEACON_LOSS_COUNT = 1<<19,
STATION_INFO_T_OFFSET = 1<<20, STATION_INFO_T_OFFSET = 1<<20,
@ -96,17 +96,17 @@
}; };
/** /**
@@ -631,6 +635,9 @@ struct sta_bss_parameters { @@ -652,6 +656,9 @@ struct sta_bss_parameters {
NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
* @signal_avg: avg signal strength, type depends on the wiphy's signal_type * @signal_avg: Average signal strength, type depends on the wiphy's signal_type.
NOTE: For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. * For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_.
+ * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg + * @chains: bitmask for filled values in @chain_signal, @chain_signal_avg
+ * @chain_signal: per-chain signal strength of last received packet in dBm + * @chain_signal: per-chain signal strength of last received packet in dBm
+ * @chain_signal_avg: per-chain signal strength average in dBm + * @chain_signal_avg: per-chain signal strength average in dBm
* @txrate: current unicast bitrate from this station * @txrate: current unicast bitrate from this station
* @rxrate: current unicast bitrate to this station * @rxrate: current unicast bitrate to this station
* @rx_packets: packets received from this station * @rx_packets: packets received from this station
@@ -663,6 +670,11 @@ struct station_info { @@ -684,6 +691,11 @@ struct station_info {
u8 plink_state; u8 plink_state;
s8 signal; s8 signal;
s8 signal_avg; s8 signal_avg;
@ -137,7 +137,7 @@
u8 rs_num_delims; u8 rs_num_delims;
--- a/drivers/net/wireless/ath/ath9k/recv.c --- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -952,6 +952,7 @@ static int ath9k_rx_skb_preprocess(struc @@ -955,6 +955,7 @@ static int ath9k_rx_skb_preprocess(struc
bool *decrypt_error) bool *decrypt_error)
{ {
struct ath_hw *ah = common->ah; struct ath_hw *ah = common->ah;
@ -145,7 +145,7 @@
/* /*
* everything but the rate is checked here, the rate check is done * everything but the rate is checked here, the rate check is done
@@ -977,6 +978,20 @@ static int ath9k_rx_skb_preprocess(struc @@ -980,6 +981,20 @@ static int ath9k_rx_skb_preprocess(struc
if (rx_stats->rs_moreaggr) if (rx_stats->rs_moreaggr)
rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL; rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL;
@ -229,7 +229,7 @@
if (ads.ds_rxstatus8 & AR_RxKeyIdxValid) if (ads.ds_rxstatus8 & AR_RxKeyIdxValid)
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -998,12 +998,12 @@ void ath_debug_stat_rx(struct ath_softc @@ -997,12 +997,12 @@ void ath_debug_stat_rx(struct ath_softc
#ifdef CONFIG_ATH9K_MAC_DEBUG #ifdef CONFIG_ATH9K_MAC_DEBUG
spin_lock(&sc->debug.samp_lock); spin_lock(&sc->debug.samp_lock);
RX_SAMP_DBG(jiffies) = jiffies; RX_SAMP_DBG(jiffies) = jiffies;
@ -250,7 +250,7 @@
RX_SAMP_DBG(rate) = rs->rs_rate; RX_SAMP_DBG(rate) = rs->rs_rate;
--- a/include/linux/nl80211.h --- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h +++ b/include/linux/nl80211.h
@@ -1699,6 +1699,8 @@ enum nl80211_sta_bss_param { @@ -1729,6 +1729,8 @@ enum nl80211_sta_bss_param {
* @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
* @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32) * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
* @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64) * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
@ -259,7 +259,7 @@
* @__NL80211_STA_INFO_AFTER_LAST: internal * @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute * @NL80211_STA_INFO_MAX: highest possible station info attribute
*/ */
@@ -1723,6 +1725,8 @@ enum nl80211_sta_info { @@ -1753,6 +1755,8 @@ enum nl80211_sta_info {
NL80211_STA_INFO_STA_FLAGS, NL80211_STA_INFO_STA_FLAGS,
NL80211_STA_INFO_BEACON_LOSS, NL80211_STA_INFO_BEACON_LOSS,
NL80211_STA_INFO_T_OFFSET, NL80211_STA_INFO_T_OFFSET,
@ -270,7 +270,7 @@
__NL80211_STA_INFO_AFTER_LAST, __NL80211_STA_INFO_AFTER_LAST,
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -2553,6 +2553,32 @@ nla_put_failure: @@ -2648,6 +2648,32 @@ nla_put_failure:
return false; return false;
} }
@ -303,7 +303,7 @@
static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
int flags, int flags,
struct cfg80211_registered_device *rdev, struct cfg80211_registered_device *rdev,
@@ -2614,6 +2640,18 @@ static int nl80211_send_station(struct s @@ -2709,6 +2735,18 @@ static int nl80211_send_station(struct s
default: default:
break; break;
} }
@ -324,15 +324,15 @@
NL80211_STA_INFO_TX_BITRATE)) NL80211_STA_INFO_TX_BITRATE))
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -354,6 +354,7 @@ static void sta_set_sinfo(struct sta_inf @@ -355,6 +355,7 @@ static void sta_set_sinfo(struct sta_inf
{
struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
struct timespec uptime; struct timespec uptime;
+ int i; + int i;
sinfo->generation = sdata->local->sta_generation; sinfo->generation = sdata->local->sta_generation;
@@ -391,6 +392,17 @@ static void sta_set_sinfo(struct sta_inf @@ -394,6 +395,17 @@ static void sta_set_sinfo(struct sta_inf
sinfo->signal = (s8)sta->last_signal; sinfo->signal = (s8)sta->last_signal;
sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal); sinfo->signal_avg = (s8) -ewma_read(&sta->avg_signal);
} }

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h --- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
@@ -533,108 +533,108 @@ static const u32 ar9300_2p2_baseband_cor @@ -534,108 +534,108 @@ static const u32 ar9300_2p2_baseband_cor
static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = { static const u32 ar9300Modes_high_power_tx_gain_table_2p2[][5] = {
/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/ath9k.h --- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -519,6 +519,9 @@ static inline u16 ath9k_btcoex_aggr_limi @@ -528,6 +528,9 @@ static inline void ath9k_btcoex_stop_gen
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_MAC80211_LEDS
void ath_init_leds(struct ath_softc *sc); void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc); void ath_deinit_leds(struct ath_softc *sc);
@ -10,7 +10,7 @@
#else #else
static inline void ath_init_leds(struct ath_softc *sc) static inline void ath_init_leds(struct ath_softc *sc)
{ {
@@ -637,6 +640,13 @@ struct ath9k_vif_iter_data { @@ -645,6 +648,13 @@ struct ath9k_vif_iter_data {
int nadhocs; /* number of adhoc vifs */ int nadhocs; /* number of adhoc vifs */
}; };
@ -24,7 +24,7 @@
struct ath_softc { struct ath_softc {
struct ieee80211_hw *hw; struct ieee80211_hw *hw;
struct device *dev; struct device *dev;
@@ -678,9 +688,8 @@ struct ath_softc { @@ -686,9 +696,8 @@ struct ath_softc {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
#ifdef CONFIG_MAC80211_LEDS #ifdef CONFIG_MAC80211_LEDS
@ -182,7 +182,7 @@
#endif #endif
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1256,6 +1256,61 @@ static const struct file_operations fops @@ -1255,6 +1255,61 @@ static const struct file_operations fops
.llseek = default_llseek, .llseek = default_llseek,
}; };
@ -244,7 +244,7 @@
#ifdef CONFIG_ATH9K_MAC_DEBUG #ifdef CONFIG_ATH9K_MAC_DEBUG
void ath9k_debug_samp_bb_mac(struct ath_softc *sc) void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
@@ -1681,6 +1736,11 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1680,6 +1735,11 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_samps); &fops_samps);
#endif #endif

View File

@ -1,6 +1,6 @@
--- a/net/mac80211/ieee80211_i.h --- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h
@@ -702,6 +702,8 @@ struct ieee80211_sub_if_data { @@ -710,6 +710,8 @@ struct ieee80211_sub_if_data {
/* bitmap of allowed (non-MCS) rate indexes for rate control */ /* bitmap of allowed (non-MCS) rate indexes for rate control */
u32 rc_rateidx_mask[IEEE80211_NUM_BANDS]; u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];
@ -11,7 +11,7 @@
union { union {
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -2119,9 +2119,20 @@ static int ieee80211_set_bitrate_mask(st @@ -2135,9 +2135,20 @@ static int ieee80211_set_bitrate_mask(st
} }
for (i = 0; i < IEEE80211_NUM_BANDS; i++) { for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
@ -34,7 +34,7 @@
return 0; return 0;
--- a/include/net/mac80211.h --- a/include/net/mac80211.h
+++ b/include/net/mac80211.h +++ b/include/net/mac80211.h
@@ -3676,7 +3676,7 @@ void ieee80211_send_bar(struct ieee80211 @@ -3665,7 +3665,7 @@ void ieee80211_send_bar(struct ieee80211
* (deprecated; this will be removed once drivers get updated to use * (deprecated; this will be removed once drivers get updated to use
* rate_idx_mask) * rate_idx_mask)
* @rate_idx_mask: user-requested (legacy) rate mask * @rate_idx_mask: user-requested (legacy) rate mask
@ -43,7 +43,7 @@
* @bss: whether this frame is sent out in AP or IBSS mode * @bss: whether this frame is sent out in AP or IBSS mode
*/ */
struct ieee80211_tx_rate_control { struct ieee80211_tx_rate_control {
@@ -3688,7 +3688,7 @@ struct ieee80211_tx_rate_control { @@ -3677,7 +3677,7 @@ struct ieee80211_tx_rate_control {
bool rts, short_preamble; bool rts, short_preamble;
u8 max_rate_idx; u8 max_rate_idx;
u32 rate_idx_mask; u32 rate_idx_mask;
@ -54,7 +54,7 @@
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -637,9 +637,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021 @@ -624,9 +624,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee8021
txrc.max_rate_idx = -1; txrc.max_rate_idx = -1;
else else
txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;
@ -69,7 +69,7 @@
txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP || txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP ||
tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT || tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
tx->sdata->vif.type == NL80211_IFTYPE_ADHOC); tx->sdata->vif.type == NL80211_IFTYPE_ADHOC);
@@ -2475,8 +2477,6 @@ struct sk_buff *ieee80211_beacon_get_tim @@ -2454,8 +2456,6 @@ struct sk_buff *ieee80211_beacon_get_tim
txrc.max_rate_idx = -1; txrc.max_rate_idx = -1;
else else
txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1; txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/main.c --- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1929,12 +1929,29 @@ static u32 fill_chainmask(u32 cap, u32 n @@ -1840,12 +1840,29 @@ static u32 fill_chainmask(u32 cap, u32 n
return filled; return filled;
} }

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -676,10 +676,6 @@ static int __ath9k_hw_init(struct ath_hw @@ -680,10 +680,6 @@ static int __ath9k_hw_init(struct ath_hw
if (!AR_SREV_9300_20_OR_LATER(ah)) if (!AR_SREV_9300_20_OR_LATER(ah))
ah->ani_function &= ~ATH9K_ANI_MRC_CCK; ah->ani_function &= ~ATH9K_ANI_MRC_CCK;

View File

@ -1,115 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -140,7 +140,8 @@ static void ath9k_ani_restart(struct ath
}
/* Adjust the OFDM Noise Immunity Level */
-static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
+static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel,
+ bool scan)
{
struct ar5416AniState *aniState = &ah->curchan->ani;
struct ath_common *common = ath9k_hw_common(ah);
@@ -153,7 +154,7 @@ static void ath9k_hw_set_ofdm_nil(struct
immunityLevel, BEACON_RSSI(ah),
aniState->rssiThrLow, aniState->rssiThrHigh);
- if (aniState->update_ani)
+ if (!scan)
aniState->ofdmNoiseImmunityLevel = immunityLevel;
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
@@ -199,13 +200,14 @@ static void ath9k_hw_ani_ofdm_err_trigge
aniState = &ah->curchan->ani;
if (aniState->ofdmNoiseImmunityLevel < ATH9K_ANI_OFDM_MAX_LEVEL)
- ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1);
+ ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel + 1, false);
}
/*
* Set the ANI settings to match an CCK level.
*/
-static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel)
+static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel,
+ bool scan)
{
struct ar5416AniState *aniState = &ah->curchan->ani;
struct ath_common *common = ath9k_hw_common(ah);
@@ -222,7 +224,7 @@ static void ath9k_hw_set_cck_nil(struct
immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI)
immunityLevel = ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI;
- if (aniState->update_ani)
+ if (!scan)
aniState->cckNoiseImmunityLevel = immunityLevel;
entry_ofdm = &ofdm_level_table[aniState->ofdmNoiseImmunityLevel];
@@ -254,7 +256,8 @@ static void ath9k_hw_ani_cck_err_trigger
aniState = &ah->curchan->ani;
if (aniState->cckNoiseImmunityLevel < ATH9K_ANI_CCK_MAX_LEVEL)
- ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1);
+ ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel + 1,
+ false);
}
/*
@@ -270,13 +273,15 @@ static void ath9k_hw_ani_lower_immunity(
/* lower OFDM noise immunity */
if (aniState->ofdmNoiseImmunityLevel > 0 &&
(aniState->ofdmsTurn || aniState->cckNoiseImmunityLevel == 0)) {
- ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel - 1);
+ ath9k_hw_set_ofdm_nil(ah, aniState->ofdmNoiseImmunityLevel - 1,
+ false);
return;
}
/* lower CCK noise immunity */
if (aniState->cckNoiseImmunityLevel > 0)
- ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1);
+ ath9k_hw_set_cck_nil(ah, aniState->cckNoiseImmunityLevel - 1,
+ false);
}
/*
@@ -338,7 +343,6 @@ void ath9k_ani_reset(struct ath_hw *ah,
aniState->ofdmNoiseImmunityLevel,
aniState->cckNoiseImmunityLevel);
- aniState->update_ani = false;
ofdm_nil = ATH9K_ANI_OFDM_DEF_LEVEL;
cck_nil = ATH9K_ANI_CCK_DEF_LEVEL;
}
@@ -354,11 +358,9 @@ void ath9k_ani_reset(struct ath_hw *ah,
is_scanning,
aniState->ofdmNoiseImmunityLevel,
aniState->cckNoiseImmunityLevel);
-
- aniState->update_ani = true;
}
- ath9k_hw_set_ofdm_nil(ah, ofdm_nil);
- ath9k_hw_set_cck_nil(ah, cck_nil);
+ ath9k_hw_set_ofdm_nil(ah, ofdm_nil, is_scanning);
+ ath9k_hw_set_cck_nil(ah, cck_nil, is_scanning);
/*
* enable phy counters if hw supports or if not, enable phy
@@ -538,7 +540,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah
ani->ofdmWeakSigDetect = ATH9K_ANI_USE_OFDM_WEAK_SIG;
ani->cckNoiseImmunityLevel = ATH9K_ANI_CCK_DEF_LEVEL;
ani->ofdmNoiseImmunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL;
- ani->update_ani = false;
}
/*
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
@@ -116,7 +116,6 @@ struct ar5416AniState {
u8 firstepLevel;
u8 ofdmWeakSigDetect;
u8 cckWeakSigThreshold;
- bool update_ani;
u32 listenTime;
int32_t rssiThrLow;
int32_t rssiThrHigh;

View File

@ -0,0 +1,66 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -561,8 +561,8 @@ static void ar9003_tx_gain_table_mode1(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
- ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
+ ar9340Modes_high_ob_db_tx_gain_table_1p0,
+ ARRAY_SIZE(ar9340Modes_high_ob_db_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
@@ -605,8 +605,8 @@ static void ar9003_tx_gain_table_mode2(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
- ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
+ ar9340Modes_low_ob_db_tx_gain_table_1p0,
+ ARRAY_SIZE(ar9340Modes_low_ob_db_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
@@ -639,8 +639,8 @@ static void ar9003_tx_gain_table_mode3(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
- ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
+ ar9340Modes_high_power_tx_gain_table_1p0,
+ ARRAY_SIZE(ar9340Modes_high_power_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
@@ -659,6 +659,20 @@ static void ar9003_tx_gain_table_mode3(s
5);
}
+static void ar9003_tx_gain_table_mode4(struct ath_hw *ah)
+{
+ if (AR_SREV_9340(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar9340Modes_mixed_ob_db_tx_gain_table_1p0,
+ ARRAY_SIZE(ar9340Modes_mixed_ob_db_tx_gain_table_1p0),
+ 5);
+ else if (AR_SREV_9580(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar9580_1p0_mixed_ob_db_tx_gain_table,
+ ARRAY_SIZE(ar9580_1p0_mixed_ob_db_tx_gain_table),
+ 5);
+}
+
static void ar9003_tx_gain_table_apply(struct ath_hw *ah)
{
switch (ar9003_hw_get_tx_gain_idx(ah)) {
@@ -675,6 +689,9 @@ static void ar9003_tx_gain_table_apply(s
case 3:
ar9003_tx_gain_table_mode3(ah);
break;
+ case 4:
+ ar9003_tx_gain_table_mode4(ah);
+ break;
}
}

View File

@ -1,786 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9340_initvals.h
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2011 Atheros Communications Inc.
+ * Copyright (c) 2010-2011 Atheros Communications Inc.
+ * Copyright (c) 2011-2012 Qualcomm Atheros Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -18,16 +19,16 @@
#define INITVALS_9340_H
static const u32 ar9340_1p0_radio_postamble[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
{0x000160ac, 0xa4646800, 0xa4646800, 0xa4646800, 0xa4646800},
- {0x0001610c, 0x08000000, 0x08000000, 0x00000000, 0x00000000},
+ {0x0001610c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
{0x00016140, 0x10804000, 0x10804000, 0x50804000, 0x50804000},
- {0x0001650c, 0x08000000, 0x08000000, 0x00000000, 0x00000000},
+ {0x0001650c, 0x08000000, 0x00000000, 0x00000000, 0x00000000},
{0x00016540, 0x10804000, 0x10804000, 0x50804000, 0x50804000},
};
static const u32 ar9340Modes_lowest_ob_db_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
@@ -100,20 +101,20 @@ static const u32 ar9340Modes_lowest_ob_d
};
static const u32 ar9340Modes_fast_clock_1p0[][3] = {
- /* Addr 5G_HT20 5G_HT40 */
+ /* Addr 5G_HT20 5G_HT40 */
{0x00001030, 0x00000268, 0x000004d0},
{0x00001070, 0x0000018c, 0x00000318},
{0x000010b0, 0x00000fd0, 0x00001fa0},
{0x00008014, 0x044c044c, 0x08980898},
{0x0000801c, 0x148ec02b, 0x148ec057},
{0x00008318, 0x000044c0, 0x00008980},
- {0x00009e00, 0x03721821, 0x03721821},
+ {0x00009e00, 0x0372131c, 0x0372131c},
{0x0000a230, 0x0000000b, 0x00000016},
{0x0000a254, 0x00000898, 0x00001130},
};
static const u32 ar9340_1p0_radio_core[][2] = {
- /* Addr allmodes */
+ /* Addr allmodes */
{0x00016000, 0x36db6db6},
{0x00016004, 0x6db6db40},
{0x00016008, 0x73f00000},
@@ -146,15 +147,13 @@ static const u32 ar9340_1p0_radio_core[]
{0x00016100, 0x04cb0001},
{0x00016104, 0xfff80000},
{0x00016108, 0x00080010},
- {0x0001610c, 0x00000000},
{0x00016140, 0x50804008},
{0x00016144, 0x01884080},
{0x00016148, 0x000080c0},
{0x00016280, 0x01000015},
- {0x00016284, 0x05530000},
+ {0x00016284, 0x15530000},
{0x00016288, 0x00318000},
{0x0001628c, 0x50000000},
- {0x00016290, 0x4080294f},
{0x00016380, 0x00000000},
{0x00016384, 0x00000000},
{0x00016388, 0x00800700},
@@ -219,13 +218,14 @@ static const u32 ar9340_1p0_radio_core[]
};
static const u32 ar9340_1p0_radio_core_40M[][2] = {
+ /* Addr allmodes */
{0x0001609c, 0x02566f3a},
{0x000160ac, 0xa4647c00},
{0x000160b0, 0x01885f5a},
};
static const u32 ar9340_1p0_mac_postamble[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
{0x00001030, 0x00000230, 0x00000460, 0x000002c0, 0x00000160},
{0x00001070, 0x00000168, 0x000002d0, 0x00000318, 0x0000018c},
{0x000010b0, 0x00000e60, 0x00001cc0, 0x00007c70, 0x00003e38},
@@ -237,34 +237,37 @@ static const u32 ar9340_1p0_mac_postambl
};
static const u32 ar9340_1p0_soc_postamble[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
{0x00007010, 0x00000023, 0x00000023, 0x00000023, 0x00000023},
};
static const u32 ar9340_1p0_baseband_postamble[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
{0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a8011},
{0x00009820, 0x206a022e, 0x206a022e, 0x206a022e, 0x206a022e},
{0x00009824, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0, 0x5ac640d0},
{0x00009828, 0x06903081, 0x06903081, 0x06903881, 0x06903881},
{0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4},
{0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c},
- {0x00009c00, 0x00000044, 0x000000c4, 0x000000c4, 0x00000044},
- {0x00009e00, 0x0372161e, 0x0372161e, 0x037216a0, 0x037216a0},
- {0x00009e04, 0x00182020, 0x00182020, 0x00182020, 0x00182020},
+ {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4},
+ {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a0},
+ {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020},
{0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000e2},
{0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec88d2e, 0x7ec88d2e},
- {0x00009e14, 0x31395d5e, 0x3139605e, 0x3139605e, 0x31395d5e},
+ {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3379605e, 0x33795d5e},
{0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c},
{0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce},
{0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021},
+ {0x00009e3c, 0xcf946220, 0xcf946220, 0xcf946222, 0xcf946222},
{0x00009e44, 0x02321e27, 0x02321e27, 0x02291e27, 0x02291e27},
{0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012},
{0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000},
- {0x0000a204, 0x00003fc0, 0x00003fc4, 0x00003fc4, 0x00003fc0},
+ {0x0000a204, 0x00003ec0, 0x00003ec4, 0x00003ec4, 0x00003ec0},
{0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004},
+ {0x0000a22c, 0x07e26a2f, 0x07e26a2f, 0x01026a2f, 0x01026a2f},
{0x0000a230, 0x0000000a, 0x00000014, 0x00000016, 0x0000000b},
+ {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff},
{0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018},
{0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108},
{0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898},
@@ -277,11 +280,11 @@ static const u32 ar9340_1p0_baseband_pos
{0x0000a288, 0x00000220, 0x00000220, 0x00000110, 0x00000110},
{0x0000a28c, 0x00011111, 0x00011111, 0x00022222, 0x00022222},
{0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
- {0x0000a2d0, 0x00071981, 0x00071981, 0x00071981, 0x00071982},
- {0x0000a2d8, 0xf999a83a, 0xf999a83a, 0xf999a83a, 0xf999a83a},
+ {0x0000a2d0, 0x00041983, 0x00041983, 0x00041982, 0x00041982},
+ {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a},
{0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
- {0x0000ae04, 0x00180000, 0x00180000, 0x00180000, 0x00180000},
+ {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x001c0000},
{0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
{0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce},
@@ -289,21 +292,21 @@ static const u32 ar9340_1p0_baseband_pos
};
static const u32 ar9340_1p0_baseband_core[][2] = {
- /* Addr allmodes */
+ /* Addr allmodes */
{0x00009800, 0xafe68e30},
{0x00009804, 0xfd14e000},
{0x00009808, 0x9c0a9f6b},
{0x0000980c, 0x04900000},
- {0x00009814, 0xb280c00a},
+ {0x00009814, 0x3280c00a},
{0x00009818, 0x00000000},
{0x0000981c, 0x00020028},
- {0x00009834, 0x5f3ca3de},
+ {0x00009834, 0x6400a190},
{0x00009838, 0x0108ecff},
- {0x0000983c, 0x14750600},
+ {0x0000983c, 0x14000600},
{0x00009880, 0x201fff00},
{0x00009884, 0x00001042},
{0x000098a4, 0x00200400},
- {0x000098b0, 0x52440bbe},
+ {0x000098b0, 0x32840bbe},
{0x000098d0, 0x004b6a8e},
{0x000098d4, 0x00000820},
{0x000098dc, 0x00000000},
@@ -329,7 +332,6 @@ static const u32 ar9340_1p0_baseband_cor
{0x00009e30, 0x06336f77},
{0x00009e34, 0x6af6532f},
{0x00009e38, 0x0cc80c00},
- {0x00009e3c, 0xcf946222},
{0x00009e40, 0x0d261820},
{0x00009e4c, 0x00001004},
{0x00009e50, 0x00ff03f1},
@@ -342,8 +344,6 @@ static const u32 ar9340_1p0_baseband_cor
{0x0000a220, 0x00000000},
{0x0000a224, 0x00000000},
{0x0000a228, 0x10002310},
- {0x0000a22c, 0x01036a1e},
- {0x0000a234, 0x10000fff},
{0x0000a23c, 0x00000000},
{0x0000a244, 0x0c000000},
{0x0000a2a0, 0x00000001},
@@ -351,10 +351,6 @@ static const u32 ar9340_1p0_baseband_cor
{0x0000a2c8, 0x00000000},
{0x0000a2cc, 0x18c43433},
{0x0000a2d4, 0x00000000},
- {0x0000a2dc, 0x00000000},
- {0x0000a2e0, 0x00000000},
- {0x0000a2e4, 0x00000000},
- {0x0000a2e8, 0x00000000},
{0x0000a2ec, 0x00000000},
{0x0000a2f0, 0x00000000},
{0x0000a2f4, 0x00000000},
@@ -385,7 +381,7 @@ static const u32 ar9340_1p0_baseband_cor
{0x0000a3e8, 0x20202020},
{0x0000a3ec, 0x20202020},
{0x0000a3f0, 0x00000000},
- {0x0000a3f4, 0x00000246},
+ {0x0000a3f4, 0x00000000},
{0x0000a3f8, 0x0cdbd380},
{0x0000a3fc, 0x000f0f01},
{0x0000a400, 0x8fa91f01},
@@ -402,33 +398,17 @@ static const u32 ar9340_1p0_baseband_cor
{0x0000a430, 0x1ce739ce},
{0x0000a434, 0x00000000},
{0x0000a438, 0x00001801},
- {0x0000a43c, 0x00000000},
+ {0x0000a43c, 0x00100000},
{0x0000a440, 0x00000000},
{0x0000a444, 0x00000000},
- {0x0000a448, 0x04000080},
+ {0x0000a448, 0x05000080},
{0x0000a44c, 0x00000001},
{0x0000a450, 0x00010000},
{0x0000a458, 0x00000000},
- {0x0000a600, 0x00000000},
- {0x0000a604, 0x00000000},
- {0x0000a608, 0x00000000},
- {0x0000a60c, 0x00000000},
- {0x0000a610, 0x00000000},
- {0x0000a614, 0x00000000},
- {0x0000a618, 0x00000000},
- {0x0000a61c, 0x00000000},
- {0x0000a620, 0x00000000},
- {0x0000a624, 0x00000000},
- {0x0000a628, 0x00000000},
- {0x0000a62c, 0x00000000},
- {0x0000a630, 0x00000000},
- {0x0000a634, 0x00000000},
- {0x0000a638, 0x00000000},
- {0x0000a63c, 0x00000000},
{0x0000a640, 0x00000000},
{0x0000a644, 0x3fad9d74},
{0x0000a648, 0x0048060a},
- {0x0000a64c, 0x00000637},
+ {0x0000a64c, 0x00003c37},
{0x0000a670, 0x03020100},
{0x0000a674, 0x09080504},
{0x0000a678, 0x0d0c0b0a},
@@ -451,10 +431,6 @@ static const u32 ar9340_1p0_baseband_cor
{0x0000a8f4, 0x00000000},
{0x0000b2d0, 0x00000080},
{0x0000b2d4, 0x00000000},
- {0x0000b2dc, 0x00000000},
- {0x0000b2e0, 0x00000000},
- {0x0000b2e4, 0x00000000},
- {0x0000b2e8, 0x00000000},
{0x0000b2ec, 0x00000000},
{0x0000b2f0, 0x00000000},
{0x0000b2f4, 0x00000000},
@@ -465,80 +441,108 @@ static const u32 ar9340_1p0_baseband_cor
};
static const u32 ar9340Modes_high_power_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
+ {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
+ {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
+ {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
+ {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
+ {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
+ {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
+ {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
+ {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
- {0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
- {0x0000a508, 0x09002421, 0x09002421, 0x08000004, 0x08000004},
- {0x0000a50c, 0x0d002621, 0x0d002621, 0x0b000200, 0x0b000200},
- {0x0000a510, 0x13004620, 0x13004620, 0x0f000202, 0x0f000202},
- {0x0000a514, 0x19004a20, 0x19004a20, 0x11000400, 0x11000400},
- {0x0000a518, 0x1d004e20, 0x1d004e20, 0x15000402, 0x15000402},
- {0x0000a51c, 0x21005420, 0x21005420, 0x19000404, 0x19000404},
- {0x0000a520, 0x26005e20, 0x26005e20, 0x1b000603, 0x1b000603},
- {0x0000a524, 0x2b005e40, 0x2b005e40, 0x1f000a02, 0x1f000a02},
- {0x0000a528, 0x2f005e42, 0x2f005e42, 0x23000a04, 0x23000a04},
- {0x0000a52c, 0x33005e44, 0x33005e44, 0x26000a20, 0x26000a20},
- {0x0000a530, 0x38005e65, 0x38005e65, 0x2a000e20, 0x2a000e20},
- {0x0000a534, 0x3c005e69, 0x3c005e69, 0x2e000e22, 0x2e000e22},
- {0x0000a538, 0x40005e6b, 0x40005e6b, 0x31000e24, 0x31000e24},
- {0x0000a53c, 0x44005e6d, 0x44005e6d, 0x34001640, 0x34001640},
- {0x0000a540, 0x49005e72, 0x49005e72, 0x38001660, 0x38001660},
- {0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b001861, 0x3b001861},
- {0x0000a548, 0x53005f12, 0x53005f12, 0x3e001a81, 0x3e001a81},
- {0x0000a54c, 0x59025eb5, 0x59025eb5, 0x42001a83, 0x42001a83},
- {0x0000a550, 0x5e025f12, 0x5e025f12, 0x44001c84, 0x44001c84},
- {0x0000a554, 0x61027f12, 0x61027f12, 0x48001ce3, 0x48001ce3},
- {0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c001ce5, 0x4c001ce5},
- {0x0000a55c, 0x6b02bf14, 0x6b02bf14, 0x50001ce9, 0x50001ce9},
- {0x0000a560, 0x6f02bf16, 0x6f02bf16, 0x54001ceb, 0x54001ceb},
- {0x0000a564, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a568, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a56c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a570, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a574, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a578, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
- {0x0000a57c, 0x6f02bf16, 0x6f02bf16, 0x56001eec, 0x56001eec},
+ {0x0000a504, 0x04002222, 0x04002222, 0x02000001, 0x02000001},
+ {0x0000a508, 0x09002421, 0x09002421, 0x05000003, 0x05000003},
+ {0x0000a50c, 0x0d002621, 0x0d002621, 0x0a000005, 0x0a000005},
+ {0x0000a510, 0x13004620, 0x13004620, 0x0e000201, 0x0e000201},
+ {0x0000a514, 0x19004a20, 0x19004a20, 0x11000203, 0x11000203},
+ {0x0000a518, 0x1d004e20, 0x1d004e20, 0x14000401, 0x14000401},
+ {0x0000a51c, 0x21005420, 0x21005420, 0x18000403, 0x18000403},
+ {0x0000a520, 0x26005e20, 0x26005e20, 0x1b000602, 0x1b000602},
+ {0x0000a524, 0x2b005e40, 0x2b005e40, 0x1f000802, 0x1f000802},
+ {0x0000a528, 0x2f005e42, 0x2f005e42, 0x21000620, 0x21000620},
+ {0x0000a52c, 0x33005e44, 0x33005e44, 0x25000820, 0x25000820},
+ {0x0000a530, 0x38005e65, 0x38005e65, 0x29000822, 0x29000822},
+ {0x0000a534, 0x3c005e69, 0x3c005e69, 0x2d000824, 0x2d000824},
+ {0x0000a538, 0x40005e6b, 0x40005e6b, 0x30000828, 0x30000828},
+ {0x0000a53c, 0x44005e6d, 0x44005e6d, 0x3400082a, 0x3400082a},
+ {0x0000a540, 0x49005e72, 0x49005e72, 0x38000849, 0x38000849},
+ {0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b000a2c, 0x3b000a2c},
+ {0x0000a548, 0x53005f12, 0x53005f12, 0x3e000e2b, 0x3e000e2b},
+ {0x0000a54c, 0x59025eb5, 0x59025eb5, 0x42000e2d, 0x42000e2d},
+ {0x0000a550, 0x5e025f12, 0x5e025f12, 0x4500124a, 0x4500124a},
+ {0x0000a554, 0x61027f12, 0x61027f12, 0x4900124c, 0x4900124c},
+ {0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c00126c, 0x4c00126c},
+ {0x0000a55c, 0x6b02bf14, 0x6b02bf14, 0x4f00128c, 0x4f00128c},
+ {0x0000a560, 0x6f02bf16, 0x6f02bf16, 0x52001290, 0x52001290},
+ {0x0000a564, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a568, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a56c, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a570, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a574, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a578, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
+ {0x0000a57c, 0x6f02bf16, 0x6f02bf16, 0x56001292, 0x56001292},
{0x0000a580, 0x00802220, 0x00802220, 0x00800000, 0x00800000},
- {0x0000a584, 0x04802222, 0x04802222, 0x04800002, 0x04800002},
- {0x0000a588, 0x09802421, 0x09802421, 0x08800004, 0x08800004},
- {0x0000a58c, 0x0d802621, 0x0d802621, 0x0b800200, 0x0b800200},
- {0x0000a590, 0x13804620, 0x13804620, 0x0f800202, 0x0f800202},
- {0x0000a594, 0x19804a20, 0x19804a20, 0x11800400, 0x11800400},
- {0x0000a598, 0x1d804e20, 0x1d804e20, 0x15800402, 0x15800402},
- {0x0000a59c, 0x21805420, 0x21805420, 0x19800404, 0x19800404},
- {0x0000a5a0, 0x26805e20, 0x26805e20, 0x1b800603, 0x1b800603},
- {0x0000a5a4, 0x2b805e40, 0x2b805e40, 0x1f800a02, 0x1f800a02},
- {0x0000a5a8, 0x2f805e42, 0x2f805e42, 0x23800a04, 0x23800a04},
- {0x0000a5ac, 0x33805e44, 0x33805e44, 0x26800a20, 0x26800a20},
- {0x0000a5b0, 0x38805e65, 0x38805e65, 0x2a800e20, 0x2a800e20},
- {0x0000a5b4, 0x3c805e69, 0x3c805e69, 0x2e800e22, 0x2e800e22},
- {0x0000a5b8, 0x40805e6b, 0x40805e6b, 0x31800e24, 0x31800e24},
- {0x0000a5bc, 0x44805e6d, 0x44805e6d, 0x34801640, 0x34801640},
- {0x0000a5c0, 0x49805e72, 0x49805e72, 0x38801660, 0x38801660},
- {0x0000a5c4, 0x4e805eb2, 0x4e805eb2, 0x3b801861, 0x3b801861},
- {0x0000a5c8, 0x53805f12, 0x53805f12, 0x3e801a81, 0x3e801a81},
- {0x0000a5cc, 0x59825eb2, 0x59825eb2, 0x42801a83, 0x42801a83},
- {0x0000a5d0, 0x5e825f12, 0x5e825f12, 0x44801c84, 0x44801c84},
- {0x0000a5d4, 0x61827f12, 0x61827f12, 0x48801ce3, 0x48801ce3},
- {0x0000a5d8, 0x6782bf12, 0x6782bf12, 0x4c801ce5, 0x4c801ce5},
- {0x0000a5dc, 0x6b82bf14, 0x6b82bf14, 0x50801ce9, 0x50801ce9},
- {0x0000a5e0, 0x6f82bf16, 0x6f82bf16, 0x54801ceb, 0x54801ceb},
- {0x0000a5e4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5e8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5ec, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5f0, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x00016044, 0x056db2db, 0x056db2db, 0x056db2db, 0x056db2db},
+ {0x0000a584, 0x04802222, 0x04802222, 0x02800001, 0x02800001},
+ {0x0000a588, 0x09802421, 0x09802421, 0x05800003, 0x05800003},
+ {0x0000a58c, 0x0d802621, 0x0d802621, 0x0a800005, 0x0a800005},
+ {0x0000a590, 0x13804620, 0x13804620, 0x0e800201, 0x0e800201},
+ {0x0000a594, 0x19804a20, 0x19804a20, 0x11800203, 0x11800203},
+ {0x0000a598, 0x1d804e20, 0x1d804e20, 0x14800401, 0x14800401},
+ {0x0000a59c, 0x21805420, 0x21805420, 0x18800403, 0x18800403},
+ {0x0000a5a0, 0x26805e20, 0x26805e20, 0x1b800602, 0x1b800602},
+ {0x0000a5a4, 0x2b805e40, 0x2b805e40, 0x1f800802, 0x1f800802},
+ {0x0000a5a8, 0x2f805e42, 0x2f805e42, 0x21800620, 0x21800620},
+ {0x0000a5ac, 0x33805e44, 0x33805e44, 0x25800820, 0x25800820},
+ {0x0000a5b0, 0x38805e65, 0x38805e65, 0x29800822, 0x29800822},
+ {0x0000a5b4, 0x3c805e69, 0x3c805e69, 0x2d800824, 0x2d800824},
+ {0x0000a5b8, 0x40805e6b, 0x40805e6b, 0x30800828, 0x30800828},
+ {0x0000a5bc, 0x44805e6d, 0x44805e6d, 0x3480082a, 0x3480082a},
+ {0x0000a5c0, 0x49805e72, 0x49805e72, 0x38800849, 0x38800849},
+ {0x0000a5c4, 0x4e805eb2, 0x4e805eb2, 0x3b800a2c, 0x3b800a2c},
+ {0x0000a5c8, 0x53805f12, 0x53805f12, 0x3e800e2b, 0x3e800e2b},
+ {0x0000a5cc, 0x59825eb2, 0x59825eb2, 0x42800e2d, 0x42800e2d},
+ {0x0000a5d0, 0x5e825f12, 0x5e825f12, 0x4580124a, 0x4580124a},
+ {0x0000a5d4, 0x61827f12, 0x61827f12, 0x4980124c, 0x4980124c},
+ {0x0000a5d8, 0x6782bf12, 0x6782bf12, 0x4c80126c, 0x4c80126c},
+ {0x0000a5dc, 0x6b82bf14, 0x6b82bf14, 0x4f80128c, 0x4f80128c},
+ {0x0000a5e0, 0x6f82bf16, 0x6f82bf16, 0x52801290, 0x52801290},
+ {0x0000a5e4, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5e8, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5ec, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5f0, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801292, 0x56801292},
+ {0x00016044, 0x056db2db, 0x056db2db, 0x022492db, 0x022492db},
{0x00016048, 0x24925266, 0x24925266, 0x24925266, 0x24925266},
- {0x00016444, 0x056db2db, 0x056db2db, 0x056db2db, 0x056db2db},
+ {0x00016444, 0x056db2db, 0x056db2db, 0x022492db, 0x022492db},
{0x00016448, 0x24925266, 0x24925266, 0x24925266, 0x24925266},
};
static const u32 ar9340Modes_high_ob_db_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
+ {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
+ {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
{0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
@@ -559,7 +563,7 @@ static const u32 ar9340Modes_high_ob_db_
{0x0000a540, 0x49005e72, 0x49005e72, 0x38001660, 0x38001660},
{0x0000a544, 0x4e005eb2, 0x4e005eb2, 0x3b001861, 0x3b001861},
{0x0000a548, 0x53005f12, 0x53005f12, 0x3e001a81, 0x3e001a81},
- {0x0000a54c, 0x59025eb5, 0x59025eb5, 0x42001a83, 0x42001a83},
+ {0x0000a54c, 0x59025eb2, 0x59025eb2, 0x42001a83, 0x42001a83},
{0x0000a550, 0x5e025f12, 0x5e025f12, 0x44001c84, 0x44001c84},
{0x0000a554, 0x61027f12, 0x61027f12, 0x48001ce3, 0x48001ce3},
{0x0000a558, 0x6702bf12, 0x6702bf12, 0x4c001ce5, 0x4c001ce5},
@@ -604,13 +608,43 @@ static const u32 ar9340Modes_high_ob_db_
{0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
{0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
{0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
+ {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
+ {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
+ {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
+ {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
+ {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
+ {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
+ {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
+ {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352},
+ {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584},
+ {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x00016044, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
- {0x00016048, 0x8e481266, 0x8e481266, 0x8e481266, 0x8e481266},
+ {0x00016048, 0x8e481666, 0x8e481666, 0x8e481266, 0x8e481266},
+ {0x00016280, 0x01000015, 0x01000015, 0x01001015, 0x01001015},
{0x00016444, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
- {0x00016448, 0x8e481266, 0x8e481266, 0x8e481266, 0x8e481266},
+ {0x00016448, 0x8e481666, 0x8e481666, 0x8e481266, 0x8e481266},
};
+
static const u32 ar9340Modes_ub124_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8005, 0xd00a8005},
+ {0x00009820, 0x206a022e, 0x206a022e, 0x206a00ae, 0x206a00ae},
+ {0x00009830, 0x0000059c, 0x0000059c, 0x0000059c, 0x0000059c},
+ {0x00009e10, 0x7ec88d2e, 0x7ec88d2e, 0x7ec82d2e, 0x7ec82d2e},
+ {0x0000a2dc, 0xfef5d402, 0xfef5d402, 0xfdab5b52, 0xfdab5b52},
+ {0x0000a2e0, 0xfe896600, 0xfe896600, 0xfd339c84, 0xfd339c84},
+ {0x0000a2e4, 0xff01f800, 0xff01f800, 0xfec3e000, 0xfec3e000},
+ {0x0000a2e8, 0xfffe0000, 0xfffe0000, 0xfffc0000, 0xfffc0000},
{0x0000a410, 0x000050d8, 0x000050d8, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000},
{0x0000a504, 0x04002222, 0x04002222, 0x04000002, 0x04000002},
@@ -676,15 +710,34 @@ static const u32 ar9340Modes_ub124_tx_ga
{0x0000a5f4, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
{0x0000a5f8, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
{0x0000a5fc, 0x6f82bf16, 0x6f82bf16, 0x56801eec, 0x56801eec},
- {0x00016044, 0x036db2db, 0x036db2db, 0x036db2db, 0x036db2db},
- {0x00016048, 0x69b65266, 0x69b65266, 0x69b65266, 0x69b65266},
- {0x00016444, 0x036db2db, 0x036db2db, 0x036db2db, 0x036db2db},
- {0x00016448, 0x69b65266, 0x69b65266, 0x69b65266, 0x69b65266},
+ {0x00016044, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
+ {0x00016048, 0x8e480086, 0x8e480086, 0x8e480086, 0x8e480086},
+ {0x00016444, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4, 0x03b6d2e4},
+ {0x00016448, 0x8e480086, 0x8e480086, 0x8e480086, 0x8e480086},
+ {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000},
+ {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000},
+ {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501},
+ {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501},
+ {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03},
+ {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04},
+ {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04},
+ {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005},
+ {0x0000b2dc, 0xfef5d402, 0xfef5d402, 0xfdab5b52, 0xfdab5b52},
+ {0x0000b2e0, 0xfe896600, 0xfe896600, 0xfd339c84, 0xfd339c84},
+ {0x0000b2e4, 0xff01f800, 0xff01f800, 0xfec3e000, 0xfec3e000},
+ {0x0000b2e8, 0xfffe0000, 0xfffe0000, 0xfffc0000, 0xfffc0000},
};
-
static const u32 ar9340Common_rx_gain_table_1p0[][2] = {
- /* Addr allmodes */
+ /* Addr allmodes */
{0x0000a000, 0x00010000},
{0x0000a004, 0x00030002},
{0x0000a008, 0x00050004},
@@ -845,14 +898,14 @@ static const u32 ar9340Common_rx_gain_ta
{0x0000b074, 0x00000000},
{0x0000b078, 0x00000000},
{0x0000b07c, 0x00000000},
- {0x0000b080, 0x32323232},
- {0x0000b084, 0x2f2f3232},
- {0x0000b088, 0x23282a2d},
- {0x0000b08c, 0x1c1e2123},
- {0x0000b090, 0x14171919},
- {0x0000b094, 0x0e0e1214},
- {0x0000b098, 0x03050707},
- {0x0000b09c, 0x00030303},
+ {0x0000b080, 0x23232323},
+ {0x0000b084, 0x21232323},
+ {0x0000b088, 0x19191c1e},
+ {0x0000b08c, 0x12141417},
+ {0x0000b090, 0x07070e0e},
+ {0x0000b094, 0x03030305},
+ {0x0000b098, 0x00000003},
+ {0x0000b09c, 0x00000000},
{0x0000b0a0, 0x00000000},
{0x0000b0a4, 0x00000000},
{0x0000b0a8, 0x00000000},
@@ -944,7 +997,11 @@ static const u32 ar9340Common_rx_gain_ta
};
static const u32 ar9340Modes_low_ob_db_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
@@ -952,8 +1009,8 @@ static const u32 ar9340Modes_low_ob_db_t
{0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
{0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
{0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400},
- {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402},
- {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
+ {0x0000a518, 0x21002220, 0x21002220, 0x16000402, 0x16000402},
+ {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
{0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603},
{0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02},
{0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04},
@@ -965,19 +1022,19 @@ static const u32 ar9340Modes_low_ob_db_t
{0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660},
{0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861},
{0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81},
- {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83},
- {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84},
- {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3},
- {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5},
- {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9},
- {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb},
- {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
- {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec},
+ {0x0000a54c, 0x5c02486b, 0x5c02486b, 0x47001a83, 0x47001a83},
+ {0x0000a550, 0x61024a6c, 0x61024a6c, 0x4a001c84, 0x4a001c84},
+ {0x0000a554, 0x66026a6c, 0x66026a6c, 0x4e001ce3, 0x4e001ce3},
+ {0x0000a558, 0x6b026e6c, 0x6b026e6c, 0x52001ce5, 0x52001ce5},
+ {0x0000a55c, 0x7002708c, 0x7002708c, 0x56001ce9, 0x56001ce9},
+ {0x0000a560, 0x7302b08a, 0x7302b08a, 0x5a001ceb, 0x5a001ceb},
+ {0x0000a564, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a568, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a56c, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a570, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a574, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a578, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
+ {0x0000a57c, 0x7702b08c, 0x7702b08c, 0x5d001eec, 0x5d001eec},
{0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
{0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
{0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
@@ -1010,14 +1067,40 @@ static const u32 ar9340Modes_low_ob_db_t
{0x0000a5f4, 0x778a308c, 0x778a308c, 0x5d801eec, 0x5d801eec},
{0x0000a5f8, 0x778a308c, 0x778a308c, 0x5d801eec, 0x5d801eec},
{0x0000a5fc, 0x778a308c, 0x778a308c, 0x5d801eec, 0x5d801eec},
+ {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
+ {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
+ {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
+ {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
+ {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
+ {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
+ {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
+ {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x00016044, 0x056db2db, 0x056db2db, 0x056db2db, 0x056db2db},
- {0x00016048, 0x24925266, 0x24925266, 0x24925266, 0x24925266},
+ {0x00016048, 0x24925666, 0x24925666, 0x24925266, 0x24925266},
+ {0x00016280, 0x01000015, 0x01000015, 0x01001015, 0x01001015},
+ {0x00016288, 0xf0318000, 0xf0318000, 0xf0318000, 0xf0318000},
{0x00016444, 0x056db2db, 0x056db2db, 0x056db2db, 0x056db2db},
- {0x00016448, 0x24925266, 0x24925266, 0x24925266, 0x24925266},
+ {0x00016448, 0x24925666, 0x24925666, 0x24925266, 0x24925266},
};
static const u32 ar9340Modes_mixed_ob_db_tx_gain_table_1p0[][5] = {
- /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
+ {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
{0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
{0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
@@ -1025,8 +1108,8 @@ static const u32 ar9340Modes_mixed_ob_db
{0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200},
{0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202},
{0x0000a514, 0x1c000223, 0x1c000223, 0x11000400, 0x11000400},
- {0x0000a518, 0x21020220, 0x21020220, 0x15000402, 0x15000402},
- {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404},
+ {0x0000a518, 0x21002220, 0x21002220, 0x15000402, 0x15000402},
+ {0x0000a51c, 0x27002223, 0x27002223, 0x19000404, 0x19000404},
{0x0000a520, 0x2b022220, 0x2b022220, 0x1b000603, 0x1b000603},
{0x0000a524, 0x2f022222, 0x2f022222, 0x1f000a02, 0x1f000a02},
{0x0000a528, 0x34022225, 0x34022225, 0x23000a04, 0x23000a04},
@@ -1038,19 +1121,19 @@ static const u32 ar9340Modes_mixed_ob_db
{0x0000a540, 0x4e02246c, 0x4e02246c, 0x38001660, 0x38001660},
{0x0000a544, 0x5302266c, 0x5302266c, 0x3b001861, 0x3b001861},
{0x0000a548, 0x5702286c, 0x5702286c, 0x3e001a81, 0x3e001a81},
- {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x42001a83, 0x42001a83},
- {0x0000a550, 0x61042a6c, 0x61042a6c, 0x44001c84, 0x44001c84},
- {0x0000a554, 0x66062a6c, 0x66062a6c, 0x48001ce3, 0x48001ce3},
- {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x4c001ce5, 0x4c001ce5},
- {0x0000a55c, 0x7006308c, 0x7006308c, 0x50001ce9, 0x50001ce9},
- {0x0000a560, 0x730a308a, 0x730a308a, 0x54001ceb, 0x54001ceb},
- {0x0000a564, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a568, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a56c, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a570, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a574, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a578, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
- {0x0000a57c, 0x770a308c, 0x770a308c, 0x56001eec, 0x56001eec},
+ {0x0000a54c, 0x5c02486b, 0x5c02486b, 0x42001a83, 0x42001a83},
+ {0x0000a550, 0x61024a6c, 0x61024a6c, 0x44001c84, 0x44001c84},
+ {0x0000a554, 0x66026a6c, 0x66026a6c, 0x48001ce3, 0x48001ce3},
+ {0x0000a558, 0x6b026e6c, 0x6b026e6c, 0x4c001ce5, 0x4c001ce5},
+ {0x0000a55c, 0x7002708c, 0x7002708c, 0x50001ce9, 0x50001ce9},
+ {0x0000a560, 0x7302b08a, 0x7302b08a, 0x54001ceb, 0x54001ceb},
+ {0x0000a564, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a568, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a56c, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a570, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a574, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a578, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
+ {0x0000a57c, 0x7702b08c, 0x7702b08c, 0x56001eec, 0x56001eec},
{0x0000a580, 0x00800000, 0x00800000, 0x00800000, 0x00800000},
{0x0000a584, 0x06800003, 0x06800003, 0x04800002, 0x04800002},
{0x0000a588, 0x0a800020, 0x0a800020, 0x08800004, 0x08800004},
@@ -1083,14 +1166,36 @@ static const u32 ar9340Modes_mixed_ob_db
{0x0000a5f4, 0x778a308c, 0x778a308c, 0x56801eec, 0x56801eec},
{0x0000a5f8, 0x778a308c, 0x778a308c, 0x56801eec, 0x56801eec},
{0x0000a5fc, 0x778a308c, 0x778a308c, 0x56801eec, 0x56801eec},
+ {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000},
+ {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501},
+ {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501},
+ {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03},
+ {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04},
+ {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04},
+ {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005},
+ {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005},
+ {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352},
+ {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584},
+ {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800},
+ {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000},
{0x00016044, 0x056db2db, 0x056db2db, 0x03b6d2e4, 0x03b6d2e4},
- {0x00016048, 0x24927266, 0x24927266, 0x8e483266, 0x8e483266},
+ {0x00016048, 0x24925666, 0x24925666, 0x8e481266, 0x8e481266},
+ {0x00016280, 0x01000015, 0x01000015, 0x01001015, 0x01001015},
+ {0x00016288, 0x30318000, 0x30318000, 0x00318000, 0x00318000},
{0x00016444, 0x056db2db, 0x056db2db, 0x03b6d2e4, 0x03b6d2e4},
- {0x00016448, 0x24927266, 0x24927266, 0x8e482266, 0x8e482266},
+ {0x00016448, 0x24925666, 0x24925666, 0x8e481266, 0x8e481266},
};
static const u32 ar9340_1p0_mac_core[][2] = {
- /* Addr allmodes */
+ /* Addr allmodes */
{0x00000008, 0x00000000},
{0x00000030, 0x00020085},
{0x00000034, 0x00000005},
@@ -1119,6 +1224,7 @@ static const u32 ar9340_1p0_mac_core[][2
{0x00008004, 0x00000000},
{0x00008008, 0x00000000},
{0x0000800c, 0x00000000},
+ {0x00008010, 0x00080800},
{0x00008018, 0x00000000},
{0x00008020, 0x00000000},
{0x00008038, 0x00000000},
@@ -1146,7 +1252,7 @@ static const u32 ar9340_1p0_mac_core[][2
{0x000080bc, 0x00000000},
{0x000080c0, 0x2a800000},
{0x000080c4, 0x06900168},
- {0x000080c8, 0x13881c20},
+ {0x000080c8, 0x13881c22},
{0x000080cc, 0x01f40000},
{0x000080d0, 0x00252500},
{0x000080d4, 0x00a00000},
@@ -1250,11 +1356,11 @@ static const u32 ar9340_1p0_mac_core[][2
{0x000083c4, 0x00000000},
{0x000083c8, 0x00000000},
{0x000083cc, 0x00000200},
- {0x000083d0, 0x000301ff},
+ {0x000083d0, 0x000101ff},
};
static const u32 ar9340Common_wo_xlna_rx_gain_table_1p0[][2] = {
- /* Addr allmodes */
+ /* Addr allmodes */
{0x0000a000, 0x00010000},
{0x0000a004, 0x00030002},
{0x0000a008, 0x00050004},
@@ -1514,12 +1620,11 @@ static const u32 ar9340Common_wo_xlna_rx
};
static const u32 ar9340_1p0_soc_preamble[][2] = {
- /* Addr allmodes */
- {0x000040a4, 0x00a0c1c9},
+ /* Addr allmodes */
{0x00007008, 0x00000000},
{0x00007020, 0x00000000},
{0x00007034, 0x00000002},
{0x00007038, 0x000004c2},
};
-#endif
+#endif /* INITVALS_9340_1P0_H */

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -501,7 +501,7 @@ static void ar9003_tx_gain_table_mode1(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
+ ar9340Modes_high_ob_db_tx_gain_table_1p0,
ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))
@@ -540,7 +540,7 @@ static void ar9003_tx_gain_table_mode2(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
+ ar9340Modes_low_ob_db_tx_gain_table_1p0,
ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))
@@ -574,7 +574,7 @@ static void ar9003_tx_gain_table_mode3(s
5);
else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
- ar9340Modes_lowest_ob_db_tx_gain_table_1p0,
+ ar9340Modes_high_power_tx_gain_table_1p0,
ARRAY_SIZE(ar9340Modes_lowest_ob_db_tx_gain_table_1p0),
5);
else if (AR_SREV_9485_11(ah))

View File

@ -1,21 +0,0 @@
From ba1e32844fcd396d90b357d3a620ffc1abcde614 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:13 +0200
Subject: [PATCH 01/20] ath9k: define DEVID for QCA955x
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -48,6 +48,7 @@
#define AR9300_DEVID_AR9580 0x0033
#define AR9300_DEVID_AR9462 0x0034
#define AR9300_DEVID_AR9330 0x0035
+#define AR9300_DEVID_QCA955X 0x0038
#define AR5416_AR9100_DEVID 0x000b

View File

@ -20,7 +20,7 @@
} }
--- a/drivers/net/wireless/ath/ath9k/xmit.c --- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1988,7 +1988,8 @@ int ath_tx_start(struct ieee80211_hw *hw @@ -1987,7 +1987,8 @@ int ath_tx_start(struct ieee80211_hw *hw
ath_txq_lock(sc, txq); ath_txq_lock(sc, txq);
if (txq == sc->tx.txq_map[q] && if (txq == sc->tx.txq_map[q] &&
@ -30,7 +30,7 @@
ieee80211_stop_queue(sc->hw, q); ieee80211_stop_queue(sc->hw, q);
txq->stopped = true; txq->stopped = true;
} }
@@ -2047,7 +2048,8 @@ static void ath_tx_complete(struct ath_s @@ -2046,7 +2047,8 @@ static void ath_tx_complete(struct ath_s
if (WARN_ON(--txq->pending_frames < 0)) if (WARN_ON(--txq->pending_frames < 0))
txq->pending_frames = 0; txq->pending_frames = 0;
@ -42,7 +42,7 @@
} }
--- a/drivers/net/wireless/ath/ath9k/debug.c --- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1702,6 +1702,14 @@ int ath9k_init_debug(struct ath_hw *ah) @@ -1701,6 +1701,14 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_interrupt); &fops_interrupt);
debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc, debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_xmit); &fops_xmit);

View File

@ -1,31 +0,0 @@
From b8122a3554e574b154cdf09ae843e6464d8ad1cc Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:13 +0200
Subject: [PATCH 02/20] ath9k: define MAC version for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/reg.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -798,6 +798,7 @@
#define AR_SREV_REVISION_9580_10 4 /* AR9580 1.0 */
#define AR_SREV_VERSION_9462 0x280
#define AR_SREV_REVISION_9462_20 2
+#define AR_SREV_VERSION_9550 0x400
#define AR_SREV_5416(_ah) \
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \
@@ -905,6 +906,9 @@
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9462) && \
((_ah)->hw_version.macRev >= AR_SREV_REVISION_9462_20))
+#define AR_SREV_9550(_ah) \
+ (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9550))
+
#define AR_SREV_9580(_ah) \
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9580) && \
((_ah)->hw_version.macRev >= AR_SREV_REVISION_9580_10))

View File

@ -1,23 +0,0 @@
From 9bd8677ad5f1814e0f784f92d07ba8bd38c6bc13 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:14 +0200
Subject: [PATCH 03/20] ath9k: set MAC version for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -343,6 +343,9 @@ static void ath9k_hw_read_revisions(stru
val = REG_READ(ah, AR_SREV);
ah->hw_version.macRev = MS(val, AR_SREV_REVISION2);
return;
+ case AR9300_DEVID_QCA955X:
+ ah->hw_version.macVersion = AR_SREV_VERSION_9550;
+ return;
}
val = REG_READ(ah, AR_SREV) & AR_SREV_ID;

View File

@ -1,24 +0,0 @@
From 6583f34718e322373130daaca42660c669079384 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:59 +0200
Subject: [PATCH 04/20] ath9k: add platform_device_id for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -35,6 +35,10 @@ static const struct platform_device_id a
.name = "ar934x_wmac",
.driver_data = AR9300_DEVID_AR9340,
},
+ {
+ .name = "qca955x_wmac",
+ .driver_data = AR9300_DEVID_QCA955X,
+ },
{},
};

View File

@ -1,21 +0,0 @@
From 7ea9d187a4334e35d9ed1a3cbeb85d0b1275b24c Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:14 +0200
Subject: [PATCH 05/20] ath9k: add BB name string for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -3135,6 +3135,7 @@ static struct {
{ AR_SREV_VERSION_9340, "9340" },
{ AR_SREV_VERSION_9485, "9485" },
{ AR_SREV_VERSION_9462, "9462" },
+ { AR_SREV_VERSION_9550, "9550" },
};
/* For devices with external radios */

View File

@ -1,22 +0,0 @@
From 68e9cddb98d5a7de130b064ec301e2370679160a Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:15 +0200
Subject: [PATCH 06/20] ath9k: clear pciexpress flag for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -667,7 +667,7 @@ static int __ath9k_hw_init(struct ath_hw
}
if (AR_SREV_9271(ah) || AR_SREV_9100(ah) || AR_SREV_9340(ah) ||
- AR_SREV_9330(ah))
+ AR_SREV_9330(ah) || AR_SREV_9550(ah))
ah->is_pciexpress = false;
ah->hw_version.phyRev = REG_READ(ah, AR_PHY_CHIP_ID);

View File

@ -1,23 +0,0 @@
From 3fa372b3d51c310023a20432ebc8f718c31feff0 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:15 +0200
Subject: [PATCH 07/20] ath9k: enable TX/RX data byte swap for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1985,7 +1985,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD);
}
#ifdef __BIG_ENDIAN
- else if (AR_SREV_9330(ah) || AR_SREV_9340(ah))
+ else if (AR_SREV_9330(ah) || AR_SREV_9340(ah) ||
+ AR_SREV_9550(ah))
REG_RMW(ah, AR_CFG, AR_CFG_SWRB | AR_CFG_SWTB, 0);
else
REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD);

View File

@ -1,224 +0,0 @@
From 2b4e3da2e595e1c76f65f7da752ec1f037446bd2 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:10:16 +0200
Subject: [PATCH 09/20] ath9k: add mode register initialization code for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 86 ++++++++++++++++++++++++++-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 61 +++++++++++++++++++-
drivers/net/wireless/ath/ath9k/hw.h | 1 +
3 files changed, 145 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -328,7 +328,61 @@ static void ar9003_hw_init_mode_regs(str
INIT_INI_ARRAY(&ah->ini_japan2484, AR9462_BBC_TXIFR_COEFFJ,
ARRAY_SIZE(AR9462_BBC_TXIFR_COEFFJ), 2);
+ } else if (AR_SREV_9550(ah)) {
+ /* mac */
+ INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
+ INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
+ ar955x_1p0_mac_core,
+ ARRAY_SIZE(ar955x_1p0_mac_core), 2);
+ INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST],
+ ar955x_1p0_mac_postamble,
+ ARRAY_SIZE(ar955x_1p0_mac_postamble), 5);
+
+ /* bb */
+ INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0);
+ INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE],
+ ar955x_1p0_baseband_core,
+ ARRAY_SIZE(ar955x_1p0_baseband_core), 2);
+ INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST],
+ ar955x_1p0_baseband_postamble,
+ ARRAY_SIZE(ar955x_1p0_baseband_postamble), 5);
+
+ /* radio */
+ INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0);
+ INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE],
+ ar955x_1p0_radio_core,
+ ARRAY_SIZE(ar955x_1p0_radio_core), 2);
+ INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST],
+ ar955x_1p0_radio_postamble,
+ ARRAY_SIZE(ar955x_1p0_radio_postamble), 5);
+
+ /* soc */
+ INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE],
+ ar955x_1p0_soc_preamble,
+ ARRAY_SIZE(ar955x_1p0_soc_preamble), 2);
+ INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0);
+ INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST],
+ ar955x_1p0_soc_postamble,
+ ARRAY_SIZE(ar955x_1p0_soc_postamble), 5);
+ /* rx/tx gain */
+ INIT_INI_ARRAY(&ah->iniModesRxGain,
+ ar955x_1p0_common_wo_xlna_rx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_table),
+ 2);
+ INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds,
+ ar955x_1p0_common_wo_xlna_rx_gain_bounds,
+ ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_bounds),
+ 5);
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar955x_1p0_modes_xpa_tx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_modes_xpa_tx_gain_table),
+ 9);
+
+ /* Fast clock modal settings */
+ INIT_INI_ARRAY(&ah->iniModesFastClock,
+ ar955x_1p0_modes_fast_clock,
+ ARRAY_SIZE(ar955x_1p0_modes_fast_clock), 3);
} else if (AR_SREV_9580(ah)) {
/* mac */
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0);
@@ -471,6 +525,11 @@ static void ar9003_tx_gain_table_mode0(s
ar9485_modes_lowest_ob_db_tx_gain_1_1,
ARRAY_SIZE(ar9485_modes_lowest_ob_db_tx_gain_1_1),
5);
+ else if (AR_SREV_9550(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar955x_1p0_modes_xpa_tx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_modes_xpa_tx_gain_table),
+ 9);
else if (AR_SREV_9580(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9580_1p0_lowest_ob_db_tx_gain_table,
@@ -515,6 +574,11 @@ static void ar9003_tx_gain_table_mode1(s
ar9580_1p0_high_ob_db_tx_gain_table,
ARRAY_SIZE(ar9580_1p0_high_ob_db_tx_gain_table),
5);
+ else if (AR_SREV_9550(ah))
+ INIT_INI_ARRAY(&ah->iniModesTxGain,
+ ar955x_1p0_modes_no_xpa_tx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_modes_no_xpa_tx_gain_table),
+ 9);
else if (AR_SREV_9462_20(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9462_modes_high_ob_db_tx_gain_table_2p0,
@@ -636,7 +700,16 @@ static void ar9003_rx_gain_table_mode0(s
ar9485Common_wo_xlna_rx_gain_1_1,
ARRAY_SIZE(ar9485Common_wo_xlna_rx_gain_1_1),
2);
- else if (AR_SREV_9580(ah))
+ else if (AR_SREV_9550(ah)) {
+ INIT_INI_ARRAY(&ah->iniModesRxGain,
+ ar955x_1p0_common_rx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_common_rx_gain_table),
+ 2);
+ INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds,
+ ar955x_1p0_common_rx_gain_bounds,
+ ARRAY_SIZE(ar955x_1p0_common_rx_gain_bounds),
+ 5);
+ } else if (AR_SREV_9580(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9580_1p0_rx_gain_table,
ARRAY_SIZE(ar9580_1p0_rx_gain_table),
@@ -680,7 +753,16 @@ static void ar9003_rx_gain_table_mode1(s
ar9462_common_wo_xlna_rx_gain_table_2p0,
ARRAY_SIZE(ar9462_common_wo_xlna_rx_gain_table_2p0),
2);
- else if (AR_SREV_9580(ah))
+ else if (AR_SREV_9550(ah)) {
+ INIT_INI_ARRAY(&ah->iniModesRxGain,
+ ar955x_1p0_common_wo_xlna_rx_gain_table,
+ ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_table),
+ 2);
+ INIT_INI_ARRAY(&ah->ini_modes_rx_gain_bounds,
+ ar955x_1p0_common_wo_xlna_rx_gain_bounds,
+ ARRAY_SIZE(ar955x_1p0_common_wo_xlna_rx_gain_bounds),
+ 5);
+ } else if (AR_SREV_9580(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9580_1p0_wo_xlna_rx_gain_table,
ARRAY_SIZE(ar9580_1p0_wo_xlna_rx_gain_table),
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -620,6 +620,50 @@ static void ar9003_hw_prog_ini(struct at
}
}
+static int ar9550_hw_get_modes_txgain_index(struct ath_hw *ah,
+ struct ath9k_channel *chan)
+{
+ int ret;
+
+ switch (chan->chanmode) {
+ case CHANNEL_A:
+ case CHANNEL_A_HT20:
+ if (chan->channel <= 5350)
+ ret = 1;
+ else if ((chan->channel > 5350) && (chan->channel <= 5600))
+ ret = 3;
+ else
+ ret = 5;
+ break;
+
+ case CHANNEL_A_HT40PLUS:
+ case CHANNEL_A_HT40MINUS:
+ if (chan->channel <= 5350)
+ ret = 2;
+ else if ((chan->channel > 5350) && (chan->channel <= 5600))
+ ret = 4;
+ else
+ ret = 6;
+ break;
+
+ case CHANNEL_G:
+ case CHANNEL_G_HT20:
+ case CHANNEL_B:
+ ret = 8;
+ break;
+
+ case CHANNEL_G_HT40PLUS:
+ case CHANNEL_G_HT40MINUS:
+ ret = 7;
+ break;
+
+ default:
+ ret = -EINVAL;
+ }
+
+ return ret;
+}
+
static int ar9003_hw_process_ini(struct ath_hw *ah,
struct ath9k_channel *chan)
{
@@ -661,7 +705,22 @@ static int ar9003_hw_process_ini(struct
}
REG_WRITE_ARRAY(&ah->iniModesRxGain, 1, regWrites);
- REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
+ if (AR_SREV_9550(ah))
+ REG_WRITE_ARRAY(&ah->ini_modes_rx_gain_bounds, modesIndex,
+ regWrites);
+
+ if (AR_SREV_9550(ah)) {
+ int modes_txgain_index;
+
+ modes_txgain_index = ar9550_hw_get_modes_txgain_index(ah, chan);
+ if (modes_txgain_index < 0)
+ return -EINVAL;
+
+ REG_WRITE_ARRAY(&ah->iniModesTxGain, modes_txgain_index,
+ regWrites);
+ } else {
+ REG_WRITE_ARRAY(&ah->iniModesTxGain, modesIndex, regWrites);
+ }
/*
* For 5GHz channels requiring Fast Clock, apply
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -820,6 +820,7 @@ struct ath_hw {
struct ar5416IniArray iniModesFastClock;
struct ar5416IniArray iniAdditional;
struct ar5416IniArray iniModesRxGain;
+ struct ar5416IniArray ini_modes_rx_gain_bounds;
struct ar5416IniArray iniModesTxGain;
struct ar5416IniArray iniCckfirNormal;
struct ar5416IniArray iniCckfirJapan2484;

View File

@ -1,33 +0,0 @@
From 987807e9e1a0ec0767635d0bd63003766fb527ad Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:16:06 +0200
Subject: [PATCH 10/20] ath9k: read spur frequency information from eeprom for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -180,7 +180,8 @@ static void ar9003_hw_spur_mitigate_mrc_
* is out-of-band and can be ignored.
*/
- if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah)) {
+ if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) ||
+ AR_SREV_9550(ah)) {
spur_fbin_ptr = ar9003_get_spur_chan_ptr(ah,
IS_CHAN_2GHZ(chan));
if (spur_fbin_ptr[0] == 0) /* No spur */
@@ -207,7 +208,8 @@ static void ar9003_hw_spur_mitigate_mrc_
if (AR_SREV_9462(ah) && (i == 0 || i == 3))
continue;
negative = 0;
- if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
+ if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) ||
+ AR_SREV_9550(ah))
cur_bb_spur = ath9k_hw_fbin2freq(spur_fbin_ptr[i],
IS_CHAN_2GHZ(chan));
else

View File

@ -1,36 +0,0 @@
From a317eaa189d885e53400dc86c131390be17fd760 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 11/20] ath9k: fix XPABIASLEVEL settings for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3519,7 +3519,7 @@ static void ar9003_hw_xpa_bias_level_app
if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias);
- else if (AR_SREV_9462(ah))
+ else if (AR_SREV_9462(ah) || AR_SREV_9550(ah))
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
else {
REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias);
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -636,8 +636,8 @@
#define AR_CH0_TOP (AR_SREV_9300(ah) ? 0x16288 : \
((AR_SREV_9462(ah) ? 0x1628c : 0x16280)))
-#define AR_CH0_TOP_XPABIASLVL (0x300)
-#define AR_CH0_TOP_XPABIASLVL_S (8)
+#define AR_CH0_TOP_XPABIASLVL (AR_SREV_9550(ah) ? 0x3c0 : 0x300)
+#define AR_CH0_TOP_XPABIASLVL_S (AR_SREV_9550(ah) ? 6 : 8)
#define AR_CH0_THERM (AR_SREV_9300(ah) ? 0x16290 : \
((AR_SREV_9485(ah) ? 0x1628c : 0x16294)))

View File

@ -1,35 +0,0 @@
From 48032d5c88c936fc84a2d676474c5fe714d8ef94 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 12/20] ath9k: fix antenna control configuration for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 3 +++
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3601,6 +3601,9 @@ static void ar9003_hw_ant_ctrl_apply(str
if (AR_SREV_9462(ah)) {
REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
AR_SWITCH_TABLE_COM_AR9462_ALL, value);
+ } else if (AR_SREV_9550(ah)) {
+ REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
+ AR_SWITCH_TABLE_COM_AR9550_ALL, value);
} else
REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM,
AR_SWITCH_TABLE_COM_ALL, value);
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -650,6 +650,8 @@
#define AR_SWITCH_TABLE_COM_ALL_S (0)
#define AR_SWITCH_TABLE_COM_AR9462_ALL (0xffffff)
#define AR_SWITCH_TABLE_COM_AR9462_ALL_S (0)
+#define AR_SWITCH_TABLE_COM_AR9550_ALL (0xffffff)
+#define AR_SWITCH_TABLE_COM_AR9550_ALL_S (0)
#define AR_SWITCH_TABLE_COM_SPDT (0x00f00000)
#define AR_SWITCH_TABLE_COM_SPDT_ALL (0x0000fff0)
#define AR_SWITCH_TABLE_COM_SPDT_ALL_S (4)

View File

@ -1,22 +0,0 @@
From 76ea066dcf42308aec8d20ef75170c1ecae82e60 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 13/20] ath9k: fix PAPRD settings for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
@@ -211,7 +211,7 @@ static int ar9003_paprd_setup_single_tab
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_NUM_CORR_STAGES, 7);
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_MIN_LOOPBACK_DEL, 1);
- if (AR_SREV_9485(ah) || AR_SREV_9462(ah))
+ if (AR_SREV_9485(ah) || AR_SREV_9462(ah) || AR_SREV_9550(ah))
REG_RMW_FIELD(ah, AR_PHY_PAPRD_TRAINER_CNTL3,
AR_PHY_PAPRD_TRAINER_CNTL3_CF_PAPRD_QUICK_DROP,
-3);

View File

@ -1,32 +0,0 @@
From 5e08c36e3ef57712fee83248d0db3d2837e13f5f Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 14/20] ath9k: fix RF channel frequency configuration for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -99,7 +99,7 @@ static int ar9003_hw_set_channel(struct
channelSel = (freq * 4) / 120;
chan_frac = (((freq * 4) % 120) * 0x20000) / 120;
channelSel = (channelSel << 17) | chan_frac;
- } else if (AR_SREV_9340(ah)) {
+ } else if (AR_SREV_9340(ah) || AR_SREV_9550(ah)) {
if (ah->is_clk_25mhz) {
u32 chan_frac;
@@ -113,7 +113,8 @@ static int ar9003_hw_set_channel(struct
/* Set to 2G mode */
bMode = 1;
} else {
- if (AR_SREV_9340(ah) && ah->is_clk_25mhz) {
+ if ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) &&
+ ah->is_clk_25mhz) {
u32 chan_frac;
channelSel = (freq * 2) / 75;

View File

@ -1,34 +0,0 @@
From 70a436c98a8479f15fe6ba7f894f88eede238dfa Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 15/20] ath9k: disable SYNC_HOST1_FATAL interrupts for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
drivers/net/wireless/ath/ath9k/mac.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -939,7 +939,7 @@ static void ath9k_hw_init_interrupt_mask
AR_IMR_RXORN |
AR_IMR_BCNMISC;
- if (AR_SREV_9340(ah))
+ if (AR_SREV_9340(ah) || AR_SREV_9550(ah))
sync_default &= ~AR_INTR_SYNC_HOST1_FATAL;
if (AR_SREV_9300_20_OR_LATER(ah)) {
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -810,7 +810,7 @@ void ath9k_hw_enable_interrupts(struct a
return;
}
- if (AR_SREV_9340(ah))
+ if (AR_SREV_9340(ah) || AR_SREV_9550(ah))
sync_default &= ~AR_INTR_SYNC_HOST1_FATAL;
async_mask = AR_INTR_MAC_IRQ;

View File

@ -1,22 +0,0 @@
From 9c598271929ea9a54f57e82af15260dc4afea590 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:58 +0200
Subject: [PATCH 16/20] ath9k: skip internal regulator configuration for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3970,7 +3970,7 @@ static void ath9k_hw_ar9300_set_board_va
ar9003_hw_drive_strength_apply(ah);
ar9003_hw_atten_apply(ah, chan);
ar9003_hw_quick_drop_apply(ah, chan->channel);
- if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah))
+ if (!AR_SREV_9330(ah) && !AR_SREV_9340(ah) && !AR_SREV_9550(ah))
ar9003_hw_internal_regulator_apply(ah);
if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah))
ar9003_hw_apply_tuning_caps(ah);

View File

@ -1,75 +0,0 @@
From d211df2956ae9d696bb0cab985426e0d236544b8 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:16:00 +0200
Subject: [PATCH 17/20] ath9k: fix PLL initialization for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -861,7 +861,7 @@ static void ath9k_hw_init_pll(struct ath
/* program BB PLL phase_shift */
REG_RMW_FIELD(ah, AR_CH0_BB_DPLL3,
AR_CH0_BB_DPLL3_PHASE_SHIFT, 0x1);
- } else if (AR_SREV_9340(ah)) {
+ } else if (AR_SREV_9340(ah) || AR_SREV_9550(ah)) {
u32 regval, pll2_divint, pll2_divfrac, refdiv;
REG_WRITE(ah, AR_RTC_PLL_CONTROL, 0x1142c);
@@ -875,9 +875,15 @@ static void ath9k_hw_init_pll(struct ath
pll2_divfrac = 0x1eb85;
refdiv = 3;
} else {
- pll2_divint = 88;
- pll2_divfrac = 0;
- refdiv = 5;
+ if (AR_SREV_9340(ah)) {
+ pll2_divint = 88;
+ pll2_divfrac = 0;
+ refdiv = 5;
+ } else {
+ pll2_divint = 0x11;
+ pll2_divfrac = 0x26666;
+ refdiv = 1;
+ }
}
regval = REG_READ(ah, AR_PHY_PLL_MODE);
@@ -890,8 +896,12 @@ static void ath9k_hw_init_pll(struct ath
udelay(100);
regval = REG_READ(ah, AR_PHY_PLL_MODE);
- regval = (regval & 0x80071fff) | (0x1 << 30) | (0x1 << 13) |
- (0x4 << 26) | (0x18 << 19);
+ if (AR_SREV_9340(ah))
+ regval = (regval & 0x80071fff) | (0x1 << 30) |
+ (0x1 << 13) | (0x4 << 26) | (0x18 << 19);
+ else
+ regval = (regval & 0x80071fff) | (0x3 << 30) |
+ (0x1 << 13) | (0x4 << 26) | (0x60 << 19);
REG_WRITE(ah, AR_PHY_PLL_MODE, regval);
REG_WRITE(ah, AR_PHY_PLL_MODE,
REG_READ(ah, AR_PHY_PLL_MODE) & 0xfffeffff);
@@ -902,7 +912,8 @@ static void ath9k_hw_init_pll(struct ath
REG_WRITE(ah, AR_RTC_PLL_CONTROL, pll);
- if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah))
+ if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) ||
+ AR_SREV_9550(ah))
udelay(1000);
/* Switch the core clock for ar9271 to 117Mhz */
@@ -915,7 +926,7 @@ static void ath9k_hw_init_pll(struct ath
REG_WRITE(ah, AR_RTC_SLEEP_CLK, AR_RTC_FORCE_DERIVED_CLK);
- if (AR_SREV_9340(ah)) {
+ if (AR_SREV_9340(ah) || AR_SREV_9550(ah)) {
if (ah->is_clk_25mhz) {
REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x17c << 1);
REG_WRITE(ah, AR_SLP32_MODE, 0x0010f3d7);

View File

@ -1,23 +0,0 @@
From 29fe3ae617d86bf1b39d15e43cee29b723118648 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:59 +0200
Subject: [PATCH 18/20] ath9k: enable PLL workaround for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -167,7 +167,8 @@ static void ath_restart_work(struct ath_
ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
- if (AR_SREV_9485(sc->sc_ah) || AR_SREV_9340(sc->sc_ah))
+ if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9485(sc->sc_ah) ||
+ AR_SREV_9550(sc->sc_ah))
ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work,
msecs_to_jiffies(ATH_PLL_WORK_INTERVAL));

View File

@ -1,34 +0,0 @@
From f8e7d8fcb297db362c9288ef5f1cd778e7ddd1a9 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:15:59 +0200
Subject: [PATCH 19/20] ath9k: set 4ADDRESS bit in RX filter for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/mac.h | 1 +
drivers/net/wireless/ath/ath9k/recv.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -642,6 +642,7 @@ enum ath9k_rx_filter {
ATH9K_RX_FILTER_PHYRADAR = 0x00002000,
ATH9K_RX_FILTER_MCAST_BCAST_ALL = 0x00008000,
ATH9K_RX_FILTER_CONTROL_WRAPPER = 0x00080000,
+ ATH9K_RX_FILTER_4ADDRESS = 0x00100000,
};
#define ATH9K_RATESERIES_RTS_CTS 0x0001
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -430,6 +430,9 @@ u32 ath_calcrxfilter(struct ath_softc *s
rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
}
+ if (AR_SREV_9550(sc->sc_ah))
+ rfilt |= ATH9K_RX_FILTER_4ADDRESS;
+
return rfilt;
}

View File

@ -1,29 +0,0 @@
From 23693513280521914ceb6d92c1bd7613e7b19c58 Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Mon, 2 Jul 2012 17:16:00 +0200
Subject: [PATCH 20/20] ath9k: enable support for AR9550
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -658,6 +658,7 @@ static int __ath9k_hw_init(struct ath_hw
case AR_SREV_VERSION_9485:
case AR_SREV_VERSION_9340:
case AR_SREV_VERSION_9462:
+ case AR_SREV_VERSION_9550:
break;
default:
ath_err(common,
@@ -735,6 +736,7 @@ int ath9k_hw_init(struct ath_hw *ah)
case AR9300_DEVID_AR9485_PCIE:
case AR9300_DEVID_AR9330:
case AR9300_DEVID_AR9340:
+ case AR9300_DEVID_QCA955X:
case AR9300_DEVID_AR9580:
case AR9300_DEVID_AR9462:
break;

View File

@ -8,7 +8,7 @@
/* /*
* PCI driver handlers. * PCI driver handlers.
*/ */
@@ -383,6 +384,7 @@ int rt2x00pci_resume(struct pci_dev *pci @@ -392,6 +393,7 @@ int rt2x00pci_resume(struct pci_dev *pci
} }
EXPORT_SYMBOL_GPL(rt2x00pci_resume); EXPORT_SYMBOL_GPL(rt2x00pci_resume);
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -272,8 +272,10 @@ int rt2x00pci_probe(struct pci_dev *pci_ @@ -273,8 +273,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
pci_set_master(pci_dev); pci_set_master(pci_dev);

View File

@ -101,7 +101,7 @@
+} +}
--- a/drivers/net/wireless/rt2x00/rt2x00.h --- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -559,6 +559,7 @@ struct rt2x00lib_ops { @@ -560,6 +560,7 @@ struct rt2x00lib_ops {
const u8 *data, const size_t len); const u8 *data, const size_t len);
int (*load_firmware) (struct rt2x00_dev *rt2x00dev, int (*load_firmware) (struct rt2x00_dev *rt2x00dev,
const u8 *data, const size_t len); const u8 *data, const size_t len);
@ -109,7 +109,7 @@
/* /*
* Device initialization/deinitialization handlers. * Device initialization/deinitialization handlers.
@@ -720,6 +721,7 @@ enum rt2x00_capability_flags { @@ -721,6 +722,7 @@ enum rt2x00_capability_flags {
REQUIRE_SW_SEQNO, REQUIRE_SW_SEQNO,
REQUIRE_HT_TX_DESC, REQUIRE_HT_TX_DESC,
REQUIRE_PS_AUTOWAKE, REQUIRE_PS_AUTOWAKE,
@ -117,7 +117,7 @@
/* /*
* Capabilities * Capabilities
@@ -975,6 +977,11 @@ struct rt2x00_dev { @@ -976,6 +978,11 @@ struct rt2x00_dev {
const struct firmware *fw; const struct firmware *fw;
/* /*
@ -164,7 +164,7 @@
select RT2X00_LIB_CRYPTO select RT2X00_LIB_CRYPTO
select CRC_CCITT select CRC_CCITT
select EEPROM_93CX6 select EEPROM_93CX6
@@ -204,6 +205,9 @@ config RT2X00_LIB_FIRMWARE @@ -212,6 +213,9 @@ config RT2X00_LIB_FIRMWARE
config RT2X00_LIB_CRYPTO config RT2X00_LIB_CRYPTO
boolean boolean
@ -208,7 +208,7 @@
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom) static void rt2800pci_eepromregister_read(struct eeprom_93cx6 *eeprom)
@@ -311,6 +301,20 @@ static int rt2800pci_write_firmware(stru @@ -317,6 +307,20 @@ static int rt2800pci_write_firmware(stru
} }
/* /*
@ -229,7 +229,7 @@
* Initialization functions. * Initialization functions.
*/ */
static bool rt2800pci_get_entry_state(struct queue_entry *entry) static bool rt2800pci_get_entry_state(struct queue_entry *entry)
@@ -1082,6 +1086,7 @@ static const struct rt2x00lib_ops rt2800 @@ -1159,6 +1163,7 @@ static const struct rt2x00lib_ops rt2800
.get_firmware_name = rt2800pci_get_firmware_name, .get_firmware_name = rt2800pci_get_firmware_name,
.check_firmware = rt2800_check_firmware, .check_firmware = rt2800_check_firmware,
.load_firmware = rt2800_load_firmware, .load_firmware = rt2800_load_firmware,

View File

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

View File

@ -9,7 +9,7 @@
{ {
memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE); memcpy(rt2x00dev->eeprom, rt2x00dev->eeprom_file->data, EEPROM_SIZE);
} }
@@ -968,8 +968,9 @@ static int rt2800pci_validate_eeprom(str @@ -974,8 +974,9 @@ static int rt2800pci_validate_eeprom(str
/* /*
* Read EEPROM into buffer * Read EEPROM into buffer
*/ */
@ -30,8 +30,8 @@
+ struct rt2x00_platform_data *pdata; + struct rt2x00_platform_data *pdata;
struct rt2x00_dev *rt2x00dev; struct rt2x00_dev *rt2x00dev;
int retval; int retval;
u16 chip;
@@ -299,6 +300,12 @@ int rt2x00pci_probe(struct pci_dev *pci_ @@ -300,6 +301,12 @@ int rt2x00pci_probe(struct pci_dev *pci_
rt2x00dev->irq = pci_dev->irq; rt2x00dev->irq = pci_dev->irq;
rt2x00dev->name = pci_name(pci_dev); rt2x00dev->name = pci_name(pci_dev);

View File

@ -37,7 +37,7 @@
num_rates += 4; num_rates += 4;
--- a/drivers/net/wireless/rt2x00/rt2x00.h --- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -424,6 +424,7 @@ struct hw_mode_spec { @@ -425,6 +425,7 @@ struct hw_mode_spec {
unsigned int supported_bands; unsigned int supported_bands;
#define SUPPORT_BAND_2GHZ 0x00000001 #define SUPPORT_BAND_2GHZ 0x00000001
#define SUPPORT_BAND_5GHZ 0x00000002 #define SUPPORT_BAND_5GHZ 0x00000002

View File

@ -31,7 +31,7 @@
{ {
--- a/drivers/net/wireless/rt2x00/rt2x00.h --- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1279,6 +1279,7 @@ static inline void rt2x00debug_dump_fram @@ -1280,6 +1280,7 @@ static inline void rt2x00debug_dump_fram
*/ */
u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev, u32 rt2x00lib_get_bssidx(struct rt2x00_dev *rt2x00dev,
struct ieee80211_vif *vif); struct ieee80211_vif *vif);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/mwl8k.c --- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c
@@ -5296,6 +5296,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw") @@ -5297,6 +5297,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API)); MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = { static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {

View File

@ -88,7 +88,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dev->phy.writes_counter = 0; dev->phy.writes_counter = 0;
--- a/drivers/net/wireless/b43/phy_n.c --- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c
@@ -4837,14 +4837,14 @@ static inline void check_phyreg(struct b @@ -4838,14 +4838,14 @@ static inline void check_phyreg(struct b
static u16 b43_nphy_op_read(struct b43_wldev *dev, u16 reg) static u16 b43_nphy_op_read(struct b43_wldev *dev, u16 reg)
{ {
check_phyreg(dev, reg); check_phyreg(dev, reg);
@ -105,7 +105,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
b43_write16(dev, B43_MMIO_PHY_DATA, value); b43_write16(dev, B43_MMIO_PHY_DATA, value);
} }
@@ -4852,7 +4852,7 @@ static void b43_nphy_op_maskset(struct b @@ -4853,7 +4853,7 @@ static void b43_nphy_op_maskset(struct b
u16 set) u16 set)
{ {
check_phyreg(dev, reg); check_phyreg(dev, reg);
@ -114,7 +114,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
b43_maskset16(dev, B43_MMIO_PHY_DATA, mask, set); b43_maskset16(dev, B43_MMIO_PHY_DATA, mask, set);
} }
@@ -4863,7 +4863,7 @@ static u16 b43_nphy_op_radio_read(struct @@ -4864,7 +4864,7 @@ static u16 b43_nphy_op_radio_read(struct
/* N-PHY needs 0x100 for read access */ /* N-PHY needs 0x100 for read access */
reg |= 0x100; reg |= 0x100;
@ -123,7 +123,7 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW); return b43_read16(dev, B43_MMIO_RADIO_DATA_LOW);
} }
@@ -4872,7 +4872,7 @@ static void b43_nphy_op_radio_write(stru @@ -4873,7 +4873,7 @@ static void b43_nphy_op_radio_write(stru
/* Register 1 is a 32-bit register. */ /* Register 1 is a 32-bit register. */
B43_WARN_ON(reg == 1); B43_WARN_ON(reg == 1);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -4233,9 +4233,8 @@ static void brcms_c_radio_timer(void *ar @@ -4220,9 +4220,8 @@ static void brcms_c_radio_timer(void *ar
} }
/* common low-level watchdog code */ /* common low-level watchdog code */
@ -11,7 +11,7 @@
struct brcms_hardware *wlc_hw = wlc->hw; struct brcms_hardware *wlc_hw = wlc->hw;
BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit); BCMMSG(wlc->wiphy, "wl%d\n", wlc_hw->unit);
@@ -4256,10 +4255,8 @@ static void brcms_b_watchdog(void *arg) @@ -4243,10 +4242,8 @@ static void brcms_b_watchdog(void *arg)
} }
/* common watchdog code */ /* common watchdog code */
@ -23,7 +23,7 @@
BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit); BCMMSG(wlc->wiphy, "wl%d\n", wlc->pub->unit);
if (!wlc->pub->up) if (!wlc->pub->up)
@@ -4299,7 +4296,9 @@ static void brcms_c_watchdog(void *arg) @@ -4286,7 +4283,9 @@ static void brcms_c_watchdog(void *arg)
static void brcms_c_watchdog_by_timer(void *arg) static void brcms_c_watchdog_by_timer(void *arg)
{ {

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -1943,7 +1943,8 @@ static bool brcms_b_radio_read_hwdisable @@ -1944,7 +1944,8 @@ static bool brcms_b_radio_read_hwdisable
* accesses phyreg throughput mac. This can be skipped since * accesses phyreg throughput mac. This can be skipped since
* only mac reg is accessed below * only mac reg is accessed below
*/ */
@ -10,7 +10,7 @@
/* /*
* TODO: test suspend/resume * TODO: test suspend/resume
@@ -2024,7 +2025,8 @@ void brcms_b_corereset(struct brcms_hard @@ -2025,7 +2026,8 @@ void brcms_b_corereset(struct brcms_hard
* phyreg throughput mac, AND phy_reset is skipped at early stage when * phyreg throughput mac, AND phy_reset is skipped at early stage when
* band->pi is invalid. need to enable PHY CLK * band->pi is invalid. need to enable PHY CLK
*/ */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -270,7 +270,7 @@ struct brcms_c_bit_desc { @@ -271,7 +271,7 @@ struct brcms_c_bit_desc {
*/ */
/* Starting corerev for the fifo size table */ /* Starting corerev for the fifo size table */
@ -9,7 +9,7 @@
struct d11init { struct d11init {
__le16 addr; __le16 addr;
@@ -334,6 +334,26 @@ const u8 wlc_prio2prec_map[] = { @@ -335,6 +335,26 @@ const u8 wlc_prio2prec_map[] = {
}; };
static const u16 xmtfifo_sz[][NFIFO] = { static const u16 xmtfifo_sz[][NFIFO] = {
@ -36,7 +36,7 @@
/* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */ /* corerev 20: 5120, 49152, 49152, 5376, 4352, 1280 */
{20, 192, 192, 21, 17, 5}, {20, 192, 192, 21, 17, 5},
/* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */ /* corerev 21: 2304, 14848, 5632, 3584, 3584, 1280 */
@@ -344,6 +364,18 @@ static const u16 xmtfifo_sz[][NFIFO] = { @@ -345,6 +365,18 @@ static const u16 xmtfifo_sz[][NFIFO] = {
{20, 192, 192, 21, 17, 5}, {20, 192, 192, 21, 17, 5},
/* corerev 24: 2304, 14848, 5632, 3584, 3584, 1280 */ /* corerev 24: 2304, 14848, 5632, 3584, 3584, 1280 */
{9, 58, 22, 14, 14, 5}, {9, 58, 22, 14, 14, 5},
@ -55,7 +55,7 @@
}; };
#ifdef DEBUG #ifdef DEBUG
@@ -4611,8 +4643,15 @@ static int brcms_b_attach(struct brcms_c @@ -4598,8 +4630,15 @@ static int brcms_b_attach(struct brcms_c
wlc_hw->machwcap_backup = wlc_hw->machwcap; wlc_hw->machwcap_backup = wlc_hw->machwcap;
/* init tx fifo size */ /* init tx fifo size */

View File

@ -10,7 +10,7 @@
BCMA_CORETABLE_END BCMA_CORETABLE_END
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct @@ -752,7 +752,7 @@ static void brcms_c_ucode_bsinit(struct
brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs); brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
/* do band-specific ucode IHR, SHM, and SCR inits */ /* do band-specific ucode IHR, SHM, and SCR inits */
@ -19,7 +19,7 @@
if (BRCMS_ISNPHY(wlc_hw->band)) if (BRCMS_ISNPHY(wlc_hw->band))
brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16); brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);
else else
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct @@ -2277,7 +2277,7 @@ static void brcms_ucode_download(struct
if (wlc_hw->ucode_loaded) if (wlc_hw->ucode_loaded)
return; return;
@ -28,7 +28,7 @@
if (BRCMS_ISNPHY(wlc_hw->band)) { if (BRCMS_ISNPHY(wlc_hw->band)) {
brcms_ucode_write(wlc_hw, ucode->bcm43xx_16_mimo, brcms_ucode_write(wlc_hw, ucode->bcm43xx_16_mimo,
ucode->bcm43xx_16_mimosz); ucode->bcm43xx_16_mimosz);
@@ -3252,7 +3252,7 @@ static void brcms_b_coreinit(struct brcm @@ -3239,7 +3239,7 @@ static void brcms_b_coreinit(struct brcm
sflags = bcma_aread32(core, BCMA_IOST); sflags = bcma_aread32(core, BCMA_IOST);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -4166,6 +4166,7 @@ void brcms_c_wme_setparams(struct brcms_ @@ -4153,6 +4153,7 @@ void brcms_c_wme_setparams(struct brcms_
M_EDCF_QINFO + M_EDCF_QINFO +
wme_ac2fifo[aci] * M_EDCF_QLEN + i, wme_ac2fifo[aci] * M_EDCF_QLEN + i,
*shm_entry++); *shm_entry++);
@ -8,7 +8,7 @@
} }
if (suspend) { if (suspend) {
@@ -4570,7 +4571,8 @@ static int brcms_b_attach(struct brcms_c @@ -4557,7 +4558,8 @@ static int brcms_b_attach(struct brcms_c
/* check device id(srom, nvram etc.) to set bands */ /* check device id(srom, nvram etc.) to set bands */
if (wlc_hw->deviceid == BCM43224_D11N_ID || if (wlc_hw->deviceid == BCM43224_D11N_ID ||
@ -18,7 +18,7 @@
/* Dualband boards */ /* Dualband boards */
wlc_hw->_nbands = 2; wlc_hw->_nbands = 2;
else else
@@ -5831,7 +5833,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 d @@ -5816,7 +5818,7 @@ bool brcms_c_chipmatch(u16 vendor, u16 d
return false; return false;
} }

View File

@ -10,7 +10,7 @@
MODULE_DEVICE_TABLE(bcma, brcms_coreid_table); MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -751,7 +751,7 @@ static void brcms_c_ucode_bsinit(struct @@ -752,7 +752,7 @@ static void brcms_c_ucode_bsinit(struct
brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs); brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);
/* do band-specific ucode IHR, SHM, and SCR inits */ /* do band-specific ucode IHR, SHM, and SCR inits */
@ -19,7 +19,7 @@
if (BRCMS_ISNPHY(wlc_hw->band)) if (BRCMS_ISNPHY(wlc_hw->band))
brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16); brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);
else else
@@ -2276,7 +2276,7 @@ static void brcms_ucode_download(struct @@ -2277,7 +2277,7 @@ static void brcms_ucode_download(struct
if (wlc_hw->ucode_loaded) if (wlc_hw->ucode_loaded)
return; return;
@ -28,7 +28,7 @@
if (BRCMS_ISNPHY(wlc_hw->band)) { if (BRCMS_ISNPHY(wlc_hw->band)) {
brcms_ucode_write(wlc_hw, ucode->bcm43xx_16_mimo, brcms_ucode_write(wlc_hw, ucode->bcm43xx_16_mimo,
ucode->bcm43xx_16_mimosz); ucode->bcm43xx_16_mimosz);
@@ -3252,7 +3252,7 @@ static void brcms_b_coreinit(struct brcm @@ -3239,7 +3239,7 @@ static void brcms_b_coreinit(struct brcm
sflags = bcma_aread32(core, BCMA_IOST); sflags = bcma_aread32(core, BCMA_IOST);