tools: edimax_fw_header: fix suspicious memset usage
[15.05/openwrt.git] / target / linux / adm5120 / files / arch / mips / adm5120 / prom / myloader.c
index e85ef7a..5357db5 100644 (file)
@@ -1,10 +1,7 @@
 /*
- *  $Id$
- *
  *  Compex's MyLoader specific prom routines
  *
- *  Copyright (C) 2007 OpenWrt.org
- *  Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org>
+ *  Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
  *
  *  This program is free software; you can redistribute it and/or modify it
  *  under the terms of the GNU General Public License version 2 as published
@@ -13,7 +10,6 @@
  */
 
 #include <linux/types.h>
-#include <linux/autoconf.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/string.h>
@@ -22,7 +18,7 @@
 #include <asm/addrspace.h>
 #include <asm/byteorder.h>
 
-#include <adm5120_defs.h>
+#include <asm/mach-adm5120/adm5120_defs.h>
 #include <prom/myloader.h>
 #include "prom_read.h"
 
@@ -39,6 +35,7 @@ int __init myloader_present(void)
        struct mylo_system_params *sysp;
        struct mylo_board_params *boardp;
        struct mylo_partition_table *parts;
+       int i;
 
        if (myloader_found)
                goto out;
@@ -58,6 +55,12 @@ int __init myloader_present(void)
        myloader_info.svid = le32_to_cpu(sysp->svid);
        myloader_info.sdid = le32_to_cpu(sysp->sdid);
 
+       for (i = 0; i < MYLO_ETHADDR_COUNT; i++) {
+               int j;
+               for (j = 0; j < 6; j++)
+                       myloader_info.macs[i][j] = boardp->addr[i].mac[j];
+       }
+
        myloader_found = 1;
 
 out: