From: Fu Siyuan Date: Thu, 20 Mar 2014 06:04:50 +0000 (+0000) Subject: Use PXE_OPFLAGS_STATION_ADDRESS_WRITE when setting new MAC address for the NIC in... X-Git-Tag: edk2-stable201903~11624 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=80e3a52238c5e946b1dc4c589ccf0fe285940c1d 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 --- 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);