diff options
author | Michael Kubacki <michael.kubacki@microsoft.com> | 2021-12-05 14:54:07 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | d1050b9dff1cace252aff86630bfdb59dff5f507 (patch) | |
tree | 77f796143980742d97a883f62ce339a270474801 /NetworkPkg/SnpDxe/Receive.c | |
parent | 2f88bd3a1296c522317f1c21377876de63de5be7 (diff) | |
download | edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.zip edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.gz edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.bz2 |
NetworkPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
Apply uncrustify changes to .c/.h files in the NetworkPkg package
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Diffstat (limited to 'NetworkPkg/SnpDxe/Receive.c')
-rw-r--r-- | NetworkPkg/SnpDxe/Receive.c | 131 |
1 files changed, 65 insertions, 66 deletions
diff --git a/NetworkPkg/SnpDxe/Receive.c b/NetworkPkg/SnpDxe/Receive.c index 1efb2ad..4160198 100644 --- a/NetworkPkg/SnpDxe/Receive.c +++ b/NetworkPkg/SnpDxe/Receive.c @@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/
-
#include "Snp.h"
/**
@@ -37,72 +36,72 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/
EFI_STATUS
PxeReceive (
- SNP_DRIVER *Snp,
- VOID *Buffer,
- UINTN *BufferSize,
- UINTN *HeaderSize,
- EFI_MAC_ADDRESS *SrcAddr,
- EFI_MAC_ADDRESS *DestAddr,
- UINT16 *Protocol
+ SNP_DRIVER *Snp,
+ VOID *Buffer,
+ UINTN *BufferSize,
+ UINTN *HeaderSize,
+ EFI_MAC_ADDRESS *SrcAddr,
+ EFI_MAC_ADDRESS *DestAddr,
+ UINT16 *Protocol
)
{
- PXE_CPB_RECEIVE *Cpb;
- PXE_DB_RECEIVE *Db;
- UINTN BuffSize;
+ PXE_CPB_RECEIVE *Cpb;
+ PXE_DB_RECEIVE *Db;
+ UINTN BuffSize;
- Cpb = Snp->Cpb;
- Db = Snp->Db;
- BuffSize = *BufferSize;
+ Cpb = Snp->Cpb;
+ Db = Snp->Db;
+ BuffSize = *BufferSize;
- Cpb->BufferAddr = (UINT64)(UINTN) Buffer;
- Cpb->BufferLen = (UINT32) *BufferSize;
+ Cpb->BufferAddr = (UINT64)(UINTN)Buffer;
+ Cpb->BufferLen = (UINT32)*BufferSize;
- Cpb->reserved = 0;
+ Cpb->reserved = 0;
- Snp->Cdb.OpCode = PXE_OPCODE_RECEIVE;
- Snp->Cdb.OpFlags = PXE_OPFLAGS_NOT_USED;
+ Snp->Cdb.OpCode = PXE_OPCODE_RECEIVE;
+ Snp->Cdb.OpFlags = PXE_OPFLAGS_NOT_USED;
- Snp->Cdb.CPBsize = (UINT16) sizeof (PXE_CPB_RECEIVE);
- Snp->Cdb.CPBaddr = (UINT64)(UINTN) Cpb;
+ Snp->Cdb.CPBsize = (UINT16)sizeof (PXE_CPB_RECEIVE);
+ Snp->Cdb.CPBaddr = (UINT64)(UINTN)Cpb;
- Snp->Cdb.DBsize = (UINT16) sizeof (PXE_DB_RECEIVE);
- Snp->Cdb.DBaddr = (UINT64)(UINTN) Db;
+ Snp->Cdb.DBsize = (UINT16)sizeof (PXE_DB_RECEIVE);
+ Snp->Cdb.DBaddr = (UINT64)(UINTN)Db;
- Snp->Cdb.StatCode = PXE_STATCODE_INITIALIZE;
- Snp->Cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;
- Snp->Cdb.IFnum = Snp->IfNum;
- Snp->Cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;
+ Snp->Cdb.StatCode = PXE_STATCODE_INITIALIZE;
+ Snp->Cdb.StatFlags = PXE_STATFLAGS_INITIALIZE;
+ Snp->Cdb.IFnum = Snp->IfNum;
+ Snp->Cdb.Control = PXE_CONTROL_LAST_CDB_IN_LIST;
//
// Issue UNDI command and check result.
//
DEBUG ((DEBUG_NET, "\nsnp->undi.receive () "));
- (*Snp->IssueUndi32Command) ((UINT64)(UINTN) &Snp->Cdb);
+ (*Snp->IssueUndi32Command)((UINT64)(UINTN)&Snp->Cdb);
switch (Snp->Cdb.StatCode) {
- case PXE_STATCODE_SUCCESS:
- break;
-
- case PXE_STATCODE_NO_DATA:
- DEBUG (
- (DEBUG_NET,
- "\nsnp->undi.receive () %xh:%xh\n",
- Snp->Cdb.StatFlags,
- Snp->Cdb.StatCode)
- );
-
- return EFI_NOT_READY;
-
- default:
- DEBUG (
- (DEBUG_ERROR,
- "\nsnp->undi.receive() %xh:%xh\n",
- Snp->Cdb.StatFlags,
- Snp->Cdb.StatCode)
- );
-
- return EFI_DEVICE_ERROR;
+ case PXE_STATCODE_SUCCESS:
+ break;
+
+ case PXE_STATCODE_NO_DATA:
+ DEBUG (
+ (DEBUG_NET,
+ "\nsnp->undi.receive () %xh:%xh\n",
+ Snp->Cdb.StatFlags,
+ Snp->Cdb.StatCode)
+ );
+
+ return EFI_NOT_READY;
+
+ default:
+ DEBUG (
+ (DEBUG_ERROR,
+ "\nsnp->undi.receive() %xh:%xh\n",
+ Snp->Cdb.StatFlags,
+ Snp->Cdb.StatCode)
+ );
+
+ return EFI_DEVICE_ERROR;
}
*BufferSize = Db->FrameLen;
@@ -123,7 +122,7 @@ PxeReceive ( //
// We need to do the byte swapping
//
- *Protocol = (UINT16) PXE_SWAP_UINT16 (Db->Protocol);
+ *Protocol = (UINT16)PXE_SWAP_UINT16 (Db->Protocol);
}
//
@@ -190,13 +189,13 @@ PxeReceive ( EFI_STATUS
EFIAPI
SnpUndi32Receive (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- OUT UINTN *HeaderSize OPTIONAL,
- IN OUT UINTN *BufferSize,
- OUT VOID *Buffer,
- OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
- OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
- OUT UINT16 *Protocol OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ OUT UINTN *HeaderSize OPTIONAL,
+ IN OUT UINTN *BufferSize,
+ OUT VOID *Buffer,
+ OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
+ OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
+ OUT UINT16 *Protocol OPTIONAL
)
{
SNP_DRIVER *Snp;
@@ -212,16 +211,16 @@ SnpUndi32Receive ( OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
switch (Snp->Mode.State) {
- case EfiSimpleNetworkInitialized:
- break;
+ case EfiSimpleNetworkInitialized:
+ break;
- case EfiSimpleNetworkStopped:
- Status = EFI_NOT_STARTED;
- goto ON_EXIT;
+ case EfiSimpleNetworkStopped:
+ Status = EFI_NOT_STARTED;
+ goto ON_EXIT;
- default:
- Status = EFI_DEVICE_ERROR;
- goto ON_EXIT;
+ default:
+ Status = EFI_DEVICE_ERROR;
+ goto ON_EXIT;
}
if ((BufferSize == NULL) || (Buffer == NULL)) {
|