]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h
Add VLAN support.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / MnpImpl.h
index b9fa4ab34326011299f5c9632ec1f09d022ed2ec..d35086221e0956eb3adba35fa2201e2e353b41e9 100644 (file)
@@ -1,10 +1,11 @@
 /** @file\r
   Declaration of structures and functions of MnpDxe driver.\r
-    \r
-Copyright (c) 2005 - 2009, Intel Corporation. <BR>\r
+\r
+Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
 All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
+are licensed and made available under the terms and conditions\r
+of the BSD License which accompanies this distribution.  The full\r
+text of the license may be found at<BR>\r
 http://opensource.org/licenses/bsd-license.php\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
@@ -90,6 +91,57 @@ typedef struct {
   UINT64                            TimeoutTick;\r
 } MNP_RXDATA_WRAP;\r
 \r
+\r
+/**\r
+  Initialize the mnp device context data.\r
+\r
+  @param[in, out]  MnpDeviceData      Pointer to the mnp device context data.\r
+  @param[in]       ImageHandle        The driver image handle.\r
+  @param[in]       ControllerHandle   Handle of device to bind driver to.\r
+\r
+  @retval EFI_SUCCESS           The mnp service context is initialized.\r
+  @retval EFI_UNSUPPORTED       ControllerHandle does not support Simple Network Protocol.\r
+  @retval Others                Other errors as indicated.\r
+\r
+**/\r
+EFI_STATUS\r
+MnpInitializeDeviceData (\r
+  IN OUT MNP_DEVICE_DATA   *MnpDeviceData,\r
+  IN     EFI_HANDLE        ImageHandle,\r
+  IN     EFI_HANDLE        ControllerHandle\r
+  );\r
+\r
+/**\r
+  Destroy the MNP device context data.\r
+\r
+  @param[in, out]  MnpDeviceData      Pointer to the mnp device context data.\r
+  @param[in]       ImageHandle        The driver image handle.\r
+\r
+**/\r
+VOID\r
+MnpDestroyDeviceData (\r
+  IN OUT MNP_DEVICE_DATA   *MnpDeviceData,\r
+  IN     EFI_HANDLE        ImageHandle\r
+  );\r
+\r
+/**\r
+  Create mnp service context data.\r
+\r
+  @param[in]       MnpDeviceData      Pointer to the mnp device context data.\r
+  @param[in]       VlanId             The VLAN ID.\r
+  @param[in]       Priority           The VLAN priority. If VlanId is 0,\r
+                                      Priority is ignored.\r
+\r
+  @return A pointer to MNP_SERVICE_DATA or NULL if failed to create MNP service context.\r
+\r
+**/\r
+MNP_SERVICE_DATA *\r
+MnpCreateServiceData (\r
+  IN MNP_DEVICE_DATA     *MnpDeviceData,\r
+  IN UINT16              VlanId,\r
+  IN UINT8                Priority OPTIONAL\r
+  );\r
+\r
 /**\r
   Initialize the mnp service context data.\r
 \r
@@ -104,36 +156,66 @@ typedef struct {
 **/\r
 EFI_STATUS\r
 MnpInitializeServiceData (\r
-  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN EFI_HANDLE            ImageHandle,\r
-  IN EFI_HANDLE            ControllerHandle\r
+  IN OUT MNP_SERVICE_DATA    *MnpServiceData,\r
+  IN     EFI_HANDLE          ImageHandle,\r
+  IN     EFI_HANDLE          ControllerHandle\r
   );\r
 \r
 /**\r
-  Flush the mnp service context data.\r
+  Destroy the MNP service context data.\r
 \r
   @param[in, out]  MnpServiceData    Pointer to the mnp service context data.\r
-  @param[in]       ImageHandle       The driver image handle.\r
+\r
+  @retval EFI_SUCCESS           The mnp service context is destroyed.\r
+  @retval Others                Errors as indicated.\r
 \r
 **/\r
-VOID\r
-MnpFlushServiceData (\r
-  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN EFI_HANDLE            ImageHandle\r
+EFI_STATUS\r
+MnpDestroyServiceData (\r
+  IN OUT MNP_SERVICE_DATA    *MnpServiceData\r
+  );\r
+\r
+/**\r
+  Destroy all child of the MNP service data.\r
+\r
+  @param[in, out]  MnpServiceData    Pointer to the mnp service context data.\r
+\r
+  @retval EFI_SUCCESS           All child are destroyed.\r
+  @retval Others                Failed to destroy all child.\r
+\r
+**/\r
+EFI_STATUS\r
+MnpDestroyServiceChild (\r
+  IN OUT MNP_SERVICE_DATA    *MnpServiceData\r
+  );\r
+\r
+/**\r
+  Find the MNP Service Data for given VLAN ID.\r
+\r
+  @param[in]  MnpDeviceData      Pointer to the mnp device context data.\r
+  @param[in]  VlanId             The VLAN ID.\r
+\r
+  @return A pointer to MNP_SERVICE_DATA or NULL if not found.\r
+\r
+**/\r
+MNP_SERVICE_DATA *\r
+MnpFindServiceData (\r
+  IN MNP_DEVICE_DATA     *MnpDeviceData,\r
+  IN UINT16              VlanId\r
   );\r
 \r
 /**\r
   Initialize the mnp instance context data.\r
 \r
   @param[in]       MnpServiceData   Pointer to the mnp service context data.\r
-  @param[in, out]  Instance         Pointer to the mnp instance context data \r
+  @param[in, out]  Instance         Pointer to the mnp instance context data\r
                                     to initialize.\r
 \r
 **/\r
 VOID\r
 MnpInitializeInstanceData (\r
-  IN MNP_SERVICE_DATA       *MnpServiceData,\r
-  IN OUT MNP_INSTANCE_DATA  *Instance\r
+  IN     MNP_SERVICE_DATA    *MnpServiceData,\r
+  IN OUT MNP_INSTANCE_DATA   *Instance\r
   );\r
 \r
 /**\r
@@ -152,9 +234,9 @@ MnpInitializeInstanceData (
 **/\r
 EFI_STATUS\r
 MnpTokenExist (\r
-  IN NET_MAP       *Map,\r
-  IN NET_MAP_ITEM  *Item,\r
-  IN VOID          *Arg\r
+  IN NET_MAP         *Map,\r
+  IN NET_MAP_ITEM    *Item,\r
+  IN VOID            *Arg\r
   );\r
 \r
 /**\r
@@ -162,10 +244,10 @@ MnpTokenExist (
 \r
   @param[in, out]  Map               Pointer to the NET_MAP.\r
   @param[in, out]  Item              Pointer to the NET_MAP_ITEM.\r
-  @param[in]       Arg               Pointer to the Arg, it's a pointer to the \r
+  @param[in]       Arg               Pointer to the Arg, it's a pointer to the\r
                                      token to cancel.\r
 \r
-  @retval EFI_SUCCESS       The Arg is NULL, and the token in Item is cancelled, \r
+  @retval EFI_SUCCESS       The Arg is NULL, and the token in Item is cancelled,\r
                             or the Arg isn't NULL, and the token in Item is\r
                             different from the Arg.\r
   @retval EFI_ABORTED       The Arg isn't NULL, the token in Item mathces the\r
@@ -174,9 +256,9 @@ MnpTokenExist (
 **/\r
 EFI_STATUS\r
 MnpCancelTokens (\r
-  IN OUT NET_MAP       *Map,\r
-  IN OUT NET_MAP_ITEM  *Item,\r
-  IN VOID              *Arg\r
+  IN OUT NET_MAP         *Map,\r
+  IN OUT NET_MAP_ITEM    *Item,\r
+  IN     VOID            *Arg\r
   );\r
 \r
 /**\r
@@ -187,7 +269,7 @@ MnpCancelTokens (
 **/\r
 VOID\r
 MnpFlushRcvdDataQueue (\r
-  IN OUT MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA   *Instance\r
   );\r
 \r
 /**\r
@@ -205,18 +287,18 @@ MnpFlushRcvdDataQueue (
 **/\r
 EFI_STATUS\r
 MnpConfigureInstance (\r
-  IN OUT MNP_INSTANCE_DATA              *Instance,\r
-  IN EFI_MANAGED_NETWORK_CONFIG_DATA    *ConfigData OPTIONAL\r
+  IN OUT MNP_INSTANCE_DATA                 *Instance,\r
+  IN     EFI_MANAGED_NETWORK_CONFIG_DATA   *ConfigData OPTIONAL\r
   );\r
 \r
 /**\r
   Do the group operations for this instance.\r
 \r
   @param[in, out]  Instance        Pointer to the instance context data.\r
-  @param[in]       JoinFlag        Set to TRUE to join a group. Set to TRUE to \r
+  @param[in]       JoinFlag        Set to TRUE to join a group. Set to TRUE to\r
                                    leave a group/groups.\r
   @param[in]       MacAddress      Pointer to the group address to join or leave.\r
-  @param[in]       CtrlBlk         Pointer to the group control block if JoinFlag \r
+  @param[in]       CtrlBlk         Pointer to the group control block if JoinFlag\r
                                    is FALSE.\r
 \r
   @retval EFI_SUCCESS              The group operation finished.\r
@@ -226,10 +308,10 @@ MnpConfigureInstance (
 **/\r
 EFI_STATUS\r
 MnpGroupOp (\r
-  IN OUT MNP_INSTANCE_DATA    *Instance,\r
-  IN BOOLEAN                  JoinFlag,\r
-  IN EFI_MAC_ADDRESS          *MacAddress OPTIONAL,\r
-  IN MNP_GROUP_CONTROL_BLOCK  *CtrlBlk OPTIONAL\r
+  IN OUT MNP_INSTANCE_DATA         *Instance,\r
+  IN     BOOLEAN                   JoinFlag,\r
+  IN     EFI_MAC_ADDRESS           *MacAddress OPTIONAL,\r
+  IN     MNP_GROUP_CONTROL_BLOCK   *CtrlBlk OPTIONAL\r
   );\r
 \r
 /**\r
@@ -243,27 +325,27 @@ MnpGroupOp (
 **/\r
 BOOLEAN\r
 MnpIsValidTxToken (\r
-  IN MNP_INSTANCE_DATA                     *Instance,\r
-  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token\r
+  IN MNP_INSTANCE_DATA                       *Instance,\r
+  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN    *Token\r
   );\r
 \r
 /**\r
   Build the packet to transmit from the TxData passed in.\r
 \r
   @param[in]   MnpServiceData      Pointer to the mnp service context data.\r
-  @param[in]   TxData              Pointer to the transmit data containing the information \r
+  @param[in]   TxData              Pointer to the transmit data containing the information\r
                                    to build the packet.\r
   @param[out]  PktBuf              Pointer to record the address of the packet.\r
-  @param[out]  PktLen              Pointer to a UINT32 variable used to record the packet's \r
+  @param[out]  PktLen              Pointer to a UINT32 variable used to record the packet's\r
                                    length.\r
 \r
 **/\r
 VOID\r
 MnpBuildTxPacket (\r
-  IN  MNP_SERVICE_DATA                   *MnpServiceData,\r
-  IN  EFI_MANAGED_NETWORK_TRANSMIT_DATA  *TxData,\r
-  OUT UINT8                              **PktBuf,\r
-  OUT UINT32                             *PktLen\r
+  IN     MNP_SERVICE_DATA                    *MnpServiceData,\r
+  IN     EFI_MANAGED_NETWORK_TRANSMIT_DATA   *TxData,\r
+     OUT UINT8                               **PktBuf,\r
+     OUT UINT32                              *PktLen\r
   );\r
 \r
 /**\r
@@ -281,10 +363,10 @@ MnpBuildTxPacket (
 **/\r
 EFI_STATUS\r
 MnpSyncSendPacket (\r
-  IN MNP_SERVICE_DATA                          *MnpServiceData,\r
-  IN UINT8                                     *Packet,\r
-  IN UINT32                                    Length,\r
-  IN OUT EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token\r
+  IN     MNP_SERVICE_DATA                        *MnpServiceData,\r
+  IN     UINT8                                   *Packet,\r
+  IN     UINT32                                  Length,\r
+  IN OUT EFI_MANAGED_NETWORK_COMPLETION_TOKEN    *Token\r
   );\r
 \r
 /**\r
@@ -300,7 +382,7 @@ MnpSyncSendPacket (
 **/\r
 EFI_STATUS\r
 MnpInstanceDeliverPacket (\r
-  IN OUT MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA   *Instance\r
   );\r
 \r
 /**\r
@@ -314,14 +396,14 @@ MnpInstanceDeliverPacket (
 VOID\r
 EFIAPI\r
 MnpRecycleRxData (\r
-  IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
+  IN EFI_EVENT     Event,\r
+  IN VOID          *Context\r
   );\r
 \r
 /**\r
   Try to receive a packet and deliver it.\r
 \r
-  @param[in, out]  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in, out]  MnpDeviceData        Pointer to the mnp device context data.\r
 \r
   @retval EFI_SUCCESS           add return value to function comment\r
   @retval EFI_NOT_STARTED       The simple network protocol is not started.\r
@@ -331,35 +413,35 @@ MnpRecycleRxData (
 **/\r
 EFI_STATUS\r
 MnpReceivePacket (\r
-  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_DEVICE_DATA   *MnpDeviceData\r
   );\r
 \r
 /**\r
-  Allocate a free NET_BUF from MnpServiceData->FreeNbufQue. If there is none\r
+  Allocate a free NET_BUF from MnpDeviceData->FreeNbufQue. If there is none\r
   in the queue, first try to allocate some and add them into the queue, then\r
   fetch the NET_BUF from the updated FreeNbufQue.\r
 \r
-  @param[in, out]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
+  @param[in, out]  MnpDeviceData        Pointer to the MNP_DEVICE_DATA.\r
 \r
-  @return     Pointer to the allocated free NET_BUF structure, if NULL the \r
+  @return     Pointer to the allocated free NET_BUF structure, if NULL the\r
               operation is failed.\r
 \r
 **/\r
 NET_BUF *\r
 MnpAllocNbuf (\r
-  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_DEVICE_DATA   *MnpDeviceData\r
   );\r
 \r
 /**\r
   Try to reclaim the Nbuf into the buffer pool.\r
 \r
-  @param[in, out]  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in, out]  MnpDeviceData         Pointer to the mnp device context data.\r
   @param[in, out]  Nbuf                  Pointer to the NET_BUF to free.\r
 \r
 **/\r
 VOID\r
 MnpFreeNbuf (\r
-  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN OUT MNP_DEVICE_DATA   *MnpDeviceData,\r
   IN OUT NET_BUF           *Nbuf\r
   );\r
 \r
@@ -369,13 +451,13 @@ MnpFreeNbuf (
   @param[in]  Event             The event this notify function registered to.\r
   @param[in]  Context           Pointer to the context data registered to the\r
                                 event.\r
-   \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
 MnpCheckPacketTimeout (\r
-  IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
+  IN EFI_EVENT     Event,\r
+  IN VOID          *Context\r
   );\r
 \r
 /**\r
@@ -389,16 +471,16 @@ MnpCheckPacketTimeout (
 VOID\r
 EFIAPI\r
 MnpSystemPoll (\r
-  IN EFI_EVENT  Event,\r
-  IN OUT VOID   *Context\r
+  IN     EFI_EVENT   Event,\r
+  IN OUT VOID        *Context\r
   );\r
 \r
 /**\r
   Returns the operational parameters for the current MNP child driver. May also\r
-  support returning the underlying SNP driver mode data.   \r
-   \r
+  support returning the underlying SNP driver mode data.\r
+\r
   The GetModeData() function is used to read the current mode data (operational\r
-  parameters) from the MNP or the underlying SNP. \r
+  parameters) from the MNP or the underlying SNP.\r
 \r
   @param[in]  This          Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
   @param[out] MnpConfigData Pointer to storage for MNP operational parameters. Type\r
@@ -407,7 +489,7 @@ MnpSystemPoll (
   @param[out] SnpModeData   Pointer to storage for SNP operational parameters. This\r
                             feature may be unsupported. Type EFI_SIMPLE_NETWORK_MODE\r
                             is defined in the EFI_SIMPLE_NETWORK_PROTOCOL.\r
\r
+\r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER This is NULL.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this\r
@@ -421,15 +503,15 @@ MnpSystemPoll (
 EFI_STATUS\r
 EFIAPI\r
 MnpGetModeData (\r
-  IN  EFI_MANAGED_NETWORK_PROTOCOL     *This,\r
-  OUT EFI_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData, OPTIONAL\r
-  OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL\r
+  IN     EFI_MANAGED_NETWORK_PROTOCOL      *This,\r
+     OUT EFI_MANAGED_NETWORK_CONFIG_DATA   *MnpConfigData OPTIONAL,\r
+     OUT EFI_SIMPLE_NETWORK_MODE           *SnpModeData OPTIONAL\r
   );\r
 \r
 /**\r
-  Sets or clears the operational parameters for the MNP child driver. \r
-   \r
-  The Configure() function is used to set, change, or reset the operational \r
+  Sets or clears the operational parameters for the MNP child driver.\r
+\r
+  The Configure() function is used to set, change, or reset the operational\r
   parameters for the MNP child driver instance. Until the operational parameters\r
   have been set, no network traffic can be sent or received by this MNP child\r
   driver instance. Once the operational parameters have been reset, no more\r
@@ -481,14 +563,14 @@ MnpGetModeData (
 EFI_STATUS\r
 EFIAPI\r
 MnpConfigure (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL     *This,\r
-  IN EFI_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData OPTIONAL\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL        *This,\r
+  IN EFI_MANAGED_NETWORK_CONFIG_DATA     *MnpConfigData OPTIONAL\r
   );\r
 \r
 /**\r
-  Translates an IP multicast address to a hardware (MAC) multicast address. This \r
-  function may be unsupported in some MNP implementations. \r
-   \r
+  Translates an IP multicast address to a hardware (MAC) multicast address. This\r
+  function may be unsupported in some MNP implementations.\r
+\r
   The McastIpToMac() function translates an IP multicast address to a hardware\r
   (MAC) multicast address. This function may be implemented by calling the\r
   underlying EFI_SIMPLE_NETWORK. MCastIpToMac() function, which may also be\r
@@ -499,7 +581,7 @@ MnpConfigure (
                           Set to FALSE if IpAddress is an IPv4 multicast address.\r
   @param[in]  IpAddress   Pointer to the multicast IP address (in network byte\r
                           order) to convert.\r
-  @param[out] MacAddress  Pointer to the resulting multicast MAC address. \r
+  @param[out] MacAddress  Pointer to the resulting multicast MAC address.\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
@@ -518,21 +600,21 @@ MnpConfigure (
 EFI_STATUS\r
 EFIAPI\r
 MnpMcastIpToMac (\r
-  IN  EFI_MANAGED_NETWORK_PROTOCOL  *This,\r
-  IN  BOOLEAN                       Ipv6Flag,\r
-  IN  EFI_IP_ADDRESS                *IpAddress,\r
-  OUT EFI_MAC_ADDRESS               *MacAddress\r
+  IN     EFI_MANAGED_NETWORK_PROTOCOL    *This,\r
+  IN     BOOLEAN                         Ipv6Flag,\r
+  IN     EFI_IP_ADDRESS                  *IpAddress,\r
+     OUT EFI_MAC_ADDRESS                 *MacAddress\r
   );\r
 \r
 /**\r
-  Enables and disables receive filters for multicast address. This function may \r
+  Enables and disables receive filters for multicast address. This function may\r
   be unsupported in some MNP implementations.\r
-   \r
-  The Groups() function only adds and removes multicast MAC addresses from the \r
+\r
+  The Groups() function only adds and removes multicast MAC addresses from the\r
   filter list. The MNP driver does not transmit or process Internet Group\r
   Management Protocol (IGMP) packets. If JoinFlag is FALSE and MacAddress is\r
   NULL, then all joined groups are left.\r
-   \r
+\r
   @param[in]  This        Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
   @param[in]  JoinFlag    Set to TRUE to join this multicast group.\r
                           Set to FALSE to leave this multicast group.\r
@@ -563,15 +645,15 @@ MnpMcastIpToMac (
 EFI_STATUS\r
 EFIAPI\r
 MnpGroups (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL  *This,\r
-  IN BOOLEAN                       JoinFlag,\r
-  IN EFI_MAC_ADDRESS               *MacAddress OPTIONAL\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL    *This,\r
+  IN BOOLEAN                         JoinFlag,\r
+  IN EFI_MAC_ADDRESS                 *MacAddress OPTIONAL\r
   );\r
 \r
 /**\r
   Places asynchronous outgoing data packets into the transmit queue.\r
-   \r
-  The Transmit() function places a completion token into the transmit packet \r
+\r
+  The Transmit() function places a completion token into the transmit packet\r
   queue. This function is always asynchronous.\r
   The caller must fill in the Token.Event and Token.TxData fields in the\r
   completion token, and these fields cannot be NULL. When the transmit operation\r
@@ -581,12 +663,12 @@ MnpGroups (
   defragmented before it can be transmitted by the network device. Systems in\r
   which performance is critical should review the requirements and features of\r
   the underlying communications device and drivers.\r
\r
\r
+\r
+\r
   @param[in]  This    Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
   @param[in]  Token   Pointer to a token associated with the transmit data\r
                       descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN\r
-                                         is defined in "Related Definitions" below.\r
+                      is defined in "Related Definitions" below.\r
 \r
   @retval EFI_SUCCESS            The transmit completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
@@ -615,7 +697,7 @@ MnpGroups (
   @retval EFI_ACCESS_DENIED      The transmit completion token is already in the\r
                                  transmit queue.\r
   @retval EFI_OUT_OF_RESOURCES   The transmit data could not be queued due to a\r
-                                 lack of system resources (usually memory). \r
+                                 lack of system resources (usually memory).\r
   @retval EFI_DEVICE_ERROR       An unexpected system or network error occurred.\r
                                  The MNP child driver instance has been reset to\r
                                  startup defaults.\r
@@ -626,13 +708,13 @@ MnpGroups (
 EFI_STATUS\r
 EFIAPI\r
 MnpTransmit (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL          *This,\r
-  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL            *This,\r
+  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN    *Token\r
   );\r
 \r
 /**\r
-  Aborts an asynchronous transmit or receive request. \r
-   \r
+  Aborts an asynchronous transmit or receive request.\r
+\r
   The Cancel() function is used to abort a pending transmit or receive request.\r
   If the token is in the transmit or receive request queues, after calling this\r
   function, Token.Status will be set to EFI_ABORTED and then Token.Event will be\r
@@ -643,8 +725,8 @@ MnpTransmit (
   @param[in]  This     Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
   @param[in]  Token    Pointer to a token that has been issued by\r
                        EFI_MANAGED_NETWORK_PROTOCOL.Transmit() or\r
-                       EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all \r
-                                          pending tokens are aborted.\r
+                       EFI_MANAGED_NETWORK_PROTOCOL.Receive(). If NULL, all\r
+                       pending tokens are aborted.\r
 \r
   @retval EFI_SUCCESS            The asynchronous I/O request was aborted and\r
                                  Token.Event was signaled. When Token is NULL,\r
@@ -662,20 +744,20 @@ MnpTransmit (
 EFI_STATUS\r
 EFIAPI\r
 MnpCancel (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL          *This,\r
-  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token OPTIONAL\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL            *This,\r
+  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN    *Token OPTIONAL\r
   );\r
 \r
 /**\r
   Places an asynchronous receiving request into the receiving queue.\r
-   \r
-  The Receive() function places a completion token into the receive packet \r
+\r
+  The Receive() function places a completion token into the receive packet\r
   queue. This function is always asynchronous.\r
   The caller must fill in the Token.Event field in the completion token, and\r
   this field cannot be NULL. When the receive operation completes, the MNP\r
   updates the Token.Status and Token.RxData fields and the Token.Event is\r
   signaled.\r
-   \r
+\r
   @param[in]  This      Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
   @param[in]  Token     Pointer to a token associated with the receive\r
                         data descriptor. Type\r
@@ -704,14 +786,14 @@ MnpCancel (
 EFI_STATUS\r
 EFIAPI\r
 MnpReceive (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL          *This,\r
-  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *Token\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL            *This,\r
+  IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN    *Token\r
   );\r
 \r
 /**\r
-  Polls for incoming data packets and processes outgoing data packets. \r
-   \r
-  The Poll() function can be used by network drivers and applications to \r
+  Polls for incoming data packets and processes outgoing data packets.\r
+\r
+  The Poll() function can be used by network drivers and applications to\r
   increase the rate that data packets are moved between the communications\r
   device and the transmit and receive queues.\r
   Normally, a periodic timer event internally calls the Poll() function. But, in\r
@@ -737,23 +819,23 @@ MnpReceive (
 EFI_STATUS\r
 EFIAPI\r
 MnpPoll (\r
-  IN EFI_MANAGED_NETWORK_PROTOCOL  *This\r
+  IN EFI_MANAGED_NETWORK_PROTOCOL    *This\r
   );\r
 \r
 /**\r
   Configure the Snp receive filters according to the instances' receive filter\r
   settings.\r
 \r
-  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in]  MnpDeviceData         Pointer to the mnp device context data.\r
 \r
   @retval     EFI_SUCCESS           The receive filters is configured.\r
-  @retval     EFI_OUT_OF_RESOURCES  The receive filters can't be configured due \r
+  @retval     EFI_OUT_OF_RESOURCES  The receive filters can't be configured due\r
                                     to lack of memory resource.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpConfigReceiveFilters (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN MNP_DEVICE_DATA     *MnpDeviceData\r
   );\r
 \r
 #endif\r