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/Snp.h | |
parent | 2f88bd3a1296c522317f1c21377876de63de5be7 (diff) | |
download | edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.gz edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.tar.bz2 edk2-d1050b9dff1cace252aff86630bfdb59dff5f507.zip |
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/Snp.h')
-rw-r--r-- | NetworkPkg/SnpDxe/Snp.h | 252 |
1 files changed, 125 insertions, 127 deletions
diff --git a/NetworkPkg/SnpDxe/Snp.h b/NetworkPkg/SnpDxe/Snp.h index 30dd8d5f26..d57804ca28 100644 --- a/NetworkPkg/SnpDxe/Snp.h +++ b/NetworkPkg/SnpDxe/Snp.h @@ -5,10 +5,10 @@ Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.<BR> SPDX-License-Identifier: BSD-2-Clause-Patent
**/
+
#ifndef _SNP_H_
#define _SNP_H_
-
#include <Uefi.h>
#include <Protocol/SimpleNetwork.h>
@@ -33,35 +33,34 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define FOUR_GIGABYTES (UINT64) 0x100000000ULL
-
#define SNP_DRIVER_SIGNATURE SIGNATURE_32 ('s', 'n', 'd', 's')
#define MAX_MAP_LENGTH 100
-#define PCI_BAR_IO_MASK 0x00000003
-#define PCI_BAR_IO_MODE 0x00000001
+#define PCI_BAR_IO_MASK 0x00000003
+#define PCI_BAR_IO_MODE 0x00000001
-#define PCI_BAR_MEM_MASK 0x0000000F
-#define PCI_BAR_MEM_MODE 0x00000000
-#define PCI_BAR_MEM_64BIT 0x00000004
+#define PCI_BAR_MEM_MASK 0x0000000F
+#define PCI_BAR_MEM_MODE 0x00000000
+#define PCI_BAR_MEM_64BIT 0x00000004
-#define SNP_TX_BUFFER_INCREASEMENT MAX_XMIT_BUFFERS
-#define SNP_MAX_TX_BUFFER_NUM 65536
+#define SNP_TX_BUFFER_INCREASEMENT MAX_XMIT_BUFFERS
+#define SNP_MAX_TX_BUFFER_NUM 65536
typedef
EFI_STATUS
-(EFIAPI *ISSUE_UNDI32_COMMAND) (
+(EFIAPI *ISSUE_UNDI32_COMMAND)(
UINT64 Cdb
);
typedef struct {
- UINT32 Signature;
- EFI_LOCK Lock;
+ UINT32 Signature;
+ EFI_LOCK Lock;
- EFI_SIMPLE_NETWORK_PROTOCOL Snp;
- EFI_SIMPLE_NETWORK_MODE Mode;
+ EFI_SIMPLE_NETWORK_PROTOCOL Snp;
+ EFI_SIMPLE_NETWORK_MODE Mode;
- EFI_HANDLE DeviceHandle;
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;
+ EFI_HANDLE DeviceHandle;
+ EFI_DEVICE_PATH_PROTOCOL *DevicePath;
//
// Local instance data needed by SNP driver
@@ -69,96 +68,96 @@ typedef struct { // Pointer to S/W UNDI API entry point
// This will be NULL for H/W UNDI
//
- ISSUE_UNDI32_COMMAND IssueUndi32Command;
+ ISSUE_UNDI32_COMMAND IssueUndi32Command;
- BOOLEAN IsSwUndi;
+ BOOLEAN IsSwUndi;
//
// undi interface number, if one undi manages more nics
//
- PXE_IFNUM IfNum;
+ PXE_IFNUM IfNum;
//
// Allocated tx/rx buffer that was passed to UNDI Initialize.
//
- UINT32 TxRxBufferSize;
- VOID *TxRxBuffer;
+ UINT32 TxRxBufferSize;
+ VOID *TxRxBuffer;
//
// mappable buffers for receive and fill header for undi3.0
// these will be used if the user buffers are above 4GB limit (instead of
// mapping the user buffers)
//
- UINT8 *ReceiveBufffer;
- VOID *ReceiveBufferUnmap;
- UINT8 *FillHeaderBuffer;
- VOID *FillHeaderBufferUnmap;
+ UINT8 *ReceiveBufffer;
+ VOID *ReceiveBufferUnmap;
+ UINT8 *FillHeaderBuffer;
+ VOID *FillHeaderBufferUnmap;
- EFI_PCI_IO_PROTOCOL *PciIo;
- UINT8 IoBarIndex;
- UINT8 MemoryBarIndex;
+ EFI_PCI_IO_PROTOCOL *PciIo;
+ UINT8 IoBarIndex;
+ UINT8 MemoryBarIndex;
//
// Buffers for command descriptor block, command parameter block
// and data block.
//
- PXE_CDB Cdb;
- VOID *Cpb;
- VOID *CpbUnmap;
- VOID *Db;
+ PXE_CDB Cdb;
+ VOID *Cpb;
+ VOID *CpbUnmap;
+ VOID *Db;
//
// UNDI structure, we need to remember the init info for a long time!
//
- PXE_DB_GET_INIT_INFO InitInfo;
+ PXE_DB_GET_INIT_INFO InitInfo;
- VOID *SnpDriverUnmap;
+ VOID *SnpDriverUnmap;
//
// when ever we map an address, we must remember it's address and the un-map
// cookie so that we can unmap later
//
struct MAP_LIST {
- EFI_PHYSICAL_ADDRESS VirtualAddress;
- VOID *MapCookie;
+ EFI_PHYSICAL_ADDRESS VirtualAddress;
+ VOID *MapCookie;
} MapList[MAX_MAP_LENGTH];
- EFI_EVENT ExitBootServicesEvent;
+ EFI_EVENT ExitBootServicesEvent;
//
// Whether UNDI support reporting media status from GET_STATUS command,
// i.e. PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED or
// PXE_STATFLAGS_GET_STATUS_NO_MEDIA_NOT_SUPPORTED
//
- BOOLEAN MediaStatusSupported;
+ BOOLEAN MediaStatusSupported;
//
// Whether UNDI support cable detect for INITIALIZE command,
// i.e. PXE_STATFLAGS_CABLE_DETECT_SUPPORTED or
// PXE_STATFLAGS_CABLE_DETECT_NOT_SUPPORTED
//
- BOOLEAN CableDetectSupported;
+ BOOLEAN CableDetectSupported;
//
// Array of the recycled transmit buffer address from UNDI.
//
- UINT64 *RecycledTxBuf;
+ UINT64 *RecycledTxBuf;
//
// The maximum number of recycled buffer pointers in RecycledTxBuf.
//
- UINT32 MaxRecycledTxBuf;
+ UINT32 MaxRecycledTxBuf;
//
// Current number of recycled buffer pointers in RecycledTxBuf.
//
- UINT32 RecycledTxBufCount;
+ UINT32 RecycledTxBufCount;
} SNP_DRIVER;
-#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) CR (a, SNP_DRIVER, Snp, SNP_DRIVER_SIGNATURE)
+#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) CR (a, SNP_DRIVER, Snp, SNP_DRIVER_SIGNATURE)
//
// Global Variables
//
-extern EFI_DRIVER_BINDING_PROTOCOL gSimpleNetworkDriverBinding;
-extern EFI_COMPONENT_NAME_PROTOCOL gSimpleNetworkComponentName;
-extern EFI_COMPONENT_NAME2_PROTOCOL gSimpleNetworkComponentName2;
+extern EFI_DRIVER_BINDING_PROTOCOL gSimpleNetworkDriverBinding;
+extern EFI_COMPONENT_NAME_PROTOCOL gSimpleNetworkComponentName;
+extern EFI_COMPONENT_NAME2_PROTOCOL gSimpleNetworkComponentName2;
/**
this routine calls undi to start the interface and changes the snp state.
@@ -171,7 +170,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gSimpleNetworkComponentName2; **/
EFI_STATUS
PxeStart (
- IN SNP_DRIVER *Snp
+ IN SNP_DRIVER *Snp
);
/**
@@ -187,7 +186,7 @@ PxeStart ( **/
EFI_STATUS
PxeStop (
- SNP_DRIVER *Snp
+ SNP_DRIVER *Snp
);
/**
@@ -203,8 +202,8 @@ PxeStop ( **/
EFI_STATUS
PxeInit (
- SNP_DRIVER *Snp,
- UINT16 CableDetectFlag
+ SNP_DRIVER *Snp,
+ UINT16 CableDetectFlag
);
/**
@@ -218,7 +217,7 @@ PxeInit ( **/
EFI_STATUS
PxeShutdown (
- IN SNP_DRIVER *Snp
+ IN SNP_DRIVER *Snp
);
/**
@@ -233,7 +232,7 @@ PxeShutdown ( **/
EFI_STATUS
PxeGetStnAddr (
- SNP_DRIVER *Snp
+ SNP_DRIVER *Snp
);
/**
@@ -255,9 +254,9 @@ PxeGetStnAddr ( **/
EFI_STATUS
PxeGetStatus (
- IN SNP_DRIVER *Snp,
- OUT UINT32 *InterruptStatusPtr,
- IN BOOLEAN GetTransmittedBuf
+ IN SNP_DRIVER *Snp,
+ OUT UINT32 *InterruptStatusPtr,
+ IN BOOLEAN GetTransmittedBuf
);
/**
@@ -277,8 +276,8 @@ PxeGetStatus ( VOID
EFIAPI
SnpUndi32CallbackBlock (
- IN UINT64 UniqueId,
- IN UINT32 Enable
+ IN UINT64 UniqueId,
+ IN UINT32 Enable
);
/**
@@ -294,8 +293,8 @@ SnpUndi32CallbackBlock ( VOID
EFIAPI
SnpUndi32CallbackDelay (
- IN UINT64 UniqueId,
- IN UINT64 MicroSeconds
+ IN UINT64 UniqueId,
+ IN UINT64 MicroSeconds
);
/**
@@ -314,11 +313,11 @@ SnpUndi32CallbackDelay ( VOID
EFIAPI
SnpUndi32CallbackMemio (
- IN UINT64 UniqueId,
- IN UINT8 ReadOrWrite,
- IN UINT8 NumBytes,
- IN UINT64 MemOrPortAddr,
- IN OUT UINT64 BufferPtr
+ IN UINT64 UniqueId,
+ IN UINT8 ReadOrWrite,
+ IN UINT8 NumBytes,
+ IN UINT64 MemOrPortAddr,
+ IN OUT UINT64 BufferPtr
);
/**
@@ -338,11 +337,11 @@ SnpUndi32CallbackMemio ( VOID
EFIAPI
SnpUndi32CallbackMap (
- IN UINT64 UniqueId,
- IN UINT64 CpuAddr,
- IN UINT32 NumBytes,
- IN UINT32 Direction,
- IN OUT UINT64 DeviceAddrPtr
+ IN UINT64 UniqueId,
+ IN UINT64 CpuAddr,
+ IN UINT32 NumBytes,
+ IN UINT32 Direction,
+ IN OUT UINT64 DeviceAddrPtr
);
/**
@@ -362,11 +361,11 @@ SnpUndi32CallbackMap ( VOID
EFIAPI
SnpUndi32CallbackUnmap (
- IN UINT64 UniqueId,
- IN UINT64 CpuAddr,
- IN UINT32 NumBytes,
- IN UINT32 Direction,
- IN UINT64 DeviceAddr
+ IN UINT64 UniqueId,
+ IN UINT64 CpuAddr,
+ IN UINT32 NumBytes,
+ IN UINT32 Direction,
+ IN UINT64 DeviceAddr
);
/**
@@ -393,11 +392,11 @@ SnpUndi32CallbackUnmap ( VOID
EFIAPI
SnpUndi32CallbackSync (
- IN UINT64 UniqueId,
- IN UINT64 CpuAddr,
- IN UINT32 NumBytes,
- IN UINT32 Direction,
- IN UINT64 DeviceAddr
+ IN UINT64 UniqueId,
+ IN UINT64 CpuAddr,
+ IN UINT32 NumBytes,
+ IN UINT32 Direction,
+ IN UINT64 DeviceAddr
);
/**
@@ -419,7 +418,7 @@ SnpUndi32CallbackSync ( EFI_STATUS
EFIAPI
SnpUndi32Start (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
/**
@@ -443,7 +442,7 @@ SnpUndi32Start ( EFI_STATUS
EFIAPI
SnpUndi32Stop (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
/**
@@ -482,9 +481,9 @@ SnpUndi32Stop ( EFI_STATUS
EFIAPI
SnpUndi32Initialize (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN UINTN ExtraRxBufferSize OPTIONAL,
- IN UINTN ExtraTxBufferSize OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN UINTN ExtraRxBufferSize OPTIONAL,
+ IN UINTN ExtraTxBufferSize OPTIONAL
);
/**
@@ -540,7 +539,7 @@ SnpUndi32Reset ( EFI_STATUS
EFIAPI
SnpUndi32Shutdown (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This
);
/**
@@ -640,12 +639,12 @@ SnpUndi32Shutdown ( EFI_STATUS
EFIAPI
SnpUndi32ReceiveFilters (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN UINT32 Enable,
- IN UINT32 Disable,
- IN BOOLEAN ResetMCastFilter,
- IN UINTN MCastFilterCnt OPTIONAL,
- IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN UINT32 Enable,
+ IN UINT32 Disable,
+ IN BOOLEAN ResetMCastFilter,
+ IN UINTN MCastFilterCnt OPTIONAL,
+ IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
);
/**
@@ -683,9 +682,9 @@ SnpUndi32ReceiveFilters ( EFI_STATUS
EFIAPI
SnpUndi32StationAddress (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN BOOLEAN Reset,
- IN EFI_MAC_ADDRESS *New OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN BOOLEAN Reset,
+ IN EFI_MAC_ADDRESS *New OPTIONAL
);
/**
@@ -738,10 +737,10 @@ SnpUndi32StationAddress ( EFI_STATUS
EFIAPI
SnpUndi32Statistics (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN BOOLEAN Reset,
- IN OUT UINTN *StatisticsSize OPTIONAL,
- IN OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN BOOLEAN Reset,
+ IN OUT UINTN *StatisticsSize OPTIONAL,
+ IN OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
);
/**
@@ -775,10 +774,10 @@ SnpUndi32Statistics ( EFI_STATUS
EFIAPI
SnpUndi32McastIpToMac (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN BOOLEAN IPv6,
- IN EFI_IP_ADDRESS *IP,
- OUT EFI_MAC_ADDRESS *MAC
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN BOOLEAN IPv6,
+ IN EFI_IP_ADDRESS *IP,
+ OUT EFI_MAC_ADDRESS *MAC
);
/**
@@ -835,11 +834,11 @@ SnpUndi32McastIpToMac ( EFI_STATUS
EFIAPI
SnpUndi32NvData (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN BOOLEAN ReadWrite,
- IN UINTN Offset,
- IN UINTN BufferSize,
- IN OUT VOID *Buffer
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN BOOLEAN ReadWrite,
+ IN UINTN Offset,
+ IN UINTN BufferSize,
+ IN OUT VOID *Buffer
);
/**
@@ -883,9 +882,9 @@ SnpUndi32NvData ( EFI_STATUS
EFIAPI
SnpUndi32GetStatus (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- OUT UINT32 *InterruptStatus OPTIONAL,
- OUT VOID **TxBuf OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ OUT UINT32 *InterruptStatus OPTIONAL,
+ OUT VOID **TxBuf OPTIONAL
);
/**
@@ -945,13 +944,13 @@ SnpUndi32GetStatus ( EFI_STATUS
EFIAPI
SnpUndi32Transmit (
- IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
- IN UINTN HeaderSize,
- IN UINTN BufferSize,
- IN VOID *Buffer,
- IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
- IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
- IN UINT16 *Protocol OPTIONAL
+ IN EFI_SIMPLE_NETWORK_PROTOCOL *This,
+ IN UINTN HeaderSize,
+ IN UINTN BufferSize,
+ IN VOID *Buffer,
+ IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
+ IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
+ IN UINT16 *Protocol OPTIONAL
);
/**
@@ -1005,13 +1004,13 @@ SnpUndi32Transmit ( 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
);
/**
@@ -1024,11 +1023,10 @@ SnpUndi32Receive ( VOID
EFIAPI
SnpWaitForPacketNotify (
- EFI_EVENT Event,
- VOID *SnpPtr
+ EFI_EVENT Event,
+ VOID *SnpPtr
);
#define SNP_MEM_PAGES(x) (((x) - 1) / 4096 + 1)
-
#endif /* _SNP_H_ */
|