From 61b4585e2aa273cd75a4da4369f2bc9e3095290d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 27 Aug 2025 13:12:11 +0100 Subject: [PATCH] [efi] Drag in MNP driver whenever SNP driver is present The chainloaded-device-only "snponly" driver already drags in support for driving SNP, NII, and MNP devices, on the basis that the user generally doesn't care which UEFI API is used and just wants to boot from the same network device that was used to load iPXE. The multi-device "snp" driver already drags in support for driving SNP and NII devices, but does not drag in support for MNP devices. There is essentially zero code size overhead to dragging in support for MNP devices, since this support is always present in any iPXE application build anyway (as part of the code to download "autoexec.ipxe" prior to installing our own drivers). Minimise surprise by dragging in support for MNP devices whenever using the "snp" driver, following the same reasoning used for the "snponly" driver. Signed-off-by: Michael Brown --- src/drivers/net/efi/snp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/drivers/net/efi/snp.c b/src/drivers/net/efi/snp.c index a675050e4..854fa872d 100644 --- a/src/drivers/net/efi/snp.c +++ b/src/drivers/net/efi/snp.c @@ -75,3 +75,7 @@ struct efi_driver nii_driver __efi_driver ( EFI_DRIVER_NII ) = { .start = nii_start, .stop = nii_stop, }; + +/** Drag in MNP driver */ +REQUIRING_SYMBOL ( snp_driver ); +REQUIRE_SYMBOL ( mnp_driver ); -- 2.47.3