2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00

The "increment MAC address by port number" hack applies only to EF1.

This commit is contained in:
Michael Brown 2006-12-18 15:28:34 +00:00
parent 530bbf7cca
commit a497e16767

View File

@ -1218,8 +1218,13 @@ static int ef1002_read_eeprom ( struct efab_nic *efab ) {
struct i2c_interface *i2c = &efab->ef1002_i2c.i2c;
struct i2c_device *i2cdev = &efab->ef1002_eeprom;
return ( i2c->read ( i2c, i2cdev, EF1_EEPROM_HWADDR_OFFSET,
efab->mac_addr, sizeof ( efab->mac_addr ) ) == 0);
if ( i2c->read ( i2c, i2cdev, EF1_EEPROM_HWADDR_OFFSET,
efab->mac_addr, sizeof ( efab->mac_addr ) ) != 0 )
return 0;
efab->mac_addr[ETH_ALEN-1] += efab->port;
return 1;
}
/** RX descriptor */
@ -3194,7 +3199,6 @@ static int efab_init_nic ( struct efab_nic *efab ) {
/* Read MAC address from EEPROM */
if ( ! efab->op->read_eeprom ( efab ) )
return 0;
efab->mac_addr[ETH_ALEN-1] += efab->port;
/* Initialise MAC and wait for link up */
if ( ! efab_init_mac ( efab ) )