iPXE
|
Skeleton network driver. More...
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <byteswap.h>
#include <ipxe/netdevice.h>
#include <ipxe/ethernet.h>
#include <ipxe/if_ether.h>
#include <ipxe/iobuf.h>
#include <ipxe/malloc.h>
#include <ipxe/pci.h>
#include "skeleton.h"
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | skeleton_reset (struct skeleton_nic *skel) |
Reset hardware. More... | |
static void | skeleton_check_link (struct net_device *netdev) |
Check link state. More... | |
static int | skeleton_open (struct net_device *netdev) |
Open network device. More... | |
static void | skeleton_close (struct net_device *netdev) |
Close network device. More... | |
static int | skeleton_transmit (struct net_device *netdev, struct io_buffer *iobuf) |
Transmit packet. More... | |
static void | skeleton_poll (struct net_device *netdev) |
Poll for completed and received packets. More... | |
static void | skeleton_irq (struct net_device *netdev, int enable) |
Enable or disable interrupts. More... | |
static int | skeleton_probe (struct pci_device *pci) |
Probe PCI device. More... | |
static void | skeleton_remove (struct pci_device *pci) |
Remove PCI device. More... | |
Variables | |
static struct net_device_operations | skeleton_operations |
Skeleton network device operations. More... | |
static struct pci_device_id | skeleton_nics [] |
Skeleton PCI device IDs. More... | |
struct pci_driver skeleton_driver | __pci_driver |
Skeleton PCI driver. More... | |
Skeleton network driver.
Definition in file skeleton.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Reset hardware.
skel | Skeleton device |
rc | Return status code |
Definition at line 58 of file skeleton.c.
Referenced by skeleton_probe(), and skeleton_remove().
|
static |
Check link state.
netdev | Network device |
Definition at line 76 of file skeleton.c.
References DBGC, ENOTSUP, netdev, netdev_link_err(), and net_device::priv.
Referenced by skeleton_probe().
|
static |
Open network device.
netdev | Network device |
rc | Return status code |
Definition at line 96 of file skeleton.c.
References DBGC, ENOTSUP, netdev, and net_device::priv.
|
static |
Close network device.
netdev | Network device |
Definition at line 108 of file skeleton.c.
References DBGC, netdev, and net_device::priv.
|
static |
Transmit packet.
netdev | Network device |
iobuf | I/O buffer |
rc | Return status code |
Definition at line 121 of file skeleton.c.
References DBGC, ENOTSUP, netdev, and net_device::priv.
|
static |
Poll for completed and received packets.
netdev | Network device |
Definition at line 135 of file skeleton.c.
References netdev, and net_device::priv.
|
static |
Enable or disable interrupts.
netdev | Network device |
enable | Interrupts should be enabled |
Definition at line 148 of file skeleton.c.
References DBGC, netdev, and net_device::priv.
|
static |
Probe PCI device.
pci | PCI device |
rc | Return status code |
Definition at line 177 of file skeleton.c.
References adjust_pci_device(), alloc_etherdev(), pci_device::dev, net_device::dev, ENODEV, ENOMEM, iounmap(), pci_device::membase, memset(), netdev, netdev_init(), netdev_nullify(), netdev_put(), pci_ioremap(), pci_set_drvdata(), net_device::priv, rc, register_netdev(), skeleton_nic::regs, SKELETON_BAR_SIZE, skeleton_check_link(), skeleton_operations, skeleton_reset(), and unregister_netdev().
|
static |
Remove PCI device.
pci | PCI device |
Definition at line 234 of file skeleton.c.
References iounmap(), netdev, netdev_nullify(), netdev_put(), pci_get_drvdata(), net_device::priv, skeleton_nic::regs, skeleton_reset(), and unregister_netdev().
|
static |
Skeleton network device operations.
Definition at line 156 of file skeleton.c.
Referenced by skeleton_probe().
|
static |
struct pci_driver skeleton_driver __pci_driver |
Skeleton PCI driver.
Definition at line 256 of file skeleton.c.