/** @file\r
The driver binding and service binding protocol for IP6 driver.\r
\r
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
\r
This program and the accompanying materials\r
IN VOID *Context\r
)\r
{\r
+ EFI_STATUS Status;\r
//\r
- // Close the event so it does not get called again.\r
+ // Test if protocol was even found.\r
+ // Notification function will be called at least once.\r
//\r
- gBS->CloseEvent (Event);\r
-\r
- mIpSec2Installed = TRUE;\r
+ Status = gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **)&mIpSec);\r
+ if (Status == EFI_SUCCESS && mIpSec != NULL) {\r
+ //\r
+ // Close the event so it does not get called again.\r
+ //\r
+ gBS->CloseEvent (Event);\r
\r
- return;\r
+ mIpSec2Installed = TRUE;\r
+ }\r
}\r
\r
/**\r
Status = Ip6LeaveGroup (IpSb, &AllNodes);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
- } \r
+ }\r
}\r
\r
if (IpSb->DefaultInterface != NULL) {\r
}\r
\r
//\r
- // Read the config data from NV variable again. \r
+ // Read the config data from NV variable again.\r
// The default data can be changed by other drivers.\r
//\r
Status = Ip6ConfigReadConfigData (IpSb->MacString, &IpSb->Ip6ConfigInstance);\r
if (EFI_ERROR (Status)) {\r
goto ON_ERROR;\r
}\r
- \r
+\r
//\r
// If there is any default manual address, set it.\r
//\r
);\r
if (EFI_ERROR (Status)) {\r
goto ON_ERROR;\r
- } \r
+ }\r
\r
//\r
// Initialize the IP6 ID\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
FreePool (IpSb);\r
Status = EFI_SUCCESS;\r
}\r
- \r
+\r
Exit:\r
return Status;\r
}\r