[PATCH] net: efi-snp: fix mac address change when it is not supported.

chalianis1 at gmail.com chalianis1 at gmail.com
Sat Sep 27 09:33:01 PDT 2025


From: Chali Anis <chalianis1 at gmail.com>

continue interface open if the efiret is unsupported since the mac address
change is not always supported, this permits to not fail when the network
could be used since it already has a network mac address configured, this 
is at least the case on qemu with certain versions of EDK2.

Signed-off-by: Chali Anis <chalianis1 at gmail.com>
---
 drivers/net/efi-snp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/efi-snp.c b/drivers/net/efi-snp.c
index 119358b6c880..b4d2abfecf77 100644
--- a/drivers/net/efi-snp.c
+++ b/drivers/net/efi-snp.c
@@ -219,7 +219,7 @@ static int efi_snp_eth_open(struct eth_device *edev)
 
 	efiret = priv->snp->station_address(priv->snp, false,
 			(struct efi_mac_address *)priv->snp->Mode->PermanentAddress.Addr );
-	if (EFI_ERROR(efiret)) {
+	if (EFI_ERROR(efiret) && efiret != EFI_UNSUPPORTED) {
 		dev_err(priv->dev, "failed to set MAC address: %s\n",
 				efi_strerror(efiret));
 		return -efi_errno(efiret);
-- 
2.34.1




More information about the barebox mailing list