public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Ifconfig : Fixed False information about Media State.
@ 2017-10-05  6:36 Meenakshi Aggarwal
  2017-10-05 15:01 ` Carsey, Jaben
  2017-10-06  4:40 ` [PATCH v2] " Meenakshi Aggarwal
  0 siblings, 2 replies; 15+ messages in thread
From: Meenakshi Aggarwal @ 2017-10-05  6:36 UTC (permalink / raw)
  To: edk2-devel, jiaxin.wu, jaben.carsey, ruiyu.ni

Issue : We were setting MediaPresent as TRUE (default), so
even if NetLibDetectMedia() did not set MediaPresent Flag as TRUE,
ifconfig always display Media State as 'Media Present'

Fix : Set MediaPresent as FALSE before calling NetLibDetectMedia()

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
---
 ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
index 4db07b2..7c05b68 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
@@ -554,8 +554,6 @@ IfConfigShowInterfaceInfo (
   EFI_IPv4_ADDRESS              Gateway;
   UINT32                        Index;
   
-  MediaPresent = TRUE;
-
   if (IsListEmpty (IfList)) {
     ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG_INVALID_INTERFACE), gShellNetwork1HiiHandle);
   }
@@ -576,6 +574,8 @@ IfConfigShowInterfaceInfo (
     //
     // Get Media State.
     //
+    MediaPresent = FALSE;
+
     NetLibDetectMedia (IfCb->NicHandle, &MediaPresent);
     if (!MediaPresent) {
       ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IFCONFIG_INFO_MEDIA_STATE), gShellNetwork1HiiHandle, L"Media disconnected");
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-10-11  0:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-05  6:36 [PATCH] Ifconfig : Fixed False information about Media State Meenakshi Aggarwal
2017-10-05 15:01 ` Carsey, Jaben
2017-10-05 17:10   ` Meenakshi Aggarwal
2017-10-05 20:26     ` Carsey, Jaben
2017-10-06  4:21       ` Meenakshi Aggarwal
2017-10-06  4:40 ` [PATCH v2] " Meenakshi Aggarwal
2017-10-06  4:48   ` [PATCH v3] *** Ifconfig : Fixed False information about Media State *** Meenakshi Aggarwal
2017-10-06  4:48     ` [PATCH v3] Ifconfig : Fixed False information about Media State Meenakshi Aggarwal
2017-10-06 14:01       ` Carsey, Jaben
2017-10-08  8:49         ` Meenakshi Aggarwal
2017-10-09  1:29           ` Wu, Jiaxin
2017-10-09  2:09             ` Ni, Ruiyu
2017-10-09  3:21               ` Wu, Jiaxin
2017-10-10 14:07       ` [PATCH v4] " Meenakshi Aggarwal
2017-10-11  0:47         ` Wu, Jiaxin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox