]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Drag in MNP driver whenever SNP driver is present
authorMichael Brown <mcb30@ipxe.org>
Wed, 27 Aug 2025 12:12:11 +0000 (13:12 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 27 Aug 2025 12:12:11 +0000 (13:12 +0100)
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 <mcb30@ipxe.org>
src/drivers/net/efi/snp.c

index a675050e407ec4ccd0b9210e719c84d0f7a9b813..854fa872d3a1c263b8e054c1fcd614972911a979 100644 (file)
@@ -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 );