summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-07-05 23:22:21 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-07-05 23:22:21 +0000
commitf1afa9701cf251314edce4d567af0459c2f53e3b (patch)
treee82e20cfc503ef93990bbe2f2597f8e373c30f69 /target/linux
parentc223e82fd455290ae2db23503c1197bc25981548 (diff)
use boards mac on boards with brn loader, on ifxmips
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11674 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ifxmips/files/arch/mips/ifxmips/board.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
index e4ef45408f..f0c2f70321 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
@@ -259,12 +259,17 @@ static struct ifxmips_board boards[] =
int
ifxmips_find_brn_block(void){
- unsigned char temp[0];
+ unsigned char temp[8];
memcpy_fromio(temp, (void*)KSEG1ADDR(IFXMIPS_FLASH_START + 0x800000 - 0x10000), 8);
if(memcmp(temp, "BRN-BOOT", 8) == 0)
+ {
+ if(!cmdline_mac)
+ memcpy_fromio(ifxmips_mii_mac, (void*)KSEG1ADDR(IFXMIPS_FLASH_START + 0x800000 - 0x10000 + 0x16), 6);
+ cmdline_mac = 1;
return 1;
- else
+ } else {
return 0;
+ }
}
int