]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
For network dynamic media support:
[mirror_edk2.git] / MdeModulePkg / Universal / Network / MnpDxe / MnpMain.c
index e34936f3b861c0736f423bef7d8c3897e64f6770..1f7b1e6bf067dd9fe0722c6df71a0177e46492b0 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implementation of Managed Network Protocol public services.\r
 \r
-Copyright (c) 2005 - 2009, Intel Corporation.<BR>\r
+Copyright (c) 2005 - 2010, Intel Corporation.<BR>\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions\r
 of the BSD License which accompanies this distribution.  The full\r
@@ -52,6 +52,7 @@ MnpGetModeData (
   EFI_SIMPLE_NETWORK_PROTOCOL *Snp;\r
   EFI_TPL                     OldTpl;\r
   EFI_STATUS                  Status;\r
+  UINT32                      InterruptStatus;\r
 \r
   if (This == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -73,6 +74,12 @@ MnpGetModeData (
     // Copy the underlayer Snp mode data.\r
     //\r
     Snp = Instance->MnpServiceData->MnpDeviceData->Snp;\r
+\r
+    //\r
+    // Upon successful return of GetStatus(), the Snp->Mode->MediaPresent\r
+    // will be updated to reflect any change of media status\r
+    //\r
+    Snp->GetStatus (Snp, &InterruptStatus, NULL);\r
     CopyMem (SnpModeData, Snp->Mode, sizeof (*SnpModeData));\r
   }\r
 \r