/** @file\r
Declaration of strctures and functions for SnpDxe driver.\r
\r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials are licensed\r
-and made available under the terms and conditions of the BSD License which\r
-accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
#ifndef _SNP_H_\r
#define PCI_BAR_MEM_MODE 0x00000000\r
#define PCI_BAR_MEM_64BIT 0x00000004\r
\r
+#define SNP_TX_BUFFER_INCREASEMENT MAX_XMIT_BUFFERS\r
+#define SNP_MAX_TX_BUFFER_NUM 65536\r
+\r
typedef\r
EFI_STATUS\r
(EFIAPI *ISSUE_UNDI32_COMMAND) (\r
\r
//\r
// Whether UNDI support reporting media status from GET_STATUS command,\r
- // i.e. PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED\r
+ // i.e. PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED or\r
+ // PXE_STATFLAGS_GET_STATUS_NO_MEDIA_NOT_SUPPORTED\r
//\r
BOOLEAN MediaStatusSupported;\r
+\r
+ //\r
+ // Whether UNDI support cable detect for INITIALIZE command,\r
+ // i.e. PXE_STATFLAGS_CABLE_DETECT_SUPPORTED or\r
+ // PXE_STATFLAGS_CABLE_DETECT_NOT_SUPPORTED\r
+ //\r
+ BOOLEAN CableDetectSupported;\r
+\r
+ //\r
+ // Array of the recycled transmit buffer address from UNDI.\r
+ //\r
+ UINT64 *RecycledTxBuf;\r
+ //\r
+ // The maximum number of recycled buffer pointers in RecycledTxBuf.\r
+ //\r
+ UINT32 MaxRecycledTxBuf;\r
+ //\r
+ // Current number of recycled buffer pointers in RecycledTxBuf.\r
+ //\r
+ UINT32 RecycledTxBufCount;\r
} SNP_DRIVER;\r
\r
#define EFI_SIMPLE_NETWORK_DEV_FROM_THIS(a) CR (a, SNP_DRIVER, Snp, SNP_DRIVER_SIGNATURE)\r
SNP_DRIVER *Snp\r
);\r
\r
+/**\r
+ Call undi to get the status of the interrupts, get the list of recycled transmit\r
+ buffers that completed transmitting. The recycled transmit buffer address will\r
+ be saved into Snp->RecycledTxBuf. This function will also update the MediaPresent\r
+ field of EFI_SIMPLE_NETWORK_MODE if UNDI support it.\r
+\r
+ @param[in] Snp Pointer to snp driver structure.\r
+ @param[out] InterruptStatusPtr A non null pointer to contain the interrupt\r
+ status.\r
+ @param[in] GetTransmittedBuf Set to TRUE to retrieve the recycled transmit\r
+ buffer address.\r
+\r
+ @retval EFI_SUCCESS The status of the network interface was retrieved.\r
+ @retval EFI_DEVICE_ERROR The command could not be sent to the network\r
+ interface.\r
+\r
+**/\r
+EFI_STATUS\r
+PxeGetStatus (\r
+ IN SNP_DRIVER *Snp,\r
+ OUT UINT32 *InterruptStatusPtr,\r
+ IN BOOLEAN GetTransmittedBuf\r
+ );\r
+\r
/**\r
This is a callback routine supplied to UNDI3.1 at undi_start time.\r
UNDI call this routine when it wants to have exclusive access to a critical\r