summaryrefslogtreecommitdiffstats
path: root/OptionRomPkg/UndiRuntimeDxe
diff options
context:
space:
mode:
Diffstat (limited to 'OptionRomPkg/UndiRuntimeDxe')
-rw-r--r--OptionRomPkg/UndiRuntimeDxe/Decode.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/OptionRomPkg/UndiRuntimeDxe/Decode.c b/OptionRomPkg/UndiRuntimeDxe/Decode.c
index d2d4aba888..65ff692f7f 100644
--- a/OptionRomPkg/UndiRuntimeDxe/Decode.c
+++ b/OptionRomPkg/UndiRuntimeDxe/Decode.c
@@ -1,7 +1,7 @@
/** @file
Provides the basic UNID functions.
-Copyright (c) 2006 - 2009, Intel Corporation
+Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -264,7 +264,8 @@ UNDI_GetInitInfo (
DbPtr->SupportedLoopBackModes = PXE_LOOPBACK_INTERNAL_SUPPORTED |
PXE_LOOPBACK_EXTERNAL_SUPPORTED;
- CdbPtr->StatFlags |= PXE_STATFLAGS_CABLE_DETECT_SUPPORTED;
+ CdbPtr->StatFlags |= (PXE_STATFLAGS_CABLE_DETECT_SUPPORTED |
+ PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED);
return ;
}
@@ -1086,6 +1087,18 @@ UNDI_Status (
}
}
+ //
+ // Return current media status
+ //
+ if ((CdbPtr->OpFlags & PXE_OPFLAGS_GET_MEDIA_STATUS) != 0) {
+ AdapterInfo->PhyAddress = 0xFF;
+ AdapterInfo->CableDetect = 1;
+
+ if (!PhyDetect (AdapterInfo)) {
+ CdbPtr->StatFlags |= PXE_STATFLAGS_GET_STATUS_NO_MEDIA;
+ }
+ }
+
return ;
}