]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/SnpNt32Dxe/SnpNt32.c
Roll back one unnecessary change in Dispatcher.c, which is added by previous patch.
[mirror_edk2.git] / Nt32Pkg / SnpNt32Dxe / SnpNt32.c
index 0e8148b7a55a811bcdf80c950b67511d07cace1c..86414696c418e88c5f9379f1a12948dbd61eca5b 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 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
@@ -440,7 +440,7 @@ SNPNT32_INSTANCE_DATA gSnpNt32InstanceTemplate = {
     NET_IFTYPE_ETHERNET,                  //  IfType\r
     FALSE,                                //  MacAddressChangeable\r
     FALSE,                                //  MultipleTxSupported\r
-    FALSE,                                //  MediaPresentSupported\r
+    TRUE,                                 //  MediaPresentSupported\r
     TRUE                                  //  MediaPresent\r
   },\r
   {\r
@@ -995,6 +995,9 @@ SnpNt32Receive (
   SNPNT32_INSTANCE_DATA *Instance;\r
   SNPNT32_GLOBAL_DATA   *GlobalData;\r
   INT32                 ReturnValue;\r
+  UINTN                 BufSize;\r
+  \r
+  BufSize     = *BuffSize;\r
 \r
   Instance    = SNP_NT32_INSTANCE_DATA_FROM_SNP_THIS (This);\r
 \r
@@ -1042,7 +1045,7 @@ SnpNt32Receive (
     *Protocol = NTOHS (*((UINT16 *) (((UINT8 *) Buffer) + 12)));\r
   }\r
 \r
-  return EFI_SUCCESS;\r
+  return (*BuffSize <= BufSize) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL; \r
 }\r
 \r
 /**\r