TianoCore EDK2 master
Loading...
Searching...
No Matches
Initialize.c File Reference
#include "Snp.h"

Go to the source code of this file.

Functions

EFI_STATUS PxeInit (SNP_DRIVER *Snp, UINT16 CableDetectFlag)
 
EFI_STATUS EFIAPI SnpUndi32Initialize (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN UINTN ExtraRxBufferSize OPTIONAL, IN UINTN ExtraTxBufferSize OPTIONAL)
 

Detailed Description

Implementation of initializing a network adapter.

Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Initialize.c.

Function Documentation

◆ PxeInit()

EFI_STATUS PxeInit ( SNP_DRIVER Snp,
UINT16  CableDetectFlag 
)

Call UNDI to initialize the interface.

Parameters
SnpPointer to snp driver structure.
CableDetectFlagDo/don't detect the cable (depending on what undi supports).
Return values
EFI_SUCCESSUNDI is initialized successfully.
EFI_DEVICE_ERRORUNDI could not be initialized.
OtherOther errors as indicated.

Definition at line 24 of file Initialize.c.

◆ SnpUndi32Initialize()

EFI_STATUS EFIAPI SnpUndi32Initialize ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
IN UINTN ExtraRxBufferSize  OPTIONAL,
IN UINTN ExtraTxBufferSize  OPTIONAL 
)

Resets a network adapter and allocates the transmit and receive buffers required by the network interface; optionally, also requests allocation of additional transmit and receive buffers.

This function allocates the transmit and receive buffers required by the network interface. If this allocation fails, then EFI_OUT_OF_RESOURCES is returned. If the allocation succeeds and the network interface is successfully initialized, then EFI_SUCCESS will be returned.

Parameters
ThisA pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
ExtraRxBufferSizeThe size, in bytes, of the extra receive buffer space that the driver should allocate for the network interface. Some network interfaces will not be able to use the extra buffer, and the caller will not know if it is actually being used.
ExtraTxBufferSizeThe size, in bytes, of the extra transmit buffer space that the driver should allocate for the network interface. Some network interfaces will not be able to use the extra buffer, and the caller will not know if it is actually being used.
Return values
EFI_SUCCESSThe network interface was initialized.
EFI_NOT_STARTEDThe network interface has not been started.
EFI_OUT_OF_RESOURCESThere was not enough memory for the transmit and receive buffers.
EFI_INVALID_PARAMETERThis parameter was NULL or did not point to a valid EFI_SIMPLE_NETWORK_PROTOCOL structure.
EFI_DEVICE_ERRORThe command could not be sent to the network interface.
EFI_UNSUPPORTEDThe increased buffer size feature is not supported.

Definition at line 181 of file Initialize.c.