aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/adm5120/files
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-04-04 15:53:12 +0000
committerFlorian Fainelli <florian@openwrt.org>2012-04-04 15:53:12 +0000
commit09ade17a15c4d4c67449e52a1dc7f76cacdc433d (patch)
tree332a2cccb7a631e6c14493e313c5d3199869e584 /target/linux/adm5120/files
parentb180e0fb3b1b3b89b2ac0e9502919ab4b1785af7 (diff)
downloadupstream-09ade17a15c4d4c67449e52a1dc7f76cacdc433d.tar.gz
upstream-09ade17a15c4d4c67449e52a1dc7f76cacdc433d.tar.bz2
upstream-09ade17a15c4d4c67449e52a1dc7f76cacdc433d.zip
add Edimax specific MAGIC_MAC_BASE to read MAC from flash (#4241]
SVN-Revision: 31195
Diffstat (limited to 'target/linux/adm5120/files')
-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;