IP4CONFIG_FORM_ENTRY *ConfigFormEntry;\r
BOOLEAN EntryExisted;\r
EFI_STATUS Status;\r
- EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
CHAR16 PortString[128];\r
UINT16 FormIndex;\r
VOID *StartOpCodeHandle;\r
InitializeListHead (&ConfigFormEntry->Link);\r
ConfigFormEntry->Controller = Instance->Controller;\r
\r
- //\r
- // Get the simple network protocol and convert the MAC address into\r
- // the formatted string.\r
- //\r
- Status = gBS->HandleProtocol (\r
- Instance->Controller,\r
- &gEfiSimpleNetworkProtocolGuid,\r
- (VOID **)&Snp\r
- );\r
+ Status = NetLibGetMacString (Instance->Controller, Instance->Image, &ConfigFormEntry->MacString);\r
ASSERT (Status == EFI_SUCCESS);\r
\r
- Ip4MacAddrToStr (&Snp->Mode->PermanentAddress, Snp->Mode->HwAddressSize, ConfigFormEntry->MacString);\r
-\r
//\r
// Compose the Port string and create a new EFI_STRING_ID.\r
//\r
\r
mNumberOfIp4Devices--;\r
RemoveEntryList (&ConfigFormEntry->Link);\r
+ FreePool (ConfigFormEntry->MacString);\r
FreePool (ConfigFormEntry);\r
}\r
\r