diff options
Diffstat (limited to 'target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c')
-rw-r--r-- | target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c index dd506aa..8edca5b 100644 --- a/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c +++ b/target/linux/adm5120/files-2.6.26/arch/mips/adm5120/mikrotik/rb-1xx.c @@ -101,15 +101,13 @@ struct gpio_button rb1xx_gpio_buttons[] __initdata = { static void __init rb1xx_mac_setup(void) { - int i, j; + if (rb_hs.mac_base != NULL && is_valid_ether_addr(rb_hs.mac_base)) { + adm5120_setup_eth_macs(rb_hs.mac_base); + } else { + u8 mac[ETH_ALEN]; - if (!rb_hs.mac_base) - return; - - for (i = 0; i < 6; i++) { - for (j = 0; j < 5; j++) - adm5120_eth_macs[i][j] = rb_hs.mac_base[j]; - adm5120_eth_macs[i][5] = rb_hs.mac_base[5]+i; + random_ether_addr(mac); + adm5120_setup_eth_macs(mac); } } |