]> git.proxmox.com Git - mirror_edk2.git/commitdiff
fix some checklist issues
authorywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Feb 2009 07:56:54 +0000 (07:56 +0000)
committerywu21 <ywu21@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 3 Feb 2009 07:56:54 +0000 (07:56 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7417 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c
MdeModulePkg/Universal/Network/MnpDxe/ComponentName.h [new file with mode: 0644]
MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c
MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c
MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.h
MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h
MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c
MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c

index 4c47f75e5f82ac32facc59f954a302a5e1267c5f..2cd08413d1d6da632855860bd198fec37746e37e 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 /** @file\r
-    UEFI Component Name(2) protocol implementation for MnpDxe driver.\r
+  UEFI Component Name(2) protocol implementation for MnpDxe driver.\r
 \r
 \r
-Copyright (c) 2005 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2005 - 2007, Intel Corporation. <BR> \r
+All rights reserved. This program and the accompanying materials are licensed \r
+and made available under the terms and conditions of the BSD License which \r
+accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -15,135 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "MnpDriver.h"\r
 \r
 \r
 #include "MnpDriver.h"\r
 \r
-//\r
-// EFI Component Name Functions\r
-//\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the driver.\r
-\r
-  This function retrieves the user readable name of a driver in the form of a\r
-  Unicode string. If the driver specified by This has a user readable name in\r
-  the language specified by Language, then a pointer to the driver name is\r
-  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
-  by This does not support the language specified by Language,\r
-  then EFI_UNSUPPORTED is returned.\r
-\r
-  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language. This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param[out]  DriverName       A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                driver specified by This in the language\r
-                                specified by Language.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
-                                This and the language specified by Language was\r
-                                returned in DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-MnpComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **DriverName\r
-  );\r
-\r
-\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the controller\r
-  that is being managed by a driver.\r
-\r
-  This function retrieves the user readable name of the controller specified by\r
-  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
-  driver specified by This has a user readable name in the language specified by\r
-  Language, then a pointer to the controller name is returned in ControllerName,\r
-  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
-  managing the controller specified by ControllerHandle and ChildHandle,\r
-  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
-  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
-\r
-  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param[in]  ControllerHandle  The handle of a controller that the driver\r
-                                specified by This is managing.  This handle\r
-                                specifies the controller whose name is to be\r
-                                returned.\r
-\r
-  @param[in]  ChildHandle       The handle of the child controller to retrieve\r
-                                the name of.  This is an optional parameter that\r
-                                may be NULL.  It will be NULL for device\r
-                                drivers.  It will also be NULL for a bus drivers\r
-                                that wish to retrieve the name of the bus\r
-                                controller.  It will not be NULL for a bus\r
-                                driver that wishes to retrieve the name of a\r
-                                child controller.\r
-\r
-  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language.  This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param[out]  ControllerName   A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                controller specified by ControllerHandle and\r
-                                ChildHandle in the language specified by\r
-                                Language from the point of view of the driver\r
-                                specified by This.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
-                                the language specified by Language for the\r
-                                driver specified by This was returned in\r
-                                DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
-                                EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
-                                managing the controller specified by\r
-                                ControllerHandle and ChildHandle.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-MnpComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
-  IN  EFI_HANDLE                                      ControllerHandle,\r
-  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
-  IN  CHAR8                                           *Language,\r
-  OUT CHAR16                                          **ControllerName\r
-  );\r
-\r
 \r
 //\r
 // EFI Component Name Protocol\r
 \r
 //\r
 // EFI Component Name Protocol\r
@@ -185,10 +56,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMnpDriverNameTable[] = {
   by This does not support the language specified by Language,\r
   then EFI_UNSUPPORTED is returned.\r
 \r
   by This does not support the language specified by Language,\r
   then EFI_UNSUPPORTED is returned.\r
 \r
-  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]   This             A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
+  @param[in]   Language         A pointer to a Null-terminated ASCII string\r
                                 array indicating the language. This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
                                 array indicating the language. This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -243,16 +114,17 @@ MnpComponentNameGetDriverName (
   managing the controller specified by ControllerHandle and ChildHandle,\r
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
   support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
   managing the controller specified by ControllerHandle and ChildHandle,\r
   then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
   support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+  Currently not implemented.\r
 \r
 \r
-  @param[in]  This              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+  @param[in]   This             A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
                                 EFI_COMPONENT_NAME_PROTOCOL instance.\r
 \r
-  @param[in]  ControllerHandle  The handle of a controller that the driver\r
+  @param[in]   ControllerHandle The handle of a controller that the driver\r
                                 specified by This is managing.  This handle\r
                                 specifies the controller whose name is to be\r
                                 returned.\r
 \r
                                 specified by This is managing.  This handle\r
                                 specifies the controller whose name is to be\r
                                 returned.\r
 \r
-  @param[in]  ChildHandle       The handle of the child controller to retrieve\r
+  @param[in]   ChildHandle      The handle of the child controller to retrieve\r
                                 the name of.  This is an optional parameter that\r
                                 may be NULL.  It will be NULL for device\r
                                 drivers.  It will also be NULL for a bus drivers\r
                                 the name of.  This is an optional parameter that\r
                                 may be NULL.  It will be NULL for device\r
                                 drivers.  It will also be NULL for a bus drivers\r
@@ -261,7 +133,7 @@ MnpComponentNameGetDriverName (
                                 driver that wishes to retrieve the name of a\r
                                 child controller.\r
 \r
                                 driver that wishes to retrieve the name of a\r
                                 child controller.\r
 \r
-  @param[in]  Language          A pointer to a Null-terminated ASCII string\r
+  @param[in]   Language         A pointer to a Null-terminated ASCII string\r
                                 array indicating the language.  This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
                                 array indicating the language.  This is the\r
                                 language of the driver name that the caller is\r
                                 requesting, and it must match one of the\r
@@ -277,10 +149,9 @@ MnpComponentNameGetDriverName (
                                 Language from the point of view of the driver\r
                                 specified by This.\r
 \r
                                 Language from the point of view of the driver\r
                                 specified by This.\r
 \r
-  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
-                                the language specified by Language for the\r
-                                driver specified by This was returned in\r
-                                DriverName.\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name \r
+                                specified by This, ControllerHandle, ChildHandle,\r
+                                                               and Language was returned in ControllerName.\r
 \r
   @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
 \r
 \r
   @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
 \r
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.h b/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.h
new file mode 100644 (file)
index 0000000..0f9057b
--- /dev/null
@@ -0,0 +1,150 @@
+/** @file\r
+  The header file of UEFI Component Name(2) protocol.\r
+\r
+Copyright (c) 2004 - 2007, 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _COMPONENT_NAME_H_\r
+#define _COMPONENT_NAME_H_\r
+\r
+#include <Protocol/ComponentName.h>\r
+#include <Protocol/ComponentName2.h>\r
+\r
+extern EFI_COMPONENT_NAME2_PROTOCOL       gMnpComponentName2;\r
+extern EFI_COMPONENT_NAME_PROTOCOL        gMnpComponentName;\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the driver.\r
+\r
+  This function retrieves the user readable name of a driver in the form of a\r
+  Unicode string. If the driver specified by This has a user readable name in\r
+  the language specified by Language, then a pointer to the driver name is\r
+  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
+  by This does not support the language specified by Language,\r
+  then EFI_UNSUPPORTED is returned.\r
+\r
+  @param[in]   This             A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param[in]   Language         A pointer to a Null-terminated ASCII string\r
+                                array indicating the language. This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified\r
+                                in RFC 3066 or ISO 639-2 language code format.\r
+\r
+  @param[out]  DriverName       A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                driver specified by This in the language\r
+                                specified by Language.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
+                                This and the language specified by Language was\r
+                                returned in DriverName.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+MnpComponentNameGetDriverName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
+  IN  CHAR8                        *Language,\r
+  OUT CHAR16                       **DriverName\r
+  );\r
+\r
+\r
+/**\r
+  Retrieves a Unicode string that is the user readable name of the controller\r
+  that is being managed by a driver.\r
+\r
+  This function retrieves the user readable name of the controller specified by\r
+  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
+  driver specified by This has a user readable name in the language specified by\r
+  Language, then a pointer to the controller name is returned in ControllerName,\r
+  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
+  managing the controller specified by ControllerHandle and ChildHandle,\r
+  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
+  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
+  Currently not implemented.\r
+\r
+  @param[in]   This             A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
+                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
+\r
+  @param[in]   ControllerHandle The handle of a controller that the driver\r
+                                specified by This is managing.  This handle\r
+                                specifies the controller whose name is to be\r
+                                returned.\r
+\r
+  @param[in]   ChildHandle      The handle of the child controller to retrieve\r
+                                the name of.  This is an optional parameter that\r
+                                may be NULL.  It will be NULL for device\r
+                                drivers.  It will also be NULL for a bus drivers\r
+                                that wish to retrieve the name of the bus\r
+                                controller.  It will not be NULL for a bus\r
+                                driver that wishes to retrieve the name of a\r
+                                child controller.\r
+\r
+  @param[in]   Language         A pointer to a Null-terminated ASCII string\r
+                                array indicating the language.  This is the\r
+                                language of the driver name that the caller is\r
+                                requesting, and it must match one of the\r
+                                languages specified in SupportedLanguages. The\r
+                                number of languages supported by a driver is up\r
+                                to the driver writer. Language is specified in\r
+                                RFC 3066 or ISO 639-2 language code format.\r
+\r
+  @param[out]  ControllerName   A pointer to the Unicode string to return.\r
+                                This Unicode string is the name of the\r
+                                controller specified by ControllerHandle and\r
+                                ChildHandle in the language specified by\r
+                                Language from the point of view of the driver\r
+                                specified by This.\r
+\r
+  @retval EFI_SUCCESS           The Unicode string for the user readable name \r
+                                specified by This, ControllerHandle, ChildHandle,\r
+                                                               and Language was returned in ControllerName.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
+                                EFI_HANDLE.\r
+\r
+  @retval EFI_INVALID_PARAMETER Language is NULL.\r
+\r
+  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
+                                managing the controller specified by\r
+                                ControllerHandle and ChildHandle.\r
+\r
+  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
+                                the language specified by Language.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+MnpComponentNameGetControllerName (\r
+  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
+  IN  EFI_HANDLE                                      ControllerHandle,\r
+  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
+  IN  CHAR8                                           *Language,\r
+  OUT CHAR16                                          **ControllerName\r
+  );\r
+\r
+#endif\r
index 9ed0f3ffd7bb4cd1306213041dd54583981ed969..f783221e29cbd89b123d402e74b76607dcc6aa86 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Implementation of Managed Network Protocol private services.\r
 /** @file\r
   Implementation of Managed Network Protocol private services.\r
-  \r
-Copyright (c) 2005 - 2008, 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
-http://opensource.org/licenses/bsd-license.php\r
+\r
+Copyright (c) 2005 - 2008, Intel Corporation. <BR> \r
+All rights reserved. This program and the accompanying materials are licensed \r
+and made available under the terms and conditions of the BSD License which \r
+accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -48,11 +48,11 @@ EFI_MANAGED_NETWORK_CONFIG_DATA mMnpDefaultConfigData = {
   Configure the Snp receive filters according to the instances' receive filter\r
   settings.\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]  MnpServiceData        Pointer to the mnp service context data.\r
 \r
 \r
-  @retval EFI_SUCCESS           The receive filters is configured.\r
-  @retval EFI_OUT_OF_RESOURCES  The receive filters can't be configured due to \r
-                                lack of memory resource.\r
+  @retval     EFI_SUCCESS           The receive filters is configured.\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
 \r
 **/\r
 EFI_STATUS\r
@@ -144,7 +144,7 @@ MnpConfigReceiveFilters (
       // multicast.\r
       //\r
 \r
       // multicast.\r
       //\r
 \r
-      if (Snp->Mode->ReceiveFilterMask & EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST) {\r
+      if ((Snp->Mode->ReceiveFilterMask & EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST) != 0) {\r
         EnableFilterBits |= EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;\r
       } else {\r
         //\r
         EnableFilterBits |= EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST;\r
       } else {\r
         //\r
@@ -205,8 +205,8 @@ MnpConfigReceiveFilters (
   Add Count of net buffers to MnpServiceData->FreeNbufQue. The length of the net\r
   buffer is specified by MnpServiceData->BufferLength. \r
 \r
   Add Count of net buffers to MnpServiceData->FreeNbufQue. The length of the net\r
   buffer is specified by MnpServiceData->BufferLength. \r
 \r
-  @param[in]  MnpServiceData    Pointer to the MNP_SERVICE_DATA.\r
-  @param[in]  Count             Number of NET_BUFFERs to add.\r
+  @param[in, out]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
+  @param[in]       Count                 Number of NET_BUFFERs to add.\r
 \r
   @retval EFI_SUCCESS           The specified amount of NET_BUFs are allocated \r
                                 and added to MnpServiceData->FreeNbufQue.\r
 \r
   @retval EFI_SUCCESS           The specified amount of NET_BUFs are allocated \r
                                 and added to MnpServiceData->FreeNbufQue.\r
@@ -215,8 +215,8 @@ MnpConfigReceiveFilters (
 **/\r
 EFI_STATUS\r
 MnpAddFreeNbuf (\r
 **/\r
 EFI_STATUS\r
 MnpAddFreeNbuf (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN UINTN             Count\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN UINTN                 Count\r
   )\r
 {\r
   EFI_STATUS  Status;\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -260,7 +260,7 @@ MnpAddFreeNbuf (
   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
   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]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
+  @param[in, out]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
 \r
   @return     Pointer to the allocated free NET_BUF structure, if NULL the \r
               operation is failed.\r
 \r
   @return     Pointer to the allocated free NET_BUF structure, if NULL the \r
               operation is failed.\r
@@ -268,7 +268,7 @@ MnpAddFreeNbuf (
 **/\r
 NET_BUF *\r
 MnpAllocNbuf (\r
 **/\r
 NET_BUF *\r
 MnpAllocNbuf (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
   )\r
 {\r
   EFI_STATUS    Status;\r
   )\r
 {\r
   EFI_STATUS    Status;\r
@@ -333,14 +333,14 @@ ON_EXIT:
 /**\r
   Try to reclaim the Nbuf into the buffer pool.\r
 \r
 /**\r
   Try to reclaim the Nbuf into the buffer pool.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  Nbuf                  Pointer to the NET_BUF to free.\r
-  \r
+  @param[in,out]  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in,out]  Nbuf                  Pointer to the NET_BUF to free.\r
+\r
 **/\r
 VOID\r
 MnpFreeNbuf (\r
 **/\r
 VOID\r
 MnpFreeNbuf (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN NET_BUF           *Nbuf\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN OUT NET_BUF           *Nbuf\r
   )\r
 {\r
   EFI_TPL  OldTpl;\r
   )\r
 {\r
   EFI_TPL  OldTpl;\r
@@ -367,19 +367,20 @@ MnpFreeNbuf (
 /**\r
   Initialize the mnp service context data.\r
 \r
 /**\r
   Initialize the mnp service context data.\r
 \r
-  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
-  @param[in]  ImageHandle           The driver image handle.\r
-  @param[in]  ControllerHandle      Handle of device to bind driver to.\r
+  @param[in, out]  MnpServiceData     Pointer to the mnp service 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
 \r
   @retval EFI_SUCCESS           The mnp service context is initialized.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_UNSUPPORTED       ControllerHandle does not support Simple Network Protocol.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpInitializeServiceData (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpInitializeServiceData (\r
-  IN 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
   EFI_STATUS                   Status;\r
   )\r
 {\r
   EFI_STATUS                   Status;\r
@@ -553,14 +554,14 @@ ERROR:
 /**\r
   Flush the mnp service context data.\r
 \r
 /**\r
   Flush the mnp service context data.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  ImageHandle           The driver image handle.\r
-  \r
+  @param[in, out]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in]       ImageHandle       The driver image handle.\r
+\r
 **/\r
 VOID\r
 MnpFlushServiceData (\r
 **/\r
 VOID\r
 MnpFlushServiceData (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN EFI_HANDLE        ImageHandle\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN EFI_HANDLE            ImageHandle\r
   )\r
 {\r
   NET_CHECK_SIGNATURE (MnpServiceData, MNP_SERVICE_DATA_SIGNATURE);\r
   )\r
 {\r
   NET_CHECK_SIGNATURE (MnpServiceData, MNP_SERVICE_DATA_SIGNATURE);\r
@@ -616,15 +617,15 @@ MnpFlushServiceData (
 /**\r
   Initialize the mnp instance context data.\r
 \r
 /**\r
   Initialize the mnp instance context data.\r
 \r
-  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
-  @param[in]  Instance          Pointer to the mnp instance context data to\r
-                                initialize.\r
+  @param[in]       MnpServiceData   Pointer to the mnp service context data.\r
+  @param[in, out]  Instance         Pointer to the mnp instance context data \r
+                                    to initialize.\r
 \r
 **/\r
 VOID\r
 MnpInitializeInstanceData (\r
 \r
 **/\r
 VOID\r
 MnpInitializeInstanceData (\r
-  IN MNP_SERVICE_DATA   *MnpServiceData,\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN MNP_SERVICE_DATA       *MnpServiceData,\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   )\r
 {\r
   NET_CHECK_SIGNATURE (MnpServiceData, MNP_SERVICE_DATA_SIGNATURE);\r
   )\r
 {\r
   NET_CHECK_SIGNATURE (MnpServiceData, MNP_SERVICE_DATA_SIGNATURE);\r
@@ -665,10 +666,10 @@ MnpInitializeInstanceData (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Check whether the token specified by Arg maches the token in Item.\r
+  Check whether the token specified by Arg matches the token in Item.\r
 \r
   @param[in]  Map               Pointer to the NET_MAP.\r
 \r
   @param[in]  Map               Pointer to the NET_MAP.\r
-  @param[in]  Item              Pointer to the NET_MAP_ITEM\r
+  @param[in]  Item              Pointer to the NET_MAP_ITEM.\r
   @param[in]  Arg               Pointer to the Arg, it's a pointer to the token to\r
                                 check.\r
 \r
   @param[in]  Arg               Pointer to the Arg, it's a pointer to the token to\r
                                 check.\r
 \r
@@ -705,10 +706,10 @@ MnpTokenExist (
 /**\r
   Cancel the token specified by Arg if it matches the token in Item.\r
 \r
 /**\r
   Cancel the token specified by Arg if it matches the token in Item.\r
 \r
-  @param[in, out]  Map          Pointer to the NET_MAP.\r
-  @param[in]       Item         Pointer to the NET_MAP_ITEM\r
-  @param[in]       Arg          Pointer to the Arg, it's a pointer to the token to\r
-                                cancel.\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
+                                     token to cancel.\r
 \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
 \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
@@ -719,9 +720,9 @@ MnpTokenExist (
 **/\r
 EFI_STATUS\r
 MnpCancelTokens (\r
 **/\r
 EFI_STATUS\r
 MnpCancelTokens (\r
-  IN OUT NET_MAP   *Map,\r
-  IN 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
   EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *TokenToCancel;\r
   )\r
 {\r
   EFI_MANAGED_NETWORK_COMPLETION_TOKEN  *TokenToCancel;\r
@@ -763,7 +764,7 @@ MnpCancelTokens (
   @param[in]  Snp               Pointer to the simple network protocol.\r
 \r
   @retval EFI_SUCCESS           The simple network protocol is started.\r
   @param[in]  Snp               Pointer to the simple network protocol.\r
 \r
   @retval EFI_SUCCESS           The simple network protocol is started.\r
-  @retval Other                 Some error occurs.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -797,7 +798,7 @@ MnpStartSnp (
   @param[in]  Snp               Pointer to the simple network protocol.\r
 \r
   @retval EFI_SUCCESS           The simple network is stopped.\r
   @param[in]  Snp               Pointer to the simple network protocol.\r
 \r
   @retval EFI_SUCCESS           The simple network is stopped.\r
-  @retval Other                 Some error occurs.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -829,21 +830,21 @@ MnpStopSnp (
   Start the managed network, this function is called when one instance is configured\r
   or reconfigured.\r
 \r
   Start the managed network, this function is called when one instance is configured\r
   or reconfigured.\r
 \r
-  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
-  @param[in]  IsConfigUpdate    The instance is reconfigured or it's the first time\r
-                                the instanced is configured.\r
-  @param[in]  EnableSystemPoll  Enable the system polling or not.\r
+  @param[in, out]  MnpServiceData       Pointer to the mnp service context data.\r
+  @param[in]       IsConfigUpdate       The instance is reconfigured or it's the first\r
+                                        time the instanced is configured.\r
+  @param[in]       EnableSystemPoll     Enable the system polling or not.\r
 \r
 \r
-  @retval EFI_SUCCESS           The managed network is started and some\r
-                                configuration is updated.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_SUCCESS                   The managed network is started and some\r
+                                        configuration is updated.\r
+  @retval Others                        Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpStart (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpStart (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN BOOLEAN           IsConfigUpdate,\r
-  IN BOOLEAN           EnableSystemPoll\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN BOOLEAN               IsConfigUpdate,\r
+  IN BOOLEAN               EnableSystemPoll\r
   )\r
 {\r
   EFI_STATUS      Status;\r
   )\r
 {\r
   EFI_STATUS      Status;\r
@@ -921,15 +922,15 @@ ErrorExit:
 /**\r
   Stop the managed network.\r
 \r
 /**\r
   Stop the managed network.\r
 \r
-  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in, out]  MnpServiceData    Pointer to the mnp service context data.\r
 \r
 \r
-  @retval EFI_SUCCESS           The managed network is stopped.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_SUCCESS                The managed network is stopped.\r
+  @retval Others                     Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpStop (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpStop (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
   )\r
 {\r
   EFI_STATUS  Status;\r
   )\r
 {\r
   EFI_STATUS  Status;\r
@@ -984,12 +985,12 @@ MnpStop (
 /**\r
   Flush the instance's received data.\r
 \r
 /**\r
   Flush the instance's received data.\r
 \r
-  @param  Instance              Pointer to the mnp instance context data.\r
+  @param[in, out]  Instance              Pointer to the mnp instance context data.\r
 \r
 **/\r
 VOID\r
 MnpFlushRcvdDataQueue (\r
 \r
 **/\r
 VOID\r
 MnpFlushRcvdDataQueue (\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   )\r
 {\r
   EFI_TPL          OldTpl;\r
   )\r
 {\r
   EFI_TPL          OldTpl;\r
@@ -1021,20 +1022,20 @@ MnpFlushRcvdDataQueue (
 /**\r
   Configure the Instance using ConfigData.\r
 \r
 /**\r
   Configure the Instance using ConfigData.\r
 \r
-  @param[in]  Instance          Pointer to the mnp instance context data.\r
-  @param[in]  ConfigData        Pointer to the configuration data used to configure\r
+  @param[in, out]  Instance     Pointer to the mnp instance context data.\r
+  @param[in]       ConfigData   Pointer to the configuration data used to configure\r
                                 the isntance.\r
 \r
   @retval EFI_SUCCESS           The Instance is configured.\r
   @retval EFI_UNSUPPORTED       EnableReceiveTimestamps is on and the\r
                                 implementation doesn't support it.\r
                                 the isntance.\r
 \r
   @retval EFI_SUCCESS           The Instance is configured.\r
   @retval EFI_UNSUPPORTED       EnableReceiveTimestamps is on and the\r
                                 implementation doesn't support it.\r
-  @retval Other                 Some error occurs.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpConfigureInstance (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpConfigureInstance (\r
-  IN 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
   EFI_STATUS                      Status;\r
   )\r
 {\r
   EFI_STATUS                      Status;\r
@@ -1162,23 +1163,23 @@ MnpConfigureInstance (
   Add a group address control block which controls the MacAddress for\r
   this instance.\r
 \r
   Add a group address control block which controls the MacAddress for\r
   this instance.\r
 \r
-  @param[in]  Instance              Pointer to the mnp instance context data.\r
-  @param[in]  CtrlBlk               Pointer to the group address control block.\r
-  @param[in]  GroupAddress          Pointer to the group adress.\r
-  @param[in]  MacAddress            Pointer to the mac address.\r
-  @param[in]  HwAddressSize         The hardware address size.\r
+  @param[in, out]  Instance        Pointer to the mnp instance context data.\r
+  @param[in, out]  CtrlBlk         Pointer to the group address control block.\r
+  @param[in, out]  GroupAddress    Pointer to the group adress.\r
+  @param[in]       MacAddress      Pointer to the mac address.\r
+  @param[in]       HwAddressSize   The hardware address size.\r
 \r
 \r
-  @retval EFI_SUCCESS           The group address control block is added.\r
-  @retval EFI_OUT_OF_RESOURCE   Failed due to lack of memory resources.\r
+  @retval EFI_SUCCESS              The group address control block is added.\r
+  @retval EFI_OUT_OF_RESOURCES     Failed due to lack of memory resources.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOpAddCtrlBlk (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOpAddCtrlBlk (\r
-  IN MNP_INSTANCE_DATA        *Instance,\r
-  IN MNP_GROUP_CONTROL_BLOCK  *CtrlBlk,\r
-  IN MNP_GROUP_ADDRESS        *GroupAddress OPTIONAL,\r
-  IN EFI_MAC_ADDRESS          *MacAddress,\r
-  IN UINT32                   HwAddressSize\r
+  IN OUT MNP_INSTANCE_DATA        *Instance,\r
+  IN OUT MNP_GROUP_CONTROL_BLOCK  *CtrlBlk,\r
+  IN OUT MNP_GROUP_ADDRESS        *GroupAddress OPTIONAL,\r
+  IN EFI_MAC_ADDRESS              *MacAddress,\r
+  IN UINT32                       HwAddressSize\r
   )\r
 {\r
   MNP_SERVICE_DATA  *MnpServiceData;\r
   )\r
 {\r
   MNP_SERVICE_DATA  *MnpServiceData;\r
@@ -1283,20 +1284,21 @@ MnpGroupOpDelCtrlBlk (
 /**\r
   Do the group operations for this instance.\r
 \r
 /**\r
   Do the group operations for this instance.\r
 \r
-  @param[in]  Instance          Pointer to the instance context data.\r
-  @param[in]  JoinFlag          Set to TRUE to join a group. Set to TRUE to leave a\r
-                                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 if\r
-                                FALSE.\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
+                                   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
+                                   is FALSE.\r
 \r
 \r
-  @retval EFI_SUCCESS           The group operation finished.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_SUCCESS              The group operation finished.\r
+  @retval EFI_OUT_OF_RESOURCES     Failed due to lack of memory resources.\r
+  @retval Others                   Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOp (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOp (\r
-  IN MNP_INSTANCE_DATA        *Instance,\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 BOOLEAN                  JoinFlag,\r
   IN EFI_MAC_ADDRESS          *MacAddress OPTIONAL,\r
   IN MNP_GROUP_CONTROL_BLOCK  *CtrlBlk OPTIONAL\r
index 727dc3bf2c718bb43093e424409b9af02b7fc5f2..9541fb18e8091134769b35b881b32f2fe99e990b 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 /** @file\r
-    Implementation of driver entry point and driver binding protocol.\r
+  Implementation of driver entry point and driver binding protocol.\r
 \r
 \r
-Copyright (c) 2005 - 2008, 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
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2005 - 2008, Intel Corporation. <BR> \r
+All rights reserved. This program and the accompanying materials are licensed \r
+and made available under the terms and conditions of the BSD License which \r
+accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -33,14 +33,14 @@ EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding = {
   follow these calling restrictions. If any other agent wishes to call\r
   Supported() it must also follow these calling restrictions.\r
 \r
   follow these calling restrictions. If any other agent wishes to call\r
   Supported() it must also follow these calling restrictions.\r
 \r
-  @param[in]  This                Protocol instance pointer.\r
-  @param[in]  ControllerHandle    Handle of device to test\r
-  @param[in]  RemainingDevicePath Optional parameter use to pick a specific child\r
-                                  device to start.\r
+  @param[in]  This                 Protocol instance pointer.\r
+  @param[in]  ControllerHandle     Handle of device to test.\r
+  @param[in]  RemainingDevicePath  Optional parameter use to pick a specific \r
+                                   child device to start.\r
 \r
 \r
-  @retval EFI_SUCCESS         This driver supports this device\r
-  @retval EFI_ALREADY_STARTED This driver is already running on this device\r
-  @retval other               This driver does not support this device\r
+  @retval EFI_SUCCESS              This driver supports this device.\r
+  @retval EFI_ALREADY_STARTED      This driver is already running on this device.\r
+  @retval Others                   This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -101,21 +101,21 @@ MnpDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle. This service is called by the\r
 \r
 /**\r
   Start this driver on ControllerHandle. This service is called by the\r
-  EFI boot service ConnectController(). In order to make\r
-  drivers as small as possible, there are a few calling restrictions for\r
-  this service. ConnectController() must follow these\r
-  calling restrictions. If any other agent wishes to call Start() it\r
-  must also follow these calling restrictions.\r
-\r
-  @param[in]  This                 Protocol instance pointer.\r
-  @param[in]  ControllerHandle     Handle of device to bind driver to.\r
-  @param[in]  RemainingDevicePath  Optional parameter use to pick a specific child\r
-                                   device to start.\r
-\r
-  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
-  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
-  @retval other                This driver does not support this device\r
-\r
+  EFI boot service ConnectController(). In order to make drivers as small \r
+  as possible, there are a few calling restrictions for this service.\r
+  ConnectController() must follow these calling restrictions. If any other\r
+  agent wishes to call Start() it must also follow these calling restrictions.\r
+\r
+  @param[in]       This                 Protocol instance pointer.\r
+  @param[in]       ControllerHandle     Handle of device to bind driver to.\r
+  @param[in]       RemainingDevicePath  Optional parameter use to pick a specific \r
+                                        child device to start.\r
+\r
+  @retval EFI_SUCCESS           This driver is added to ControllerHandle.\r
+  @retval EFI_ALREADY_STARTED   This driver is already running on ControllerHandle.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate memory for Mnp Service Data.\r
+  @retval Others                This driver does not support this device.\r
+  \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -179,20 +179,20 @@ ErrorExit:
 \r
 /**\r
   Stop this driver on ControllerHandle. This service is called by the\r
 \r
 /**\r
   Stop this driver on ControllerHandle. This service is called by the\r
-  EFI boot service DisconnectController(). In order to\r
-  make drivers as small as possible, there are a few calling\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
+  EFI boot service DisconnectController(). In order to make drivers as \r
+  small as possible, there are a few calling restrictions for this service. \r
+  DisconnectController() must follow these calling restrictions. If any other \r
+  agent wishes to call Stop() it must also follow these calling restrictions.\r
   \r
   \r
-  @param[in]  This              Protocol instance pointer.\r
-  @param[in]  ControllerHandle  Handle of device to stop driver on\r
-  @param[in]  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
-                                children is zero stop the entire bus driver.\r
-  @param[in]  ChildHandleBuffer List of Child Handles to Stop.\r
+  @param[in]  This               Protocol instance pointer.\r
+  @param[in]  ControllerHandle   Handle of device to stop driver on.\r
+  @param[in]  NumberOfChildren   Number of Handles in ChildHandleBuffer. If \r
+                                 number of children is zero stop the entire \r
+                                                                bus driver.\r
+  @param[in]  ChildHandleBuffer  List of Child Handles to Stop.\r
 \r
 \r
-  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
-  @retval other             This driver was not removed from this device\r
+  @retval EFI_SUCCESS            This driver is removed ControllerHandle.\r
+  @retval EFI_DEVICE_ERROR       The device could not be stopped due to a device error.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -201,7 +201,7 @@ MnpDriverBindingStop (
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   ControllerHandle,\r
   IN UINTN                        NumberOfChildren,\r
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   ControllerHandle,\r
   IN UINTN                        NumberOfChildren,\r
-  IN EFI_HANDLE                   *ChildHandleBuffer\r
+  IN EFI_HANDLE                   *ChildHandleBuffer OPTIONAL\r
   )\r
 {\r
   EFI_STATUS                    Status;\r
   )\r
 {\r
   EFI_STATUS                    Status;\r
@@ -270,22 +270,19 @@ MnpDriverBindingStop (
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
-  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
+  Creates a child handle with a set of I/O services.\r
 \r
 \r
-  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
-  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                      then a new handle is created. If it is a pointer to an existing UEFI handle, \r
-                      then the protocol is added to the existing UEFI handle.\r
+  @param[in]       This              Protocol instance pointer.\r
+  @param[in, out]  ChildHandle       Pointer to the handle of the child to create. If\r
+                                     it is NULL, then a new handle is created. If\r
+                                                                        it is not NULL, then the I/O services are added \r
+                                                                        to the existing child handle.\r
 \r
 \r
-  @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
-  @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources availabe to create\r
-                                the child\r
-  @retval other                 The child handle was not created\r
+  @retval EFI_SUCCES                 The protocol was added to ChildHandle. \r
+  @retval EFI_INVALID_PARAMETER      ChildHandle is NULL. \r
+  @retval EFI_OUT_OF_RESOURCES       There are not enough resources availabe to \r
+                                     create the child.\r
+  @retval Others                     The child handle was not created.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -387,21 +384,24 @@ ErrorExit:
 \r
 \r
 /**\r
 \r
 \r
 /**\r
-  Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
-  last protocol on ChildHandle, then ChildHandle is destroyed.\r
-\r
-  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
-  @param  ChildHandle Handle of the child to destroy\r
-\r
-  @retval EFI_SUCCES            The protocol was removed from ChildHandle.\r
-  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is being removed.\r
-  @retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.\r
-  @retval EFI_ACCESS_DENIED     The protocol could not be removed from the ChildHandle\r
-                                because its services are being used.\r
-  @retval other                 The child handle was not destroyed\r
+  Destroys a child handle with a set of I/O services.\r
+   \r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a \r
+  protocol that was installed by CreateChild() from ChildHandle. If the removed \r
+  protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. \r
+   \r
+  @param[in]  This               Pointer to the EFI_SERVICE_BINDING_PROTOCOL \r
+                                 instance.\r
+  @param[in]  ChildHandle        Handle of the child to destroy.\r
+\r
+  @retval EFI_SUCCES             The protocol was removed from ChildHandle. \r
+  @retval EFI_UNSUPPORTED        ChildHandle does not support the protocol that\r
+                                 is being removed.\r
+  @retval EFI_INVALID_PARAMETER  ChildHandle is not a valid UEFI handle.\r
+  @retval EFI_ACCESS_DENIED      The protocol could not be removed from the\r
+                                 ChildHandle because its services are being\r
+                                 used.\r
+  @retval Others                 The child handle was not destroyed.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -520,12 +520,12 @@ MnpServiceBindingDestroyChild (
   The entry point for Mnp driver which installs the driver binding and component\r
   name protocol on its ImageHandle.\r
 \r
   The entry point for Mnp driver which installs the driver binding and component\r
   name protocol on its ImageHandle.\r
 \r
-  @param[in]  ImageHandle   The image handle of the driver.\r
-  @param[in]  SystemTable   The system table.\r
+  @param[in]  ImageHandle  The image handle of the driver.\r
+  @param[in]  SystemTable  The system table.\r
 \r
   @retval EFI_SUCCES       The driver binding and component name protocols are \r
                            successfully installed.\r
 \r
   @retval EFI_SUCCES       The driver binding and component name protocols are \r
                            successfully installed.\r
-  @retval other            failed.\r
+  @retval Others           Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
index fb140127ad2e5b18d64e1dc4b3ac7690a4452b5b..5e75b30b9794d9864c8d48500267b3c213988c17 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
 /** @file\r
-    Declaration of strctures and functions for MnpDxe driver.\r
+  Declaration of strctures and functions for MnpDxe driver.\r
     \r
     \r
-Copyright (c) 2005 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
+Copyright (c) 2005 - 2007, Intel Corporation. <BR> \r
+All rights reserved. This program and the accompanying materials are licensed \r
+and made available under the terms and conditions of the BSD License which \r
+accompanies this distribution. The full text of the license may be found at \r
+http://opensource.org/licenses/bsd-license.php \r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
@@ -21,24 +21,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/ServiceBinding.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Protocol/ServiceBinding.h>\r
 \r
 #include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/NetLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiLib.h>\r
 #include <Library/NetLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
 \r
 \r
-//\r
-// Required Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gMnpDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL   gMnpComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL  gMnpComponentName2;\r
+#include "ComponentName.h"\r
 \r
 #define MNP_SERVICE_DATA_SIGNATURE  SIGNATURE_32 ('M', 'n', 'p', 'S')\r
 \r
 \r
 #define MNP_SERVICE_DATA_SIGNATURE  SIGNATURE_32 ('M', 'n', 'p', 'S')\r
 \r
-typedef struct _MNP_SERVICE_DATA {\r
+typedef struct {\r
   UINT32                        Signature;\r
 \r
   EFI_HANDLE                    ControllerHandle;\r
   UINT32                        Signature;\r
 \r
   EFI_HANDLE                    ControllerHandle;\r
@@ -96,14 +87,14 @@ typedef struct _MNP_SERVICE_DATA {
   follow these calling restrictions. If any other agent wishes to call\r
   Supported() it must also follow these calling restrictions.\r
 \r
   follow these calling restrictions. If any other agent wishes to call\r
   Supported() it must also follow these calling restrictions.\r
 \r
-  @param[in]  This                Protocol instance pointer.\r
-  @param[in]  ControllerHandle    Handle of device to test\r
-  @param[in]  RemainingDevicePath Optional parameter use to pick a specific child\r
-                                  device to start.\r
+  @param[in]  This                 Protocol instance pointer.\r
+  @param[in]  ControllerHandle     Handle of device to test.\r
+  @param[in]  RemainingDevicePath  Optional parameter use to pick a specific \r
+                                   child device to start.\r
 \r
 \r
-  @retval EFI_SUCCESS         This driver supports this device\r
-  @retval EFI_ALREADY_STARTED This driver is already running on this device\r
-  @retval other               This driver does not support this device\r
+  @retval EFI_SUCCESS              This driver supports this device.\r
+  @retval EFI_ALREADY_STARTED      This driver is already running on this device.\r
+  @retval Others                   This driver does not support this device.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -116,21 +107,21 @@ MnpDriverBindingSupported (
 \r
 /**\r
   Start this driver on ControllerHandle. This service is called by the\r
 \r
 /**\r
   Start this driver on ControllerHandle. This service is called by the\r
-  EFI boot service ConnectController(). In order to make\r
-  drivers as small as possible, there are a few calling restrictions for\r
-  this service. ConnectController() must follow these\r
-  calling restrictions. If any other agent wishes to call Start() it\r
-  must also follow these calling restrictions.\r
-\r
-  @param[in]  This                 Protocol instance pointer.\r
-  @param[in]  ControllerHandle     Handle of device to bind driver to.\r
-  @param[in]  RemainingDevicePath  Optional parameter use to pick a specific child\r
-                                   device to start.\r
-\r
-  @retval EFI_SUCCESS          This driver is added to ControllerHandle\r
-  @retval EFI_ALREADY_STARTED  This driver is already running on ControllerHandle\r
-  @retval other                This driver does not support this device\r
-\r
+  EFI boot service ConnectController(). In order to make drivers as small \r
+  as possible, there are a few calling restrictions for this service.\r
+  ConnectController() must follow these calling restrictions. If any other\r
+  agent wishes to call Start() it must also follow these calling restrictions.\r
+\r
+  @param[in]       This                 Protocol instance pointer.\r
+  @param[in]       ControllerHandle     Handle of device to bind driver to.\r
+  @param[in]       RemainingDevicePath  Optional parameter use to pick a specific \r
+                                        child device to start.\r
+\r
+  @retval EFI_SUCCESS           This driver is added to ControllerHandle.\r
+  @retval EFI_ALREADY_STARTED   This driver is already running on ControllerHandle.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate memory for Mnp Service Data.\r
+  @retval Others                This driver does not support this device.\r
+  \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -143,20 +134,20 @@ MnpDriverBindingStart (
 \r
 /**\r
   Stop this driver on ControllerHandle. This service is called by the\r
 \r
 /**\r
   Stop this driver on ControllerHandle. This service is called by the\r
-  EFI boot service DisconnectController(). In order to\r
-  make drivers as small as possible, there are a few calling\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
+  EFI boot service DisconnectController(). In order to make drivers as \r
+  small as possible, there are a few calling restrictions for this service. \r
+  DisconnectController() must follow these calling restrictions. If any other \r
+  agent wishes to call Stop() it must also follow these calling restrictions.\r
   \r
   \r
-  @param[in]  This              Protocol instance pointer.\r
-  @param[in]  ControllerHandle  Handle of device to stop driver on\r
-  @param[in]  NumberOfChildren  Number of Handles in ChildHandleBuffer. If number of\r
-                                children is zero stop the entire bus driver.\r
-  @param[in]  ChildHandleBuffer List of Child Handles to Stop.\r
+  @param[in]  This               Protocol instance pointer.\r
+  @param[in]  ControllerHandle   Handle of device to stop driver on.\r
+  @param[in]  NumberOfChildren   Number of Handles in ChildHandleBuffer. If \r
+                                 number of children is zero stop the entire \r
+                                                                bus driver.\r
+  @param[in]  ChildHandleBuffer  List of Child Handles to Stop.\r
 \r
 \r
-  @retval EFI_SUCCESS       This driver is removed ControllerHandle\r
-  @retval other             This driver was not removed from this device\r
+  @retval EFI_SUCCESS            This driver is removed ControllerHandle.\r
+  @retval EFI_DEVICE_ERROR       The device could not be stopped due to a device error.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -165,26 +156,23 @@ MnpDriverBindingStop (
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   ControllerHandle,\r
   IN UINTN                        NumberOfChildren,\r
   IN EFI_DRIVER_BINDING_PROTOCOL  *This,\r
   IN EFI_HANDLE                   ControllerHandle,\r
   IN UINTN                        NumberOfChildren,\r
-  IN EFI_HANDLE                   *ChildHandleBuffer\r
+  IN EFI_HANDLE                   *ChildHandleBuffer OPTIONAL\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Creates a child handle and installs a protocol.\r
-  \r
-  The CreateChild() function installs a protocol on ChildHandle. \r
-  If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. \r
-  If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.\r
+  Creates a child handle with a set of I/O services.\r
 \r
 \r
-  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
-  @param  ChildHandle Pointer to the handle of the child to create. If it is NULL,\r
-                      then a new handle is created. If it is a pointer to an existing UEFI handle, \r
-                      then the protocol is added to the existing UEFI handle.\r
+  @param[in]       This              Protocol instance pointer.\r
+  @param[in, out]  ChildHandle       Pointer to the handle of the child to create. If\r
+                                     it is NULL, then a new handle is created. If\r
+                                                                        it is not NULL, then the I/O services are added \r
+                                                                        to the existing child handle.\r
 \r
 \r
-  @retval EFI_SUCCES            The protocol was added to ChildHandle.\r
-  @retval EFI_INVALID_PARAMETER ChildHandle is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  There are not enough resources availabe to create\r
-                                the child\r
-  @retval other                 The child handle was not created\r
+  @retval EFI_SUCCES                 The protocol was added to ChildHandle. \r
+  @retval EFI_INVALID_PARAMETER      ChildHandle is NULL. \r
+  @retval EFI_OUT_OF_RESOURCES       There are not enough resources availabe to \r
+                                     create the child.\r
+  @retval Others                     The child handle was not created.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
@@ -195,21 +183,24 @@ MnpServiceBindingCreateChild (
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Destroys a child handle with a protocol installed on it.\r
-  \r
-  The DestroyChild() function does the opposite of CreateChild(). It removes a protocol \r
-  that was installed by CreateChild() from ChildHandle. If the removed protocol is the \r
-  last protocol on ChildHandle, then ChildHandle is destroyed.\r
-\r
-  @param  This        Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.\r
-  @param  ChildHandle Handle of the child to destroy\r
-\r
-  @retval EFI_SUCCES            The protocol was removed from ChildHandle.\r
-  @retval EFI_UNSUPPORTED       ChildHandle does not support the protocol that is being removed.\r
-  @retval EFI_INVALID_PARAMETER Child handle is not a valid UEFI Handle.\r
-  @retval EFI_ACCESS_DENIED     The protocol could not be removed from the ChildHandle\r
-                                because its services are being used.\r
-  @retval other                 The child handle was not destroyed\r
+  Destroys a child handle with a set of I/O services.\r
+   \r
+  The DestroyChild() function does the opposite of CreateChild(). It removes a \r
+  protocol that was installed by CreateChild() from ChildHandle. If the removed \r
+  protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. \r
+   \r
+  @param[in]  This               Pointer to the EFI_SERVICE_BINDING_PROTOCOL \r
+                                 instance.\r
+  @param[in]  ChildHandle        Handle of the child to destroy.\r
+\r
+  @retval EFI_SUCCES             The protocol was removed from ChildHandle. \r
+  @retval EFI_UNSUPPORTED        ChildHandle does not support the protocol that\r
+                                 is being removed.\r
+  @retval EFI_INVALID_PARAMETER  ChildHandle is not a valid UEFI handle.\r
+  @retval EFI_ACCESS_DENIED      The protocol could not be removed from the\r
+                                 ChildHandle because its services are being\r
+                                 used.\r
+  @retval Others                 The child handle was not destroyed.\r
 \r
 **/\r
 EFI_STATUS\r
 \r
 **/\r
 EFI_STATUS\r
index f875b9c1860f9978064681902c1632862d7e206d..f6633a08e471efd4ec6d39a4062066403c9708f1 100644 (file)
@@ -1,20 +1,16 @@
-#/** @file\r
-# Component name for module Mnp\r
-#\r
-# FIX ME!\r
-# Copyright (c) 2006, Intel Corporation\r
-#\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
-#  http://opensource.org/licenses/bsd-license.php\r
-#\r
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
-#**/\r
+/** @file\r
+  Component description file for Mnp module.\r
+\r
+Copyright (c) 2006, 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 \r
+**/\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = MnpDxe\r
 [Defines]\r
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = MnpDxe\r
@@ -36,6 +32,7 @@
 [Sources.common]\r
   MnpMain.c\r
   MnpIo.c\r
 [Sources.common]\r
   MnpMain.c\r
   MnpIo.c\r
+  ComponentName.h\r
   MnpDriver.h\r
   ComponentName.c\r
   MnpDriver.c\r
   MnpDriver.h\r
   ComponentName.c\r
   MnpDriver.c\r
index 666e81c7f38273e237e7d0ff60b8319c7b3559d7..db5b5939d40d585293fe8197846251865aab97e0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 /** @file\r
-    Declaration of structures and functions of MnpDxe driver.\r
+  Declaration of structures and functions of MnpDxe driver.\r
     \r
     \r
-Copyright (c) 2005 - 2008, Intel Corporation.<BR>\r
+Copyright (c) 2005 - 2008, 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
 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
@@ -44,7 +44,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   MNP_INSTANCE_DATA_SIGNATURE \\r
   )\r
 \r
   MNP_INSTANCE_DATA_SIGNATURE \\r
   )\r
 \r
-typedef struct _MNP_INSTANCE_DATA {\r
+typedef struct {\r
   UINT32                          Signature;\r
 \r
   MNP_SERVICE_DATA                *MnpServiceData;\r
   UINT32                          Signature;\r
 \r
   MNP_SERVICE_DATA                *MnpServiceData;\r
@@ -71,18 +71,18 @@ typedef struct _MNP_INSTANCE_DATA {
   UINT8                           ReceiveFilter;\r
 } MNP_INSTANCE_DATA;\r
 \r
   UINT8                           ReceiveFilter;\r
 } MNP_INSTANCE_DATA;\r
 \r
-typedef struct _MNP_GROUP_ADDRESS {\r
+typedef struct {\r
   LIST_ENTRY      AddrEntry;\r
   EFI_MAC_ADDRESS Address;\r
   INTN            RefCnt;\r
 } MNP_GROUP_ADDRESS;\r
 \r
   LIST_ENTRY      AddrEntry;\r
   EFI_MAC_ADDRESS Address;\r
   INTN            RefCnt;\r
 } MNP_GROUP_ADDRESS;\r
 \r
-typedef struct _MNP_GROUP_CONTROL_BLOCK {\r
+typedef struct {\r
   LIST_ENTRY        CtrlBlkEntry;\r
   MNP_GROUP_ADDRESS *GroupAddress;\r
 } MNP_GROUP_CONTROL_BLOCK;\r
 \r
   LIST_ENTRY        CtrlBlkEntry;\r
   MNP_GROUP_ADDRESS *GroupAddress;\r
 } MNP_GROUP_CONTROL_BLOCK;\r
 \r
-typedef struct _MNP_RXDATA_WRAP {\r
+typedef struct {\r
   LIST_ENTRY                        WrapEntry;\r
   MNP_INSTANCE_DATA                 *Instance;\r
   EFI_MANAGED_NETWORK_RECEIVE_DATA  RxData;\r
   LIST_ENTRY                        WrapEntry;\r
   MNP_INSTANCE_DATA                 *Instance;\r
   EFI_MANAGED_NETWORK_RECEIVE_DATA  RxData;\r
@@ -93,53 +93,54 @@ typedef struct _MNP_RXDATA_WRAP {
 /**\r
   Initialize the mnp service context data.\r
 \r
 /**\r
   Initialize the mnp service context data.\r
 \r
-  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
-  @param[in]  ImageHandle           The driver image handle.\r
-  @param[in]  ControllerHandle      Handle of device to bind driver to.\r
+  @param[in, out]  MnpServiceData     Pointer to the mnp service 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
 \r
   @retval EFI_SUCCESS           The mnp service context is initialized.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_UNSUPPORTED       ControllerHandle does not support Simple Network Protocol.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpInitializeServiceData (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpInitializeServiceData (\r
-  IN 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
 \r
   );\r
 \r
 /**\r
   Flush the mnp service context data.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  ImageHandle           The driver image handle.\r
-  \r
+  @param[in, out]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in]       ImageHandle       The driver image handle.\r
+\r
 **/\r
 VOID\r
 MnpFlushServiceData (\r
 **/\r
 VOID\r
 MnpFlushServiceData (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN EFI_HANDLE        ImageHandle\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN EFI_HANDLE            ImageHandle\r
   );\r
 \r
 /**\r
   Initialize the mnp instance context data.\r
 \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]  Instance          Pointer to the mnp instance context data to\r
-                                initialize.\r
+  @param[in]       MnpServiceData   Pointer to the mnp service context data.\r
+  @param[in, out]  Instance         Pointer to the mnp instance context data \r
+                                    to initialize.\r
 \r
 **/\r
 VOID\r
 MnpInitializeInstanceData (\r
 \r
 **/\r
 VOID\r
 MnpInitializeInstanceData (\r
-  IN MNP_SERVICE_DATA   *MnpServiceData,\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN MNP_SERVICE_DATA       *MnpServiceData,\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Check whether the token specified by Arg maches the token in Item.\r
+  Check whether the token specified by Arg matches the token in Item.\r
 \r
   @param[in]  Map               Pointer to the NET_MAP.\r
 \r
   @param[in]  Map               Pointer to the NET_MAP.\r
-  @param[in]  Item              Pointer to the NET_MAP_ITEM\r
+  @param[in]  Item              Pointer to the NET_MAP_ITEM.\r
   @param[in]  Arg               Pointer to the Arg, it's a pointer to the token to\r
                                 check.\r
 \r
   @param[in]  Arg               Pointer to the Arg, it's a pointer to the token to\r
                                 check.\r
 \r
@@ -159,10 +160,10 @@ MnpTokenExist (
 /**\r
   Cancel the token specified by Arg if it matches the token in Item.\r
 \r
 /**\r
   Cancel the token specified by Arg if it matches the token in Item.\r
 \r
-  @param[in, out]  Map          Pointer to the NET_MAP.\r
-  @param[in]       Item         Pointer to the NET_MAP_ITEM\r
-  @param[in]       Arg          Pointer to the Arg, it's a pointer to the token to\r
-                                cancel.\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
+                                     token to cancel.\r
 \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
 \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
@@ -173,58 +174,59 @@ MnpTokenExist (
 **/\r
 EFI_STATUS\r
 MnpCancelTokens (\r
 **/\r
 EFI_STATUS\r
 MnpCancelTokens (\r
-  IN OUT NET_MAP   *Map,\r
-  IN 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
   Flush the instance's received data.\r
 \r
   );\r
 \r
 /**\r
   Flush the instance's received data.\r
 \r
-  @param  Instance              Pointer to the mnp instance context data.\r
+  @param[in, out]  Instance              Pointer to the mnp instance context data.\r
 \r
 **/\r
 VOID\r
 MnpFlushRcvdDataQueue (\r
 \r
 **/\r
 VOID\r
 MnpFlushRcvdDataQueue (\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   );\r
 \r
 /**\r
   Configure the Instance using ConfigData.\r
 \r
   );\r
 \r
 /**\r
   Configure the Instance using ConfigData.\r
 \r
-  @param[in]  Instance          Pointer to the mnp instance context data.\r
-  @param[in]  ConfigData        Pointer to the configuration data used to configure\r
+  @param[in, out]  Instance     Pointer to the mnp instance context data.\r
+  @param[in]       ConfigData   Pointer to the configuration data used to configure\r
                                 the isntance.\r
 \r
   @retval EFI_SUCCESS           The Instance is configured.\r
   @retval EFI_UNSUPPORTED       EnableReceiveTimestamps is on and the\r
                                 implementation doesn't support it.\r
                                 the isntance.\r
 \r
   @retval EFI_SUCCESS           The Instance is configured.\r
   @retval EFI_UNSUPPORTED       EnableReceiveTimestamps is on and the\r
                                 implementation doesn't support it.\r
-  @retval Other                 Some error occurs.\r
+  @retval Others                Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpConfigureInstance (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpConfigureInstance (\r
-  IN 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
   );\r
 \r
 /**\r
   Do the group operations for this instance.\r
 \r
-  @param[in]  Instance          Pointer to the instance context data.\r
-  @param[in]  JoinFlag          Set to TRUE to join a group. Set to TRUE to leave a\r
-                                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 if\r
-                                FALSE.\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
+                                   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
+                                   is FALSE.\r
 \r
 \r
-  @retval EFI_SUCCESS           The group operation finished.\r
-  @retval Other                 Some error occurs.\r
+  @retval EFI_SUCCESS              The group operation finished.\r
+  @retval EFI_OUT_OF_RESOURCES     Failed due to lack of memory resources.\r
+  @retval Others                   Other errors as indicated.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOp (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpGroupOp (\r
-  IN MNP_INSTANCE_DATA        *Instance,\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 BOOLEAN                  JoinFlag,\r
   IN EFI_MAC_ADDRESS          *MacAddress OPTIONAL,\r
   IN MNP_GROUP_CONTROL_BLOCK  *CtrlBlk OPTIONAL\r
@@ -233,8 +235,8 @@ MnpGroupOp (
 /**\r
   Validates the Mnp transmit token.\r
 \r
 /**\r
   Validates the Mnp transmit token.\r
 \r
-  @param[in]  Instance              Pointer to the Mnp instance context data.\r
-  @param[in]  Token                 Pointer to the transmit token to check.\r
+  @param[in]  Instance            Pointer to the Mnp instance context data.\r
+  @param[in]  Token               Pointer to the transmit token to check.\r
 \r
   @return The Token is valid or not.\r
 \r
 \r
   @return The Token is valid or not.\r
 \r
@@ -248,13 +250,13 @@ MnpIsValidTxToken (
 /**\r
   Build the packet to transmit from the TxData passed in.\r
 \r
 /**\r
   Build the packet to transmit from the TxData passed in.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  TxData                Pointer to the transmit data containing the\r
-                                information to build the packet.\r
-  @param  PktBuf                Pointer to record the address of the packet.\r
-  @param  PktLen                Pointer to a UINT32 variable used to record the\r
-                                packet's length.\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
+                                   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
+                                   length.\r
+\r
 **/\r
 VOID\r
 MnpBuildTxPacket (\r
 **/\r
 VOID\r
 MnpBuildTxPacket (\r
@@ -267,28 +269,28 @@ MnpBuildTxPacket (
 /**\r
   Synchronously send out the packet.\r
 \r
 /**\r
   Synchronously send out the packet.\r
 \r
-  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
-  @param[in]  Packet                Pointer to the pakcet buffer.\r
-  @param[in]  Length                The length of the packet.\r
-  @param[in]  Token                 Pointer to the token the packet generated from.\r
+  @param[in]       MnpServiceData      Pointer to the mnp service context data.\r
+  @param[in]       Packet              Pointer to the pakcet buffer.\r
+  @param[in]       Length              The length of the packet.\r
+  @param[in, out]  Token               Pointer to the token the packet generated from.\r
 \r
 \r
-  @retval EFI_SUCCESS           The packet is sent out.\r
-  @retval EFI_TIMEOUT           Time out occurs, the packet isn't sent.\r
-  @retval EFI_DEVICE_ERROR      An unexpected network error occurs.\r
+  @retval EFI_SUCCESS                  The packet is sent out.\r
+  @retval EFI_TIMEOUT                  Time out occurs, the packet isn't sent.\r
+  @retval EFI_DEVICE_ERROR             An unexpected network error occurs.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpSyncSendPacket (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpSyncSendPacket (\r
-  IN MNP_SERVICE_DATA                      *MnpServiceData,\r
-  IN UINT8                                 *Packet,\r
-  IN UINT32                                Length,\r
-  IN 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
   Try to deliver the received packet to the instance.\r
 \r
   );\r
 \r
 /**\r
   Try to deliver the received packet to the instance.\r
 \r
-  @param[in]  Instance          Pointer to the mnp instance context data.\r
+  @param[in, out]  Instance     Pointer to the mnp instance context data.\r
 \r
   @retval EFI_SUCCESS           The received packet is delivered, or there is no\r
                                 packet to deliver, or there is no available receive\r
 \r
   @retval EFI_SUCCESS           The received packet is delivered, or there is no\r
                                 packet to deliver, or there is no available receive\r
@@ -298,16 +300,16 @@ MnpSyncSendPacket (
 **/\r
 EFI_STATUS\r
 MnpInstanceDeliverPacket (\r
 **/\r
 EFI_STATUS\r
 MnpInstanceDeliverPacket (\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   );\r
 \r
 /**\r
   Recycle the RxData and other resources used to hold and deliver the received\r
   packet.\r
 \r
   );\r
 \r
 /**\r
   Recycle the RxData and other resources used to hold and deliver the received\r
   packet.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registerd to the Event.\r
-  \r
+  @param[in]  Event               The event this notify function registered to.\r
+  @param[in]  Context             Pointer to the context data registerd to the Event.\r
+\r
 **/\r
 VOID\r
 EFIAPI\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -319,7 +321,7 @@ MnpRecycleRxData (
 /**\r
   Try to receive a packet and deliver it.\r
 \r
 /**\r
   Try to receive a packet and deliver it.\r
 \r
-  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in, out]  MnpServiceData        Pointer to the mnp service 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
 \r
   @retval EFI_SUCCESS           add return value to function comment\r
   @retval EFI_NOT_STARTED       The simple network protocol is not started.\r
@@ -329,7 +331,7 @@ MnpRecycleRxData (
 **/\r
 EFI_STATUS\r
 MnpReceivePacket (\r
 **/\r
 EFI_STATUS\r
 MnpReceivePacket (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -337,7 +339,7 @@ MnpReceivePacket (
   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
   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]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
+  @param[in, out]  MnpServiceData        Pointer to the MNP_SERVICE_DATA.\r
 \r
   @return     Pointer to the allocated free NET_BUF structure, if NULL the \r
               operation is failed.\r
 \r
   @return     Pointer to the allocated free NET_BUF structure, if NULL the \r
               operation is failed.\r
@@ -345,29 +347,29 @@ MnpReceivePacket (
 **/\r
 NET_BUF *\r
 MnpAllocNbuf (\r
 **/\r
 NET_BUF *\r
 MnpAllocNbuf (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
   );\r
 \r
 /**\r
   Try to reclaim the Nbuf into the buffer pool.\r
 \r
   );\r
 \r
 /**\r
   Try to reclaim the Nbuf into the buffer pool.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  Nbuf                  Pointer to the NET_BUF to free.\r
-  \r
+  @param[in,out]  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in,out]  Nbuf                  Pointer to the NET_BUF to free.\r
+\r
 **/\r
 VOID\r
 MnpFreeNbuf (\r
 **/\r
 VOID\r
 MnpFreeNbuf (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData,\r
-  IN NET_BUF           *Nbuf\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData,\r
+  IN OUT NET_BUF           *Nbuf\r
   );\r
 \r
 /**\r
   Remove the received packets if timeout occurs.\r
 \r
   );\r
 \r
 /**\r
   Remove the received packets if timeout occurs.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registered to the\r
-                            event.\r
-  \r
+  @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
 VOID\r
 EFIAPI\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -380,16 +382,15 @@ MnpCheckPacketTimeout (
   Poll to receive the packets from Snp. This function is either called by upperlayer\r
   protocols/applications or the system poll timer notify mechanism.\r
 \r
   Poll to receive the packets from Snp. This function is either called by upperlayer\r
   protocols/applications or the system poll timer notify mechanism.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registered to the\r
-                            event.\r
+  @param[in]       Event        The event this notify function registered to.\r
+  @param[in, out]  Context      Pointer to the context data registered to the event.\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 MnpSystemPoll (\r
   IN EFI_EVENT  Event,\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 MnpSystemPoll (\r
   IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
+  IN OUT VOID   *Context\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
@@ -414,14 +415,14 @@ MnpSystemPoll (
   @retval EFI_NOT_STARTED       This MNP child driver instance has not been\r
                                 configured. The default values are returned in\r
                                 MnpConfigData if it is not NULL.\r
   @retval EFI_NOT_STARTED       This MNP child driver instance has not been\r
                                 configured. The default values are returned in\r
                                 MnpConfigData if it is not NULL.\r
-  @retval Other                 The mode data could not be read.\r
+  @retval Others                The mode data could not be read.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 MnpGetModeData (\r
   IN  EFI_MANAGED_NETWORK_PROTOCOL     *This,\r
 \r
 **/\r
 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_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData, OPTIONAL\r
   OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL\r
   );\r
 \r
   OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL\r
   );\r
 \r
@@ -447,13 +448,13 @@ MnpGetModeData (
   Note: Warning: Receive filter settings that overlap will consume extra\r
   processor and/or DMA resources and degrade system and network performance.\r
 \r
   Note: Warning: Receive filter settings that overlap will consume extra\r
   processor and/or DMA resources and degrade system and network performance.\r
 \r
-  @param[in]  This             Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
-  @param[in]  MnpConfigData    Pointer to configuration data that will be assigned\r
-                               to the MNP child driver instance. If NULL, the MNP\r
-                               child driver instance is reset to startup defaults\r
-                               and all pending transmit and receive requests are\r
-                               flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is\r
-                               defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().\r
+  @param[in]  This           Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  MnpConfigData  Pointer to configuration data that will be assigned\r
+                             to the MNP child driver instance. If NULL, the MNP\r
+                             child driver instance is reset to startup defaults\r
+                             and all pending transmit and receive requests are\r
+                             flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is\r
+                             defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().\r
 \r
   @retval EFI_SUCCESS            The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is\r
 \r
   @retval EFI_SUCCESS            The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is\r
@@ -473,7 +474,7 @@ MnpGetModeData (
   @retval EFI_DEVICE_ERROR       An unexpected network or system error\r
                                  occurred. The MNP child driver instance has\r
                                  been reset to startup defaults.\r
   @retval EFI_DEVICE_ERROR       An unexpected network or system error\r
                                  occurred. The MNP child driver instance has\r
                                  been reset to startup defaults.\r
-  @retval Other                  The MNP child driver instance has been reset to\r
+  @retval Others                 The MNP child driver instance has been reset to\r
                                  startup defaults.\r
 \r
 **/\r
                                  startup defaults.\r
 \r
 **/\r
@@ -490,15 +491,15 @@ MnpConfigure (
    \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
    \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
+  underlying EFI_SIMPLE_NETWORK. MCastIpToMac() function, which may also be\r
   unsupported in some MNP implementations.\r
 \r
   unsupported in some MNP implementations.\r
 \r
-  @param[in]  This       Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
-  @param[in]  Ipv6Flag   Set to TRUE to if IpAddress is an IPv6 multicast address.\r
-                         Set to FALSE if IpAddress is an IPv4 multicast address.\r
-  @param[in]  IpAddress  Pointer to the multicast IP address (in network byte order)\r
-                         to convert.\r
-  @param[out] MacAddress Pointer to the resulting multicast MAC address. \r
+  @param[in]  This        Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  Ipv6Flag    Set to TRUE to if IpAddress is an IPv6 multicast address.\r
+                          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
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
@@ -512,7 +513,7 @@ MnpConfigure (
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this\r
                                 MNP implementation.\r
   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this\r
                                 MNP implementation.\r
   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.\r
-  @retval Other                 The address could not be converted.\r
+  @retval Others                The address could not be converted.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -555,7 +556,7 @@ MnpMcastIpToMac (
                                 startup defaults.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP\r
                                 implementation.\r
                                 startup defaults.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP\r
                                 implementation.\r
-  @retval Other                 The requested operation could not be completed.\r
+  @retval Others                The requested operation could not be completed.\r
                                 The MNP multicast group settings are unchanged.\r
 \r
 **/\r
                                 The MNP multicast group settings are unchanged.\r
 \r
 **/\r
@@ -584,8 +585,8 @@ MnpGroups (
  \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
  \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 is\r
-                      defined in "Related Definitions" below.\r
+                      descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN\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
 \r
   @retval EFI_SUCCESS            The transmit completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
@@ -642,8 +643,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
   @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 pending\r
-                       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
 \r
   @retval EFI_SUCCESS            The asynchronous I/O request was aborted and\r
                                  Token.Event was signaled. When Token is NULL,\r
@@ -675,11 +676,11 @@ MnpCancel (
   updates the Token.Status and Token.RxData fields and the Token.Event is\r
   signaled.\r
    \r
   updates the Token.Status and Token.RxData fields and the Token.Event is\r
   signaled.\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
-                            EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in\r
-                            EFI_MANAGED_NETWORK_PROTOCOL.Transmit().\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
+                        EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in\r
+                        EFI_MANAGED_NETWORK_PROTOCOL.Transmit().\r
 \r
   @retval EFI_SUCCESS            The receive completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
 \r
   @retval EFI_SUCCESS            The receive completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
@@ -719,7 +720,7 @@ MnpReceive (
   applications that are experiencing packet loss should try calling the Poll()\r
   function more often.\r
 \r
   applications that are experiencing packet loss should try calling the Poll()\r
   function more often.\r
 \r
-  @param[in]  This            Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  This         Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS      Incoming or outgoing data was processed.\r
   @retval EFI_NOT_STARTED  This MNP child driver instance has not been\r
 \r
   @retval EFI_SUCCESS      Incoming or outgoing data was processed.\r
   @retval EFI_NOT_STARTED  This MNP child driver instance has not been\r
index b5d1785cb1fe5f6547333b567d34703983917885..a96303945a649507a17487342c59ff71c200cc87 100644 (file)
@@ -1,8 +1,7 @@
 /** @file\r
   Implementation of Managed Network Protocol I/O functions.\r
 /** @file\r
   Implementation of Managed Network Protocol I/O functions.\r
-  \r
-Copyright (c) 2005 - 2007, Intel Corporation.<BR>\r
-\r
+    \r
+Copyright (c) 2005 - 2007, 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
 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
@@ -14,17 +13,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 **/\r
 \r
 #include "MnpImpl.h"\r
 **/\r
 \r
 #include "MnpImpl.h"\r
-#include <Library/NetLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-\r
 \r
 /**\r
   Validates the Mnp transmit token.\r
 \r
 \r
 /**\r
   Validates the Mnp transmit token.\r
 \r
-  @param[in]  Instance              Pointer to the Mnp instance context data.\r
-  @param[in]  Token                 Pointer to the transmit token to check.\r
+  @param[in]  Instance            Pointer to the Mnp instance context data.\r
+  @param[in]  Token               Pointer to the transmit token to check.\r
 \r
   @return The Token is valid or not.\r
 \r
 \r
   @return The Token is valid or not.\r
 \r
@@ -110,13 +104,13 @@ MnpIsValidTxToken (
 /**\r
   Build the packet to transmit from the TxData passed in.\r
 \r
 /**\r
   Build the packet to transmit from the TxData passed in.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
-  @param  TxData                Pointer to the transmit data containing the\r
-                                information to build the packet.\r
-  @param  PktBuf                Pointer to record the address of the packet.\r
-  @param  PktLen                Pointer to a UINT32 variable used to record the\r
-                                packet's length.\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
+                                   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
+                                   length.\r
+\r
 **/\r
 VOID\r
 MnpBuildTxPacket (\r
 **/\r
 VOID\r
 MnpBuildTxPacket (\r
@@ -180,22 +174,22 @@ MnpBuildTxPacket (
 /**\r
   Synchronously send out the packet.\r
 \r
 /**\r
   Synchronously send out the packet.\r
 \r
-  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
-  @param[in]  Packet                Pointer to the pakcet buffer.\r
-  @param[in]  Length                The length of the packet.\r
-  @param[in]  Token                 Pointer to the token the packet generated from.\r
+  @param[in]       MnpServiceData      Pointer to the mnp service context data.\r
+  @param[in]       Packet              Pointer to the pakcet buffer.\r
+  @param[in]       Length              The length of the packet.\r
+  @param[in, out]  Token               Pointer to the token the packet generated from.\r
 \r
 \r
-  @retval EFI_SUCCESS           The packet is sent out.\r
-  @retval EFI_TIMEOUT           Time out occurs, the packet isn't sent.\r
-  @retval EFI_DEVICE_ERROR      An unexpected network error occurs.\r
+  @retval EFI_SUCCESS                  The packet is sent out.\r
+  @retval EFI_TIMEOUT                  Time out occurs, the packet isn't sent.\r
+  @retval EFI_DEVICE_ERROR             An unexpected network error occurs.\r
 \r
 **/\r
 EFI_STATUS\r
 MnpSyncSendPacket (\r
 \r
 **/\r
 EFI_STATUS\r
 MnpSyncSendPacket (\r
-  IN MNP_SERVICE_DATA                      *MnpServiceData,\r
-  IN UINT8                                 *Packet,\r
-  IN UINT32                                Length,\r
-  IN 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
   EFI_STATUS                        Status;\r
   )\r
 {\r
   EFI_STATUS                        Status;\r
@@ -297,7 +291,7 @@ SIGNAL_TOKEN:
 /**\r
   Try to deliver the received packet to the instance.\r
 \r
 /**\r
   Try to deliver the received packet to the instance.\r
 \r
-  @param[in]  Instance          Pointer to the mnp instance context data.\r
+  @param[in, out]  Instance     Pointer to the mnp instance context data.\r
 \r
   @retval EFI_SUCCESS           The received packet is delivered, or there is no\r
                                 packet to deliver, or there is no available receive\r
 \r
   @retval EFI_SUCCESS           The received packet is delivered, or there is no\r
                                 packet to deliver, or there is no available receive\r
@@ -307,7 +301,7 @@ SIGNAL_TOKEN:
 **/\r
 EFI_STATUS\r
 MnpInstanceDeliverPacket (\r
 **/\r
 EFI_STATUS\r
 MnpInstanceDeliverPacket (\r
-  IN MNP_INSTANCE_DATA  *Instance\r
+  IN OUT MNP_INSTANCE_DATA  *Instance\r
   )\r
 {\r
   MNP_SERVICE_DATA                      *MnpServiceData;\r
   )\r
 {\r
   MNP_SERVICE_DATA                      *MnpServiceData;\r
@@ -391,7 +385,7 @@ MnpInstanceDeliverPacket (
 /**\r
   Deliver the received packet for the instances belonging to the MnpServiceData.\r
 \r
 /**\r
   Deliver the received packet for the instances belonging to the MnpServiceData.\r
 \r
-  @param  MnpServiceData        Pointer to the mnp service context data.\r
+  @param[in]  MnpServiceData        Pointer to the mnp service context data.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -420,9 +414,9 @@ MnpDeliverPacket (
   Recycle the RxData and other resources used to hold and deliver the received\r
   packet.\r
 \r
   Recycle the RxData and other resources used to hold and deliver the received\r
   packet.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registerd to the Event.\r
-  \r
+  @param[in]  Event               The event this notify function registered to.\r
+  @param[in]  Context             Pointer to the context data registerd to the Event.\r
+\r
 **/\r
 VOID\r
 EFIAPI\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -467,15 +461,14 @@ MnpRecycleRxData (
 /**\r
   Queue the received packet into instance's receive queue.\r
 \r
 /**\r
   Queue the received packet into instance's receive queue.\r
 \r
-  @param  Instance          Pointer to the mnp instance context data.\r
-  @param  RxDataWrap        Pointer to the Wrap structure containing the\r
-                                received data and other information.\r
-\r
+  @param[in, out]  Instance        Pointer to the mnp instance context data.\r
+  @param[in, out]  RxDataWrap      Pointer to the Wrap structure containing the\r
+                                   received data and other information.\r
 **/\r
 VOID\r
 MnpQueueRcvdPacket (\r
 **/\r
 VOID\r
 MnpQueueRcvdPacket (\r
-  IN MNP_INSTANCE_DATA  *Instance,\r
-  IN MNP_RXDATA_WRAP    *RxDataWrap\r
+  IN OUT MNP_INSTANCE_DATA  *Instance,\r
+  IN OUT MNP_RXDATA_WRAP    *RxDataWrap\r
   )\r
 {\r
   MNP_RXDATA_WRAP *OldRxDataWrap;\r
   )\r
 {\r
   MNP_RXDATA_WRAP *OldRxDataWrap;\r
@@ -600,25 +593,25 @@ MnpMatchPacket (
 /**\r
   Analyse the received packets.\r
 \r
 /**\r
   Analyse the received packets.\r
 \r
-  @param  MnpServiceData    Pointer to the mnp service context data.\r
-  @param  Nbuf              Pointer to the net buffer holding the received\r
-                            packet.\r
-  @param  RxData            Pointer to the buffer used to save the analysed\r
-                            result in EFI_MANAGED_NETWORK_RECEIVE_DATA.\r
-  @param  GroupAddress      Pointer to pointer to a MNP_GROUP_ADDRESS used to\r
-                            pass out the address of the multicast address the\r
-                            received packet destinated to.\r
-  @param  PktAttr           Pointer to the buffer used to save the analysed\r
-                            packet attribute.\r
+  @param[in]       MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in]       Nbuf              Pointer to the net buffer holding the received\r
+                                     packet.\r
+  @param[in, out]  RxData            Pointer to the buffer used to save the analysed\r
+                                     result in EFI_MANAGED_NETWORK_RECEIVE_DATA.\r
+  @param[out]      GroupAddress      Pointer to pointer to a MNP_GROUP_ADDRESS used to\r
+                                     pass out the address of the multicast address the\r
+                                     received packet destinated to.\r
+  @param[out]      PktAttr           Pointer to the buffer used to save the analysed\r
+                                     packet attribute.\r
 \r
 **/\r
 VOID\r
 MnpAnalysePacket (\r
 \r
 **/\r
 VOID\r
 MnpAnalysePacket (\r
-  IN  MNP_SERVICE_DATA                  *MnpServiceData,\r
-  IN  NET_BUF                           *Nbuf,\r
-  IN  EFI_MANAGED_NETWORK_RECEIVE_DATA  *RxData,\r
-  OUT MNP_GROUP_ADDRESS                 **GroupAddress,\r
-  OUT UINT8                             *PktAttr\r
+  IN  MNP_SERVICE_DATA                      *MnpServiceData,\r
+  IN  NET_BUF                               *Nbuf,\r
+  IN  OUT EFI_MANAGED_NETWORK_RECEIVE_DATA  *RxData,\r
+  OUT MNP_GROUP_ADDRESS                     **GroupAddress,\r
+  OUT UINT8                                 *PktAttr\r
   )\r
 {\r
   EFI_SIMPLE_NETWORK_MODE *SnpMode;\r
   )\r
 {\r
   EFI_SIMPLE_NETWORK_MODE *SnpMode;\r
@@ -702,8 +695,8 @@ MnpAnalysePacket (
 /**\r
   Wrap the RxData.\r
 \r
 /**\r
   Wrap the RxData.\r
 \r
-  @param[in]  Instance              Pointer to the mnp instance context data.\r
-  @param[in]  RxData                Pointer to the receive data to wrap.\r
+  @param[in]  Instance           Pointer to the mnp instance context data.\r
+  @param[in]  RxData             Pointer to the receive data to wrap.\r
 \r
   @return Pointer to a MNP_RXDATA_WRAP which wraps the RxData.\r
 \r
 \r
   @return Pointer to a MNP_RXDATA_WRAP which wraps the RxData.\r
 \r
@@ -758,9 +751,9 @@ MnpWrapRxData (
   Enqueue the received the packets to the instances belonging to the\r
   MnpServiceData.\r
 \r
   Enqueue the received the packets to the instances belonging to the\r
   MnpServiceData.\r
 \r
-  @param  MnpServiceData    Pointer to the mnp service context data.\r
-  @param  Nbuf              Pointer to the net buffer representing the received\r
-                            packet.\r
+  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in]  Nbuf              Pointer to the net buffer representing the received\r
+                                packet.\r
 \r
 **/\r
 VOID\r
 \r
 **/\r
 VOID\r
@@ -833,7 +826,7 @@ MnpEnqueuePacket (
 /**\r
   Try to receive a packet and deliver it.\r
 \r
 /**\r
   Try to receive a packet and deliver it.\r
 \r
-  @param[in]  MnpServiceData    Pointer to the mnp service context data.\r
+  @param[in, out]  MnpServiceData        Pointer to the mnp service 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
 \r
   @retval EFI_SUCCESS           add return value to function comment\r
   @retval EFI_NOT_STARTED       The simple network protocol is not started.\r
@@ -843,7 +836,7 @@ MnpEnqueuePacket (
 **/\r
 EFI_STATUS\r
 MnpReceivePacket (\r
 **/\r
 EFI_STATUS\r
 MnpReceivePacket (\r
-  IN MNP_SERVICE_DATA  *MnpServiceData\r
+  IN OUT MNP_SERVICE_DATA  *MnpServiceData\r
   )\r
 {\r
   EFI_STATUS                  Status;\r
   )\r
 {\r
   EFI_STATUS                  Status;\r
@@ -985,10 +978,10 @@ EXIT:
 /**\r
   Remove the received packets if timeout occurs.\r
 \r
 /**\r
   Remove the received packets if timeout occurs.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registered to the\r
-                            event.\r
-  \r
+  @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
 VOID\r
 EFIAPI\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -1052,16 +1045,15 @@ MnpCheckPacketTimeout (
   Poll to receive the packets from Snp. This function is either called by upperlayer\r
   protocols/applications or the system poll timer notify mechanism.\r
 \r
   Poll to receive the packets from Snp. This function is either called by upperlayer\r
   protocols/applications or the system poll timer notify mechanism.\r
 \r
-  @param  Event             The event this notify function registered to.\r
-  @param  Context           Pointer to the context data registered to the\r
-                            event.\r
+  @param[in]       Event        The event this notify function registered to.\r
+  @param[in, out]  Context      Pointer to the context data registered to the event.\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 MnpSystemPoll (\r
   IN EFI_EVENT  Event,\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 MnpSystemPoll (\r
   IN EFI_EVENT  Event,\r
-  IN VOID       *Context\r
+  IN OUT VOID   *Context\r
   )\r
 {\r
   MNP_SERVICE_DATA  *MnpServiceData;\r
   )\r
 {\r
   MNP_SERVICE_DATA  *MnpServiceData;\r
index 2ca3d7917f3a80c39fd09212616559022413a02a..1cbe4e4e6e8b1940f35d5671c738b2c9e51eceec 100644 (file)
@@ -1,8 +1,7 @@
 /** @file\r
   Implementation of Managed Network Protocol public services.\r
 /** @file\r
   Implementation of Managed Network Protocol public services.\r
-  \r
-Copyright (c) 2005 - 2007, Intel Corporation.<BR>\r
 \r
 \r
+Copyright (c) 2005 - 2007, 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
 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
@@ -12,11 +11,8 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
-#include "MnpImpl.h"\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/BaseLib.h>\r
-\r
 \r
 \r
+#include "MnpImpl.h"\r
 \r
 /**\r
   Returns the operational parameters for the current MNP child driver. May also\r
 \r
 /**\r
   Returns the operational parameters for the current MNP child driver. May also\r
@@ -40,14 +36,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   @retval EFI_NOT_STARTED       This MNP child driver instance has not been\r
                                 configured. The default values are returned in\r
                                 MnpConfigData if it is not NULL.\r
   @retval EFI_NOT_STARTED       This MNP child driver instance has not been\r
                                 configured. The default values are returned in\r
                                 MnpConfigData if it is not NULL.\r
-  @retval Other                 The mode data could not be read.\r
+  @retval Others                The mode data could not be read.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 MnpGetModeData (\r
   IN  EFI_MANAGED_NETWORK_PROTOCOL     *This,\r
 \r
 **/\r
 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_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData, OPTIONAL\r
   OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL\r
   )\r
 {\r
   OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL\r
   )\r
 {\r
@@ -76,7 +72,7 @@ MnpGetModeData (
     //\r
     // Copy the underlayer Snp mode data.\r
     //\r
     //\r
     // Copy the underlayer Snp mode data.\r
     //\r
-    Snp           = Instance->MnpServiceData->Snp;\r
+    Snp = Instance->MnpServiceData->Snp;\r
     CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));\r
   }\r
 \r
     CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));\r
   }\r
 \r
@@ -114,13 +110,13 @@ MnpGetModeData (
   Note: Warning: Receive filter settings that overlap will consume extra\r
   processor and/or DMA resources and degrade system and network performance.\r
 \r
   Note: Warning: Receive filter settings that overlap will consume extra\r
   processor and/or DMA resources and degrade system and network performance.\r
 \r
-  @param[in]  This             Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
-  @param[in]  MnpConfigData    Pointer to configuration data that will be assigned\r
-                               to the MNP child driver instance. If NULL, the MNP\r
-                               child driver instance is reset to startup defaults\r
-                               and all pending transmit and receive requests are\r
-                               flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is\r
-                               defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().\r
+  @param[in]  This           Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  MnpConfigData  Pointer to configuration data that will be assigned\r
+                             to the MNP child driver instance. If NULL, the MNP\r
+                             child driver instance is reset to startup defaults\r
+                             and all pending transmit and receive requests are\r
+                             flushed. Type EFI_MANAGED_NETWORK_CONFIG_DATA is\r
+                             defined in EFI_MANAGED_NETWORK_PROTOCOL.GetModeData().\r
 \r
   @retval EFI_SUCCESS            The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is\r
 \r
   @retval EFI_SUCCESS            The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER  One or more of the following conditions is\r
@@ -140,7 +136,7 @@ MnpGetModeData (
   @retval EFI_DEVICE_ERROR       An unexpected network or system error\r
                                  occurred. The MNP child driver instance has\r
                                  been reset to startup defaults.\r
   @retval EFI_DEVICE_ERROR       An unexpected network or system error\r
                                  occurred. The MNP child driver instance has\r
                                  been reset to startup defaults.\r
-  @retval Other                  The MNP child driver instance has been reset to\r
+  @retval Others                 The MNP child driver instance has been reset to\r
                                  startup defaults.\r
 \r
 **/\r
                                  startup defaults.\r
 \r
 **/\r
@@ -193,15 +189,15 @@ ON_EXIT:
    \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
    \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
+  underlying EFI_SIMPLE_NETWORK. MCastIpToMac() function, which may also be\r
   unsupported in some MNP implementations.\r
 \r
   unsupported in some MNP implementations.\r
 \r
-  @param[in]  This       Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
-  @param[in]  Ipv6Flag   Set to TRUE to if IpAddress is an IPv6 multicast address.\r
-                         Set to FALSE if IpAddress is an IPv4 multicast address.\r
-  @param[in]  IpAddress  Pointer to the multicast IP address (in network byte order)\r
-                         to convert.\r
-  @param[out] MacAddress Pointer to the resulting multicast MAC address. \r
+  @param[in]  This        Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  Ipv6Flag    Set to TRUE to if IpAddress is an IPv6 multicast address.\r
+                          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
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_INVALID_PARAMETER One of the following conditions is TRUE:\r
@@ -215,7 +211,7 @@ ON_EXIT:
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this\r
                                 MNP implementation.\r
   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this\r
                                 MNP implementation.\r
   @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred.\r
-  @retval Other                 The address could not be converted.\r
+  @retval Others                The address could not be converted.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -326,7 +322,7 @@ ON_EXIT:
                                 startup defaults.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP\r
                                 implementation.\r
                                 startup defaults.\r
   @retval EFI_UNSUPPORTED       The requested feature is unsupported in this MNP\r
                                 implementation.\r
-  @retval Other                 The requested operation could not be completed.\r
+  @retval Others                The requested operation could not be completed.\r
                                 The MNP multicast group settings are unchanged.\r
 \r
 **/\r
                                 The MNP multicast group settings are unchanged.\r
 \r
 **/\r
@@ -457,8 +453,8 @@ ON_EXIT:
  \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
  \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 is\r
-                      defined in "Related Definitions" below.\r
+                      descriptor. Type EFI_MANAGED_NETWORK_COMPLETION_TOKEN\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
 \r
   @retval EFI_SUCCESS            The transmit completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
@@ -562,11 +558,11 @@ ON_EXIT:
   updates the Token.Status and Token.RxData fields and the Token.Event is\r
   signaled.\r
    \r
   updates the Token.Status and Token.RxData fields and the Token.Event is\r
   signaled.\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
-                            EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in\r
-                            EFI_MANAGED_NETWORK_PROTOCOL.Transmit().\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
+                        EFI_MANAGED_NETWORK_COMPLETION_TOKEN is defined in\r
+                        EFI_MANAGED_NETWORK_PROTOCOL.Transmit().\r
 \r
   @retval EFI_SUCCESS            The receive completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
 \r
   @retval EFI_SUCCESS            The receive completion token was cached.\r
   @retval EFI_NOT_STARTED        This MNP child driver instance has not been\r
@@ -658,8 +654,8 @@ ON_EXIT:
   @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
   @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 pending\r
-                       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
 \r
   @retval EFI_SUCCESS            The asynchronous I/O request was aborted and\r
                                  Token.Event was signaled. When Token is NULL,\r
@@ -733,7 +729,7 @@ ON_EXIT:
   applications that are experiencing packet loss should try calling the Poll()\r
   function more often.\r
 \r
   applications that are experiencing packet loss should try calling the Poll()\r
   function more often.\r
 \r
-  @param[in]  This            Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
+  @param[in]  This         Pointer to the EFI_MANAGED_NETWORK_PROTOCOL instance.\r
 \r
   @retval EFI_SUCCESS      Incoming or outgoing data was processed.\r
   @retval EFI_NOT_STARTED  This MNP child driver instance has not been\r
 \r
   @retval EFI_SUCCESS      Incoming or outgoing data was processed.\r
   @retval EFI_NOT_STARTED  This MNP child driver instance has not been\r