summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/SnpDxe/Reset.c
diff options
context:
space:
mode:
authorNickle Wang <nicklew@nvidia.com>2024-07-11 15:41:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-09-02 22:17:12 +0000
commit814470b8340725095ad4db48b291b4e2b4e86941 (patch)
tree6493a8f5e67510ef9308d266c376d6356a642dd1 /NetworkPkg/SnpDxe/Reset.c
parent82c5cacd134d64ea0d0f4dabdbbde38017acb70d (diff)
downloadedk2-814470b8340725095ad4db48b291b4e2b4e86941.tar.gz
edk2-814470b8340725095ad4db48b291b4e2b4e86941.tar.bz2
edk2-814470b8340725095ad4db48b291b4e2b4e86941.zip
NetworkPkg/SnpDxe: return error for unsupported parameter
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4729 From SCT testing report, Reset() does not support the case when ExtendedVerification is set to FALSE. So, we should return EFI_INVALID_PARAMETER in this case. For details, please refer to Bug 4729. Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Diffstat (limited to 'NetworkPkg/SnpDxe/Reset.c')
-rw-r--r--NetworkPkg/SnpDxe/Reset.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/NetworkPkg/SnpDxe/Reset.c b/NetworkPkg/SnpDxe/Reset.c
index 2ff685376d..72f31425d0 100644
--- a/NetworkPkg/SnpDxe/Reset.c
+++ b/NetworkPkg/SnpDxe/Reset.c
@@ -2,6 +2,7 @@
Implementation of resetting a network adapter.
Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
+SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -93,10 +94,12 @@ SnpUndi32Reset (
EFI_STATUS Status;
//
- // Resolve Warning 4 unreferenced parameter problem
+ // There is no support when ExtendedVerification is set to FALSE.
//
- ExtendedVerification = 0;
- DEBUG ((DEBUG_WARN, "ExtendedVerification = %d is not implemented!\n", ExtendedVerification));
+ if (!ExtendedVerification) {
+ DEBUG ((DEBUG_WARN, "ExtendedVerification = %d is not implemented!\n", ExtendedVerification));
+ return EFI_INVALID_PARAMETER;
+ }
if (This == NULL) {
return EFI_INVALID_PARAMETER;