#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <byteswap.h>
#include <basemem_packet.h>
#include <gpxe/netdevice.h>
#include <gpxe/iobuf.h>
#include <gpxe/device.h>
#include <gpxe/pci.h>
#include <gpxe/if_ether.h>
#include <gpxe/ip.h>
#include <gpxe/arp.h>
#include <gpxe/rarp.h>
#include "pxe.h"
Go to the source code of this file.
Definition in file pxe_undi.c.
| FILE_LICENCE | ( | GPL2_OR_LATER | ) |
| void pxe_set_netdev | ( | struct net_device * | netdev | ) |
Set network device as current PXE network device.
| netdev | Network device, or NULL |
Definition at line 60 of file pxe_undi.c.
References netdev_get(), netdev_put(), and NULL.
Referenced by pxe_activate(), and pxe_deactivate().
00060 { 00061 if ( pxe_netdev ) 00062 netdev_put ( pxe_netdev ); 00063 pxe_netdev = NULL; 00064 if ( netdev ) 00065 pxe_netdev = netdev_get ( netdev ); 00066 }
| static int pxe_netdev_open | ( | void | ) | [static] |
Open PXE network device.
| rc | Return status code |
Definition at line 73 of file pxe_undi.c.
References netdev_irq(), and netdev_open().
Referenced by pxenv_undi_open(), and pxenv_undi_reset_adapter().
00073 { 00074 int rc; 00075 00076 if ( ( rc = netdev_open ( pxe_netdev ) ) != 0 ) 00077 return rc; 00078 00079 netdev_irq ( pxe_netdev, 1 ); 00080 return 0; 00081 }
| static void pxe_netdev_close | ( | void | ) | [static] |
Close PXE network device.
Definition at line 87 of file pxe_undi.c.
References netdev_close(), netdev_irq(), and undi_tx_count.
Referenced by pxenv_undi_cleanup(), pxenv_undi_close(), pxenv_undi_reset_adapter(), and pxenv_undi_shutdown().
00087 { 00088 netdev_irq ( pxe_netdev, 0 ); 00089 netdev_close ( pxe_netdev ); 00090 undi_tx_count = 0; 00091 }
| static void pxe_dump_mcast_list | ( | struct s_PXENV_UNDI_MCAST_ADDRESS * | mcast | ) | [static] |
Dump multicast address list.
| mcast | PXE multicast address list |
Definition at line 98 of file pxe_undi.c.
References DBG, net_device::ll_protocol, s_PXENV_UNDI_MCAST_ADDRESS::McastAddr, s_PXENV_UNDI_MCAST_ADDRESS::MCastAddrCount, and ll_protocol::ntoa.
Referenced by pxenv_undi_open(), pxenv_undi_reset_adapter(), and pxenv_undi_set_mcast_address().
00098 { 00099 struct ll_protocol *ll_protocol = pxe_netdev->ll_protocol; 00100 unsigned int i; 00101 00102 for ( i = 0 ; i < mcast->MCastAddrCount ; i++ ) { 00103 DBG ( " %s", ll_protocol->ntoa ( mcast->McastAddr[i] ) ); 00104 } 00105 }
int undi_tx_count = 0 [static] |
Count of outstanding transmitted packets.
This is incremented each time PXENV_UNDI_TRANSMIT is called, and decremented each time that PXENV_UNDI_ISR is called with the TX queue empty, stopping when the count reaches zero. This allows us to provide a pessimistic approximation of TX completion events to the PXE NBP simply by monitoring the netdev's TX queue.
Definition at line 51 of file pxe_undi.c.
Referenced by pxe_netdev_close(), pxenv_undi_isr(), and pxenv_undi_transmit().
| struct net_device* pxe_netdev = NULL |
Definition at line 53 of file pxe_undi.c.
Referenced by pxenv_get_cached_info(), and pxenv_udp_write().
1.5.7.1