Use PXE_OPFLAGS_STATION_ADDRESS_WRITE when setting new MAC address for the NIC in SNP driver.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>
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
This commit is contained in:
Fu Siyuan 2014-03-20 06:04:50 +00:00 committed by sfu5
parent 9bc5dabb10
commit 80e3a52238
1 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
/** @file
Implementation of reading the MAC address of a network adapter.
Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2014, 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
@ -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);