@ -74,8 +74,10 @@ static int eth_mac_skip(int index)
{
char enetvar [ 15 ] ;
char * skip_state ;
sprintf ( enetvar , index ? " eth%dmacskip " : " ethmacskip " , index ) ;
return ( ( skip_state = getenv ( enetvar ) ) ! = NULL ) ;
skip_state = getenv ( enetvar ) ;
return skip_state ! = NULL ;
}
static void eth_current_changed ( void ) ;
@ -275,8 +277,9 @@ int eth_init(void)
priv - > state = ETH_STATE_ACTIVE ;
return 0 ;
}
} else
} else {
ret = eth_errno ;
}
debug ( " FAIL \n " ) ;
@ -640,7 +643,8 @@ int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
ret = dev - > write_hwaddr ( dev ) ;
if ( ret )
printf ( " \n Warning: %s failed to set MAC address \n " , dev - > name ) ;
printf ( " \n Warning: %s failed to set MAC address \n " ,
dev - > name ) ;
}
return ret ;
@ -654,7 +658,8 @@ int eth_register(struct eth_device *dev)
assert ( strlen ( dev - > name ) < sizeof ( dev - > name ) ) ;
if ( ! eth_devices ) {
eth_current = eth_devices = dev ;
eth_devices = dev ;
eth_current = dev ;
eth_current_changed ( ) ;
} else {
for ( d = eth_devices ; d - > next ! = eth_devices ; d = d - > next )
@ -725,8 +730,9 @@ int eth_initialize(void)
} else if ( cpu_eth_init ! = __def_eth_init ) {
if ( cpu_eth_init ( gd - > bd ) < 0 )
printf ( " CPU Net Initialization Failed \n " ) ;
} else
} else {
printf ( " Net Initialization Skipped \n " ) ;
}
if ( ! eth_devices ) {
puts ( " No ethernet found. \n " ) ;