]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Use PXE_OPFLAGS_STATION_ADDRESS_WRITE when setting new MAC address for the NIC in...
authorFu Siyuan <siyuan.fu@intel.com>
Thu, 20 Mar 2014 06:04:50 +0000 (06:04 +0000)
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 20 Mar 2014 06:04:50 +0000 (06:04 +0000)
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

MdeModulePkg/Universal/Network/SnpDxe/Station_address.c

index 3807188683476ed78cb7d960b74425b02a1af07c..0917baf6743b74822314fa87b4adbab643eaed7a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Implementation of reading the MAC address of a network adapter.\r
  \r
 /** @file\r
     Implementation of reading the MAC address of a network adapter.\r
  \r
-Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials are licensed \r
 and made available under the terms and conditions of the BSD License which \r
 accompanies this distribution. The full text of the license may be found at \r
 This program and the accompanying materials are licensed \r
 and made available under the terms and conditions of the BSD License which \r
 accompanies this distribution. The full text of the license may be found at \r
@@ -117,10 +117,9 @@ PxeSetStnAddr (
     Snp->Cdb.CPBsize  = PXE_CPBSIZE_NOT_USED;\r
     Snp->Cdb.CPBaddr  = PXE_CPBADDR_NOT_USED;\r
   } else {\r
     Snp->Cdb.CPBsize  = PXE_CPBSIZE_NOT_USED;\r
     Snp->Cdb.CPBaddr  = PXE_CPBADDR_NOT_USED;\r
   } else {\r
-    Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_READ;\r
+    Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_WRITE;\r
     //\r
     //\r
-    // even though the OPFLAGS are set to READ, supplying a new address\r
-    // in the CPB will make undi change the mac address to the new one.\r
+    // Supplying a new address in the CPB will make undi change the mac address to the new one.\r
     //\r
     CopyMem (&Cpb->StationAddr, NewMacAddr, Snp->Mode.HwAddressSize);\r
 \r
     //\r
     CopyMem (&Cpb->StationAddr, NewMacAddr, Snp->Mode.HwAddressSize);\r
 \r