|
@@ -232,16 +232,16 @@ static int intel_fetch_mac ( struct intel_nic *intel, uint8_t *hw_addr ) {
|
232
|
232
|
DBGC ( intel, "INTEL %p has autoloaded MAC address %s\n",
|
233
|
233
|
intel, eth_ntoa ( mac.raw ) );
|
234
|
234
|
|
235
|
|
- /* Try to read address from EEPROM */
|
236
|
|
- if ( ( rc = intel_fetch_mac_eeprom ( intel, hw_addr ) ) == 0 )
|
237
|
|
- return 0;
|
238
|
|
-
|
239
|
235
|
/* Use current address if valid */
|
240
|
236
|
if ( is_valid_ether_addr ( mac.raw ) ) {
|
241
|
237
|
memcpy ( hw_addr, mac.raw, ETH_ALEN );
|
242
|
238
|
return 0;
|
243
|
239
|
}
|
244
|
240
|
|
|
241
|
+ /* Otherwise, try to read address from EEPROM */
|
|
242
|
+ if ( ( rc = intel_fetch_mac_eeprom ( intel, hw_addr ) ) == 0 )
|
|
243
|
+ return 0;
|
|
244
|
+
|
245
|
245
|
DBGC ( intel, "INTEL %p has no MAC address to use\n", intel );
|
246
|
246
|
return -ENOENT;
|
247
|
247
|
}
|