1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-10-01 14:24:20 +03:00

[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
This commit is contained in:
florian 2012-04-04 15:53:12 +00:00
parent 002c3c6652
commit 1a38049d59

View File

@ -21,6 +21,7 @@
#include "prom_read.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) 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; 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; return -ENXIO;