]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
Update IPsec.h file to follow approved ECR which will be collected into future UEFI...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Impl.c
index ec545a6c542e9e8d9a80a97360b6f057973c4c09..2cad1f3bb97e03b03d1c60e37e41421f0bd29dde 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2010, Intel Corporation.<BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\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
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "Ip4Impl.h"\r
 \r
-EFI_IPSEC_PROTOCOL    *mIpSec = NULL;\r
+EFI_IPSEC2_PROTOCOL    *mIpSec = NULL;\r
 \r
 /**\r
   Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.\r
@@ -440,16 +440,13 @@ EfiIp4GetModeData (
     }\r
   }\r
 \r
-  if (MnpConfigData != NULL) {\r
-    CopyMem (MnpConfigData, &IpSb->MnpConfigData, sizeof (*MnpConfigData));\r
-  }\r
-\r
-  if (SnpModeData != NULL) {\r
-    CopyMem (SnpModeData, &IpSb->SnpMode, sizeof (*SnpModeData));\r
-  }\r
+  //\r
+  // Get fresh mode data from MNP, since underlying media status may change\r
+  //\r
+  Status = IpSb->Mnp->GetModeData (IpSb->Mnp, MnpConfigData, SnpModeData);\r
 \r
   gBS->RestoreTPL (OldTpl);\r
-  return EFI_SUCCESS;\r
+  return Status;\r
 }\r
 \r
 \r
@@ -1244,7 +1241,8 @@ EfiIp4Configure (
       }\r
 \r
       if (Current->UseDefaultAddress && IP4_NO_MAPPING (IpInstance)) {\r
-        return EFI_NO_MAPPING;\r
+        Status = EFI_NO_MAPPING;\r
+        goto ON_EXIT;\r
       }\r
     }\r
   }\r
@@ -1602,6 +1600,7 @@ ON_EXIT:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Ip4TokenExist (\r
   IN NET_MAP                *Map,\r
   IN NET_MAP_ITEM           *Item,\r
@@ -1759,6 +1758,7 @@ Ip4TxTokenValid (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 Ip4FreeTxToken (\r
   IN VOID                   *Context\r
   )\r
@@ -2147,6 +2147,7 @@ ON_EXIT:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Ip4CancelTxTokens (\r
   IN NET_MAP                *Map,\r
   IN NET_MAP_ITEM           *Item,\r
@@ -2202,6 +2203,7 @@ Ip4CancelTxTokens (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Ip4CancelRxTokens (\r
   IN NET_MAP                *Map,\r
   IN NET_MAP_ITEM           *Item,\r
@@ -2444,6 +2446,7 @@ EfiIp4Poll (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 Ip4SentPacketTicking (\r
   IN NET_MAP                *Map,\r
   IN NET_MAP_ITEM           *Item,\r