summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-11-28 18:01:09 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-11-28 18:01:09 +0000
commitcfe5a8b5930158a9d1b4aed047088d652116e6e4 (patch)
treef72a3dfe21e29ec19fff319ed97587ea9c758096 /target/linux
parent0fd020c268360c6caac1ee3fb0f2396303483c70 (diff)
downloadmtk-20170518-cfe5a8b5930158a9d1b4aed047088d652116e6e4.zip
mtk-20170518-cfe5a8b5930158a9d1b4aed047088d652116e6e4.tar.gz
mtk-20170518-cfe5a8b5930158a9d1b4aed047088d652116e6e4.tar.bz2
ar71xx: fix mac address for 5GHz interface on WNDR3700
SVN-Revision: 18586
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c14
1 files changed, 9 insertions, 5 deletions
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 472d603..5f95270 100644
--- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
+++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
@@ -107,7 +107,9 @@ static struct ar71xx_pci_irq wndr3700_pci_irqs[] __initdata = {
};
static struct ath9k_platform_data wndr3700_wmac0_data;
+static u8 wndr3700_wmac0_macaddr[6];
static struct ath9k_platform_data wndr3700_wmac1_data;
+static u8 wndr3700_wmac1_macaddr[6];
static void wndr3700_pci_fixup(struct pci_dev *dev)
{
@@ -201,15 +203,17 @@ static int wndr3700_pci_plat_dev_init(struct pci_dev *dev)
static void __init wndr3700_pci_init(void)
{
- u8 *ee;
+ u8 *ee = (u8 *) KSEG1ADDR(0x1fff0000);
- ee = (u8 *) KSEG1ADDR(0x1fff1000);
- memcpy(wndr3700_wmac0_data.eeprom_data, ee,
+ memcpy(wndr3700_wmac0_data.eeprom_data, ee + 0x1000,
sizeof(wndr3700_wmac0_data.eeprom_data));
+ memcpy(wndr3700_wmac0_macaddr, ee, sizeof(wndr3700_wmac0_macaddr));
+ wndr3700_wmac0_data.macaddr = wndr3700_wmac0_macaddr;
- ee = (u8 *) KSEG1ADDR(0x1fff5000);
- memcpy(wndr3700_wmac1_data.eeprom_data, ee,
+ memcpy(wndr3700_wmac1_data.eeprom_data, ee + 0x5000,
sizeof(wndr3700_wmac1_data.eeprom_data));
+ memcpy(wndr3700_wmac1_macaddr, ee + 12, sizeof(wndr3700_wmac1_macaddr));
+ wndr3700_wmac1_data.macaddr = wndr3700_wmac1_macaddr;
ar71xx_pci_plat_dev_init = wndr3700_pci_plat_dev_init;
ar71xx_pci_init(ARRAY_SIZE(wndr3700_pci_irqs), wndr3700_pci_irqs);