From 80e3a52238c5e946b1dc4c589ccf0fe285940c1d Mon Sep 17 00:00:00 2001 From: Fu Siyuan Date: Thu, 20 Mar 2014 06:04:50 +0000 Subject: [PATCH] Use PXE_OPFLAGS_STATION_ADDRESS_WRITE when setting new MAC address for the NIC in SNP driver. Signed-off-by: Fu Siyuan Reviewed-by: Dong, Guo Reviewed-by: Jin, Eric Contributed-under: TianoCore Contribution Agreement 1.0 git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15350 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/SnpDxe/Station_address.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c b/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c index 3807188683..0917baf674 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c @@ -1,7 +1,7 @@ /** @file Implementation of reading the MAC address of a network adapter. -Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2014, 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 @@ -117,10 +117,9 @@ PxeSetStnAddr ( Snp->Cdb.CPBsize = PXE_CPBSIZE_NOT_USED; Snp->Cdb.CPBaddr = PXE_CPBADDR_NOT_USED; } else { - Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_READ; + Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_WRITE; // - // even though the OPFLAGS are set to READ, supplying a new address - // in the CPB will make undi change the mac address to the new one. + // Supplying a new address in the CPB will make undi change the mac address to the new one. // CopyMem (&Cpb->StationAddr, NewMacAddr, Snp->Mode.HwAddressSize); -- 2.39.2