/** @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
-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
-http://opensource.org/licenses/bsd-license.php \r
+\r
+Copyright (c) 2004 - 2018, 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
+http://opensource.org/licenses/bsd-license.php\r
\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
\r
/**\r
- Call UNDI to read the MAC address of the NIC and update the mode structure \r
- with the address. \r
+ Call UNDI to read the MAC address of the NIC and update the mode structure\r
+ with the address.\r
\r
@param Snp Pointer to snp driver structure.\r
- \r
+\r
@retval EFI_SUCCESS The MAC address of the NIC is read successfully.\r
@retval EFI_DEVICE_ERROR Failed to read the MAC address of the NIC.\r
\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
- // 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
/**\r
Modifies or resets the current station address, if supported.\r
- \r
- This function modifies or resets the current station address of a network \r
+\r
+ This function modifies or resets the current station address of a network\r
interface, if supported. If Reset is TRUE, then the current station address is\r
- set to the network interface's permanent address. If Reset is FALSE, and the \r
- network interface allows its station address to be modified, then the current \r
- station address is changed to the address specified by New. If the network \r
- interface does not allow its station address to be modified, then \r
+ set to the network interface's permanent address. If Reset is FALSE, and the\r
+ network interface allows its station address to be modified, then the current\r
+ station address is changed to the address specified by New. If the network\r
+ interface does not allow its station address to be modified, then\r
EFI_INVALID_PARAMETER will be returned. If the station address is successfully\r
updated on the network interface, EFI_SUCCESS will be returned. If the driver\r
has not been initialized, EFI_DEVICE_ERROR will be returned.\r
\r
@param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.\r
- @param Reset Flag used to reset the station address to the network interface's \r
+ @param Reset Flag used to reset the station address to the network interface's\r
permanent address.\r
@param New New station address to be used for the network interface.\r
\r
\r
@retval EFI_SUCCESS The network interface's station address was updated.\r
- @retval EFI_NOT_STARTED The Simple Network Protocol interface has not been \r
+ @retval EFI_NOT_STARTED The Simple Network Protocol interface has not been\r
started by calling Start().\r
@retval EFI_INVALID_PARAMETER The New station address was not accepted by the NIC.\r
@retval EFI_INVALID_PARAMETER Reset is FALSE and New is NULL.\r
- @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not \r
+ @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not\r
been initialized by calling Initialize().\r
- @retval EFI_DEVICE_ERROR An error occurred attempting to set the new \r
+ @retval EFI_DEVICE_ERROR An error occurred attempting to set the new\r
station address.\r
- @retval EFI_UNSUPPORTED The NIC does not support changing the network \r
+ @retval EFI_UNSUPPORTED The NIC does not support changing the network\r
interface's station address.\r
\r
**/\r