diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-02-09 12:53:52 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-02-09 12:53:52 +0000 |
commit | 940f064a150b57b8fc1c3197601134955b6a29f4 (patch) | |
tree | 625339715f5ee1387d1dc674f6a07491def23b7a /target | |
parent | bea48c93790c69dc7cfe8032d2cdc72f67828bd0 (diff) | |
download | upstream-940f064a150b57b8fc1c3197601134955b6a29f4.tar.gz upstream-940f064a150b57b8fc1c3197601134955b6a29f4.tar.bz2 upstream-940f064a150b57b8fc1c3197601134955b6a29f4.zip |
AA: ar71xx: Routerboard 751 Mac Address Offset Fix
Backport of r35519.
We utilize many Routerboard 751's and discovered that our latest batch
of RB751's would not initialize the wireless radio. We have determined
Mikrotik has changed where the mac address was located inside hardconfig.
As such we utilize "routerboot_find_tag" to find the location of the mac
address. We should remove "RB751_MAC_ADDRESS_OFFSET" as it is ambiguous
by machine manufacturing date. The newer batch of RB751's that we received
had a RB751_MAC_ADDRESS_OFFSET 0x10.
Signed-off-by: Davey Hutchison <dhutchison@bluemesh.net>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@35531 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c index 71d48679d2..8224bebf89 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c @@ -282,7 +282,6 @@ MIPS_MACHINE(ATH79_MACH_RB_750G_R3, "750Gr3", "MikroTik RouterBOARD 750GL", #define RB751_HARDCONFIG 0x1f00b000 #define RB751_HARDCONFIG_SIZE 0x1000 -#define RB751_MAC_ADDRESS_OFFSET 0xE80 static void __init rb751_wlan_setup(void) { @@ -290,6 +289,8 @@ static void __init rb751_wlan_setup(void) struct ath9k_platform_data *wmac_data; u16 tag_len; u8 *tag; + u16 mac_len; + u8 *mac; int err; wmac_data = ap9x_pci_get_wmac_data(0); @@ -314,7 +315,14 @@ static void __init rb751_wlan_setup(void) return; } - ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET); + err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE, + RB_ID_MAC_ADDRESS_PACK, &mac, &mac_len); + if (err) { + pr_err("rb75x: no mac address found\n"); + return; + } + + ap91_pci_init(NULL, mac); } static void __init rb751_setup(void) |