\r
\r
EFI_SIMPLE_NETWORK_PROTOCOL gEmuSnpTemplate = {\r
- EFI_SIMPLE_NETWORK_PROTOCOL_REVISION, \r
- EmuSnpStart, \r
- EmuSnpStop, \r
- EmuSnpInitialize, \r
- EmuSnpReset, \r
- EmuSnpShutdown, \r
- EmuSnpReceiveFilters, \r
- EmuSnpStationAddress, \r
- EmuSnpStatistics, \r
- EmuSnpMcastIptoMac, \r
- EmuSnpNvdata, \r
- EmuSnpGetStatus, \r
- EmuSnpTransmit, \r
- EmuSnpReceive, \r
+ EFI_SIMPLE_NETWORK_PROTOCOL_REVISION,\r
+ EmuSnpStart,\r
+ EmuSnpStop,\r
+ EmuSnpInitialize,\r
+ EmuSnpReset,\r
+ EmuSnpShutdown,\r
+ EmuSnpReceiveFilters,\r
+ EmuSnpStationAddress,\r
+ EmuSnpStatistics,\r
+ EmuSnpMcastIptoMac,\r
+ EmuSnpNvdata,\r
+ EmuSnpGetStatus,\r
+ EmuSnpTransmit,\r
+ EmuSnpReceive,\r
NULL, // WaitForPacket\r
NULL // Mode\r
};\r
\r
-\r
+EFI_SIMPLE_NETWORK_MODE gEmuSnpModeTemplate = { \r
+ EfiSimpleNetworkStopped, // State\r
+ NET_ETHER_ADDR_LEN, // HwAddressSize\r
+ NET_ETHER_HEADER_SIZE, // MediaHeaderSize\r
+ 1500, // MaxPacketSize\r
+ 0, // NvRamSize\r
+ 0, // NvRamAccessSize\r
+ 0, // ReceiveFilterMask\r
+ 0, // ReceiveFilterSetting\r
+ MAX_MCAST_FILTER_CNT, // MaxMCastFilterCount\r
+ 0, // MCastFilterCount\r
+ {\r
+ { { 0 } }\r
+ }, // MCastFilter\r
+ {\r
+ { 0 }\r
+ }, // CurrentAddress\r
+ {\r
+ { 0 }\r
+ }, // BroadcastAddress\r
+ {\r
+ { 0 }\r
+ }, // PermanentAddress\r
+ NET_IFTYPE_ETHERNET, // IfType\r
+ FALSE, // MacAddressChangeable\r
+ FALSE, // MultipleTxSupported\r
+ FALSE, // MediaPresentSupported\r
+ TRUE // MediaPresent\r
+};\r
\r
\r
/**\r
\r
\r
/**\r
- Resets a network adapter and allocates the transmit and receive buffers \r
- required by the network interface; optionally, also requests allocation \r
+ Resets a network adapter and allocates the transmit and receive buffers\r
+ required by the network interface; optionally, also requests allocation\r
of additional transmit and receive buffers.\r
\r
@param This Protocol instance pointer.\r
}\r
\r
/**\r
- Resets a network adapter and re-initializes it with the parameters that were \r
- provided in the previous call to Initialize(). \r
+ Resets a network adapter and re-initializes it with the parameters that were\r
+ provided in the previous call to Initialize().\r
\r
@param This Protocol instance pointer.\r
@param ExtendedVerification Indicates that the driver may perform a more\r
}\r
\r
/**\r
- Resets a network adapter and leaves it in a state that is safe for \r
+ Resets a network adapter and leaves it in a state that is safe for\r
another driver to initialize.\r
\r
@param This Protocol instance pointer.\r
\r
\r
/**\r
- Performs read and write operations on the NVRAM device attached to a \r
+ Performs read and write operations on the NVRAM device attached to a\r
network interface.\r
\r
@param This Protocol instance pointer.\r
\r
\r
/**\r
- Reads the current interrupt status and recycled transmit buffer status from \r
+ Reads the current interrupt status and recycled transmit buffer status from\r
a network interface.\r
\r
@param This Protocol instance pointer.\r
}\r
}\r
}\r
- \r
- \r
+\r
+\r
//\r
// Open the IO Abstraction(s) needed to perform the supported test\r
//\r
return Status;\r
}\r
\r
- //\r
- // Make sure GUID is for a File System handle.\r
- //\r
- Status = EFI_UNSUPPORTED;\r
- if (CompareGuid (EmuIoThunk->Protocol, &gEmuSnpProtocolGuid)) {\r
- Status = EFI_SUCCESS;\r
- }\r
-\r
//\r
// Close the I/O Abstraction(s) used to perform the supported test\r
//\r
This->DriverBindingHandle,\r
ControllerHandle\r
);\r
- \r
- \r
+\r
+\r
//\r
// Open the EFI Device Path protocol needed to perform the supported test\r
//\r
return Status;\r
}\r
\r
+ //\r
+ // Make sure GUID is for a SNP handle.\r
+ //\r
+ Status = EFI_UNSUPPORTED;\r
+ if (CompareGuid (EmuIoThunk->Protocol, &gEmuSnpProtocolGuid)) {\r
+ Status = EFI_SUCCESS;\r
+ }\r
+\r
//\r
// Close protocol, don't use device path protocol in the Support() function\r
//\r
}\r
\r
CopyMem (&Private->Snp, &gEmuSnpTemplate, sizeof (EFI_SIMPLE_NETWORK_PROTOCOL));\r
+ CopyMem (&Private->Mode, &gEmuSnpModeTemplate, sizeof (EFI_SIMPLE_NETWORK_MODE));\r
\r
Private->Signature = EMU_SNP_PRIVATE_DATA_SIGNATURE;\r
Private->IoThunk = EmuIoThunk;\r
Private->Snp.Mode = &Private->Mode;\r
Private->ControllerNameTable = NULL;\r
\r
- \r
+\r
Status = Private->Io->CreateMapping (Private->Io, &Private->Mode);\r
if (EFI_ERROR (Status)) {\r
goto Done;\r
EmuIoThunk->ConfigString,\r
TRUE\r
);\r
- \r
+\r
AddUnicodeString2 (\r
"en",\r
gEmuSnpDriverComponentName2.SupportedLanguages,\r
restrictions for this service. DisconnectController()\r
must follow these calling restrictions. If any other agent wishes\r
to call Stop() it must also follow these calling restrictions.\r
- \r
+\r
@param This Protocol instance pointer.\r
@param ControllerHandle Handle of device to stop driver on\r
@param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
}\r
\r
ASSERT (NumberOfChildren == 1);\r
- \r
- \r
+\r
+\r
//\r
// Get our context back.\r
//\r
//\r
// Install the Driver Protocols\r
//\r
-\r
Status = EfiLibInstallDriverBindingComponentName2(\r
ImageHandle,\r
SystemTable,\r