36 Snp->Cdb.DBaddr = (UINT64)(
UINTN)Db;
38 Snp->Cdb.StatCode = PXE_STATCODE_INITIALIZE;
39 Snp->Cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;
40 Snp->Cdb.IFnum = Snp->IfNum;
41 Snp->Cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;
46 DEBUG ((DEBUG_NET,
"\nsnp->undi.station_addr() "));
48 (*Snp->IssueUndi32Command)((UINT64)(
UINTN)&Snp->Cdb);
53 "\nsnp->undi.station_addr() %xh:%xh\n",
58 return EFI_DEVICE_ERROR;
108 if (NewMacAddr ==
NULL) {
109 Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_RESET;
113 Snp->Cdb.OpFlags = PXE_OPFLAGS_STATION_ADDRESS_WRITE;
120 Snp->Cdb.CPBaddr = (UINT64)(
UINTN)Cpb;
124 Snp->Cdb.DBaddr = (UINT64)(
UINTN)Db;
126 Snp->Cdb.StatCode = PXE_STATCODE_INITIALIZE;
127 Snp->Cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;
128 Snp->Cdb.IFnum = Snp->IfNum;
129 Snp->Cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;
134 DEBUG ((DEBUG_NET,
"\nsnp->undi.station_addr() "));
136 (*Snp->IssueUndi32Command)((UINT64)(
UINTN)&Snp->Cdb);
141 "\nsnp->undi.station_addr() %xh:%xh\n",
149 return EFI_DEVICE_ERROR;
207 if ((This ==
NULL) ||
208 (!Reset && (New ==
NULL)))
210 return EFI_INVALID_PARAMETER;
213 Snp = EFI_SIMPLE_NETWORK_DEV_FROM_THIS (This);
215 OldTpl =
gBS->RaiseTPL (TPL_CALLBACK);
220 switch (Snp->Mode.
State) {
221 case EfiSimpleNetworkInitialized:
224 case EfiSimpleNetworkStopped:
225 Status = EFI_NOT_STARTED;
229 Status = EFI_DEVICE_ERROR;
240 gBS->RestoreTPL (OldTpl);
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define DEBUG(Expression)
EFI_STATUS PxeGetStnAddr(SNP_DRIVER *Snp)
EFI_STATUS PxeSetStnAddr(SNP_DRIVER *Snp, EFI_MAC_ADDRESS *NewMacAddr)
EFI_STATUS EFIAPI SnpUndi32StationAddress(IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
#define PXE_CPBSIZE_NOT_USED
zero
#define PXE_OPCODE_STATION_ADDRESS
#define PXE_CPBADDR_NOT_USED
zero
#define PXE_OPFLAGS_STATION_ADDRESS_READ
#define PXE_STATCODE_SUCCESS
EFI_MAC_ADDRESS CurrentAddress
EFI_MAC_ADDRESS PermanentAddress
EFI_MAC_ADDRESS BroadcastAddress
PXE_MAC_ADDR PermanentAddr
PXE_MAC_ADDR BroadcastAddr