diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-02-21 17:58:21 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-02-21 17:58:21 +0000 |
commit | 8dc3842e7f72321e512e3dcb57631dc9af054766 (patch) | |
tree | 34b5ff010fe53dcf7de1561210474098064454d0 /target/linux/ar71xx | |
parent | 96cd75dc05256f550a3b8a829b34c7bd1cd66156 (diff) |
ar71xx: fix MAC address assignment on the DIR-825-Bx boards
Use the same MAC addresses as the original firmware.
Based on a patch from #10421.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Tested-by: Gabor Varga <vargagab@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35730 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c index 476cbd98e2..c958664445 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-dir-825-b1.c @@ -138,7 +138,8 @@ static bool __init dir825b1_is_caldata_valid(u8 *p) static void __init dir825b1_wlan_init(void) { u8 *caldata; - u8 mac1[ETH_ALEN], mac2[ETH_ALEN]; + u8 mac0[ETH_ALEN], mac1[ETH_ALEN]; + u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN]; caldata = (u8 *) KSEG1ADDR(DIR825B1_CAL_LOCATION_0); if (!dir825b1_is_caldata_valid(caldata)) { @@ -149,17 +150,19 @@ static void __init dir825b1_wlan_init(void) } } - dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC0_OFFSET); - dir825b1_read_ascii_mac(mac2, caldata + DIR825B1_MAC1_OFFSET); + dir825b1_read_ascii_mac(mac0, caldata + DIR825B1_MAC0_OFFSET); + dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC1_OFFSET); - ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 2); - ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 3); + ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 0); + ath79_init_mac(wmac0, mac0, 0); + ath79_init_mac(wmac1, mac1, 1); ap9x_pci_setup_wmac_led_pin(0, 5); ap9x_pci_setup_wmac_led_pin(1, 5); - ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, mac1, - caldata + DIR825B1_CAL1_OFFSET, mac2); + ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, wmac0, + caldata + DIR825B1_CAL1_OFFSET, wmac1); } static void __init dir825b1_setup(void) |