summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-04 15:53:12 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-04-04 15:53:12 +0000
commit1a38049d595d34da77c821df63583df8ef57747a (patch)
treea84c3f38302fe229181183e5f7c1cb8a450a46b9
parent002c3c665289b52eb20fd899fd3561e7f9d9e073 (diff)
[adm5120] add Edimax specific MAGIC_MAC_BASE to read MAC from flash (#4241]
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31195 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/adm5120/files/arch/mips/adm5120/prom/admboot.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/prom/admboot.c b/target/linux/adm5120/files/arch/mips/adm5120/prom/admboot.c
index 5d436f62f6..b655390c16 100644
--- a/target/linux/adm5120/files/arch/mips/adm5120/prom/admboot.c
+++ b/target/linux/adm5120/files/arch/mips/adm5120/prom/admboot.c
@@ -20,7 +20,8 @@
#include <prom/admboot.h>
#include "prom_read.h"
-#define ADMBOOT_MAGIC_MAC_BASE 0x636D676D /* 'mgmc' */
+#define ADMBOOT_MAGIC_MAC_BASE 0x636D676D /* 'mgmc' */
+#define ADMBOOT_MAGIC_MAC_BASE_BR6104XX 0x31305348 /* 'HS01' */
int __init admboot_get_mac_base(u32 offset, u32 len, u8 *mac)
{
@@ -40,6 +41,14 @@ int __init admboot_get_mac_base(u32 offset, u32 len, u8 *mac)
return 0;
}
+ if (magic == ADMBOOT_MAGIC_MAC_BASE_BR6104XX) {
+ int j;
+
+ for (j = 0; j < 6; j++)
+ mac[j] = cfg[i + 7 + j];
+
+ return 0;
+ }
}
return -ENXIO;