diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-02-21 17:58:21 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-02-21 17:58:21 +0000 |
commit | bcac3c556947ddf6e3c740e464a49daedcc62cc9 (patch) | |
tree | a1a77e9a77aea9d6b3877645908c1158447c7431 /target/linux | |
parent | d785803bfa3e3690ac4ecb051aab47eb28fe70d7 (diff) | |
download | upstream-bcac3c556947ddf6e3c740e464a49daedcc62cc9.tar.gz upstream-bcac3c556947ddf6e3c740e464a49daedcc62cc9.tar.bz2 upstream-bcac3c556947ddf6e3c740e464a49daedcc62cc9.zip |
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>
SVN-Revision: 35730
Diffstat (limited to 'target/linux')
-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) |