|
@@ -33,7 +33,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
33
|
33
|
#include <ipxe/profile.h>
|
34
|
34
|
#include <ipxe/base16.h>
|
35
|
35
|
#include <ipxe/smbios.h>
|
36
|
|
-#include <ipxe/fdt.h>
|
37
|
36
|
#include "smsc95xx.h"
|
38
|
37
|
|
39
|
38
|
/** @file
|
|
@@ -159,32 +158,6 @@ static int smsc95xx_vm3_fetch_mac ( struct smscusb_device *smscusb ) {
|
159
|
158
|
return 0;
|
160
|
159
|
}
|
161
|
160
|
|
162
|
|
-/**
|
163
|
|
- * Fetch MAC address from device tree
|
164
|
|
- *
|
165
|
|
- * @v smscusb SMSC USB device
|
166
|
|
- * @ret rc Return status code
|
167
|
|
- */
|
168
|
|
-static int smsc95xx_fdt_fetch_mac ( struct smscusb_device *smscusb ) {
|
169
|
|
- struct net_device *netdev = smscusb->netdev;
|
170
|
|
- unsigned int offset;
|
171
|
|
- int rc;
|
172
|
|
-
|
173
|
|
- /* Look for "ethernet[0]" alias */
|
174
|
|
- if ( ( rc = fdt_alias ( "ethernet", &offset ) != 0 ) &&
|
175
|
|
- ( rc = fdt_alias ( "ethernet0", &offset ) != 0 ) ) {
|
176
|
|
- return rc;
|
177
|
|
- }
|
178
|
|
-
|
179
|
|
- /* Fetch MAC address */
|
180
|
|
- if ( ( rc = fdt_mac ( offset, netdev ) ) != 0 )
|
181
|
|
- return rc;
|
182
|
|
-
|
183
|
|
- DBGC ( smscusb, "SMSC95XX %p using FDT MAC %s\n",
|
184
|
|
- smscusb, eth_ntoa ( netdev->hw_addr ) );
|
185
|
|
- return 0;
|
186
|
|
-}
|
187
|
|
-
|
188
|
161
|
/**
|
189
|
162
|
* Fetch MAC address
|
190
|
163
|
*
|
|
@@ -200,8 +173,8 @@ static int smsc95xx_fetch_mac ( struct smscusb_device *smscusb ) {
|
200
|
173
|
SMSC95XX_E2P_BASE ) ) == 0 )
|
201
|
174
|
return 0;
|
202
|
175
|
|
203
|
|
- /* Read MAC address from device tree */
|
204
|
|
- if ( ( rc = smsc95xx_fdt_fetch_mac ( smscusb ) ) == 0 )
|
|
176
|
+ /* Read MAC address from device tree, if present */
|
|
177
|
+ if ( ( rc = smscusb_fdt_fetch_mac ( smscusb ) ) == 0 )
|
205
|
178
|
return 0;
|
206
|
179
|
|
207
|
180
|
/* Construct MAC address for Honeywell VM3, if applicable */
|