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

Go to the source code of this file.

Functions

EFI_STATUS PxeGetStatus (IN SNP_DRIVER *Snp, OUT UINT32 *InterruptStatusPtr, IN BOOLEAN GetTransmittedBuf)
 
EFI_STATUS EFIAPI SnpUndi32GetStatus (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, OUT UINT32 *InterruptStatus OPTIONAL, OUT VOID **TxBuf OPTIONAL)
 

Detailed Description

Implementation of reading the current interrupt status and recycled transmit buffer status from a network interface.

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

Definition in file Get_status.c.

Function Documentation

◆ PxeGetStatus()

EFI_STATUS PxeGetStatus ( IN SNP_DRIVER Snp,
OUT UINT32 *  InterruptStatusPtr,
IN BOOLEAN  GetTransmittedBuf 
)

Call undi to get the status of the interrupts, get the list of recycled transmit buffers that completed transmitting. The recycled transmit buffer address will be saved into Snp->RecycledTxBuf. This function will also update the MediaPresent field of EFI_SIMPLE_NETWORK_MODE if UNDI support it.

Parameters
[in]SnpPointer to snp driver structure.
[out]InterruptStatusPtrA non null pointer to contain the interrupt status.
[in]GetTransmittedBufSet to TRUE to retrieve the recycled transmit buffer address.
Return values
EFI_SUCCESSThe status of the network interface was retrieved.
EFI_DEVICE_ERRORThe command could not be sent to the network interface.

Definition at line 30 of file Get_status.c.

◆ SnpUndi32GetStatus()

EFI_STATUS EFIAPI SnpUndi32GetStatus ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
OUT UINT32 *InterruptStatus  OPTIONAL,
OUT VOID **TxBuf  OPTIONAL 
)

Reads the current interrupt status and recycled transmit buffer status from a network interface.

This function gets the current interrupt and recycled transmit buffer status from the network interface. The interrupt status is returned as a bit mask in InterruptStatus. If InterruptStatus is NULL, the interrupt status will not be read. If TxBuf is not NULL, a recycled transmit buffer address will be retrieved. If a recycled transmit buffer address is returned in TxBuf, then the buffer has been successfully transmitted, and the status for that buffer is cleared. If the status of the network interface is successfully collected, EFI_SUCCESS will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.

Parameters
ThisA pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
InterruptStatusA pointer to the bit mask of the currently active interrupts (see "Related Definitions"). If this is NULL, the interrupt status will not be read from the device. If this is not NULL, the interrupt status will be read from the device. When the interrupt status is read, it will also be cleared. Clearing the transmit interrupt does not empty the recycled transmit buffer array.
TxBufRecycled transmit buffer address. The network interface will not transmit if its internal recycled transmit buffer array is full. Reading the transmit buffer does not clear the transmit interrupt. If this is NULL, then the transmit buffer status will not be read. If there are no transmit buffers to recycle and TxBuf is not NULL, TxBuf will be set to NULL.
Return values
EFI_SUCCESSThe status of the network interface was retrieved.
EFI_NOT_STARTEDThe network interface has not been started.
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.

Definition at line 199 of file Get_status.c.