Reviewed-by: Jiaxin Wu <[email protected]>

-----Original Message-----
From: Fu, Siyuan 
Sent: Friday, February 5, 2016 10:21 AM
To: [email protected]
Cc: Ye, Ting <[email protected]>; Subramanian Sriram <[email protected]>; Wu, 
Jiaxin <[email protected]>
Subject: [Patch 2/2] MdeModulePkg: SNP should check Cdb.StatCode with 
PXE_STATCODE_SUCCESS.

This patch fixes a bug in SNP driver that the Cdb.StatCode should be check with 
PXE_STATCODE_SUCCESS instead of EFI_SUCCESS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <[email protected]>
CC: Ye Ting <[email protected]>
CC: Subramanian Sriram <[email protected]>
CC: Wu Jiaxin <[email protected]>
---
 MdeModulePkg/Universal/Network/SnpDxe/Get_status.c      | 2 +-
 MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Get_status.c 
b/MdeModulePkg/Universal/Network/SnpDxe/Get_status.c
index 4da07b5..edbc0f2 100644
--- a/MdeModulePkg/Universal/Network/SnpDxe/Get_status.c
+++ b/MdeModulePkg/Universal/Network/SnpDxe/Get_status.c
@@ -80,7 +80,7 @@ PxeGetStatus (
 
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);
 
-  if (Snp->Cdb.StatCode != EFI_SUCCESS) {
+  if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {
     DEBUG (
       (EFI_D_NET,
       "\nSnp->undi.get_status()  %xh:%xh\n", diff --git 
a/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c 
b/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c
index bb98f4c..c37018c 100644
--- a/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c
+++ b/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c
@@ -2,7 +2,7 @@
     Implementation of managing the multicast receive filters of a network
     interface.
 
-Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
 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 @@ -83,7 +83,7 @@ 
PxeRecvFilterEnable (
 
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);
 
-  if (Snp->Cdb.StatCode != EFI_SUCCESS) {
+  if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {
     //
     // UNDI command failed.  Return UNDI status to caller.
     //
@@ -171,7 +171,7 @@ PxeRecvFilterDisable (
 
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);
 
-  if (Snp->Cdb.StatCode != EFI_SUCCESS) {
+  if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {
     //
     // UNDI command failed.  Return UNDI status to caller.
     //
@@ -223,7 +223,7 @@ PxeRecvFilterRead (
 
   (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);
 
-  if (Snp->Cdb.StatCode != EFI_SUCCESS) {
+  if (Snp->Cdb.StatCode != PXE_STATCODE_SUCCESS) {
     //
     // UNDI command failed.  Return UNDI status to caller.
     //
--
2.7.0.windows.2

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to