/** @file\r
Driver Binding functions and Service Binding functions for the Network driver module.\r
\r
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
\r
- 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
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
);\r
if (EFI_ERROR (Status)) {\r
Udp6CleanService (Udp6Service);\r
- goto EXIT;\r
}\r
\r
EXIT:\r
\r
/**\r
Callback function which provided by user to remove one node in NetDestroyLinkList process.\r
- \r
+\r
@param[in] Entry The entry to be removed.\r
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.\r
\r
- @retval EFI_SUCCESS The entry has been removed successfully.\r
- @retval Others Fail to remove the entry.\r
+ @retval EFI_INVALID_PARAMETER Entry is NULL or Context is NULL.\r
+ @retval EFI_SUCCESS The entry has been removed successfully.\r
+ @retval Others Fail to remove the entry.\r
\r
**/\r
EFI_STATUS\r
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_HANDLE NicHandle;\r
- EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r
- UDP6_SERVICE_DATA *Udp6Service;\r
- LIST_ENTRY *List;\r
- UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context;\r
+ EFI_STATUS Status;\r
+ EFI_HANDLE NicHandle;\r
+ EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding;\r
+ UDP6_SERVICE_DATA *Udp6Service;\r
+ LIST_ENTRY *List;\r
+ UDP6_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context;\r
\r
//\r
// Find the NicHandle where UDP6 ServiceBinding Protocol is installed.\r
NULL\r
);\r
} else if (IsListEmpty (&Udp6Service->ChildrenList)) {\r
- gBS->UninstallMultipleProtocolInterfaces (\r
- NicHandle,\r
- &gEfiUdp6ServiceBindingProtocolGuid,\r
- &Udp6Service->ServiceBinding,\r
- NULL\r
- );\r
- \r
- Udp6CleanService (Udp6Service);\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ NicHandle,\r
+ &gEfiUdp6ServiceBindingProtocolGuid,\r
+ &Udp6Service->ServiceBinding,\r
+ NULL\r
+ );\r
\r
+ Udp6CleanService (Udp6Service);\r
FreePool (Udp6Service);\r
-\r
- Status = EFI_SUCCESS;\r
}\r
\r
return Status;\r
\r
@retval EFI_SUCCES The protocol was added to ChildHandle.\r
@retval EFI_INVALID_PARAMETER This is NULL or ChildHandle is NULL.\r
- @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
the child.\r
@retval other The child handle was not created.\r
\r
if (EFI_ERROR (Status)) {\r
goto ON_ERROR;\r
}\r
- \r
+\r
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);\r
\r
//\r
//\r
// Close the Ip6 protocol on the default IpIo.\r
//\r
- gBS->CloseProtocol (\r
- Udp6Service->IpIo->ChildHandle,\r
- &gEfiIp6ProtocolGuid,\r
- gUdp6DriverBinding.DriverBindingHandle,\r
- Instance->ChildHandle\r
- );\r
+ Status = gBS->CloseProtocol (\r
+ Udp6Service->IpIo->ChildHandle,\r
+ &gEfiIp6ProtocolGuid,\r
+ gUdp6DriverBinding.DriverBindingHandle,\r
+ Instance->ChildHandle\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ Instance->InDestroy = FALSE;\r
+ return Status;\r
+ }\r
+\r
//\r
// Close the Ip6 protocol on this instance's IpInfo.\r
//\r
- gBS->CloseProtocol (\r
- Instance->IpInfo->ChildHandle,\r
- &gEfiIp6ProtocolGuid,\r
- gUdp6DriverBinding.DriverBindingHandle,\r
- Instance->ChildHandle\r
- );\r
+ Status = gBS->CloseProtocol (\r
+ Instance->IpInfo->ChildHandle,\r
+ &gEfiIp6ProtocolGuid,\r
+ gUdp6DriverBinding.DriverBindingHandle,\r
+ Instance->ChildHandle\r
+ );\r
+ if (EFI_ERROR (Status)) {\r
+ Instance->InDestroy = FALSE;\r
+ return Status;\r
+ }\r
\r
//\r
// Uninstall the Udp6Protocol previously installed on the ChildHandle.\r