140 "network device\n" );
160 "network device\n" );
184 "network device\n" );
208 "network device\n" );
237 "network device\n" );
264 "network device\n" );
291 "network device\n" );
326 "network device\n" );
343 switch ( undi_transmit->
Protocol ) {
361 undi_transmit->
TBD.offset, sizeof ( tbd ) );
449 *undi_set_mcast_address ) {
457 "no network device\n" );
458 undi_set_mcast_address->
Status =
473 *undi_set_station_address ) {
479 "with no network device\n" );
480 undi_set_station_address->
Status =
494 undi_set_station_address->
Status =
516 *undi_set_packet_filter ) {
519 undi_set_packet_filter->
filter );
524 "no network device\n" );
525 undi_set_packet_filter->
Status =
545 *undi_get_information ) {
552 "network device\n" );
581 undi_get_information->
RxBufCt = 1;
582 undi_get_information->
TxBufCt = 1;
598 *undi_get_statistics ) {
603 "network device\n" );
631 *undi_clear_statistics ) {
637 "no network device\n" );
657 *undi_initiate_diags ) {
658 DBGC ( &
pxe_netdev,
"PXENV_UNDI_INITIATE_DIAGS failed: unsupported\n" );
663 "network device\n" );
679 *undi_force_interrupt ) {
681 "PXENV_UNDI_FORCE_INTERRUPT failed: unsupported\n" );
686 "network device\n" );
701 *undi_get_mcast_address ) {
709 "no network device\n" );
710 undi_get_mcast_address->
Status =
721 undi_get_mcast_address->
MediaAddr ))!=0){
738 *undi_get_nic_type ) {
744 "no network device\n" );
753 sizeof ( undi_get_nic_type->
info ) );
772 "('%04x:%04x') %02x%02x%02x rev %02x\n",
791 info->CardSelNum,
info->EISA_Dev_ID,
810 *undi_get_iface_info ) {
815 "no network device\n" );
826 sizeof ( undi_get_iface_info->
IfaceType ),
"DIX+802.3" );
827 undi_get_iface_info->
LinkSpeed = 10000000;
835 sizeof(undi_get_iface_info->
Reserved) );
858 const void *ll_source;
863 unsigned int prottype;
873 "no network device\n" );
926 "PROCESS" :
"GET_NEXT" ) );
1015 undi_isr->
Frame.segment, undi_isr->
Frame.offset,
#define LL_MULTICAST
Packet is a multicast (including broadcast) packet.
PXENV_STATUS_t Status
PXE status code.
#define PCI_FUNC(busdevfn)
Address Resolution Protocol.
IP4_t InetAddr
Multicast IP address.
#define PXENV_STATUS_OUT_OF_RESOURCES
#define PXENV_UNDI_SHUTDOWN
PXE API function code for pxenv_undi_shutdown()
#define SUPPORTED_OPEN_CLOSE
Open / Close Adapter supported.
#define PCI_BUS(busdevfn)
Parameter block for pxenv_undi_isr()
#define PXENV_UNDI_FORCE_INTERRUPT
PXE API function code for pxenv_undi_force_interrupt()
struct arbelprm_rc_send_wqe rc
const char * name
Protocol name.
UINT16_t TDDataLen
Length of this transmit buffer.
#define iob_put(iobuf, len)
PXENV_STATUS_t Status
PXE status code.
Parameter block for pxenv_undi_clear_statistics()
A transmit buffer descriptor, as pointed to by s_PXENV_UNDI_TRANSMIT::TBD.
#define PCI_NIC
PCI network card.
struct pnp_nic_info pnp
NIC information (if NicType==PnP_NIC)
#define PXENV_EXIT_FAILURE
An error occurred.
uint8_t ll_addr_len
Link-layer address length.
#define SUPPORTED_IRQ
Interrupt Request supported.
Parameter block for pxenv_undi_force_interrupt()
List of multicast MAC addresses.
#define PXENV_UNDI_CLEANUP
PXE API function code for pxenv_undi_cleanup()
UINT32_t RcvGoodFrames
Successful reception count.
#define PXENV_UNDI_SET_STATION_ADDRESS
PXE API function code for pxenv_undi_set_station_address()
PXENV_STATUS_t Status
PXE status code.
#define SUPPORTED_SET_STATION_ADDRESS
Software settable station address.
void net_poll(void)
Poll the network stack.
static PXENV_EXIT_t pxenv_undi_open(struct s_PXENV_UNDI_OPEN *undi_open)
#define PXENV_UNDI_CLEAR_STATISTICS
PXE API function code for pxenv_undi_clear_statistics()
static PXENV_EXIT_t pxenv_undi_reset_adapter(struct s_PXENV_UNDI_RESET *undi_reset_adapter)
PXENV_STATUS_t Status
PXE status code.
PXENV_STATUS_t Status
PXE status code.
UINT8_t PktType
Packet type.
void free_iob(struct io_buffer *iobuf)
Free I/O buffer.
struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf
Multicast MAC addresses.
MAC_ADDR_t MediaAddr
Multicast MAC address.
#define PXENV_UNDI_GET_MCAST_ADDRESS
PXE API function code for pxenv_undi_get_mcast_address()
unsigned long ioaddr
I/O address.
static PXENV_EXIT_t pxenv_undi_get_nic_type(struct s_PXENV_UNDI_GET_NIC_TYPE *undi_get_nic_type)
#define SUPPORTED_RESET
Reset MAC supported.
PXENV_STATUS_t Status
PXE status code.
PXENV_STATUS_t Status
PXE status code.
Parameter block for pxenv_undi_initialize()
#define PXENV_UNDI_GET_IFACE_INFO
PXE API function code for pxenv_undi_get_iface_info()
#define PXENV_STATUS_UNDI_INVALID_PARAMETER
static PXENV_EXIT_t pxenv_undi_isr(struct s_PXENV_UNDI_ISR *undi_isr)
Parameter block for pxenv_undi_transmit()
UINT32_t RcvResourceErrors
Receive queue overflow count.
const uint8_t * ll_broadcast
Link-layer broadcast address.
unsigned long class
Device class.
#define PXENV_UNDI_SET_MCAST_ADDRESS
PXE API function code for pxenv_undi_set_mcast_address()
Parameter block for pxenv_undi_set_packet_filter()
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define P_DIRECTED
Unicast packet (or packet captured in promiscuous mode)
Parameter block for pxenv_undi_get_nic_type()
struct s_PXENV_UNDI_TBD::DataBlk DataBlock[MAX_DATA_BLKS]
static PXENV_EXIT_t pxenv_undi_force_interrupt(struct s_PXENV_UNDI_FORCE_INTERRUPT *undi_force_interrupt)
UINT32_t ServiceFlags
Service flags.
A data structure for storing profiling information.
UINT16_t PktFilter
Receive packet filter.
#define PXENV_UNDI_GET_NIC_TYPE
PXE API function code for pxenv_undi_get_nic_type()
static void profile_stop(struct profiler *profiler)
Stop profiling.
union s_PXENV_UNDI_GET_NIC_TYPE::nic_type_info info
struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf
List of multicast addresses.
static PXENV_EXIT_t pxenv_undi_get_information(struct s_PXENV_UNDI_GET_INFORMATION *undi_get_information)
UINT32_t RcvCRCErrors
Receive CRC error count.
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
UINT16_t FuncFlag
Function flag.
unsigned int vendor
Vendor ID.
UINT32_t LinkSpeed
Link speed, in bits per second.
struct net_device_stats tx_stats
TX statistics.
void(* init_addr)(const void *hw_addr, void *ll_addr)
Initialise link-layer address.
struct pci_nic_info pci
NIC information (if NicType==PCI_NIC)
static PXENV_EXIT_t pxenv_undi_get_mcast_address(struct s_PXENV_UNDI_GET_MCAST_ADDRESS *undi_get_mcast_address)
#define PCI_BASE_CLASS(class)
#define PXE_API_CALL(_opcode, _entry, _params_type)
Define a PXE API call.
#define PXENV_UNDI_ISR_OUT_RECEIVE
A packet has been received.
int(* push)(struct net_device *netdev, struct io_buffer *iobuf, const void *ll_dest, const void *ll_source, uint16_t net_proto)
Add link-layer header.
PXENV_STATUS_t Status
PXE status code.
Parameter block for pxenv_undi_close()
static PXENV_EXIT_t pxenv_undi_initialize(struct s_PXENV_UNDI_INITIALIZE *undi_initialize)
#define list_empty(list)
Test whether a list is empty.
const char * name
Protocol name.
UINT32_t XmtGoodFrames
Successful transmission count.
#define PXENV_UNDI_ISR_IN_PROCESS
Start processing interrupt.
#define PnP_NIC
ISAPnP network card.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
UINT16_t PXENV_EXIT_t
A PXE exit code.
PXENV_STATUS_t Status
PXE status code.
struct pxe_api_call pxe_undi_api [] __pxe_api_call
PXE UNDI API.
static PXENV_EXIT_t pxenv_undi_set_station_address(struct s_PXENV_UNDI_SET_STATION_ADDRESS *undi_set_station_address)
static PXENV_EXIT_t pxenv_undi_set_packet_filter(struct s_PXENV_UNDI_SET_PACKET_FILTER *undi_set_packet_filter)
UINT16_t FrameLength
Total frame length.
static int netdev_is_open(struct net_device *netdev)
Check whether or not network device is open.
#define PXENV_UNDI_ISR_IN_START
Determine whether or not this is our interrupt.
#define BUS_TYPE_PCI
PCI bus type.
#define MAX_LL_ADDR_LEN
Maximum length of a link-layer address.
SEGOFF16_t TDDataPtr
Address of this transmit buffer.
#define PXENV_UNDI_CLOSE
PXE API function code for pxenv_undi_close()
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
UINT8_t Protocol
Protocol.
PXENV_STATUS_t Status
PXE status code.
PXENV_STATUS_t Status
PXE status code.
SEGOFF16_t DestAddr
Destination MAC address.
UINT8_t XmitFlag
Unicast/broadcast flag.
UINT32_t Reserved[4]
Must be zero.
Parameter block for pxenv_undi_set_station_address()
Information for an ISAPnP or equivalent NIC.
struct list_head tx_queue
TX packet queue.
#define P_MULTICAST
Multicast packet.
#define SUPPORTED_BROADCAST
Broadcast supported.
static struct net_device * netdev
#define MAX_LL_HEADER_LEN
Maximum length of a link-layer header.
SEGOFF16_t Frame
Data buffer address.
Parameter block for pxenv_undi_shutdown()
void pxe_set_netdev(struct net_device *netdev)
Set network device as current PXE network device.
Parameter block for pxenv_undi_get_mcast_address()
static void profile_start(struct profiler *profiler)
Start profiling.
UINT8_t filter
Receive packet filter.
unsigned int location
Location.
PXENV_STATUS_t Status
PXE status code.
#define PXENV_UNDI_ISR_OUT_TRANSMIT
A packet transmission has completed.
static PXENV_EXIT_t pxenv_undi_get_statistics(struct s_PXENV_UNDI_GET_STATISTICS *undi_get_statistics)
static struct profiler undi_tx_profiler __profiler
Transmit profiler.
Parameter block for pxenv_undi_startup()
#define PXENV_UNDI_TRANSMIT
PXE API function code for pxenv_undi_transmit()
static int netdev_irq_enabled(struct net_device *netdev)
Check whether or not network device interrupts are currently enabled.
static void pxe_netdev_close(void)
Close PXE network device.
char * strerror(int errno)
Retrieve string representation of error number.
UINT8_t ProtType
Protocol type.
Parameter block for pxenv_undi_set_mcast_address()
struct net_device * pxe_netdev
PXENV_STATUS_t Status
PXE status code.
#define SUPPORTED_MULTICAST
Multicast supported.
#define PCI_SLOT(busdevfn)
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
struct net_device_stats rx_stats
RX statistics.
Reverse Address Resolution Protocol.
MAC_ADDR_t McastAddr[MAXNUM_MCADDR]
List of up to MAXNUM_MCADDR multicast MAC addresses.
unsigned int bad
Count of error completions.
void netdev_irq(struct net_device *netdev, int enable)
Enable or disable interrupts.
char * inet_ntoa(struct in_addr in)
Convert IPv4 address to dotted-quad notation.
IP4_t ip
Destination IP address.
SEGOFF16_t Xmit
Address of the transmit buffer.
int netdev_tx(struct net_device *netdev, struct io_buffer *iobuf)
Transmit raw packet via network device.
static PXENV_EXIT_t pxenv_undi_set_mcast_address(struct s_PXENV_UNDI_SET_MCAST_ADDRESS *undi_set_mcast_address)
PXENV_STATUS_t Status
PXE status code.
#define PXENV_UNDI_GET_STATISTICS
PXE API function code for pxenv_undi_get_statistics()
#define PXENV_UNDI_SET_PACKET_FILTER
PXE API function code for pxenv_undi_set_packet_filter()
#define PXENV_UNDI_INITIATE_DIAGS
PXE API function code for pxenv_undi_initiate_diags()
#define PXENV_STATUS_UNSUPPORTED
static struct net_device * netdev_get(struct net_device *netdev)
Get reference to network device.
#define PXENV_UNDI_OPEN
PXE API function code for pxenv_undi_open()
#define XMT_DESTADDR
Unicast packet.
MAC_ADDR_t StationAddress
Station MAC address.
#define PXENV_UNDI_ISR_OUT_NOT_OURS
This interrupt was not ours.
uint16_t net_proto
Network-layer protocol.
uint16_t ll_proto
Link-layer protocol.
#define PXENV_UNDI_ISR_IN_GET_NEXT
Continue processing interrupt.
int(* mc_hash)(unsigned int af, const void *net_addr, void *ll_addr)
Hash multicast address.
static PXENV_EXIT_t pxenv_undi_cleanup(struct s_PXENV_UNDI_CLEANUP *undi_cleanup)
struct device * dev
Underlying hardware device.
ADDR32_t ProtocolIni
NDIS 2.0 configuration information, or NULL.
#define LL_BROADCAST
Packet is a broadcast packet.
void netdev_close(struct net_device *netdev)
Close network device.
void netdev_rx_freeze(struct net_device *netdev)
Freeze network device receive queue processing.
A network-layer protocol.
#define PXENV_EXIT_SUCCESS
No error occurred.
void netdev_rx_unfreeze(struct net_device *netdev)
Unfreeze network device receive queue processing.
Network device management.
Parameter block for pxenv_undi_cleanup()
#define P_BROADCAST
Broadcast packet.
#define iob_reserve(iobuf, len)
static void pxe_dump_mcast_list(struct s_PXENV_UNDI_MCAST_ADDRESS *mcast)
Dump multicast address list.
unsigned int good
Count of successful completions.
int(* pull)(struct net_device *netdev, struct io_buffer *iobuf, const void **ll_dest, const void **ll_source, uint16_t *net_proto, unsigned int *flags)
Remove link-layer header.
unsigned int bus_type
Bus type.
char name[NETDEV_NAME_LEN]
Name of this network device.
#define PCI_PROG_INTF(class)
Parameter block for pxenv_undi_reset_adapter()
PXENV_STATUS_t Status
PXE status code.
#define PXENV_UNDI_RESET_ADAPTER
PXE API function code for pxenv_undi_reset_adapter()
Parameter block for pxenv_undi_initiate_diags()
unsigned int device
Device ID.
#define __from_data16(pointer)
static PXENV_EXIT_t pxenv_undi_initiate_diags(struct s_PXENV_UNDI_INITIATE_DIAGS *undi_initiate_diags)
SEGOFF16_t TBD
Address of the Transmit Buffer Descriptor.
#define IOB_ZLEN
Minimum I/O buffer length.
void * data
Start of data.
#define PXENV_UNDI_ISR
PXE API function code for pxenv_undi_isr()
PXENV_STATUS_t Status
PXE status code.
PXENV_STATUS_t Status
PXE status code.
Array of up to MAX_DATA_BLKS additional transmit buffers.
Parameter block for pxenv_undi_get_iface_info()
static PXENV_EXIT_t pxenv_undi_shutdown(struct s_PXENV_UNDI_SHUTDOWN *undi_shutdown)
UINT16_t ImmedLength
Length of the transmit buffer.
struct device_description desc
Device description.
const char *(* ntoa)(const void *ll_addr)
Transcribe link-layer address.
static PXENV_EXIT_t pxenv_undi_clear_statistics(struct s_PXENV_UNDI_CLEAR_STATISTICS *undi_clear_statistics)
#define P_RARP
RARP protocol.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
#define PXENV_UNDI_ISR_OUT_DONE
Finished processing interrupt.
UINT16_t OpenFlag
Open flags as defined in NDIS 2.0.
static PXENV_EXIT_t pxenv_undi_close(struct s_PXENV_UNDI_CLOSE *undi_close)
static PXENV_EXIT_t pxenv_undi_get_iface_info(struct s_PXENV_UNDI_GET_IFACE_INFO *undi_get_iface_info)
uint8_t ll_addr[MAX_LL_ADDR_LEN]
Link-layer address.
UINT8_t IfaceType[16]
Interface type.
#define P_ARP
ARP protocol.
static int undi_tx_count
Count of outstanding transmitted packets.
#define PXENV_STATUS_SUCCESS
#define P_UNKNOWN
Media header already filled in.
static PXENV_EXIT_t pxenv_undi_startup(struct s_PXENV_UNDI_STARTUP *undi_startup)
#define PXENV_UNDI_STARTUP
PXE API function code for pxenv_undi_startup()
static int netdev_rx_frozen(struct net_device *netdev)
Check whether or not network device receive queue processing is frozen.
PXENV_STATUS_t Status
PXE status code.
#define PXENV_UNDI_INITIALIZE
PXE API function code for pxenv_undi_initialize()
UINT16_t FrameHeaderLength
Frame header length.
PXENV_STATUS_t Status
PXE status code.
#define PXENV_UNDI_ISR_OUT_OURS
This interrupt was ours.
uint8_t hw_addr[MAX_HW_ADDR_LEN]
Hardware address.
#define NULL
NULL pointer (VOID *)
Parameter block for pxenv_undi_get_statistics()
static int pxe_netdev_open(void)
Open PXE network device.
static int netdev_irq_supported(struct net_device *netdev)
Check whether or not network device supports interrupts.
UINT16_t BufferLength
Data buffer length.
int netdev_open(struct net_device *netdev)
Open network device.
#define PXENV_STATUS(rc)
Derive PXENV_STATUS code from iPXE error number.
Parameter block for pxenv_undi_open()
#define AF_INET
IPv4 Internet addresses.
#define PXENV_STATUS_FAILURE
struct ll_protocol * ll_protocol
Link-layer protocol.
#define PXENV_STATUS_UNDI_INVALID_STATE
UINT16_t MCastAddrCount
Number of multicast MAC addresses.
Information for a PCI or equivalent NIC.
#define BUS_TYPE_ISAPNP
ISAPnP bus type.
void * memset(void *dest, int character, size_t len) __nonnull
struct io_buffer * netdev_rx_dequeue(struct net_device *netdev)
Remove packet from device's receive queue.
static PXENV_EXIT_t pxenv_undi_transmit(struct s_PXENV_UNDI_TRANSMIT *undi_transmit)
struct s_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf
Multicast MAC addresses.
#define PCI_SUB_CLASS(class)