summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/image/pxe_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386/image/pxe_image.c')
-rw-r--r--src/arch/i386/image/pxe_image.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/arch/i386/image/pxe_image.c b/src/arch/i386/image/pxe_image.c
index 346d2048..3b5214d7 100644
--- a/src/arch/i386/image/pxe_image.c
+++ b/src/arch/i386/image/pxe_image.c
@@ -42,20 +42,14 @@ struct image_type pxe_image_type __image_type ( PROBE_PXE );
* @ret rc Return status code
*/
static int pxe_exec ( struct image *image ) {
- struct net_device *netdev;
int rc;
/* Ensure that PXE stack is ready to use */
pxe_init_structures();
pxe_hook_int1a();
- /* Arbitrarily pick the first open network device to use for PXE */
- for_each_netdev ( netdev ) {
- if ( netdev->state & NETDEV_OPEN ) {
- pxe_set_netdev ( netdev );
- break;
- }
- }
+ /* Arbitrarily pick the most recently opened network device */
+ pxe_set_netdev ( last_opened_netdev() );
/* Many things will break if pxe_netdev is NULL */
if ( ! pxe_netdev ) {