aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-02-09 16:27:35 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-02-09 16:27:35 +0000
commit0cbc5f678d3b76ff44c1d0370090caf0eb43cb33 (patch)
treef5c6f7fea4aadd85259395dab0db92a7e69dff2b /target/linux/ar71xx
parent40ba15806fcd52982135c367f49a8ac3ce85913f (diff)
downloadupstream-0cbc5f678d3b76ff44c1d0370090caf0eb43cb33.tar.gz
upstream-0cbc5f678d3b76ff44c1d0370090caf0eb43cb33.tar.bz2
upstream-0cbc5f678d3b76ff44c1d0370090caf0eb43cb33.zip
ar71xx/mac80211: add a workaround for the bad signal strength on the WNDR3700
SVN-Revision: 19565
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c8
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h11
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c3
-rw-r--r--target/linux/ar71xx/files/include/linux/ath9k_platform.h2
4 files changed, 18 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c
index 920ab6c725..bfa668f74f 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.c
@@ -1,7 +1,7 @@
/*
* Atheros AP94 reference board PCI initialization
*
- * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -125,6 +125,12 @@ static void ap94_pci_fixup(struct pci_dev *dev)
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID, ap94_pci_fixup);
+void __init ap94_pci_enable_quirk_wndr3700(void)
+{
+ ap94_wmac0_data.quirk_wndr3700 = 1;
+ ap94_wmac1_data.quirk_wndr3700 = 1;
+}
+
void __init ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
u8 *cal_data1, u8 *mac_addr1)
{
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h
index 7969ed4270..e69ba55e53 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap94-pci.h
@@ -1,7 +1,7 @@
/*
* Atheros AP94 reference board PCI initialization
*
- * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -14,11 +14,14 @@
#if defined(CONFIG_AR71XX_DEV_AP94_PCI)
void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
u8 *cal_data1, u8 *mac_addr1) __init;
+
+void ap94_pci_enable_quirk_wndr3700(void) __init;
+
#else
static inline void ap94_pci_init(u8 *cal_data0, u8 *mac_addr0,
- u8 *cal_data1, u8 *mac_addr1)
-{
-}
+ u8 *cal_data1, u8 *mac_addr1) {}
+
+static inline void ap94_pci_enable_quirk_wndr3700(void) {}
#endif
#endif /* _AR71XX_DEV_AP94_PCI_H */
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
index a0eb8d4826..eaa9654aaa 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
@@ -2,7 +2,7 @@
* Netgear WNDR3700 board support
*
* Copyright (C) 2009 Marco Porsch
- * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
+ * Copyright (C) 2009-2010 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
@@ -191,6 +191,7 @@ static void __init wndr3700_setup(void)
platform_device_register(&wndr3700_rtl8366s_device);
platform_device_register_simple("wndr3700-led-usb", -1, NULL, 0);
+ ap94_pci_enable_quirk_wndr3700();
ap94_pci_init(art + WNDR3700_CALDATA0_OFFSET,
art + WNDR3700_WMAC0_MAC_OFFSET,
art + WNDR3700_CALDATA1_OFFSET,
diff --git a/target/linux/ar71xx/files/include/linux/ath9k_platform.h b/target/linux/ar71xx/files/include/linux/ath9k_platform.h
index 9fb8c6e422..3c22012028 100644
--- a/target/linux/ar71xx/files/include/linux/ath9k_platform.h
+++ b/target/linux/ar71xx/files/include/linux/ath9k_platform.h
@@ -16,6 +16,8 @@
struct ath9k_platform_data {
u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
u8 *macaddr;
+
+ unsigned long quirk_wndr3700:1;
};
#endif /* _LINUX_ATH9K_PLATFORM_H */